]> git.saurik.com Git - bison.git/blame - ChangeLog
Rework glr.c slightly to avoid gcc -Wtraditional warnings.
[bison.git] / ChangeLog
CommitLineData
327b5b56
PE
12003-08-04 Paul Eggert <eggert@twinsun.com>
2
3 Rework code slightly to avoid gcc -Wtraditional warnings.
4 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
5 The returned value is now stored in *YY0. All callers changed.
6 * src/output.c (merge_output): Adjust to the above change.
7
0051e3ed
PE
82003-07-26 Paul Eggert <eggert@twinsun.com>
9
10 * data/glr.c (YYASSERT): New macro.
11 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12 yyresolveStates, yyprocessOneStack):
13 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14 Derived from a suggestion by Frank Heckenbach.
15
137437c6
PE
162003-07-25 Paul Eggert <eggert@twinsun.com>
17
5b620e06
PE
18 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
19 for portability to K&R C (after ansi2knr, presumably). See
20 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
21 by Frank Heckenbach, though I have omitted the structure-initialization
22 part of his glr-knr.diff patch since I recall that the Portable
23 C Compiler didn't require that change.
24
137437c6
PE
25 Let the user specify how to allocate and free memory.
26 Derived from a suggestion by Frank Heckenbach in
27 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
28 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
29 All uses of free, malloc, realloc changed to use these macros,
30 and unnecessary casts removed.
31 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
32
ddb85ca5
PE
332003-07-06 Matthias Mann <MatthiasMann@gmx.de>
34
35 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
36 use s.empty() rather than s == "" to test for empty string; see
37 <http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
38 (trivial change)
39
39910e09
AD
402003-06-25 Akim Demaille <akim@epita.fr>
41
42 * config/depcomp, config/install-sh: Update from masters.
43
0ae99356
PE
442003-06-20 Paul Eggert <eggert@twinsun.com>
45
46 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
47 and return properly parenthesized result.
48 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
49 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
50 Remove unnecessary parentheses from uses.
51 * doc/bison.texinfo (Location Default Action): Describe the
52 conventions for parentheses.
53
cd05d13c
PE
542003-06-19 Paul Eggert <eggert@twinsun.com>
55
81fd08ca
PE
56 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
57 yyreportTree): Do not assume that size_t is the same width as int,
58 when printing sizes. Print sizes using an unsigned format.
59 Problem reported by Frank Heckenbach in
60 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 61
cd05d13c
PE
62 Port to Forte Developer 7 C compiler.
63 * data/glr.c (struct YYLTYPE): If locations are not being used,
64 declare a single dummy member, as empty structs do not conform
65 to the C standard.
66 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
67 the Forte Developer 7 C compiler complains that end-of-loop
68 code is not reached.
69
4dcf140b
PE
702003-06-17 Paul Eggert <eggert@twinsun.com>
71
72 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
73 avoid warnings from picky compilers about redefinition of PARAMS.
74
8dd76bee
PE
752003-06-17 Paul Eggert <eggert@twinsun.com>
76
77 Version 1.875b.
78
79 * NEWS: Document 1.875b.
80
81 * lib/bbitset.h: Do not include config.h; that's the includer's job.
82 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
83 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
84 Don't use 'index' in comments, as it's a builtin fn on some hosts.
85 * lib/bitset_stats.c: Include gettext.h unconditionally, as
86 per recent gettext manual's suggestion.
87 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
88 Use prototypes, not old-style definitions.
89 * lib/lbitset.c (lbitset_unused_clear): Likewise.
90 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
91 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
92 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
93 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
94 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
95 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
96 vbitset_or_and_cmp, vbitset_copy): Likewise.
97
98 * lib/libiberty.h: Do not include config.h; that's the includer's job.
99 Do not include <stdlib.h>.
100 (PARAMS): Define unconditionally for C89.
101 (ATTRIBUTE_NORETURN): Remove.
102 (ATTRIBUTE_UNUSED): Define unconditionally.
103
104 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
105 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
106 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
107 * lib/vbitset.c, lib/vbitset.h: New files.
108 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
109 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
110 from libbitset.
111
112 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
113 `How Can I Reset @code{yyparse}', since texinfo does not allow
114 arbitrary @ in node names.
115
116 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
117 shouldn't be needed according to the gettext 0.12.1 documentation
118 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 119 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 120 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 121 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 122
8dd76bee
PE
123 * lib/.cvsignore: Add stdbool.h.
124 * m4/.cvsignore: Add nls.m4, po.m4.
125
126 Upgrade to CVS gnulib.
127 * stdbool_.h: File renamed from stdbool.h.in.
128 * configure.ac (AM_STDBOOL_H): Invoke this instead of
129 AC_HEADER_STDBOOL.
130 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
131 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
132 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
133 (MOSTLYCLEANFILES): New var.
134 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
135 (stdbool.h): New rule.
136 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
137 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
138 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
139 m4/quote.m4: Upgrade to today's gnulib.
140
141 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
142 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
143 the tests right now.
144 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
145 yyerror are declared before use; C99 requires this.
146
25005f6a
PH
1472003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
148
149 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
150 first.
151 (yyrecoverSyntaxError): Correct the logic for setting and testing
152 yyerrState.
153 Correct comment on handling EOF.
154 Allow states with only a default reduction, rather than failing
8dd76bee 155 (I can't quite reconstruct why these were not allowed before).
25005f6a 156
137437c6 157 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 158 buffer overruns, corrupting state.
8dd76bee
PE
159
160 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
161 definition.
162 * src/reader.h (max_left_semantic_context): New variable declaration.
163 * src/scan-gram.l (max_left_semantic_context): Define.
164 (handle_action_dollar): Update max_left_semantic_context.
165 * data/glr.c (YYMAXLEFT): New definition.
166 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
167 (yyresolveAction): Ditto.
168
169 Fixes to problems with location handling in GLR parsers reported by
170 Frank Heckenbach (2003/06/05).
171
172 * data/glr.c (YYLTYPE): Make trivial if locations not used.
173 (YYRHSLOC): Add parentheses, and define only if locations used.
174 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
175 locations not used.
176 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
177 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 178
25005f6a
PH
179 * tests/cxx-type.at: Exercise location information; update tests
180 to differentiate output with and without locations.
8dd76bee 181 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
182 because default YYLTYPE not yet defined.
183 Change semantic actions to compute strings, rather than printing
184 them directly (to test proper passing of semantics values). Change
185 output to prefix notation and update test data and expected results.
186 (yylex): Track locations.
187 (stmtMerge): Return value rather than printing, and include arguments
188 in value.
8dd76bee 189
711f40b7
PE
1902003-06-03 Paul Eggert <eggert@twinsun.com>
191
192 Avoid warnings generated by GCC 2.95.4 when Bison is
193 configured with --enable-gcc-warnings.
194 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
195 yy::]b4_parser_class_name[::translate_,
196 yy::Stack::operator[] (unsigned),
197 yy::Stack::operator[] (unsigned) const,
198 yy::Slice::operator[] (unsigned),
199 yy::Slice::operator[] (unsigned) const):
200 Rename local vars to avoid warnings.
201 * tests/glr-regression.at (Improper handling of embedded actions
202 and $-N in GLR parsers): Remove unused local variable from yylex.
203 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
204 (void) as arg when not pure, since we now assume C89 when building
205 Bison. Pacify GCC by using parameter.
206
ac695f7d
PE
2072003-06-02 Paul Eggert <eggert@twinsun.com>
208
209 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
210 yy::Location::lines, yy::Location::columns): Rename arguments
211 to avoid shadowing; this removes a warning generated by GCC 3.3.
212
26ec81e0
PE
2132003-06-01 Paul Eggert <eggert@twinsun.com>
214
215 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
216 to g++, as GCC 3.3 complains if you do it.
217 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
218 everything that WARNING_CFLAGS has, except omit warnings
219 not suitable for C++.
220 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
221 * tests/atlocal.in (CXXFLAGS): New var.
222 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
223
224 Fix a GLR parser bug I reported in February; see
225 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
226 The problem was that GLR parsers did not conform to the C standard,
227 because actions like { $1 = $2 + $3; } expanded to expressions
228 that invoked YYFILL in separate subexpressions, and YYFILL assigned
229 to a local variable. The C standard says that expressions
230 like (var = f ()) + (var = f ()) have undefined behavior.
231 Another problem was that GCC sometimes issues warnings that
232 yyfill and its parameters are unused.
233
234 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
235 as possibly unused.
236 (yyfill): New function.
237 (YYFILL): Use it.
238 (yyuserAction): Change type of yynormal to bool, so that it matches
239 the new yyfill signature. Mark it as possibly unused.
240
241
242 Follow up on a bug I reported in February, where a Bison-generated
243 parser can loop. Provide a test case and a fix for yacc.c. I
244 don't have a fix for lalr1.cc or for glr.c, unfortunately.
245 The original bug report is in:
246 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
247
248 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
249 macro's size was becoming unwieldy.
250 (yyerrlab): Do not discard an empty lookahead symbol, as this
251 might destroy garbage.
252 (yyerrorlab): New label, with the old contents of YYERROR,
253 plus the following change: pop the stack of rhs corresponding
254 to the production that invoked YYERROR. That is how Yacc
255 behaves, and POSIX requires this behavior.
256 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
257 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
258 Define 'alarm' to do nothing if unistd.h is not available.
259 Add a new rule "exp: '-' error;" to test the above change to
260 data/yacc.c. Use 'alarm' to abort any test taking longer than
261 10 seconds, as it's probably looping.
262 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
263 Also, the new yacc.c generates two fewer diagnostics for an
264 existing test.
265
d0829076
PE
2662003-05-24 Paul Eggert <eggert@twinsun.com>
267
c6ae27df
PE
268 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
269 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
270 This fixes a problem reported by John Bowman when the Compaq/HP
271 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
272 -ansi -Wall -gall).
273 * data/yacc.c (union yyalloc): Likewise.
274 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 275
d0829076
PE
276 Switch from 'int' to 'bool' where that makes sense.
277
278 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
279 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
280 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
281 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
282 Return or accept bool, not int. All callers changed.
283 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
284 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
285 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
286 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
287 bitset_or_and_cmp_): Likewise.
288 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
289 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
290 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
291 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
292 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
293 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
294 bitset_stats_or_and_cmp): Likewise.
295 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
296 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
297 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
298 ebitset_xor_cmp): Likewise.
299 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
300 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
301 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
302 lbitset_xor_cmp): Likewise.
303 * lib/bbitset.h: Include <stdbool.h>.
304 (struct bitset_vtable): The following members now return bool, not
305 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
306 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
307 or_and_cmp).
308 * src/conflicts.c (count_rr_conflicts): Likewise.
309 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
310 All uses changed.
311 * lib/ebitset.c (ebitset_obstack_init): Likewise.
312 * lib/lbitset.c (lbitset_obstack_init): Likewise.
313 * src/getargs.c (debug_flag, defines_flag, locations_flag,
314 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
315 graph_flag): Likewise.
316 * src/getargs.h (debug_flag, defines_flag, locations_flag,
317 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
318 graph_flag): Likewise.
319 * src/output.c (error_verbose): Likewise.
320 * src/output.h (error_verbose): Likewise.
321 * src/reader.c (start_flag, typed): Likewise.
322 * src/reader.h (typed): Likewise.
323 * src/getargs.c (LOCATIONS_OPTION): New constant.
324 (long_options, getargs): Use it.
325 * src/lalr.c (build_relations): Use bool, not int.
326 * src/nullable.c (nullable_compute): Likewise.
327 * src/print.c (print_reductions): Likewise.
328 * src/tables.c (action_row, pack_vector): Likewise.
329 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
330 * src/output.c (prepare): Use it.
331 * src/output.c (token_definitions_output,
332 symbol_destructors_output, symbol_destructors_output): Use string,
333 not boolean integer, to keep track of whether to output separator.
334 * src/print_graph.c (print_core): Likewise.
335 * src/state.c (state_rule_lookaheads_print): Likewise.
336
337 * config/install-sh: Sync from automake 1.7.5.
338
6b2584b7
PE
3392003-05-14 Paul Eggert <eggert@twinsun.com>
340
341 * src/parse-gram.y (rules_or_grammar_declaration): Require a
342 semicolon after a grammar declaration, in the interest of possible
343 future changes to the Bison input language.
344 Do not allow a stray semicolon at the start of the grammar.
345 (rhses.1): Allow one or more semicolons after any rule, including
346 just before "|" as required by POSIX.
347 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
348 grammar.
349
caf37a36
ADL
3502003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
351
352 %parse-param support for lalr1.cc.
353
354 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
355 b4_cc_constructor_calls, b4_cc_constructor_call,
356 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
357 definitions.
358 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
359 parse-param arguments.
360 (yy::b4_parser_class_name): Declare instance variables to
361 hold parse-param arguments.
362 * tests/calc.at: s/value/semantic_value/ because value clashes
363 with a member of yy::b4_parser_class_name. Adjust C++ code
364 to handle %parse-param. Enable %parse-param test in C++.
365
3ab37077
PE
3662003-05-12 Paul Eggert <eggert@twinsun.com>
367
368 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
369 English a bit. Fix fclose typo. Change "const char" to "char
370 const", and use ANSI C rather than K&R for "main". Suggest
371 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
372 and suggest yy_switch_to_buffer.
373
3742003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
375
376 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
377 C89. This avoids a diagnostic on compilers that define __STDC__
378 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
379 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
380
e743727f
PE
3812003-05-03 Paul Eggert <eggert@twinsun.com>
382
383 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
384 Do not overrun array bounds.
385 This should fix a bug reported today by Olatunji Oluwabukunmi in
386 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
387
916708d5
AD
3882003-04-29 Akim Demaille <akim@epita.fr>
389
390 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
391 * src/getargs.c, src/getargs.h: here, as bool, not int.
392 (nondeterministic_parser): New.
393 * src/parse-gram.y, src/scan-gram.l: Support
394 %nondeterministic-parser.
395 * src/output.c (prepare): Use nondeterministic_parser instead
396 of glr_parser where appropriate.
397 * src/tables.c (conflict_row, action_row, save_row)
398 (token_actions, token_actions, pack_vector): Ditto.
399
a06ea4aa
AD
4002003-04-29 Akim Demaille <akim@epita.fr>
401
402 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
403
211074ca
AD
4042003-04-29 Akim Demaille <akim@epita.fr>
405
406 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
407 with %pure-parser and %locations to exercise the patch from Yakov
408 Markovitch below.
409
6175ffe3
PE
4102003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
411
412 * data/yacc.c: (b4_lex_param): Corrected for the case where
413 %lex-param is provided and %pure-parser isn't.
414
b1e95857
PE
4152003-04-27 Paul Eggert <eggert@twinsun.com>
416
417 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
418 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
419 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
420 if it is not defined.
421 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
422
acda9df6
PE
4232003-04-26 Paul Eggert <eggert@twinsun.com>
424
3470c57b
PE
425 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
426 Declare to be of type suitable for the ninf value itself, not of
427 type suitable for the corresponding table, since the latter might
428 be unsigned but the ninf value might be negative. This fixes a
429 bug reported by Alexandre Duret-Lutz in
430 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
431
acda9df6
PE
432 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
433 invokes it. We shouldn't invoke it twice because it will attempt
434 to put error.o in the archive twice. This fixes a glitch reported
435 by Martin Mokrejs in
436 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
437
b5250f26
PE
4382003-04-21 Paul Eggert <eggert@twinsun.com>
439
440 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
441 to gnulib.
442
089ac0f1
PE
4432003-04-21 Yakov Markovitch <Markovitch@iso.ru>
444
445 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
446 Fix obvious typo that results in uncompilable GLR parsers
447 when both %pure-parser and %locations are used. (trivial change)
448
5ededac6
PE
4492003-04-17 Paul Eggert <eggert@twinsun.com>
450
1b8f2fff
PE
451 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
452 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
453 Do not insert the expected token via unput, as this runs afoul
454 of a POSIX-compatibility bug in flex 2.5.31.
455 All uses changed to BEGIN the parent state,
456 since we no longer insert the expected token via unput.
457 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
458 that is no longer emitted after the above change.
459
5ededac6
PE
460 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
461 the first one. This change is from Paul Hilfinger, and it fixes
462 regression reported by Werner Lemberg in
463 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
464
465 (resolve_sr_conflict): Don't invoke state_errs_set
466 unless one or more tokens have been explicitly made errors.
467 Otherwise, the above change causes Bison to abort.
468
469 * tests/existing.at (GNU pic Grammar): New test case, taken from
470 Lemberg's email.
471
b8be9132
AD
4722003-03-31 Akim Demaille <akim@epita.fr>
473
474 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
475
d423d460
AD
4762003-03-31 Akim Demaille <akim@epita.fr>
477
478 * src/output.c (prepare_symbols): Avoid trailing spaces in the
479 output.
480
c7e441b4
AD
4812003-03-31 Akim Demaille <akim@epita.fr>
482
483 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
484 From Paul Hilfinger.
485
231897ad
AD
4862003-03-29 Akim Demaille <akim@epita.fr>
487
488 * m4/error.m4: Do not put under dynamic conditions some code which
489 expansion is under static control.
490
5b066063
AD
4912003-03-29 Akim Demaille <akim@epita.fr>
492
493 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
494
22a74fec
AD
4952003-03-29 Akim Demaille <akim@epita.fr>
496
497 * doc/bison.texinfo (Strings are Destroyed): New.
498
0eee27e7
PE
4992003-03-13 Paul Eggert <eggert@twinsun.com>
500
501 * .cvsignore: Add configure.lineno.
502 * src/.cvsignore: Add yacc.
503 * tests/.cvsignore: Add testsuite.log.
504 * doc/fdl.texi: Sync with latest FSF version.
505
f61aad93
PE
5062003-03-12 Paul Eggert <eggert@twinsun.com>
507
537636c7
PE
508 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
509 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
510 cursor, instead of leaving it undefined. This fixes a bug
511 reported by Tim Van Holder in
512 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
513 * tests/input.at (Torturing the Scanner): Test the scanner on
514 an empty input file, which was Tim Van Holder's test case.
515
516 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
517 <sys/resource.h> can be included, include sys/time.h and
518 sys/times.h first, if available. This works around the SunOS
519 4.1.4 porting bug reported by Bruce Becker in
520 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
521
522 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
523 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
524 AC_HEADER_SYS_WAIT.
525
f61aad93
PE
526 Merge changes from gnulib. This was prompted because the CVS
527 snapshot didn't build on Solaris 7 due to strnlen problems.
528
529 These changes need to be merged back into gnulib:
530 * lib/hash.c: Include <stdbool.h> unconditionally.
531 * m4/onceonly.m4 (m4_quote): New macro.
532 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
533 Quote AC_FOREACH variable-expansions properly.
534 The 2003-01-03 obstack.h change also needs merging.
535 {end of changes requiring merging}
5b066063 536
f61aad93
PE
537 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
538 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
539 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
540 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
541 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
542 New files, imported from gnulib.
543 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
544 above.
545
546 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
547 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
548 gnulib sources.
549
550 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
551 Add.
552 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
553 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
554 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
555 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
556 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
557 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
558 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
559 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
560 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
561 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
562 (jm_PREREQ_ARGMATCH): Remove.
563 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
564 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
565
566 * src/system.h: Include <stdbool.h> unconditionally.
567
568 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
569 assuming at least C89 in the bitset code for some time now.
570
d2ffe116
AD
5712003-03-03 Akim Demaille <akim@epita.fr>
572
573 * ro.po: New.
574
052826fd
AD
5752003-03-02 Akim Demaille <akim@epita.fr>
576
577 * doc/bison.texinfo (Table of Symbols): Reactivate the
578 documentation for %lex-param, and %parse-param.
579
c4749565
AD
5802003-03-02 Akim Demaille <akim@epita.fr>
581
582 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
583 generate verbose error messages.
584 Use the number of tokens as an upper bound in yytname, as it
585 cannot be a non terminal.
586
d5286af1
AD
5872003-03-02 Akim Demaille <akim@epita.fr>
588
589 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
590 message.
591
22e304a6
AD
5922003-03-02 Akim Demaille <akim@epita.fr>
593
22e304a6
AD
594 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
595 Use them to exercise yycheck overrun.
596 Based on Andrew Suffield's grammar.
597
67a25fed
AD
5982003-03-02 Akim Demaille <akim@epita.fr>
599
600 Create tests/local.at for Bison generic testing macros.
601
602 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
603 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
604 This new file.
605 * tests/calc.at (AT_CHECK_CALC): Adjust.
606 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
607 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
608 * tests/local.at: here.
609 (AT_COMPILE_CXX): Tags the tests using it as c++.
610 Ignore the test if CXX is not functional.
611
9c2b381f
PE
6122003-03-01 Paul Eggert <eggert@twinsun.com>
613
614 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
615 not loc->end, since loc->end might contain garbage and this leads
616 to undefined behavior on some platforms.
617 (id_loc, token_start): Use (IF_LINTed) initial values that do not
618 depend on *loc, so that the reader doesn't give the the false
619 impression that *loc is initialized.
620 (<INITIAL>"%%"): Do not bother setting code_start, since its value
621 does not survive the return.
622
0433ba88
AD
6232003-03-01 Akim Demaille <akim@epita.fr>
624
625 * src/scan-gram.l (code_start): Always initialize it when entering
626 into yylex, as SC_EPILOGUE is activated *before* the corresponding
627 yylex invocation. An alternative would be making it static, but
628 then it starts with the second %%'s beginning, instead of its end.
629
b305ea69
PE
6302003-02-28 Paul Eggert <eggert@twinsun.com>
631
632 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
633 around a UnixWare 7.1.1 porting bug reported by John Hughes in
634 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
635
c3d25e01
PE
6362003-02-26 Paul Eggert <eggert@twinsun.com>
637
638 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
639 Remove Sequent/Pyramid discussion (nobody uses them any more).
640 Merge VMS and MS-DOS discussion; these ports may well be dead
641 but let's keep mentioning them for now. Put <> around email
642 addresses. Add copyright notice.
643
c267ffbc
PE
6442003-02-24 Paul Eggert <eggert@twinsun.com>
645
646 * data/glr.c (yy_reduce_print): yylineno -> yylno,
647 to avoid collision with flex use of yylineno.
648 Problem reported by Bruce Lilly in
649 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
650 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
651 * data/yacc.c (yy_reduce_print): Likewise.
652
653 * config/depcomp: Sync with Automake 1.7.3.
654
f939fc12
AD
6552003-02-21 Akim Demaille <akim@epita.fr>
656
657 * data/lalr1.cc: Use temporary variables instead of casts to
658 change integer types.
659 Suggested by Paul Eggert.
660
95923bd6
AD
6612003-02-21 Akim Demaille <akim@epita.fr>
662
663 * doc/bison.texinfo: Use "location" consistently to refer to @n,
664 to avoid confusions with lalr1.cc's notion of Position.
665 Suggested by Paul Eggert.
666
2cdc240e
AD
6672003-02-20 Akim Demaille <akim@epita.fr>
668
669 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
670 before initial_columns.
671 (location.hh): Use consistent variable names when defining the
672 operator<<.
673 Use "last" so that we subtract from Positions, not from unsigned.
674
5d003116
AD
6752003-02-20 Akim Demaille <akim@epita.fr>
676
677 * data/lalr1.cc (position.hh): New subfile, including the extended
678 and Doxygen'ed documentation of class Position.
679 (location.hh): Use it.
680 Document a` la Doxygen.
ba1ecc07 681 With the help of Benoit Perrot.
5d003116 682
d02b25f9
AD
6832003-02-20 Akim Demaille <akim@epita.fr>
684
685 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
686 AT_YACC_IF.
687 Redefine AT_YYERROR_SEES_LOC_IF using it.
688 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
689 not defined.
690 Don't use the location in yy::Parser::error_ and
691 yy::Parser::print_ when not %locations.
692 Activate more lalr1.cc tests.
693
0d1c3a04
AD
6942003-02-19 Akim Demaille <akim@epita.fr>
695
696 * data/lalr1.cc: When displaying a line number, be sure to make it
697 an int.
698
60a777aa
AD
6992003-02-19 Akim Demaille <akim@epita.fr>
700
701 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
702 Remove, useless.
703 (YYABORT, YYACCEPT, YYERROR): New.
704 * tests/calc.at: Renable the lalr1.cc test.
705
0b86fc41
AD
7062003-02-19 Akim Demaille <akim@epita.fr>
707
708 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
709 error recovery, mixing with/without pops and discarding of the
710 lookahead.
711 Exercise YYERROR.
712 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
713
da99a5dc
PE
7142003-02-17 Paul Eggert <eggert@twinsun.com>
715
716 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
717 * tests/testsuite.at (AT_COMPILE): Use them.
718 This fixes the testsuite problem reported by Robert Lentz in
719 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
720
93b8c255
PE
7212003-02-12 Paul Eggert <eggert@twinsun.com>
722
723 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
724 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
725 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
726 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
727 Check for malloc failure, for consistency with yacc.c.
728 (yytname_size): Remove, for consistency with yacc.c.
729
730 The bug still remains in data/lalr1.cc, as I didn't have time
731 to fix it there.
732
7548fed2
AD
7332003-02-06 Akim Demaille <akim@epita.fr>
734
735 * configure.ac (GXX): Rename as...
736 (CXX): this, to keep the original Autoconf semantics.
737 Require 2.57.
738 * data/lalr1.cc: Fix b4_copyright invocations.
739 If YYDEBUG is not defined, don't depend upon name_ being defined.
740 (location.hh): Include string and iostream.
741 (Position::filename): New member.
742 (Position::Position ()): New.
743 (operator<< (Position)): New.
744 (operator- (Position, int)): New.
745 (Location::first, Location::last): Rename as...
746 (Location::begin, Location::end): these, to mock the conventional
747 iterator names.
748 (operator<< (Location)): New.
749 * tests/atlocal.in (CXX): New.
750 * tests/testsuite.at (AT_COMPILE_CXX): New.
751 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
752 locations in a more synthetic way.
753 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
754 lalr1.cc is used.
755 Adjust the C locations to match those from Emacs: first column is
756 column 0.
757 Change all the expected results.
758 Conform to the GCS: simplify the locations when applicable.
759 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
760 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
761 these CPP macros with the m4 macros new defined by...
762 (AT_CHECK_PUSHDEFS): this, i.e.:
763 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 764 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
765 New macros.
766 (AT_CHECK_POPDEFS): Undefine them.
767 (AT_CHECK_CALC_LALR1_CC): New.
768 Use it for the first lalr1.cc test.
769
43a176ef
AD
7702003-02-04 Akim Demaille <akim@epita.fr>
771
772 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
773 Location as is defined.
774
fc049e9c
AD
7752003-02-04 Akim Demaille <akim@epita.fr>
776
777 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
778 name_ being defined.
779
a737b216
PE
7802003-02-03 Paul Eggert <eggert@twinsun.com>
781
782 * src/gram.h (start_symbol): Remove unused decl.
783
784 Use more-consistent naming conventions for local vars.
785
786 * src/derives.c (derives_compute): Change type of local var from
787 int to rule_number.
788 * src/gram.c (grammar_rules_partial_print): Likewise.
789 * src/print.c (print_core): Likewise.
790 * src/reduce.c (reduce_grammar_tables): Likewise.
791
792 * src/gram.c (grammar_dump): Change name of item_number *
793 local var from r to rp.
794 * src/nullable.c (nullable_compute): Likewise.
795
796 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
797
798 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
799 for symbol or symbol_number var.
800 * src/reader.c (grammar_start_symbol_set): Likewise.
801 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
802 Likewise.
803 * src/state.c (transitions_to): Likewise.
804 * src/state.h: Likewise.
805 * src/tables.c (symbol_number_to_vector_number): Likewise.
806
807 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
808 char * var.
809
810 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
811 var.
812
813 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
814 var.
815
816 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
817 Use str, not s, for char * var. Use ch, not c, for character var.
818 Use size for size var.
819
820 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
821 char * var.
822 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
823 uniqstr var.
824 * src/uniqstr.h: Likewise.
825
826 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
827 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
828 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
829 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
830 param to have same name as that of enum, so that we don't use
831 "s" to stand for a non-state.
832
68e93ad5
AD
8332003-02-02 Akim Demaille <akim@epita.fr>
834
835 * src/scan-skel.l: Scan more than one inert character per yylex
836 invocation.
837
92898986
PE
8382003-02-01 Paul Eggert <eggert@twinsun.com>
839
840 Version 1.875a.
841
1d9d5d71
PE
842 * po/LINGUAS: Add ms.
843
0435d061
AD
8442003-01-30 Akim Demaille <akim@epita.fr>
845
846 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
847
6029a57f
PH
8482003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
849
850 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
851 of $1.
0435d061
AD
852
853 Changes in response to error report by S. Eken: GLR mode does not
6029a57f
PH
854 handle negative $ indices or $ indices in embedded rules correctly.
855 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 856
6029a57f
PH
857 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
858 (b4_rhs_location): Ditto.
0435d061 859 (yyfill): New function to copy from stack tree into array
6029a57f 860 incrementally.
0435d061
AD
861 (yyuserAction): Modify to allow incremental move of semantic values
862 to rhs array when in GLR mode.
863 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
864 as needed.
865 Remove dummy use of yystack, as there is now a guaranteed use.
866 (yydoAction): Modify to allow incremental move of semantic values
867 to rhs array when in GLR mode.
868 (yyresolveAction): Ditto.
869 (yyglrShiftDefer): Update comment.
0435d061 870 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
871 (yyglrReduce): Ditto.
872 (yydoAction): Ditto
0435d061 873
6029a57f
PH
874 * tests/glr-regr1.at: Rename to ...
875 * tests/glr-regression.at: Add new regression test for the problems
876 described above (adapted from S. Eken).
877 Update copyright notice.
878 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
879 * tests/Makefile.am: Ditto.
880
6cee6297
PE
8812003-01-28 Paul Eggert <eggert@twinsun.com>
882
883 * data/lalr1.cc: Do not use @output_header_name@ unless
884 b4_defines_flag is set. This fixes two bugs reported by
885 Tim Van Holder in
886 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
887 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
888
b2a836b5
PE
8892003-01-21 Paul Eggert <eggert@twinsun.com>
890
891 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
892 we don't need to worry about yyerrlab1 being reported as an
893 "unused label" by non-GCC C compilers. The downside is that if
894 locations are used then a couple of statements are duplicated each
895 time YYERROR is invoked, but the upside is that the warnings
896 should vanish.
897 (yyerrlab1): Move code to YERROR.
898 (yyerrlab2): Remove. Change uses back to yyerrlab1.
899 This reverts some of the 2002-12-27 change.
900
4196b931
PE
9012003-01-17 Paul Eggert <eggert@twinsun.com>
902
903 * src/output.c (symbol_printers_output): Fix typo that led
904 to core dump. Problem reported by Antonio Rus in
905 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
906
3ae831b4
AD
9072003-01-13 Akim Demaille <akim@epita.fr>,
908 Quoc Peyrot <chojin@lrde.epita.fr>,
909 Robert Anisko <anisko_r@lrde.epita.fr>
910
911 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
912 when the stacks contain one element, as the loop would otherwise
913 free the last state, and then use the top state (the one we just
914 popped). This means that the initial elements will not be freed
915 explicitly, as is the case in yacc.c; it is not a problem, as
916 these elements have fake values.
917
e3aa65c5
PE
9182003-01-11 Paul Eggert <eggert@twinsun.com>
919
920 * NEWS: %expect-violations are now just warnings, reverting
921 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
922 bootstrapping problem reported by Matthias Klose; see
923 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
924 * src/conflicts.c (conflicts_print): Likewise.
925 * tests/conflicts.at (%expect not enough, %expect too much,
926 %expect with reduce conflicts): Likewise.
927 * doc/bison.texinfo (Expect Decl): Document this. Also mention
928 that the warning is enabled if the number of conflicts changes
929 (not necessarily increases).
930
931 * src/getargs.c (version): Update copyright year.
932
f0057011
AD
9332003-01-09 Akim Demaille <akim@epita.fr>
934
935 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
936
1ee6d2a0
PE
9372003-01-08 Paul Eggert <eggert@twinsun.com>
938
939 * Makefile.maint (WGETFLAGS):
940 New macro, containing "-C off" to disable proxy caches.
941 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
942 (rel-check): Use $(WGET) instead of wget.
943
d4fd77c4
PE
9442003-01-06 Paul Eggert <eggert@twinsun.com>
945
946 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
947 the GLR paper of Scott, Johnstone and Hussain.
948
464c6927
PE
9492003-01-04 Paul Eggert <eggert@twinsun.com>
950
d600ee67
PE
951 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
952 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
953 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
954 (EXTRA_LIBRARIES): New var, for liby.a.
955 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
956 (EXTRA_SCRIPTS): New var, for yacc.
957
464c6927
PE
958 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
959 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
960 Problem reported by Nelson H. F. Beebe.
961
9622003-01-03 Paul Eggert <eggert@twinsun.com>
963
964 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
965 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
966 when compiling Bison 1.875's `bitset bset = obstack_alloc
967 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
968
969 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
970 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
971 grow to a huge size with typical invocation.
d600ee67 972
464c6927
PE
973 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
974 Use the pattern recommended by Autoconf 2.57, except also protect
975 against double-definition.
976 * src/system.h: Likewise.
977 Portability issues reported by Nelson H. F. Beebe.
d600ee67 978
464c6927
PE
979 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
980 All uses changed. Provide a definition in both C and C++.
981 (yytrue, yyfalse): Define even if defined (__cplusplus).
982
983 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
984 Reported by Nelson H. F. Beebe.
d600ee67 985
464c6927
PE
986 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
987
0f42c7d5
PE
9882003-01-02 Paul Eggert <eggert@twinsun.com>
989
990 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
991 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
992 Bug reported by Nelson H. F. Beebe.
993
dc546b0f
PE
9942003-01-01 Paul Eggert <eggert@twinsun.com>
995
996 * Version 1.875.
997
2c09b6a7
PE
9982002-12-30 Paul Eggert <eggert@twinsun.com>
999
1000 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
1001 Moved here from...
1002 (<INITIAL>","): Here. This causes stray "," to be treated
1003 more uniformly.
1004
dc546b0f 1005 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
1006 last brace in braced code when not in Yacc mode, for compatibility
1007 with Bison 1.35. This resurrects the 2001-12-15 patch to
1008 src/reader.c.
1009
1010 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
1011 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
1012
535c0f63
PE
10132002-12-28 Paul Eggert <eggert@twinsun.com>
1014
1015 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
1016 that of SYM's type. This fixes Debian bug 168069, reported by
1017 Thomas Olsson.
d600ee67 1018
963fcc17
PE
10192002-12-28 Paul Eggert <eggert@twinsun.com>
1020
1021 Version 1.75f.
1022
1023 Switch back to the Yacc style of conflict reports, undoing some
1024 of the 2002-07-30 change.
1025 * doc/bison.texinfo (Understanding): Use Yacc style for
1026 conflict reports. Also, use new way of locating rules.
1027 * src/conflicts.c (conflict_report):
1028 Renamed from conflict_report_yacc, removing the old
1029 'conflict_report'. Translate the entire conflict report at once,
1030 so that we don't assume that "," has the same interpretation in
1031 all languages.
1032 (conflicts_output): Use Yacc-style conflict report for each state,
1033 instead of our more-complicated style.
1034 (conflicts_print): Use Yacc-style conflict report, except print
1035 the input file name when not emulating Yacc.
1036 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
1037 Conflicted Reduction, %expect not enough, %expect too much,
1038 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
1039 * tests/existing.at (GNU Cim Grammar): Likewise.
1040 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
1041
1042 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
1043 fatal): Don't invoke fflush; it's not needed and it might even be
1044 harmful for stdout, as stdout might not be open.
1045 * src/reduce.c (reduce_print): Likewise.
1046
b1efe548
PE
10472002-12-27 Paul Eggert <eggert@twinsun.com>
1048
1049 Fix a bug where error locations were not being recorded correctly.
1050 This problem was originally reported by Paul Hilfinger in
e3aa65c5 1051 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
1052
1053 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1054 top of the location stack's error locations.
1055 (yyerrlab): Set it. When discarding a token, push its location
1056 onto yylerrsp so that we don't lose track of the error's end.
1057 (yyerrlab1): Now is only the target of YYERROR, so that we can
1058 properly record the location of the action that failed. For GCC
1059 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1060 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1061 (yyerrlab2): New label, which yyerrlab now falls through to.
1062 Compute the error's location by applying YYLLOC_DEFAULT to
1063 the locations of all the symbols that went into the error.
1064 * doc/bison.texinfo (Location Default Action): Mention that
1065 YYLLOC_DEFAULT is also invoked for syntax errors.
1066 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1067 Error locations include the locations of all the tokens that were
1068 discarded, not just the last token.
d600ee67 1069
983c5c2c
PE
10702002-12-26 Paul Eggert <eggert@twinsun.com>
1071
b1efe548
PE
1072 * src/files.c: Include quote.h.
1073 (compute_output_file_names): Warn if we detect conflicting
1074 outputs to the same file. This should catch the misunderstanding
1075 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1076
1077 * src/conflicts.c (conflicts_print): If the user specifies
1078 "%expect N", report an error if there are any reduce/reduce
1079 conflicts. This is what the manual says should happen.
1080 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1081 * tests/conflicts.at (%expect with reduce conflicts): New test.
1082
983c5c2c
PE
1083 Don't use m4_include on relative file names, as it doesn't work as
1084 desired if there happens to be a file with that name under ".".
d600ee67 1085
983c5c2c
PE
1086 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1087 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1088 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1089 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1090 * src/output.c (output_skeleton): Use full path names when
1091 specifying a file to include; don't rely on include path, as
1092 it's unreliable when the working file contains a file with
1093 that name.
d600ee67 1094
983c5c2c
PE
10952002-12-25 Paul Eggert <eggert@twinsun.com>
1096
1097 Remove obsolete references to bison.simple and bison.hairy.
1098 Problem mentioned by Aubin Mahe in
e3aa65c5 1099 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
1100 * data/glr.c: Comment fix.
1101 * doc/bison.1: Remove references. Also, mention "yacc".
1102
1103 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1104 with -g option.
1105
1106 * src/parse-gram.y (declaration): Use enum "report_states" rather
1107 than its numeric value 1.
1108
1109 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1110 opening a new one. This fixes Debian bug 165349, reported by
1111 Bruce Stephens.
1112
23f2d9dc
PE
11132002-12-24 Paul Eggert <eggert@twinsun.com>
1114
1115 Version 1.75e.
1116
1117 * Makefile.maint (cvs-update): Don't assume that the shell
1118 supports $(...), as Solaris sh doesn't.
1119
1120 * src/parse-gram.y (lloc_default): Remove test for empty
1121 nonterminals at the end, since it didn't change the result.
1122
11232002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
1124
1125 If the user does not define YYSTYPE as a macro, Bison now declares it
1126 using typedef instead of defining it as a macro. POSIX requires this.
1127 For consistency, YYLTYPE is also declared instead of defined.
1128
1129 %union directives can now have a tag before the `{', e.g., the
1130 directive `%union foo {...}' now generates the C code
1131 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1132 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1133 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1134 instead of `yyltype'.
1135
1136 `yystype' and `yyltype' are now obsolescent macros instead of being
1137 typedefs or tags; they are no longer documented and will be
1138 withdrawn in a future release.
1139
1140 * data/glr.c (b4_location_type): Remove.
1141 (YYSTYPE): Renamed from yystype.
1142 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
1143 (struct YYLTYPE): Renamed from struct yyltype.
1144 (YYLTYPE): Renamed from yyltype.
1145 (yyltype, yystype): New (and obsolescent) macros,
1146 for backward compatibility.
1147 * data/yacc.c: Likewise.
1148
1149 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
1150 does not specify a union tag. This is for compatibility with
1151 Solaris 9 yacc.
1152
1153 * src/parse-gram.y (add_param): 2nd arg is now char * not char
1154 const *, since it is now modified by stripping surrounding { }.
1155 (current_braced_code): Remove.
1156 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
1157 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
1158 trailing " {...}". Now of type <chars>.
1159 (grammar_declaration): Adjust to bundled tokens.
1160 (code_content): Remove; stripping is now done by add_param.
1161 (print_token_value): Print contents of bundled tokens.
1162 (token_name): New function.
1163
1164 * src/reader.h (braced_code, current_braced_code): Remove.
1165 (token_name): New decl.
1166
1167 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
1168 token_type, not braced_code code_kind. All uses changed.
1169 (SC_PRE_CODE): New state, for scanning after a keyword that
1170 has (or usually has) an immediately-following braced code.
1171 (token_type): New local var, to keep track of which token type
1172 to return when scanning braced code.
1173 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 1174 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
1175 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
1176 instead of returning a token type immediately.
1177 (<INITIAL>"{"): Set token type.
1178 (<SC_BRACED_CODE>"}"): Use it.
1179 (handle_action_dollar, handle_action_at): Now returns bool
1180 indicating success. Fail if ! current_rule; this prevents a core dump.
1181 (handle_symbol_code_dollar, handle_symbol_code_at):
1182 Remove; merge body into caller.
1183 (handle_dollar, handle_at): Complain in invalid contexts.
1184
1185 * NEWS, doc/bison.texinfo: Document the above.
1186 * NEWS: Fix years and program names in copyright notice.
1187
879ca4f8
PE
11882002-12-17 Paul Eggert <eggert@twinsun.com>
1189
1190 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
1191 Reporting, Table of Symbols): Omit mentions of %lex-param and
1192 %parse-param from the documentation for now.
1193
1c5fe69d
PE
11942002-12-15 Paul Eggert <eggert@twinsun.com>
1195
1196 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
1197 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
1198 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
1199 disagreed with the Bison documentation. Bug
1200 reported by Andrew Walrond.
d600ee67 1201
1c5fe69d
PE
1202 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
1203 as the caller now does that.
1204 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
1205 (YYEMPTY): Parenthesize right hand side, since others use it.
1206 (yyparse): Don't assume that our generated code is the only code
1207 that sets yychar.
1208
d1de5372
PE
12092002-12-13 Paul Eggert <eggert@twinsun.com>
1210
1211 Version 1.75d.
1212
1213 POSIX requires a "yacc" command.
1214 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
1215 (MOSTLYCLEANFILES): Add yacc.
1216 (yacc): New rule.
1c5fe69d 1217 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
1218 as an alias for bison y.
1219
1220 * po/LINGUAS: Add da.
d600ee67 1221
d1de5372
PE
1222 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
1223 problem with latest <getopt.h>.
1224 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
1225
1226 * doc/fdl.texi: Upgrade to 1.2.
1227 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
1228 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
1229 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
1230 gnulib.
1231 * config/install-sh: Sync with autotools.
1232
1233 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
e3aa65c5 1234 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
1235 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
1236 locations are requested.
1237 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
1238 locations are requested.
1239
d0f3fe23
PE
12402002-12-12 Paul Eggert <eggert@twinsun.com>
1241
1242 Remove unportable casts and storage allocation tricks.
1243 While we're at it, remove almost all casts, since they
1244 usually aren't needed and are a sign of trouble.
1245
1246 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
1247
1248 * src/derives.c (derives_compute): Do not subtract NTOKENS from
1249 the pointer DSET returned by malloc; this isn't portable.
1250 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
1251 Similarly for DERIVES.
1252 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
1253 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
1254 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
1255
1256 * src/derives.c (derives_compute): Do not bother invoking
1257 int_of_rule_number, since rule numbers are integers.
1258
1259 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
1260 rather than XMALLOC (char, N).
1261
1262 * src/files.c (filename_split): Rewrite to avoid cast.
1263
1264 * src/gram.h (symbol_number_as_item_number,
1265 item_number_as_symbol_number, rule_number_as_item_number,
1266 item_number_as_rule_number):
1267 Now inline functions rather than macros, to avoid casts.
1268 * src/state.h (state_number_as_int): Likewise.
1269 * src/tables.c (state_number_to_vector_number,
1270 symbol_number_to_vector_number): Likewise.
1271
1272 * src/gram.h (int_of_rule_number): Remove; no longer used.
1273
1274 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
1275 since the resulting storage is always stored into.
1276
1277 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
1278 where it's needed.
1279
1280 * src/muscle_tab.c (muscle_m4_output):
1281 Now inline. Return bool, not int.
1282 * src/state.c (state_compare): Likewise.
1283 * src/symtab.c (symbol_check_defined,
1284 symbol_check_alias_consistency, symbol_pack, symbol_translation,
1285 hash_compare_symbol, hash_symbol):
1286 Likewise.
1287 * src/uniqstr.c (uniqstr_print): Likewise.
1288 * src/muscle_tab.c (muscle_m4_output_processor):
1289 New function, to avoid casts.
1290 * src/state.c (state_comparator, stage_hasher): Likewise.
1291 * src/symtab.c (symbol_check_defined_processor,
1292 symbol_check_alias_consistency_processor, symbol_pack_processor,
1293 symbol_translation_processor, hash_symbol_comparator,
1294 hash_symbol_hasher): Likewise.
1295 * src/uniqstr.c (uniqstr_print_processor): Likewise.
1296 * src/muscle_tab.c (muscles_m4_output):
1297 Use new functions instead of casting old functions unportably.
1298 * src/state.c (state_hash_new): Likewise.
1299 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
1300 symbols_token_translations_init):
1301 Likewise.
1302 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
1303
1304 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
1305 var instead of casting to long, to avoid casts.
1306 (prepare_states): Use MALLOC rather than alloca, so that we don't
1307 have to worry about alloca.
1308 * src/state.c (state_hash_lookup): Likewise.
1309
1310 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
1311 local var instead of casting to unsigned char, to avoid casts.
1312
1313 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
1314 STATE_ALLOC): Remove.
1315 (transitions_new, errs_new, reductions_new, state_new): Use malloc
1316 rather than calloc, and use offsetof to avoid allocating slightly
1317 too much storage.
1318 (state_new): Initialize all members.
1319
1320 * src/state.c (state_hash): Use unsigned accumulator, not signed.
1321
1322 * src/symtab.c (symbol_free): Remove; unused.
1323 (symbol_get): Remove cast in lhs of assignment.
1324 (symbols_do): Now static. Accept generic arguments, not
1325 hashing-related ones.
1326
1327 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
1328 (symbol_processor): Remove.
1329 (symbols_do): Remove decl; now static.
1330
1331 * src/system.h (alloca): Remove; decl no longer needed.
1332 (<stddef.h>): Include, for offsetof.
1333 (<inttypes.>, <stdint.h>): Include if available.
1334 (uintptr_t): New type, if system lacks it.
1335 (CALLOC, MALLOC, REALLOC): New macros.
1336 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
1337 new macros.
1338
1339 * src/tables.c (table_size): Now int, to pacify GCC.
1340 (table_grow, table_ninf_remap): Use signed table size.
1341 (save_row): Don't bother initializing locals when not needed.
1342 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
1343 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
1344
1345 * src/vcg.h: Correct misspellings.
1346
1347 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
1348
1349
1350 * src/getargs.c (getargs): Don't assume EOF == -1.
1351
26b4a969
PE
13522002-12-09 Paul Eggert <eggert@twinsun.com>
1353
1354 Change identifier spellings to avoid collisions with names
1355 that are reserved by POSIX.
1356
1357 Don't use names ending in _t, since POSIX reserves them.
1358 For consistency, remove _e and _s endings -- they're weren't
1359 needed to remove ambiguity. All uses changed.
1360 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
1361 turn was just renamed from struniq_t.
1362 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
1363 which in turn was just renamed from struniq_processor_t.
1364 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
1365 in turn was renamed from hash_compare_struniq_t.
1366 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
1367 (state_list): Renamed from state_list_t.
1368 * src/assoc.h (assoc): Renamed from assoc_t.
1369 * src/conflicts.c (enum conflict_resolution): Renamed from
1370 enum conflict_resolution_e.
1371 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
1372 (rule_list): Renamed from rule_list_t.
1373 * src/getargs.h (enum trace): Renamed from enum trace_e.
1374 (enum report): Renamed from enum report_e.
1375 * src/gram.h (item_number): Renamed from item_number_t.
1376 (rule_number): Renamed from rule_number_t.
1377 (struct rule_s): Remove the "rule_s" part; not used.
1378 (rule): Renamed from rule_t.
1379 (rule_filter): Renamed from rule_filter_t.
1380 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
1381 (goto_list): Renamed from goto_list_t.
1382 * src/lalr.h (goto_number): Renamed from goto_number_t.
1383 * src/location.h (location): Renamed from location_t.
1384 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
1385 and moved here from:
1386 * src/muscle_tab.h (muscle_entry_t): here.
1387 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
1388 (rule_list): Renamed from rule_list_t.
1389 * src/print_graph.c (static_graph): Renamed from graph.
1390 * src/reader.h (braced_code): Renamed from braced_code_t.
1391 Remove brace_code_e tag.
1392 * src/relation.h (relation_node): Renamed from relation_node_t.
1393 (relation_nodes): Renamed from relation_nodes_t.
1394 (relation): Renamed from relation_t.
1395 * src/state.h (state_number): Renamed from state_number_t.
1396 (struct state): Renamed from struct state_s.
1397 (state): Renamed from state_t.
1398 (transitions): Renamed from transitions_t. Unused (and
1399 misspelled) transtion_s tag removed.
1400 (errs): Renamed from errs_t. Unused errs_s tag removed.
1401 (reductions): Renamed from reductions_t. Unused tag
1402 reductions_s removed.
1403 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
1404 (struct symbol_list): Renamed from struct symbol_list_s.
1405 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
1406 (struct symbol): Renamed from struct symbol_s.
1407 (symbol): Renamed from symbol_t.
1408 * src/tables.c (vector_number): Renamed from vector_number_t.
1409 (action_number): Renamed from action_t.
1410 * src/tables.h (base_number): Renamed from base_t.
1411 * src/vcg.h (enum color): Renamed from enum color_e.
1412 (enum textmode): Renamed from enum textmode_e.
1413 (enum shape): Renamed from enum shape_e.
1414 (struct colorentry): Renamed from struct colorentry_s.
1415 (struct classname): Renamed from struct classname_s.
1416 (struct infoname): Renamed from struct infoname_s.
1417 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
1418 (enum decision): Renamed from enum decision_e.
1419 (enum orientation): Renamed from enum orientation_e.
1420 (enum alignment): Renamed from enum alignment_e.
1421 (enum arrow_mode): Renamed from enum arrow_mode_e.
1422 (enum crossing_type): Renamed from enum crossing_type_e.
1423 (enum view): Renamed from enum view_e.
1424 (struct node): Renamed from struct node_s.
1425 (node): Renamed from node_t.
1426 (enum linestyle): Renamed from enum linestyle_e.
1427 (enum arrowstyle): Renamed from enum arrowstyle_e.
1428 (struct edge): Renamed from struct edge.
1429 (edge): Renamed from edge_t.
1430 (struct graph): Renamed from struct graph_s.
1431 (graph): Renamed from graph_t.
1432 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
1433 Rename value_t -> value.
1434 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
1435 value_t_as_yystype -> value_as_yystype.
1436
1437 Don't include <errno.h> in the mainstream code, since it
1438 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
1439 * lib/get-errno.c, lib/get-errno.h: New files.
1440 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
1441 get-errno.c.
1442 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
1443 * src/output.c (output_skeleton): Likewise.
1444 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
1445 instead of errno.
1446 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
1447 Likewise.
1448 (handle_action_dollar, handle_action_at): Likewise.
1449 * src/system.h: Do not include <errno.h>.
1450 (TAB_EXT): Renamed from EXT_TAB.
1451 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
1452
1453 Avoid str[a-z]*, since <string.h> reserves that name space.
1454 Change all instances of "struniq" in names to "uniqstr", and
1455 likewise for "STRUNIQ" and "UNIQSTR".
1456 * src/uniqstr.c: Renamed from src/struniq.c.
1457 * src/uniqstr.h: Renamed from src/struniq.h.
1458 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
1459 * src/files.c (strsuffix): Remove; unused.
1460 (concat2): Renamed from stringappend. Now static.
1461 * src/files.h (strsuffix, stringappend): Remove; unused.
1462 * src/parse-gram.y (<chars>): Renamed from <string>.
1463 (<uniqstr>): Renamed from <struniq>.
1464 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
1465 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
1466 (struct graph_s.expand): Renamed from struct graph_s.stretch.
1467 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
1468 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
1469 (N_EXPAND): Renamed from N_STRETCH.
1470
1471 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
1472 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
1473 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
1474 Remove; unused.
1475 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
1476 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
1477 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
1478 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
1479 (BASE_MAXIMUM): Renamed from BASE_MAX.
1480 (BASE_MINIMUM): Renamed from BASE_MIN.
1481 (ACTION_MAX): Remove; unused.
1482 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
1483 Unnecessary casts removed from above defines.
1484
1485
1486 Fix misspelling in names.
1487 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
1488 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
1489 G_NODE_ALIGNEMENT.
1490
1491
1492 * lib/timevar.c (timevar_report): Renamed from time_report,
1493 for consistency with other names.
1494 * lib/timevar.h (timevar_report): New decl.
1495 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
1496
1497
1498 Sort include-file uses.
1499
1500 Reorder all include files under src to be in the order "system.h".
1501 then the ../lib include files in angle brackets (alphabetized),
1502 then the . include files in double-quotes (alphabetized). Fix
1503 dependency breakages encountered in this process, as follows:
1504 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
1505 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
1506 * src/state.h: Include "symtab.h".
1507
996b1c7e
PE
15082002-12-08 Paul Eggert <eggert@twinsun.com>
1509
1510 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
1511 since this causes problems when __file__ contains character
1512 sequences like "@" that are treated specially by src/scan-skel.l.
1513 Instead, just use the file's basename. This fixes the bug
1514 reported by Martin Mokrejs in
e3aa65c5 1515 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 1516
e19c4e5d
PE
15172002-12-06 Paul Eggert <eggert@twinsun.com>
1518
1519 Add support for rules that do not have trailing semicolons, as
1520 POSIX requires. Improve the quality of locations in Bison
1521 diagnostics.
26b4a969 1522
e19c4e5d
PE
1523 * src/location.c: Include <quotearg.h>.
1524 (empty_location): Now const.
1525 (location_print): New function. Follow the recommendation of the
1526 GNU Coding Standards for locations that span file boundaries.
1527 * src/location.h: Do not include <quotearg.h>; no longer needed.
1528 (boundary): New type.
1529 (location_t): Use it. This allows locations to span file boundaries.
1530 All member uses changed: file -> start.file or end.file (as needed),
1531 first_line -> start.line, first_column -> start.column,
1532 last_line -> end.line, last_column -> end.column.
1533 (equal_boundaries): New function.
1534 (LOCATION_RESET, LOCATION_STEP): Remove.
1535 (LOCATION_PRINT): Remove. All callers changed to use location_print.
1536 (empty_location): Now const.
1537 (location_print): New decl.
1538 * src/parse-gram.y (lloc_default): New function, which handles
1539 empty locations more accurately.
1540 (YYLLOC_DEFAULT): Use it.
1541 (%token COLON): Remove.
1542 (%token ID_COLON): New token.
26b4a969 1543 (rules): Use it.
e19c4e5d
PE
1544 (declarations, rules): Remove trailing semicolon.
1545 (declaration, rules_or_grammar_declaration):
1546 Allow empty (";") declaration.
1547 (symbol_def): Remove empty actions; no longer needed.
1548 (rules_or_grammar_declaration): Remove trailing semicolon.
1549 (semi_colon.opt): Remove.
1550 * src/reader.h: Include location.h.
1551 (scanner_cursor): New decl.
1552 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
1553 rolling our own.
1554 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
1555 of *loc.
1556 (STEP): Remove. No longer needed, now that adjust_location does
1557 the work. All uses removed.
1558 (scanner_cursor): New var.
1559 (adjust_location): Renamed from extend_location. It now sets
1560 *loc and adjusts the scanner cursor. All uses changed.
1561 Don't bother testing for CR.
1562 (handle_syncline): Remove location arg; now updates scanner cursor.
1563 All callers changed.
1564 (unexpected_end_of_file): Now accepts start boundary of token or
1565 comment, not location. All callers changed. Update scanner cursor,
1566 not the location.
1567 (SC_AFTER_IDENTIFIER): New state.
1568 (context_state): Renamed from c_context. All uses changed.
1569 (id_loc, code_start, token_start): New local vars.
1570 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
1571 processing of Yacc white space and equivalents here.
1572 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
1573 instead of returning ID immediately, since we need to search for
1574 a subsequent colon.
1575 (<INITIAL>"'", "\""): Save token_start.
1576 (<INITIAL>"%{", "{", "%%"): Save code_start.
1577 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
1578 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
1579 BEGIN context_state at end, not INITIAL.
1580 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
1581 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
1582 Return correct token start.
1583 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
1584 the start of a character, string or multiline comment is found.
1585 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
1586 Reduction): Adjust reported locations to match the more-precise
1587 results now expected.
1588 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
1589 * tests/reduce.at (Useless Rules, Reduced Automaton,
1590 Underivable Rules): Likewise.
1591 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1592 or "|"' now that so many other tokens are allowed by the new grammar.
1593
1594 * src/complain.h (current_file): Remove duplicate decl;
1595 current_file is now owned by files.h.
1596 * src/complain.c, src/scan-gram.l: Include files.h.
1597
15982002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 1599
e19c4e5d
PE
1600 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1601 promotes to int; it might be unsigned int.
1602 * data/yacc.c (yy_reduce_print): Likewise.
1603
1604 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1605 be #defined in the prologue, not in the Bison declarations.
1606 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 1607
b64755e3
PE
16082002-12-02 Paul Eggert <eggert@twinsun.com>
1609
1610 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1611 * lib/strtoul.c: New file, from gnulib.
1612 This fixes a porting bug reported by Peter Klein in
e3aa65c5 1613 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 1614
6e746484
PE
16152002-11-30 Paul Eggert <eggert@twinsun.com>
1616
b64755e3
PE
1617 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1618 and put only a forward declaration in the prologue. This is for
1619 consistency with the other scanner helper functions.
1620
6ba55592
PE
1621 Type clashes now generate warnings, not errors, since it
1622 appears that POSIX may allow some grammars with type clashes.
1623 * src/reader.c (grammar_current_rule_check): Warn about
1624 type clashes instead of complaining.
1625 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1626
6e746484
PE
1627 Add Yacc library, since POSIX requires it.
1628 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1629 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1630 * lib/main.c, lib/yyerror.c: New files.
1631
1632 gram_error can be static; it need not be extern.
1633 * src/reader.h (gram_error): Remove decl.
1634 * src/parse-gram.y (gram_error): Now static. Add static decl.
1635 (print_token_value): Omit parameter names from forward decl,
1636 for consistency.
1637
88510f9c
PE
16382002-11-29 Paul Eggert <eggert@twinsun.com>
1639
6e746484
PE
1640 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1641 be declared before being used. E.g., one should typically
1642 declare them in the prologue. Use GNU coding style in examples.
1643 Put "const" consistently after the type it modifies. Mention
1644 that C99 supports "inline". Mention that yyerror traditionally
1645 returns "int".
1646
88510f9c
PE
1647 %parse-param and %lex-param now take just one argument, the
1648 declaration; the argument name is deduced from the declaration.
1649
1650 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1651 Reporting, Table of Symbols): Document this.
1652 * src/parse-gram.y (add_param): New function.
1653 (COMMA): Remove.
1654 (declaration): Implement new rule for %parse-param and %lex-param.
1655 * src/scan-gram.l: "," now elicits a warning, rather than being
1656 a token; this is more compatible with byacc.
1657 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1658
bb92250c
PE
16592002-11-27 Paul Eggert <eggert@twinsun.com>
1660
1661 Rename identifiers to avoid real and potential collisions.
1662
1663 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1664 to avoid collision with lex macro described by Bruce Lilly in
e3aa65c5 1665 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
1666 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1667 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1668 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1669 All uses changed.
1670 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1671 The name "yycontrol" violates the name space rules, and this stuff
1672 wasn't being used anyway.
1673 (input): Remove action; this stuff wasn't being used.
1674 (gram_error): Rename local variable yylloc -> loc.
1675 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1676 (YY_DECL): Don't use "yy" at start of local variables.
1677 All uses changed, e.g., yylloc -> loc.
1678 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1679 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1680 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1681 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1682
1683 * src/parse-gram.y (gram_error): loc is now const *.
1684 * src/reader.h (gram_error): Likewise.
1685
3af4feb2
PE
16862002-11-24 Paul Eggert <eggert@twinsun.com>
1687
1688 Version 1.75c.
1689
1690 * tests/actions.at (Actions after errors): Use an output format
1691 more similar to that of the Printers and Destructors test.
1692 Test the position of the ';' token too.
1693 (Printers and Destructors): Likewise.
1694 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1695 unnecessarily alarming people when the test fails.
1696
1697 * data/yacc.c (yyerrlab1): Move this label down, so that the
1698 parser does not discard the lookahead token if the user code
1699 invokes YYERROR. This change is required for POSIX conformance.
1700
1701 * lib/error.c: Sync with gnulib.
1702
17032002-11-22 Paul Eggert <eggert@twinsun.com>
1704
1705 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1706 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1707 * lib/xmalloc.c: Likewise.
26b4a969 1708
58004308
PE
17092002-11-20 Paul Eggert <eggert@twinsun.com>
1710
1711 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1712
17132002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 1714
58004308
PE
1715 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1716 should use `if (! x) abort ();' rather than `assert (x);', and
1717 anyway it's one less thing to worry about configuring.
1718
1719 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1720 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1721 and replace all instances of assert with abort.
1722 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1723 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1724
1725 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1726 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1727 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1728 hash_find_entry, hash_rehash, hash_insert): Likewise.
1729 * src/conflicts.c (resolve_sr_conflict): Likewise.
1730 * src/lalr.c (set_goto_map, map_goto): Likewise.
1731 * src/nullable.c (nullable_compute): Likewise.
1732 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1733 * src/reader.c (packgram, reader): Likewise.
1734 * src/state.c (state_new, state_free, state_transitions_set,
1735 state_reduction_find): Likewise.
1736 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1737 symbol_pack): Likewise.
1738 * src/tables.c (conflict_row, pack_vector): Likewise.
1739 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1740 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1741 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1742 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1743
1744 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1745 (ARGMATCH_CONSTRAINT): New macro.
1746 (ARGMATCH_ASSERT): Use it.
1747
1748 * src/system.h (verify): New macro.
1749 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1750 rather than assert.
1751 * src/tables.c (tables_generate): Likewise.
1752
1753 * src/struniq.c (struniq_assert): Now returns void, and aborts
1754 if the assertion is false.
1755 (struniq_assert_p): Remove.
1756 * src/struniq.h: Likewise.
1757
76ae8198
PE
17582002-11-18 Paul Eggert <eggert@twinsun.com>
1759
1760 * data/glr.c (yygetLRActions): Replace `yyindex' with
1761 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1762 This fixes the regression with Sun ONE Studio 7 cc that I reported in
e3aa65c5 1763 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 1764
d3c4e709
AD
17652002-11-18 Akim Demaille <akim@epita.fr>
1766
1767 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1768 space.
1769 From Tim Van Holder.
1770
8d8a7238
PE
17712002-11-17 Paul Eggert <eggert@twinsun.com>
1772
1773 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1774 to "SyntaxError" for consistency with my 2002-11-15 change.
1775
1776 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1777 not define to {}, since this breaks the common use of `YYDPRINTF
1778 ((...));' if a single statement is desired (e.g. before `else').
1779 Work around GCC warnings by surrounding corresponding calls with
1780 {} if needed.
1781 (yyhasResolvedValue): Remove unused function.
1782 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1783 loop body.
1784 (yyreportSyntaxError): Renamed from yyreportParseError.
1785 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1786 All uses changed.
1787 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1788 extern when possible. Remove unused initializations.
1789
b0937b22
AD
17902002-11-16 Akim Demaille <akim@epita.fr>
1791
1792 Augment the similarity between GLR and LALR traces.
1793
1794 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1795 (YY_REDUCE_PRINT): New.
1796 (yyparse): Use them.
1797 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1798 YYDPRINT here.
1799 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1800 state reached after the reduction/recovery, since...
1801 (yyparse, yyprocessOneStack): Report the state we are entering in.
1802
c5e3e510
AD
18032002-11-16 Akim Demaille <akim@epita.fr>
1804
1805 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1806 Add support for --trace=skeleton.
1807 * src/scan-skel.l: %option debug.
1808 Scan strings of non-@ or \n instead of character by character.
1809 (scan_skel): Handle trace_skeleton.
1810 (QPUTS): New.
1811 (@output_parser_name@, @output_header_name@): ``Restore'' their
1812 support (used to be M4 macros).
1813 * data/yacc.c: Quote larger chunks, a la glr.c.
1814 * data/lalr1.cc: Likewise.
1815 The header guards are no longer available, so use some other
1816 string than `YYLSP_NEEDED'.
1817
4c6cc1db
AD
18182002-11-16 Akim Demaille <akim@epita.fr>
1819
1820 Make the ``Printers and Destructors'' test more verbose, taking
1821 `yacc.c''s behavior as (possibly wrong) reference.
1822
1823 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1824 instead of fprint on stdout.
1825 Set and report the last_line of the symbols.
1826 Consistently display values and locations.
1827
6d9e8019
PE
18282002-11-16 Paul Eggert <eggert@twinsun.com>
1829
1830 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1831
6e649e65
PE
18322002-11-15 Paul Eggert <eggert@twinsun.com>
1833
b25d88f6
PE
1834 * tests/actions.at (Actions after errors): New test case.
1835
6e649e65
PE
1836 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1837 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1838 tests/action.at, tests/calc.at, tests/conflicts.at,
1839 tests/cxx-type.at, tests/regression.at:
1840 "parse error" -> "syntax error" for POSIX compatibility.
1841 "parsing stack overflow..." -> "parser stack overflow" so
1842 that code matches Bison documentation.
1843
0f39aab9
AD
18442002-11-15 Akim Demaille <akim@epita.fr>
1845
1846 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1847 take two BRACED_CODE, not two string_content.
1848 Free the scanner's obstack when we are done.
1849 (code_content): New.
1850 * tests/calc.at: Adjust.
1851 * doc/bison.texinfo: Adjust.
1852 Also, make sure to include the `,' for these declarations.
1853
761c1926
AD
18542002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1855
1856 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1857 definition; avoids potential autoreconf problems.
1858
b0f98b10
AD
18592002-11-15 Akim Demaille <akim@epita.fr>
1860
1861 Always check the value returned by yyparse.
1862
1863 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1864 returned by yyparse.
1865 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1866 Adjust calls.
1867 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1868 returned by yyparse.
1869
970785f1
PH
18702002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1871
1872 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1873 on input.at test.
1874
8fcc7db1
PE
18752002-11-14 Paul Eggert <eggert@twinsun.com>
1876
7ec1b48e
PE
1877 * src/output.c (output_skeleton): Call xfopen instead of
1878 duplicating xfopen's body.
1879
cfff7583 1880 Fix bugs reported by Nelson H. F. Beebe in
e3aa65c5 1881 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 1882
8fcc7db1
PE
1883 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1884 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1885 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1886 file twice in the grammar, as an extra check.
1887
1888 * tests/input.at (Torturing the Scanner): Surround the
1889 backslash-newline tests with "#if 0", to make it less likely that
1890 we'll run into compiler bugs. Bring back solitary \ inside
1891 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 1892 test backslash-newline in C character constant.
8fcc7db1 1893
4e8d992c
AD
18942002-11-14 Akim Demaille <akim@epita.fr>
1895
1896 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1897 status of the compiler.
f32b346d 1898 Calling `exit 1' is no longer needed.
4e8d992c
AD
1899 Reported by Nelson H. F. Beebe.
1900
9501dc6e
AD
19012002-11-14 Akim Demaille <akim@epita.fr>
1902
1903 * tests/atlocal.in (CPPFLAGS): We have config.h.
1904 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1905 New.
1906 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1907 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1908 * tests/regression.at, tests/torture.at: Use them for all the
1909 grammars that are to be compiled.
1910 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1911 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1912 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1913
18b519c0
AD
19142002-11-14 Akim Demaille <akim@epita.fr>
1915
1916 * doc/bison.texinfo: Various formatting changes (alignments in
1917 samples, additional @group/@end group, GCS in samples.
1918 Use @deffn instead of simple @table to define the directives,
1919 macros, variables etc.
1920
9a86cdb9
PE
19212002-11-13 Paul Eggert <eggert@twinsun.com>
1922
daa33def 1923 Fix some bugs reported by Albert Chin-A-Young in
e3aa65c5 1924 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 1925
daa33def 1926 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 1927 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
1928 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1929 * tests/headers.at (export YYLTYPE): Likewise.
1930
1931 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 1932 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 1933
9a86cdb9
PE
1934 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1935 comments, since they're not portable. Use GNU coding style.
1936
9c1e26bd
AD
19372002-11-13 Akim Demaille <akim@epita.fr>
1938
1939 * data/yacc.c: Leave bigger chunks of quoted text.
1940 (YYDSYMPRINTF): New.
1941 Use it to report symbol activities.
1942 * data/glr.c (YYDSYMPRINTF): New.
1943 Use it.
1944
87f721cc
PE
19452002-11-12 Paul Eggert <eggert@twinsun.com>
1946
1947 Version 1.75b.
1948
1949 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1950 (yyglrReduce): Return yyok, not 0.
1951 This should avoid the enumerated-type warnings reported
464c6927 1952 by Nelson H. F. Beebe in
e3aa65c5 1953 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
1954
1955 * lib/bbitset.h (BITSET_INLINE): Remove.
1956 * lib/bitset.h [! BITSET_INLINE]: Remove.
1957 (bitset_set, bitset_reset, bitset_test): Rename local vars
1958 to avoid shadowing warnings by GCC.
1959
1960 * data/glr.c (inline): Remove #define. It's the user's
1961 responsibility to #define it away, just like 'const'.
464c6927 1962 This fixes one of the bugs reported by Nelson H. F. Beebe in
e3aa65c5 1963 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 1964
87f721cc
PE
1965 * Makefile.maint (po-check): Scan .l and .y files instead of the
1966 .c and the .h files that they generate. This fixes the bug
1967 reported by Tim Van Holder in:
e3aa65c5 1968 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
1969 Look for N_ as well as for _. Try to avoid matching #define for
1970 N_ and _.
1971 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1972 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1973 * src/scan-gram.l: Revamp regular expressions so that " and '
1974 do not confuse xgettext.
1975
1976 * src/struniq.h (struniq_new): Do not declare the return type
1977 to be 'const'; this violates the C standard.
1978 * src/struniq.c (struniq_new): Likewise.
1979
be14ade5
AD
19802002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1981
1982 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1983 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1984 linker.
1985
05291fbc
AD
19862002-11-12 Akim Demaille <akim@epita.fr>
1987
1988 * Makefile.maint: Sync with Autoconf:
1989 (local_updates): New.
1990
1f5fd52e
AD
19912002-11-12 Akim Demaille <akim@epita.fr>
1992
1993 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1994
283f1e64
AD
19952002-11-12 Akim Demaille <akim@epita.fr>
1996
1997 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1998 locations.
1999
886b69d1
AD
20002002-11-12 Akim Demaille <akim@epita.fr>
2001
2002 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
2003 not yyvalue.
2004
3df37415
AD
20052002-11-12 Akim Demaille <akim@epita.fr>
2006
2007 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
2008 Use it to test the GLR parser.
2009
7bd6c77e
AD
20102002-11-12 Akim Demaille <akim@epita.fr>
2011
2012 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
2013 defines it.
2014 * data/glr.c (yystos): New.
2015 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
2016 (YYDSYMPRINT): New.
2017 (yyval): Don't define it, it is handled via M4.
2018 (yyrecoverParseError): Free verbosely the discarded symbols.
2019 * data/yacc.c (yysymprint): Remove, rather...
2020 (b4_yysymprint_generate): invoke.
2021 * data/c.m4 (b4_yysymprint_generate): New.
2022 Accept pointers as arguments, as opposed to the version from
2023 yacc.c.
2024 (b4_yydestruct_generate): Likewise.
2025 * tests/cations.at (Printers and Destructors): Use Bison directives
2026 instead of CPP macros.
2027 Don't rely on internal details.
2028
b0400cc6
AD
20292002-11-12 Akim Demaille <akim@epita.fr>
2030
2031 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
2032 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
2033 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
2034 it against YYEMPTY and so forth), work on yytoken (i.e., set
2035 it to YYEMPTY etc.).
2036 (yydestruct): Replace with a b4_yydestruct_generate invocation.
2037 (b4_symbol_actions): Remove.
2038 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
2039 for 0, end-of-input.
2040
72f889cc
AD
20412002-11-12 Akim Demaille <akim@epita.fr>
2042
2043 * doc/bison.texinfo (Destructor Decl): New.
2044
b1ae9233
AD
20452002-11-12 Akim Demaille <akim@epita.fr>
2046
2047 * src/tables.c (tables_generate): Use free for pointers that
2048 cannot be NULL, not XFREE.
2049 (pack_vector): Use assert, not fatal, for bound violations.
2050 * src/state.c (state_new): Likewise.
2051 * src/reader.c (reader): Likewise.
2052 * src/lalr.c (set_goto_map): Likewise.
72f889cc 2053 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
2054 the file name.
2055
7ec2d4cd
AD
20562002-11-12 Akim Demaille <akim@epita.fr>
2057
2058 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2059 Restore.
2060 * src/scan-gram.l (last_string): Is global to the file, not to
2061 yylex.
2062 * src/parse-gram.y (input): Don't append the epilogue here,
2063 (epilogue.opt): do it here, and free the scanner's obstack.
2064 * src/reader.c (epilogue_set): Rename as...
2065 (epilogue_augment): this.
2066 * data/c.m4 (b4_epilogue): Defaults to empty.
2067
573a6cd3
AD
20682002-11-12 Akim Demaille <akim@epita.fr>
2069
2070 * src/getargs.c (long_options): Remove duplicates.
2071 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2072 Remove.
2073 * doc/bison.rnh: Remove.
2074 * doc/bison.texinfo (VMS Invocation): Remove.
2075
95612cfa
AD
20762002-11-12 Akim Demaille <akim@epita.fr>
2077
2078 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2079 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2080
2081 Use struniq for symbols.
2082
2083 * src/symtab.h (symbol_t): The tag member is a struniq.
2084 (symbol_type_set): Adjust.
2085 * src/symtab.c (symbol_new): Takes a struniq.
2086 (symbol_free): Don't free the tag member.
2087 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2088 (hash_compare_symbol, hash_symbol): these.
2089 Use the fact that tags as struniqs.
2090 (symbol_get): Use struniq_new.
2091 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2092 Returns a strniq.
2093 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2094 and type members are struniqs.
2095 * src/reader.c (get_merge_function)
2096 (grammar_current_rule_merge_set): Adjust.
2097 (TYPE, current_type): Are struniq.
2098
2099 Use struniq for file names.
2100
2101 * src/files.h, src/files.c (infile): Split into...
2102 (grammar_file, current_file): these.
2103 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2104 * src/reduce.c (reduce_print): Likewise.
2105 * src/getargs.c (getargs): Likewise.
2106 * src/complain.h, src/complain.c: Likewise.
2107 * src/main.c (main): Call struniqs_new early enough to use it for
2108 file names.
2109 Don't free the input file name.
2110
3e6656f9
AD
21112002-11-12 Akim Demaille <akim@epita.fr>
2112
2113 * src/symtab.c (symbol_free): Remove dead deactivated code:
2114 type_name are properly removed.
2115 Don't use XFREE to free items that cannot be NULL.
2116 * src/struniq.h, src/struniq.c: New.
2117 * src/main.c (main): Initialize/free struniqs.
2118 * src/parse-gram.y (%union): Add astruniq member.
2119 (yyprint): Adjust.
2120 * src/scan-gram.l (<{tag}>): Return a struniq.
2121 Free the obstack bit that used to store it.
2122 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2123
7672019c
PE
21242002-11-11 Paul Eggert <eggert@twinsun.com>
2125
2126 Revamp to fix many (but not all) of the C- and M4-related quoting
2127 problems. Among other things, this fixes the Bison bug reported
2128 by Jan Hubicka when processing the Bash grammar; see:
e3aa65c5 2129 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
2130
2131 Use new @ escapes consistently. Represent brackets with @{ and @}
2132 rather than @<:@ and @:>@, since this works a bit better with dumb
2133 editors like vi. Represent @ with @@, since @ is now consistently
2134 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2135 __ofile__, to avoid unexpected expansions. Similarly, use @output
2136 rather than #output.
2137
2138 * data/c.m4 (b4_copyright): Omit file name from comment, since
2139 the file name could contain "*/".
2140 (b4_synclines_flag): Don't quote the 2nd argument; it should already
2141 be quoted. All uses changed.
2142
2143 * data/glr.c: Use new @ escapes consistently.
2144 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
2145 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
2146 Remove, since they couldn't handle arbitrary characters in file
2147 names.
2148 * data/lalr1.cc: Likewise.
2149 * data/yacc.c: Likewise.
2150
2151 * src/files.c (output_infix): Remove; all uses removed.
2152 * src/files.h: Likewise.
2153
2154 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
2155 mishandled funny characters in file names, and anyway it isn't
2156 needed any more.
2157 * data/yacc.c: Likewise.
2158 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
2159
2160 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
2161 * data/yacc.c: Likewise.
2162
2163 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
2164 strings now.
2165 (muscle_init): Quote filename as a C string.
2166 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
2167 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
2168 * src/output.c (escaped_file_name_output): New function.
2169 (prepare_symbols): Quote tokens for M4.
2170 (prepare): Don't insert output_infix, output_prefix,
2171 output_parser_name, output_header_name; this is now down by scan-skel.
2172 Insert skeleton as a C string.
2173
2174 * src/output.c (user_actions_output, symbol_destructors_output,
2175 symbol_printers_output): Quote filenames for C and M4.
2176 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2177
2178 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
2179 escapes other than \\ and \'; this simplifies the code.
2180 (<SC_STRING>): Likewise, for \\ and \".
2181 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
2182 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
2183 Use new escapes @{ and @} for [ and ].
2184
2185 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
2186 them with auto vars.
2187 Switch to new escape scheme, where @ is the escape character uniformly.
2188 Abort if a stray escape character is found. Avoid unbounded input
2189 buffer when parsing non-escaped text.
2190
2191 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
2192 __oline__, #output, $@, and @{ do not have unintended meanings.
2193
acea4f3b
PE
21942002-11-09 Paul Eggert <eggert@twinsun.com>
2195
2196 Fix the test failure due to GCC warnings described in
e3aa65c5 2197 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
2198 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
2199 evaluate to 0 if it's impossible for NINF to be in the respective
2200 table.
2201 (yygetLRActions, yyrecoverParseError): Use them.
2202
2203 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
2204 counted in the token inserted at end of file. Now takes
2205 location_t *, not location_t, so that the location can be
2206 adjusted. All uses changed.
2207
2208 * tests/regression.at (Invalid inputs): Adjust wording in
2209 diagnostic to match the new behavior.
2210
2211 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
2212 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
2213 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
2214 abort ();'. This reduces the runtime of the "Many lookaheads"
2215 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
2216 GCC 3.2.
2217
20ef1ad5
PE
22182002-11-07 Paul Eggert <eggert@twinsun.com>
2219
2220 * src/parse-gram.y (CHARACTER): Remove unused token.
2221 All uses removed.
2222
2223 * src/scan-gram.l: Remove stack option. We no longer use the
2224 stack, since the stack was never deeper than 1; instead, use the
2225 new auto var c_context to record the stacked value.
2226
2227 Remove nounput option. At an unexpected end of file, we now unput
2228 the minimal input necessary to end cleanly; this simplifies the
2229 code.
2230
2231 Avoid unbounded token sizes where this is easy.
2232
2233 (unexpected_end_of_file): New function.
2234 Use it to systematize the error message on unexpected EOF.
2235 (last-string): Now auto, not static.
2236 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
2237 (scanner_last_string_free): Remove; not used.
2238 (percent_percent_count): Move decl to just before use.
2239 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
2240 not the (never otherwised-used) CHARACTER.
2241
93724f13
AD
22422002-11-07 Akim Demaille <akim@epita.fr>
2243
2244 Let yyerror always receive the msg as last argument, so that
2245 yyerror can be variadic.
2246
2247 * data/yacc.c (b4_yyerror_args): New.
2248 Use it when calling yyerror.
2249 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
2250 Use it when calling yyerror.
2251 * doc/bison.texinfo (Error Reporting): Adjust.
2252 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
2253 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
2254
6e40b4eb
AD
22552002-11-06 Akim Demaille <akim@epita.fr>
2256
2257 #line should have quoted strings.
2258 Ideally, this should be done by m4_quotearg.
2259
2260 * src/scan-skel.l: Include quotearg.h.
2261 Quote __ofile__.
2262 * src/output.c (symbol_printers_output)
2263 (symbol_destructors_output): Quote the file name.
2264
2dfbfc12
AD
22652002-11-06 Akim Demaille <akim@epita.fr>
2266
2267 * tests/regression.at (Invalid inputs): Adjust to the recent
2268 messages.
2269
437c2d80
AD
22702002-11-06 Akim Demaille <akim@epita.fr>
2271
2272 Restore --no-lines.
2273 Reported by Jim Kent.
2274
2275 * data/c.m4 (b4_syncline): New.
2276 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
2277 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
2278 * src/output.c (user_actions_output): Likewise.
2279 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 2280 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 2281
900c5db5
AD
22822002-11-06 Akim Demaille <akim@epita.fr>
2283
2284 * src/main.c (main): Free `infile'.
2285 * src/scan-gram.l (handle_syncline): New.
2286 Recognize `#line'.
2287 * src/output.c (user_actions_output, symbol_destructors_output)
2288 (symbol_printers_output): Use the location's file name, not
2289 infile.
2290 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2291
e183b123 22922002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 2293
e183b123 2294 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 2295 either has GLR conflict entries.
e183b123 2296
193eb6b7
PE
22972002-11-05 Paul Eggert <eggert@twinsun.com>
2298
e183b123
PE
2299 * src/scan-gram.l: Use more accurate diagnostics, e.g.
2300 "integer out of range" rather than "invalid value".
2301 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
2302 accordingly.
2303
193eb6b7
PE
2304 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
2305 Also, remove one static variable in the scanner.
2306
2307 * src/scan-gram.l (braces_level): Now auto, not static.
2308 Initialize to zero if the compiler is being picky.
2309 (INITIAL): Clear braces_level instead of incrementing it.
2310 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
2311 as POSIX 1003.1-2001 requires.
2312 * src/system.h (IF_LINT): New macro, taken from coreutils.
2313 * configure.ac: Define "lint" if --enable-gcc-warnings.
2314
29c01725
AD
23152002-11-05 Akim Demaille <akim@epita.fr>
2316
2317 * src/scan-gram.l: When it starts with `%', complain about the
2318 whole directive, not just that `invalid character: %'.
2319
8aeac3ca
AD
23202002-11-04 Akim Demaille <akim@epita.fr>
2321
2322 * Makefile.maint: Update from Autoconf.
2323 (update, cvs-update, po-update, do-po-update): New.
2324
793a58bb
AD
23252002-11-04 Akim Demaille <akim@epita.fr>
2326
2327 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
2328 and yyerror.
2329 Have yyerror `use' its arguments.
2330 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
2331 returns true when location & yacc & pure & parse-param.
2332 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
2333
c4d720cd
AD
23342002-11-04 Akim Demaille <akim@epita.fr>
2335
2336 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
2337 clashes.
2338 * src/scan-gram.l: Use [\'] instead of ['] to pacify
2339 font-lock-mode.
2340 Use complain_at.
2341 Use quote, not quote_n since LOCATION_PRINT no longer uses the
2342 slot 0.
2343
613a0dc5
PE
23442002-11-03 Paul Eggert <eggert@twinsun.com>
2345
2346 * src/reader.c (get_merge_function, grammar_current_rule_check):
2347 Use consistent diagnostics for reporting type name clashes.
2348 Quote the types with <>, for consistency with Yacc.
2349 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
2350
2a8d363a
AD
23512002-11-03 Akim Demaille <akim@epita.fr>
2352
2353 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
2354 New.
2355 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
2356 (b4_parse_param): Remove.
2357 Use b4_identification.
2358 Propagate b4_pure_args where needed to pass them to yyerror.
2359 * data/glr.m4 (b4_parse_param): Remove.
2360 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
2361 (b4_lpure_formals): New.
2362 Use b4_identification.
2363 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
2364 b4_user_formals and b4_user_args.
2365 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
2366 (yyreportAmbiguity): When using a pure parser, also need
2367 the location, and the parse-params.
2368 Adjust callers.
2369 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
2370 When using a pure parser, also need the parse-params.
2371 Adjust callers.
2372 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
2373 (%pure-parser + %parse-param) LALR and GLR parsers.
2374 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
2375 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
2376 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
2377 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
2378 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
2379 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
2380 * doc/bison.texinfo: Untabify the whole file.
2381 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
2382 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
2383 (Error Reporting): Adjust to these new directives.
2384 Document %error-verbose, deprecate YYERROR_VERBOSE.
2385
9e32add8
AD
23862002-11-03 Akim Demaille <akim@epita.fr>
2387
2388 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
2389 AT_CHECK_CALC_GLR invocations to use % directives, instead of
2390 command line options.
2391 * tests/cxx-type.at: Formatting changes.
2392
b02d90a5
PE
23932002-11-03 Paul Eggert <eggert@twinsun.com>
2394
2395 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
2396 to count columns correctly, and to check for invalid inputs.
9e32add8 2397
b02d90a5
PE
2398 Use mbsnwidth to count columns correctly. Account for tabs, too.
2399 Include mbswidth.h.
2400 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
2401 (extend_location): New function.
2402 (YY_LINES): Remove.
2403
2404 Handle CRLF in C code rather than in Lex code.
2405 (YY_INPUT): New macro.
2406 (no_cr_read): New function.
2407
2408 Scan UCNs, even though we don't fully handle them yet.
2409 (convert_ucn_to_byte): New function.
2410
2411 Handle backslash-newline correctly in C code.
2412 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
2413 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
2414 all uses changed.
2415 (tag, splice): New EREs. Do not allow NUL or newline in tags.
2416 Use {splice} wherever C allows backslash-newline.
2417 YY_STEP after space, newline, vertical-tab.
2418 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 2419
b02d90a5
PE
2420 (letter, id): Don't assume ASCII; e.g., spell out a-z.
2421
2422 ({int}, handle_action_dollar, handle_action_at): Check for integer
2423 overflow.
9e32add8 2424
b02d90a5
PE
2425 (YY_STEP): Omit trailing semicolon, so that it's more like C.
2426
2427 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
2428 as well as \000. Check for UCHAR_MAX, not 255.
2429 Allow \x with an arbitrary positive number of digits, as in C.
2430 Check for overflow here.
2431 Allow \? and UCNs, for compatibility with C.
2432
2433 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
2434 with quote slot used by complain_at.
2435
2436 * tests/input.at: Add tests for backslash-newline, m4 quotes
2437 in symbols, long literals, and funny escapes in strings.
2438
2439 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
2440 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
2441 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
2442 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
2443 * m4/mbswidth.m4: New file, from GNU coreutils.
2444
2445 * doc/bison.texinfo (Grammar Outline): Document // comments.
2446 (Symbols): Document that trigraphs have no special meaning in Bison,
2447 nor is backslash-newline allowed.
2448 (Actions): Document that trigraphs have no special meaning.
2449
2450 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
2451 no longer used.
2452
24532002-11-02 Paul Eggert <eggert@twinsun.com>
2454
2455 * src/reader.c: Don't include quote.h; not needed.
2456 (get_merge_function): Reword warning to be consistent with
2457 type clash diagnostic in grammar_current_rule_check.
2458
2459 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
2460 bug in trigraph handling.
2461
2462 * src/output.c (prepare_symbols): When printing token names,
2463 escape "[" as "@<:@" and likewise for "]".
2464
2465 * src/system.h (errno): Remove declaration, as we are now
2466 assuming C89 or better, and C89 guarantees errno.
2467
762b212b
PE
24682002-10-30 Paul Eggert <eggert@twinsun.com>
2469
2470 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
2471 Check for close failures.
2472 * src/files.h (xfclose): Return void, not int, since it always
2473 returned zero.
2474 * src/files.c (xfclose): Likewise. Report I/O error if ferror
2475 indicates one.
2476 * src/output.c (output_skeleton): Use xfclose rather than fclose
2477 and ferror. xfclose now checks ferror.
2478
2479 * data/glr.c (YYLEFTMOST_STATE): Remove.
2480 (yyreportTree): Use a stack-based leftmost state. This avoids
2481 our continuing battles with bogus warnings about initializers.
2482
56100c60
AD
24832002-10-30 Akim Demaille <akim@epita.fr>
2484
2485 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
2486 #if.
2487
51b4a04c
PH
24882002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2489
2490 * tests/glr-regr1.at: New test for reported regressions.
2491 * tests/testsuite.at: Add glr-regr1.at test.
2492 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 2493
bf1ebda2
PE
24942002-10-24 Paul Eggert <eggert@twinsun.com>
2495
5c16c6b1
PE
2496 Version 1.75a.
2497
bf1ebda2
PE
2498 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
2499 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
2500 we use malloc. Don't assume 'A' through 'Z' are contiguous.
2501 Don't assume strdup exists; POSIX says its an XSI extension.
2502 Check for buffer overflow on input.
2503
b526ee61
AD
25042002-10-24 Akim Demaille <akim@epita.fr>
2505
2506 * src/output.c (output_skeleton): Don't disable M4sugar comments
2507 too soon: it results in comments being expanded.
2508 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
2509 first output.
2510
f1886bb2
AD
25112002-10-24 Akim Demaille <akim@epita.fr>
2512
2513 * data/yacc.c (m4_int_type): New.
2514 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
2515 char' as only yacc.c wants K&R portability.
2516 * data/glr.c (yysigned_char): Remove.
2517 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
2518 Reported by Quoc Peyrot.
2519
c5576256
PE
25202002-10-23 Paul Eggert <eggert@twinsun.com>
2521
2522 * src/main.c (main): With --trace=time, report times even if a
2523 non-fatal error occurs. Formerly, the times were reported in some
2524 such cases but not in others.
2525 * src/reader.c (reader): Just return if a complaint has been issued,
2526 instead of exiting, so that 'main' can report times.
2527
27b0ffea
AD
25282002-10-22 Akim Demaille <akim@epita.fr>
2529
2530 * src/system.h: Include sys/types.
2531 Reported by Bert Deknuydt.
2532
223a7883
PE
25332002-10-23 Paul Eggert <eggert@twinsun.com>
2534
2535 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
2536 Suggested by Art Haas.
2537
25382002-10-22 Paul Eggert <eggert@twinsun.com>
2539
2540 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
2541 decl; not needed any more.
2542 * src/main.c (main): Use return to exit, undoing yesterday's change.
2543 The last OS that we could find where this wouldn't work is
2544 SunOS 3.5, and that's too old to worry about now.
2545
2546 * data/glr.c (struct yyltype): Define members even when not
2547 doing locations. This is more consistent with yacc.c, and it
2548 works around the following bug reports:
e3aa65c5
PE
2549 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
2550 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 2551
223a7883
PE
2552 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
2553 @acronym consistently. Standardize on "Yacc" instead of "YACC",
2554 "Algol" instead of "ALGOL". Give a bit more history about BNF.
2555
8b76775a
AD
25562002-10-22 Akim Demaille <akim@epita.fr>
2557
2558 * data/README: New.
2559
6db10d14
PE
25602002-10-21 Paul Eggert <eggert@twinsun.com>
2561
2562 Be consistent about 'bool'; the old code used an enum in one
2563 module and an int in another, and this violates the C standard.
2564 * m4/stdbool.m4: New file, from coreutils 4.5.3.
2565 * configure.ac (AC_HEADER_STDBOOL): Add.
2566 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
2567 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
2568 * src/symtab.c (hash_compare_symbol_t): Likewise.
2569 * src/system.h (bool, false, true): Use a definition consistent
2570 with ../lib/hash.c. All uses changed.
2571
2572 * src/complain.c (warning_issued): Renamed from warn_message_count,
2573 so that we needn't worry about integer overflow (!).
2574 Now of type bool. All uses changed.
2575 (complaint_issued): Renamed from complain_message_count; likewise.
2576
2577 * src/main.c (main): Use exit to exit with failure.
27b0ffea 2578
6db10d14
PE
2579 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
2580 rather than 1 and 0.
2581 * src/main.c (main): Likewise.
2582 * src/getargs.c (getargs): Likewise.
2583 * src/reader.c (reader): Likewise.
2584
2585 * src/getarg.c (getargs): Remove duplicate code for
2586 "Try `bison --help'".
2587
2588 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
2589 What was that "2" for?
2590
2591 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2592 * src/getargs.c (usage): Likewise.
2593
2594 * src/getargs.c (getargs): When there are too few operands, report
2595 the last one. When there are too many, report the first extra
2596 one. This is how diffutils does it.
2597
92a060fd
PE
25982002-10-20 Paul Eggert <eggert@twinsun.com>
2599
2600 Remove K&R vestiges.
2601 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2602 * src/complain.c (VA_START): Remove. Assume prototypes.
2603 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2604 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2605 fatal): Assume prototypes.
2606 * src/complain.h: Assume prototypes.
2607 * src/system.h (PARAMS): Remove.
2608 Include <limits.h> unconditionally, since it's guaranteeed even
2609 for a freestanding C89 compiler.
2610 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2611 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 2612
e7cb57c0
AD
26132002-10-20 Akim Demaille <akim@epita.fr>
2614
2615 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2616 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2617 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2618 (yyresolveStates, yyresolveAction, yyresolveStack)
2619 (yyprocessOneStack): Use them.
2620 (yy_reduce_print): New.
2621 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2622
0245f82d
AD
26232002-10-20 Akim Demaille <akim@epita.fr>
2624
2625 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2626 arguments and output `void'.
2627 (b4_c_function): Rename as...
2628 (b4_c_function_def): this.
2629 (b4_c_function_decl, b4_c_ansi_function_def)
2630 (b4_c_ansi_function_decl): New.
2631 Change the interpretation of the arguments: before `int, foo', now
2632 `int foo, foo'.
2633 * data/yacc.c (yyparse): Prototype and define thanks to these.
2634 Adjust b4_c_function_def uses.
2635 * data/glr.c (yyparse): Likewise, but ANSI only.
2636
39912f52
AD
26372002-10-20 Akim Demaille <akim@epita.fr>
2638
2639 * src/output.c (prepare): Move the definition of `tokens_number',
2640 `nterms_number', `undef_token_number', `user_token_number_max'
2641 to...
2642 (prepare_tokens): Here.
2643 (prepare_tokens): Rename as...
2644 (prepare_symbols): this.
2645 (prepare): Move the definition of `rules_number' to...
2646 (prepare_rules): here.
2647 (prepare): Move the definition of `last', `final_state_number',
2648 `states_number' to...
2649 (prepare_states): here.
2650 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2651
20c1e2ad
AD
26522002-10-20 Akim Demaille <akim@epita.fr>
2653
2654 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2655
21964f43
AD
26562002-10-20 Akim Demaille <akim@epita.fr>
2657
2658 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2659 * data/c.m4: here.
2660
66d30cd4
AD
26612002-10-20 Akim Demaille <akim@epita.fr>
2662
2663 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2664 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2665 `pair'.
2666 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2667 `name' to...
2668 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2669 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2670 These.
2671
95f2c9fe
PE
26722002-10-19 Paul Eggert <eggert@twinsun.com>
2673
2674 Do not create a temporary file, as that involves security and
2675 cleanup headaches. Instead, use a pair of pipes.
2676 Derived from a suggestion by Florian Krohm.
2677 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2678 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2679 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2680 (BISON_PREREQ_SUBPIPE): Add.
2681 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2682 Add subpipe.h, subpipe.c.
2683 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2684 * po/POTFILES.in: Add lib/subpipe.c.
2685 * src/output.c: Include "subpipe.h".
2686 (m4_invoke): Remove decl.
2687 (scan_skel): New decl.
2688 (output_skeleton): Use pipe rather than temporary file for m4 input.
2689 Check that m4sugar.m4 is readable, to avoid deadlock.
2690 Check for pipe I/O error.
2691 * src/scan-skel.l (readpipe): Remove decl.
2692 (scan_skel): New function, to be used in place of m4_invoke.
2693 Read from stream rather than file.
66d30cd4 2694
95f2c9fe
PE
2695 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2696 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2697 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2698 this generates a more-accurate value anyway.
2699
2700 * lib/timevar.c (timervar_accumulate): Rename locals to
2701 avoid confusion with similarly-named more-global.
2702 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2703
2704 * src/output.c (prepare): Use xstrdup to convert char const *
2705 to char *, to avoid GCC warning.
2706
c19988b7
AD
27072002-10-19 Akim Demaille <akim@epita.fr>
2708
2709 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2710 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2711 Use them to have `calc.y' ready for %pure-parser.
2712 * data/yacc.c (YYLEX): Pass a yylex return type to
2713 b4_c_function_call.
2714
ae7453f2
AD
27152002-10-19 Akim Demaille <akim@epita.fr>
2716
2717 Prototype support of %lex-param and %parse-param.
2718
2719 * src/parse-gram.y: Add the definition of the %lex-param and
2720 %parse-param tokens, plus their rules.
2721 Drop the `_' version of %glr-parser.
2722 Add the "," token.
2723 * src/scan-gram.l (INITIAL): Scan them.
2724 * src/muscle_tab.c: Comment changes.
2725 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2726 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2727 (muscle_entry_s): The `value' member is no longer const.
2728 Adjust all dependencies.
2729 * src/muscle_tab.c (muscle_init): Adjust: use
2730 MUSCLE_INSERT_STRING.
2731 Initialize the obstack earlier.
2732 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2733 (muscle_pair_list_grow): New.
2734 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2735 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2736 * tests/calc.at: Use %locations, not --locations.
2737 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2738
0e575721
AD
27392002-10-19 Akim Demaille <akim@epita.fr>
2740
2741 * src/getargs.c (usage): Take status as argument and exit
2742 accordingly.
2743 Report the traditional `Try ... --help' message when status != 0.
2744 (usage, version): Don't take a FILE * as arg, it is pointless.
2745 (getargs): When there is an incorrect number of arguments, make it
2746 an error, and report it GNUlically thanks to `usage ()'.
2747
724ce7f5
PE
27482002-10-18 Paul Eggert <eggert@twinsun.com>
2749
3a781eb2
PE
2750 * data/glr.c (yyreportParseError): Don't assume that sprintf
2751 yields the length of the printed string, as this is not true
2752 on SunOS 4.1.4. Reported by Peter Klein.
2753
724ce7f5
PE
2754 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2755 * tests/conflicts.at (%nonassoc and eof): Likewise.
2756 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2757
473d0a75
AD
27582002-10-17 Akim Demaille <akim@epita.fr>
2759
2760 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2761 * src/getargs.c (trace_types, trace_args): Adjust.
2762 * src/reader.c (grammar_current_rule_prec_set)
2763 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2764 Standardize error messages.
2765 And s/@prec/%prec/!
2766 (reader): Use trace_flag to enable scanner/parser debugging,
2767 instead of an adhoc scheme.
2768 * src/scan-gram.l: Remove trailing debugging code.
2769
e76d2469
PE
27702002-10-16 Paul Eggert <eggert@twinsun.com>
2771
93e2236a
PE
2772 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2773 MUSCLE_TAB_H.
2774
e76d2469
PE
2775 * NEWS: Officially drop support for building Bison with K&R C,
2776 since it didn't work anyway and it's not worth worrying about.
2777 * Makefile.maint (wget_files): Remove ansi2knr.c.
2778 (ansi2knr.c-url_prefix): Remove.
2779 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2780 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2781 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2782
5bd1c419
PE
27832002-10-15 Paul Eggert <eggert@twinsun.com>
2784
2785 Stop using the "enum_" trick for K&R-style function definitions;
2786 it confused me, and I was the author! Instead, assume that people
2787 who want to use K&R C compilers (when using these modules in GCC,
2788 perhaps?) will run ansi2knr.
2789
2790 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2791 All uses of "enum_" changed to "enum ".
2792 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2793 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 2794
5bd1c419
PE
2795 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2796 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2797 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2798 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2799 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2800 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2801 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2802 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2803 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2804 Use function prototypes; this removes the need for declaring
2805 static functions simply to provide their prototypes.
2806 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2807 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2808 bitset_count_, bitset_create, bitset_dump, bitset_first,
2809 bitset_free, bitset_init, bitset_last, bitset_next,
2810 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2811 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2812 bitset_print, bitset_release_memory, bitset_toggle_,
2813 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2814 debug_bitset): Likewise.
2815 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2816 * lib/bitset_stats.c (bitset_log_histogram_print,
2817 bitset_percent_histogram_print, bitset_stats_and,
2818 bitset_stats_and_cmp, bitset_stats_and_or,
2819 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2820 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2821 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2822 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2823 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2824 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2825 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2826 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2827 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2828 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2829 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2830 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2831 bitset_stats_zero): Likewise.
2832 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2833 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2834 bitsetv_dump, debug_bitsetv): Likewise.
2835 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2836 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2837 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2838 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2839 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2840 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2841 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2842 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2843 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2844 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2845 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2846 Likewise.
2847 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2848 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2849 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2850 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2851 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2852 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2853 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2854 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2855 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2856 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2857 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 2858
ae26e1f0
AD
28592002-10-14 Akim Demaille <akim@epita.fr>
2860
2861 Version 1.75.
2862
d43baf71
AD
28632002-10-14 Akim Demaille <akim@epita.fr>
2864
2865 * tests/Makefile.am (maintainer-check-posix): New.
2866
7ebc83e3
AD
28672002-10-14 Akim Demaille <akim@epita.fr>
2868
2869 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2870 member.
2871
05846dae
AD
28722002-10-14 Akim Demaille <akim@epita.fr>
2873
2874 * src/tables.c (table_ninf_remap): base -> tab.
2875 Reported by Matt Rosing.
2876
1318e37d
PE
28772002-10-14 Paul Eggert <eggert@twinsun.com>
2878
447fbb17
PE
2879 * tests/action.at, tests/calc.at, tests/conflicts.at,
2880 tests/cxx-type.at, tests/headers.at, tests/input.at,
2881 tests/regression.at, tests/synclines.at, tests/torture.at:
2882 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2883 so that the tests still work even if POSIXLY_CORRECT is set.
2884 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 2885
1318e37d
PE
2886 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2887 for portability to K&R hosts. Fix typo: signed char is guaranteed
2888 only to 127, not to 128.
2889 * data/glr.c (yysigned_char): New type.
2890 * data/yacc.c (yysigned_char): Likewise.
2891 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2892
cc0f0794
PE
28932002-10-13 Paul Eggert <eggert@twinsun.com>
2894
5038f418
PE
2895 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2896 true due to limited range of data type" warning from GCC.
2897
cc0f0794
PE
2898 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2899 by wrapping enum yytokentype's definition inside #ifndef
2900 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2901
6fed0802
AD
29022002-10-13 Akim Demaille <akim@epita.fr>
2903
2904 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2905 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2906
32f0598d
AD
29072002-10-13 Akim Demaille <akim@epita.fr>
2908
2909 * Makefile.maint: Update from Autoconf 2.54.
2910 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2911
7ea9a33f
AD
29122002-10-13 Akim Demaille <akim@epita.fr>
2913
2914 * src/print.c (print_state): Separate the list of solved conflicts
2915 from the other items.
2916 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2917
ea99527d
AD
29182002-10-13 Akim Demaille <akim@epita.fr>
2919
2920 Let nondeterministic skeletons be usable with deterministic
2921 tables.
2922
2923 With the patch, GAWK compiled by GCC without -O2 passes its test
2924 suite using a GLR parser driven by LALR tables. It fails with -O2
2925 because `struct stat' gives two different answers on my machine:
2926 88 (definition of an auto var) and later 96 (memset on this var).
2927 Hence the stack is badly corrumpted. The headers inclusion is to
2928 blame: if I move the awk.h inclusion before GLR's system header
2929 inclusion, the two struct stat have the same size.
2930
2931 * src/tables.c (pack_table): Always create conflict_table.
2932 (token_actions): Always create conflict_list.
2933 * data/glr.c (YYFLAG): Remove, unused.
2934
f377f69f
AD
29352002-10-13 Akim Demaille <akim@epita.fr>
2936
2937 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2938 (O0FLAGS): New.
2939 (VALGRIND, GXX): New.
2940 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2941 * tests/bison.in: Run $PREBISON a pre-command.
2942 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2943 (maintainer-check-g++): New.
2944 * Makefile.am (maintainer-check): New.
2945
2a1fe6ed
AD
29462002-10-13 Akim Demaille <akim@epita.fr>
2947
2948 * data/glr.c: Formatting changes.
2949 Tweak some trace messages to match yacc.c's.
2950
f50adbbd
AD
29512002-10-13 Akim Demaille <akim@epita.fr>
2952
2953 GLR parsers sometimes raise parse errors instead of performing the
2954 default reduction.
2955 Reported by Charles-Henry de Boysson.
2956
2957 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2958 check the length of the traces when %glr.
2959 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2960 GLR's traces.
2961 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2962 Test GLR parsers.
2963 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2964 (yyltype): Remove the yy prefix from the member names.
2965 (yytable): Complete its comment.
2966 (yygetLRActions): Map error action number from YYTABLE from
2967 YYTABLE_NINF to 0.
2968 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2969 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2970 not satisfying as we could compare an YYACTION computed from
2971 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2972 only value for error actions.
2973 (yyreportParseError): In verbose parse error messages, don't issue
2974 `error' in the list of expected tokens.
2975 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2976 next action to perform to match glr.c's decoding.
2977 (yytable): Complete its comment.
2978
bcbad5b9
PE
29792002-10-13 Paul Eggert <eggert@twinsun.com>
2980
2981 Fix problem reported by Henrik Grubbstroem in
e3aa65c5 2982 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
2983 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2984 because the Bison parser reads the second action before reducing
2985 the first one.
2986 * src/scan-gram.l (rule_length): New static var.
2987 Use it to keep track of the rule length in the scanner, since
2988 we can't expect the parser to be in lock-step sync with the scanner.
2989 (handle_action_dollar, handle_action_at): Use this var.
2990 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 2991
14904b89
PE
29922002-10-12 Paul Eggert <eggert@twinsun.com>
2993
1fe611e5
PE
2994 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2995 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2996 Include <sys/time.h> when checking for clock_t and struct tms.
2997 Use same include order as source.
2998 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
e3aa65c5 2999 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 3000
1fe611e5
PE
3001 * lib/timevar.c: Update copyright date and clarify comments.
3002 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 3003
1fe611e5
PE
3004 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
3005 GCC version as of today, then merge Bison's changes.
3006 Change "GCC" to "Bison" in copyright notice. timevar.def's
3007 author is Akim, so change that too.
3008
98194095
PE
3009 * src/reader.c (grammar_current_rule_check):
3010 Don't worry about the default action if $$ is untyped.
3011 Prevents bogus warnings reported by Jim Gifford in
e3aa65c5 3012 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 3013
14904b89
PE
3014 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
3015 * data/glr.c, data/lalr1.cc, data/yacc.c:
3016 Output token definitions before the first part of user declarations.
3017 Fixes compatibility problem reported by Jim Gifford for kbd in
e3aa65c5 3018 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 3019
ff6dca18
PE
30202002-10-11 Paul Eggert <eggert@twinsun.com>
3021
3022 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
3023 (yyparse): here. This undoes some of the 2002-07-25 change.
3024 Compatibility problem reported by Ralf S. Engelschall with
3025 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
3026
eb714592
AD
30272002-10-11 Akim Demaille <akim@epita.fr>
3028
3029 * tests/regression.at Characters Escapes): New.
3030 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
3031 characters.
3032 Reported by Jan Nieuwenhuizen.
3033
b7195100
AD
30342002-10-11 Akim Demaille <akim@epita.fr>
3035
3036 * po/id.po: New.
3037
f28a0f2d
PE
30382002-10-10 Paul Eggert <eggert@twinsun.com>
3039
3040 Portability fixes for bitsets; this also avoids several GCC
3041 warnings.
3042
3043 * lib/abitset.c: Include <stddef.h>, for offsetof.
3044 * lib/lbitset.c: Likewise.
3045
3046 * lib/abitset.c (abitset_bytes): Return a size that is aligned
3047 properly for vectors of objects. Do not assume that adding a
3048 header size to a multiple of a word size yields a value that is
3049 properly aligned for the whole union.
3050 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3051
3052 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3053 unique names for structures.
3054 * lib/ebitset.c (ebitset_bytes): Likewise.
3055 * lib/lbitset.c (lbitset_bytes): Likewise.
3056
3057 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3058 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3059 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3060 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3061 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3062 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3063 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3064 to improve the type-checking that GCC can do.
3065 * lib/bitset.c (bitset_op4_cmp): Likewise.
3066 * lib/bitset_stats.c (bitset_stats_count,
3067 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3068 bitset_stats_copy, bitset_stats_disjoint_p,
3069 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3070 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3071 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3072 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3073 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3074 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3075 bitset_stats_or_and_cmp): Likewise.
3076 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3077 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3078 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3079 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3080
3081 * lib/abitset.h: Include bitset.h, not bbitset.h.
3082 * lib/ebitset.h: Likewise.
3083 * lib/lbitset.h: Likewise.
3084
3085 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3086 All instances of parameters of type enum bitset_opts are now of
3087 type enum_bitset_opts, to conform to the C Standard, and similarly
3088 for enum_bitset_type.
3089 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3090 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3091
3092 Do not use "struct bitset_struct" to mean different things in
3093 different modules. Not only is this confusing, it violates
3094 the C Standard, which requires that structure types in different
3095 modules must be compatible if one is to be passed to the other.
3096 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3097 All instances of "struct bitset_struct *" replaced with "bitset".
3098 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3099 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3100 struct lbitset_struct, struct bitset_stats_struct): New types.
3101 All uses of struct bitset_struct changed to union bitset_union,
3102 etc.
3103 * lib/abitset.c (struct abitset_struct, abitset,
3104 struct bitset_struct): Remove.
3105 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3106 struct bitset_struct): Remove.
3107 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3108 bitset_struct): Remove.
3109 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3110 Likewise.
3111
3112 Do not call a function of type T using a call that assumes the
3113 function is of a different type U. Standard C requires that a
3114 function must be called with a type that is compatible with its
3115 definition.
3116 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3117 New decls.
3118 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3119 New functions.
3120 * lib/ebitset.c (PFV): Remove.
3121 * lib/lbitset.c (PFV): Likewise.
3122 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3123 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3124 decls.
3125 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3126 (ebitset_vtable): Use them.
3127 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3128 lbitset_xor): New functions.
3129 (lbitset_vtable): Use them.
3130
3131 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3132 Declare.
3133
3134 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3135 GCC warning.
3136 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
3137 Use offsetof, for simplicity.
3138
6fbe4984
PE
31392002-10-06 Paul Eggert <eggert@twinsun.com>
3140
3141 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
3142 the same width as int. This reapplies a hunk of the 2002-08-12 patch
e3aa65c5 3143 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
3144 which was inadvertently undone by the 2002-09-30 patch.
3145 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
3146 the same width as int.
3147
420f93c8
PE
31482002-10-04 Paul Eggert <eggert@twinsun.com>
3149
3150 Version 1.50.
3151
3152 * configure.ac (AC_INIT), NEWS: Increment version number.
3153
3154 * doc/bison.texinfo: Minor spelling, grammar, and white space
3155 fixes.
3156 (Symbols): Mention that any negative value returned from yylex
3157 signifies end-of-input. Warn about negative chars. Mention
3158 the portable Standard C character set.
3159
3160 The GNU coding standard says CFLAGS and YFLAGS are reserved
3161 for the installer to set.
3162 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
3163 * src/Makefile.am (AM_CFLAGS): Likewise.
3164 (AM_YFLAGS): Renamed from YFLAGS.
3165
3166 Fix some MAX and MIN problems.
3167 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
3168 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
3169 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
3170 * src/reader.c (reader): Use it.
3171
3172 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
3173 POSIX 1003.1-2001 has removed fgrep.
3174
31752002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3176
3177 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
3178 interpreted as signed.
3179 * lib/ebitset.c (ebitset_list): Fix bug.
3180
ff68026d
PE
31812002-10-01 Paul Eggert <eggert@twinsun.com>
3182
3183 More fixes for 64-bit hosts and large bitsets.
3184
3185 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
3186 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
3187 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
3188 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
3189 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
3190 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
3191 bitset_count_): Likewise.
3192 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
3193 bitset_first, bitset_last): Likewise.
3194 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
3195 bitset_stats_list_reverse, bitset_stats_size,
3196 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
3197 Likewise.
3198 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3199 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3200 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3201 bitsetv_reflexive_transitive_closure): Likewise.
3202 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
3203 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
3204 Likewise.
3205 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
3206 Likewise.
420f93c8 3207
ff68026d
PE
3208 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
3209 Use size_t, not unsigned int, to count bytes.
3210 * lib/abitset.h (abitset_bytes): Likewise.
3211 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
3212 Likewise.
3213 * lib/bitset.h (bitset_bytes): Likewise.
3214 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
3215 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
3216 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3217 * lib/ebitset.c (ebitset_bytes): Likewise.
3218 * lib/ebitset.h (ebitset_bytes): Likewise.
3219 * lib/lbitset.c (lbitset_bytes): Likewise.
3220 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 3221
ff68026d
PE
3222 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
3223 abitset_subset_p, abitset_disjoint_p, abitset_and,
3224 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
3225 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
3226 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
3227 abitset_or_and, abitset_or_and_cmp):
3228 Use bitset_windex instead of unsigned int.
3229 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3230 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
3231 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
3232 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
3233 Likewise.
3234 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 3235
ff68026d
PE
3236 * lib/bitset.c (bitset_print):
3237 Use proper printf formats for widths of integer types.
3238 * lib/bitset_stats.c (bitset_percent_histogram_print,
3239 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
3240 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3241 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3242 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 3243
ff68026d
PE
3244 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
3245 BITSET_SIZE_MAX): New macros.
3246 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
3247 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
3248 to BITSET_WINDEX_MAX.
3249
3250 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
3251 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
3252 since we now return the bitset_bindex type (not int).
3253
3254 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
3255 when computing sizes.
3256 * lib/ebitset.c (ebitset_elts_grow): Likewise.
3257
3258 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
3259 and avoid cast to unsigned.
3260
6aa452a6
AD
32612002-09-30 Akim Demaille <akim@epita.fr>
3262
3263 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3264 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
3265 Updates from Michael Hayes.
3266
927f7817
AD
32672002-09-30 Art Haas <ahaas@neosoft.com>
3268
3269 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
3270 invocations.
3271 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
3272 defined.
3273
9738f41e
AD
32742002-09-27 Akim Demaille <akim@epita.fr>
3275
3276 Version 1.49c.
3277
a5c75d7f
AD
32782002-09-27 Akim Demaille <akim@epita.fr>
3279
3280 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
3281 (Because of AC_LIBSOURCE).
3282
8280e179
AD
32832002-09-27 Akim Demaille <akim@epita.fr>
3284
3285 Playing with Autoscan.
3286
3287 * configure.ac: Remove the old LIBOBJ tweaks.
3288 (AC_REPLACE_FUNCS): Add strrchr and strtol.
3289 * lib/strrchr.c: New.
3290 * lib/strtol.c: New, from the Coreutils 4.5.1.
3291
ae64af35
AD
32922002-09-27 Akim Demaille <akim@epita.fr>
3293
3294 Playing with Autoscan.
3295
3296 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
3297 * lib/Makefile.am (libbison_a_SOURCES): No longer include
3298 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
3299 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
3300 Coreutils 4.5.1.
3301
d1a1114f
AD
33022002-09-24 Akim Demaille <akim@epita.fr>
3303
3304 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
3305 (Frequently Asked Questions, Parser Stack Overflow): New.
3306
b906441c
AD
33072002-09-13 Akim Demaille <akim@epita.fr>
3308
3309 Playing with autoscan.
3310
3311 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
3312 * src/files.c (skeleton_find): Remove, unused.
3313 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
3314 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
3315
bd701811
AD
33162002-09-13 Akim Demaille <akim@epita.fr>
3317
3318 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
3319 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
3320
e0a13e7b
AD
33212002-09-13 Akim Demaille <akim@epita.fr>
3322
3323 * configure.ac: Require 2.54.
3324 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
3325 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
3326 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
3327 Remove, provided by Autoconf macros.
3328
c97011bf
AD
33292002-09-12 Akim Demaille <akim@epita.fr>
3330
3331 * m4/prereq.m4: Update, from Coreutils 4.5.1.
3332
d862b1be
AD
33332002-09-12 Akim Demaille <akim@epita.fr>
3334
3335 * m4/prereq.m4: Update, from Fileutils 4.1.5.
3336 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
3337 Reported by Martin Mokrejs.
3338
3d38c03a
AD
33392002-09-10 Akim Demaille <akim@epita.fr>
3340
3341 * src/parse-gram.y: Associate a human readable string to each
3342 token type.
3343 * tests/regression.at (Invalid inputs): Adjust.
3344
b6347355
AD
33452002-09-10 Gary V. Vaughan <gary@gnu.org>
3346
3347 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
3348 with an Autoconf-2.5x style configure.ac.
3349
09ba4ab2
PE
33502002-09-06 Paul Eggert <eggert@twinsun.com>
3351
3352 * doc/bison.texinfo (Conditions): Make explicit that the GPL
3353 exception applies only to yacc.c. This is a modification of a
3354 patch originally suggested by Akim Demaille.
3355
21846f69
AD
33562002-09-06 Akim Demaille <akim@epita.fr>
3357
09ba4ab2
PE
3358 * data/c.m4 (b4_copyright): Move the GPL exception comment from
3359 here to...
3360 * data/yacc.c: here.
3361
21846f69
AD
3362 * data/lalr1.cc (struct yyltype): Don't define it, since we use
3363 LocationType.
3364 (b4_ltype): Default to yy::Location from location.hh.
3365
c0ad8bf3
AD
33662002-09-04 Jim Meyering <jim@meyering.net>
3367
3368 * data/yacc.c: Guard the declaration of yytoknum also with
3369 `#ifdef YYPRINT', so it is declared only when used.
3370
3a93251e
AD
33712002-09-04 Akim Demaille <akim@epita.fr>
3372
3373 * configure.in: Rename as...
3374 * configure.ac: this.
3375 Bump to 1.49c.
3376
427c0dda
AD
33772002-09-04 Akim Demaille <akim@epita.fr>
3378
3379 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
3380 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
3381 translate maintainer only messages.
3382
6a254321
PE
33832002-08-12 Paul Eggert <eggert@twinsun.com>
3384
645e30d1
PE
3385 Version 1.49b.
3386
6a254321
PE
3387 * Makefile.am (SUBDIRS): Remove intl.
3388 (DISTCLEANFILES): Remove.
3389 * NEWS: Mention that GNU M4 is now required. Clarify what is
3390 meant by "larger grammars". Mention the pt_BR translation.
3391 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
3392 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
3393 Bump version from 0.11.2 to 0.11.5.
3394 (BISON_PREREQ_STAGE): Remove.
3395 (AM_GNU_GETTEXT): Use external gettext.
3396 (AC_OUTPUT): Remove intl/Makefile.
3397
3398 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
3399
3400 * data/glr.c: Include string.h, for strlen.
3401 (yyreportParseError): Use size_t for yysize.
3402 (yy_yypstack): No longer nested inside yypstates, as nested
3403 functions are not portable. Do not assume size_t is the
3404 same width as int.
3405 (yypstates): Do not assume that ptrdiff_t is the same width
3406 as int, and similarly for yyposn and YYINDEX.
3407
3408 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
3409
3410 * lib/Makefile.am (INCLUDES): Do not include from the intl
3411 directory, which has been removed.
3412 * src/Makefile.am (INCLUDES): Likewise.
3413
3414 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
3415 (bitsets_sources, additional_bitsets_sources, timevars_sources):
3416 New vars.
3417
3418 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
3419 * tests/Makefile.am (EXTRA_DIST): Likewise.
3420
3421 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
3422 Do not assume that bitset_windex is the same width as unsigned.
3423
3424 * lib/abitset.c (abitset_unused_clear): Do not assume that
3425 bitset_word is the same width as int.
3426 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
3427 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
3428 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
3429 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
3430 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
3431
3432 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
3433 portability to one's complement hosts!).
3434 * lib/ebitset.c (ebitset_op1): Likewise.
3435 * lib/lbitset.c (lbitset_op1): Likewise.
3436
3437 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
3438 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3439 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
3440 Sync with fileutils.
3441 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
3442 lib/gettext.h: Sync with diffutils.
3443
3444 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
3445 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
3446
3447 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
3448 PROTOTYPES to check for prototypes, and "defined __STDC__" to
3449 check for void *.
3450
3451 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
3452 size_t; the old version tried to do this but casted improperly.
3453 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
3454 (bitset_test): Now returns int, not unsigned long.
3455
3456 * lib/bitset_stats.c: Include "gettext.h".
3457 (_): New macro.
3458 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
3459 name locals "index", as it generates unnecessary warnings on some
3460 hosts that have an "index" function.
3461
3462 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
3463 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
3464 they need translation.
3465 * src/LR0.c (state_list_append, new_itemsets, get_state,
3466 append_states, generate_states): Likewise.
3467 * src/assoc.c (assoc_to_string): Likewise.
3468 * src/closure.c (print_closure, set_firsts, closure): Likewise.
3469 * src/gram.c (grammar_dump): Likewise.
3470 * src/injections.c (injections_compute): Likewise.
3471 * src/lalr.c (lookaheads_print): Likewise.
3472 * src/relation.c (relation_transpose): Likewise.
3473 * src/scan-gram.l: Likewise.
3474 * src/tables.c (table_grow, pack_vector): Likewise.
3475
3476 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
3477 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
3478 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
3479 * m4/mbstate_t.m4: Sync with fileutils.
3480 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
3481
3482 * po/LINGUAS: Add pt_BR.
3483 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
3484 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
3485 lib/timevar.c.
3486 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
3487 manual recommends.
3488 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
3489
3490 * src/complain.c (strerror_r): Remove decl; not needed.
3491 (strerror): Use same pattern as ../lib/error.c.
3492
3493 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
3494
3495 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
3496
3497 * src/main.c (main): Cast result of bindtextdomain and textdomain
3498 to void, to avoid a GCC warning when --disable-nls is in effect.
3499
3500 * src/scan-gram.l: Use strings rather than escapes when possible,
3501 to minimize the number of warnings from xgettext.
3502 (handle_action_dollar, handle_action_at): Don't use isdigit,
3503 as it mishandles negative chars and it may not work as expected
3504 outside the C locale.
3505
3506 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
3507 this is a GCC extension and is not portable to other compilers.
3508
3509 * src/system.h (alloca): Use same pattern as ../lib/error.c.
3510 Do not include <ctype.h>; no longer needed.
3511 Do not include <malloc.h>; no longer needed (and generates
3512 warnings on OpenBSD 3.0).
3513
3514 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
3515 it's not portable.
3516
3517 * tests/regression.at: Do not use 'cc -c input.c -o input';
3518 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
3519
3520 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
3521 exit status as failure, not just exit status 1. Sun C exits
3522 with status 2 sometimes.
3523
3524 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
3525 Use it for the two large tests.
3526
c8f002c7
AD
35272002-08-02 Akim Demaille <akim@epita.fr>
3528
3529 * src/conflicts.c (conflicts_output): Don't output rules never
3530 reduced here, since anyway that computation doesn't work.
3531 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
3532 (rule_useless_p, rule_never_reduced_p): New.
3533 (grammar_rules_partial_print): Use a filter instead of a range.
3534 Display the title only if needed.
3535 (grammar_rules_print): Adjust.
3536 (grammar_rules_never_reduced_report): New.
3537 * src/tables.c (action_row): Move the computation of rules never
3538 reduced to...
3539 (token_actions): here.
3540 * src/main.c (main): Make the parser before making the report, so
3541 that rules never reduced are computed.
3542 Call grammar_rules_never_reduced_report.
3543 * src/print.c (print_results): Report rules never reduced.
3544 * tests/conflicts.at, tests/reduce.at: Adjust.
3545
cd08e51e
AD
35462002-08-01 Akim Demaille <akim@epita.fr>
3547
3548 Instead of attaching lookaheads and duplicating the rules being
3549 reduced by a state, attach the lookaheads to the reductions.
3550
3551 * src/state.h (state_t): Remove the `lookaheads',
3552 `lookaheads_rule' member.
3553 (reductions_t): Add a `lookaheads' member.
3554 Use a regular array for the `rules'.
3555 * src/state.c (reductions_new): Initialize the lookaheads member
3556 to 0.
3557 (state_rule_lookaheads_print): Adjust.
3558 * src/state.h, src/state.c (state_reductions_find): New.
3559 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
3560 (count_rr_conflicts): Adjust.
3561 * src/lalr.c (LArule): Remove.
3562 (add_lookback_edge): Adjust.
3563 (state_lookaheads_count): New.
3564 (states_lookaheads_initialize): Merge into...
3565 (initialize_LA): this.
3566 (lalr_free): Adjust.
3567 * src/main.c (main): Don't free nullable and derives too early: it
3568 is used by --verbose.
3569 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
3570
bb0027a9
AD
35712002-08-01 Akim Demaille <akim@epita.fr>
3572
3573 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
3574 `rule_number_t**'.
3575 (set_derives, free_derives): Rename as...
3576 (derives_compute, derives_free): this.
3577 Adjust all dependencies.
3578 * src/nullable.c (set_nullable, free_nullable): Rename as...
3579 (nullable_compute, nullable_free): these.
3580 (rule_list_t): Store rule_t *, not rule_number_t.
3581 * src/state.c (state_rule_lookaheads_print): Directly compare rule
3582 pointers, instead of their numbers.
3583 * src/main.c (main): Call nullable_free, and derives_free earlier,
3584 as they were lo longer used.
3585
3325ddc4
AD
35862002-08-01 Akim Demaille <akim@epita.fr>
3587
3588 * lib/timevar.c (get_time): Include children time.
3589 * src/lalr.h (LA, LArule): Don't export them: used with the
3590 state_t.
3591 * src/lalr.c (LA, LArule): Static.
3592 * src/lalr.h, src/lalr.c (lalr_free): New.
3593 * src/main.c (main): Call it.
3594 * src/tables.c (pack_vector): Check whether loc is >= to the
3595 table_size, not >.
3596 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3597 (tables_generate): do it, since that's also it which allocates
3598 them.
3599 Don't free LA and LArule, main does.
3600
c6f1a33c
AD
36012002-07-31 Akim Demaille <akim@epita.fr>
3602
3603 Separate parser tables computation and output.
3604
3605 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3606 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3607 (yydefgoto, yydefact, high): Move to...
3608 * src/tables.h, src/tables.c: here.
3609 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3610 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3611 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3612 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3613 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3614 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3615 (action_row, save_row, token_actions, save_column, default_goto)
3616 (goto_actions, sort_actions, matching_state, pack_vector)
3617 (table_ninf_remap, pack_table, prepare_actions): Move to...
3618 * src/tables.c: here.
3619 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3620 * src/output.c (token_actions, output_base, output_conflicts)
3621 (output_check): Merge into...
3622 (prepare_actions): this.
3623 (actions_output): Rename as...
3624 (user_actions_output): this.
3625 * src/main.c (main): Call tables_generate and tables_free.
3626
1509d42f
AD
36272002-07-31 Akim Demaille <akim@epita.fr>
3628
3629 Steal GCC's --time-report support.
3630
3631 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3632 stolen/adjusted from GCC.
3633 * m4/stage.m4: Remove time related checks.
3634 * m4/timevar.m4: New.
3635 * configure.in: Adjust.
3636 * src/system.h: Adjust to using timevar.h.
3637 * src/getargs.h, src/getargs.c: Support trace_time for
3638 --trace=time.
3639 * src/main.c (stage): Remove.
3640 (main): Replace `stage' invocations with timevar calls.
3641 * src/output.c: Insert pertinent timevar calls.
3642
273a74fa
AD
36432002-07-31 Akim Demaille <akim@epita.fr>
3644
3645 Let --trace have arguments.
3646
3647 * src/getargs.h (enum trace_e): New.
3648 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3649 (long_options, short_options): --trace/-T takes an optional
3650 argument.
3651 Change all the uses of trace_flag to reflect the new flags.
3652 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3653
3654 Strengthen `stage' portability.
3655
3656 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3657 * configure.in: Use it.
3658 Don't check for malloc.h and sys/times.h.
3659 * src/system.h: Include them when appropriate.
3660 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3661 times and struct tms are available.
3662
217598da
AD
36632002-07-30 Akim Demaille <akim@epita.fr>
3664
3665 In verbose parse error message, don't report `error' as an
3666 expected token.
3667 * tests/actions.at (Printers and Destructors): Adjust.
3668 * tests/calc.at (Calculator $1): Adjust.
3669 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3670 error message, do not report the parser accepts the error token in
3671 that state.
3672
52489d44
AD
36732002-07-30 Akim Demaille <akim@epita.fr>
3674
3675 Normalize conflict related messages.
3676
3677 * src/complain.h, src/complain.c (warn, complain): New.
3678 * src/conflicts.c (conflicts_print): Use them.
3679 (conflict_report_yacc): New, extracted from...
3680 (conflicts_print): here.
3681 * tests/conflicts.at, tests/existing.at: Adjust.
3682
e8832397
AD
36832002-07-30 Akim Demaille <akim@epita.fr>
3684
3685 Report rules which are never reduced by the parser: those hidden
3686 by conflicts.
3687
3688 * src/LR0.c (save_reductions): Don't make the final state too
3689 different: save its reduction (accept) instead of having a state
3690 without any action (no shift or goto, no reduce).
3691 Note: the final state is now a ``regular'' state, i.e., the
3692 parsers now contain `reduce 0' as default reduction.
3693 Nevertheless, since they decide to `accept' when yystate =
3694 final_state, they still will not reduce rule 0.
3695 * src/print.c (print_actions, print_reduction): Adjust.
3696 * src/output.c (action_row): Track reduced rules.
3697 (token_actions): Report rules never reduced.
3698 * tests/conflicts.at, tests/regression.at: Adjust.
3699
caf23d24
AD
37002002-07-30 Akim Demaille <akim@epita.fr>
3701
3702 `stage' was accidently included in a previous patch.
3703 Initiate its autoconfiscation.
3704
3705 * configure.in: Look for malloc.h and sys/times.h.
3706 * src/main.c (stage): Adjust.
3707 Report only when trace_flag.
3708
640748ee
AD
37092002-07-29 Akim Demaille <akim@epita.fr>
3710
3711 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3712 state_number_t.
3713 (errs_t): symbol_t*, not symbol_number_t.
3714 (reductions_t): rule_t*, not rule_number_t.
3715 (FOR_EACH_SHIFT): New.
3716 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3717 * src/print.c, src/print_graph.c: Adjust.
3718
88bce5a2
AD
37192002-07-29 Akim Demaille <akim@epita.fr>
3720
3721 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3722
3723 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3724 (endtoken, accept): these.
3725 * src/reader.c (reader): Set endtoken's default tag to "$end".
3726 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3727 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3728 Adjust.
3729
1bfb97db
AD
37302002-07-29 Akim Demaille <akim@epita.fr>
3731
3732 * src/reduce.c (reduce_grammar): When the language is empty,
3733 complain about the start symbol, not the axiom.
3734 Use its location.
3735 * tests/reduce.at (Empty Language): New.
3736
fc5734fe
AD
37372002-07-26 Akim Demaille <akim@epita.fr>
3738
3739 * src/reader.h, src/reader.c (gram_error): ... can't get
3740 yycontrol without making too strong assumptions on the parser
3741 itself.
3742 * src/output.c (prepare_tokens): Use the real 0th value of
3743 token_translations instead of `0'.
3744 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3745 visible here.
3746 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3747 for the time being: %locations ought to provide it to yyerror.
3748
3650b4b8
AD
37492002-07-25 Akim Demaille <akim@epita.fr>
3750
3751 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3752 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3753 * tests/regression.at (Web2c Actions): Adjust.
3754
4b3d3a8e
AD
37552002-07-25 Akim Demaille <akim@epita.fr>
3756
3757 Stop storing rules from 1 to nrules + 1.
3758
3759 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3760 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3761 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3762 Iterate from 0 to nrules.
3763 Use rule_number_as_item_number and item_number_as_rule_number.
3764 Adjust to `derive' now containing possibly 0.
3765 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3766 Handle the `- 1' part in rule numbers from/to item numbers.
3767 * src/conflicts.c (log_resolution): Fix the message which reversed
3768 shift and reduce.
3769 * src/output.c (action_row): Initialize default_rule to -1.
3770 (token_actions): Adjust.
3771 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3772 expected output.
3773 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3774
4a2a22f4
AD
37752002-07-25 Akim Demaille <akim@epita.fr>
3776
3777 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3778 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3779 (b4_c_knr_arg_decl): New.
3780 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3781 yyreport_parse_error.
3782
b8df3223
AD
37832002-07-25 Akim Demaille <akim@epita.fr>
3784
3785 * data/yacc.c (yyreport_parse_error): New, extracted from...
3786 (yyparse): here.
3787 (yydestruct, yysymprint): Move above yyparse.
3788 Be K&R compliant.
3789
a762e609
AD
37902002-07-25 Akim Demaille <akim@epita.fr>
3791
3792 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3793 replace...
3794 (b4_sint_type, b4_uint_type): these.
3795 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3796 * tests/regression.at (Web2c Actions): Adjust.
3797
12b0043a
AD
37982002-07-25 Akim Demaille <akim@epita.fr>
3799
3800 * src/gram.h (TIEM_NUMBER_MAX): New.
3801 (item_number_of_rule_number, rule_number_of_item_number): Rename
3802 as...
3803 (rule_number_as_item_number, item_number_as_rule_number): these.
3804 Adjust dependencies.
3805 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3806 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3807 (symbol_number_to_vector_number): New.
3808 (order): Of vector_number_t* type.
3809 (base_t, BASE_MAX, BASE_MIN): New.
3810 (froms, tos, width, pos, check): Of base_t type.
3811 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3812 (actrow): Of action_number_t type.
3813 (conflrow): Of unsigned int type.
3814 (table_ninf, base_ninf): New.
3815 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3816 (muscle_insert_int_table, muscle_insert_base_table)
3817 (muscle_insert_rule_number_table): New.
3818 (prepare_tokens): Output `toknum' as int_table.
3819 (action_row): Returns a rule_number_t.
3820 Use ACTION_MIN, not SHRT_MIN.
3821 (token_actions): yydefact is rule_number_t*.
3822 (table_ninf_remap): New.
3823 (pack_table): Use it for `base' and `table'.
3824 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3825 replaced with...
3826 (YYPACT_NINF, YYTABLE_NINF): these.
3827 (yypact, yytable): Compute their types instead of hard-coded
3828 `short'.
3829 * tests/regression.at (Web2c Actions): Adjust.
3830
5dde258a
AD
38312002-07-19 Akim Demaille <akim@epita.fr>
3832
3833 * src/scan-gram.l (id): Can start with an underscore.
3834
a945ec39
AD
38352002-07-16 Akim Demaille <akim@epita.fr>
3836
3837 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3838 Adjust all former `associativity' dependencies.
3839 * src/symtab.c (symbol_new): Default associativity is `undef', not
3840 `right'.
3841 (symbol_check_alias_consistence): Adjust.
3842
fae437e8
AD
38432002-07-09 Akim Demaille <akim@epita.fr>
3844
3845 * doc/bison.texinfo: Properly set the ``header'' part.
3846 Use @dircategory ``GNU programming tools'' as per Texinfo's
3847 documentation.
3848 Use @copying.
3849
1a715ef2
AD
38502002-07-09 Akim Demaille <akim@epita.fr>
3851
3852 * lib/quotearg.h: Protect against multiple inclusions.
3853 * src/location.h (location_t): Add a `file' member.
3854 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3855 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3856 `error_one_per_line' support.
3857
a5d50994
AD
38582002-07-09 Akim Demaille <akim@epita.fr>
3859
3860 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3861 * src/reader.c (lineno): Remove.
3862 Adjust all dependencies.
3863 (get_merge_function): Take a location and use complain_at.
3864 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3865 * tests/regression.at (Invalid inputs, Mixing %token styles):
3866 Adjust.
3867
b275314e
AD
38682002-07-09 Akim Demaille <akim@epita.fr>
3869
3870 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3871 recovery rule, and forbid extensions when --yacc.
3872 (gram_error): Use complain_at.
3873 * src/reader.c (reader): Exit if there were parse errors.
3874
865b9df1
AD
38752002-07-09 Akim Demaille <akim@epita.fr>
3876
3877 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3878 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3879 Reported by R Blake <blakers@mac.com>.
3880
c76e14da
AD
38812002-07-09 Akim Demaille <akim@epita.fr>
3882
3883 * data/yacc.c: Output the copyright notive in the header.
3884
7db2ed2d
AD
38852002-07-03 Akim Demaille <akim@epita.fr>
3886
3887 * src/output.c (froms, tos): Are state_number_t.
3888 (save_column): sp, sp1, and sp2 are state_number_t.
3889 (prepare): Rename `final' as `final_state_number', `nnts' as
3890 `nterms_number', `nrules' as `rules_number', `nstates' as
3891 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3892 unused.
3893 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3894 * data/lalr1.cc (nsym_): Remove, unused.
3895
e68e0410
AD
38962002-07-03 Akim Demaille <akim@epita.fr>
3897
3898 * src/lalr.h, src/lalr.c (goto_number_t): New.
3899 * src/lalr.c (goto_list_t): New.
3900 Propagate them.
3901 * src/nullable.c (rule_list_t): New.
3902 Propagate.
3903 * src/types.h: Remove.
3904
e1a4f3a4
AD
39052002-07-03 Akim Demaille <akim@epita.fr>
3906
3907 * src/closure.c (print_fderives): Use rule_rhs_print.
3908 * src/derives.c (print_derives): Use rule_rhs_print.
3909 (rule_list_t): New, replaces `shorts'.
3910 (set_derives): Add comments.
3911 * tests/sets.at (Nullable, Firsts): Adjust.
3912
536545f3
AD
39132002-07-03 Akim Demaille <akim@epita.fr>
3914
3915 * src/output.c (prepare_actions): Free `tally' and `width'.
3916 (prepare_actions): Allocate and free `order'.
3917 * src/symtab.c (symbols_free): Free `symbols'.
3918 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3919 * src/output.c (m4_invoke): Move to...
3920 * src/scan-skel.l: here.
3921 (<<EOF>>): Close yyout, and free its name.
3922
8b752b00
AD
39232002-07-03 Akim Demaille <akim@epita.fr>
3924
3925 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3926
3927 * src/LR0.c (new_state): Merge into...
3928 (state_list_append): this.
3929 (new_states): Merge into...
3930 (generate_states): here.
3931 (set_states): Don't ensure a proper `errs' state member here, do it...
3932 * src/conflicts.c (conflicts_solve): here.
3933 * src/state.h, src/state.c: Comment changes.
3934 (state_t): Rename member `shifts' as `transitions'.
3935 Adjust all dependencies.
3936 (errs_new): For consistency, also take the values as argument.
3937 (errs_dup): Remove.
3938 (state_errs_set): New.
3939 (state_reductions_set, state_transitions_set): Assert that no
3940 previous value was assigned.
3941 (state_free): New.
3942 (states_free): Use it.
3943 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3944 temporary storage: use `errs' and `nerrs' as elsewhere.
3945 (set_conflicts): Allocate and free this `errs'.
3946
613f5e1a
AD
39472002-07-02 Akim Demaille <akim@epita.fr>
3948
3949 * lib/libiberty.h: New.
3950 * lib: Update the bitset implementation from upstream.
3951 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3952 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3953 * src/main.c: Adjust bitset stats calls.
3954
26e0cadc
PE
39552002-07-01 Paul Eggert <eggert@twinsun.com>
3956
3957 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3958 char, so that negative chars don't collide with $.
3959
1154cced
AD
39602002-06-30 Akim Demaille <akim@epita.fr>
3961
3962 Have the GLR tests be `warning' checked, and fix the warnings.
3963
3964 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3965 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3966 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3967 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3968 (yyaddDeferredAction): static.
3969 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3970 (yyreportParseError): yyprefix is const.
3971 yytokenp is used only when verbose.
3972 (yy__GNUC__): Replace with __GNUC__.
3973 (yypdumpstack): yyi is size_t.
3974 (yypreference): Un-yy local variables and arguments, to avoid
3975 clashes with `yyr1'. Anyway, we are not in the user name space.
3976 (yytname_size): be an int, as is compared with ints.
3977 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3978 Use them.
3979 * tests/cxx-gram.at: Use quotation to protect $1.
3980 Use AT_COMPILE to enable warnings hunts.
3981 Prototype yylex and yyerror.
3982 `Use' argc.
3983 Include `string.h', not `strings.h'.
3984 Produce and prototype stmtMerge only when used.
3985 yylex takes a location.
3986
97650f4e
AD
39872002-06-30 Akim Demaille <akim@epita.fr>
3988
3989 We spend a lot of time in quotearg, in particular when --verbose.
3990
3991 * src/symtab.c (symbol_get): Store a quoted version of the key.
3992 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3993 Adjust all callers.
3994
d2576365
AD
39952002-06-30 Akim Demaille <akim@epita.fr>
3996
3997 * src/state.h (reductions_t): Rename member `nreds' as num.
3998 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3999 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
4000
ccaf65bc
AD
40012002-06-30 Akim Demaille <akim@epita.fr>
4002
4003 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
4004 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
4005 (shifts_to): Rename as...
4006 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
4007 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
4008 (TRANSITION_IS_DISABLED, transitions_to): these.
4009
87675353
AD
40102002-06-30 Akim Demaille <akim@epita.fr>
4011
4012 * src/print.c (print_shifts, print_gotos): Merge into...
4013 (print_transitions): this.
4014 (print_transitions, print_errs, print_reductions): Align the
4015 lookaheads columns.
4016 (print_core, print_transitions, print_errs, print_state,
4017 print_grammar): Output empty lines separator before, not after.
4018 (state_default_rule_compute): Rename as...
4019 (state_default_rule): this.
4020 * tests/conflicts.at (Defaulted Conflicted Reduction),
4021 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
4022 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
4023
ce4ccb4b
AD
40242002-06-30 Akim Demaille <akim@epita.fr>
4025
4026 Display items as we display rules.
4027
4028 * src/gram.h, src/gram.c (rule_lhs_print): New.
4029 * src/gram.c (grammar_rules_partial_print): Use it.
4030 * src/print.c (print_core): Likewise.
4031 * tests/conflicts.at (Defaulted Conflicted Reduction),
4032 (Unresolved SR Conflicts): Adjust.
4033 (Unresolved SR Conflicts): Adjust and rename as...
4034 (Resolved SR Conflicts): this, as was meant.
4035 * tests/regression.at (Web2c Report): Adjust.
4036
bc933ef1
AD
40372002-06-30 Akim Demaille <akim@epita.fr>
4038
4039 * src/print.c (state_default_rule_compute): New, extracted from...
4040 (print_reductions): here.
4041 Pessimize, but clarify the code.
4042 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
4043
53d4308d
AD
40442002-06-30 Akim Demaille <akim@epita.fr>
4045
4046 * src/output.c (action_row): Let default_rule be always a rule
4047 number.
4048
574fb2d5
AD
40492002-06-30 Akim Demaille <akim@epita.fr>
4050
4051 * src/closure.c (print_firsts, print_fderives, closure):
4052 Use BITSET_EXECUTE.
4053 * src/lalr.c (lookaheads_print): Likewise.
4054 * src/state.c (state_rule_lookaheads_print): Likewise.
4055 * src/print_graph.c (print_core): Likewise.
4056 * src/print.c (print_reductions): Likewise.
4057 * src/output.c (action_row): Likewise.
4058 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4059
05811fd7
AD
40602002-06-30 Akim Demaille <akim@epita.fr>
4061
4062 * src/print_graph.c: Use report_flag.
4063
0e4d5753
AD
40642002-06-30 Akim Demaille <akim@epita.fr>
4065
4066 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4067 to...
4068 * src/relation.h, src/relation.c (traverse, relation_digraph)
4069 (relation_print, relation_transpose): New.
4070
24c7d800
AD
40712002-06-30 Akim Demaille <akim@epita.fr>
4072
4073 * src/state.h, src/state.c (shifts_to): New.
4074 * src/lalr.c (build_relations): Use it.
4075
9222837b
AD
40762002-06-30 Akim Demaille <akim@epita.fr>
4077
4078 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4079 (item_number_of_rule_number, rule_number_of_item_number): New.
4080 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4081 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4082 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4083 Propagate their use.
4084 Much remains to be done, in particular wrt `shorts' from types.h.
4085
260008e5
AD
40862002-06-30 Akim Demaille <akim@epita.fr>
4087
4088 * src/symtab.c (symbol_new): Initialize the `printer' member.
4089
8a731ca8
AD
40902002-06-30 Akim Demaille <akim@epita.fr>
4091
4092 * src/LR0.c (save_reductions): Remove, replaced by...
4093 * src/state.h, src/state.c (state_reductions_set): New.
4094 (reductions, errs): Rename as...
4095 (reductions_t, errs_t): these.
4096 Adjust all dependencies.
4097
32e1e0a4
AD
40982002-06-30 Akim Demaille <akim@epita.fr>
4099
4100 * src/LR0.c (state_list_t, state_list_append): New.
4101 (first_state, last_state): Now symbol_list_t.
4102 (this_state): Remove.
4103 (new_itemsets, append_states, save_reductions): Take a state_t as
4104 argument.
4105 (set_states, generate_states): Adjust.
4106 (save_shifts): Remove, replaced by...
4107 * src/state.h, src/state.c (state_shifts_set): New.
4108 (shifts): Rename as...
4109 (shifts_t): this.
4110 Adjust all dependencies.
4111 * src/state.h (state_t): Remove the `next' member.
4112
e5fb6710
AD
41132002-06-30 Akim Demaille <akim@epita.fr>
4114
4115 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4116 escaped in slot 0.
4117
c7ca99d4
AD
41182002-06-30 Akim Demaille <akim@epita.fr>
4119
4120 Use hash.h for the state hash table.
4121
4122 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4123 (allocate_storage): Use state_hash_new.
4124 (free_storage): Use state_hash_free.
4125 (new_state, get_state): Adjust.
4126 * src/lalr.h, src/lalr.c (states): Move to...
4127 * src/states.h (state_t): Remove the `link' member, no longer
4128 used.
4129 * src/states.h, src/states.c: here.
4130 (state_hash_new, state_hash_free, state_hash_lookup)
4131 (state_hash_insert, states_free): New.
4132 * src/states.c (state_table, state_compare, state_hash): New.
4133 * src/output.c (output_actions): Do not free states now, since we
4134 still need to know the final_state number in `prepare', called
4135 afterwards. Do it...
4136 * src/main.c (main): here: call states_free after `output'.
4137
df0e7316
AD
41382002-06-30 Akim Demaille <akim@epita.fr>
4139
4140 * src/state.h, src/state.c (state_new): New, extracted from...
4141 * src/LR0.c (new_state): here.
4142 * src/state.h (STATE_ALLOC): Move to...
4143 * src/state.c: here.
4144 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
4145 * src/state.h, src/state.c: here.
4146
39f41916
AD
41472002-06-30 Akim Demaille <akim@epita.fr>
4148
4149 * src/reader.c (gensym): Rename as...
4150 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
4151 (getsym): Rename as...
4152 (symbol_get): this.
4153
d57650a5
AD
41542002-06-30 Akim Demaille <akim@epita.fr>
4155
4156 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
4157 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
4158 * src/output.c, src/print.c, src/print_graph.c: Propagate.
4159 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
4160
5a08f1ce
AD
41612002-06-30 Akim Demaille <akim@epita.fr>
4162
4163 Make the test suite pass with warnings checked.
4164
4165 * tests/actions.at (Printers and Destructors): Improve.
4166 Avoid unsigned vs. signed issues.
4167 * tests/calc.at: Don't exercise the scanner here, do it...
4168 * tests/input.at (Torturing the Scanner): here.
4169
720623af
PH
41702002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4171
88e7e941 4172 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
4173 reorganize first lines parallel to yacc.c.
4174
fb8135fa
AD
41752002-06-28 Akim Demaille <akim@epita.fr>
4176
4177 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
4178 (b4_token_enum, b4_token_defines): New, factored from...
4179 * data/lalr1.cc, data/yacc.c, glr.c: here.
4180
41442480
AD
41812002-06-28 Akim Demaille <akim@epita.fr>
4182
4183 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
4184 unused variables.
4185 * src/output.c (merger_output): static.
4186
e0e5bf84
AD
41872002-06-28 Akim Demaille <akim@epita.fr>
4188
4189 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
4190 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
4191 pacify GCC.
4192 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 4193
676385e2
PH
41942002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4195
4196 Accumulated changelog for new GLR parsing features.
4197
6a254321 4198 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
4199 conflicts_total_count.
4200 * src/conflicts.h: Ditto.
4201 * src/output.c (token_actions): Use the new name.
4202 (output_conflicts): Change conflp => conflict_list_heads, and
4203 confl => conflict_list for better readability.
4204 * data/glr.c: Use the new names.
4205 * NEWS: Add self to GLR announcement.
e0e5bf84 4206
676385e2
PH
4207 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
4208
4209 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
4210 Akim Demaille.
4211
4212 * data/bison.glr: Change name to glr.c
4213 * data/glr.c: Renamed from bison.glr.
4214 * data/Makefile.am: Add glr.c
e0e5bf84
AD
4215
4216 * src/getargs.c:
4217
676385e2
PH
4218 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
4219 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 4220
676385e2
PH
4221 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4222
4223 * data/bison.glr: Be sure to restore the
4224 current #line when returning to the skeleton contents after having
4225 exposed the input file's #line.
4226
4227 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4228
4229 * data/bison.glr: Bring up to date with changes to bison.simple.
4230
4231 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4232
4233 * data/bison.glr: Correct definitions that use b4_prefix.
4234 Various reformatting.
4235 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
4236 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
4237 yytokenp argument; now part of stack.
4238 (yychar): Define to behave as documented.
4239 (yyclearin): Ditto.
e0e5bf84 4240
676385e2
PH
4241 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4242
4243 * src/reader.h: Add declaration for free_merger_functions.
4244
4245 * src/reader.c (merge_functions): New variable.
4246 (get_merge_function): New function.
4247 (free_merger_functions): New function.
4248 (readgram): Check for %prec that is not followed by a symbol.
4249 Handle %dprec and %merge declarations.
4250 (packgram): Initialize dprec and merger fields in rules array.
4251
4252 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
4253 conflict_list_cnt, conflict_list_free): New variables.
4254 (table_grow): Also grow conflict_table.
e0e5bf84 4255 (prepare_rules): Output dprec and merger tables.
676385e2 4256 (conflict_row): New function.
e0e5bf84 4257 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
4258 default reduction in conflicted states for GLR parser so that there
4259 are spaces for the conflict lists.
4260 (save_row): Also save conflict information.
4261 (token_actions): Allocate conflict list.
4262 (merger_output): New function.
4263 (pack_vector): Pack conflict table, too.
4264 (output_conflicts): New function to output yyconflp and yyconfl.
4265 (output_check): Allocate conflict_tos.
4266 (output_actions): Output conflict tables, also.
4267 (output_skeleton): Output b4_mergers definition.
4268 (prepare): Output b4_max_rhs_length definition.
4269 Use 'bison.glr' as default skeleton for GLR parsers.
4270
4271 * src/gram.c (glr_parser): New flag.
4272 (grammar_free): Call free_merger_functions.
4273
4274 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
4275 all pairs of conflicting reductions, rather than just all tokens
4276 causing conflicts. Needed to size conflict tables.
e0e5bf84 4277 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
4278 interface.
4279 (conflicts_print): Ditto.
4280 (count_total_conflicts): New function.
4281
4282 * src/reader.h (merger_list): New type.
4283 (merge_functions): New variable.
4284
4285 * src/lex.h (tok_dprec, tok_merge): New token types.
4286
4287 * src/gram.h (rule_s): Add dprec and merger fields.
4288 (glr_parser): New flag.
4289
4290 * src/conflicts.h (count_total_conflicts): New function.
4291
4292 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
4293
4294 * doc/bison.texinfo (Generalized LR Parsing): New section.
4295 (GLR Parsers): New section.
4296 (Language and Grammar): Mention GLR parsing.
4297 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
4298 Correct typo ("tge" -> "the").
4299
4300 * data/bison.glr: New skeleton for GLR parsing.
4301
4302 * tests/cxx-gram.at: New tests for GLR parsing.
4303
4304 * tests/testsuite.at: Include cxx-gram.at.
4305
4306 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 4307
676385e2
PH
4308 * src/parse-gram.y:
4309
4310 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
4311
4312 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 4313
b5480d74 43142002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
4315
4316 * src/options.h, src/options.c: Remove.
4317 * src/getargs.c (short_options, long_options): New.
4318
60491a94
AD
43192002-06-27 Akim Demaille <akim@epita.fr>
4320
4321 * data/bison.simple, data/bison.c++: Rename as...
4322 * data/yacc.c, data/lalr1.cc: these.
4323 * doc/bison.texinfo (Environment Variables): Remove.
4324
9be0c25b
AD
43252002-06-25 Raja R Harinath <harinath@cs.umn.edu>
4326
4327 * src/getargs.c (report_argmatch): Initialize strtok().
4328
1ae72863
AD
43292002-06-20 Akim Demaille <akim@epita.fr>
4330
4331 * data/bison.simple (b4_symbol_actions): New, replaces...
4332 (b4_symbol_destructor, b4_symbol_printer): these.
4333 (yysymprint): Be sure to call YYPRINT only for tokens, and using
4334 user token numbers.
4335
87542d29
AD
43362002-06-20 Akim Demaille <akim@epita.fr>
4337
4338 * data/bison.simple (yydestructor): Rename as...
4339 (yydestruct): this.
4340
1a31ed21
AD
43412002-06-20 Akim Demaille <akim@epita.fr>
4342
4343 * src/symtab.h, src/symtab.c (symbol_type_set)
4344 (symbol_destructor_set, symbol_precedence_set): The location is
4345 the last argument.
4346 Adjust all callers.
4347
e776192e
AD
43482002-06-20 Akim Demaille <akim@epita.fr>
4349
4350 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
4351 internals.
4352 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
4353 Takes a location.
4354 * src/symtab.h, src/symtab.c (symbol_class_set)
4355 (symbol_user_token_number_set): Likewise.
4356 Adjust all callers.
4357 Promote complain_at.
4358 * tests/input.at (Type Clashes): Adjust.
4359
5c1180b3
AD
43602002-06-20 Akim Demaille <akim@epita.fr>
4361
4362 * data/bison.simple (YYLEX): Fix the declaration when
4363 %pure-parser.
4364
e3170060
AD
43652002-06-20 Akim Demaille <akim@epita.fr>
4366
4367 * data/bison.simple (yysymprint): Don't print the token number,
4368 just its name.
4369 * tests/actions.at (Destructors): Rename as...
4370 (Printers and Destructors): this.
4371 Also exercise %printer.
4372
253862fd
AD
43732002-06-20 Akim Demaille <akim@epita.fr>
4374
4375 * data/bison.simple (YYDSYMPRINT): New.
4376 Use it to remove many of the #if YYDEBUG/if (yydebug).
4377
366eea36
AD
43782002-06-20 Akim Demaille <akim@epita.fr>
4379
4380 * src/symtab.h, src/symtab.c (symbol_t): printer and
4381 printer_location are new members.
4382 (symbol_printer_set): New.
4383 * src/parse-gram.y (PERCENT_PRINTER): New token.
4384 Handle its associated rule.
4385 * src/scan-gram.l: Adjust.
4386 (handle_destructor_at, handle_destructor_dollar): Rename as...
4387 (handle_symbol_code_at, handle_symbol_code_dollar): these.
4388 * src/output.c (symbol_printers_output): New.
4389 (output_skeleton): Call it.
4390 * data/bison.simple (yysymprint): New. Cannot be named yyprint
4391 since there are already many grammar files with a user `yyprint'.
4392 Replace the calls to YYPRINT to calls to yysymprint.
4393 * tests/calc.at: Adjust.
4394 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
4395 taking advantage of parser very internal details (stack size!).
4396
4f25ebb0
AD
43972002-06-20 Akim Demaille <akim@epita.fr>
4398
4399 * src/scan-gram.l: Complete the scanner with the missing patterns
4400 to pacify Flex.
4401 Use `quote' and `symbol_tag_get' where appropriate.
4402
93b68a0e
AD
44032002-06-19 Akim Demaille <akim@epita.fr>
4404
4405 * tests/actions.at (Destructors): Augment to test locations.
4406 * data/bison.simple (yydestructor): Pass it the current location
4407 if locations are enabled.
4408 Prototype only when __STDC__ or C++.
4409 Change the argument names to move into the yy name space: there is
4410 user code here.
4411
58612f1d
AD
44122002-06-19 Akim Demaille <akim@epita.fr>
4413
74310291
AD
4414 * data/bison.simple (b4_pure_if): New.
4415 Use it instead of #ifdef YYPURE.
4416
44172002-06-19 Akim Demaille <akim@epita.fr>
4418
4419 * data/bison.simple (b4_location_if): New.
58612f1d
AD
4420 Use it instead of #ifdef YYLSP_NEEDED.
4421
f25bfb75
AD
44222002-06-19 Akim Demaille <akim@epita.fr>
4423
4424 Prepare @$ in %destructor, but currently don't bind it in the
4425 skeleton, as %location use is not cleaned up yet.
4426
4427 * src/scan-gram.l (handle_dollar, handle_destructor_at)
4428 (handle_action_at): New.
4429 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
4430 a braced_code_t and a location as additional arguments.
4431 (handle_destructor_dollar): Instead of requiring `b4_eval', just
4432 unquote one when outputting `b4_dollar_dollar'.
4433 Adjust callers.
4434 * data/bison.simple (b4_eval): Remove.
4435 (b4_symbol_destructor): Adjust.
4436 * tests/input.at (Invalid @n): Adjust.
4437
c732d2c6
AD
44382002-06-19 Zack Weinberg <zack@codesourcery.com>
4439
4440 * doc/bison.texinfo: Document ability to have multiple
4441 prologue sections.
4442
8c165d89
AD
44432002-06-18 Akim Demaille <akim@epita.fr>
4444
4445 * src/files.c (compute_base_names): When computing the output file
4446 names from the input file name, strip the directory part.
4447
ca98bf57
AD
44482002-06-18 Akim Demaille <akim@epita.fr>
4449
4450 * data/bison.simple.new: Comment changes.
4451 Reported by Andreas Schwab.
4452
0bfb02ff
AD
44532002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
4454
4455 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
4456 there are no `label `yyoverflowlab' defined but not used' warnings
4457 when yyoverflow is defined.
4458
24c0aad7
AD
44592002-06-18 Akim Demaille <akim@epita.fr>
4460
4461 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
4462 new member.
4463 (symbol_destructor_set): Adjust.
4464 * src/output.c (symbol_destructors_output): Output the destructor
4465 locations.
4466 Output the symbol name.
4467 * data/bison.simple (b4_symbol_destructor): Adjust.
4468
5719c109
AD
44692002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
4470 and Akim Demaille <akim@epita.fr>
4471
4472 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
4473 what's left on the stack when the error recovery hits EOF.
4474 * tests/actions.at (Destructors): Complete to exercise this case.
4475
9280d3ef
AD
44762002-06-17 Akim Demaille <akim@epita.fr>
4477
4478 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
4479 arguments is really empty, not only equal to `[]'.
4480 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
4481 member.
4482 (symbol_destructor_set): New.
4483 * src/output.c (symbol_destructors_output): New.
4484 * src/reader.h (brace_code_t, current_braced_code): New.
4485 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
4486 (handle_dollar): Rename as...
4487 (handle_action_dollar): this.
4488 (handle_destructor_dollar): New.
4489 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
4490 (grammar_declaration): Use it.
4491 * data/bison.simple (yystos): Is always defined.
4492 (yydestructor): New.
4493 * tests/actions.at (Destructors): New.
4494 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
4495
dafdc66f
AD
44962002-06-17 Akim Demaille <akim@epita.fr>
4497
4498 * src/symlist.h, src/symlist.c (symbol_list_length): New.
4499 * src/scan-gram.l (handle_dollar, handle_at): Compute the
4500 rule_length only when needed.
4501 * src/output.c (actions_output, token_definitions_output): Output
4502 the full M4 block.
4503 * src/symtab.c: Don't access directly to the symbol tag, use
4504 symbol_tag_get.
4505 * src/parse-gram.y: Use symbol_list_free.
4506
56c47203
AD
45072002-06-17 Akim Demaille <akim@epita.fr>
4508
4509 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
4510 (symbol_list_prepend, get_type_name): Move to...
4511 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
4512 (symbol_list_prepend, symbol_list_n_type_name_get): here.
4513 Adjust all callers.
4514 (symbol_list_free): New.
4515 * src/scan-gram.l (handle_dollar): Takes a location.
4516 * tests/input.at (Invalid $n): Adjust.
4517
1e0bab92
AD
45182002-06-17 Akim Demaille <akim@epita.fr>
4519
4520 * src/reader.h, src/reader.c (symbol_list_new): Export it.
4521 (symbol_list_prepend): New.
4522 * src/parse-gram.y (%union): `list' is a new member.
4523 (symbols.1): New, replaces...
4524 (terms_to_prec.1, nterms_to_type.1): these.
4525 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
4526 Take a location as additional argument.
4527 Adjust all callers.
4528
04e60654
AD
45292002-06-15 Akim Demaille <akim@epita.fr>
4530
4531 * src/parse-gram.y: Move %token in the declaration section so that
4532 we don't depend upon CVS Bison.
4533
10e5b8bd
AD
45342002-06-15 Akim Demaille <akim@epita.fr>
4535
4536 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
4537 * src/print.c (print_core): Use it.
4538
9801d40c
AD
45392002-06-15 Akim Demaille <akim@epita.fr>
4540
4541 * src/conflicts.c (log_resolution): Accept the rule involved in
4542 the sr conflicts instead of the lookahead number that points to
4543 that rule.
4544 (flush_reduce): Accept the current lookahead vector as argument,
4545 instead of the index in LA.
4546 (resolve_sr_conflict): Accept the current number of lookahead
4547 bitset to consider for the STATE, instead of the index in LA.
4548 (set_conflicts): Adjust.
4549 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
4550
c0263492
AD
45512002-06-15 Akim Demaille <akim@epita.fr>
4552
4553 * src/state.h (state_t): Replace the `lookaheadsp' member, a
4554 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
4555 Adjust all dependencies.
4556 * src/lalr.c (initialize_lookaheads): Split into...
4557 (states_lookaheads_count, states_lookaheads_initialize): these.
4558 (lalr): Adjust.
4559
9757c359
AD
45602002-06-15 Akim Demaille <akim@epita.fr>
4561
4562 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
4563 out of...
4564 (grammar_rules_print): here.
4565 * src/reduce.c (reduce_output): Use it.
4566 * tests/reduce.at (Useless Rules, Reduced Automaton)
4567 (Underivable Rules): Adjust.
4568
6b98e4b5
AD
45692002-06-15 Akim Demaille <akim@epita.fr>
4570
4571 Copy BYacc's nice way to report the grammar.
4572
4573 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
4574 New.
4575 Don't print the rules' location, it is confusing and useless.
4576 (rule_print): Use grammar_rhs_print.
4577 * src/print.c (print_grammar): Use grammar_rules_print.
4578
6b98e4b5
AD
45792002-06-15 Akim Demaille <akim@epita.fr>
4580
4581 Complete and rationalize `useless thing' warnings.
4582
4583 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
4584 (symbol_tag_print): New.
4585 Use them everywhere in place of accessing directly the tag member.
4586 * src/gram.h, src/gram.c (rule_print): New.
4587 Use it where a rule used to be printed `by hand'.
4588 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
4589 (reduce_grammar_tables): Report the useless rules.
4590 (reduce_print): Useless things are a warning, not an error.
4591 Report it as such.
4592 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4593 (Reduced Automaton, Underivable Rules): Adjust.
4594 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4595 * tests/conflicts.at (Unresolved SR Conflicts)
4596 (Solved SR Conflicts): Adjust.
4597
ee000ba4
AD
45982002-06-15 Akim Demaille <akim@epita.fr>
4599
4600 Let symbols have a location.
4601
4602 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4603 (getsym): Adjust.
4604 Adjust all callers.
4605 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4606 Use location_t, not int.
4607 * src/symtab.c (symbol_check_defined): Take advantage of the
4608 location.
4609 * tests/regression.at (Invalid inputs): Adjust.
4610
8efe435c
AD
46112002-06-15 Akim Demaille <akim@epita.fr>
4612
4613 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4614 (input): Don't try to initialize yylloc here, do it in the
4615 scanner.
4616 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4617 * src/gram.h (rule_t): Change line and action_line into location
4618 and action_location, of location_t type.
4619 Adjust all dependencies.
4620 * src/location.h, src/location.c (empty_location): New.
4621 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4622 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4623 (grammar_current_rule_symbol_append)
4624 (grammar_current_rule_action_append): Expect a location as argument.
4625 * src/reader.c (grammar_midrule_action): Adjust to attach an
4626 action's location as dummy symbol location.
4627 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4628 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4629 the line numbers.
4630
1921f1d7
AD
46312002-06-14 Akim Demaille <akim@epita.fr>
4632
4633 Grammar declarations may be found in the grammar section.
4634
4635 * src/parse-gram.y (rules_or_grammar_declaration): New.
4636 (declarations): Each declaration may end with a semicolon, not
4637 just...
4638 (grammar_declaration): `"%union"'.
4639 (grammar): Branch to rules_or_grammar_declaration.
4640
4515534c
AD
46412002-06-14 Akim Demaille <akim@epita.fr>
4642
4643 * src/main.c (main): Invoke scanner_free.
4644
f958596b
AD
46452002-06-14 Akim Demaille <akim@epita.fr>
4646
4647 * src/output.c (m4_invoke): Extracted from...
4648 (output_skeleton): here.
4649 Free tempfile.
4650
2c569025
AD
46512002-06-14 Akim Demaille <akim@epita.fr>
4652
4653 * src/parse-gram.y (directives, directive, gram)
4654 (grammar_directives, precedence_directives, precedence_directive):
4655 Rename as...
4656 (declarations, declaration, grammar, grammar_declaration)
4657 (precedence_declaration, precedence_declarator): these.
4658 (symbol_declaration): New.
4659
592e8d4d
AD
46602002-06-14 Akim Demaille <akim@epita.fr>
4661
4662 * src/files.c (action_obstack): Remove, unused.
4663 (output_obstack): Remove it, and all its dependencies, as it is no
4664 longer needed.
4665 * src/reader.c (epilogue_set): Build the epilogue in the
4666 muscle_obstack.
4667 * src/output.h, src/output.c (muscle_obstack): Move to...
4668 * src/muscle_tab.h, src/muscle_tab.h: here.
4669 (muscle_init): Initialize muscle_obstack.
4670 (muscle_free): New.
4671 * src/main.c (main): Call it.
4672
0c15323d
AD
46732002-06-14 Akim Demaille <akim@epita.fr>
4674
4675 * src/location.h: New, extracted from...
4676 * src/reader.h: here.
4677 * src/Makefile.am (noinst_HEADERS): Merge into
4678 (bison_SOURCES): this.
4679 Add location.h.
4680 * src/parse-gram.y: Use location_t instead of Bison's.
4681 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4682 Use location_t instead of ints.
4683
e96c9728
AD
46842002-06-14 Akim Demaille <akim@epita.fr>
4685
4686 * data/bison.simple, data/bison.c++: Be sure to restore the
4687 current #line when returning to the skeleton contents after having
4688 exposed the input file's #line.
4689
75d1fe16
AD
46902002-06-12 Akim Demaille <akim@epita.fr>
4691
4692 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4693 eager.
4694 * tests/actions.at (Exotic Dollars): New.
4695
6c35d22c
AD
46962002-06-12 Akim Demaille <akim@epita.fr>
4697
4698 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4699 ['"/] too eagerly.
4700 * tests/input.at (Torturing the Scanner): New.
4701
1d6412ad
AD
47022002-06-11 Akim Demaille <akim@epita.fr>
4703
4704 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4705 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4706 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4707 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4708 * src/reader.c (reader): Use it.
4709
4cdb01db
AD
47102002-06-11 Akim Demaille <akim@epita.fr>
4711
4712 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4713 Adjust all callers.
4714 (scanner_last_string_free): New.
4715
44995b2e
AD
47162002-06-11 Akim Demaille <akim@epita.fr>
4717
4718 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4719 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4720 (last_string, YY_OBS_FREE): New.
4721 Use them when returning an ID.
4722
e9955c83
AD
47232002-06-11 Akim Demaille <akim@epita.fr>
4724
4725 Have Bison grammars parsed by a Bison grammar.
4726
4727 * src/reader.c, src/reader.h (prologue_augment): New.
4728 * src/reader.c (copy_definition): Remove.
4729
4730 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4731 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4732 (grammar_current_rule_prec_set, grammar_current_rule_check)
4733 (grammar_current_rule_symbol_append)
4734 (grammar_current_rule_action_append): Export.
4735 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4736 (symbol_list_action_append): Remove.
4737 Hook the routines from reader.
4738 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4739 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4740
4741 * src/reader.c (read_declarations): Remove, unused.
4742
4743 * src/parse-gram.y: Handle the epilogue.
4744 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4745 (grammar_start_symbol_set): this.
4746 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4747 * src/reader.c (readgram): Remove, unused.
4748 (reader): Adjust to insert eoftoken and axiom where appropriate.
4749
4750 * src/reader.c (copy_dollar): Replace with...
4751 * src/scan-gram.h (handle_dollar): this.
4752 * src/parse-gram.y: Remove `%thong'.
4753
4754 * src/reader.c (copy_at): Replace with...
4755 * src/scan-gram.h (handle_at): this.
4756
4757 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4758 New.
4759
4760 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4761 time being.
4762
4763 * src/reader.h, src/reader.c (grammar_rule_end): New.
4764
4765 * src/parse.y (current_type, current_class): New.
4766 Implement `%nterm', `%token' support.
4767 Merge `%term' into `%token'.
4768 (string_as_id): New.
4769 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4770 type name.
4771
4772 * src/parse-gram.y: Be sure to handle properly the beginning of
4773 rules.
4774
4775 * src/parse-gram.y: Handle %type.
4776 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4777
4778 * src/parse-gram.y: More directives support.
4779 * src/options.c: No longer handle source directives.
4780
4781 * src/parse-gram.y: Fix %output.
4782
4783 * src/parse-gram.y: Handle %union.
4784 Use the prologue locations.
4785 * src/reader.c (parse_union_decl): Remove.
4786
4787 * src/reader.h, src/reader.c (epilogue_set): New.
4788 * src/parse-gram.y: Use it.
4789
4790 * data/bison.simple, data/bison.c++: b4_stype is now either not
4791 defined, then default to int, or to the contents of %union,
4792 without `union' itself.
4793 Adjust.
4794 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4795
4796 * src/output.c (actions_output): Don't output braces, as they are
4797 already handled by the scanner.
4798
4799 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4800 characters to themselves.
4801
4802 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4803 that the epilogue has a proper #line.
4804
4805 * src/parse-gram.y: Handle precedence/associativity.
4806
4807 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4808 a terminal.
4809 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4810 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4811 at all to define terminals that cannot be emitted.
4812
4813 * src/scan-gram.l: Escape M4 characters.
4814
4815 * src/scan-gram.l: Working properly with escapes in user
4816 strings/characters.
4817
4818 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4819 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4820 grammar.
4821 Use more modest sizes, as for the time being the parser does not
4822 release memory, and therefore the process swallows a huge amount
4823 of memory.
4824
4825 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4826 stricter %token grammar.
4827
4828 * src/symtab.h (associativity): Add `undef_assoc'.
4829 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4830 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4831
4832 * tests/regression.at (Invalid %directive): Remove, as it is now
4833 meaningless.
4834 (Invalid inputs): Adjust to the new error messages.
4835 (Token definitions): The new grammar doesn't allow too many
4836 eccentricities.
4837
4838 * src/lex.h, src/lex.c: Remove.
4839 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4840 (copy_character, copy_string2, copy_string, copy_identifier)
4841 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4842 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4843 (parse_action): Remove.
4844 * po/POTFILES.in: Adjust.
4845
2e047461
AD
48462002-06-11 Akim Demaille <akim@epita.fr>
4847
cd05d13c 4848 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
4849 rule's action member: return the action as a string.
4850 Don't require `rule_length' as an argument: compute it.
4851 (grammar_current_rule_symbol_append)
4852 (grammar_current_rule_action_append): New, eved out from
4853 (readgram): here.
4854 Remove `action_flag', `rulelength', unused now.
4855
9af3fbce
AD
48562002-06-11 Akim Demaille <akim@epita.fr>
4857
4858 * src/reader.c (grammar_current_rule_prec_set).
4859 (grammar_current_rule_check): New, eved out from...
4860 (readgram): here.
4861 Remove `xaction', `first_rhs': useless.
4862 * tests/input.at (Type clashes): New.
4863 * tests/existing.at (GNU Cim Grammar): Adjust.
4864
1485e106
AD
48652002-06-11 Akim Demaille <akim@epita.fr>
4866
4867 * src/reader.c (grammar_midrule_action): New, Eved out from
4868 (readgram): here.
4869
da4160c3
AD
48702002-06-11 Akim Demaille <akim@epita.fr>
4871
4872 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4873 New.
4874 (readgram): Use them as replacement of inlined code, crule and
4875 crule1.
4876
f6d0f937
AD
48772002-06-11 Akim Demaille <akim@epita.fr>
4878
4879 * src/reader.c (grammar_end, grammar_symbol_append): New.
4880 (readgram): Use them.
4881 Make the use of `p' as local as possible.
4882
69078d4b
AD
48832002-06-10 Akim Demaille <akim@epita.fr>
4884
4885 GCJ's parser requires the tokens to be defined before the prologue.
4886
4887 * data/bison.simple: Output the token definition before the user's
4888 prologue.
4889 * tests/regression.at (Braces parsing, Duplicate string)
4890 (Mixing %token styles): Check the output from bison.
4891 (Early token definitions): New.
4892
5e424082
AD
48932002-06-10 Akim Demaille <akim@epita.fr>
4894
4895 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4896 assigning twice the same user number to a token, so that we can
4897 use it in...
4898 * src/lex.c (lex): here.
4899 Also use `symbol_class_set' instead of hand written code.
4900 * src/reader.c (parse_assoc_decl): Likewise.
4901
44536b35
AD
49022002-06-10 Akim Demaille <akim@epita.fr>
4903
4904 * src/symtab.c, src/symtab.c (symbol_class_set)
4905 (symbol_user_token_number_set): New.
4906 * src/reader.c (parse_token_decl): Use them.
4907 Use a switch instead of ifs.
4908 Use a single argument.
4909
8b9f2372
AD
49102002-06-10 Akim Demaille <akim@epita.fr>
4911
4912 Remove `%thong' support as it is undocumented, unused, duplicates
4913 `%token's job, and creates useless e-mail traffic with people who
4914 want to know what it is, why it is undocumented, unused, and
4915 duplicates `%token's job.
4916
4917 * src/reader.c (parse_thong_decl): Remove.
4918 * src/options.c (option_table): Remove "thong".
4919 * src/lex.h (tok_thong): Remove.
4920
3ae2b51f
AD
49212002-06-10 Akim Demaille <akim@epita.fr>
4922
4923 * src/symtab.c, src/symtab.c (symbol_type_set)
4924 (symbol_precedence_set): New.
4925 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4926 (value_components_used): Remove, unused.
4927
2f1afb73
AD
49282002-06-09 Akim Demaille <akim@epita.fr>
4929
4930 Move symbols handling code out of the reader.
4931
4932 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4933 (axiom): Move to...
4934 * src/symtab.h, src/symtab.c: here.
4935
4936 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4937 * src/reader.c (startval): Rename as...
4938 * src/symtab.h, src/symtab.c (startsymbol): this.
4939 * src/reader.c: Adjust.
4940
4941 * src/reader.c (symbol_check_defined, symbol_make_alias)
4942 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4943 (token_translations_init)
4944 Move to...
4945 * src/symtab.c: here.
4946 * src/reader.c (packsymbols): Move to...
4947 * src/symtab.h, src/symtab.c (symbols_pack): here.
4948 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4949 argument.
4950
e9bca3ad
AD
49512002-06-03 Akim Demaille <akim@epita.fr>
4952
4953 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4954 then statements.
4955
86eff183
AD
49562002-06-03 Akim Demaille <akim@epita.fr>
4957
4958 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4959 structs with non literals.
4960 * src/scan-skel.l: never-interactive.
4961 * src/conflicts.c (enum conflict_resolution_e): No trailing
4962 comma.
4963 * src/getargs.c (usage): Split long literal strings.
4964 Reported by Hans Aberg.
4965
717be197
AD
49662002-05-28 Akim Demaille <akim@epita.fr>
4967
4968 * data/bison.c++: Use C++ ostreams.
4969 (cdebug_): New member.
4970
670ddffd
AD
49712002-05-28 Akim Demaille <akim@epita.fr>
4972
4973 * src/output.c (output_skeleton): Be sure to allocate enough room
4974 for `/' _and_ for `\0' in full_skeleton.
4975
769b430f
AD
49762002-05-28 Akim Demaille <akim@epita.fr>
4977
4978 * data/bison.c++: Catch up with bison.simple:
4979 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4980 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4981 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4982 and popping traces.
4983
7067cb36
PH
49842002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4985
4986 * src/output.c (output_skeleton): Put an explicit path in front of
4987 the skeleton file name, rather than relying on the -I directory,
4988 to partially alleviate effects of having a skeleton file lying around
4989 in the current directory.
769b430f 4990
4a713ec2
PH
49912002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4992
769b430f 4993 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
4994 obstack_printf should be obstack_fgrow1.
4995
b408954b
AD
49962002-05-26 Akim Demaille <akim@epita.fr>
4997
4998 * src/state.h (state_t): `solved_conflicts' is a new member.
4999 * src/LR0.c (new_state): Set it to 0.
5000 * src/conflicts.h, src/conflicts.c (print_conflicts)
5001 (free_conflicts, solve_conflicts): Rename as...
5002 (conflicts_print, conflicts_free, conflicts_solve): these.
5003 Adjust callers.
5004 * src/conflicts.c (enum conflict_resolution_e)
5005 (solved_conflicts_obstack): New, used by...
5006 (log_resolution): this.
5007 Adjust to attach the conflict resolution to each state.
5008 Complete the description with the precedence/associativity
5009 information.
5010 (resolve_sr_conflict): Adjust.
5011 * src/print.c (print_state): Output its solved_conflicts.
5012 * tests/conflicts.at (Unresolved SR Conflicts)
5013 (Solved SR Conflicts): Exercise --report=all.
5014
a49aecd5
AD
50152002-05-26 Akim Demaille <akim@epita.fr>
5016
5017 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5018 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5019 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
5020 (token_number_t, item_number_as_token_number)
5021 (token_number_as_item_number, muscle_insert_token_number_table):
5022 Rename as...
5023 (symbol_number_t, item_number_as_symbol_number)
5024 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
5025 these, since it is more appropriate.
5026
5504898e
AD
50272002-05-26 Akim Demaille <akim@epita.fr>
5028
5029 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
5030 `Error:' lines.
5031 * data/bison.simple (yystos) [YYDEBUG]: New.
5032 (yyparse) [YYDEBUG]: Display the symbols which are popped during
5033 error recovery.
5034 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
5035
ec3bc396
AD
50362002-05-25 Akim Demaille <akim@epita.fr>
5037
5038 * doc/bison.texinfo (Debugging): Split into...
5039 (Tracing): this new section, its former contents, and...
5040 (Understanding): this new section.
5041 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
5042 by...
5043 (report_flag): this.
5044 Adjust all dependencies.
5045 (report_args, report_types, report_argmatch): New.
5046 (usage, getargs): Report/support -r, --report.
5047 * src/options.h
5048 (struct option_table_struct): Rename as..,
5049 (struct option_table_s): this.
5050 Rename the `set_flag' member to `flag' to match with getopt_long's
5051 struct.
5052 * src/options.c (option_table): Split verbose into an entry for
5053 %verbose, and another for --verbose.
5054 Support --report/-r, so remove -r from the obsolete --raw.
5055 * src/print.c: Attach full item sets and lookaheads reports to
5056 report_flag instead of trace_flag.
5057 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5058
78df8250
PE
50592002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5060 and Paul Eggert <eggert@twinsun.com>
769b430f 5061
78df8250
PE
5062 * data/bison.simple (yyparse): Correct error handling to conform to
5063 POSIX and yacc. Specifically, after syntax error is discovered,
5064 do not reduce further before shifting the error token.
5065 Clean up the code a bit by removing the labels yyerrdefault,
5066 yyerrhandle, yyerrpop.
5067 * NEWS: Document the above.
5068
c0c9ea05
PH
50692002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5070
5071 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5072 type; it isn't always big enough, since it doesn't necessarily
5073 include non-terminals.
769b430f 5074 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
5075 the latter can be removed.
5076 (yy_token_number_type): Remove, only one use.
5077 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5078 don't use TokenNumberType as element type.
769b430f 5079
c0c9ea05
PH
5080 * tests/regression.at: Modify expected output to agree with change
5081 to yyr1 and yytranslate.
769b430f 5082
6390a83f
FK
50832002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5084
5085 * src/reader.c (parse_action): Use copy_character instead of
5086 obstack_1grow.
5087
db7c8e9a
AD
50882002-05-13 Akim Demaille <akim@epita.fr>
5089
5090 * tests/regression.at (Token definitions): Prototype yylex and
5091 yyerror.
5092
fcc61800
PH
50932002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5094
158c687b 5095 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
5096 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5097 32-bit arithmetic.
5098 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5099
5683e9b2
AD
51002002-05-07 Akim Demaille <akim@epita.fr>
5101
5102 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5103 avoid GCC warnings.
5104
0c2d3f4c
AD
51052002-05-07 Akim Demaille <akim@epita.fr>
5106
5107 Kill GCC warnings.
5108
5109 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5110 over the RHS of each rule.
5111 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5112 * src/state.h (state_t): Member `nitems' is unsigned short.
5113 * src/LR0.c (get_state): Adjust.
5114 * src/reader.c (packgram): Likewise.
5115 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5116 `Type'.
5117 (muscle_insert_int_table): Remove, unused.
5118 (prepare_rules): Remove `max'.
5119
1565b720
AD
51202002-05-06 Akim Demaille <akim@epita.fr>
5121
5122 * src/closure.c (print_firsts): Display of the symbol tags.
5123 (bitmatrix_print): Move to...
5124 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5125 here.
5126 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5127
cfaee611
AD
51282002-05-06 Akim Demaille <akim@epita.fr>
5129
5130 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5131 hash_do_for_each.
5132
458be8e0
AD
51332002-05-06 Akim Demaille <akim@epita.fr>
5134
5135 * src/LR0.c (new_state, get_state): Instead of using the global
5136 `kernel_size' and `kernel_base', have two new arguments:
5137 `core_size' and `core'.
5138 Adjust callers.
5139
a900a624
AD
51402002-05-06 Akim Demaille <akim@epita.fr>
5141
5142 * src/reader.c (packgram): No longer end `ritem' with a 0
5143 sentinel: it is not used.
5144
d4e7d3a1
AD
51452002-05-05 Akim Demaille <akim@epita.fr>
5146
5147 New experimental feature: display the lookaheads in the report and
5148 graph.
5149
5150 * src/print (print_core): When --trace-flag, display the rules
5151 lookaheads.
5152 * src/print_graph.c (print_core): Likewise.
5153 Swap the arguments.
5154 Adjust caller.
5155
39ceb25b
AD
51562002-05-05 Akim Demaille <akim@epita.fr>
5157
5158 * tests/torture.at (Many lookaheads): New test.
5159
5372019f
AD
51602002-05-05 Akim Demaille <akim@epita.fr>
5161
5162 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
5163 (GENERATE_MUSCLE_INSERT_TABLE): this.
5164 (output_int_table, output_unsigned_int_table, output_short_table)
5165 (output_token_number_table, output_item_number_table): Replace with...
5166 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
5167 (muscle_insert_short_table, muscle_insert_token_number_table)
5168 (muscle_insert_item_number_table): these.
5169 Adjust all callers.
5170 (prepare_tokens): Don't free `translations', since...
5171 * src/reader.h, src/reader.c (grammar_free): do it.
5172 Move to...
5173 * src/gram.h, src/gram.c (grammar_free): here.
5174 * data/bison.simple, data/bison.c++: b4_token_number_max is now
5175 b4_translate_max.
5176
5df5f6d5
AD
51772002-05-05 Akim Demaille <akim@epita.fr>
5178
5179 * src/output.c (output_unsigned_int_table): New.
5180 (prepare_rules): `i' is unsigned.
5181 `prhs', `rline', `r2' are unsigned int.
5182 Rename muscle `rhs_number_max' as `rhs_max'.
5183 Output muscles `prhs_max', `rline_max', and `r2_max'.
5184 Free rline and r1.
5185 * data/bison.simple, data/bison.c++: Adjust to use these muscles
5186 to compute types instead of constant types.
5187 * tests/regression.at (Web2c Actions): Adjust.
5188
b87f8b21
AD
51892002-05-04 Akim Demaille <akim@epita.fr>
5190
5191 * src/symtab.h (SALIAS, SUNDEF): Rename as...
5192 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
5193 Adjust dependencies.
5194 * src/output.c (token_definitions_output): Be sure not to output a
5195 `#define 'a'' when fed with `%token 'a' "a"'.
5196 * tests/regression.at (Token definitions): New.
5197
8bb936e4
PE
51982002-05-03 Paul Eggert <eggert@twinsun.com>
5199
5200 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
5201 for K&R C.
5202
52032002-05-03 gettextize <bug-gnu-gettext@gnu.org>
5204
5205 * Makefile.am (SUBDIRS): Remove intl.
5206 (EXTRA_DIST): Add config/config.rpath.
5207
53c71a12
AD
52082002-05-03 Akim Demaille <akim@epita.fr>
5209
5210 * data/bison.simple (m4_if): Don't output empty enums.
5211 And actually, output valid enum definitions :(.
5212
289dd0cf
AD
52132002-05-03 Akim Demaille <akim@epita.fr>
5214
5215 * configure.bat: Remove, completely obsolete.
5216 * Makefile.am (EXTRA_DIST): Adjust.
5217 Don't distribute config.rpath...
5218 * config/Makefile.am (EXTRA_DIST): Do it.
5219
db85e524
AD
52202002-05-03 Akim Demaille <akim@epita.fr>
5221
5222 * configure.in (GETTEXT_VERSION): New.
5223 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
5224
83ccf991
AD
52252002-05-03 Akim Demaille <akim@epita.fr>
5226
5227 * data/bison.simple (b4_token_enum): New.
5228 (b4_token_defines): Use it to output tokens both as #define and
5229 enums.
5230 Suggested by Paul Eggert.
5231 * src/output.c (token_definitions_output): Don't output spurious
5232 white spaces.
5233
1f418995
AD
52342002-05-03 Akim Demaille <akim@epita.fr>
5235
5236 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5237
45119f04
RA
52382002-05-02 Robert Anisko <robert@lrde.epita.fr>
5239
5240 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
5241 Update the stack class, give a try to deque as the default container.
5242
b2d52318
AD
52432002-05-02 Akim Demaille <akim@epita.fr>
5244
5245 * data/bison.simple (yyparse): Do not implement @$ = @1.
5246 (YYLLOC_DEFAULT): Adjust to do it.
5247 * doc/bison.texinfo (Location Default Action): Fix.
5248
3a8b4109
AD
52492002-05-02 Akim Demaille <akim@epita.fr>
5250
5251 * src/reader.c (parse_braces): Merge into...
5252 (parse_action): this.
5253
84614e13
AD
52542002-05-02 Akim Demaille <akim@epita.fr>
5255
5256 * configure.in (ALL_LINGUAS): Remove.
5257 * po/LINGUAS, hr.po: New.
5258
fdbcd8e2
AD
52592002-05-02 Akim Demaille <akim@epita.fr>
5260
5261 Remove the so called hairy (semantic) parsers.
5262
5263 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
5264 * src/gram.h, src/gram.c (semantic_parser): Remove.
5265 (rule_t): Remove the guard and guard_line members.
5266 * src/lex.h (token_t): remove tok_guard.
5267 * src/options.c (option_table): Remove %guard and %semantic_parser
5268 support.
5269 * src/output.c, src/output.h (guards_output): Remove.
5270 (prepare): Adjust.
5271 (token_definitions_output): Don't output the `T'
5272 tokens (???).
5273 (output_skeleton): Don't output the guards.
5274 * src/files.c, src/files.c (attrsfile): Remove.
5275 * src/reader.c (symbol_list): Remove the guard and guard_line
5276 members.
5277 Adjust dependencies.
5278 (parse_guard): Remove.
5279 * data/bison.hairy: Remove.
5280 * doc/bison.texinfo (Environment Variables): Remove occurrences of
5281 BISON_HAIRY.
5282
82b6cb3f
AD
52832002-05-02 Akim Demaille <akim@epita.fr>
5284
5285 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
5286 (parse_guard): Rename the formal argument `stack_offset' as
5287 `rule_length', which is more readable.
5288 Adjust callers.
5289 (copy_at, copy_dollar): Instead of outputting the hard coded
5290 values of $$, $n and so forth, output invocation to b4_lhs_value,
5291 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
5292 Note: this patch partially drops `semantic-parser' support: it
5293 always does `rule_length - n', where semantic parsers ought to
5294 always use `-n'.
82b6cb3f
AD
5295 * data/bison.simple, data/bison.c++ (b4_lhs_value)
5296 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
5297
6cbfbcc5
AD
52982002-05-02 Akim Demaille <akim@epita.fr>
5299
5300 * configure.in (AC_INIT): Bump to 1.49b.
5301 (AM_INIT_AUTOMAKE): Short invocation.
5302
b8548114
AD
53032002-05-02 Akim Demaille <akim@epita.fr>
5304
5305 Version 1.49a.
5306
c20cd1fa
AD
53072002-05-01 Akim Demaille <akim@epita.fr>
5308
5309 * src/skeleton.h: Remove.
5310
8a9566d4
AD
53112002-05-01 Akim Demaille <akim@epita.fr>
5312
5313 * src/skeleton.h: Fix the #endif.
5314 Reported by Magnus Fromreide.
5315
8c6d399a
PE
53162002-04-26 Paul Eggert <eggert@twinsun.com>
5317
5318 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
5319 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 5320 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 5321
2b7ed18a
RA
53222002-04-25 Robert Anisko <robert@lrde.epita.fr>
5323
5324 * src/scan-skel.l: Postprocess quadrigraphs.
5325
5326 * src/reader.c (copy_character): New function, used to output
5327 single characters while replacing `[' and `]' with quadrigraphs, to
5328 avoid troubles with M4 quotes.
5329 (copy_comment): Output characters with copy_character.
5330 (read_additionnal_code): Likewise.
5331 (copy_string2): Likewise.
5332 (copy_definition): Likewise.
5333
5334 * tests/calc.at: Exercise M4 quoting.
5335
34a89c50
AD
53362002-04-25 Akim Demaille <akim@epita.fr>
5337
5338 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
5339 between `!' and the command.
5340 Reported by Paul Eggert.
5341
0dd1580a
RA
53422002-04-24 Robert Anisko <robert@lrde.epita.fr>
5343
5344 * tests/calc.at: Exercise prologue splitting.
5345
5346 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
5347 `b4_post_prologue' instead of `b4_prologue'.
5348
5349 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
5350 muscles.
5351 (output): Free pre_prologue_obstack and post_prologue_obstack.
5352 * src/files.h, src/files.c (attrs_obstack): Remove.
5353 (pre_prologue_obstack, post_prologue_obstack): New.
5354 * src/reader.c (copy_definition): Add a parameter to specify the
5355 obstack to fill, instead of using attrs_obstack unconditionally.
5356 (read_declarations): Pass pre_prologue_obstack to copy_definition if
5357 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
5358
83c1796f
PE
53592002-04-23 Paul Eggert <eggert@twinsun.com>
5360
5361 * data/bison.simple: Remove unnecessary commentary and white
5362 space differences from 1_29-branch.
5363 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
5364
5365 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
5366 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
5367 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
5368 constructors or destructors.
5369
5370 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
5371
1207eeac
AD
53722002-04-23 Akim Demaille <akim@epita.fr>
5373
5374 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
5375 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
5376 location with columns.
5377 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
5378 All reported by Paul Eggert.
5379
78ab8f67
AD
53802002-04-22 Akim Demaille <akim@epita.fr>
5381
5382 * src/reduce.c (dump_grammar): Move to...
5383 * src/gram.h, src/gram.c (grammar_dump): here.
5384 Be sure to separate long item numbers.
5385 Don't read the members of a rule's prec if its nil.
5386
133c20e2
AD
53872002-04-22 Akim Demaille <akim@epita.fr>
5388
5389 * src/output.c (table_size, table_grow): New.
5390 (MAXTABLE): Remove, replace uses with table_size.
5391 (pack_vector): Instead of dying when the table is too big, grow it.
5392
9515e8a7
AD
53932002-04-22 Akim Demaille <akim@epita.fr>
5394
5395 * data/bison.simple (yyr1): Its type is that of a token number.
5396 * data/bison.c++ (r1_): Likewise.
5397 * tests/regression.at (Web2c Actions): Adjust.
5398
23c5a174
AD
53992002-04-22 Akim Demaille <akim@epita.fr>
5400
5401 * src/reader.c (token_translations_init): 256 is now the default
5402 value for the error token, i.e., it will be assigned another
5403 number if the user assigned 256 to one of her tokens.
5404 (reader): Don't force 256 to error.
5405 * doc/bison.texinfo (Symbols): Adjust.
5406 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
5407 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
5408 etc. instead of 10, 20, 30 (which was used to `jump' over error
5409 (256) and undefined (2)).
5410
5fbb0954
AD
54112002-04-22 Akim Demaille <akim@epita.fr>
5412
5413 Propagate more token_number_t.
5414
5415 * src/gram.h (token_number_as_item_number)
5416 (item_number_as_token_number): New.
5417 * src/output.c (GENERATE_OUTPUT_TABLE): New.
5418 Use it to create output_item_number_table and
5419 output_token_number_table.
5420 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5421 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
5422 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
5423 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
5424
4f940944
AD
54252002-04-22 Akim Demaille <akim@epita.fr>
5426
5427 * src/output.h, src/output.c (get_lines_number): Remove.
5428
3ded9a63
AD
54292002-04-19 Akim Demaille <akim@epita.fr>
5430
5431 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
5432 as Lex/Flex'.
5433 (Debugging): More details about enabling the debugging features.
5434 (Table of Symbols): Describe $$, $n, @$, and @n.
5435 Suggested by Tim Josling.
5436
e0c471a9
AD
54372002-04-19 Akim Demaille <akim@epita.fr>
5438
5439 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
5440
fecc10cd
AD
54412002-04-10 Akim Demaille <akim@epita.fr>
5442
5443 * src/system.h: Rely on HAVE_LIMITS_H.
5444 Suggested by Paul Eggert.
5445
51dec47b
AD
54462002-04-09 Akim Demaille <akim@epita.fr>
5447
5448 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
5449 full stderr, and strip it according to the bison options, instead
5450 of composing the error message from different bits.
5451 This makes it easier to check for several error messages.
5452 Adjust all the invocations.
5453 Add an invocation exercising the error token.
5454 Add an invocation demonstrating a stupid error message.
5455 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
5456 Adjust the tests.
5457 Error message are for stderr, not stdout.
5458
007a50a4
AD
54592002-04-09 Akim Demaille <akim@epita.fr>
5460
5461 * src/gram.h, src/gram.c (error_token_number): Remove, use
5462 errtoken->number.
5463 * src/reader.c (reader): Don't specify the user token number (2)
5464 for $undefined, as it uselessly prevents using it.
5465 * src/gram.h (token_number_t): Move to...
5466 * src/symtab.h: here.
5467 (state_t.number): Is a token_number_t.
5468 * src/print.c, src/reader.c: Use undeftoken->number instead of
5469 hard coded 2.
5470 (Even though this 2 is not the same as above: the number of the
5471 undeftoken remains being 2, it is its user token number which
5472 might not be 2).
5473 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
5474 `user_token_number_max'.
5475 Output `undef_token_number'.
5476 * data/bison.simple, data/bison.c++: Use them.
5477 Be sure to map invalid yylex return values to
5478 `undef_token_number'. This saves us from gratuitous SEGV.
5479
5480 * tests/conflicts.at (Solved SR Conflicts)
5481 (Unresolved SR Conflicts): Adjust.
5482 * tests/regression.at (Web2c Actions): Adjust.
5483
06446ccf
AD
54842002-04-08 Akim Demaille <akim@epita.fr>
5485
5486 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
5487 Adding #line.
5488 Remove the duplicate `typedefs'.
5489 (RhsNumberType): Fix the declaration and various other typos.
5490 Use __ofile__.
5491 * data/bison.simple: Use __ofile__.
5492 * src/scan-skel.l: Handle __ofile__.
5493
62a3e4f0
AD
54942002-04-08 Akim Demaille <akim@epita.fr>
5495
5496 * src/gram.h (item_number_t): New, the type of item numbers in
5497 RITEM. Note that it must be able to code symbol numbers as
5498 positive number, and the negation of rule numbers as negative
5499 numbers.
5500 Adjust all dependencies (pretty many).
5501 * src/reduce.c (rule): Remove this `short *' pointer: use
5502 item_number_t.
5503 * src/system.h (MINSHORT, MAXSHORT): Remove.
5504 Include `limits.h'.
5505 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
5506 (shortcpy): Remove.
5507 (MAXTABLE): Move to...
5508 * src/output.c (MAXTABLE): here.
5509 (prepare_rules): Use output_int_table to output rhs.
5510 * data/bison.simple, data/bison.c++: Adjust.
5511 * tests/torture.at (Big triangle): Move the limit from 254 to
5512 500.
5513 * tests/regression.at (Web2c Actions): Ajust.
5514
5515 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
5516 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
5517 passes, but produces negative #line number, once fixed, GCC is
5518 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
5519 C), it passes.
5520 * src/state.h (state_h): Code input lines on ints, not shorts.
5521
bb88b0fc
AD
55222002-04-08 Akim Demaille <akim@epita.fr>
5523
5524 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
5525 and then the grammar.
5526
9a636f47
AD
55272002-04-08 Akim Demaille <akim@epita.fr>
5528
5529 * src/system.h: No longer using strndup.
5530
680e8701
AD
55312002-04-07 Akim Demaille <akim@epita.fr>
5532
5533 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
5534 * src/output.c (output_table_data): Return the longest number.
5535 (prepare_tokens): Output `token_number_max').
5536 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
5537 New.
5538 Use them to define yy_token_number_type/TokenNumberType.
5539 Use this type for yytranslate.
5540 * tests/torture.at (Big triangle): Push the limit from 124 to
5541 253.
5542 * tests/regression.at (Web2c Actions): Adjust.
5543
817e9f41
AD
55442002-04-07 Akim Demaille <akim@epita.fr>
5545
5546 * tests/torture.at (Big triangle): New.
5547 (GNU AWK Grammar, GNU Cim Grammar): Move to...
5548 * tests/existing.at: here.
5549
5123689b
AD
55502002-04-07 Akim Demaille <akim@epita.fr>
5551
5552 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
5553 nritems.
5554 Adjust dependencies.
5555
f3849179
AD
55562002-04-07 Akim Demaille <akim@epita.fr>
5557
5558 * src/reader.c: Normalize increments to prefix form.
5559
bd02036a
AD
55602002-04-07 Akim Demaille <akim@epita.fr>
5561
5562 * src/reader.c, symtab.c: Remove debugging code.
5563
db8837cb
AD
55642002-04-07 Akim Demaille <akim@epita.fr>
5565
5566 Rename all the `bucket's as `symbol_t'.
5567
5568 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
5569 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
5570 * src/symtab.c, src/symtab.h (bucket): Rename as...
5571 (symbol_t): this.
5572 (symbol_list_new, bucket_check_defined, bucket_make_alias)
5573 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
5574 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5575 (buckets_new, buckets_free, buckets_do): Rename as...
5576 (symbol_list_new, symbol_check_defined, symbol_make_alias)
5577 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5578 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
5579 (symbols_new, symbols_free, symbols_do): these.
5580
72a23c97
AD
55812002-04-07 Akim Demaille <akim@epita.fr>
5582
5583 Use lib/hash for the symbol table.
5584
5585 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
5586 EOF.
5587 * src/lex.c (lex): Set the `number' member of new terminals.
5588 * src/reader.c (bucket_check_defined, bucket_make_alias)
5589 (bucket_check_alias_consistence, bucket_translation): New.
5590 (reader, grammar_free, readgram, token_translations_init)
5591 (packsymbols): Adjust.
5592 (reader): Number the predefined tokens.
5593 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5594 for predefined tokens.
5595 * src/symtab.h (bucket): Remove all the hash table related
5596 members.
5597 * src/symtab.c (symtab): Replace by...
5598 (bucket_table): this.
5599 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5600 (buckets_new, buckets_do): New.
5601
280a38c3
AD
56022002-04-07 Akim Demaille <akim@epita.fr>
5603
5604 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5605 (start_symbol, max_user_token_number, semantic_parser)
5606 (error_token_number): Initialize.
5607 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5608 Initialize.
5609 (reader): Don't.
5610 (errtoken, eoftoken, undeftoken, axiom): Extern.
5611
03b31c0c
AD
56122002-04-07 Akim Demaille <akim@epita.fr>
5613
5614 * src/gram.h (rule_s): prec and precsym are now pointers
5615 to the bucket giving the priority/associativity.
5616 Member `associativity' removed: useless.
5617 * src/reduce.c, src/conflicts.c: Adjust.
5618
8b3df748
AD
56192002-04-07 Akim Demaille <akim@epita.fr>
5620
5621 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5622 Properly escape the symbols' TAG when outputting them.
5623
e601aa1d
AD
56242002-04-07 Akim Demaille <akim@epita.fr>
5625
5626 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5627
b0299a2e
AD
56282002-04-07 Akim Demaille <akim@epita.fr>
5629
5630 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5631 (LArule): this, which is an array to rule_t*.
5632 * src/print.c, src/conflicts.c: Adjust.
5633
d7e1f00c
AD
56342002-04-07 Akim Demaille <akim@epita.fr>
5635
5636 * src/gram.h (rule_t): Rename `number' as `user_number'.
5637 `number' is a new member.
5638 Adjust dependencies.
5639 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5640
cc9305dd
AD
56412002-04-07 Akim Demaille <akim@epita.fr>
5642
5643 As a result of the previous patch, it is no longer needed
5644 to reorder ritem itself.
5645
5646 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5647
b0940840
AD
56482002-04-07 Akim Demaille <akim@epita.fr>
5649
5650 Be sure never to walk through RITEMS, but use only data related to
5651 the rules themselves. RITEMS should be banished.
5652
5653 * src/output.c (output_token_translations): Rename as...
5654 (prepare_tokens): this.
5655 In addition to `translate', prepare the muscles `tname' and
5656 `toknum', which were handled by...
5657 (output_rule_data): this.
5658 Remove, and move the remainder of its outputs into...
5659 (prepare_rules): this new routines, which also merges content from
5660 (output_gram): this.
5661 (prepare_rules): Be sure never to walk through RITEMS.
5662 (output_stos): Rename as...
5663 (prepare_stos): this.
5664 (output): Always invoke prepare_states, after all, just don't use it
5665 in the output if you don't need it.
5666
643a5994
AD
56672002-04-07 Akim Demaille <akim@epita.fr>
5668
5669 * src/LR0.c (new_state): Display `nstates' as the name of the
5670 newly created state.
5671 Adjust to initialize first_state and last_state if needed.
5672 Be sure to distinguish the initial from the final state.
5673 (new_states): Create the itemset of the initial state, and use
5674 new_state.
5675 * src/closure.c (closure): Now that the initial state has its
5676 items properly set, there is no need for a special case when
5677 creating `ruleset'.
5678
5679 As a result, now the rule 0, reducing to $axiom, is visible in the
5680 outputs. Adjust the test suite.
5681
5682 * tests/conflicts.at (Solved SR Conflicts)
5683 (Unresolved SR Conflicts): Adjust.
5684 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5685 * tests/conflicts.at (S/R in initial): New.
5686
b4c4ccc2
AD
56872002-04-07 Akim Demaille <akim@epita.fr>
5688
5689 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5690 the RHS of the rules.
5691 * src/output.c (output_gram): Likewise.
5692
bba97eb2
AD
56932002-04-07 Akim Demaille <akim@epita.fr>
5694
5695 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5696 bucket.
5697 Adjust all dependencies.
5698 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5699 `number' of the buckets too.
5700 * src/gram.h: Include `symtab.h'.
5701 (associativity): Move to...
5702 * src/symtab.h: here.
5703 No longer include `gram.h'.
5704
c3b407f4
AD
57052002-04-07 Akim Demaille <akim@epita.fr>
5706
5707 * src/gram.h, src/gram.c (rules_rhs_length): New.
5708 (ritem_longest_rhs): Use it.
5709 * src/gram.h (rule_t): `number' is a new member.
5710 * src/reader.c (packgram): Set it.
5711 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5712 the end of `rules', and count them out of `nrules'.
5713 (reduce_output, dump_grammar): Adjust.
5714 * src/print.c (print_grammar): It is no longer needed to check for
5715 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5716 * tests/reduce.at (Reduced Automaton): New test.
5717
11652ab3
AD
57182002-04-07 Akim Demaille <akim@epita.fr>
5719
5720 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5721 lacking `+ 1' to nrules, Bison reported as useless a token if it
5722 was used solely to set the precedence of the last rule...
5723
26b23c1a
AD
57242002-04-07 Akim Demaille <akim@epita.fr>
5725
5726 * data/bison.c++, data/bison.simple: Don't output the current file
5727 name in #line, to avoid useless diffs between two identical
5728 outputs under different names.
5729
18bcecb0
AD
57302002-04-07 Akim Demaille <akim@epita.fr>
5731
5732 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5733 Normalize loops to using `< nrules + 1', not `<= nrules'.
5734
fa770c86
AD
57352002-04-07 Akim Demaille <akim@epita.fr>
5736
5737 * TODO: Update.
5738
d9b739c3
AD
57392002-04-07 Akim Demaille <akim@epita.fr>
5740
5741 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5742 bucket.value as bucket.number.
5743
99013900
AD
57442002-04-07 Akim Demaille <akim@epita.fr>
5745
5746 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5747 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5748 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5749 RHS, instead of being an index in RITEMS.
5750
e966383b
PE
57512002-04-04 Paul Eggert <eggert@twinsun.com>
5752
5753 * doc/bison.texinfo: Update copyright date.
5754 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5755 (Symbols): Warn about running Bison in one character set,
5756 but compiling and/or running in an incompatible one.
5757 Warn about character code 256, too.
5758
57592002-04-03 Paul Eggert <eggert@twinsun.com>
5760
5761 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5762 YYERROR_VERBOSE is nonzero, not whether it is defined.
5763
5764 Merge changes from bison-1_29-branch.
c307773e 5765
8d6c48b9
PE
57662002-03-20 Paul Eggert <eggert@twinsun.com>
5767
5768 Merge fixes from Debian bison_1.34-1.diff.
5769
5770 * configure.in (AC_PREREQ): 2.53.
5771
e53c6322
AD
57722002-03-20 Akim Demaille <akim@epita.fr>
5773
5774 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5775
9ffbeca7
PE
57762002-03-19 Paul Eggert <eggert@twinsun.com>
5777
21db0b2a
PE
5778 * src/bison.simple (YYCOPY): New macro.
5779 (YYSTACK_RELOCATE): Use it.
5780 Remove Type arg; no longer needed. All callers changed.
5781 (yymemcpy): Remove; no longer needed.
5782
9ffbeca7
PE
5783 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5784 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5785
642cb8f8
AD
57862002-03-19 Akim Demaille <akim@epita.fr>
5787
5788 Test and fix the #line outputs.
5789
5790 * tests/atlocal.at (GCC): New.
5791 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5792 (Prologue synch line, ,%union synch line, Postprologue synch line)
5793 (Action synch line, Epilogue synch line): New tests.
5794 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5795 * data/bison.simple, data/bison.c++: Use it.
5796
3c31a486
AD
57972002-03-19 Akim Demaille <akim@epita.fr>
5798
5799 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5800 (Solved SR Conflicts, %expect not enough, %expect right)
5801 (%expect too much): Move to...
5802 * tests/conflicts.at: this new file.
5803
0d8bed56
AD
58042002-03-19 Akim Demaille <akim@epita.fr>
5805
5806 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5807 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5808 that we can move to enums for instance.
5809 * src/output.c (token_definitions_output): Output a list of
5810 `token-name, token-number' instead of the #define.
5811 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5812
9208d17f
AD
58132002-03-14 Akim Demaille <akim@epita.fr>
5814
5815 Use Gettext 0.11.1.
5816
af27eacb
RA
58172002-03-09 Robert Anisko <robert@lrde.epita.fr>
5818
5819 * data/bison.c++: Make the user able to add members to the generated
5820 parser by subclassing.
5821
9101a310
RA
58222002-03-05 Robert Anisko <robert@lrde.epita.fr>
5823
5824 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5825 a character.
5826 Reported by Nicolas Tisserand and Nicolas Burrus.
5827
fff9bf0b
RA
58282002-03-04 Robert Anisko <robert@lrde.epita.fr>
5829
5830 * src/reader.c: Warn about lacking semi-colons, do not complain.
5831
64dba31e
RA
58322002-03-04 Robert Anisko <robert@lrde.epita.fr>
5833
5834 * data/bison.c++: Remove a debug line.
5835
374f5a14
RA
58362002-03-04 Robert Anisko <robert@lrde.epita.fr>
5837
5838 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5839 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5840 provide a default implementation.
5841
bfcf1f3a
AD
58422002-03-04 Akim Demaille <akim@epita.fr>
5843
5844 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5845 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5846 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5847 * tests/semantic.at (Parsing Guards): Similarly.
5848 * src/reader.at (readgram): Complain if the last rule is not ended
5849 with a semi-colon.
5850
65ccf9fc
AD
58512002-03-04 Akim Demaille <akim@epita.fr>
5852
5853 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5854 * src/closure.c: here.
5855 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5856 RTC.
5857 * src/warshall.h, src/warshall.c: Remove.
5858 * tests/sets.at (Broken Closure): Adjust.
5859
d0039cbc
AD
58602002-03-04 Akim Demaille <akim@epita.fr>
5861
5862 * src/output.c (output_skeleton): tempdir is const.
5863 bytes_read is unused.
5864
345cea78
AD
58652002-03-04 Akim Demaille <akim@epita.fr>
5866
5867 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5868 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5869 Update.
5870 From Michael Hayes.
5871
564801f7
AD
58722002-03-04 Akim Demaille <akim@epita.fr>
5873
5874 * src/closure.c (closure): `r' is unused.
5875
e5352bc7
AD
58762002-03-04 Akim Demaille <akim@epita.fr>
5877
5878 * tests/sets.at (Broken Closure): Add the ending `;'.
5879 * src/reader.at (readgram): Complain if a rule is not ended with a
5880 semi-colon.
5881
914feea9
AD
58822002-03-04 Akim Demaille <akim@epita.fr>
5883
5884 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5885 (count_sr_conflicts): Use bitset_count.
5886 * src/reduce.c (inaccessable_symbols): Ditto.
5887 (bits_size): Remove.
5888 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5889
f0250de6
AD
58902002-03-04 Akim Demaille <akim@epita.fr>
5891
5892 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5893 * src/reduce.c: Remove the `bitset_zero's following the
5894 `bitset_create's, as now it is performed by the latter.
5895
ef017502
AD
58962002-03-04 Akim Demaille <akim@epita.fr>
5897
5898 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5899 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5900 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5901 latest sources from Michael.
5902
76514394
AD
59032002-03-04 Akim Demaille <akim@epita.fr>
5904
5905 * src/output.c (output): Don't free the grammar.
5906 * src/reader.c (grammar_free): New.
5907 * src/main.c (main): Call it and don't free symtab here.
5908
55024580
AD
59092002-03-04 Akim Demaille <akim@epita.fr>
5910
5911 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5912 before returning.
5913 Reported by Benoit Perrot.
5914
f9abaa2c
AD
59152002-03-04 Akim Demaille <akim@epita.fr>
5916
5917 Use bitset operations when possible, not loops over bits.
5918
5919 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5920 bitset_or.
5921 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5922 * src/reduce.c (useless_nonterminals): Formatting changes.
5923 * src/warshall.c (TC): Use bitset_or.
5924
0e721e75
AD
59252002-03-04 Akim Demaille <akim@epita.fr>
5926
5927 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5928 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5929 Ditto.
5930
0fb1ffb1
AD
59312002-03-04 Akim Demaille <akim@epita.fr>
5932
5933 * src/lalr.c (F): Now a bitset*.
5934 Adjust all dependencies.
5935
b86796bf
AD
59362002-03-04 Akim Demaille <akim@epita.fr>
5937
5938 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5939 Adjust all dependencies.
5940
602bbf31
AD
59412002-03-04 Akim Demaille <akim@epita.fr>
5942
5943 * src/L0.c, src/LR0.h (nstates): Be size_t.
5944 Adjust comparisons (signed vs unsigned).
5945 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5946 bitset*.
5947 Adjust all dependencies.
5948
d8a0245c
AD
59492002-03-04 Akim Demaille <akim@epita.fr>
5950
5951 * src/closure.c (firsts): Now, also a bitset.
5952 Adjust all dependencies.
5953 (varsetsize): Remove, now unused.
5954 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5955
34ba9743
AD
59562002-03-04 Akim Demaille <akim@epita.fr>
5957
5958 * src/print.c: Convert to use bitset.h, not hand coded iterations
5959 over ints.
5960
ed86e78c
AD
59612002-03-04 Akim Demaille <akim@epita.fr>
5962
5963 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5964
dfdb1797
AD
59652002-03-04 Akim Demaille <akim@epita.fr>
5966
5967 * src/closure.c (ruleset): Be a bitset.
5968 (rulesetsize): Remove.
5969
7086e707
AD
59702002-03-04 Akim Demaille <akim@epita.fr>
5971
5972 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5973 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5974 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5975 * src/closure.c (fderives): Be an array of bitsets.
5976
98254360
RA
59772002-02-28 Robert Anisko <robert@lrde.epita.fr>
5978
5979 * data/bison.c++: Merge the two generated headers. Insert a copyright
5980 notice in each output file.
5981
a75c057f
AD
59822002-02-28 Akim Demaille <akim@epita.fr>
5983
5984 * data/bison.c++: Copy the prologue of bison.simple to fetch
5985 useful M4 definitions, such as b4_header_guard.
5986
06b00abc
AD
59872002-02-25 Akim Demaille <akim@epita.fr>
5988
5989 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
5990 translator friendly scheme for the bgr
5991 copyright notice.
06b00abc 5992
70e7d534
AD
59932002-02-25 Akim Demaille <akim@epita.fr>
5994
5995 * src/output.c (header_output): Remove, now handled completely via
5996 M4.
5997
abe017f6
AD
59982002-02-25 Akim Demaille <akim@epita.fr>
5999
6000 * m4/m4.m4: New, from CVS Autoconf.
6001 * configure.in: Invoke it.
6002 * src/output.c (output_skeleton): Use its result instead of the
6003 hard coded name.
6004
381fb12e
AD
60052002-02-25 Akim Demaille <akim@epita.fr>
6006
6007 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
6008 Fileutils 4.1.5.
6009 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
6010 * src/output.c (output_skeleton): Use mkstemp to create a real
6011 temporary file.
6012 Move the filling of `skeleton' and its muscle to...
6013 (prepare): here.
6014 (output): Move the definition of the prologue muscle to...
6015 (prepare): here.
6016 * src/system.h (DEFAULT_TMPDIR): New.
6017
6f38107f
PE
60182002-02-14 Paul Eggert <eggert@twinsun.com>
6019
6020 Remove the support for C++ namespace cleanliness; it was
6021 causing more problems than it was curing, since it didn't work
6022 properly on some nonstandard C++ compilers. This can wait
6023 for a proper C++ parser.
6024
6025 * NEWS: Document this.
6026 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
6027 of C++, as it's treated like C now.
6028 * src/bison.simple (YYSTD): Remove.
6029 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
6030 Treat C++ just like Standard C instead of trying to support
6031 namespace cleanliness.
6032
80cce3da
AD
60332002-02-14 Akim Demaille <akim@epita.fr>
6034
6035 * tests/regression.at (else): Adjust to Andreas' change.
6036
842e8679
AD
60372002-02-14 Akim Demaille <akim@epita.fr>
6038
6039 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
6040
4bda3f10
AD
60412002-02-13 Andreas Schwab <schwab@suse.de>
6042
6043 * src/output.c (output_rule_data): Don't output NULL, it might
6044 not be defined yet.
6045
4162fa07 60462002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 6047
4162fa07
RA
6048 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6049 (Copyright notice): Update.
b418ecd8 6050
bd16a5dc
AD
60512002-02-11 Akim Demaille <akim@epita.fr>
6052
6053 * tests/regression.at (%nonassoc and eof): Don't include
6054 nonportable headers.
6055
8d69a1a3
RA
60562002-02-08 Robert Anisko <robert@lrde.epita.fr>
6057
6058 * data/bison.c++: Correct error recovery. Make the user able to
6059 initialize the starting location.
6060
9b2d0677
AD
60612002-02-07 Akim Demaille <akim@epita.fr>
6062
6063 * tests/input.at: New.
6064
69e2658b
RA
60652002-02-07 Robert Anisko <robert@lrde.epita.fr>
6066
6067 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 6068 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
6069 directives around tables only needed for debugging.
6070
4aacc3a7
RA
60712002-02-07 Robert Anisko <robert@lrde.epita.fr>
6072
6073 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6074 C++ parsers.
6075 (yy::b4_name::parse): Use print_.
6076
762a801e
RA
60772002-02-07 Robert Anisko <robert@lrde.epita.fr>
6078
6079 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6080
4bb2bc3f
RA
60812002-02-07 Robert Anisko <robert@lrde.epita.fr>
6082
6083 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6084 C++ parsers.
6085 (yy::b4_name::parse): Build verbose error messages, and use error_.
6086
6b45a3ca
RA
60872002-02-06 Robert Anisko <robert@lrde.epita.fr>
6088
6089 * data/bison.c++: Fix m4 quoting in comments.
6090
50997c6e
RA
60912002-02-06 Robert Anisko <robert@lrde.epita.fr>
6092
6093 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6094 not expanded by m4.
6095
3f3eed27
AD
60962002-02-05 Akim Demaille <akim@epita.fr>
6097
6098 * data/bison.c++: Adjust to the M4 back end.
6099 More is certainly needed.
6100
be2a1a68
AD
61012002-02-05 Akim Demaille <akim@epita.fr>
6102
6103 Give a try to M4 as a back end.
6104
6105 * lib/readpipe.c: New, from wdiff.
6106 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6107 BISON_HAIRY.
6108 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6109 specific values. Now it is m4 that performs the lookup.
6110 * src/parse-skel.y: Remove.
6111 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6112 * src/output.c (actions_output, guards_output)
6113 (token_definitions_output): No longer keeps track of the output
6114 line number, hence remove the second argument.
6115 (guards_output): Check against the guard member of a rule, not the
6116 action member.
6117 Adjust callers.
6118 (output_skeleton): Don't look for the skeleton location, let m4 do
6119 that.
6120 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6121 file will be used.
6122 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6123 (prepare): Given that for the time being changesyntax is not
6124 usable in M4, rename the muscles using `-' to `_'.
6125 Define `defines_flag', `output_parser_name' and `output_header_name'.
6126 * src/output.h (actions_output, guards_output)
6127 (token_definitions_output): Adjust prototypes.
6128 * src/scan-skel.l: Instead of scanning the skeletons, it now
6129 processes the output of m4: `__oline__' and `#output'.
6130 * data/bison.simple: Adjust to be used by M4(sugar).
6131 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6132 to date.
6133 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6134 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6135 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6136 shamelessly stolen from CVS Autoconf.
6137
beda758b
AD
61382002-02-05 Akim Demaille <akim@epita.fr>
6139
6140 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
6141 * configure.in: Check for the declarations of free and malloc.
6142 * src/muscle_tab.c: Adjust.
6143
5ece6d43
AD
61442002-02-05 Akim Demaille <akim@epita.fr>
6145
6146 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
6147 which have no values.
6148
5bb18f9a
AD
61492002-02-05 Akim Demaille <akim@epita.fr>
6150
6151 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
6152 * data/: here.
6153
894dd62e
PE
61542002-01-29 Paul Eggert <eggert@twinsun.com>
6155
6156 * src/bison.simple (YYSIZE_T): Do not define merely because
6157 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
6158 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6159
82841af7
AD
61602002-01-27 Akim Demaille <akim@epita.fr>
6161
6162 Fix `%nonassoc and eof'.
6163
6164 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
6165 which were not properly copied! Replace
6166 memcpy (res->errs, src->errs, src->nerrs);
6167 with
6168 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
6169 !!!
6170 * tests/regression.at (%nonassoc and eof): Adjust to newest
6171 Autotest: `.' is not in the PATH.
6172
318b76e9
AD
61732002-01-27 Akim Demaille <akim@epita.fr>
6174
6175 * tests/sets.at (AT_EXTRACT_SETS): New.
6176 (Nullable): Use it.
6177 (Firsts): New.
6178
30d2f3d5
AD
61792002-01-26 Akim Demaille <akim@epita.fr>
6180
6181 * tests/actions.at, tests/calc.at, tests/headers.at,
6182 * tests/torture.at: Adjust to the newest Autotest which no longer
6183 forces `.' in the PATH.
6184
30f8c395
AD
61852002-01-25 Akim Demaille <akim@epita.fr>
6186
6187 * tests/regression.at (%nonassoc and eof): New.
6188 Suggested by Robert Anisko.
6189
29ae55f1
AD
61902002-01-24 Akim Demaille <akim@epita.fr>
6191
6192 Bison dumps core when trying to complain about broken input files.
6193 Reported by Cris van Pelt.
6194
6195 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
6196 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
6197 into...
6198 (Invalid inputs): Strengthen: exercise parse_percent_token.
6199
2b548aa6
RA
62002002-01-24 Robert Anisko <robert.anisko@epita.fr>
6201
6202 * src/Makefile.am: Add bison.c++.
6203 * src/bison.c++: New skeleton.
6204
bb0146c2
AD
62052002-01-21 Paolo Bonzini <bonzini@gnu.org>
6206
6207 * po/it.po: New.
6208
bec30531
AD
62092002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6210
6211 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
6212
fc6edc45
MA
62132002-01-20 Marc Autret <marc@gnu.org>
6214
6215 * src/files.c (compute_output_file_names): Fix
6216
5e5d5415
MA
62172002-01-20 Marc Autret <marc@gnu.org>
6218
6219 * tests/output.at: New test.
6220 * src/files.c (compute_base_names): Don't map extensions when
6221 the YACC flag is set, use defaults.
6222 Reported by Evgeny Stambulchik.
6223
44ea3fbd
MA
62242002-01-20 Marc Autret <marc@gnu.org>
6225
bb0146c2 6226 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
6227 compilers as well (i.e. the vendor C compiler).
6228 Suggested by Albert Chin-A-Young.
6229
338963d1
TVH
62302002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
6231
6232 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
6233 canonical definition.
6234 * src/system.h: Use the canonical definition for PARAMS (avoids
6235 a conflict with the macro from lib/hash.h).
6236
c57b2479
AD
62372002-01-11 Akim Demaille <akim@epita.fr>
6238
6239 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 6240 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 6241
b85810ae
AD
62422002-01-09 Akim Demaille <akim@epita.fr>
6243
6244 * src/files.c, src/files.h (output_infix): New.
6245 (tab_extension): Remove.
6246 (compute_base_names): Compute the former, drop the latter.
6247 * src/output.c (prepare): Insert the muscles `output-infix', and
6248 `output-suffix'.
6249 * src/parse-skel.y (string, string.1): New.
6250 (section.header): Use it.
6251 (section.yacc): Remove.
6252 (prefix): Remove too.
6253 * src/scan-skel.l: Adjust.
6254 * src/bison.simple, src/bison.hairy: Adjust.
6255
cae60122
AD
62562002-01-09 Akim Demaille <akim@epita.fr>
6257
6258 * configure.in (WERROR_CFLAGS): Compute it.
6259 * src/Makefile.am (CFLAGS): Pass it.
6260 * tests/atlocal.in (CFLAGS): Idem.
6261 * src/files.c: Fix a few warnings.
6262 (get_extension_index): Remove, unused.
6263
ae404801
AD
62642002-01-08 Akim Demaille <akim@epita.fr>
6265
6266 * src/getargs.c (AS_FILE_NAME): New.
6267 (getargs): Use it to convert DOSish file names.
6268 * src/files.c (base_name): Rename as full_base_name to avoid
6269 clashes with `base_name ()'.
6270 (filename_split): New.
6271 (compute_base_names): N-th rewrite, using filename_split.
6272
22312b71
AD
62732002-01-08 Akim Demaille <akim@epita.fr>
6274
6275 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
6276 New, stolen from the Fileutils 4.1.
6277 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6278 * configure.in: Check for the presence of memrchr, and of its
6279 prototype.
6280
a67cef01
TVH
62812002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
6282
6283 * lib/hash.h (__P): Added definition for this macro.
6284 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
6285 BUILT_SOURCES, to ensure they are generated first.
6286 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
6287 %error-verbose to allow bootstrapping with bison 1.30x.
6288
2b25d624
AD
62892002-01-06 Akim Demaille <akim@epita.fr>
6290
6291 * src/reader.c (parse_braces): Don't fetch the next char, the
6292 convention is to fetch on entry.
6293 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
6294 'switch' without a following semicolon.
6295 * tests/regression.at (braces parsing): New.
6296
3460813b
AD
62972002-01-06 Akim Demaille <akim@epita.fr>
6298
6299 Bison is dead wrong in its RR conflict reports.
6300
6301 * tests/torture.at (GNU Cim Grammar): New.
6302 * src/conflicts.c (count_rr_conflicts): Fix.
6303
73784c64
AD
63042002-01-06 Akim Demaille <akim@epita.fr>
6305
6306 Creating package.m4 from configure.ac causes too many problems.
6307
6308 * tests/Makefile.am (package.m4): Create it by hand,
6309 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
6310
25d81090
AD
63112002-01-06 Akim Demaille <akim@epita.fr>
6312
6313 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
6314 skeleton.h.
6315
a9b8959e
PE
63162002-01-04 Paul Eggert <eggert@twinsun.com>
6317
6318 * doc/bison.texinfo (Debugging):
6319 Remove YYSTDERR; it's no longer defined or used.
6320 Also, s/cstdio.h/cstdio/.
6321
25d81090
AD
63222002-01-03 Akim Demaille <akim@epita.fr>
6323
6324 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
6325
1109455c
AD
63262002-01-03 Akim Demaille <akim@epita.fr>
6327
6328 * src/parse-skel.y (process_skeleton): Don't bind the parser's
6329 tracing code to --trace, wait for a better --trace option, with
6330 args.
6331
7ea5e977
AD
63322002-01-03 Akim Demaille <akim@epita.fr>
6333
6334 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
6335 The ISO C++ standard is extremely clear about it: stderr is
6336 considered a macro, not a regular symbol (see table 94 `Header
6337 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
6338 Therefore std:: does not apply to it. It still does with fprintf.
6339 Also, s/cstdio.h/cstdio/.
6340
fab5b110
AD
63412002-01-03 Akim Demaille <akim@epita.fr>
6342
6343 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
6344 for non system headers.
6345
aed7fd9b
AD
63462002-01-02 Akim Demaille <akim@epita.fr>
6347
6348 Equip the skeleton chain with location tracking, runtime trace,
6349 pure parser and scanner.
6350
6351 * src/parse-skel.y: Request a pure parser, locations, and prefix
6352 renaming.
6353 (%union): Having several members with the same type does not help
6354 type mismatches, simplify.
6355 (YYPRINT, yyprint): New.
6356 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
6357 (skel_error): this.
6358 Handle locations.
6359 * src/scan-skel.l: Adjust to these changes.
6360 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
6361 (LOCATION_PRINT, skel_control_t): New.
6362
24fad99e
AD
63632001-12-30 Akim Demaille <akim@epita.fr>
6364
6365 * src/parse-skel.y: Get rid of the shift/reduce conflict:
6366 replace `gb' with BLANKS.
6367 * src/scan-skel.l: Adjust.
6368
a4b36db4
AD
63692001-12-30 Akim Demaille <akim@epita.fr>
6370
6371 * src/system.h: We don't need nor want bcopy.
6372 Throw away MS-DOS crap: we don't need getpid.
6373 * configure.in: We don't need strndup. It was even causing
6374 problems: because Flex includes the headers *before* us,
6375 _GNU_SOURCE is not defined by config.h, and therefore strndup was
6376 not visible.
6377 * lib/xstrndup.c: New.
6378 * src/scan-skel.l: Use it.
6379 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
6380 * src/parse-skel.y: Use %directives instead of #defines.
6381
1239777d
AD
63822001-12-30 Akim Demaille <akim@epita.fr>
6383
6384 * src/skeleton.h: New.
6385 * src/output.c (output_parser, output_master_parser): Remove, dead
6386 code.
6387 * src/output.h (get_lines_number, actions_output, guards_output)
6388 (token_definitions_output): Prototype them.
6389 * src/parse-skel.y: Add the license notice.
6390 Include output.h and skeleton.h.
6391 (process_skeleton): Returns void, and takes a single parameter.
6392 * src/scan-skel.l: Add the license notice.
6393 Include skeleton.h.
6394 Don't use %option yylineno: it seems that then Flex imagines
6395 REJECT has been used, and therefore it won't reallocate its
6396 buffers (which makes no other sense to me than a bug). It results
6397 in warnings for `unused: yy_flex_realloc'.
6398
9b3add5b
RA
63992001-12-30 Robert Anisko <robert.anisko@epita.fr>
6400
6401 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6402 (MUSCLE_INSERT_PREFIX): ...to there.
6403 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6404 (MUSCLE_INSERT_PREFIX): Move from here...
6405
6406 * src/bison.hairy: Add a section directive. Put braces around muscle
6407 names. This parser skeleton is still broken, but Bison should not
6408 choke on a bad muscle 'syntax'.
6409 * src/bison.simple: Add a section directive. Put braces around muscle
6410 names.
6411
6412 * src/files.h (strsuffix, stringappend): Add declarations.
6413 (tab_extension): Add declaration.
6414 (short_base_name): Add declaration.
6415
6416 * src/files.c (strsuffix, stringappend): No longer static. These
6417 functions are used in the skeleton parser.
6418 (tab_extension): New.
6419 (compute_base_names): Use the computations done in this function
fab5b110 6420 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
6421 names.
6422 (short_base_name): No longer static.
6423
6424 * src/output.c (output_skeleton): New.
6425 (output): Disable call to output_master_parser, and give a try to
6426 a new skeleton handling system.
6427 (guards_output, actions_output): No longer static.
6428 (token_definitions_output, get_lines_number): No longer static.
6429
6430 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
6431
fab5b110 6432 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
6433 parse-skel.y.
6434
6435 * src/parse-skel.y: New file.
6436 * src/scan-skel.l: New file.
6437
b5b61c61
AD
64382001-12-29 Akim Demaille <akim@epita.fr>
6439
6440 %name-prefix is broken.
6441
6442 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
6443 Adjust all dependencies.
6444 * tests/headers.at (export YYLTYPE): Strengthen this test: use
6445 %name-prefix.
6446
6447 Renaming yylval but not yylloc is not consistent. Now we do.
6448
6449 * src/bison.simple: Prefix yylloc if used.
6450 * doc/bison.texinfo (Decl Summary): Document that.
6451
8c9a50be
AD
64522001-12-29 Akim Demaille <akim@epita.fr>
6453
6454 * doc/bison.texinfo: Promote `%long-directive' over
6455 `%long_directive'.
6456 Remove all references to fixed-output-files, yacc is enough.
6457
d99361e6
AD
64582001-12-29 Akim Demaille <akim@epita.fr>
6459
6460 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
6461 user prologue. These are defaults.
6462 * tests/actions.at (Mid-rule actions): Make sure the user can
6463 define YYDEBUG and YYERROR_VERBOSE.
6464
b9cecb91
AD
64652001-12-29 Akim Demaille <akim@epita.fr>
6466
6467 * src/output.c (header_output): Don't forget to export YYLTYPE and
6468 yylloc.
6469 * tests/headers.at (export YYLTYPE): New, make sure it does.
6470 * tests/regression.at (%union and --defines, Invalid CPP headers):
6471 Move to...
6472 * tests/headers.at: here.
6473
aea13e97
AD
64742001-12-29 Akim Demaille <akim@epita.fr>
6475
6476 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
6477
931394cb
AD
64782001-12-29 Akim Demaille <akim@epita.fr>
6479
6480 * tests/actions.at (Mid-rule actions): Output on a single line
6481 instead of several.
6482
704a47c4
AD
64832001-12-29 Akim Demaille <akim@epita.fr>
6484
6485 * doc/bison.texinfo: Formatting changes.
6486
091e20bb
AD
64872001-12-29 Akim Demaille <akim@epita.fr>
6488
6489 Don't store the token defs in a muscle, just be ready to output it
6490 on command. Now possible via `symbols'. Fixes a memory leak.
6491
6492 * src/output.c (token_definitions_output): New.
6493 (output_parser, header_output): Use it.
6494 * src/reader.c (symbols_save): Remove.
6495
cce71710
AD
64962001-12-29 Akim Demaille <akim@epita.fr>
6497
6498 * src/bison.simple: Do not provide a default for YYSTYPE and
6499 YYLTYPE before the user's prologue. Otherwise it's hardly... a
6500 default.
6501
82c035a8
AD
65022001-12-29 Akim Demaille <akim@epita.fr>
6503
6504 Mid-rule actions are simply... ignored!
6505
6506 * src/reader.c (readgram): Be sure to attach mid-rule actions to
6507 the empty-rule associated to the dummy symbol, not to the host
6508 rule.
6509 * tests/actions.at (Mid-rule actions): New.
6510
8419d367
AD
65112001-12-29 Akim Demaille <akim@epita.fr>
6512
6513 Memory leak.
6514
6515 * src/reader.c (reader): Free grammar.
6516
375d5806
AD
65172001-12-29 Akim Demaille <akim@epita.fr>
6518
6519 Memory leak.
6520
6521 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
6522 since it allocates it for each state, although only one is needed.
6523 (allocate_storage): Do it here.
6524
f51cb8ff
AD
65252001-12-29 Akim Demaille <akim@epita.fr>
6526
6527 * src/options.h, src/options.c (create_long_option_table): Rename
6528 as...
6529 (long_option_table_new): this, with a clearer prototype.
6530 (percent_table): Remove, unused,
6531 * src/getargs.c (getargs): Adjust.
6532
29e88316
AD
65332001-12-29 Akim Demaille <akim@epita.fr>
6534
6535 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
6536 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
6537 as states.
6538
b9f71f19
AD
65392001-12-29 Akim Demaille <akim@epita.fr>
6540
6541 * src/lalr.c (build_relations): Rename `states' as `states1'.
6542 Sorry, I don't understand exactly what it is, no better name...
6543
1a2b5d37
AD
65442001-12-29 Akim Demaille <akim@epita.fr>
6545
6546 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
6547 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
6548 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
6549 as rules.
6550
1cca533e
AD
65512001-12-29 Akim Demaille <akim@epita.fr>
6552
6553 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
6554 ago.
6555
c03ae966
AD
65562001-12-29 Akim Demaille <akim@epita.fr>
6557
6558 * src/reader.c, src/reader.h (user_toknums): Remove.
6559 Adjust all users to use symbols[i]->user_token_number.
6560
5a670b1e
AD
65612001-12-29 Akim Demaille <akim@epita.fr>
6562
6563 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
6564 Adjust all users to use symbols[i]->prec or ->assoc.
6565
ad949da9
AD
65662001-12-29 Akim Demaille <akim@epita.fr>
6567
6568 * src/reader.c, src/reader.h (tags): Remove.
6569 Adjust all users to use symbols[i]->tag.
6570
0e78e603
AD
65712001-12-29 Akim Demaille <akim@epita.fr>
6572
6573 * src/gram.h, src/gram.c (symbols): New, similar to state_table
6574 and rule_table.
6575 * src/reader.c (packsymbols): Fill this table.
6576 Drop sprec.
6577 * src/conflicts.c (resolve_sr_conflict): Adjust.
6578 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
6579 single table.
6580 Use symbols[i]->tag instead of tags[i].
6581
213e640e
AD
65822001-12-29 Akim Demaille <akim@epita.fr>
6583
6584 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
6585 In addition, put a comment in there, to replace...
6586 * tests/regression.at (%union and C comments): Remove.
6587
e7b8bef1
AD
65882001-12-29 Akim Demaille <akim@epita.fr>
6589
6590 * tests/regression.at (Web2c Actions): Blindly move the actual
6591 output as expected output. The contents *seem* right to me, but I
6592 can't pretend reading perfectly parser tables... Nonetheless, all
6593 the other tests pass correctly, the table look OK, even though the
6594 presence of `$axiom' is to be noted: AFAICS it is useless (but
6595 harmless).
6596
b68e7744
AD
65972001-12-29 Akim Demaille <akim@epita.fr>
6598
6599 * src/reader.c (readgram): Don't add the rule 0 if there were no
6600 rules read. In other words, add it _after_ having performed
6601 grammar sanity checks.
6602 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6603
78d5bae9
AD
66042001-12-29 Akim Demaille <akim@epita.fr>
6605
6606 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6607 visible, and some states have now a different number.
6608
ff442794
AD
66092001-12-29 Akim Demaille <akim@epita.fr>
6610
6611 * src/reader.c (readgram): Bind the initial rule's lineno to that
6612 of the first rule.
6613 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6614 (Solved SR Conflicts): Adjust rule 0's line number.
6615
610ab194
AD
66162001-12-29 Akim Demaille <akim@epita.fr>
6617
6618 Fix the `GAWK Grammar' failure.
6619
6620 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6621 the reductions of the first state which was mistakenly confused
6622 with the final state because precisely final_state was initialized
6623 to 0.
6624 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6625 now noticed by Bison.
6626 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6627 have a reduction on $default.
6628
29d29c8f
AD
66292001-12-29 Akim Demaille <akim@epita.fr>
6630
6631 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6632 rule line numbers.
6633 * src/closure.c (print_closure): Likewise.
6634 * src/derives.c (print_derives): Likewise.
6635 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6636 now.
6637
7c6b64d0
AD
66382001-12-29 Akim Demaille <akim@epita.fr>
6639
6640 * src/lalr.c (lookaheads_print): New.
6641 (lalr): Call it when --trace-flag.
6642 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6643 are dumped.
6644
3d4daee3
AD
66452001-12-29 Akim Demaille <akim@epita.fr>
6646
6647 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6648 when walking through ritem, even via rule->rhs.
6649 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6650 (useful_production, useless_nonterminals): Likewise.
6651 (reduce_grammar_tables): Likewise, plus update nritems.
6652 * src/nullable.c (set_nullable): Likewise.
6653 * src/lalr.c (build_relations): Likewise.
6654 * tests/sets.at (Nullable): Adjust.
6655 Fortunately, now, the $axiom is no longer nullable.
6656
9e7f6bbd
AD
66572001-12-29 Akim Demaille <akim@epita.fr>
6658
6659 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6660 the 0-sentinel.
6661 * src/gram.c (ritem_longest_rhs): Likewise.
6662 * src/reduce.c (nonterminals_reduce): Likewise.
6663 * src/print_graph.c (print_graph): Likewise.
6664 * src/output.c (output_rule_data): Likewise.
6665 * src/nullable.c (set_nullable): Likewise.
6666
255ef638
AD
66672001-12-29 Akim Demaille <akim@epita.fr>
6668
6669 * src/output.c: Comment changes.
6670
0d8a7363
AD
66712001-12-27 Paul Eggert <eggert@twinsun.com>
6672
6673 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6674 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6675 Sparc, as they were causing more porting problems than the
6676 (minor) performance improvement was worth.
6677
6678 Also, catch up with 1.31's YYSTD.
6679
3db472b9
AD
66802001-12-27 Akim Demaille <akim@epita.fr>
6681
6682 * src/output.c (output_gram): Rely on nritems, not the
6683 0-sentinel. See below.
6684 Use -1 as separator, not 0.
6685 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6686 Rely on -1 as separator in yyrhs, instead of 0.
6687 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6688 twice `Now at end of input', therefore there are two lines less to
6689 expect.
6690
b365aa05
AD
66912001-12-27 Akim Demaille <akim@epita.fr>
6692
6693 * tests/regression.at (Unresolved SR Conflicts):
6694 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6695 below.
6696
30171f79
AD
66972001-12-27 Akim Demaille <akim@epita.fr>
6698
6699 * src/LR0.c (new_state): Recognize the final state by the fact it
6700 is reached by eoftoken.
6701 (insert_start_shifting_state, insert_eof_shifting_state)
6702 (insert_accepting_state, augment_automaton): Remove, since now
6703 these states are automatically computed from the initial state.
6704 (generate_states): Adjust.
6705 * src/print.c: When reporting a rule number to the user, substract
6706 1, so that the axiom rule is rule 0, and the first user rule is 1.
6707 * src/reduce.c: Likewise.
6708 * src/print_graph.c (print_core): For the time being, just as for
6709 the report, depend upon --trace-flags to dump the full set of
6710 items.
6711 * src/reader.c (readgram): Once the grammar read, insert the rule
6712 0: `$axiom: START-SYMBOL $'.
6713 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6714 number of the states has changed (the final state is no longer
6715 necessarily the last), catch up.
6716
75142d45
AD
67172001-12-27 Akim Demaille <akim@epita.fr>
6718
6719 Try to make the use of the eoftoken valid. Given that its value
6720 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6721 is used instead of > 0 where appropriate, (ii), depend upon nritems
6722 instead of the 0-sentinel.
6723
6724 * src/gram.h, src/gram.c (nritems): New.
6725 Expected to be duplication of nitems, but for the time being...
6726 * src/reader.c (packgram): Assert nritems and nitems are equal.
6727 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6728 * src/closure.c (print_closure, print_fderives): Likewise.
6729 * src/gram.c (ritem_print): Likewise.
6730 * src/print.c (print_core, print_grammar): Likewise.
6731 * src/print_graph.c: Likewise.
6732
b7c49edf
AD
67332001-12-27 Akim Demaille <akim@epita.fr>
6734
6735 * src/main.c (main): If there are complains after grammar
6736 reductions, then output the report anyway if requested, then die.
6737 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6738 * src/reader.c (eoftoken): New.
6739 (parse_token_decl): If the token being defined has value `0', it
6740 is the eoftoken.
6741 (packsymbols): No longer hack `tags' to insert `$' by hand.
6742 Be sure to preserve the value of the eoftoken.
6743 (reader): Make sure eoftoken is defined.
6744 Initialize nsyms to 0: now eoftoken is created just like the others.
6745 * src/print.c (print_grammar): Don't special case the eof token.
6746 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6747 lie anyway, albeit pleasant.
6748 * tests/calc.at: Exercise error messages with eoftoken.
6749 Change the grammar so that empty input is invalid.
6750 Adjust expectations.
6751 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6752
ec2da99f
AD
67532001-12-27 Akim Demaille <akim@epita.fr>
6754
6755 * configure.in: Check the protos of strchr ans strspn.
6756 Replace strchr if needed.
6757 * src/system.h: Provide the protos of strchr, strspn and memchr if
6758 missing.
6759 * lib/strchr.c: New.
6760 * src/reader.c (symbols_save): Use strchr.
6761
8adfa272
AD
67622001-12-27 Akim Demaille <akim@epita.fr>
6763
6764 * src/print.c, src/print_graph.c (escape): New.
6765 Use it to quote the TAGS outputs.
6766 * src/print_graph.c (print_state): Now errors are in red, and
6767 reductions in green.
6768 Prefer high to wide: output the state number on a line of its own.
6769
80dac38c
AD
67702001-12-27 Akim Demaille <akim@epita.fr>
6771
6772 * src/state.h, src/state.c (reductions_new): New.
6773 * src/LR0.c (set_state_table): Let all the states have a
6774 `reductions', even if reduced to 0.
6775 (save_reductions): Adjust.
6776 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6777 * src/print.c (print_reductions, print_actions): Adjust.
6778 * src/output.c (action_row): Adjust.
6779
2cec70b9
AD
67802001-12-27 Akim Demaille <akim@epita.fr>
6781
6782 * src/state.h, src/state.c (errs_new, errs_dup): New.
6783 * src/LR0.c (set_state_table): Let all the states have an errs,
6784 even if reduced to 0.
6785 * src/print.c (print_errs, print_reductions): Adjust.
6786 * src/output.c (output_actions, action_row): Adjust.
6787 * src/conflicts.c (resolve_sr_conflict): Adjust.
6788
13ca549a
AD
67892001-12-27 Akim Demaille <akim@epita.fr>
6790
6791 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6792
5092aba5
AD
67932001-12-27 Akim Demaille <akim@epita.fr>
6794
6795 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6796 * src/print.c: here.
6797 (lookaheadset, shiftset): New, used as additional storage by
6798 print_reductions.
6799 (print_results): Adjust.
6800 (print_shifts, print_gotos, print_errs): New, extracted from...
6801 (print_actions): here.
6802 * src/print_graph.c (print_actions): Remove dead code.
6803
11e2beca
AD
68042001-12-27 Akim Demaille <akim@epita.fr>
6805
6806 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6807 `$n' and `@n'.
6808
dac3c910
AD
68092001-12-27 Akim Demaille <akim@epita.fr>
6810
6811 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6812 (build_relations): Adjust.
6813
d0b0fefa
AD
68142001-12-27 Akim Demaille <akim@epita.fr>
6815
6816 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6817 duplication.
6818
adc8c848
AD
68192001-12-27 Akim Demaille <akim@epita.fr>
6820
6821 * src/reader.c (packgram): Catch nitems overflows.
6822
14d293ac
AD
68232001-12-27 Akim Demaille <akim@epita.fr>
6824
6825 * src/files.c, src/files.h (guard_obstack): Remove.
6826 * src/output.c (output): Adjust.
6827 * src/reader.c (parse_braces): New, factoring...
6828 (copy_action, copy_guard): these two which are renamed as...
6829 (parse_action, parse_guard): these.
6830 As a voluntary consequence, using braces around guards is now
6831 mandatory.
6832
f499b062
AD
68332001-12-27 Akim Demaille <akim@epita.fr>
6834
6835 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6836 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6837 members.
6838 (symbol_list_new): Adjust.
6839 (copy_action): action_line is the first line, not the last.
6840 (copy_guard): Just as for actions, store the `action' only, not
6841 the switch/case/break flesh.
6842 Don't parse the user action that might follow the guard, let...
6843 (readgram): do it, i.e., now, there can be an action after a
6844 guard.
6845 In other words the guard is just explicitly optional.
6846 (packgram): Adjust.
6847 * src/output.c (guards_output): New.
6848 (output_parser): Call it when needed.
6849 (output): Also free the guard and attrs obstacks.
6850 * src/files.c, src/files.h (obstack_save): Remove.
6851 (output_files): Remove.
6852 As a result, if one needs the former `.act' file, using an
6853 appropriate skeleton which requires actions and guards is now
6854 required.
6855 * src/main.c (main): Adjust.
6856 * tests/semantic.at: New.
6857 * tests/regression.at: Use `input.y' as input file name.
6858 Avoid 8+3 problems by requiring input.c when the test needs the
6859 parser.
6860
d945f5cd
AD
68612001-12-27 Akim Demaille <akim@epita.fr>
6862
6863 * src/reader.c (symbol_list_new): Be sure to initialize all the
6864 fields.
6865
d200e455
AD
68662001-12-27 Akim Demaille <akim@epita.fr>
6867
6868 All the hacks using a final pseudo state are now useless.
6869
6870 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6871 * src/lalr.c (nLA): New.
6872 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6873 instead of lookaheadsp from the pseudo state (nstate + 1).
6874
f9507c28
AD
68752001-12-27 Akim Demaille <akim@epita.fr>
6876
6877 * src/output.c (action_row, token_actions): Use a state_t instead
6878 of a integer, and nlookaheads instead of the following state's
6879 lookaheadsp.
6880
065fbd27
AD
68812001-12-27 Akim Demaille <akim@epita.fr>
6882
6883 * src/conflicts.c (log_resolution, flush_shift)
6884 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6885 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6886 (conflicts_print, print_reductions): Use a state_t instead of an
6887 integer when referring to a state.
6888 As much as possible, depend upon nlookaheads, instead of the
6889 `lookaheadsp' member of the following state (since lookaheads of
6890 successive states are successive, the difference between state n + 1
6891 and n served as the number of lookaheads for state n).
6892 * src/lalr.c (add_lookback_edge): Likewise.
6893 * src/print.c (print_core, print_actions, print_state)
6894 (print_results): Likewise.
6895 * src/print_graph.c (print_core, print_actions, print_state)
6896 (print_graph): Likewise.
6897 * src/conflicts.h: Adjust.
6898
1b177bd7
AD
68992001-12-27 Akim Demaille <akim@epita.fr>
6900
6901 * src/bison.hairy: Formatting/comment changes.
6902 ANSIfy.
6903 Remove `register' indications.
6904 Add plenty of `static'.
6905
7742ddeb
AD
69062001-12-27 Akim Demaille <akim@epita.fr>
6907
6908 * src/output.c (prepare): Drop the muscle `ntbase' which
6909 duplicates ntokens.
6910 * src/bison.simple: Formatting/comment changes.
6911 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6912 is an undocumented synonym.
6913
1fa14068
AD
69142001-12-22 Akim Demaille <akim@epita.fr>
6915
6916 * src/output.c (output_table_data): Change the prototype to use
6917 `int' for array ranges: some invocations do pass an int, not a
6918 short.
6919 Reported by Wayne Green.
6920
b9752825
AD
69212001-12-22 Akim Demaille <akim@epita.fr>
6922
6923 Some actions of web2c.y are improperly triggered.
6924 Reported by Mike Castle.
6925
6926 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6927 * tests/regression.at (Web2c): Rename as...
6928 (Web2c Report): this.
6929 (Web2c Actions): New.
6930
776209d6
AD
69312001-12-22 Akim Demaille <akim@epita.fr>
6932
6933 Reductions in web2c.y are improperly reported.
6934 Reported by Mike Castle.
6935
6936 * src/conflicts.c (print_reductions): Fix.
6937 * tests/regression.at (Web2c): New.
6938
275fc3ad
AD
69392001-12-18 Akim Demaille <akim@epita.fr>
6940
6941 Some host fail on `assert (!"foo")', which expands to
6942 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6943 Reported by Nelson Beebee.
6944
6945 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6946 `#define it_succeeded 0' and `assert (it_succeeded)'.
6947
897668ee
MA
69482001-12-17 Marc Autret <autret_m@epita.fr>
6949
6950 * src/bison.simple: Don't hard code the skeleton line and filename.
6951 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6952 New line counter 'skeleton_line' (skeleton-line muscle).
6953
ab3399e0
PE
69542001-12-17 Paul Eggert <eggert@twinsun.com>
6955
6956 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6957 YYDEBUG must be defined to a nonzero value.
6958
6959 * src/bison.simple (yytname): Do not assume that the user defines
6960 YYDEBUG to a properly parenthesized expression.
6961
3877f72b
AD
69622001-12-17 Akim Demaille <akim@epita.fr>
6963
6964 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6965 nlookaheads is a new member.
6966 Adjust all users.
6967 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6968 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6969 state.
776209d6 6970
331dbc1b
AD
69712001-12-17 Akim Demaille <akim@epita.fr>
6972
6973 * src/files.h, src/files.c (open_files, close_files): Remove.
6974 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6975 let...
6976 * src/reader.c (reader): Do it.
776209d6 6977
be750e4c
AD
69782001-12-17 Akim Demaille <akim@epita.fr>
6979
6980 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 6981
709ae8c6
AD
69822001-12-17 Akim Demaille <akim@epita.fr>
6983
6984 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6985 (flush_reduce): New.
6986 (resolve_sr_conflict): Adjust.
776209d6 6987
f87685c3
AD
69882001-12-17 Akim Demaille <akim@epita.fr>
6989
6990 * src/output.c (output_obstack): Be static and rename as...
6991 (format_obstack): this, to avoid any confusion with files.c's
6992 output_obstack.
6993 * src/reader.h (muscle_obstack): Move to...
6994 * src/output.h: here, since it's defined in output.c.
6995
837491d8
AD
69962001-12-17 Akim Demaille <akim@epita.fr>
6997
6998 * src/output.c (action_row, save_column, default_goto)
6999 (sort_actions, matching_state, pack_vector): Better variable
7000 locality.
7001
796d61fb
AD
70022001-12-17 Akim Demaille <akim@epita.fr>
7003
7004 * src/output.c: Various formatting changes.
776209d6 7005
64d15509
AD
70062001-12-17 Akim Demaille <akim@epita.fr>
7007
7008 * src/files.c (output_files): Free the output_obstack.
7009 * src/main.c (main): Call print and print_graph conditionally.
7010 * src/print.c (print): Work unconditionally.
7011 * src/print_graph.c (print_graph): Work unconditionally.
7012 * src/conflicts.c (log_resolution): Output only if verbose_flag.
7013
fbc8ecb7
MA
70142001-12-16 Marc Autret <autret_m@epita.fr>
7015
7016 * src/output.c (actions_output): Fix. When we use %no-lines,
7017 there is one less line per action.
7018
f0440388
MA
70192001-12-16 Marc Autret <autret_m@epita.fr>
7020
7021 * src/bison.simple: Remove a useless #line directive.
7022 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
7023 * src/output.c (get_lines_number): New.
776209d6 7024 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
7025 output muscles.
7026 Fix line numbering.
7027 (actions_output): Computes the number of lines taken by actions.
7028 (output_master_parser): Insert new skeleton which is the name of
7029 the output parser file name.
7030
a79986b8
MA
70312001-12-15 Marc Autret <autret_m@epita.fr>
7032
7033 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
7034
4ec8e00f
MA
70352001-12-15 Marc Autret <autret_m@epita.fr>
7036
7037 * src/output.c (output_gram): Keep track of the hairy one.
7038
1a4648ff
AD
70392001-12-15 Akim Demaille <akim@epita.fr>
7040
7041 Make `make distcheck' work.
7042
7043 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
7044 system.h which uses libgettext.h.
7045
9c2c67e6
AD
70462001-12-15 Akim Demaille <akim@epita.fr>
7047
7048 * src/nullable.c (set_nullable): Useless rules must be skipped,
7049 otherwise, since we range over their symbols, we might look at a
7050 nonterminal which no longer ``exists'', i.e., it is not counted in
7051 `nvars', hence we overflow our arrays.
7052
93ede233
AD
70532001-12-15 Akim Demaille <akim@epita.fr>
7054
7055 The header can also be produced directly, without any obstack!
7056 Yahoo!
7057
7058 * src/files.c, src/files.h (defines_obstack): Remove.
7059 (compute_header_macro): Global.
7060 (defines_obstack_save): Remove.
7061 * src/reader.c (parse_union_decl): No longer output to
7062 defines_obstack: its content can be found in the `stype' muscle
7063 anyway.
7064 (output_token_translations): Merge into...
7065 (symbols_output): this.
7066 Rename as...
7067 (symbols_save): this.
7068 (reader): Adjust.
7069 * src/output.c (header_output): New.
7070 (output): Call it.
7071
2666f928
AD
70722001-12-15 Akim Demaille <akim@epita.fr>
7073
7074 * src/reader.c (parse_union_decl): Instead of handling two obstack
7075 simultaneously, use one to define the `stype' muscle, and use the
7076 value of the latter to fill defines_obstack.
7077 (copy_comment): Remove.
7078 (copy_comment2): Work for a single obstack.
7079 Rename as...
7080 (copy_comment): this.
7081
428046f8
AD
70822001-12-15 Akim Demaille <akim@epita.fr>
7083
7084 * src/lex.c, src/lex.h (xgetc): No longer static.
7085 * src/reader.c (parse_union_decl): Revamp.
7086
ea52d706
AD
70872001-12-15 Akim Demaille <akim@epita.fr>
7088
7089 Still making progress in separating Bison into (i) input, (ii)
7090 process, (iii) output: now we can directly output the parser file
7091 without using table_obstack at all.
7092
7093 * src/files.c, src/files.h (table_obstack): Bye bye.
7094 (parser_file_name): New.
7095 * src/files.c (compute_output_file_names): Compute it.
7096 * src/output.c (actions_output, output_parser)
7097 (output_master_parser): To a file instead of an obstack.
7098
3f96f4dc
AD
70992001-12-15 Akim Demaille <akim@epita.fr>
7100
7101 Attach actions to rules, instead of pre-outputting them to
7102 actions_obstack.
7103
7104 * src/gram.h (rule_t): action and action_line are new members.
7105 * src/reader.c (symbol_list): Likewise.
7106 (copy_action): Save the actions within the rule.
7107 (packgram): Save them in rule_table.
7108 * src/output.c (actions_output): New.
7109 (output_parser): Use it on `%%actions'.
7110 (output_rule_data): Don't free rule_table.
7111 (output): Do it.
7112 (prepare): Don't save the `action' muscle.
7113 * src/bison.simple: s/%%action/%%actions/.
7114
51576fb3
AD
71152001-12-15 Akim Demaille <akim@epita.fr>
7116
7117 * src/reader.c (copy_action): When --yacc, don't append a `;'
7118 to the user action: let it fail if lacking.
dee049eb 7119 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 7120
2648a72d
AD
71212001-12-14 Akim Demaille <akim@epita.fr>
7122
7123 * src/lex.c (literalchar): Simply return the char you decoded, non
7124 longer mess around with obstacks and int pointers.
7125 Adjust all callers.
7126
92790e5b
AD
71272001-12-14 Akim Demaille <akim@epita.fr>
7128
7129 * src/lex.c (literalchar): Don't escape the special characters,
7130 just decode them, and keep them as char (before, eol was output as
7131 the 2 char string `\n' etc.).
7132 * src/output.c (output_rule_data): Use quotearg to output the
7133 token strings.
7134
927c1557
PE
71352001-12-13 Paul Eggert <eggert@twinsun.com>
7136
7137 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
7138 Do not infringe on the global user namespace when using C++.
7139 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
7140 All uses of `fprintf' and `stderr' changed.
7141
7142 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
7143
ed8e1f68
AD
71442001-12-13 Akim Demaille <akim@epita.fr>
7145
7146 The computation of nullable is broken: it doesn't handle empty
7147 RHS's properly.
7148
7149 * tests/torture.at (GNU AWK Grammar): New.
7150 * tests/sets.at (Nullable): New.
7151 * src/nullable.c (set_nullable): Instead of blindly looping over
7152 `ritems', loop over the rules, and then over their rhs's.
7153
7154 Work around Autotest bugs.
7155
7156 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
7157 frame, because Autotest understand lines starting with a `+' as
7158 traces from the shell. Then, they are not processed properly.
7159 Admittedly an Autotest bug, but we don't have time to wait for
7160 Autotest to catch up.
7161 * tests/regression.at (Broken Closure): Adjust to the new table
7162 frames.
7163 Move to...
7164 * tests/sets.at: here.
7165
cb581495
AD
71662001-12-13 Akim Demaille <akim@epita.fr>
7167
7168 * src/closure.c (closure): Use nrules instead of playing tricks
7169 with BITS_PER_WORD.
7170
2e729273
AD
71712001-12-13 Akim Demaille <akim@epita.fr>
7172
7173 * src/print.c (print_actions): Output the handling of `$' as the
7174 traces do: shifting the token EOF. Before EOF was treated as a
7175 nonterminal.
7176 * tests/regression.at: Adjust some tests.
7177 * src/print_graph.c (print_core): Complete the set of items via
7178 closure. The next-to-final and final states are still unsatisfying,
7179 but that's to be addressed elsewhere.
7180 No longer output the rule numbers, but do output the state number.
7181 A single loop for the shifts + gotos is enough, but picked a
7182 distinct color for each.
7183 (print_graph): Initialize and finalize closure.
7184
107f7dfb
AD
71852001-12-13 Akim Demaille <akim@epita.fr>
7186
7187 * src/reader.c (readgram): Remove dead code, an strip useless
7188 braces.
7189 (get_type): Remove, unused.
7190
9b53a24f
AD
71912001-12-12 Akim Demaille <akim@epita.fr>
7192
7193 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
7194 on that of lib/error.c.
7195
dbfb6dcd
AD
71962001-12-12 Akim Demaille <akim@epita.fr>
7197
7198 Some hosts don't like `/' in includes.
7199
7200 * src/system.h: Include libgettext.h without qualifying the path.
7201 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
7202 $(top_srcdir).
7203
c25fb648
MA
72042001-12-11 Marc Autret <autret_m@epita.fr>
7205
7206 * src/output.c (output_parser): Remove useless muscle.
7207
710ddc4f
MA
72082001-12-11 Marc Autret <autret_m@epita.fr>
7209
7210 * src/bison.simple: Remove #line just before %%epilogue. It
7211 is now handled in ...
7212 * src/reader.c (read_additionnal_code): Add the output of a
7213 #line for the epilogue.
7214
e83d80b8
MA
72152001-12-10 Marc Autret <autret_m@epita.fr>
7216
927c1557 7217 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
7218 replace precedent remove.
7219 * src/bison.simple: Remove #line before %%prologue because
7220 %%input-line is wrong at this time.
7221
971d5158
MA
72222001-12-10 Marc Autret <autret_m@epita.fr>
7223
7224 * src/reader.c (symbols_output): Clean up.
927c1557 7225 * src/output.c (output_gram, output): Clean up.
971d5158 7226
5edafffd
AD
72272001-12-10 Akim Demaille <akim@epita.fr>
7228
7229 * src/lalr.c (initialize_lookaheads): New. Extracted from...
7230 * src/LR0.c (set_state_table): here.
7231 * src/lalr.c (lalr): Call it.
7232
0279f8e9
AD
72332001-12-10 Akim Demaille <akim@epita.fr>
7234
7235 * src/state.h (shifts): Remove the `number' member: shifts are
7236 attached to state, hence no longer need to be labelled with a
7237 state number.
7238
190c4f5f
AD
72392001-12-10 Akim Demaille <akim@epita.fr>
7240
7241 Now that states have a complete set of members, the linked list of
7242 shifts is useless: just fill directly the state's shifts member.
7243
7244 * src/state.h (shifts): Remove the `next' member.
7245 * src/LR0.c (first_state, last_state): Remove.
7246 Adjust the callers.
7247 (augment_automaton): Don't look for the shifts that must be added
7248 a shift on EOF: it is those of the state we looked for! But now,
7249 since shifts are attached, it is no longer needed to looking
7250 merely by its id: its number.
7251
2a73b93d
AD
72522001-12-10 Akim Demaille <akim@epita.fr>
7253
7254 * src/LR0.c (augment_automaton): Better variable locality.
7255 Remove an impossible branch: if there is a state corresponding to
7256 the start symbol being shifted, then there is shift for the start
7257 symbol from the initial state.
7258
74392f6a
AD
72592001-12-10 Akim Demaille <akim@epita.fr>
7260
7261 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
7262 only when appropriate: when insert_start_shifting_state' is not
7263 invoked.
7264 * tests/regression.at (Rule Line Numbers): Adjust.
7265
37c82725
AD
72662001-12-10 Akim Demaille <akim@epita.fr>
7267
7268 * src/LR0.c (augment_automaton): Now that all states have shifts,
7269 merge the two cases addition shifts to the initial state.
7270
6a164e0c
AD
72712001-12-10 Akim Demaille <akim@epita.fr>
7272
7273 * src/lalr.c (set_state_table): Move to...
7274 * src/LR0.c: here.
7275 * src/lalr.c (lalr): Don't call it...
7276 * src/LR0.c (generate_states): do it.
7277 * src/LR0.h (first_state): Remove, only the table is used.
7278
7215de24
AD
72792001-12-10 Akim Demaille <akim@epita.fr>
7280
7281 * src/LR0.h (first_shift, first_reduction): Remove.
7282 * src/lalr.c: Don't use first_shift: find shifts through the
7283 states.
7284
80e25d4d
AD
72852001-12-10 Akim Demaille <akim@epita.fr>
7286
7287 * src/LR0.c: Attach shifts to states as soon as they are
7288 computed.
7289 * src/lalr.c (set_state_table): Instead of assigning shifts to
7290 state, just assert that the mapping was properly done.
7291
0ab3728b
AD
72922001-12-10 Akim Demaille <akim@epita.fr>
7293
7294 * src/LR0.c (insert_start_shift): Rename as...
7295 (insert_start_shifting_state): this.
7296 (insert_eof_shifting_state, insert_accepting_state): New.
7297 (augment_automaton): Adjust.
7298 Better locality of the variables.
7299 When looking if the start_symbol is shifted from the initial
7300 state, using `while (... symbol != start_symbol ...)' sounds
7301 better than `while (... symbol < start_symbol ...)': If fail
7302 to see how the order between symbols could be relevant!
7303
78af9bbc
AD
73042001-12-10 Akim Demaille <akim@epita.fr>
7305
7306 * src/getargs.h: Don't declare `spec_name_prefix' and
7307 `spec_file_prefix', declared by src/files.h.
7308 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
7309 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
7310 * src/output.c (prepare): Adjust.
7311 * src/reader.c (symbols_output): Likewise.
7312 * src/vmsgetargs.c: Vaguely adjust, but who cares?
7313
bdef2a41
AD
73142001-12-10 Akim Demaille <akim@epita.fr>
7315
7316 * src/muscle_tab.c (muscle_init): NULL is a better default than
7317 `"0"'.
7318
3735969c
AD
73192001-12-10 Akim Demaille <akim@epita.fr>
7320
7321 * src/reader.c (reader): Calling symbols_output once is enough.
7322
49701457
AD
73232001-12-10 Akim Demaille <akim@epita.fr>
7324
7325 Now that states have a complete set of members, the linked list of
7326 reductions is useless: just fill directly the state's reductions
7327 member.
7328
7329 * src/state.h (struct reductions): Remove member `number' and
7330 `next'.
7331 * src/LR0.c (first_reduction, last_reduction): Remove.
7332 (save_reductions): Don't link the new reductions, store them in
7333 this_state.
7334 * src/lalr.c (set_state_table): No need to attach reductions to
7335 states, it's already done.
7336 * src/output.c (output_actions): No longer free the shifts, then
7337 the reductions, then the states: free all the states and their
7338 members.
7339
0edad749
AD
73402001-12-10 Akim Demaille <akim@epita.fr>
7341
7342 * src/options.c (OPTN, DRTV, BOTH): New.
7343 (option_table): Use them.
7344
0edad749
AD
7345 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
7346 the job of system.h.
7347 * src/options.c: Don't include stdio.h and xalloc.h for the same
7348 reasons.
7349
5449dd0f
AD
73502001-12-10 Akim Demaille <akim@epita.fr>
7351
7352 * src/output.c (output, prepare): Make sure the values of the
7353 muscles `action' and `prologue' are 0-terminated.
7354
a870c567
AD
73552001-12-10 Akim Demaille <akim@epita.fr>
7356
7357 Clean up GCC warnings.
7358
7359 * src/reader.c (copy_action): `buf' is not used.
7360 (parse_skel_decl): Be static.
7361 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
7362 * src/options.h (create_long_option_table): Have a real prototype.
7363 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
7364 (hash_delete_at): Return const void *.
7365 Adjust casts to preserve the const.
7366
80df8768
AD
73672001-12-10 Akim Demaille <akim@epita.fr>
7368
7369 * configure.in: Require 2.52g.
7370 M4 is not needed, but AUTOM4TE is.
7371 * m4/m4.m4: Remove.
7372 * tests/Makefile.am: Adjust.
7373
f693ad14
AD
73742001-12-10 Akim Demaille <akim@epita.fr>
7375
7376 One structure for states is enough, even though theoretically
7377 there are LR(0) states and LALR(1) states.
7378
7379 * src/lalr.h (state_t): Remove.
7380 (state_table): Be state_t **, not state_t *.
7381 * src/state.h (core, CORE_ALLOC): Rename as...
7382 (state_t, STATE_ALLOC): this.
7383 Add the LALR(1) members: shifts, reductions, errs.
7384 * src/LR0.c (state_table): Rename as...
7385 (state_hash): this, to avoid name clashes with the global
7386 `state_table'.
7387 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
7388 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
7389
74ffbcb6
AD
73902001-12-10 Akim Demaille <akim@epita.fr>
7391
7392 Bison dumps core on bash.y.
7393 Reported by Pascal Bart.
7394
7395 * src/warshall.c (bitmatrix_print): New.
7396 (TC): Use it.
7397 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
7398 j must be the outer loop.
7399 * tests/regression.at (Broken Closure): New.
7400
07708e19
AD
74012001-12-05 Akim Demaille <akim@epita.fr>
7402
7403 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
7404 its argument.
ba1ecc07 7405 Reported by Peter Hamorsky.
07708e19 7406
92b16366
AD
74072001-12-05 Akim Demaille <akim@epita.fr>
7408
7409 * src/conflicts.c (err_table): Remove.
7410 (resolve_sr_conflict): Adjust.
7411 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
7412 Rename as...
7413 (state_t.reductions, state_t.shifts): this.
7414
076ab033
AD
74152001-12-05 Akim Demaille <akim@epita.fr>
7416
7417 * src/reduce.c (reduce_grammar_tables): No longer disable the
7418 removal of useless rules via CPP but via `if (0)', so that the
7419 compiler still check the code is valid.
7420 For instance, it should have noticed `rline' no longer exists: use
7421 the `line' member of rule_t.
7422 * src/gram.c (dummy, rline): Remove, unused.
7423
3843c413
AD
74242001-12-05 Akim Demaille <akim@epita.fr>
7425
7426 * src/output.c (pack_vector): Use assert, not berror.
7427 * src/main.c (berror): Remove, unused.
7428
43168960
AD
74292001-12-05 Akim Demaille <akim@epita.fr>
7430
7431 New experimental feature: if --verbose --trace output all the
7432 items of a state, not only its kernel.
7433
7434 * src/print.c (print_core): If `trace_flag', then invoke closure
7435 before outputting the items of the state (print_core is no longer
7436 a correct name them).
7437 (print_results): Invoke new_closure/free_closure if needed.
7438
b2872512
AD
74392001-12-05 Akim Demaille <akim@epita.fr>
7440
7441 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
7442 * src/closure.c, src/closure.h (itemsetsize): Rename as...
7443 (nitemset): for consistency with the rest of the project.
7444
23cbcc6c
AD
74452001-12-05 Akim Demaille <akim@epita.fr>
7446
7447 * src/closure.c (print_closure): Improve.
7448 (closure): Use it for printing input and output.
7449
03ec521c
AD
74502001-12-05 Akim Demaille <akim@epita.fr>
7451
7452 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
7453 indexed by nonterminals.
7454
3a7456dd
AD
74552001-12-05 Akim Demaille <akim@epita.fr>
7456
7457 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
7458 what it was!).
7459 * src/warshall.h: Remove accidental duplication of the content.
7460
1cbcf2e7
AD
74612001-12-05 Akim Demaille <akim@epita.fr>
7462
7463 * src/closure.c (set_fderives): De-obfuscate.
7464
84182270
AD
74652001-12-05 Akim Demaille <akim@epita.fr>
7466
7467 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
7468
3f6f053c
AD
74692001-12-05 Akim Demaille <akim@epita.fr>
7470
7471 * src/closure.c (set_firsts): De-obfuscate.
7472
7a5350ba
AD
74732001-12-05 Akim Demaille <akim@epita.fr>
7474
7475 * src/output.c (action_row): De-obfuscate
7476 using the good o' techniques: arrays not pointers, variable
7477 locality, BITISSET, RESETBIT etc.
7478
d954473d
AD
74792001-12-05 Akim Demaille <akim@epita.fr>
7480
7481 Pessimize the code to simplify it: from now on, all the states
7482 have a valid SHIFTS, which NSHIFTS is possibly 0.
7483
7484 * src/LR0.c (shifts_new): Be global and move to..
7485 * src/state.c, src/state.h: here.
7486 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
7487 * src/print_graph: Adjust.
7488
9839bbe5
AD
74892001-12-05 Akim Demaille <akim@epita.fr>
7490
7491 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
7492 * src/conflicts.c: Use it.
7493 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
7494 incorrectly ``simplified''.
7495
9f136c07
AD
74962001-12-05 Akim Demaille <akim@epita.fr>
7497
7498 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
7499 using the good o' techniques: arrays not pointers, variable
7500 locality, BITISSET, RESETBIT etc.
7501
b608206e
AD
75022001-12-05 Akim Demaille <akim@epita.fr>
7503
7504 * src/state.h (SHIFT_SYMBOL): New.
7505 * src/conflicts.c: Use it to deobfuscate.
7506
52afa962
AD
75072001-12-05 Akim Demaille <akim@epita.fr>
7508
7509 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
7510 (print_reductions): De-obfuscate using the good o' techniques:
7511 arrays not pointers, variable locality, BITISSET.
7512
e74dc321
AD
75132001-12-05 Akim Demaille <akim@epita.fr>
7514
7515 * src/conflicts.c (print_reductions): Arrays, not pointers.
7516 Use BITISSET.
7517
768fca83
AD
75182001-12-05 Akim Demaille <akim@epita.fr>
7519
7520 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7521
a17e599f
AD
75222001-12-05 Akim Demaille <akim@epita.fr>
7523
7524 * src/conflicts.c (print_reductions): Improve variable locality.
7525
a04bc341
AD
75262001-12-05 Akim Demaille <akim@epita.fr>
7527
7528 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7529
c8ea038e
AD
75302001-12-05 Akim Demaille <akim@epita.fr>
7531
7532 * src/conflicts.c (print_reductions): Improve variable locality.
7533
aa2aab3c
AD
75342001-12-05 Akim Demaille <akim@epita.fr>
7535
7536 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
7537 * src/lalr.c: Use them.
7538
b178c8cc
AD
75392001-12-05 Akim Demaille <akim@epita.fr>
7540
7541 * src/LR0.c (augment_automaton): Formatting changes.
7542 Better variable locality.
7543
f67d13aa
AD
75442001-12-05 Akim Demaille <akim@epita.fr>
7545
7546 * src/lalr.c (matrix_print): New.
7547 (transpose): Use it.
7548 Use arrays instead of pointers.
7549
c2713865
AD
75502001-12-05 Akim Demaille <akim@epita.fr>
7551
7552 * src/lalr.c (maxrhs): Move to...
7553 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
7554 * src/lalr.c (build_relations): Adjust.
7555
9887c18a
AD
75562001-12-05 Akim Demaille <akim@epita.fr>
7557
7558 * src/lalr.c (transpose): Free the memory allocated to the
7559 argument, as it is replaced by the results by the unique caller.
7560 (build_relations): Merely invoke transpose: it handles the memory
7561 deallocation.
7562 Improve variable locality.
7563 Avoid variables used as mere abbreviations.
7564 (compute_lookaheads): Use arrays instead of pointers.
7565
4d4f699c
AD
75662001-12-05 Akim Demaille <akim@epita.fr>
7567
7568 * src/lalr.c (initialize_F): Improve variable locality.
7569 Avoid variables used as mere abbreviations.
7570
80a69750
AD
75712001-12-05 Akim Demaille <akim@epita.fr>
7572
7573 * src/derives.c (print_derives): Display the ruleno.
7574 * src/lalr.c (initialize_F, transpose): Better variable locality
7575 to improve readability.
7576 Avoid variables used as mere abbreviations.
7577
fe961097
AD
75782001-12-05 Akim Demaille <akim@epita.fr>
7579
7580 * src/lalr.c (traverse): Use arrays instead of pointers.
7581
e3e4e814
AD
75822001-12-05 Akim Demaille <akim@epita.fr>
7583
7584 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
7585 the handling of squeue.
7586 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7587
630e182b
AD
75882001-12-05 Akim Demaille <akim@epita.fr>
7589
7590 Because useless nonterminals are now kept alive (instead of being
7591 `destroyed'), we now sometimes examine them, and store information
7592 related to them. Hence we need to know their number, and adjust
7593 memory allocations.
7594
7595 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7596 static.
7597 * src/LR0.c (allocate_itemsets): The memory allocated to
7598 `symbol_count' was used for two different purpose: once to count
7599 the number of occurrences of each symbol, and later reassigned to
7600 `shift_symbol', containing the symbol that can be shifted from a
7601 given state.
7602 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7603 only, and...
7604 (new_itemsets): Allocate `shift_symbol' here.
7605 (allocate_itemsets): symbol_count includes useless nonterminals.
7606 Make room for them.
7607 (free_storage): Use `free', not `XFREE', for pointers that cannot
7608 be null.
7609
81b51460
AD
76102001-12-05 Akim Demaille <akim@epita.fr>
7611
7612 * src/nullable.c (set_nullable): Deobfuscate the handling of
7613 ritem.
7614 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7615
3067fbef
AD
76162001-12-05 Akim Demaille <akim@epita.fr>
7617
7618 * src/gram.c, src/gram.h (ritem_print): New.
7619 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7620 (This useless function was defined only to work around VMS linkers
7621 that can't handle compilation units with variables only).
7622 * src/reduce.c (dump_grammar): Use it to trace the construction of
7623 ritem.
7624
c2bea5f9
PE
76252001-12-04 Paul Eggert <eggert@twinsun.com>
7626
7d27c823
PE
7627 * src/bison.simple (union yyalloc): Change member names
7628 to be the same as the stack names.
7629 (yyparse): yyptr is now union yyalloc *, not char *.
7630 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7631 and may generate better code on some machines.
c2bea5f9
PE
7632 (yystpcpy): Use prototype if __STDC__ is defined, not just
7633 if __cplusplus is defined.
35687a9d 7634
2c8a9dfa
AD
76352001-11-30 Akim Demaille <akim@epita.fr>
7636
7637 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7638 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7639 Gettext doesn't compile cleanly, and dies with -Werror.
7640 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7641 Include WARNING_CFLAGS here.
7642 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7643 before being defined.
7644
f4e421e6
AD
76452001-11-27 Paul Eggert <eggert@twinsun.com>
7646
7647 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7648 First arg is int, not unsigned.
7649 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7650 (SIZE_MAX, UINT_MAX): New macros.
7651 (quotearg_n_options): Abort if N is negative.
7652 Avoid overflow check on hosts where size_t is 64 bits and int
7653 is 32 bits, as overflow is impossible there.
7654 Fix off-by-one typo that caused unnecessary reallocation.
7655
7093d0f5
AD
76562001-11-29 Paul Eggert <eggert@twinsun.com>
7657
7658 Name space cleanup in generated parser.
7659
7660 * doc/bison.texinfo (Bison Parser): Discuss system headers
7661 and their effect on the user name space.
7662
7663 * src/bison.simple:
7664 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7665 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7666 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7667
7668 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7669 on user names when possible.
7670
7671 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7672 Simplify test for whather <alloca.h> exists.
7673
7674 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7675
7676 (<stdio.h>): Include if YYDEBUG.
7677
7678 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7679 ! defined (yyoverflow) && ! defined (yymemcpy).
7680
7681 (yymemcpy, yyparse): Rename local variables as needed so that
7682 they all begin with 'yy'.
7683
7684 (yystrlen, yystpcpy): New functions.
7685
7686 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7687 All uses changed.
7688
7689 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7690 instead of relying on string.h functions. Use YYSTACK_ALLOC
7691 and YYSTACK_FREE instead of malloc and free.
7692
fd51e5ff
AD
76932001-11-30 Akim Demaille <akim@epita.fr>
7694
7695 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7696 before their first uses.
7697 (YYBISON, YYPURE): Move to the top of the output.
7698
7d13ff5f
AD
76992001-11-30 Akim Demaille <akim@epita.fr>
7700
7701 * tests/reduce.at (Useless Nonterminals): Fix.
7702
892a3995
AD
77032001-11-30 Akim Demaille <akim@epita.fr>
7704
7705 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7706 if body instead of `;' to pacify GCC's warnings.
7707
68f1e3ed
AD
77082001-11-30 Akim Demaille <akim@epita.fr>
7709
7710 Instead of mapping the LHS of unused rules to -1, keep the LHS
7711 valid, but flag the rules as invalid.
7712
7713 * src/gram.h (rule_t): `useful' is a new member.
7714 * src/print.c (print_grammar): Adjust.
7715 * src/derives.c (set_derives): Likewise.
7716 * src/reader.c (packgram, reduce_output): Likewise.
7717 * src/reduce.c (reduce_grammar_tables): Likewise.
7718 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7719
d2d1b42b
AD
77202001-11-30 Akim Demaille <akim@epita.fr>
7721
7722 * src/reduce.c (reduce_output): Formatting changes.
7723 * src/print.c (print_results, print_grammar): Likewise.
7724 * tests/regression.at (Rule Line Numbers)
7725 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7726
760b53a8
AD
77272001-11-30 Akim Demaille <akim@epita.fr>
7728
7729 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7730 useless nonterminals, move them at the end of the symbol arrays.
7731 (reduce_output): Adjust.
7732 * tests/reduce.at (Useless Nonterminals): Adjust.
7733
00238958
AD
77342001-11-30 Akim Demaille <akim@epita.fr>
7735
7736 * src/reduce.c: Various comment/formatting changes.
7737 (nonterminals_reduce): New, extracted from...
7738 (reduce_grammar_tables): here.
7739 (reduce_grammar): Call nonterminals_reduce.
7740
396452de
PE
77412001-11-29 Paul Eggert <eggert@twinsun.com>
7742
7743 * src/bison.simple (YYSTACK_REALLOC): Remove.
7744 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7745 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7746 New macros.
7747 (union yyalloc): New type.
7748 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7749 an arbitrary restriction on hosts where size_t is wider than int.
7750
7751 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7752 a parser stack overflow. Allocate just one block of memory for all
7753 three stacks, instead of allocating three blocks; this typically is
7754 faster and reduces fragmentation.
7755
7756 Do not limit the number of items in the stack to a value that fits
7757 in 'int', as this is an arbitrary limit on hosts with 64-bit
7758 size_t and 32-bit int.
7759
147e184c
MA
77602001-11-29 Marc Autret <autret_m@epita.fr>
7761
7762 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7763 of defining YYERROR_VERBOSE.
7764 [AT_DATA]: $4 is now out of C declarations in the prologue.
7765
426cf563
MA
77662001-11-28 Marc Autret <autret_m@epita.fr>
7767
7768 * src/reader.c (parse_dquoted_param): New.
7769 (parse_skel_decl): Use it.
7770 * src/lex.h: Add its prototype.
7771 * src/lex.c (literalchar): Become not static.
7772
c7925b99
MA
77732001-11-28 Marc Autret <autret_m@epita.fr>
7774
7775 * src/output.h: And put its extern declaration here.
7776 * src/output.c (error_verbose): Define here.
7777 (prepare): Echo name modification.
7778 * src/getargs.h: Clean its extern declaration.
7779 * src/getargs.c (error_verbose_flag): Remove.
7780 (getargs): Remove case 'e'.
7781 * src/options.c (option_table): 'error-verbose' is now seen as simple
7782 percent option.
7783 Include output.h.
7784
7785 * src/reader.c (read_declarations): Remove case tok_include.
7786 (parse_include_decl): Remove.
7787 * src/lex.h (token_t): Remove tok_include.
7788 * src/options.c (option_table): 'include' is now a simple command line
7789 option.
7790
5b5d1929
MA
77912001-11-28 Marc Autret <autret_m@epita.fr>
7792
7793 * src/bison.simple: Adjust muscle names.
7794 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7795 * src/output.c (prepare): s/_/-/ for the muscles names.
7796 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7797
8850be4b
MA
77982001-11-28 Marc Autret <autret_m@epita.fr>
7799
7800 * src/bison.simple: Fix debug.
7801 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7802
4a38e613
AD
78032001-11-28 Akim Demaille <akim@epita.fr>
7804
7805 * src/LR0.c (shifts_new): New.
7806 (save_shifts, insert_start_shift, augment_automaton): Use it.
7807
4b35e1c1
AD
78082001-11-28 Akim Demaille <akim@epita.fr>
7809
7810 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7811 keep ruleno only.
7812
d2b04478
AD
78132001-11-28 Akim Demaille <akim@epita.fr>
7814
7815 * src/closure.c (closure): Instead of looping over word in array
7816 then bits in words, loop over bits in array.
7817
2c4c30aa
AD
78182001-11-28 Akim Demaille <akim@epita.fr>
7819
7820 * src/closure.c (closure): No longer optimize the special case
7821 where all the bits of `ruleset[r]' are set to 0, to make the code
7822 clearer.
7823
576890b7
AD
78242001-11-28 Akim Demaille <akim@epita.fr>
7825
7826 * src/closure.c (closure): `r' and `c' are new variables, used to
7827 de-obfuscate accesses to RULESET and CORE.
7828
cb487d7d
AD
78292001-11-28 Akim Demaille <akim@epita.fr>
7830
7831 * src/reduce.c (reduce_print): Use ngettext.
7832 (dump_grammar): Improve the trace accuracy.
7833
6013d43f
AD
78342001-11-28 Akim Demaille <akim@epita.fr>
7835
7836 * src/reduce.c (dump_grammar): Don't translate trace messages.
7837
cb4956ee
AD
78382001-11-28 Akim Demaille <akim@epita.fr>
7839
7840 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7841 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7842 as all tags are free'ed afterwards.
7843 From Enrico Scholz.
7844
648185ab
PE
78452001-11-27 Paul Eggert <eggert@twinsun.com>
7846
7847 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7848 use alloca when we didn't want to, and vice versa.
7849
68254a03
MA
78502001-11-27 Marc Autret <autret_m@epita.fr>
7851
9113b58f
AD
7852 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7853 initialization.
68254a03
MA
7854 * src/output.c (prepare): Remove its update.
7855
04d843a2
MA
78562001-11-27 Marc Autret <autret_m@epita.fr>
7857
7858 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7859 Use %error-verbose.
7860
d2079671 78612001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
7862
7863 * src/bison.simple: Remove YYERROR_VERBOSE using.
7864 Use %%error_verbose.
7865 (yyparse): Likewise.
7866 * src/output.c (prepare): Give its final value.
7867 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7868 * src/getargs.h: Add its extern declaration.
7869 * src/getargs.c (error_verbose_flag): New int.
7870 (getargs): Update to catch new case.
7871 * src/options.c (option_table): 'error-verbose' is a new option.
7872 (shortopts): Update.
7873
e0327bc8
AD
78742001-11-27 Akim Demaille <akim@epita.fr>
7875
7876 * src/system.h: Use intl/libgettext.h.
7877 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7878
000f1a3c
AD
78792001-11-27 Akim Demaille <akim@epita.fr>
7880
7881 * tests/torture.at (Exploding the Stack Size with Malloc):
7882 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7883
26cfe0be
AD
78842001-11-27 Akim Demaille <akim@epita.fr>
7885
7886 * src/files.c: Include error.h.
7887 Reported by Hans Aberg.
7888
f6bd5427
MA
78892001-11-26 Marc Autret <autret_m@epita.fr>
7890
d2079671 7891 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
7892 (read_declarations): Add case tok_include.
7893 * src/getargs.h (include): Add its extern definition.
7894 * src/getargs.c (include): New const char *.
7895 (getargs): Add case '-I'.
7896 * src/options.c (option_table): Add include as command line and
7897 percent option.
7898 * src/lex.h (token_t): Add tok_include.
7899
2ca209c1
AD
79002001-11-26 Akim Demaille <akim@epita.fr>
7901
7902 * src/reader.c (readgram): Make sure rules for mid-rule actions
7903 have a lineno equal to that of their host rule.
7904 Reported by Hans Aberg.
7905 * tests/regression.at (Rule Line Numbers): New.
7906
0e41b407
AD
79072001-11-26 Akim Demaille <akim@epita.fr>
7908
7909 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7910 size_ts.
7911
79122001-11-26 Akim Demaille <akim@epita.fr>
7913
7914 * src/complain.c, src/complain.h (error): Remove, provided by
7915 lib/error.[ch].
7916
e0c40012
AD
79172001-11-26 Akim Demaille <akim@epita.fr>
7918
7919 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7920 issue an error message.
7921 * tests/regression.at (Invalid %directive): New.
7922 Reported by Hans Aberg.
7923
5e147124
AD
79242001-11-26 Akim Demaille <akim@epita.fr>
7925
7926 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7927 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7928
a034c8b8
AD
79292001-11-26 Akim Demaille <akim@epita.fr>
7930
7931 * src/conflicts.c (conflicts_print): Don't complain at all when
7932 there are no reduce/reduce conflicts, and as many shift/reduce
7933 conflicts as expected.
7934 * tests/regression.at (%expect right): Adjust.
7935
c64a20f3
AD
79362001-11-23 Akim Demaille <akim@epita.fr>
7937
7938 * lib/alloca.c: Update, from fileutils.
7939
5b0d29bb
AD
79402001-11-23 Akim Demaille <akim@epita.fr>
7941
7942 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7943
722c4bfe
AD
79442001-11-23 Akim Demaille <akim@epita.fr>
7945
7946 * src/system.h: Include alloca.h.
7947 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7948
6255b435
AD
79492001-11-23 Akim Demaille <akim@epita.fr>
7950
7951 * src/print_graph.c (print_actions): Remove `rule', unused.
7952 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7953 pacify GCC's signed < unsigned warnings.
7954 * src/closure.c (itemsetsize): Likewise.
7955 * src/reader.c (symbol_list_new): Static.
7956
b29b2ed5
AD
79572001-11-23 Akim Demaille <akim@epita.fr>
7958
7959 Attaching lineno to buckets is stupid, since only one copy of each
7960 symbol is kept, only the line of the first occurrence is kept too.
7961
7962 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7963 * src/reader.c (rline_allocated): Remove, unused.
7964 (symbol_list): Have a `line' member.
7965 (symbol_list_new): New.
7966 (readgram): Use it.
7967 * src/print.c (print_grammar): Output the rule line numbers.
7968 * tests/regression.at (Solved SR Conflicts)
7969 (Unresolved SR Conflicts): Adjust.
7970 Reported by Hans Aberg.
7971
a81b1d4a
MA
79722001-11-22 Marc Autret <autret_m@epita.fr>
7973
7974 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7975
c1ecb3c1
MA
79762001-11-22 Marc Autret <autret_m@epita.fr>
7977
7978 * src/muscle_tab.c (muscle_init): Remove initialization of
7979 skeleton muscle.
7980 * src/output.c (output_master_parser): Do it here.
7981
fbe01355
AD
79822001-11-20 Akim Demaille <akim@epita.fr>
7983
7984 * po/sv.po: New.
7985 * configure.in (ALL_LINGUAS): Adjust.
7986 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7987 longer contains strings to translate.
7988
81e895c0
AD
79892001-11-19 Akim Demaille <akim@epita.fr>
7990
7991 * src/conflicts.c (conflicts_print): Add a missing \n.
7992
6bb1878b
AD
79932001-11-19 Akim Demaille <akim@epita.fr>
7994
7995 * src/nullable.c (nullable_print): New.
7996 (set_nullable): Call it when tracing.
7997 Better locality of variables.
7998
d9ec2d07
AD
79992001-11-19 Akim Demaille <akim@epita.fr>
8000
8001 * src/print.c (print_actions): Better locality of variables.
8002
720e5c1b
AD
80032001-11-19 Akim Demaille <akim@epita.fr>
8004
8005 * src/derives.c (print_derives): Fix and enrich.
8006 * src/closure.c (print_fderives): Likewise.
8007
fb908786
AD
80082001-11-19 Akim Demaille <akim@epita.fr>
8009
8010 * src/closure.c (itemsetend): Remove, replaced with...
8011 (itemsetsize): new.
8012
125ecb56
AD
80132001-11-19 Akim Demaille <akim@epita.fr>
8014
8015 * src/LR0.c (kernel_end): Remove, replaced with...
8016 (kernel_size): new.
8017
d8cf039f
AD
80182001-11-19 Akim Demaille <akim@epita.fr>
8019
8020 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
8021 to clarify.
8022
7bec0760
AD
80232001-11-19 Akim Demaille <akim@epita.fr>
8024
8025 * src/closure.c (closure): Use arrays instead of pointers to clarify.
8026
c87d4863
AD
80272001-11-19 Akim Demaille <akim@epita.fr>
8028
8029 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
8030 trace messages.
8031 * src/LR0.c: Likewise.
8032 (allocate_itemsets): Use arrays instead of pointers to clarify.
8033
9bfe901c
AD
80342001-11-19 Akim Demaille <akim@epita.fr>
8035
8036 * src/getargs.c (statistics_flag): Replace with...
8037 (trace_flag): New.
8038 (longopts): Accept --trace instead of --statistics.
8039 * src/getargs.h, src/options.c: Adjust.
8040 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
8041 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
8042
97db7bd4
AD
80432001-11-19 Akim Demaille <akim@epita.fr>
8044
cc72668c 8045 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
8046 pointers to clarify the code.
8047 (save_reductions, save_shifts): Factor common parts of alternatives.
8048
2c5f66ed
AD
80492001-11-19 Akim Demaille <akim@epita.fr>
8050
8051 * src/LR0.c (new_state, get_state): Complete TRACE code.
8052 * src/closure.c: Include `reader.h' to get `tags', needed by the
8053 trace code.
8054 Rename the conditional DEBUG as TRACE.
8055 Output consistently TRACEs to stderr, not stdout.
8056 * src/derives.c: Likewise.
8057 * src/reduce.c: (inaccessable_symbols): Using if is better style
8058 than goto.
8059 Use `#if TRACE' instead of `#if 0' for tracing code.
8060
300f275f
AD
80612001-11-19 Akim Demaille <akim@epita.fr>
8062
8063 * src/system.h (LIST_FREE, shortcpy): New.
8064 * src/LR0.c: Use them.
8065 * src/output.c (free_itemsets, free_reductions, free_shifts):
8066 Remove, replaced by LIST_FREE.
8067
f59c437a
AD
80682001-11-19 Akim Demaille <akim@epita.fr>
8069
8070 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8071 (REDUCTIONS_ALLOC): New.
8072 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8073 allocation.
8074
6986fd9e
AD
80752001-11-19 Akim Demaille <akim@epita.fr>
8076
8077 * src/LR0.c (new_state): Complete trace code.
8078 * src/nullable.c (set_nullable): Don't translate traces.
8079
4bc30f78
AD
80802001-11-19 Akim Demaille <akim@epita.fr>
8081
8082 * src/print_graph.c (print_core): Better locality of variables.
8083 * src/print.c (print_core): Likewise.
8084
08a946e0
AD
80852001-11-19 Akim Demaille <akim@epita.fr>
8086
8087 * src/vcg.c: You do the output, so you are responsible of the
8088 handling of VCG syntax, in particular: use quotearg.
8089 * src/print_graph.c: Don't.
8090 (print_actions): Don't output the actions as part of the nodes,
8091 since that's the job of the edges.
8092 (print_state): Don't output by hand: fill the node description,
9bfe901c 8093 and ask for its output.
08a946e0 8094
f0473484
AD
80952001-11-19 Akim Demaille <akim@epita.fr>
8096
cc72668c
AD
8097 * src/bison.simple (yyparse): When verbosely reporting an error,
8098 no longer put additional quotes around token names.
f0473484
AD
8099 * tests/calc.at: Adjust.
8100
e41dc700
AD
81012001-11-19 Akim Demaille <akim@epita.fr>
8102
8103 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8104 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8105 * src/output.c: Adjust.
8106
652a871c
AD
81072001-11-19 Akim Demaille <akim@epita.fr>
8108
8109 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8110 (rule_t): this.
8111 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8112
b2ed6e58
AD
81132001-11-19 Akim Demaille <akim@epita.fr>
8114
8115 * src/gram.h (rule_t): New.
8116 (rule_table): New.
8117 (rrhs, rlhs): Remove, part of state_t.
8118 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8119 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8120 * src/reader.c, src/reduce.c: Adjust.
8121
edad7067
AD
81222001-11-19 Akim Demaille <akim@epita.fr>
8123
8124 * src/reader.c (symbols_output): New, extracted from...
8125 (packsymbols): Here.
8126 (reader): Call it.
8127
3feec034
AD
81282001-11-19 Akim Demaille <akim@epita.fr>
8129
8130 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8131 (maxrhs): this new function.
8132
ddcd5fdf
AD
81332001-11-19 Akim Demaille <akim@epita.fr>
8134
cc72668c 8135 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
8136 Adjust.
8137
bb527fc2
AD
81382001-11-19 Akim Demaille <akim@epita.fr>
8139
cc72668c 8140 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
8141 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8142 * src/lalr.c: Adjust.
8143
a845a697
AD
81442001-11-19 Akim Demaille <akim@epita.fr>
8145
8146 * src/lalr.c (initialize_LA): Only initialize LA. Let...
8147 (set_state_table): handle the `lookaheads' members.
8148
f004bf6a
AD
81492001-11-19 Akim Demaille <akim@epita.fr>
8150
cc72668c
AD
8151 * src/lalr.h (lookaheads): Removed array, whose contents is now
8152 a member of...
f004bf6a
AD
8153 (state_t): this structure.
8154 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8155 Adjust.
8156
de326cc0
AD
81572001-11-19 Akim Demaille <akim@epita.fr>
8158
cc72668c
AD
8159 * src/lalr.h (consistent): Removed array, whose contents is now
8160 a member of...
de326cc0
AD
8161 (state_t): this structure.
8162 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8163 Adjust.
8164
90b4416b
AD
81652001-11-19 Akim Demaille <akim@epita.fr>
8166
cc72668c
AD
8167 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
8168 contents are now members of...
90b4416b
AD
8169 (state_t): this structure.
8170 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8171 Adjust.
8172
9703cc49
AD
81732001-11-19 Akim Demaille <akim@epita.fr>
8174
8175 * src/lalr.h (state_t): New.
8176 (state_table): Be a state_t * instead of a core **.
8177 (accessing_symbol): Remove, part of state_t.
8178 * src/lalr.c: Adjust.
8179 (set_accessing_symbol): Merge into...
8180 (set_state_table): this.
8181 * src/print_graph.c, src/conflicts.c: Adjust.
8182
d803322e
AD
81832001-11-14 Akim Demaille <akim@epita.fr>
8184
8185 * tests/calc.at, tests/output.at, tests/regression.at,
8186 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
8187 now the tests are run in private dirs, therefore AC_CLEANUP and
8188 family can be simplified to 0-ary.
8189 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
8190 use abs. path to find config.h.
8191 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
8192 stderr, there can be way too much random noise.
8193 Instead pass -Werror to GCC and rely on the exit status.
8194 Reported by Wolfram Wagner.
8195
3d76b07d
AD
81962001-11-14 Akim Demaille <akim@epita.fr>
8197
8198 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
8199 defined only if yyoverflow is defined, to avoid `warning: unused
8200 variable `yyvs1''.
8201 Reported by The Test Suite.
8202
09b503c8
AD
82032001-11-14 Akim Demaille <akim@epita.fr>
8204
8205 * src/print.c: Include reduce.h.
8206 Reported by Hans Aberg.
8207
82082001-11-14 Akim Demaille <akim@epita.fr>
8209
8210 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
8211 Revert a previous patch: these are really const.
8212 * src/conflicts.c (conflict_report): Additional useless pair of
8213 braces to pacify GCC's warnings for `if () if () {} else {}'.
8214 * src/lex.c (parse_percent_token): Replace equal_offset with
8215 arg_offset.
8216 arg is const.
8217 Be sure to strdup `arg' when used, since there is no reason for
8218 token_buffer not to change.
8219
0f37a994
AD
82202001-11-14 Akim Demaille <akim@epita.fr>
8221
8222 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
8223 definition.
8224 * src/main.c (main): Use them.
8225 Suggested by Hans Aberg.
8226
d39d93b8
AD
82272001-11-12 Akim Demaille <akim@epita.fr>
8228
8229 * src/system.h (ngettext): Now that we use ngettext, be sure to
8230 provide a default definition when NLS are not used.
8231
9edcd895
AD
82322001-11-12 Akim Demaille <akim@epita.fr>
8233
8234 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
8235 Use @kbd to denote user input.
8236 (Language and Grammar): ANSIfy the example.
8237 Adjust its layout for info/notinfo.
8238 (Location Tracking Calc): Output error messages to stderr.
8239 Output locations in a more GNUtically correct way.
8240 Fix a couple of Englishos.
8241 Adjust @group/@end group pairs.
8242
7da99ede
AD
82432001-11-12 Akim Demaille <akim@epita.fr>
8244
e3aa65c5 8245 %expect was not functioning at all.
7da99ede
AD
8246
8247 * src/conflicts.c (expected_conflicts): Set to -1.
8248 (conflict_report): Use ngettext.
8249 (conflicts_print): Check %expect and make its violation an error.
8250 * doc/bison.texinfo (Expect Decl): Adjust.
8251 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
8252 * tests/regression.at (%expect not enough, %expect right)
8253 (%expect too much): New.
8254
ba9dda1a
AD
82552001-11-12 Akim Demaille <akim@epita.fr>
8256
8257 * tests/regression.at (Conflicts): Rename as...
8258 (Unresolved SR Conflicts): this.
8259 (Solved SR Conflicts): New.
8260
337c5bd1
AD
82612001-11-12 Akim Demaille <akim@epita.fr>
8262
8263 * src/reduce.c (print_results): Rename as...
8264 (reduce_output): This.
8265 Output to OUT, passed as argument, instead of output_obstack.
8266 (dump_grammar): Likewise.
8267 (reduce_free): New.
8268 Also free V1.
8269 (reduce_grammar): No longer call reduce_output, since...
8270 * src/print.c (print_results): do it.
8271 * src/main.c (main): Call reduce_free;
8272
c73a41af
AD
82732001-11-12 Akim Demaille <akim@epita.fr>
8274
8275 * src/conflicts.c (print_reductions): Accept OUT as argument.
8276 Output to it, not to output_obstack.
8277 * src/print.c (print_actions): Adjust.
8278
0df87bb6
AD
82792001-11-12 Akim Demaille <akim@epita.fr>
8280
8281 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
8282 the result instead of using...
8283 (src_total, rrc_total, src_count, rrc_count): Remove.
8284 (any_conflicts): Remove.
8285 (print_conflicts): Split into...
8286 (conflicts_print, conflicts_output): New.
8287 * src/conflicts.h: Adjust.
8288 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 8289 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
8290 * tests/regression.at (Conflicts): New.
8291 Reported by Tom Lane.
8292
e4d3d4de
AD
82932001-11-12 Akim Demaille <akim@epita.fr>
8294
8295 * tests/regression.at (Invalid input): Remove, duplicate with
8296 ``Invalid input: 1''.
8297
6d7d248e
AD
82982001-11-12 Akim Demaille <akim@epita.fr>
8299
8300 * tests/torture.at (AT_DATA_STACK_TORTURE)
8301 (Exploding the Stack Size with Alloca)
8302 (Exploding the Stack Size with Malloc): New.
8303
e9e4c321
AD
83042001-11-12 Akim Demaille <akim@epita.fr>
8305
8306 * src/bison.simple (YYSTACK_REALLOC): New.
8307 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 8308 Reported by Per Allansson.
e9e4c321 8309
5f7e0832
AD
83102001-11-12 Pascal Bart <pascal.bart@epita.fr>
8311
8312 * src/bison.simple: Define type yystype instead of YYSTYPE, and
8313 define CPP macro, which substitute YYSTYPE by yystype.
8314 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
8315 with yyltype/YYLTYPE. This allows inclusion of the generated
8316 header within the parser if the compiler, such as GGC, accepts
8317 multiple equivalent #defines.
8318 From Akim.
8319
e3f1699f
AD
83202001-11-05 Akim Demaille <akim@epita.fr>
8321
8322 * src/reader.c (symbols_output): New, extracted from...
8323 (packsymbols): here.
8324 (reader): Adjust.
8325
65be0866
AD
83262001-11-05 Akim Demaille <akim@epita.fr>
8327
8328 * src/lex.c (parse_percent_token): s/quotearg/quote/.
8329
e4d910bf
AD
83302001-11-05 Akim Demaille <akim@epita.fr>
8331
8332 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
8333 pattern.
8334
951366c1
AD
83352001-11-05 Akim Demaille <akim@epita.fr>
8336
8337 * src/options.h (struct option_table_struct): set_flags is void*.
8338 * src/options.c (longopts): Support `--output' and `%output'.
8339 (usage): Adjust.
8340 * src/lex.h (tok_setopt): Remove, replaced with...
8341 (tok_intopt, tok_stropt): these new guys.
8342 * src/lex.c (getopt.h): Not needed.
8343 (token_buffer, unlexed_token_buffer): Not const.
8344 (percent_table): Promote `-' over `_' in directive names.
8345 Active `%name-prefix', `file-prefix', and `output'.
8346 (parse_percent_token): Accept possible arguments to directives.
8347 Promote `-' over `_' in directive names.
8348
d8988b2f
AD
83492001-11-04 Akim Demaille <akim@epita.fr>
8350
8351 * doc/bison.texinfo (Decl Summary): Split the list into
8352 `directives for grammars' and `directives for bison'.
8353 Sort'em.
8354 Add description of `%name-prefix', `file-prefix', and `output'.
8355 Promote `-' over `_' in directive names.
8356 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
8357 Simplify the description of `--name-prefix'.
8358 Promote `-' over `_' in directive names.
8359 Promote `--output' over `--output-file'.
8360 Fix the description of `--defines'.
8361 * tests/output.at: Exercise %file-prefix and %output.
8362
6468d18e
AD
83632001-11-02 Akim Demaille <akim@epita.fr>
8364
8365 * doc/refcard.tex: Update.
8366
6b7e85b9
AD
83672001-11-02 Akim Demaille <akim@epita.fr>
8368
8369 * src/symtab.h (SUNDEF): New.
8370 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
8371 stand for `uninitialized', instead of 0.
8372 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
8373 * src/lex.c (lex): Adjust.
8374
8375 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
8376 Number it 0.
8377 Let yylex return it instead of a plain 0.
8378 Reported by Dick Streefland.
8379
cd5aafcf
AD
83802001-11-02 Akim Demaille <akim@epita.fr>
8381
8382 * tests/regression.at (Mixing %token styles): New test.
8383
037ca2f1
AD
83842001-11-02 Akim Demaille <akim@epita.fr>
8385
8386 * src/reader.c (parse_thong_decl): Formatting changes.
8387 (token_translations_init): New, extracted from...
8388 (packsymbols): Here.
8389 Adjust.
8390
270a173c
AD
83912001-11-01 Akim Demaille <akim@epita.fr>
8392
8393 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
8394 Check that `9foo.y' produces correct cpp guards.
8395 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
8396 guards.
8397 Reported by Wwp.
8398
561f9a30
AD
83992001-11-01 Akim Demaille <akim@epita.fr>
8400
8401 * tests/regression.at (Invalid input: 2): New.
8402 * src/lex.c (unlexed_token_buffer): New.
8403 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
8404 too.
8405 Reported by Wwp.
8406
f987e9d2
AD
84072001-11-01 Akim Demaille <akim@epita.fr>
8408
8409 * tests/calc.at: Catch up with 1.30.
8410 * configure.in: Bump to 1.49a.
8411 Adjust to newer Autotest.
8412
0846f581
PB
84132001-10-19 Pascal Bart <pascal.bart@epita.fr>
8414
8415 * src/conflicts.c: Move global variables rrc_total and src_total ...
8416 (print_conflicts): here.
8417 * src/output.c (output): Free global variable user_toknums.
8418 * src/lex.c (token_obstack): Become static.
8419
3c1a79b3
AD
84202001-10-18 Akim Demaille <akim@epita.fr>
8421
8422 * tests/atlocal.in (GCC): Add.
8423 * tests/calc.at: s/m4_match/m4_bmatch/.
8424 s/m4_patsubst/m4_bpatsubst/.
8425 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
8426 * configure.in: AC_SUBST(GCC).
8427
5d52e7d0
MA
84282001-10-14 Marc Autret <autret_m@epita.fr>
8429
8430 * src/options.c (create_long_option_table): Fix.
8431
631aa1d3
AD
84322001-10-10 Akim Demaille <akim@epita.fr>
8433
8434 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
8435
f6ec6d13
AD
84362001-10-04 Akim Demaille <akim@epita.fr>
8437
8438 * src/reader.c (parse_union_decl): Push the caracters in
8439 union_obstack, not attrs_obstack.
8440
342b8b6e
AD
84412001-10-04 Akim Demaille <akim@epita.fr>
8442
8443 Merge in the branch 1.29.
8444
8445 * src/reader.c (packsymbols): Use a temporary obstack for
8446 `%%tokendef', since output_stack is already used elsewhere.
8447
8448 2001-10-02 Akim Demaille <akim@epita.fr>
8449
8450 Bump 1.29d.
8451
8452 2001-10-02 Akim Demaille <akim@epita.fr>
8453
8454 Version 1.29c.
8455
8456 2001-10-02 Akim Demaille <akim@epita.fr>
8457
8458 * tests/regression.at (Invalid CPP headers): New.
8459 From Alexander Belopolsky.
8460 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
8461
8462 2001-10-02 Akim Demaille <akim@epita.fr>
8463
8464 * tests/regression.at (Invalid input): New.
8465 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
8466 Reported by Shura.
8467
8468 2001-10-02 Akim Demaille <akim@epita.fr>
8469
8470 * tests/calc.at: Now that --debug works, the tests must be adjusted.
8471
8472 2001-10-02 Akim Demaille <akim@epita.fr>
8473
8474 * src/output.c (output_parser): Assert `skeleton'.
8475 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
8476 systems.
8477 From Shura.
8478
8479 2001-10-01 Marc Autret <autret_m@epita.fr>
8480
8481 * src/lex.h: Echo modifications.
8482 * src/lex.c (unlex): Parameter is now token_t.
8483 From Hans Aberg.
8484
8485 2001-10-01 Marc Autret <autret_m@epita.fr>
8486
8487 * src/main.c: Include lex.h.
8488 From Hans Aberg.
8489
8490 2001-09-29 Akim Demaille <akim@epita.fr>
8491
8492 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
8493
8494 2001-09-28 Akim Demaille <akim@epita.fr>
8495
8496 * tests/testsuite.at: Update to newer Autotest.
8497 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
8498
8499 2001-09-27 Akim Demaille <akim@epita.fr>
8500
8501 Position independent wrapper.
8502
8503 * tests/bison: Remove.
8504 * tests/bison.in: New.
8505 * configure.in: Adjust.
8506
8507 2001-09-27 Paul Eggert <eggert@twinsun.com>
8508
8509 Port quotearg fixes from tar 1.13.24.
8510
8511 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
8512 tm to be declared.
8513 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
8514 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
8515
8516 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
8517 * m4/mbrtowc.m4: New file.
8518 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
8519 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
8520
8521 2001-09-27 Akim Demaille <akim@epita.fr>
8522
8523 Bump to 1.29c.
8524
8525 2001-09-27 Akim Demaille <akim@epita.fr>
8526
8527 Version 1.29b.
8528
8529 2001-09-25 Akim Demaille <akim@epita.fr>
8530
8531 * src/system.h: Include `xalloc.h'.
8532 Remove it from the C files.
8533 * src/files.c (output_files): Free the obstacks.
8534 * src/lex.c (init_lex): Rename as...
8535 (lex_init): this.
8536 (lex_free): New.
8537 * src/main.c (main): Use it.
8538
8539 2001-09-24 Marc Autret <autret_m@epita.fr>
8540
8541 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
8542 to output informations in fout (FILE*).
8543 (open_graph, close_graph): Likewise.
8544 (output_graph, output_edge, output_node): Likewise.
8545 * src/vcg.h: Update function prototypes.
8546 * src/print_graph.c (print_graph): Open output graph file.
8547 (print_actions): Adjust.
8548 * src/files.h: Remove extern declaration.
8549 * src/files.c: Remove graph_obstack declaration.
8550 (open_files): Remove graph_obstack initialization.
8551 (output_files): Remove graph_obstack saving.
8552
8553 2001-09-24 Marc Autret <autret_m@epita.fr>
8554
8555 * src/files.c (compute_output_file_names): Fix.
8556
8557 2001-09-24 Marc Autret <autret_m@epita.fr>,
8558 Akim Demaille <akim@epita.fr>
8559
8560 * src/reader.c (reader): Remove call to free_symtab ().
8561 * src/main.c (main): Call it here.
8562 Include symtab.h.
8563 * src/conflicts.c (initialize_conflicts): Rename as...
8564 (solve_conflicts): this.
8565 * src/print.c (print_core, print_actions, print_state)
8566 (print_grammar): Dump to a file instead a `output_obstack'.
8567 (print_results): Dump `output_obstack', and then proceed with the
8568 FILE *.
8569 * src/files.c (compute_output_file_names, close_files): New.
8570 (output_files): Adjust.
8571 * src/main.c (main): Adjust.
8572
8573 2001-09-23 Marc Autret <autret_m@epita.fr>
8574
8575 * src/files.c (compute_header_macro): Computes header macro name
8576 from spec_defines_file when given.
8577
8578 2001-09-23 Marc Autret <autret_m@epita.fr>
8579
8580 * src/files.c (output_files): Add default extensions.
8581
8582 2001-09-22 Akim Demaille <akim@epita.fr>
8583
8584 * src/conflicts.c (finalize_conflicts): Rename as...
8585 (free_conflicts): this.
8586
8587 2001-09-22 Akim Demaille <akim@epita.fr>
8588
8589 * src/gram.c (gram_free): Rename back as...
8590 (dummy): this.
8591 (output_token_translations): Free `token_translations'.
8592 * src/symtab.c (free_symtab): Free the tag field.
8593
8594 2001-09-22 Akim Demaille <akim@epita.fr>
8595
8596 Remove `translations' as it is always set to true.
8597
8598 * src/gram.h: Adjust.
8599 * src/reader.c (packsymbols, parse_token_decl): Adjust
8600 * src/print.c (print_grammar): Adjust.
8601 * src/output.c (output_token_translations): Adjust.
8602 * src/lex.c (lex): Adjust.
8603 * src/gram.c: Be sure the set pointers to NULL.
8604 (dummy): Rename as...
8605 (gram_free): this.
8606
8607 2001-09-22 Akim Demaille <akim@epita.fr>
8608
8609 * configure.in: Invoke AM_LIB_DMALLOC.
8610 * src/system.h: Use dmalloc.
8611 * src/LR0.c: Be sure to have pointers initialized to NULL.
8612 (allocate_itemsets): Allocate kernel_items only if needed.
8613
8614 2001-09-22 Akim Demaille <akim@epita.fr>
8615
8616 * configure.in: Bump to 1.29b.
8617 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8618 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8619 need xmalloc.c in calc.y.
8620 From Pascal Bart.
8621
8622 2001-09-21 Akim Demaille <akim@epita.fr>
8623
8624 Version 1.29a.
8625 * Makefile.maint, config/config.guess, config/config.sub,
8626 * config/missing: Update from masters.
8627 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8628 upon package.m4.
8629 * configure.in (ALL_LINGUAS): Add `tr'.
8630
8631 2001-09-21 Akim Demaille <akim@epita.fr>
8632
8633 * tests/Makefile.am (package.m4): Move to...
8634 ($(srcdir)/$(TESTSUITE)): here.
8635
8636 2001-09-20 Akim Demaille <akim@epita.fr>
8637
8638 * src/complain.c: No longer try to be standalone: use system.h.
8639 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8640 * src/complain.h: Likewise.
8641 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8642 Remove the unused variable `n'.
8643 From Albert Chin-A-Young.
8644
8645 2001-09-18 Marc Autret <autret_m@epita.fr>
8646
8647 * doc/bison.1: Update.
8648 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8649 descriptions.
8650 (Option Cross Key): Update.
8651 Add --graph.
8652
8653 2001-09-18 Marc Autret <autret_m@epita.fr>
8654
8655 * tests/regression.at: New test (comment in %union).
8656
8657 2001-09-18 Marc Autret <autret_m@epita.fr>
8658
8659 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8660 do that.
8661 Reported by Keith Browne.
8662
8663 2001-09-18 Marc Autret <autret_m@epita.fr>
8664
8665 * tests/output.at: Add tests for --defines and --graph.
8666
8667 2001-09-18 Marc Autret <autret_m@epita.fr>
8668
8669 * tests/output.at: Removes tests of %{header,src}_extension features.
8670
8671 2001-09-18 Akim Demaille <akim@epita.fr>
8672
8673 * tests/Makefile.am (package.m4): New.
8674 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8675 (_AT_CHECK_CALC_ERROR): Likewise.
8676 Factor the `, ' part of verbose error messages.
8677
8678 2001-09-18 Marc Autret <autret_m@epita.fr>
8679
8680 * src/getargs.c (longopts): Declare --defines and --graph as options
8681 with optional arguments.
8682 * src/files.h: Add extern declarations.
8683 * src/files.c (spec_graph_file, spec_defines_file): New.
8684 (output_files): Update.
8685 Remove CPP-outed code.
8686
8687 2001-09-18 Marc Autret <autret_m@epita.fr>
8688
8689 Turn off %{source,header}_extension feature.
8690
8691 * src/files.c (compute_exts_from_gf): Update.
8692 (compute_exts_from_src): Update.
8693 (output_files): CPP-out useless code.
8694 * src/files.h: Remove {header,source}_extension extern declarations.
8695 * src/reader.c (parse_dquoted_param): CPP-out.
8696 (parse_header_extension_decl): Remove.
8697 (parse_source_extension_decl): Remove.
8698 (read_declarations): Remove cases tok_{hdrext,srcext}.
8699 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8700 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8701
8702 2001-09-10 Akim Demaille <akim@epita.fr>
8703
8704 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8705 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8706 (AT_CHECK_OUTPUT): this.
8707 Merely check ls' exit status, its output is useless.
8708
8709 2001-09-10 Akim Demaille <akim@epita.fr>
8710
8711 * tests/calc.at: Use m4_match.
8712 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8713
8714 2001-09-10 Marc Autret <autret_m@epita.fr>,
8715 Akim Demaille <akim@epita.fr>
8716
8717 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8718 enum color_e.
8719 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8720 to `normal'.
8721 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8722 * src/lex.h: Adjust prototype.
8723 (token_t): Add `tok_undef'.
8724 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8725 (parse_percent_token): Now returns token_t.
8726 Add default statement in switch.
8727 (lex): Separate `c' as an input variable, from the token_t result
8728 part.
8729 (unlexed): Is a token_t.
8730
8731 2001-09-10 Akim Demaille <akim@epita.fr>
8732
8733 * configure.in: Bump to 1.29a.
8734
8735 2001-09-07 Akim Demaille <akim@epita.fr>
8736
8737 Version 1.29.
8738
8739 2001-08-30 Akim Demaille <akim@epita.fr>
8740
8741 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8742 * m4/atconfig.m4: Remove.
8743 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8744 * tests/bison: New.
8745 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8746 m4_if, m4_patsubst, and m4_regexp.
8747 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8748 `input' file instead of echo.
8749
8750 2001-08-29 Akim Demaille <akim@epita.fr>
8751
8752 Bump to 1.28e.
8753
8754 2001-08-29 Akim Demaille <akim@epita.fr>
8755
8756 Version 1.28d.
8757
8758 2001-08-29 Paul Eggert <eggert@twinsun.com>
8759
8760 * src/bison.simple (yyparse): Don't take the address of an
8761 item before the start of an array, as that doesn't conform to
8762 the C Standard.
8763
8764 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8765
8766 * doc/bison.texinfo (Location Tracking Calc): New node.
8767
8768 2001-08-29 Paul Eggert <eggert@twinsun.com>
8769
8770 * src/output.c (output): Do not define const, as this now
8771 causes more problems than it cures.
8772
8773 2001-08-29 Akim Demaille <akim@epita.fr>
8774
8775 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8776 the nodes.
8777 Be sure to tag the `detailmenu'.
8778
8779 2001-08-29 Akim Demaille <akim@epita.fr>
8780
8781 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8782 download in a tmp dir.
8783
8784 2001-08-28 Marc Autret <autret_m@epita.fr>
8785
8786 * config/depcomp: New file.
8787
8788 2001-08-28 Marc Autret <autret_m@epita.fr>
8789
8790 * doc/bison.1 (mandoc): Adjust.
8791 From Juan Manuel Guerrero.
8792
8793 2001-08-28 Marc Autret <autret_m@epita.fr>
8794
8795 * src/print_graph.c (print_state): Fix.
8796
8797 2001-08-27 Marc Autret <autret_m@epita.fr>
8798
8799 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8800 char * members.
8801 Echo modifications to the functions prototypes.
8802 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8803
8804 2001-08-27 Marc Autret <autret_m@epita.fr>
8805
8806 * src/vcg.c: Include `xalloc.h'.
8807 (add_colorentry): New.
8808 (add_classname): New.
8809 (add_infoname): New.
8810 * src/vcg.h: Add new prototypes.
8811
8812 2001-08-27 Akim Demaille <akim@epita.fr>
8813
8814 * Makefile.maint: Sync. again with CVS Autoconf.
8815
8816 2001-08-27 Akim Demaille <akim@epita.fr>
8817
8818 * Makefile.maint: Formatting changes.
8819 (po-update, cvs-update, update): New targets.
8820 (AMTAR): Remove.
8821
8822 2001-08-27 Akim Demaille <akim@epita.fr>
8823
8824 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8825 * Makefile.maint: Sync. with CVS Autoconf.
8826
8827 2001-08-27 Marc Autret <autret_m@epita.fr>
8828
8829 * src/vcg.h (struct infoname_s): New.
8830 (struct colorentry_s): New.
8831 (graph_s): New fields {vertical,horizontal}_order in structure.
8832 Add `infoname' field.
8833 Add `colorentry' field;
8834 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8835 (G_HORIZONTAL_ORDER): New.
8836 (G_INFONAME): New.
8837 (G_COLORENTRY): New.
8838 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8839 Add output of `infoname'.
8840 Add output of `colorentry'.
8841
8842 2001-08-27 Marc Autret <autret_m@epita.fr>
8843
8844 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8845 This one shadowed a global parameter.
8846
8847 2001-08-24 Marc Autret <autret_m@epita.fr>
8848
8849 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8850 instead of `unsigned'.
8851 (print_state): Do not call obstack_object_size () in obstack_grow ()
8852 to avoid macro variables shadowing.
8853
8854 2001-08-23 Marc Autret <autret_m@epita.fr>
8855
8856 * src/lex.c (percent_table): Typo: s/naem/name/.
8857 Add graph option.
8858 Normalize new options declarations.
8859
8860 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8861
8862 * tests/suite.at: Exercise %header_extension and %source_extension.
8863
8864 2001-08-16 Marc Autret <autret_m@epita.fr>
8865
8866 * src/reader.c (parse_dquoted_param): New.
8867 (parse_header_extension_decl): Use it.
8868 (parse_source_extension_decl): Likewise.
8869
8870 2001-08-16 Marc Autret <autret_m@epita.fr>
8871
8872 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8873 (get_xxxx_str): Use assert () instead of complain ().
8874 Remove return invokations in default cases.
8875 (get_decision_str): Modify default behaviour. Remove second argument.
8876 Echo modifications on calls.
8877 (output_graph): Fix.
8878
8879 2001-08-16 Marc Autret <autret_m@epita.fr>
8880
8881 * src/getargs.c (usage): Update with ``-g, --graph''.
8882
8883 2001-08-16 Marc Autret <autret_m@epita.fr>
8884
8885 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8886 (Option Cross Key): Likewise.
8887 * doc/bison.1: Update.
8888
1c8c2190
PB
88892001-09-25 Pascal Bart <pascal.bart@epita.fr>
8890
8891 * src/output.c (output_master_parser): Don't finish action_obstack.
8892 (output_parser): Don't care about the muscle action, here.
8893 (prepare): Copy the action_obstack in the action muscle.
8894 (output): Free action_obstack.
8895
180d45ba
PB
88962001-09-23 Pascal Bart <pascal.bart@epita.fr>
8897
8898 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8899 will contain `%union' declaration.
8900 (parse_union_decl): Delete #line directive output.
8901 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8902 informations about %union.
8903 (parse_union_decl): Copy the union_obstack in the muscle stype.
8904 * src/bison.simple: Add new #line directive.
8905 Add typdef %%stype YYSTYPE.
8906
c51d1a19
PB
89072001-09-23 Pascal Bart <pascal.bart@epita.fr>
8908
8909 * src/bison.simple: Add new `#line' directive.
8910
6f9344da
PB
89112001-09-22 Pascal Bart <pascal.bart@epita.fr>
8912
8913 * src/bison.simple: New `#line' directive.
8914 * src/output.c (output_parser): Support new dynamic muscle input_line.
8915
652def80
MA
89162001-09-22 Marc Autret <autret_m@epita.fr>
8917
8918 * src/output.c (output_master_parser): New.
8919 (output_parser): Be more re-entrant.
8920
25b222fa
MA
89212001-09-21 Marc Autret <autret_m@epita.fr>
8922
8923 * src/reader.c (copy_definition, parse_union_decl): Update and use
8924 `linef' muscle.
8925 (copy_action): Likewise.
8926 Use obstack_1grow ().
8927 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8928
6bc35ae5
MA
89292001-09-21 Marc Autret <autret_m@epita.fr>
8930
8931 * src/options.c (option_table): Adjust.
8932 * src/lex.c (parse_percent_token): Fix.
8933
c0629aa1
PB
89342001-09-20 Pascal Bart <pascal.bart@epita.fr>
8935
8936 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 8937
82b6d266
PB
89382001-09-20 Pascal Bart <pascal.bart@epita.fr>
8939
8940 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8941 is now an option_table_struct*.
8942 (option_strcmp): New function option_strcmp.
8943 (parse_percent_token): Call option_strcmp.
8944 * src/getargs.c (xalloc.h, options.h): Include it.
8945 (getargs): Call create_long_option_table.
8946 (getargs): Free longopts at the end of the function.
8947 (shortopts): Move in options.c.
8948 * src/options.c (create_long_option_table): New function. Convert
8949 information from option_table to option structure.
8950 * src/reader.c (options.h): Include it.
8951
8952 * src/Makefile.am: Adjust.
8953 * src/options.c (option_table): Create from longopts and percent_table.
8954 * src/getargs.c (longopts): Delete.
8955 * src/lex.c (struct percent_table_struct): Delete.
8956 (percent_table): Delete.
8957 (options.h): Include it.
8958 * src/options.c: Create.
8959 * src/options.h: Create.
8960 Declare enum opt_access_e.
8961 Define struct option_table_struct.
8962
75f5aaea
MA
89632001-09-20 Marc Autret <autret_m@epita.fr>
8964
8965 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8966 sections of Bison.
8967
f508cb0a
PB
89682001-09-19 Pascal Bart <pascal.bart@epita.fr>
8969
8970 * src/bison.simple: s/%%filename/%%skeleton.
8971 * src/muscle_tab.c (getargs.h): Include it.
8972 (muscle_init): Insert new muscle skeleton.
8973
13105fc1
PB
89742001-09-18 Pascal Bart <pascal.bart@epita.fr>
8975
8976 * src/output.c (output_parser): Delete unused variable actions_dumped.
8977
b0c4483e
PB
89782001-09-07 Pascal Bart <pascal.bart@epita.fr>
8979
8980 * src/output.c (output): Delete call to reader_output_yylsp.
8981 * src/reader.c (reader): Likewise.
8982 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 8983
11d82f03
MA
89842001-09-02 Marc Autret <autret_m@epita.fr>
8985
8986 * src/reader.c: Include muscle_tab.h.
8987 (parse_union_decl): Update.
8988 (parse_macro_decl): Rename parse_muscle_decl.
8989 Update to use renamed functions and variable.
8990 (read_declarations, copy_action, read_additionnal_code, : Updated
8991 with correct variables and functions names.
8992 (packsymbols, reader): Likewise.
342b8b6e 8993
11d82f03 8994 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 8995
11d82f03
MA
8996 * src/output.c: Include muscle_tab.h
8997 In all functions using macro_insert, change by using muscle_insert ().
8998 (macro_obstack): Rename muscle_obstack.
8999 Echo modifications in the whole file.
9000 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
9001 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
9002 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
9003
9004 * src/muscle_tab.h: Update double inclusion macros.
9005 (macro_entry_s): Rename muscle_entry_s.
9006 Update prototypes.
342b8b6e 9007
11d82f03
MA
9008 * src/muscle_tab.c: Include muscle_tab.h.
9009 Rename macro_tabble to muscle_table.
9010 (mhash1, mhash2, mcmp): Use muscle_entry.
9011 (macro_init): Rename muscle_init. Update.
9012 (macro_insert): Rename muscle_insert. Update.
9013 (macro_find): Rename muscle_find. Update.
9014
9015 * src/main.c: Include muscle_tab.h.
9016 (main): Call muscle_init ().
9017 * src/Makefile.am (bison_SOURCES): Echo modifications.
9018
93a37297
MA
90192001-09-02 Marc Autret <autret_m@epita.fr>
9020
f753cd62 9021 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 9022
f753cd62
MA
9023 * src/muscle_tab.c, src/muscle_tab.h: Add files.
9024
90252001-09-02 Marc Autret <autret_m@epita.fr>
9026
9027 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 9028
682d48cd
PB
90292001-09-01 Pascal Bart <pascal.bart@epita.fr>
9030
342b8b6e 9031 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
9032 filename.
9033
087c8fda
MA
90342001-09-01 Marc Autret <autret_m@epita.fr>
9035
9036 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
9037 to an explicit value to activate the feature. We do it here.
9038
dda680cb
PB
90392001-08-31 Pascal Bart <pascal.bart@epita.fr>
9040
9041 * src/output.c (prepare): Delete the `filename' muscule insertion.
9042 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
9043 (parse_union_decl): Likewise.
9044 * src/macrotab.c (macro_init): Initialize filename by infile.
9045
9e644e64
MA
90462001-08-31 Marc Autret <autret_m@epita.fr>
9047
9048 * src/bison.simple (YYLSP_NEEDED): New definition.
9049 * src/output.c (prepare): Add macro insertion of `locations_flag'
9050
17da6427
PB
90512001-08-31 Pascal Bart <pascal.bart@epita.fr>
9052
9053 * src/output.c (prepare): Delete insertion of previous muscles,
9054 and insert the `prefix' muscles.
9055 * src/macrotab.c (macro_init): Likewise.
9056 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 9057 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
9058 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9059 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 9060 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
9061 name_prefix.
9062
e8cb70b9
PB
90632001-08-31 Pascal Bart <pascal.bart@epita.fr>
9064
9065 * src/main.c (main): Standardize.
9066 * src/output.c (output_table_data, output_parser): Likewise.
9067 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9068
63c2d5de
MA
90692001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9070
342b8b6e 9071 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
9072 %%epilogue.
9073 * src/output.c (output): Rename %%declarations to %%prologue.
9074 * src/bison.simple: Echo modifications.
342b8b6e 9075
d8cb5183
MA
90762001-08-31 Marc Autret <autret_m@epita.fr>
9077
9078 * src/reader.c (readgram): CleanUp.
9079 (output_token_defines): Likewise.
9080 (packsymbols): Likewise.
9081 (reader): Likewise.
9082 * src/output.c (output): CPP-out useless code.
9083
6c686258
PB
90842001-08-31 Pascal Bart <pascal.bart@epita.fr>
9085
342b8b6e 9086 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
9087 output_trailers and output_headers.
9088 * src/output.h: Remove obsolete functions prototypes of output_headers
9089 and output_trailers.
9090
8f451ef7
PB
90912001-08-30 Pascal Bart <pascal.bart@epita.fr>
9092
9093 * src/main.c: Include macrotab.h.
342b8b6e 9094 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
9095 Adjust functions prototypes.
9096 * src/macrotab.c (macro_insert): Constify key and value.
9097 (macro_find): Constify key.
9098 (macro_insert): Include 'xalloc.h'
9099 (macro_insert): Use XMALLOC.
9100 (macro_find): Constify return value.
9101 * src/output.c (output_table_data): Rename table to table_data.
9102 (output_parser): Constify macro_key, macro_value.
9103
997b6fd0 91042001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
9105
9106 * src/reader.c (parse_skel_decl): New.
342b8b6e 9107 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
9108 * src/lex.h (token_t): New token `tok_skel'.
9109 * src/lex.c (percent_table): Add skeleton option entry.
9110 Standardize.
9111
ff48177d
MA
91122001-08-29 Marc Autret <autret_m@epita.fr>
9113
9114 * src/bison.simple: Add %%user_code directive at the end.
9115 * src/reader.c (read_additionnal_code): New.
9116 (reader): Use it.
9117 * src/output.c (output_program): Remove.
9118 (output): Update.
9119
b33160bf
MA
91202001-08-28 Marc Autret <autret_m@epita.fr>
9121
9122 * src/output.c (output_actions): Clean up.
4e5caae2 9123 (output_gram): CPP-out useless code.
b33160bf
MA
9124 * src/reader.c (reader): Clean up, CPP-out useless code.
9125
d1a2daf7
PB
91262001-08-28 Pascal Bart <pascal.bart@epita.fr>
9127
342b8b6e 9128 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 9129 directive.
d1a2daf7
PB
9130 * src/bison.simple: Add `%%definitions'.
9131
2b763dfe
MA
91322001-08-28 Marc Autret <autret_m@epita.fr>
9133
9134 * config/depcomp: New file.
9135
f1a87ef6
PE
91362001-08-27 Paul Eggert <eggert@twinsun.com>
9137
9138 * src/bison.simple (yyparse): Don't take the address of an
9139 item before the start of an array, as that doesn't conform to
9140 the C Standard.
9141
82e236e2
RA
91422001-08-27 Robert Anisko <robert.anisko@epita.fr>
9143
f1a87ef6 9144 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
9145 obstack. It was done too late here.
9146
9147 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
9148 completely wrong.
9149 (reader): Initialize the macro obstack here, since we need it to grow
9150 '%define' directives.
9151
9152 * src/reader.h: Declare the macro obstack as extern.
9153
b0cfa28a
RA
91542001-08-27 Robert Anisko <robert.anisko@epita.fr>
9155
9156 * src/output.c (output_parser): Fix. Store single '%' characters in
9157 the output obstack instead of throwing them away.
9158
6fc74234
AD
91592001-08-27 Akim Demaille <akim@epita.fr>
9160
9161 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9162
9c76d118
RA
91632001-08-25 Robert Anisko <robert.anisko@epita.fr>
9164
9165 * lib/Makefile.am: Adjust.
9166
a8289c62
RA
91672001-08-25 Robert Anisko <robert.anisko@epita.fr>
9168
9169 * src/bison.simple: Update and add '%%' directives.
9170
b6610515
RA
91712001-08-25 Robert Anisko <robert.anisko@epita.fr>
9172
9173 * src/reader.c (reader): Remove calls to 'output_headers' and
9174 'output_trailers'. Remove some C output.
9175 (readgram): Disable a piece of code that was writing a default
9176 definition for 'YYSTYPE'.
9177 (reader_output_yylsp): Remove.
9178 (packsymbols): Output token defintions to a macro.
9179 (copy_definition): Disable C output.
6fc74234 9180
b6610515
RA
9181 * src/reader.c (parse_macro_decl): New function used to parse macro
9182 declarations.
9183 (copy_string2): Put the body of copy_string into this new function.
9184 Add a parameter to let the caller choose whether he wants to copy the
9185 string delimiters or not.
9186 (copy_string): Be a simple call to copy_string2 with the last argument
9187 bound to true.
9188 (read_declarations): Add case for macro definition.
9189 (copy_identifier): New.
6fc74234 9190 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
9191 rather than lex.
9192
26f609ff
RA
91932001-08-25 Robert Anisko <robert.anisko@epita.fr>
9194
9195 * src/output.c (prepare): Add prefixed names.
9196 (output_parser): Output semantic actions.
9197 (output_parser): Fix bug on '%%line' directives.
6fc74234 9198
26f609ff
RA
9199 * src/output.c (output_headers): Remove. The C code printed by this
9200 function should now be in the skeletons.
9201 (output_trailers): Remove.
9202 (output): Disable call to 'reader_output_yylsp'.
9203 (output_rule_data): Do not output tables to the table obstack.
9204
9205 * src/output.c: Remove some C dedicated output.
9206 Improve the use of macro and output obstacks.
9207 (output_defines): Remove.
6fc74234 9208
26f609ff
RA
9209 * src/output.c (output_token_translations): Associate 'translate'
9210 table with a macro. No output to the table obstack.
9211 (output_gram): Same for 'rhs' and 'prhs'.
9212 (output_stos): Same for 'stos'.
9213 (output_rule_data): Same for 'r1' and 'r2'.
9214 (token_actions): Same for 'defact'.
9215 (goto_actions): Same for 'defgoto'.
9216 (output_base): Same for 'pact' and 'pgoto'.
9217 (output_table): Same for 'table'.
9218 (output_check): Same for 'check'.
6fc74234 9219
26f609ff
RA
9220 * src/output.c (output_table_data): New function.
9221 (output_short_table): Remove.
9222 (output_short_or_char_table): Remove.
6fc74234 9223
26f609ff
RA
9224 * src/output.c (output_parser): Replace most of the skeleton copy code
9225 with something new. Skeletons are now processed character by character
9226 rather than line by line, and Bison looks for '%%' macros. This is the
9227 first step in making Bison's output process (a lot) more flexible.
9228 (output_parser): Use the macro table.
9229
6f43b113
RA
92302001-08-25 Robert Anisko <robert.anisko@epita.fr>
9231
9232 * src/main.c (main): Initialize the macro table.
9233
dd3127cf
RA
92342001-08-25 Robert Anisko <robert.anisko@epita.fr>
9235
9236 * src/lex.c (percent_table): Add tok_define.
9237 * src/lex.h: Add tok_define.
9238
aa321494
RA
92392001-08-25 Robert Anisko <robert.anisko@epita.fr>
9240
9241 * src/macrotab.c: New file.
9242 * src/macrotab.h: New file.
9243 * src/Makefile.am: Update.
9244
68bd3b6b
RA
92452001-08-25 Robert Anisko <robert.anisko@epita.fr>
9246
9247 * lib/hash.c: New file.
9248 * lib/hash.h: New file.
9249 * lib/Makefile.am: Update.
9250
45f8dd1e
AD
92512001-08-15 Akim Demaille <akim@epita.fr>
9252
9253 Version 1.28c.
9254
40a64a7a 92552001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
9256
9257 * src/reader.c (readgram): Indent output macro YYSTYPE.
9258 (packsymbols): Likewise.
9259 (output_token_defines): Likewise.
9260 * src/files.c: Standardize.
9261 (compute_header_macro): New.
9262 (defines_obstack_save): New. Use compute_header_macro.
9263 (output_files): Update. Use defines_obstack_save.
9264
f9a8293a
AD
92652001-08-15 Akim Demaille <akim@epita.fr>
9266
9267 * doc/bison.texinfo (Table of Symbols): Document
9268 YYSTACK_USE_ALLOCA.
9269
150ca7a7
AD
92702001-08-15 Akim Demaille <akim@epita.fr>
9271
9272 * missing: Update from CVS Automake.
9273 * config/config.guess, config/config.sub, config/texinfo.tex:
9274 Update from gnu.org.
9275
69b5cec4
AD
92762001-08-15 Akim Demaille <akim@epita.fr>
9277
9278 * Makefile.maint: Sync with CVS Autoconf.
9279
f2b5126e
PB
92802001-08-14 Pascal Bart <pascal.bart@epita.fr>
9281
69b5cec4 9282 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
9283 `fdl.texi'.
9284 * doc/fdl.texi: Add to package.
9285
4ecbf796
MA
92862001-08-14 Marc Autret <autret_m@epita.fr>
9287
9288 Turn on %{source,header}_extension features.
9289
69b5cec4 9290 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
9291 source_extension.
9292 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 9293 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
9294 between options.
9295
95fb5662
MA
92962001-08-14 Marc Autret <autret_m@epita.fr>
9297
9298 * src/files.c (compute_base_names): Add extensions computing when
9299 `--file-prefix' used.
9300 Standardize function calls.
9301
78d09da9
MA
93022001-08-13 Marc Autret <autret_m@epita.fr>
9303
69b5cec4 9304 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
9305 defining it (defined but null disables alloca).
9306
5a009f2c
MA
93072001-08-13 Marc Autret <autret_m@epita.fr>
9308
9309 * src/bison.simple (_yy_memcpy): CPP reformat.
9310
1e41465a
PB
93112001-08-13 Pascal Bart <pascal.bart@epita.fr>
9312
9313 * tests/atconfig.in (CPPFLAGS): Fix.
9314
c67a198d
PB
93152001-08-10 Pascal Bart <pascal.bart@epita.fr>
9316
79282c6c 9317 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
9318 `gpl.texi'.
9319 * doc/gpl.texi: Add to package.
9320
09a6de7e
MA
93212001-08-10 Marc Autret <autret_m@epita.fr>
9322
9323 * src/print_graph.h: Fix.
9324 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
9325
b77b9ee0
AD
93262001-08-10 Akim Demaille <akim@epita.fr>
9327
9328 * src/system.h: Provide default declarations for stpcpy, strndup,
9329 and strnlen.
9330
3e259915
MA
93312001-08-10 Robert Anisko <anisko_r@epita.fr>
9332
9333 * doc/bison.texinfo (Locations): Update @$ stuff.
9334
ca96bc2d
MA
93352001-08-09 Robert Anisko <anisko_r@epita.fr>
9336
9337 * src/bison.simple (YYLLOC_DEFAULT): Update.
9338 (yyparse): Adjust.
9339
fdc6758b
MA
93402001-08-08 Marc Autret <autret_m@epita.fr>
9341
b77b9ee0 9342 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
9343 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
9344 Reported by Fabrice Bauzac.
957d4dbf 9345
600cad3b
MA
93462001-08-08 Marc Autret <autret_m@epita.fr>
9347
9348 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
9349 * src/vcg.c (output_node): Fix.
9350 * src/vcg.h: Cleanup.
9351 * src/print_graph.c: Add comments.
b77b9ee0 9352 (node_output_size): New global variable. Simplify the formatting of
600cad3b 9353 the VCG graph output.
b77b9ee0 9354 (print_actions): Unused code is now used. It notifies the final state
600cad3b 9355 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 9356 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
9357 blue.
9358 Get the current node name and node_obstack by argument.
9359 (node_obstack): New variable.
9360 (print_state): Manage node_obstack.
9361 (print_core): Use node_obstack given by argument.
9362 A node is not only computed here but in print_actions also.
9363 (print_graph): CPP out useless code instead of commenting it.
9364
976e528f
AD
93652001-08-07 Pascal Bart <pascal.bart@epita.fr>
9366
9367 * tests/atconfig.in (CPPFLAGS): Fix.
9368
20e8e5ca
AD
93692001-08-07 Akim Demaille <akim@epita.fr>
9370
9371 * src/print_graph.c (quote): New.
9372 (print_core): Use it.
9373
957d4dbf 93742001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 9375
3e3da797
AD
9376 * src/vcg.c (complain.h): Include it.
9377 Unepitaize `return' invocations.
c4b66126 9378 [NDEBUG] (main): Remove.
79282c6c 9379 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
9380 * src/files.c (open_files): Initialize graph_obstack.
9381 * src/print_graph.c (print_actions): CPP out useless code.
9382 (print_core): Don't output the last `\n' in labels.
9383 Use `quote'.
9384 * src/files.c (output_files): Output the VCG file.
9385 * src/main.c (main): Invoke print_graph ();
3e3da797 9386
957d4dbf 93872001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
9388
9389 Automaton VCG graph output.
9390 Using option ``-g'' or long option ``--graph'', you can generate
9391 a gram_filename.vcg file containing a VCG description of the LALR (1)
9392 automaton of your grammar.
9393
9394 * src/main.c: Call to print_graph() function.
9395 * src/getargs.h: Update.
9396 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
9397 (graph_flag): New flag.
9398 (longopts): Update.
9399 (getargs): Add case `g'.
9400 * src/files.c (graph_obstack): New obstack struct.
9401 (open_files): Initialize new obstack.
9402 (output_files): Saves graph_obstack if required.
9403 * src/files.h (graph_obstack): New extern declaration.
9404 * src/Makefile.am: Add new source files.
9405
927c1557 94062001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
9407
9408 * src/print_graph.c, src/print_graph.h (graph): New.
9409 * src/vcg.h: New file.
9410 * src/vcg.c: New file, VCG graph handling.
9411
7333d403
AD
94122001-08-06 Marc Autret <autret_m@epita.fr>
9413
9414 Add of %source_extension and %header_extension which specify
9415 the source or/and the header output file extension.
9416
9417 * src/files.c (compute_base_names): Remove initialisation of
9418 src_extension and header_extension.
9419 (compute_exts_from_gf): Update.
9420 (compute_exts_from_src): Update.
9421 (output_files): Update.
9422 * src/reader.c (parse_header_extension_decl): New.
9423 (parse_source_extension_decl): New.
9424 (read_declarations): New case statements for the new tokens.
9425 * src/lex.c (percent_table): Add entries for %source_extension
9426 and %header_extension.
9427 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
9428
84163231
AD
94292001-08-06 Marc Autret <autret_m@epita.fr>
9430
9431 * configure.in: Bump to 1.28c.
9432 * doc/bison.texinfo: Texinfo thingies.
9433
8303fc42
AD
94342001-08-04 Pascal Bart <pascal.bart@epita.fr>
9435
9436 * tests/atconfig.in (CPPFLAGS): Add.
9437 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
9438
70a84437
AD
94392001-08-03 Akim Demaille <akim@epita.fr>
9440
9441 Version 1.28b.
9442
2ce10144
AD
94432001-08-03 Akim Demaille <akim@epita.fr>
9444
9445 * tests/Makefile.am (check-local): Ship testsuite.
9446 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
9447 Include `string.h'.
9448
1e3e4bc1
AD
94492001-08-03 Akim Demaille <akim@epita.fr>
9450
9451 * configure.in: Try using -Wformat when compiling.
9452
42b45b7f
AD
94532001-08-03 Akim Demaille <akim@epita.fr>
9454
9455 * configure.in: Bump to 1.28b.
9456
8f13fe33
AD
94572001-08-03 Akim Demaille <akim@epita.fr>
9458
9459 * src/complain.c: Adjust strerror_r portability issues.
9460
b37ba92c
AD
94612001-08-03 Akim Demaille <akim@epita.fr>
9462
9463 Version 1.28a.
9464
b0ce6046
AD
94652001-08-03 Akim Demaille <akim@epita.fr>
9466
9467 * src/getargs.c, src/getarg.h (skeleton)): Constify.
9468 * src/lex.c (literalchar): Avoid name clashes on `buf'.
9469 * src/getargs.c: Include complain.h.
9470 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
9471 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
9472
d01c415b
AD
94732001-08-03 Akim Demaille <akim@epita.fr>
9474
9475 * src/reader.c (readgram): Display hidden chars in error messages.
9476
459dd1a6
AD
94772001-08-03 Akim Demaille <akim@epita.fr>
9478
9479 Update to gettext 0.10.39.
9480
53b74c0c
AD
94812001-08-03 Akim Demaille <akim@epita.fr>
9482
9483 * lib/strspn.c: New.
9484
234a3be3
AD
94852001-08-01 Marc Autret <autret_m@epita.fr>
9486
9487 * doc/bison.texinfo: Update.
9488 * doc/bison.1 (mandoc): Update.
9489 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
9490 * src/files.c: Support output files extensions computing.
9491 (src_extension): New static variable.
9492 (header_extension): New static variable.
9493 (tr): New function.
9494 (get_extension_index): New function, gets the index of an extension
9495 filename in a string.
9496 (compute_exts_from_gf): New function, computes extensions from the
9497 grammar file extension.
9498 (compute_exts_from_src): New functions, computes extensions from the
9499 C source file extension, file given by ``-o'' option.
9500 (compute_base_names): Update.
9501 (output_files): Update.
9502
847bf1f5
AD
95032001-08-01 Robert Anisko <anisko_r@epita.fr>
9504
d995fee7 9505 * doc/bison.texi: Document @$.
847bf1f5
AD
9506 (Locations): New section.
9507
d074a105
AD
95082001-07-18 Akim Demaille <akim@epita.fr>
9509
9510 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
9511 * config/prev-version.txt, config/move-if-change: New.
9512 * Makefile.am: Adjust.
9513
3419715d
AD
95142001-07-08 Pascal Bart <pascal.bart@epita.fr>
9515
9516 * src/bison.simple (yyparse): Suppress warning `comparaison
9517 between signed and unsigned'.
9518
62ab6972
AD
95192001-07-05 Pascal Bart <pascal.bart@epita.fr>
9520
9521 * src/getargs.h (raw_flag): Remove.
9522 * src/getargs.c: Die on `-r'/`--raw'.
9523 * src/lex.c (parse_percent_token): Die on `%raw'.
9524 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
9525 * tests/calc.at: Suppress test with option `--raw'.
9526
1e24cc5b
AD
95272001-07-14 Akim Demaille <akim@epita.fr>
9528
9529 * config/: New.
9530 * configure.in: Require Autoconf 2.50.
9531 Update to gettext 0.10.38.
9532
32dfccf8
AD
95332001-03-16 Akim Demaille <akim@epita.fr>
9534
9535 * doc/bison.texinfo: ANSIfy the examples.
9536
cd5bd6ac
AD
95372001-03-16 Akim Demaille <akim@epita.fr>
9538
9539 * getargs.c (skeleton): New variable.
9540 (longopts): --skeleton is a new option.
9541 (shortopts, getargs): -S is a new option.
9542 * getargs.h: Declare skeleton.
9543 * output.c (output_parser): Use it.
9544
5141b016
AD
95452001-03-16 Akim Demaille <akim@epita.fr>
9546
9547 * m4/strerror_r.m4: New.
9548 * m4/error.m4: Run AC_FUNC_STRERROR_R.
9549 * lib/error.h, lib/error.c: Update.
9550
447992b9
AD
95512001-03-16 Akim Demaille <akim@epita.fr>
9552
9553 * src/getargs.c (longopts): Clean up.
9554
274d42ce
AD
95552001-02-21 Akim Demaille <akim@epita.fr>
9556
9557 * src/reader.c (gensym): `gensym_count' is your own.
9558 Use a static buf to create the symbol name, as token_buffer is no
9559 longer a buffer.
9560
22c821f3
AD
95612001-02-08 Akim Demaille <akim@epita.fr>
9562
9563 * src/conflicts.c (conflict_report): Be sure not to append to res
9564 between two calls, which could happen if both first sprintf were
9565 skipped, but not the first cp += strlen.
9566
18569462
AD
95672001-02-08 Akim Demaille <akim@epita.fr>
9568
9569 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
9570 New, from fileutils 4.0.37.
9571 * configure.in: Require Autoconf 2.49c. I took some time before
9572 making this decision. This is the only way out for portability
9573 issues in Bison, it would mean way too much duplicate effort to
9574 import in Bison features implemented in 2.49c since 2.13.
9575 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
9576
0d8f3c8a
AD
95772001-02-02 Akim Demaille <akim@epita.fr>
9578
9579 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 9580 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 9581
f17bcd1f
AD
95822001-01-19 Akim Demaille <akim@epita.fr>
9583
9584 Get rid of the ad hoc handling of token_buffer in the scanner: use
9585 the obstacks.
9586
9587 * src/lex.c (token_obstack): New.
9588 (init_lex): Initialize it. No longer call...
9589 (grow_token_buffer): this. Remove it.
9590 Adjust all the places which used it to use the obstack.
9591
511e79b3
AD
95922001-01-19 Akim Demaille <akim@epita.fr>
9593
9594 * src/lex.h: Rename all the tokens:
9595 s/\bENDFILE\b/tok_eof/g;
9596 s/\bIDENTIFIER\b/tok_identifier/g;
9597 etc.
9598 Let them be enums, not #define, to ease debugging.
9599 Adjust all the code.
9600
0d6508ef
AD
96012001-01-18 Akim Demaille <akim@epita.fr>
9602
9603 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9604 * src/lex.c (maxtoken, grow_token_buffer): Static.
9605
6deb4447
AD
96062001-01-18 Akim Demaille <akim@epita.fr>
9607
9608 Since we now use obstacks, more % directives can be enabled.
9609
9610 * src/lex.c (percent_table): Also accept `%yacc',
9611 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9612 `%debug'.
9613 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9614 instead of returning a token.
9615 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9616 * src/reader.c (read_declarations): Adjust.
9617 * src/files.c (open_files): Don't call `compute_base_names', don't
9618 compute `attrsfile' since they depend upon data which might be
9619 *in* the input file now.
9620 (output_files): Do it here.
9621 * src/output.c (output_headers): Document the fact that this patch
9622 introduces a guaranteed SEGV for semantic parsers.
9623 * doc/bison.texinfo: Document them.
9624 * tests/suite.at: Exercise these %options.
9625
ff4423cc
AD
96262000-12-20 Akim Demaille <akim@epita.fr>
9627
9628 Also handle the output file (--verbose) with obstacks.
9629
9630 * files.c (foutput): Remove.
9631 (output_obstack): New.
9632 Adjust all dependencies.
9633 * src/conflicts.c: Return a string.
9634 * src/system.h (obstack_grow_string): Rename as...
9635 (obstack_sgrow): this. Be ready to work with non literals.
9636 (obstack_fgrow4): New.
9637
956dba3a
AD
96382000-12-20 Akim Demaille <akim@epita.fr>
9639
9640 * src/files.c (open_files): Fix the computation of short_base_name
9641 in the case of `-o foo.tab.c'.
9642
337bab46
AD
96432000-12-20 Akim Demaille <akim@epita.fr>
9644
9645 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9646 (copy_dollar): Now that everything uses obstacks, get rid of the
9647 FILE * parameters.
9648
5d3214b8
AD
96492000-12-20 Akim Demaille <akim@epita.fr>
9650
9651 * src/files.c (open_files): Actually the `.output' file is based
9652 on the short_base_name, not base_name.
9653 * tests/suite.at (Checking output file names): Adjust.
9654
29092a57
AD
96552000-12-20 Akim Demaille <akim@epita.fr>
9656
9657 * src/bison.s1: Remove, we now use directly...
9658 * src/bison.simple: this.
9659 * src/Makefile.am: Use pkgdata instead of data.
9660
ea5607fd
AD
96612000-12-20 Akim Demaille <akim@epita.fr>
9662
9663 * src/files.c (guard_obstack): New.
9664 (open_files): Initialize it.
9665 (output_files): Dump it...
9666 * src/files.h: Export it.
9667 * src/reader.c (copy_guard): Use it.
9668
27110317
AD
96692000-12-19 Akim Demaille <akim@epita.fr>
9670
9671 * src/files.c (outfile, defsfile, actfile): Removed as global
9672 vars.
9673 (open_files): Don't compute them.
9674 (output_files): Adjust.
9675 (base_name, short_base_name): Be global.
9676 Adjust dependencies.
9677
19c50364
AD
96782000-12-19 Akim Demaille <akim@epita.fr>
9679
9680 * src/files.c (strsuffix): New.
9681 (stringappend): Be just like strcat but allocate.
9682 (base_names): Eve out from open_files.
9683 Try to simplify the rather hairy computation of base_name and
9684 short_base_name.
9685 (open_files): Use it.
9686 * tests/suite.at (Checking output file names): New test.
9687
573c1d9f
AD
96882000-12-19 Akim Demaille <akim@epita.fr>
9689
9690 * src/system.h (obstack_grow_literal_string): Rename as...
9691 (obstack_grow_string): this.
9692 * src/output.c (output_parser): Recognize `%% actions' instead of
9693 `$'.
9694 * src/bison.s1: s/$/%% actions/.
9695 * src/bison.hairy: Likewise.
9696
ef7ddedd
AD
96972000-12-19 Akim Demaille <akim@epita.fr>
9698
9699 * src/output.c (output_parser): Compute the `#line' lines when
9700 there are.
9701 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9702 Suggested by Hans Aberg.
9703
ff61dabd
AD
97042000-12-19 Akim Demaille <akim@epita.fr>
9705
9706 Let the handling of the skeleton files be local to the procedures
9707 that use it.
9708
9709 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9710 longer static.
9711 (fparser, open_extra_files): Remove.
9712 (open_files, output_files): Don't take care of fparser.
9713 * src/files.h: Adjust.
9714 * src/output.c (output_parser): Open and close the file to the
9715 skeleton.
9716 * src/reader.c (read_declarations): When %semantic_parser, open
9717 fguard.
9718
55b96341
AD
97192000-12-19 Akim Demaille <akim@epita.fr>
9720
9721 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9722 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9723
358c15b7
AD
97242000-12-19 Akim Demaille <akim@epita.fr>
9725
9726 * src/files.c (open_files): Yipee! We no longer need all the code
9727 looking for `/tmp' since we have no tmp file.
9728
7de3329e
AD
97292000-12-19 Akim Demaille <akim@epita.fr>
9730
9731 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9732 New macros.
9733 * src/files.c (open_files): Less dependency on MSDOS etc.
9734
3abcd459
AD
97352000-12-14 Akim Demaille <akim@epita.fr>
9736
9737 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9738 Provide a default definition.
9739 Use it when executing the default @ action.
9740 * src/reader.c (reader_output_yylsp): No longer include
9741 `timestamp' and `text' in the default YYLTYPE.
9742
2a91a95e
AD
97432000-12-12 Akim Demaille <akim@epita.fr>
9744
9745 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9746 (copy_guard): Quote the file names.
9747 Reported by Laurent Mascherpa.
9748
14d3eb9b
AD
97492000-12-12 Akim Demaille <akim@epita.fr>
9750
9751 * src/output.c (output_headers, output_program, output): Be sure
9752 to escape special characters when outputting filenames.
9753 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9754 (output_headers): Don't depend on them, Use ACTSTR.
9755
d7045ec6
AD
97562000-11-17 Akim Demaille <akim@epita.fr>
9757
9758 * lib/obstack.h: Formatting changes.
9759 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9760 prevents type checking.
9761 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9762 cast the value to (void *): assigning a `foo *' to a `void *'
9763 variable is valid.
9764 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9765 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9766 append characters.
9767
6fd54b73
AD
97682000-11-17 Akim Demaille <akim@epita.fr>
9769
9770 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9771 as...
9772 (suite.m4, regression.m4, calc.m4): these.
9773 * tests/atgeneral.m4: Update from CVS Autoconf.
9774
4c50eae6
AD
97752000-11-17 Akim Demaille <akim@epita.fr>
9776
9777 * tests/regression.m4 (%union and --defines): New test,
9778 demonstrating a current bug in the obstack implementation.
9779
a35f64ea
AD
97802000-11-17 Akim Demaille <akim@epita.fr>
9781
9782 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9783 macros.
9784 Use them to declare the variables which are global or local to
9785 `yyparse'.
9786
7de23534
AD
97872000-11-17 Akim Demaille <akim@epita.fr>
9788
9789 * acconfig.h: Remove, no longer used.
9790
aa7815f5
AD
97912000-11-07 Akim Demaille <akim@epita.fr>
9792
9793 * src: s/Copyright (C)/Copyright/g.
9794
5af1f549
AD
97952000-11-07 Akim Demaille <akim@epita.fr>
9796
9797 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9798 defining.
9799 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9800
553e2b22
AD
98012000-11-07 Akim Demaille <akim@epita.fr>
9802
9803 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9804 Merge in a single CPP if/else.
9805
8a4f41d6
AD
98062000-11-07 Akim Demaille <akim@epita.fr>
9807
9808 * src/output.c (output): Remove useless variables.
9809 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9810 argument `data' for consistency with the prototypes.
9811 Qualify it `const'.
9812 (obstack_copy, obstack_copy0): Rename the second argument as
9813 `address' for consistency. Qualify it `const'.
9814 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9815 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9816 `const' their input argument (`data' or `address').
9817 Adjust the corresponding macros to include `const' in casts.
9818
095a3fb5
AD
98192000-11-03 Akim Demaille <akim@epita.fr>
9820
9821 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9822 s/PFILE1/BISON_HAIRY/.
9823 Adjust dependencies.
9824
d1cdce7c
AD
98252000-11-03 Akim Demaille <akim@epita.fr>
9826
090c5ebf 9827 For some reason, this was not applied.
d1cdce7c
AD
9828
9829 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9830 `unlink': it's no longer used.
9831
9311529b
AD
98322000-11-03 Akim Demaille <akim@epita.fr>
9833
9834 * src/files.c (skeleton_find): New function, eved out of...
9835 (open_files, open_extra_files): here.
9836
d8880f69
AD
98372000-11-03 Akim Demaille <akim@epita.fr>
9838
9839 Don't use `atexit'.
9840
9841 * src/files.c (obstack_save): New function.
9842 (done): Rename as...
9843 (output_files): this.
9844 Use `obstack_save'.
9845 * src/main.c (main): Don't use `atexit' to register `done', since
9846 it no longer has to remove tmp files, just call `output_files'
9847 when there are no errors.
9848
0dbb648e
AD
98492000-11-02 Akim Demaille <akim@epita.fr>
9850
9851 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9852 `unlink': it's no longer used.
9853 * src/files.h: Formatting changes.
9854
896fe5c1
AD
98552000-11-02 Akim Demaille <akim@epita.fr>
9856
9857 Remove the last uses of mktemp and unlink/delete.
9858
9859 * src/files.c (fdefines, ftable): Removed.
9860 (defines_ostack, table_obstack): New.
9861 Adjust dependencies of the former into uses of the latter.
9862 * src/output.c (output_short_or_char_table, output_short_table):
9863 Convert to using obstacks.
9864 * src/reader.c (copy_comment2): Accept one FILE * and two
9865 obstacks.
9866 (output_token_defines, reader_output_yylsp): Use obstacks.
9867 * src/system.h (obstack_fgrow3): New.
9868
dd60faec
AD
98692000-11-01 Akim Demaille <akim@epita.fr>
9870
9871 Change each use of `fattrs' into a use of `attrs_obstack'.
9872
9873 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9874 * src/files.c (fattrs): Remove.
9875 (attrs_obstack): New.
9876 Adjust all dependencies.
9877 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9878
8c7ebe49
AD
98792000-11-01 Akim Demaille <akim@epita.fr>
9880
9881 Introduce obstacks.
9882 Change each use of `faction' into a use of `action_obstack'.
9883
9884 * lib/obstack.h, lib/obstack.c: New files.
9885 * src/files.c (faction): Remove.
9886 (action_obstack): New.
9887 Adjust all dependencies.
9888
77aee789
AD
98892000-10-20 Akim Demaille <akim@epita.fr>
9890
9891 * lib/quote.h (PARAMS): New macro. Use it.
9892
43591cec
AD
98932000-10-16 Akim Demaille <akim@epita.fr>
9894
9895 * src/output.c (output_short_or_char_table): New function.
9896 (output_short_table, output_token_translations): Use it.
9897 (goto_actions): Use output_short_table.
9898
1e9798d5
AD
98992000-10-16 Akim Demaille <akim@epita.fr>
9900
9901 * src/symtab.c (bucket_new): New function.
9902 (getsym): Use it.
9903
9904 * src/output.c (output_short_table): New argument to display the
9905 comment associated with the table.
9906 Adjust dependencies.
9907 (output_gram): Use it.
9908 (output_rule_data): Nicer output layout for YYTNAME.
9909
f282676b
AD
99102000-10-16 Akim Demaille <akim@epita.fr>
9911
9912 * src/lex.c (read_typename): New function.
9913 (lex): Use it.
9914 * src/reader.c (copy_dollar): Likewise.
9915
550a72a3
AD
99162000-10-16 Akim Demaille <akim@epita.fr>
9917
9918 * src/reader.c (copy_comment2): Expect the input stream to be on
9919 the `/' which is suspected to open a comment, instead of being
9920 called after `//' or `/*' was read.
9921 (copy_comment, copy_definition, parse_union_decl, copy_action)
9922 (copy_guard): Adjust.
9923
131e2fef
AD
99242000-10-16 Akim Demaille <akim@epita.fr>
9925
9926 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9927 `read_signed_integer'.
9928
79282c5a
AD
99292000-10-16 Akim Demaille <akim@epita.fr>
9930
9931 * src/reader.c (copy_dollar): New function.
9932 (copy_guard, copy_action): Use it.
9933
ff4a34be
AD
99342000-10-16 Akim Demaille <akim@epita.fr>
9935
9936 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9937 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9938 New files, from Fileutils 4.0.27.
9939 * src/main.c (printable_version): Remove.
9940 * src/lex.c, src/reader.c: Use `quote'.
9941
99422000-10-04 Akim Demaille <akim@epita.fr>
9943
9944 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9945
14ded682
AD
99462000-10-04 Akim Demaille <akim@epita.fr>
9947
9948 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9949
8e03724b
AD
99502000-10-04 Akim Demaille <akim@epita.fr>
9951
9952 When a literal string is used to define two different tokens,
9953 `bison -v' segfaults.
9954 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9955
9956 * tests/regression.m4: New file.
9957 Include the core of the sample provided by Piotr Gackiewicz.
9958 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9959 properly.
9960
a9e64249
AD
99612000-10-04 Akim Demaille <akim@epita.fr>
9962
9963 * src/reader.c (parse_expect_decl): Keep `count' within the size
9964 of `buffer'.
9965 From Neil Booth.
9966
da9abf43
AD
99672000-10-02 Paul Eggert <eggert@twinsun.com>
9968
9969 * bison.s1 (yyparse): Assign the default value
9970 unconditionally, to avoid a GCC warning and make the parser a
9971 tad smaller.
9972
c33638bb
AD
99732000-10-02 Akim Demaille <akim@epita.fr>
9974
9975 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9976 options.
9977
444c570a
AD
99782000-10-02 Akim Demaille <akim@epita.fr>
9979
9980 * src/derives.c, src/print.c, src/reduce.c: To ease the
9981 translation, move some `\n' out of the translated strings.
9982
89cab50d
AD
99832000-10-02 Akim Demaille <akim@epita.fr>
9984
9985 The location tracking mechanism is precious for parse error
9986 messages. Nevertheless, it is enabled only when `@n' is used in
9987 the grammar, which is a different issue (you can use it in error
9988 message, but not in the grammar per se). Therefore, there should
9989 be another means to enable it.
9990
9991 * src/getargs.c (getargs): Support `--locations'.
9992 (usage): Report it.
9993 * src/getargs.h (locationsflag): Export it.
9994 * src/lex.c (percent_table): Support `%locations'.
9995 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9996 with `locationsflag'.
9997 * doc/bison.texinfo: Document `--locations' and `%locations'.
9998 Sort the options.
9999 * tests/calc.m4: Test it.
10000
10001 For regularity of the names, replace each
10002 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
10003 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
10004 In addition replace each `flag' with `_flag'.
10005
d6c2cba0
AD
100062000-10-02 Akim Demaille <akim@epita.fr>
10007
10008 Also test parse error messages, including with YYERROR_VERBOSE.
10009
10010 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
10011 associative).
10012 Use it to check the computations.
10013 Use it to check `nonassoc' is honored.
10014 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
10015 `--yyerror-verbose'.
10016 (_AT_CHECK_CALC): Adjust to this option.
10017 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
10018
5a35a6cb
AD
100192000-10-02 Akim Demaille <akim@epita.fr>
10020
10021 Test also `--verbose', `--defines' and `--name-prefix'. Testing
10022 the latter demonstrates a flaw in the handling of non debugging
10023 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
10024 was used in order to simplify:
10025
10026 #if YYDEBUG
10027 if (yydebug)
10028 {
10029 ...
10030 }
10031 #endif
10032
10033 into
10034
10035 if (yydebug)
10036 {
10037 ...
10038 }
10039
10040 unfortunately this leads to a CPP conflict when
10041 `--name-prefix=foo' is used since it produces `#define yydebug
10042 foodebug'.
10043
10044 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
10045 (YYDPRINTF): New macro.
10046 Spread its use.
10047 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10048 the bison options.
10049 Also test `--verbose', `--defines' and `--name-prefix'.
10050
71da9eea
AD
100512000-10-02 Akim Demaille <akim@epita.fr>
10052
10053 Improve the readability of the produced parsers.
10054
10055 * src/bison.s1: Formatting changes.
10056 Improve the comment related to the `$' mark.
10057 (yydefault): Don't fall through to `yyresume': `goto' there.
10058 * src/output.c (output_parser): When the `$' is met, skip the end
10059 of its line.
10060 New variable, `number_of_dollar_signs', to check there's exactly
10061 one `$' in the parser skeleton.
10062
95e36146
AD
100632000-10-02 Akim Demaille <akim@epita.fr>
10064
10065 * lib/xstrdup.c: New file, from the fileutils.
10066 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10067 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10068 instead of strlen + xmalloc + strcpy.
10069 * src/symtab.c (copys): Remove, use xstrdup instead.
10070
d7020c20
AD
100712000-10-02 Akim Demaille <akim@epita.fr>
10072
10073 * src/gram.h (associativity): New enum type which replaces the
10074 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10075 `right_assoc', `left_assoc' and `non_assoc'.
10076 Adjust all dependencies.
10077 * src/reader.c: Formatting changes.
10078 (LTYPESTR): Don't define it, use it as a literal in
10079 `reader_output_yylsp'.
10080 * src/symtab.h (symbol_class): New enum type which replaces the
10081 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10082 `sunknown', `stoken and `snterm'.
10083
1916f98e
AD
100842000-10-02 Akim Demaille <akim@epita.fr>
10085
10086 * src/getargs.c (fixed_outfiles): Rename as...
10087 (yaccflag): for consistency and accuracy.
10088 Adjust dependencies.
10089
d7913476
AD
100902000-10-02 Akim Demaille <akim@epita.fr>
10091
10092 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10093 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10094 difficult and introduced a lot of core dump. It turns out that
10095 Bison used an implementation of `xmalloc' based on `calloc', and
10096 at various places it does depend upon the initialization to 0. I
10097 have not tried to isolate the pertinent places, and all the former
10098 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10099 someone should address this issue.
10100
10101 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10102 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10103 files.
10104 Adjust dependencies.
10105 * src/warshall.h: New file.
10106 Propagate.
10107
340ef489
AD
101082000-10-02 Akim Demaille <akim@epita.fr>
10109
10110 Various anti-`extern in *.c' changes.
10111
10112 * src/system.h: Include `assert.h'.
10113
b2ca4022
AD
101142000-10-02 Akim Demaille <akim@epita.fr>
10115
10116 * src/state.h (nstates, final_state, first_state, first_shift)
10117 (first_reduction): Move their exportation from here...
10118 * src/LR0.h: to here.
10119 Adjust dependencies.
10120 * src/getargs.c (statisticsflag): New variable.
10121 Add support for `--statistics'.
10122 Adjust dependencies.
10123
10124 Remove a lot of now useless `extern' statements in most files.
10125
403b315b
AD
101262000-10-02 Akim Demaille <akim@epita.fr>
10127
10128 * src/LR0.h: New file.
10129 Propagate its use.
10130
07a58c13
AD
101312000-10-02 Akim Demaille <akim@epita.fr>
10132
10133 * src/print.h: New file.
10134 Propagate its use.
10135 * src/print.c: Formatting and ordering changes.
10136 (verbose, terse): Replace with...
10137 (print_results): this new function.
10138 Adjust dependencies.
10139
0619caf0
AD
101402000-10-02 Akim Demaille <akim@epita.fr>
10141
10142 * src/conflicts.c (conflict_report): New function.
10143 (conflict_log, verbose_conflict_log): Replace with...
10144 (print_conflicts): this function.
10145 Adjust dependencies.
10146 * src/conflicts.h: New file.
10147 Propagate its inclusion.
10148
3519ec76
AD
101492000-10-02 Akim Demaille <akim@epita.fr>
10150
10151 * src/nullable.h: New file.
10152 Propagate its inclusion.
10153 * src/nullable.c: Formatting changes.
10154
015acc48
AD
101552000-10-02 Akim Demaille <akim@epita.fr>
10156
10157 * src/reduce.h: New file.
10158 Propagate its inclusion.
10159 * src/reduce.c: Topological sort and other formatting changes.
10160 (bool, TRUE, FALSE): Move their definition to...
10161 * src/system.h: here.
10162
8963a27b
AD
101632000-10-02 Akim Demaille <akim@epita.fr>
10164
10165 * src/files.c: Formatting changes.
10166 (tryopen, tryclose, openfiles): Rename as...
10167 (xfopen, xfclose, open_files): this.
10168 (stringappend): static.
10169 * src/files.h: Complete the list of exported symbols.
10170 Propagate its use.
10171
a70083a3
AD
101722000-10-02 Akim Demaille <akim@epita.fr>
10173
10174 * src/reader.h: New file.
10175 Propagate its use instead of tedious list of `extern' and
10176 prototypes.
10177 * src/reader.c: Formatting changes, topological sort,
10178 s/register//.
10179
abadc117
AD
101802000-10-02 Akim Demaille <akim@epita.fr>
10181
10182 * src/lex.h: Prototype `lex.c' exported functions.
10183 * src/reader.c: Adjust.
10184 * src/lex.c: Formatting changes.
10185 (safegetc): Rename as...
10186 (xgetc): this.
10187
720d742f
AD
101882000-10-02 Akim Demaille <akim@epita.fr>
10189
10190 * src/lalr.h: New file.
10191 Propagate its inclusion instead of prototypes and `extern'.
10192 * src/lalr.c: Formatting changes, topological sorting etc.
10193
f2acea59
AD
101942000-10-02 Akim Demaille <akim@epita.fr>
10195
10196 * src/output.c (token_actions): Introduce a temporary array,
10197 YYDEFACT, that makes it possible for this function to use
10198 output_short_table.
10199
d019d655
AD
102002000-10-02 Akim Demaille <akim@epita.fr>
10201
10202 `user_toknums' is output as a `short[]' in `output.c', while it is
10203 defined as a `int[]' in `reader.c'. For consistency with the
10204 other output tables, `user_toknums' is now defined as a table of
10205 shorts.
10206
10207 * src/reader.c (user_toknums): Be a short table instead of an int
10208 table.
10209 Adjust dependencies.
10210
10211 Factor the short table outputs.
10212
10213 * src/output.c (output_short_table): New function.
10214 * src/output.c (output_gram, output_stos, output_rule_data)
10215 (output_base, output_table, output_check): Use it.
10216
6c89f1c1
AD
102172000-10-02 Akim Demaille <akim@epita.fr>
10218
10219 * src/output.c (output): Topological sort of the functions, in
10220 order to get rid of the `static' prototypes.
10221 No longer use `register'.
10222 * src/output.h: New file.
10223 Propagate its inclusion in files explicitly prototyping functions
10224 from output.c.
10225
d9efd181
AD
102262000-09-21 Akim Demaille <akim@epita.fr>
10227
10228 * src/atgeneral.m4: Update from Autoconf.
10229
c29240e7 102302000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
10231
10232 * src/closure.h: New file.
10233 * src/closure.c: Formatting changes, topological sort over the
10234 functions, use of closure.h.
10235 (initialize_closure, finalize_closure): Rename as...
10236 (new_closure, free_closure): these. Adjust dependencies.
10237 * src/LR0.c: Formatting changes, topological sort, use of
10238 cloture.h.
10239 (initialize_states): Rename as...
10240 (new_states): this.
10241 * src/Makefile.am (noinst_HEADERS): Adjust.
10242
499daa50
AD
102432000-09-20 Akim Demaille <akim@epita.fr>
10244
10245 * src/acconfig.h: Don't protect config.h against multiple
10246 inclusion.
10247 Don't define PARAMS.
10248 * src/system.h: Define PARAMS.
10249 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
10250 purpose of config.h. system.h must not try to fix wrong
10251 definitions in config.h.
10252
cc84fd5d
AD
102532000-09-20 Akim Demaille <akim@epita.fr>
10254
10255 * src/derives.h: New file.
10256 * src/main.c, src/derives.h: Use it.
10257 Formatting changes.
10258 * src/Makefile.am (noinst_HEADERS): Adjust.
10259
db5b3a89
AD
102602000-09-20 Akim Demaille <akim@epita.fr>
10261
10262 * tests/atgeneral.m4: Update from Autoconf.
10263 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
10264 (AT_CHECK_CALC): New macros.
10265 Use these macros to test bison with options `', `--raw',
10266 `--debug', `--yacc', `--yacc --debug'.
10267
ceed8467
AD
102682000-09-19 Akim Demaille <akim@epita.fr>
10269
10270 * src/output.c: Formatting changes.
10271 * src/machine.h: Remove, leaving its contents in...
10272 * src/system.h: here.
10273 Include stdio.h.
10274 Adjust all dependencies on stdio.h and machine.h.
10275 * src/getargs.h: New file.
10276 Let all `extern' declarations about getargs.c be replaced with
10277 inclusion of `getargs.h'.
10278 * src/Makefile.am (noinst_HEADERS): Adjust.
10279
10280 * tests/calc.m4 (yyin): Be initialized in main, not on the global
10281 scope.
10282 (yyerror): Returns void, not int.
10283 * doc/bison.texinfo: Formatting changes.
10284
05a1d24b
AD
102852000-09-19 Akim Demaille <akim@epita.fr>
10286
10287 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
10288 portable.
10289
cbd25751
AD
102902000-09-18 Akim Demaille <akim@epita.fr>
10291
10292 * configure.in: Append WARNING_CFLAGS to CFLAGS.
10293 * src/Makefile.am (INCLUDES): Don't.
10294 Be ready to fetch headers in lib/.
10295
13863333
AD
102962000-09-18 Akim Demaille <akim@epita.fr>
10297
10298 * doc/bison.texinfo: Update the copyright.
10299 ANSIfy and GNUify the examples.
10300 Remove the old menu.
10301
0d533154
AD
103022000-09-18 Akim Demaille <akim@epita.fr>
10303
10304 First set of tests: use the `calc' example from the documentation.
10305
10306 * src/bison.s1 (yyparse): Condition the code using `yytname' which
10307 is defined only when YYDEBUG is.
10308 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
10309 * src/files.c (tryopen, tryclose): Formatting changes.
10310 Move to the top and be static.
10311 * src/reader.c (read_signed_integer): Likewise.
10312 * tests/calc.m4: New file.
10313 * Makefile.am, suite.m4: Adjust.
10314 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
10315
e79137ac
AD
103162000-09-18 Akim Demaille <akim@epita.fr>
10317
10318 Add support for an Autotest test suite for Bison.
10319
10320 * m4/m4.m4, m4/atconfig.m4: New files.
10321 * m4/Makefile.am (EXTRA_DIST): Adjust.
10322 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
10323 files.
10324 * src/getargs.c: Display a more standard --version message.
10325 * src/reader.c (reader): Formatting changes.
10326 No longer depend upon VERSION_STRING.
10327 * configure.in: No longer use `dnl'.
10328 Set up the test suite and the new directory `tests/.
10329 (VERSION_STRING): Remove.
10330
27821bff
AD
103312000-04-14 Akim Demaille <akim@epita.fr>
10332
10333 * src/reader.c (copy_comment2): New function, same as former
10334 `copy_comment', but outputs into two FILE *.
10335 (copy_comment): Use it.
10336 (parse_union_decl): Use it.
10337 (get_type, parse_start_decl): Use the same `invalid' message.
10338 (parse_start_decl, parse_union_decl): Use the same `multiple'
10339 message.
10340 (parse_union_decl, copy_guard, copy_action): Use the same
10341 `unmatched' message.
10342 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
10343
cfe5fbc0
AD
103442000-03-31 Akim Demaille <akim@epita.fr>
10345
10346 * src/files.c (tryopen, tryclose): Move to the top.
10347 Be static.
10348
cb7db13e
AD
103492000-03-31 Akim Demaille <akim@epita.fr>
10350
10351 * src/main.c (main): Don't call `done', exit does it.
10352
a0f6b076
AD
103532000-03-31 Akim Demaille <akim@epita.fr>
10354
36281465
AD
10355 * allocate.c: s/return (foo)/return foo/.
10356 * lalr.c: Likewise.
10357 * LR0.c: Likewise.
10358 * output.c: Likewise.
10359 * reader.c: Likewise.
10360 * symtab.c: Likewise.
10361 * vmsgetargs.c: Likewise.
10362
103632000-03-31 Akim Demaille <akim@epita.fr>
10364
10365 Clean up the error reporting functions.
a0f6b076
AD
10366
10367 * src/report.c: New file.
10368 * src/report.h: Likewise.
10369 * src/Makefile.am: Adjust.
10370 * m4/error.m4: New file.
10371 * m4/Makefile.am: Adjust.
10372 * configure.in (jm_PREREQ_ERROR): Call it.
10373 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
10374 Remove.
10375 (fatal, fatals): Remove. All callers use complain.c::fatal.
10376 (warn, warni, warns, warnss, warnss): Remove. All callers use
10377 complain.c::complain.
10378 (toomany): Remove, use fatal instead.
10379 * src/files.c (done): No argument, use complain_message_count.
10380 * src/main.c (main): Register `done' to `atexit'.
10381
10382 * src/getargs.c (usage): More `fputs', less `fprintf'.
10383
18539825
AD
103842000-03-28 Akim Demaille <akim@epita.fr>
10385
10386 * lib/: New directory.
10387 * Makefile.am (SUBDIRS): Adjust.
10388 * configure.in: Adjust.
10389 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
10390 useless.
10391 * src/alloca.c: Moved to lib/.
10392 * src/getopt.c: Likewise.
10393 * src/getopt1.c: Likewise.
10394 * src/getopt.h: Likewise.
10395 * src/ansi2knr.c: Likewise.
10396 * src/ansi2knr.1: Likewise.
10397 * src/Makefile.am: Adjust.
10398 * lib/Makefile.am: New file.
10399
9f306f2a
AD
104002000-03-28 Akim Demaille <akim@epita.fr>
10401
10402 * src/getargs.c (usage): Refresh the help message.
10403
0ba347b6
AD
104042000-03-17 Akim Demaille <akim@epita.fr>
10405
10406 * src/getopt1.c: Updated from textutils 2.0e
10407 * src/getopt.c: Likewise.
10408 * src/getopt.h: Likewise.
10409
dbe7f271
AD
104102000-03-17 Akim Demaille <akim@epita.fr>
10411
10412 * src/Makefile.am (bison.simple): Fix the awk program: quote only
10413 the file name, not the whole `#line LINE FILE'.
10414
75bbe78d
AD
104152000-03-17 Akim Demaille <akim@epita.fr>
10416
10417 On syntax errors, report the token on which we choked.
10418
aa5fd0ee
AD
10419 * src/bison.s1 (yyparse): In the label yyerrlab, when
10420 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 10421
7b306f52
AD
104222000-03-17 Akim Demaille <akim@epita.fr>
10423
aa5fd0ee 10424 * src/reader.c (copy_at): New function.
7b306f52
AD
10425 (copy_guard): Use it.
10426 (copy_action): Use it.
10427
e87b5700
AD
104282000-03-17 Akim Demaille <akim@epita.fr>
10429
10430 Be kind to translators, save some useless translations.
10431
aa5fd0ee 10432 * src/main.c (banner): New function.
e87b5700
AD
10433 (fatal_banner): Use it.
10434 (warn_banner): Use it.
10435
ae3c3164
AD
104362000-03-17 Akim Demaille <akim@epita.fr>
10437
aa5fd0ee
AD
10438 * src/reader.c (copy_definition): Use copy_string and
10439 copy_comment. Removed now unused `match', `ended',
10440 `cplus_comment'.
ae3c3164
AD
10441 (copy_comment, copy_string): Moved, to be visible from
10442 copy_definition.
10443
4dc58e7c
AD
104442000-03-17 Akim Demaille <akim@epita.fr>
10445
aa5fd0ee
AD
10446 * src/reader.c (copy_string): Declare `static inline'. No
10447 problems with inline, since it is checked by configure.
4dc58e7c
AD
10448 (copy_comment): Likewise.
10449
0a6384c4
AD
104502000-03-17 Akim Demaille <akim@epita.fr>
10451
aa5fd0ee 10452 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 10453
3cef001a
AD
104542000-03-17 Akim Demaille <akim@epita.fr>
10455
aa5fd0ee 10456 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
10457 (copy_action): Use it. Removed now unused `match', `ended',
10458 `cplus_comment'.
10459 (copy_guard): Likewise.
10460
ca36d2ef
AD
104612000-03-17 Akim Demaille <akim@epita.fr>
10462
aa5fd0ee 10463 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
10464 (copy_action): Use it.
10465 (copy_guard): Likewise.
10466
6666f98f
AD
104672000-03-17 Akim Demaille <akim@epita.fr>
10468
10469 Change the handling of @s so that they behave exactly like $s.
10470 There is now a pseudo variable @$ (readble and writable), location
10471 of the lhs of the rule (by default ranging from the location of
10472 the first symbol of the rhs, to the location of the last symbol,
10473 or, if the rhs is empty, YYLLOC).
10474
10475 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
10476 yyval.
10477 (yyparse): When providing a default semantic action, provide a
10478 default location action.
10479 (after the $): No longer change `*YYLSP', just stack YYLOC the
10480 same way you stack YYVAL.
10481 * src/reader.c (read_declarations): Use warns.
10482 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
10483 (copy_action, case '@'): Likewise.
10484 Use a standard error message, to save useless work from
10485 translators.
10486
41aca2e0
AD
104872000-03-17 Akim Demaille <akim@epita.fr>
10488
aa5fd0ee
AD
10489 * src/bison.s1: Formatting and cosmetics changes.
10490 * src/reader.c: Likewise.
41aca2e0
AD
10491 Update the Copyright notice.
10492
dc08c1d5
AD
104932000-03-17 Akim Demaille <akim@epita.fr>
10494
aa5fd0ee
AD
10495 * src/bison.s1 (#line): All set to `#line' only, since the
10496 Makefile now handles them.
dc08c1d5 10497
9ee3c97b
AD
104982000-03-16 Akim Demaille <akim@epita.fr>
10499
10500 * src/output.c (output_rule_data): Output the documentation of
10501 some of the tables.
10502 (Copyright notice): Update.
10503 Formatting changes.
10504
0de741ca
AD
105052000-03-16 Akim Demaille <akim@epita.fr>
10506
10507 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
10508 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
10509 One `#if YYDEBUG' remains, since it uses variables which are
10510 defined only if `YYDEBUG != 0'.
10511
bb10be54
AD
105122000-03-16 Akim Demaille <akim@epita.fr>
10513
10514 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
10515 and related variables so that the similarities are highlighted.
10516
b07b484a
AD
105172000-03-16 Akim Demaille <akim@epita.fr>
10518
10519 * src/bison.s1: Properly indent CPP directives.
10520
361f60b3
AD
105212000-03-16 Akim Demaille <akim@epita.fr>
10522
10523 * src/bison.s1: Properly indent the `alloca' CPP section.
10524
8c44d3ec
AD
105252000-03-16 Akim Demaille <akim@epita.fr>
10526
10527 Do not hard code values of directories in `configure.in'.
10528 Update the `configure' tool chain.
10529
10530 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
10531 src/makefile.am.
10532 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
10533 (AC_OUTPUT): Add m4/Makefile.
10534 Bump to bison 1.28a, 1.29 has never been released.
10535 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
10536 handled via src/Makefile.am.
10537 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
10538 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
10539 autoheader.
10540 * Makefile.am (SUBDIRS): Add m4.
10541 (ACLOCAL_AM_FLAGS): New variable.
10542 (AUTOMAKE_OPTIONS): Add check-news.
10543 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
10544 the proper line number and file name.
10545 (DEFS): Propagate the location of bison library files and of the
10546 locale files.
10547 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
10548 builddir.
10549 * acinclude.m4: Remove, replaced by the directory m4.
10550 * m4/Makefile.am (EXTRA_DIST): New variable.
10551 * m4/gettext.m4: New file, from the fileutils.
10552 * m4/lcmessage.m4: Likewise
10553 * m4/progtest.m4: Likewise.
10554 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
10555
f95997e7
AD
105562000-03-10 Akim Demaille <akim@epita.fr>
10557
10558 * src/closure.c:
10559 Formatting changes of various comments.
10560 Respect the GNU coding standards at various places.
10561 Don't use `_()' when no translation is needed.
10562
105631999-12-13 Jesse Thilo <jthilo@gnu.org>
10564
10565 * src/files.c:
10566 OS/2 honors TMPDIR environment variable.
10567
105681999-12-13 Jesse Thilo <jthilo@gnu.org>
10569
10570 * doc/bison.texinfo: Tweaked spelling and grammar.
10571 Updated ISBN.
10572 Removed reference to price of printed copy.
10573 Mention BISON_SIMPLE and BISON_HAIRY.
10574
105751999-12-13 Jesse Thilo <jthilo@gnu.org>
10576
10577 * configure.in, NEWS:
10578 Bison 1.29 released.
10579
105801999-10-27 Jesse Thilo <jthilo@gnu.org>
10581
10582 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
10583 Added reference card.
10584
105851999-07-26 Jesse Thilo <jthilo@gnu.org>
10586
10587 * po/ru.po: Added Russian translation.
10588
105891999-07-26 Jesse Thilo <jthilo@gnu.org>
10590
10591 * configure.in: Added Russian translation.
10592
105931999-07-06 Jesse Thilo <jthilo@gnu.org>
10594
10595 * configure.in, NEWS, README:
10596 Released version 1.28.
10597
105981999-06-14 Jesse Thilo <jthilo@gnu.org>
10599
10600 * src/system.h:
10601 Squashed redefinition warning on some systems.
10602
10603 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10604 Have configure build version string instead of relying on ANSI string
10605 concatentation.
10606
106071999-06-14 Jesse Thilo <jthilo@gnu.org>
10608
10609 * po/POTFILES.in: Got rid of version.c.
10610
106111999-06-14 Jesse Thilo <jthilo@gnu.org>
10612
10613 * acconfig.h, configure.in:
10614 Have configure build version string instead of relying on ANSI string
10615 concatentation.
10616
106171999-06-08 Jesse Thilo <jthilo@gnu.org>
10618
10619 * doc/bison.1:
10620 Dropped mention of `+' for long-named options.
10621
106221999-05-30 Jesse Thilo <jthilo@gnu.org>
10623
10624 * src/files.c: Added <unistd.h> for unlink().
10625
10626 * src/Makefile.am, src/system.h:
10627 I18n fixes.
10628
106291999-05-30 Jesse Thilo <jthilo@gnu.org>
10630
10631 * README: Added a FAQ list.
10632
10633 * configure.in, acconfig.h:
10634 I18n fixes.
10635
106361999-05-30 Jesse Thilo <jthilo@gnu.org>
10637
10638 * doc/FAQ, doc/Makefile.am:
10639 Added a FAQ list.
10640
106411999-05-19 Jesse Thilo <jthilo@gnu.org>
10642
10643 * src/alloc.h, src/symtab.h, src/version.c:
10644 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10645
106461999-04-18 Jesse Thilo <jthilo@gnu.org>
10647
10648 * src/.cvsignore, src/Makefile.am:
10649 Reorganized: sources in `src', documentation in `doc'.
10650
10651 * src/lex.c (literalchar):
10652 fixed the code for escaping double quotes (thanks
10653 Jonathan Czisny.)
10654
106551999-04-18 Jesse Thilo <jthilo@gnu.org>
10656
10657 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10658 Adjusted paths to reflect directory reorganization.
10659
106601999-04-18 Jesse Thilo <jthilo@gnu.org>
10661
10662 * doc/.cvsignore, doc/Makefile.am:
10663 Reorganized: sources in `src', documentation in `doc'.
10664
106651999-04-18 Jesse Thilo <jthilo@gnu.org>
10666
10667 * configure.in:
10668 Updated AC_INIT file to reflect directory reorganization.
10669
10670 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10671 Reorganized: sources in `src', documentation in `doc'.
10672
106731999-04-13 Jesse Thilo <jthilo@gnu.org>
10674
10675 * src/allocate.c:
10676 Don't declare calloc() and realloc() if not necessary.
10677
106781999-04-13 Jesse Thilo <jthilo@gnu.org>
10679
10680 * configure.in, acconfig.h, acinclude.m4:
10681 Don't declare calloc() and realloc() if not necessary.
10682
106831999-03-23 Jesse Thilo <jthilo@gnu.org>
10684
10685 * po/.cvsignore: Added i18n support.
10686
106871999-03-23 Jesse Thilo <jthilo@gnu.org>
10688
10689 * acconfig.h, configure.in, Makefile.am:
10690 Added i18n support.
10691
106921999-03-22 Jesse Thilo <jthilo@gnu.org>
10693
10694 * src/bison.s1: Fixed #line numbers.
10695
106961999-03-15 Jesse Thilo <jthilo@gnu.org>
10697
10698 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10699 Added PO files from Translation Project.
10700
107011999-03-03 Jesse Thilo <jthilo@gnu.org>
10702
10703 * Makefile.am:
10704 Added support for non-ANSI compilers (ansi2knr).
10705
107061999-02-16 Jesse Thilo <jthilo@gnu.org>
10707
10708 * configure.in: Bumped version number to 1.27.
10709
10710 * Makefile.am:
10711 Added `bison.simple' to list of files removed by `make distclean'.
10712
107131999-02-12 Jesse Thilo <jthilo@gnu.org>
10714
10715 * src/files.c, src/files.h:
10716 Defined locations of parser files in config.h instead of Makefile.
10717
107181999-02-12 Jesse Thilo <jthilo@gnu.org>
10719
10720 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10721 Defined locations of parser files in config.h instead of Makefile.
10722
107231999-02-09 Jesse Thilo <jthilo@gnu.org>
10724
10725 * Makefile.am:
10726 Removed inappropriate use of $< macro.
10727
107281999-02-05 Jesse Thilo <jthilo@gnu.org>
10729
10730 * po/Makefile.in.in, po/POTFILES.in:
10731 Add `po' directory skeleton.
10732
107331999-01-27 Jesse Thilo <jthilo@gnu.org>
10734
10735 * README: Document help-bison list.
10736
10737 * configure.in: Add check for mkstemp().
10738
107391999-01-20 Jesse Thilo <jthilo@gnu.org>
10740
10741 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10742 Hush a few compiler warnings.
10743
10744 * src/files.c:
10745 Add tryclose(), which verifies that fclose was successful.
10746 Hush a couple of compiler warnings.
10747
107481999-01-20 Jesse Thilo <jthilo@gnu.org>
10749
10750 * Makefile.am, OChangeLog:
10751 ChangeLog is now automatically generated. Include the old version as
10752 OChangeLog.
10753
107541999-01-14 Jesse Thilo <jthilo@gnu.org>
10755
10756 * 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:
10757 Update FSF address.
10758
107591999-01-14 Jesse Thilo <jthilo@gnu.org>
10760
10761 * doc/bison.texinfo: Fix formatting glitch.
10762
10763 * doc/bison.texinfo: Update FSF address.
10764
107651999-01-14 Jesse Thilo <jthilo@gnu.org>
10766
10767 * acconfig.h: Update FSF address.
10768
107691999-01-08 Jesse Thilo <jthilo@gnu.org>
10770
10771 * src/system.h:
10772 Don't define PACKAGE here, since config.h defines it.
10773
107741998-12-30 Jesse Thilo <jthilo@gnu.org>
10775
10776 * src/reader.c: Update copyright date.
10777
10778 * src/main.c:
10779 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10780 favor of output directly to stderr (avoids buffer overruns).
10781
10782 * src/reader.c: Some checks for premature EOF.
10783
10784 * 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:
10785 Use prototypes if the compiler understands them.
10786
10787 * src/files.c: Honor TMPDIR on Unix hosts.
10788 Use prototypes if the compiler understands them.
10789
10790 * src/reader.c:
10791 Fix a couple of buffer overrun bugs.
10792 Use prototypes if the compiler understands them.
10793
10794 * src/system.h: Include unistd.h and ctype.h.
10795 Use #ifdef instead of #if for NLS symbols.
10796
107971998-12-30 Jesse Thilo <jthilo@gnu.org>
10798
10799 * doc/bison.texinfo:
10800 Delete comment "consider using @set for edition number, etc..." since
10801 we now are doing so.
10802
108031998-12-30 Jesse Thilo <jthilo@gnu.org>
10804
10805 * configure.in:
10806 Use prototypes if the compiler understands them.
10807
10808 * NEWS: Document 1.26 highlights.
10809
10810 * Makefile.am: Require Automake 1.3 or later.
10811
10812 * acconfig.h:
10813 Use prototypes if the compiler understands them.
10814
108151998-12-29 Jesse Thilo <jthilo@gnu.org>
10816
10817 * src/version.c:
10818 Use VERSION symbol from automake for version number.
10819
108201998-12-29 Jesse Thilo <jthilo@gnu.org>
10821
10822 * acconfig.h, configure.in, version.cin:
10823 Use VERSION symbol from automake for version number.
10824
108251998-11-28 Jesse Thilo <jthilo@gnu.org>
10826
10827 * Makefile.am:
10828 Distribute original version of simple parser (bison.s1), not built
10829 version (bison.simple).
10830
108311998-11-28 Jesse Thilo <jthilo@gnu.org>
10832
10833 * doc/bison.texinfo: Add info dir entry.
10834
10835 * doc/bison.texinfo:
10836 Let automake put version number into documentation.
10837
108381998-11-26 Jesse Thilo <jthilo@gnu.org>
10839
10840 * src/bison.cld, src/build.com, src/vmshlp.mar:
10841 Add non-RCS files from /gd/gnu/bison.
10842
108431998-11-26 Jesse Thilo <jthilo@gnu.org>
10844
10845 * doc/bison.1:
10846 Document the BISON_HAIRY and BISON_SIMPLE variables.
10847
108481998-11-25 Jesse Thilo <jthilo@gnu.org>
10849
10850 * src/version.c: Build version.c automatically.
10851
10852 * src/reader.c:
10853 Fix token numbering (used to start at 258, not 257).
10854
10855 * src/system.h: Include config.h.
10856
10857 * src/getargs.c: Update bug report address.
10858
10859 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10860 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10861
108621998-11-25 Jesse Thilo <jthilo@gnu.org>
10863
10864 * Makefile.am:
10865 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10866
10867 * configure.in, version.cin:
10868 Build version.c automatically.
10869
10870 * AUTHORS: Add AUTHORS file.
10871
10872 * README: Update bug report address.
10873
10874 * bison.simple:
10875 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10876
10877 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10878 Add automake stuff.
10879
108801998-11-25 Jesse Thilo <jthilo@gnu.org>
10881
10882 * doc/bison.texinfo: Clean up some formatting.
10883
108841998-05-05 Richard Stallman <rms@gnu.org>
10885
10886 * doc/bison.texinfo:
10887 Explain better why to make a pure parser.
10888
108891998-01-05 Richard Stallman <rms@gnu.org>
10890
10891 * src/files.c (openfiles):
10892 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10893 find a temporary directory, if possible. Do not unlink files while
10894 they are open.
10895
108961997-08-25 Richard Stallman <rms@gnu.org>
10897
10898 * src/reader.c (stack_offset;):
10899 Change some warni to warns.
10900
10901 * src/lex.c (literalchar): Use warns, not warni.
10902
109031997-06-28 Richard Stallman <rms@gnu.org>
10904
10905 * src/bison.s1: Add a Bison version comment.
10906
10907 * src/main.c (fatal, warn, berror):
10908 Use program_name.
10909
109101997-06-28 Richard Stallman <rms@gnu.org>
10911
10912 * Makefile.in (bison_version): New variable.
10913 (dist): Use that variable.
10914 (bison.s1): Substitute the Bison version into bison.simple.
10915
10916 * bison.simple: Add a Bison version comment.
10917
109181997-06-18 Richard Stallman <rms@gnu.org>
10919
10920 * src/main.c (fatal, warn, berror):
10921 Make error messages standard.
10922 (toomany): Improve error message text.
10923
10924 * 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:
10925 new.h renamed to alloc.h.
10926
109271997-06-18 Richard Stallman <rms@gnu.org>
10928
10929 * Makefile.in: new.h renamed to alloc.h.
10930
109311997-05-24 Richard Stallman <rms@gnu.org>
10932
10933 * src/lex.c (literalchar):
10934 Fix the code for escaping \, " and '.
10935
10936 (lex): Avoid trouble when there are many chars
10937 to discard in a char literal with just several chars in it.
10938
109391997-05-17 Richard Stallman <rms@gnu.org>
10940
10941 * src/bison.s1:
10942 Use malloc, if using alloca is troublesome.
10943 (YYSTACK_USE_ALLOCA): New flag macro.
10944 Define it for some systems and compilers.
10945 (YYSTACK_ALLOC): New macro.
10946 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10947 If it was malloc'd, free it.
10948
109491997-05-17 Richard Stallman <rms@gnu.org>
10950
10951 * bison.simple:
10952 Use malloc, if using alloca is troublesome.
10953 (YYSTACK_USE_ALLOCA): New flag macro.
10954 Define it for some systems and compilers.
10955 (YYSTACK_ALLOC): New macro.
10956 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10957 If it was malloc'd, free it.
10958
109591997-04-23 Richard Stallman <rms@gnu.org>
10960
10961 * src/bison.s1:
10962 (alloca) [__hpux]: Always define as __builtin_alloca.
10963
109641997-04-23 Richard Stallman <rms@gnu.org>
10965
10966 * bison.simple:
10967 (alloca) [__hpux]: Always define as __builtin_alloca.
10968
109691997-04-22 Richard Stallman <rms@gnu.org>
10970
10971 * src/bison.s1:
10972 [__hpux]: Include alloca.h (right for HPUX 10)
10973 instead of declaring alloca (right for HPUX 9).
10974
10975 * src/bison.s1 (__yy_memcpy):
10976 Declare arg `count' as unsigned int.
10977 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10978
109791997-04-22 Richard Stallman <rms@gnu.org>
10980
10981 * bison.simple:
10982 [__hpux]: Include alloca.h (right for HPUX 10)
10983 instead of declaring alloca (right for HPUX 9).
10984
10985 * bison.simple (__yy_memcpy):
10986 Declare arg `count' as unsigned int.
10987 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10988
109891997-01-03 Richard Stallman <rms@gnu.org>
10990
10991 * src/allocate.c: [__STDC__ or _MSC_VER]:
10992 Declare calloc and realloc to return void *.
10993
109941997-01-02 Richard Stallman <rms@gnu.org>
10995
10996 * src/system.h:
10997 [_MSC_VER]: Include stdlib.h and process.h.
10998 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10999
11000 * src/main.c (main): Return FAILURE as a value.
11001 (printable_version): Declare arg as int, not char.
11002
110031997-01-02 Richard Stallman <rms@gnu.org>
11004
11005 * Makefile.in (dist):
11006 Explicitly check for symlinks, and copy them.
11007
110081996-12-19 Richard Stallman <rms@gnu.org>
11009
11010 * src/files.c:
11011 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
11012
110131996-12-18 Paul Eggert <eggert@gnu.org>
11014
11015 * src/bison.s1 (yyparse):
11016 If __GNUC__ and YYPARSE_PARAM are both defined,
11017 declare yyparse to have a void * argument.
11018
110191996-12-18 Paul Eggert <eggert@gnu.org>
11020
11021 * bison.simple (yyparse):
11022 If __GNUC__ and YYPARSE_PARAM are both defined,
11023 declare yyparse to have a void * argument.
11024
110251996-12-17 Richard Stallman <rms@gnu.org>
11026
11027 * src/reduce.c (nbits): Add some casts.
11028
110291996-08-12 Richard Stallman <rms@gnu.org>
11030
11031 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
11032
110331996-08-12 Richard Stallman <rms@gnu.org>
11034
11035 * bison.simple: Test _MSDOS as well as _MSDOS_.
11036
110371996-07-31 Richard Stallman <rms@gnu.org>
11038
11039 * src/bison.s1:
11040 [__sun && __i386]: Include alloca.h.
11041
110421996-07-31 Richard Stallman <rms@gnu.org>
11043
11044 * bison.simple:
11045 [__sun && __i386]: Include alloca.h.
11046
110471996-07-30 Richard Stallman <rms@gnu.org>
11048
11049 * src/bison.s1: Comment change.
11050
11051 * src/bison.s1: Test _MSDOS_, not MSDOS.
11052
110531996-07-30 Richard Stallman <rms@gnu.org>
11054
11055 * bison.simple: Comment change.
11056
11057 * bison.simple: Test _MSDOS_, not MSDOS.
11058
110591996-06-01 Richard Stallman <rms@gnu.org>
11060
11061 * 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:
11062 Insert `_' macro around many string constants.
11063
11064 * src/main.c:
11065 Insert `_' macro around many string constants.
11066
11067 (main): Call setlocale, bindtextdomain and textdomain.
11068
11069 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11070 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11071 [ENABLE_NLS]: Include libintl.h.
11072 [ENABLE_NLS] (gettext): Define.
11073 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11074 (N_, PACKAGE, LOCALEDIR): New macros.
11075
110761996-06-01 Richard Stallman <rms@gnu.org>
11077
11078 * POTFILES.in: New file.
11079
11080 * Makefile.in (allocate.o):
11081 Define target explicitly.
11082
11083 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11084 (LDFLAGS): Set to @LDFLAGS@.
11085 (configure): Run autoconf only if preceding `cd' succeeds.
11086 (bison.s1): Redirect output to temporary file then move the
11087 temporary to the target, rather than redirecting directly to bison.s1.
11088 (clean): Remove config.status and config.log.
11089 (distclean): Don't remove config.status here.
11090
110911996-05-12 Richard Stallman <rms@gnu.org>
11092
11093 * src/bison.s1:
11094 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11095
110961996-05-12 Richard Stallman <rms@gnu.org>
11097
11098 * bison.simple:
11099 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11100
111011996-05-11 Richard Stallman <rms@gnu.org>
11102
11103 * src/bison.s1 (__yy_memcpy):
11104 Really reorder the args, as was supposedly done on Feb 14 1995.
11105 (yyparse): Calls changed accordingly.
11106
111071996-05-11 Richard Stallman <rms@gnu.org>
11108
11109 * Makefile.in (dist): Don't use $(srcdir).
11110
11111 * bison.simple (__yy_memcpy):
11112 Really reorder the args, as was supposedly done on Feb 14 1995.
11113 (yyparse): Calls changed accordingly.
11114
111151996-01-27 Richard Stallman <rms@gnu.org>
11116
11117 * src/output.c (output_rule_data):
11118 Test YYERROR_VERBOSE in the conditional
11119 around the definition of ttyname.
11120
111211995-12-29 Richard Stallman <rms@gnu.org>
11122
11123 * src/bison.s1:
11124 Fix line numbers in #line commands.
11125
111261995-12-29 Richard Stallman <rms@gnu.org>
11127
11128 * bison.simple:
11129 Fix line numbers in #line commands.
11130
111311995-12-27 Richard Stallman <rms@gnu.org>
11132
11133 * src/bison.s1 (YYPARSE_PARAM_DECL):
11134 In C++, make it always null.
11135 (YYPARSE_PARAM_ARG): New macro.
11136 (yyparse): Use YYPARSE_PARAM_ARG.
11137
111381995-12-27 Richard Stallman <rms@gnu.org>
11139
11140 * bison.simple (YYPARSE_PARAM_DECL):
11141 In C++, make it always null.
11142 (YYPARSE_PARAM_ARG): New macro.
11143 (yyparse): Use YYPARSE_PARAM_ARG.
11144
111451995-11-29 Richard Stallman <rms@gnu.org>
11146
11147 * doc/bison.texinfo:
11148 Describe literal string tokens, %raw, %no_lines, %token_table.
11149
111501995-11-29 Daniel Hagerty <hag@gnu.org>
11151
11152 * doc/bison.texinfo: Fixed update date
11153
111541995-10-16 Richard Stallman <rms@gnu.org>
11155
11156 * src/version.c: Version 1.25.
11157
111581995-10-16 Richard Stallman <rms@gnu.org>
11159
11160 * NEWS: *** empty log message ***
11161
111621995-10-16 Richard Stallman <rms@gnu.org>
11163
11164 * doc/bison.1, doc/bison.rnh:
11165 Add new options.
11166
111671995-10-15 Richard Stallman <rms@gnu.org>
11168
11169 * src/vmsgetargs.c, src/getargs.c:
11170 Added -n, -k, and -raw switches.
11171 (noparserflag, toknumflag, rawtoknumflag): New variables.
11172
11173 * src/symtab.h (SALIAS):
11174 New #define for adding aliases to %token.
11175 (struct bucket): Added `alias' field.
11176
11177 * src/reduce.c (reduce_grammar):
11178 Revise error message.
11179 (print_notices): Remove final `.' from error message.
11180
11181 * src/reader.c (reader_output_yylsp):
11182 New function.
11183 (readgram): Use `#if 0' around code that accepted %command
11184 inside grammar rules: The documentation doesn't allow it,
11185 and it will fail since the %command processors scan for the next %.
11186 (parse_token_decl): Extended the %token
11187 declaration to allow a multi-character symbol as an alias.
11188 (parse_thong_decl): New function.
11189 (read_declarations): Added %thong declarations.
11190 (read_declarations): Handle NOOP to deal with allowing
11191 % declarations as another means to specify the flags.
11192 (readgram): Allow %prec prior to semantics embedded in a rule.
11193 (skip_to_char, read_declarations, copy_definition)
11194 (parse_token_decl, parse_start_decl, parse_type_decl)
11195 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
11196 (get_type_name, copy_guard, copy_action, readgram)
11197 (get_type, packsymbols): Revised most error messages.
11198 Changed `fatal' to `warnxxx' to avoid aborting for error.
11199 Revised and use multiple warnxxx functions to avoid using VARARGS1.
11200 (read_declarations): Improve the error message for
11201 an invalid character. Do not abort.
11202 (read_declarations, copy_guard, copy_action): Use
11203 printable_version to avoid unprintable characters in printed output.
11204 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
11205 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
11206 Allow the type of a non-terminal can be given
11207 more than once, as long as all specifications give the same type.
11208
11209 * src/output.c:
11210 (output_headers, output_trailers, output, output_gram)
11211 (output_rule_data): Implement noparserflag variable.
11212 Implement toknumflag variable.
11213 (output): Call reader_output_yylsp to output LTYPESTR.
11214
11215 * src/main.c (main):
11216 If reader sees an error, don't process the grammar.
11217 (fatals): Updated to not use VARARGS1.
11218 (printable_version, int_to_string, warn, warni, warns, warnss)
11219 (warnsss): New error reporting functions. Avoid abort for error.
11220
11221 * src/lex.h:
11222 Added THONG and NOOP for alias processing.
11223 Added SETOPT for the new code that allows setting options with %flags.
11224
11225 * src/lex.c:
11226 Include getopt.h. Add some extern decls.
11227 (safegetc): New function to deal with EOF gracefully.
11228 (literalchar); new function to deal with reading \ escapes.
11229 (lex): Use literalchar.
11230 (lex): Implemented "..." tokens.
11231 (literalchar, lex, parse_percent_token): Made tokenbuffer
11232 always contain the token. This includes growing the token
11233 buffer while reading an integer.
11234 (parse_percent_token): Replaced if-else statement with percent_table.
11235 (parse_percent_token): Added % declarations as another
11236 way to specify the flags -n, -l, and -r. Also added hooks for
11237 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
11238 major changes to files.c.
11239 (lex) Retain in the incoming stream a character following
11240 an incorrect '/'.
11241 (skip_white_space, lex): Revised most error messages
11242 and changed fatal to warn to avoid aborting.
11243 (percent_table): Added %thong declarations.
11244
11245 * src/gram.h: Comment changes.
11246
11247 * src/files.c (openfiles, open_extra_files, done):
11248 Add faction flag
11249 and actfile file. Handle noparserflag. Both for -n switch.
11250
11251 * src/conflicts.c (resolve_sr_conflict):
11252 Remove use of alloca.
11253
112541995-06-01 Jim Meyering <meyering@gnu.org>
11255
11256 * doc/bison.texinfo: *** empty log message ***
11257
112581995-05-06 Richard Stallman <rms@gnu.org>
11259
11260 * src/bison.s1: Comment change.
11261
112621995-05-06 Richard Stallman <rms@gnu.org>
11263
11264 * bison.simple: Comment change.
11265
112661995-05-03 Richard Stallman <rms@gnu.org>
11267
11268 * src/version.c: Version now 1.24.
11269
11270 * src/bison.s1: Change distribution terms.
11271
11272 * src/version.c: Version now 1.23.
11273
112741995-05-03 Richard Stallman <rms@gnu.org>
11275
11276 * doc/bison.texinfo:
11277 Rewrite "Conditions for Using Bison".
11278 Update version to 1.24.
11279
112801995-05-03 Richard Stallman <rms@gnu.org>
11281
11282 * bison.simple: Change distribution terms.
11283
112841995-02-23 Richard Stallman <rms@gnu.org>
11285
11286 * src/files.c: Test __VMS_POSIX as well as VMS.
11287
112881995-02-14 Jim Meyering <meyering@gnu.org>
11289
11290 * src/bison.s1 (__yy_memcpy):
11291 Renamed from __yy_bcopy to avoid
11292 confusion. Reverse FROM and TO arguments to be consistent with
11293 those of memcpy.
11294
112951995-02-14 Jim Meyering <meyering@gnu.org>
11296
11297 * bison.simple (__yy_memcpy):
11298 Renamed from __yy_bcopy to avoid
11299 confusion. Reverse FROM and TO arguments to be consistent with
11300 those of memcpy.
11301
113021994-11-10 David J. MacKenzie <djm@gnu.org>
11303
11304 * NEWS: reformat
11305
11306 * NEWS: New file.
11307
11308 * Makefile.in (DISTFILES): Include NEWS.
11309
11310 * Makefile.in (DISTFILES):
11311 Include install-sh, not install.sh.
11312
11313 * configure.in: Update to Autoconf v2 macro names.
11314
113151994-10-05 David J. MacKenzie <djm@gnu.org>
11316
11317 * Makefile.in: fix typo
11318
11319 * Makefile.in (prefix, exec_prefix):
11320 Let configure set them.
11321
113221994-09-28 David J. MacKenzie <djm@gnu.org>
11323
11324 * Makefile.in: Set datadir to $(prefix)/share.
11325
113261994-09-15 Richard Stallman <rms@gnu.org>
11327
11328 * src/bison.s1:
11329 Update copyright notice and GPL version.
11330
113311994-09-15 Richard Stallman <rms@gnu.org>
11332
11333 * bison.simple:
11334 Update copyright notice and GPL version.
11335
113361994-07-12 Richard Stallman <rms@gnu.org>
11337
11338 * src/reduce.c, src/reader.c:
11339 entered into RCS
11340
113411994-05-05 David J. MacKenzie <djm@gnu.org>
11342
11343 * Makefile.in: entered into RCS
11344
113451994-03-26 Richard Stallman <rms@gnu.org>
11346
11347 * src/bison.s1: entered into RCS
11348
113491994-03-26 Richard Stallman <rms@gnu.org>
11350
11351 * bison.simple: entered into RCS
11352
113531994-03-25 Richard Stallman <rms@gnu.org>
11354
11355 * src/main.c: entered into RCS
11356
113571994-03-24 Richard Stallman <rms@gnu.org>
11358
11359 * src/conflicts.c: entered into RCS
11360
113611994-01-02 Richard Stallman <rms@gnu.org>
11362
11363 * Makefile.in: *** empty log message ***
11364
113651993-11-21 Richard Stallman <rms@gnu.org>
11366
11367 * src/bison.s1: *** empty log message ***
11368
113691993-11-21 Richard Stallman <rms@gnu.org>
11370
11371 * doc/bison.texinfo: entered into RCS
11372
11373 * doc/bison.texinfo: *** empty log message ***
11374
113751993-11-21 Richard Stallman <rms@gnu.org>
11376
11377 * bison.simple: *** empty log message ***
11378
113791993-10-25 David J. MacKenzie <djm@gnu.org>
11380
11381 * doc/bison.texinfo: *** empty log message ***
11382
113831993-10-19 Richard Stallman <rms@gnu.org>
11384
11385 * src/bison.s1: *** empty log message ***
11386
113871993-10-19 Richard Stallman <rms@gnu.org>
11388
11389 * bison.simple: *** empty log message ***
11390
113911993-10-14 Richard Stallman <rms@gnu.org>
11392
11393 * src/bison.s1: *** empty log message ***
11394
113951993-10-14 Richard Stallman <rms@gnu.org>
11396
11397 * bison.simple: *** empty log message ***
11398
113991993-09-14 David J. MacKenzie <djm@gnu.org>
11400
11401 * doc/bison.texinfo: *** empty log message ***
11402
114031993-09-13 Noah Friedman <friedman@gnu.org>
11404
11405 * Makefile.in: *** empty log message ***
11406
114071993-09-10 Richard Stallman <rms@gnu.org>
11408
11409 * src/conflicts.c: *** empty log message ***
11410
11411 * src/system.h: entered into RCS
11412
114131993-09-10 Richard Stallman <rms@gnu.org>
11414
11415 * doc/bison.1: entered into RCS
11416
114171993-09-06 Noah Friedman <friedman@gnu.org>
11418
11419 * src/version.c: entered into RCS
11420
114211993-09-06 Noah Friedman <friedman@gnu.org>
11422
11423 * Makefile.in: *** empty log message ***
11424
114251993-07-30 David J. MacKenzie <djm@gnu.org>
11426
11427 * Makefile.in: *** empty log message ***
11428
114291993-07-24 Richard Stallman <rms@gnu.org>
11430
11431 * src/bison.s1: *** empty log message ***
11432
114331993-07-24 Richard Stallman <rms@gnu.org>
11434
11435 * bison.simple: *** empty log message ***
11436
114371993-07-08 David J. MacKenzie <djm@gnu.org>
11438
11439 * Makefile.in: *** empty log message ***
11440
114411993-07-04 Richard Stallman <rms@gnu.org>
11442
11443 * src/bison.s1: *** empty log message ***
11444
114451993-07-04 Richard Stallman <rms@gnu.org>
11446
11447 * bison.simple: *** empty log message ***
11448
114491993-06-26 David J. MacKenzie <djm@gnu.org>
11450
11451 * src/getargs.c: entered into RCS
11452
114531993-06-26 David J. MacKenzie <djm@gnu.org>
11454
11455 * doc/bison.texinfo: *** empty log message ***
11456
11457 * doc/bison.1: New file.
11458
114591993-06-25 Richard Stallman <rms@gnu.org>
11460
11461 * src/getargs.c: New file.
11462
114631993-06-16 Richard Stallman <rms@gnu.org>
11464
11465 * src/bison.s1: *** empty log message ***
11466
114671993-06-16 Richard Stallman <rms@gnu.org>
11468
11469 * bison.simple: *** empty log message ***
11470
114711993-06-03 Richard Stallman <rms@gnu.org>
11472
11473 * src/bison.s1: New file.
11474
114751993-06-03 Richard Stallman <rms@gnu.org>
11476
11477 * doc/bison.texinfo: *** empty log message ***
11478
114791993-06-03 Richard Stallman <rms@gnu.org>
11480
11481 * bison.simple: New file.
11482
114831993-05-19 Richard Stallman <rms@gnu.org>
11484
11485 * doc/bison.texinfo: New file.
11486
114871993-05-07 Noah Friedman <friedman@gnu.org>
11488
11489 * Makefile.in: *** empty log message ***
11490
114911993-04-28 Noah Friedman <friedman@gnu.org>
11492
11493 * src/reader.c: *** empty log message ***
11494
114951993-04-23 Noah Friedman <friedman@gnu.org>
11496
11497 * src/alloc.h: entered into RCS
11498
114991993-04-20 David J. MacKenzie <djm@gnu.org>
11500
11501 * src/version.c: *** empty log message ***
11502
11503 * src/files.c, src/allocate.c:
11504 entered into RCS
11505
11506 * src/reader.c: *** empty log message ***
11507
11508 * src/lex.c: entered into RCS
11509
11510 * src/conflicts.c: New file.
11511
11512 * src/symtab.c: entered into RCS
11513
11514 * src/alloc.h: New file.
11515
11516 * src/LR0.c: entered into RCS
11517
115181993-04-18 Noah Friedman <friedman@gnu.org>
11519
11520 * src/reader.c: New file.
11521
11522 * src/version.c: *** empty log message ***
11523
115241993-04-18 Noah Friedman <friedman@gnu.org>
11525
11526 * Makefile.in: *** empty log message ***
11527
115281993-04-17 Noah Friedman <friedman@gnu.org>
11529
11530 * Makefile.in: *** empty log message ***
11531
115321993-04-15 Richard Stallman <rms@gnu.org>
11533
11534 * src/main.c, src/files.c:
11535 New file.
11536
115371993-04-15 Noah Friedman <friedman@gnu.org>
11538
11539 * configure.in: entered into RCS
11540
11541 * configure.in: *** empty log message ***
11542
11543 * configure.in: New file.
11544
115451993-04-14 Richard Stallman <rms@gnu.org>
11546
11547 * Makefile.in: New file.
11548
115491993-04-13 Richard Stallman <rms@gnu.org>
11550
11551 * src/version.c: New file.
11552
115531993-03-25 Richard Stallman <rms@gnu.org>
11554
11555 * src/output.c: entered into RCS
11556
115571992-09-25 Richard Stallman <rms@gnu.org>
11558
11559 * configure.bat: entered into RCS
11560
115611992-06-22 Richard Stallman <rms@gnu.org>
11562
11563 * src/vmsgetargs.c: entered into RCS
11564
115651992-06-22 Richard Stallman <rms@gnu.org>
11566
11567 * doc/bison.rnh: entered into RCS
11568
115691992-04-20 David J. MacKenzie <djm@gnu.org>
11570
11571 * README: entered into RCS
11572
115731992-01-22 Richard Stallman <rms@gnu.org>
11574
11575 * src/machine.h: entered into RCS
11576
115771991-12-21 Richard Stallman <rms@gnu.org>
11578
11579 * src/lalr.c, src/closure.c:
11580 entered into RCS
11581
115821991-12-20 Richard Stallman <rms@gnu.org>
11583
11584 * src/state.h: entered into RCS
11585
115861991-12-18 Richard Stallman <rms@gnu.org>
11587
11588 * src/print.c, src/nullable.c, src/derives.c:
11589 entered into RCS
11590
115911991-11-03 David J. MacKenzie <djm@gnu.org>
11592
11593 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11594 entered into RCS
11595
115961988-09-09 Richard Stallman <rms@gnu.org>
11597
11598 * src/bison.hairy: entered into RCS
11599
116001987-12-16 Richard Stallman <rms@gnu.org>
11601
11602 * REFERENCES: entered into RCS
dc546b0f 11603
f294a2c2
AD
11604-----
11605
33167b8b 11606Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
dc546b0f 116071998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
f294a2c2 11608
33167b8b 11609This file is part of Bison, the GNU Compiler Compiler.
f294a2c2 11610
33167b8b 11611Bison is free software; you can redistribute it and/or modify
f294a2c2
AD
11612it under the terms of the GNU General Public License as published by
11613the Free Software Foundation; either version 2, or (at your option)
11614any later version.
11615
33167b8b 11616Bison is distributed in the hope that it will be useful,
f294a2c2
AD
11617but WITHOUT ANY WARRANTY; without even the implied warranty of
11618MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11619GNU General Public License for more details.
11620
11621You should have received a copy of the GNU General Public License
33167b8b 11622along with Bison; see the file COPYING. If not, write to
f294a2c2
AD
11623the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11624Boston, MA 02111-1307, USA.