]> git.saurik.com Git - bison.git/blob - ChangeLog
* doc/bison.texinfo (How Can I Reset the Parser): More about start
[bison.git] / ChangeLog
1 2003-12-02 Akim Demaille <akim@epita.fr>
2
3 * doc/bison.texinfo (How Can I Reset the Parser): More about start
4 conditions.
5 From Bruno Haible.
6
7 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8
9 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
10
11 2003-10-07 Paul Eggert <eggert@twinsun.com>
12
13 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
14 if testsuite doesn't exist.
15
16 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
17 literals, unfortunately.
18 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
19 Complain about NUL bytes in character constants or string literals.
20
21 2003-10-05 Paul Eggert <eggert@twinsun.com>
22
23 * NEWS: Don't document %no-default-prec, as it's still
24 too experimental.
25 * doc/bison.texinfo: Document %no-default-prec only if
26 the defaultprec flag is set. Normally it's not.
27
28 2003-10-04 Paul Eggert <eggert@twinsun.com>
29
30 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
31 non-modifiable lvalue, instead of a modifiable one.
32 * doc/bison.texinfo (Actions): Document that $$ can
33 be assigned to. Do not claim that $$ and $N are
34 array element references: user code should not rely on this.
35
36 2003-10-01 Paul Eggert <eggert@twinsun.com>
37
38 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
39 (grammar_declaration): Use it.
40 * src/scan-gram.l: New token %no-default-prec.
41 * tests/conflicts.at: Revamp tests to use %no-default-prec.
42 * NEWS, doc/bison.texinfo: Document the above.
43
44 2003-10-01 Akim Demaille <akim@epita.fr>
45
46 VCG no longer supports long_straight_phase.
47
48 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
49 * src/print_graph.c (print_graph): Adjust.
50
51 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
52 and Paul Eggert <eggert@twinsun.com>
53
54 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
55 Table of Symbols): Document %default-prec.
56 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
57 (grammar_declaration): Set default_prec on %default-prec.
58 * src/scan-gram.l (%default-prec): New token.
59 * src/reader.h (default_prec): New flag.
60 * src/reader.c: Likewise.
61 (packgram): Handle it.
62 * tests/conflicts.at (%default-prec without %prec,
63 %default-prec with %prec, %default-prec 1): New tests.
64
65 2003-09-30 Paul Eggert <eggert@twinsun.com>
66
67 * tests/testsuite.at: Include local.at, not input.at, fixing
68 a typo in the 2003-08-25 patch.
69
70 2003-08-27 Akim Demaille <akim@epita.fr>
71
72 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
73 GCC warnings.
74
75 2003-08-26 Akim Demaille <akim@epita.fr>
76
77 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
78 "<\#" to avoid magic from Gnus when posting parts of this script.
79
80 2003-08-26 Akim Demaille <akim@epita.fr>
81
82 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
83 (Parser::parse): here.
84 Adjust: nerrs and errstatus is now replaced by...
85 (Parser::nerrs_, Parser::errstatus_): New.
86
87 2003-08-25 Akim Demaille <akim@epita.fr>
88
89 * config/announce-gen, Makefile.cfg: New.
90 * Makefile.am: Adjust.
91 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
92 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
93
94 2003-08-25 Akim Demaille <akim@epita.fr>
95
96 When reducing initial empty rules, Bison parser read an initial
97 location that is not defined. This results in garbage, and that
98 affects Bison's own parser. Therefore we need (i) to extend Bison
99 to support a means to initialize this location, and (ii) to use
100 this CVS Bison to fix CVS Bison's parser.
101
102 * src/reader.h, reader.c (epilogue_augment): Remove, replace
103 with...
104 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
105 * src/parse-gram.y: Adjust.
106 (%initial-action): New.
107 (%error-verbose): Since we require CVS Bison, there is no reason
108 not to use it.
109 * src/scan-gram.l: Adjust.
110 * src/Makefile.am (YACC): New, to make sure we use our own parser.
111 * data/yacc.c (yyparse): Use b4_initial_action.
112
113 2003-08-25 Akim Demaille <akim@epita.fr>
114
115 * doc/bison.texinfo: Don't promote stdout for error messages.
116
117 2003-08-25 Akim Demaille <akim@epita.fr>
118
119 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
120 From Alexandre Duret-Lutz.
121
122 2003-08-25 Akim Demaille <akim@epita.fr>
123
124 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
125 Use them.
126
127 2003-08-25 Akim Demaille <akim@epita.fr>
128
129 * data/lalr1.cc (Parser::reduce_print_): New.
130 Use it.
131
132 2003-08-25 Akim Demaille <akim@epita.fr>
133
134 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
135 error recovery loops. This patch is based on
136 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
137 Also, augment the similarity between lalr1.cc and yacc.c.
138 Note: the locations of error recovery rules are not correct yet.
139
140 * data/lalr1.cc: Comment changes to augment the similarity between
141 lalr1.cc and yacc.c.
142 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
143 (yyerrlab1): Remove, but where it used to be (now the bottom part of
144 yyerrlab), when hitting EOF, pop the whole stack here instead of
145 merely falling thru the default error handling mechanism.
146 (yyerrorlab): New label, with the old contents of YYERROR,
147 plus the following change: pop the stack of rhs corresponding
148 to the production that invoked YYERROR. That is how Yacc
149 behaves (required by POSIX).
150 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
151 fail.
152
153 2003-08-25 Akim Demaille <akim@epita.fr>
154
155 Tune local.at so that people can "autom4te -l autotest calc.at -o
156 calc" for instance, to extract a sub test suite.
157
158 * tests/testsuite.at: Move the initialization, Autotest version
159 requirement, and AT_TESTED invocation into...
160 * tests/local.at: here.
161 * tests/testsuite.at: Include it for compatibility with Autoconf
162 2.57.
163 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
164 be ignore.
165
166 2003-08-04 Paul Eggert <eggert@twinsun.com>
167
168 Rework code slightly to avoid gcc -Wtraditional warnings.
169 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
170 The returned value is now stored in *YY0. All callers changed.
171 * src/output.c (merge_output): Adjust to the above change.
172
173 2003-07-26 Paul Eggert <eggert@twinsun.com>
174
175 * data/glr.c (YYASSERT): New macro.
176 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
177 yyresolveStates, yyprocessOneStack):
178 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
179 Derived from a suggestion by Frank Heckenbach.
180
181 2003-07-25 Paul Eggert <eggert@twinsun.com>
182
183 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
184 for portability to K&R C (after ansi2knr, presumably). See
185 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
186 by Frank Heckenbach, though I have omitted the structure-initialization
187 part of his glr-knr.diff patch since I recall that the Portable
188 C Compiler didn't require that change.
189
190 Let the user specify how to allocate and free memory.
191 Derived from a suggestion by Frank Heckenbach in
192 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
193 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
194 All uses of free, malloc, realloc changed to use these macros,
195 and unnecessary casts removed.
196 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
197
198 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
199
200 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
201 use s.empty() rather than s == "" to test for empty string; see
202 <http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
203 (trivial change)
204
205 2003-06-25 Akim Demaille <akim@epita.fr>
206
207 * config/depcomp, config/install-sh: Update from masters.
208
209 2003-06-20 Paul Eggert <eggert@twinsun.com>
210
211 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
212 and return properly parenthesized result.
213 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
214 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
215 Remove unnecessary parentheses from uses.
216 * doc/bison.texinfo (Location Default Action): Describe the
217 conventions for parentheses.
218
219 2003-06-19 Paul Eggert <eggert@twinsun.com>
220
221 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
222 yyreportTree): Do not assume that size_t is the same width as int,
223 when printing sizes. Print sizes using an unsigned format.
224 Problem reported by Frank Heckenbach in
225 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
226
227 Port to Forte Developer 7 C compiler.
228 * data/glr.c (struct YYLTYPE): If locations are not being used,
229 declare a single dummy member, as empty structs do not conform
230 to the C standard.
231 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
232 the Forte Developer 7 C compiler complains that end-of-loop
233 code is not reached.
234
235 2003-06-17 Paul Eggert <eggert@twinsun.com>
236
237 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
238 avoid warnings from picky compilers about redefinition of PARAMS.
239
240 2003-06-17 Paul Eggert <eggert@twinsun.com>
241
242 Version 1.875b.
243
244 * NEWS: Document 1.875b.
245
246 * lib/bbitset.h: Do not include config.h; that's the includer's job.
247 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
248 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
249 Don't use 'index' in comments, as it's a builtin fn on some hosts.
250 * lib/bitset_stats.c: Include gettext.h unconditionally, as
251 per recent gettext manual's suggestion.
252 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
253 Use prototypes, not old-style definitions.
254 * lib/lbitset.c (lbitset_unused_clear): Likewise.
255 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
256 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
257 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
258 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
259 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
260 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
261 vbitset_or_and_cmp, vbitset_copy): Likewise.
262
263 * lib/libiberty.h: Do not include config.h; that's the includer's job.
264 Do not include <stdlib.h>.
265 (PARAMS): Define unconditionally for C89.
266 (ATTRIBUTE_NORETURN): Remove.
267 (ATTRIBUTE_UNUSED): Define unconditionally.
268
269 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
270 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
271 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
272 * lib/vbitset.c, lib/vbitset.h: New files.
273 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
274 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
275 from libbitset.
276
277 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
278 `How Can I Reset @code{yyparse}', since texinfo does not allow
279 arbitrary @ in node names.
280
281 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
282 shouldn't be needed according to the gettext 0.12.1 documentation
283 but which seem to be needed anyway: codeset.m4 glibc21.m4
284 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
285 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
286 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
287
288 * lib/.cvsignore: Add stdbool.h.
289 * m4/.cvsignore: Add nls.m4, po.m4.
290
291 Upgrade to CVS gnulib.
292 * stdbool_.h: File renamed from stdbool.h.in.
293 * configure.ac (AM_STDBOOL_H): Invoke this instead of
294 AC_HEADER_STDBOOL.
295 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
296 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
297 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
298 (MOSTLYCLEANFILES): New var.
299 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
300 (stdbool.h): New rule.
301 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
302 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
303 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
304 m4/quote.m4: Upgrade to today's gnulib.
305
306 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
307 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
308 the tests right now.
309 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
310 yyerror are declared before use; C99 requires this.
311
312 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
313
314 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
315 first.
316 (yyrecoverSyntaxError): Correct the logic for setting and testing
317 yyerrState.
318 Correct comment on handling EOF.
319 Allow states with only a default reduction, rather than failing
320 (I can't quite reconstruct why these were not allowed before).
321
322 Fixes to avoid problem that $-N rules in GLR parsers can cause
323 buffer overruns, corrupting state.
324
325 * src/output.c (prepare_rules): Output max_left_semantic_context
326 definition.
327 * src/reader.h (max_left_semantic_context): New variable declaration.
328 * src/scan-gram.l (max_left_semantic_context): Define.
329 (handle_action_dollar): Update max_left_semantic_context.
330 * data/glr.c (YYMAXLEFT): New definition.
331 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
332 (yyresolveAction): Ditto.
333
334 Fixes to problems with location handling in GLR parsers reported by
335 Frank Heckenbach (2003/06/05).
336
337 * data/glr.c (YYLTYPE): Make trivial if locations not used.
338 (YYRHSLOC): Add parentheses, and define only if locations used.
339 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
340 locations not used.
341 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
342 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
343
344 * tests/cxx-type.at: Exercise location information; update tests
345 to differentiate output with and without locations.
346 Remove forward declarations of yylex and yyerror---caused errors
347 because default YYLTYPE not yet defined.
348 Change semantic actions to compute strings, rather than printing
349 them directly (to test proper passing of semantics values). Change
350 output to prefix notation and update test data and expected results.
351 (yylex): Track locations.
352 (stmtMerge): Return value rather than printing, and include arguments
353 in value.
354
355 2003-06-03 Paul Eggert <eggert@twinsun.com>
356
357 Avoid warnings generated by GCC 2.95.4 when Bison is
358 configured with --enable-gcc-warnings.
359 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
360 yy::]b4_parser_class_name[::translate_,
361 yy::Stack::operator[] (unsigned),
362 yy::Stack::operator[] (unsigned) const,
363 yy::Slice::operator[] (unsigned),
364 yy::Slice::operator[] (unsigned) const):
365 Rename local vars to avoid warnings.
366 * tests/glr-regression.at (Improper handling of embedded actions
367 and $-N in GLR parsers): Remove unused local variable from yylex.
368 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
369 (void) as arg when not pure, since we now assume C89 when building
370 Bison. Pacify GCC by using parameter.
371
372 2003-06-02 Paul Eggert <eggert@twinsun.com>
373
374 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
375 yy::Location::lines, yy::Location::columns): Rename arguments
376 to avoid shadowing; this removes a warning generated by GCC 3.3.
377
378 2003-06-01 Paul Eggert <eggert@twinsun.com>
379
380 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
381 to g++, as GCC 3.3 complains if you do it.
382 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
383 everything that WARNING_CFLAGS has, except omit warnings
384 not suitable for C++.
385 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
386 * tests/atlocal.in (CXXFLAGS): New var.
387 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
388
389 Fix a GLR parser bug I reported in February; see
390 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
391 The problem was that GLR parsers did not conform to the C standard,
392 because actions like { $1 = $2 + $3; } expanded to expressions
393 that invoked YYFILL in separate subexpressions, and YYFILL assigned
394 to a local variable. The C standard says that expressions
395 like (var = f ()) + (var = f ()) have undefined behavior.
396 Another problem was that GCC sometimes issues warnings that
397 yyfill and its parameters are unused.
398
399 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
400 as possibly unused.
401 (yyfill): New function.
402 (YYFILL): Use it.
403 (yyuserAction): Change type of yynormal to bool, so that it matches
404 the new yyfill signature. Mark it as possibly unused.
405
406
407 Follow up on a bug I reported in February, where a Bison-generated
408 parser can loop. Provide a test case and a fix for yacc.c. I
409 don't have a fix for lalr1.cc or for glr.c, unfortunately.
410 The original bug report is in:
411 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
412
413 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
414 macro's size was becoming unwieldy.
415 (yyerrlab): Do not discard an empty lookahead symbol, as this
416 might destroy garbage.
417 (yyerrorlab): New label, with the old contents of YYERROR,
418 plus the following change: pop the stack of rhs corresponding
419 to the production that invoked YYERROR. That is how Yacc
420 behaves, and POSIX requires this behavior.
421 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
422 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
423 Define 'alarm' to do nothing if unistd.h is not available.
424 Add a new rule "exp: '-' error;" to test the above change to
425 data/yacc.c. Use 'alarm' to abort any test taking longer than
426 10 seconds, as it's probably looping.
427 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
428 Also, the new yacc.c generates two fewer diagnostics for an
429 existing test.
430
431 2003-05-24 Paul Eggert <eggert@twinsun.com>
432
433 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
434 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
435 This fixes a problem reported by John Bowman when the Compaq/HP
436 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
437 -ansi -Wall -gall).
438 * data/yacc.c (union yyalloc): Likewise.
439 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
440
441 Switch from 'int' to 'bool' where that makes sense.
442
443 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
444 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
445 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
446 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
447 Return or accept bool, not int. All callers changed.
448 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
449 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
450 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
451 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
452 bitset_or_and_cmp_): Likewise.
453 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
454 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
455 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
456 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
457 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
458 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
459 bitset_stats_or_and_cmp): Likewise.
460 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
461 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
462 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
463 ebitset_xor_cmp): Likewise.
464 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
465 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
466 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
467 lbitset_xor_cmp): Likewise.
468 * lib/bbitset.h: Include <stdbool.h>.
469 (struct bitset_vtable): The following members now return bool, not
470 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
471 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
472 or_and_cmp).
473 * src/conflicts.c (count_rr_conflicts): Likewise.
474 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
475 All uses changed.
476 * lib/ebitset.c (ebitset_obstack_init): Likewise.
477 * lib/lbitset.c (lbitset_obstack_init): Likewise.
478 * src/getargs.c (debug_flag, defines_flag, locations_flag,
479 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
480 graph_flag): Likewise.
481 * src/getargs.h (debug_flag, defines_flag, locations_flag,
482 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
483 graph_flag): Likewise.
484 * src/output.c (error_verbose): Likewise.
485 * src/output.h (error_verbose): Likewise.
486 * src/reader.c (start_flag, typed): Likewise.
487 * src/reader.h (typed): Likewise.
488 * src/getargs.c (LOCATIONS_OPTION): New constant.
489 (long_options, getargs): Use it.
490 * src/lalr.c (build_relations): Use bool, not int.
491 * src/nullable.c (nullable_compute): Likewise.
492 * src/print.c (print_reductions): Likewise.
493 * src/tables.c (action_row, pack_vector): Likewise.
494 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
495 * src/output.c (prepare): Use it.
496 * src/output.c (token_definitions_output,
497 symbol_destructors_output, symbol_destructors_output): Use string,
498 not boolean integer, to keep track of whether to output separator.
499 * src/print_graph.c (print_core): Likewise.
500 * src/state.c (state_rule_lookaheads_print): Likewise.
501
502 * config/install-sh: Sync from automake 1.7.5.
503
504 2003-05-14 Paul Eggert <eggert@twinsun.com>
505
506 * src/parse-gram.y (rules_or_grammar_declaration): Require a
507 semicolon after a grammar declaration, in the interest of possible
508 future changes to the Bison input language.
509 Do not allow a stray semicolon at the start of the grammar.
510 (rhses.1): Allow one or more semicolons after any rule, including
511 just before "|" as required by POSIX.
512 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
513 grammar.
514
515 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
516
517 %parse-param support for lalr1.cc.
518
519 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
520 b4_cc_constructor_calls, b4_cc_constructor_call,
521 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
522 definitions.
523 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
524 parse-param arguments.
525 (yy::b4_parser_class_name): Declare instance variables to
526 hold parse-param arguments.
527 * tests/calc.at: s/value/semantic_value/ because value clashes
528 with a member of yy::b4_parser_class_name. Adjust C++ code
529 to handle %parse-param. Enable %parse-param test in C++.
530
531 2003-05-12 Paul Eggert <eggert@twinsun.com>
532
533 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
534 English a bit. Fix fclose typo. Change "const char" to "char
535 const", and use ANSI C rather than K&R for "main". Suggest
536 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
537 and suggest yy_switch_to_buffer.
538
539 2003-05-05 Paul Eggert <eggert@twinsun.com>
540
541 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
542 C89. This avoids a diagnostic on compilers that define __STDC__
543 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
544 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
545
546 2003-05-03 Paul Eggert <eggert@twinsun.com>
547
548 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
549 Do not overrun array bounds.
550 This should fix a bug reported today by Olatunji Oluwabukunmi in
551 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
552
553 2003-04-29 Akim Demaille <akim@epita.fr>
554
555 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
556 * src/getargs.c, src/getargs.h: here, as bool, not int.
557 (nondeterministic_parser): New.
558 * src/parse-gram.y, src/scan-gram.l: Support
559 %nondeterministic-parser.
560 * src/output.c (prepare): Use nondeterministic_parser instead
561 of glr_parser where appropriate.
562 * src/tables.c (conflict_row, action_row, save_row)
563 (token_actions, token_actions, pack_vector): Ditto.
564
565 2003-04-29 Akim Demaille <akim@epita.fr>
566
567 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
568
569 2003-04-29 Akim Demaille <akim@epita.fr>
570
571 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
572 with %pure-parser and %locations to exercise the patch from Yakov
573 Markovitch below.
574
575 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
576
577 * data/yacc.c: (b4_lex_param): Corrected for the case where
578 %lex-param is provided and %pure-parser isn't.
579
580 2003-04-27 Paul Eggert <eggert@twinsun.com>
581
582 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
583 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
584 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
585 if it is not defined.
586 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
587
588 2003-04-26 Paul Eggert <eggert@twinsun.com>
589
590 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
591 Declare to be of type suitable for the ninf value itself, not of
592 type suitable for the corresponding table, since the latter might
593 be unsigned but the ninf value might be negative. This fixes a
594 bug reported by Alexandre Duret-Lutz in
595 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
596
597 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
598 invokes it. We shouldn't invoke it twice because it will attempt
599 to put error.o in the archive twice. This fixes a glitch reported
600 by Martin Mokrejs in
601 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
602
603 2003-04-21 Paul Eggert <eggert@twinsun.com>
604
605 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
606 to gnulib.
607
608 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
609
610 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
611 Fix obvious typo that results in uncompilable GLR parsers
612 when both %pure-parser and %locations are used. (trivial change)
613
614 2003-04-17 Paul Eggert <eggert@twinsun.com>
615
616 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
617 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
618 Do not insert the expected token via unput, as this runs afoul
619 of a POSIX-compatibility bug in flex 2.5.31.
620 All uses changed to BEGIN the parent state,
621 since we no longer insert the expected token via unput.
622 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
623 that is no longer emitted after the above change.
624
625 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
626 the first one. This change is from Paul Hilfinger, and it fixes
627 regression reported by Werner Lemberg in
628 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
629
630 (resolve_sr_conflict): Don't invoke state_errs_set
631 unless one or more tokens have been explicitly made errors.
632 Otherwise, the above change causes Bison to abort.
633
634 * tests/existing.at (GNU pic Grammar): New test case, taken from
635 Lemberg's email.
636
637 2003-03-31 Akim Demaille <akim@epita.fr>
638
639 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
640
641 2003-03-31 Akim Demaille <akim@epita.fr>
642
643 * src/output.c (prepare_symbols): Avoid trailing spaces in the
644 output.
645
646 2003-03-31 Akim Demaille <akim@epita.fr>
647
648 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
649 From Paul Hilfinger.
650
651 2003-03-29 Akim Demaille <akim@epita.fr>
652
653 * m4/error.m4: Do not put under dynamic conditions some code which
654 expansion is under static control.
655
656 2003-03-29 Akim Demaille <akim@epita.fr>
657
658 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
659
660 2003-03-29 Akim Demaille <akim@epita.fr>
661
662 * doc/bison.texinfo (Strings are Destroyed): New.
663
664 2003-03-13 Paul Eggert <eggert@twinsun.com>
665
666 * .cvsignore: Add configure.lineno.
667 * src/.cvsignore: Add yacc.
668 * tests/.cvsignore: Add testsuite.log.
669 * doc/fdl.texi: Sync with latest FSF version.
670
671 2003-03-12 Paul Eggert <eggert@twinsun.com>
672
673 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
674 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
675 cursor, instead of leaving it undefined. This fixes a bug
676 reported by Tim Van Holder in
677 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
678 * tests/input.at (Torturing the Scanner): Test the scanner on
679 an empty input file, which was Tim Van Holder's test case.
680
681 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
682 <sys/resource.h> can be included, include sys/time.h and
683 sys/times.h first, if available. This works around the SunOS
684 4.1.4 porting bug reported by Bruce Becker in
685 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
686
687 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
688 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
689 AC_HEADER_SYS_WAIT.
690
691 Merge changes from gnulib. This was prompted because the CVS
692 snapshot didn't build on Solaris 7 due to strnlen problems.
693
694 These changes need to be merged back into gnulib:
695 * lib/hash.c: Include <stdbool.h> unconditionally.
696 * m4/onceonly.m4 (m4_quote): New macro.
697 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
698 Quote AC_FOREACH variable-expansions properly.
699 The 2003-01-03 obstack.h change also needs merging.
700 {end of changes requiring merging}
701
702 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
703 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
704 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
705 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
706 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
707 New files, imported from gnulib.
708 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
709 above.
710
711 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
712 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
713 gnulib sources.
714
715 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
716 Add.
717 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
718 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
719 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
720 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
721 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
722 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
723 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
724 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
725 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
726 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
727 (jm_PREREQ_ARGMATCH): Remove.
728 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
729 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
730
731 * src/system.h: Include <stdbool.h> unconditionally.
732
733 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
734 assuming at least C89 in the bitset code for some time now.
735
736 2003-03-03 Akim Demaille <akim@epita.fr>
737
738 * ro.po: New.
739
740 2003-03-02 Akim Demaille <akim@epita.fr>
741
742 * doc/bison.texinfo (Table of Symbols): Reactivate the
743 documentation for %lex-param, and %parse-param.
744
745 2003-03-02 Akim Demaille <akim@epita.fr>
746
747 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
748 generate verbose error messages.
749 Use the number of tokens as an upper bound in yytname, as it
750 cannot be a non terminal.
751
752 2003-03-02 Akim Demaille <akim@epita.fr>
753
754 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
755 message.
756
757 2003-03-02 Akim Demaille <akim@epita.fr>
758
759 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
760 Use them to exercise yycheck overrun.
761 Based on Andrew Suffield's grammar.
762
763 2003-03-02 Akim Demaille <akim@epita.fr>
764
765 Create tests/local.at for Bison generic testing macros.
766
767 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
768 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
769 This new file.
770 * tests/calc.at (AT_CHECK_CALC): Adjust.
771 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
772 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
773 * tests/local.at: here.
774 (AT_COMPILE_CXX): Tags the tests using it as c++.
775 Ignore the test if CXX is not functional.
776
777 2003-03-01 Paul Eggert <eggert@twinsun.com>
778
779 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
780 not loc->end, since loc->end might contain garbage and this leads
781 to undefined behavior on some platforms.
782 (id_loc, token_start): Use (IF_LINTed) initial values that do not
783 depend on *loc, so that the reader doesn't give the the false
784 impression that *loc is initialized.
785 (<INITIAL>"%%"): Do not bother setting code_start, since its value
786 does not survive the return.
787
788 2003-03-01 Akim Demaille <akim@epita.fr>
789
790 * src/scan-gram.l (code_start): Always initialize it when entering
791 into yylex, as SC_EPILOGUE is activated *before* the corresponding
792 yylex invocation. An alternative would be making it static, but
793 then it starts with the second %%'s beginning, instead of its end.
794
795 2003-02-28 Paul Eggert <eggert@twinsun.com>
796
797 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
798 around a UnixWare 7.1.1 porting bug reported by John Hughes in
799 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
800
801 2003-02-26 Paul Eggert <eggert@twinsun.com>
802
803 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
804 Remove Sequent/Pyramid discussion (nobody uses them any more).
805 Merge VMS and MS-DOS discussion; these ports may well be dead
806 but let's keep mentioning them for now. Put <> around email
807 addresses. Add copyright notice.
808
809 2003-02-24 Paul Eggert <eggert@twinsun.com>
810
811 * data/glr.c (yy_reduce_print): yylineno -> yylno,
812 to avoid collision with flex use of yylineno.
813 Problem reported by Bruce Lilly in
814 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
815 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
816 * data/yacc.c (yy_reduce_print): Likewise.
817
818 * config/depcomp: Sync with Automake 1.7.3.
819
820 2003-02-21 Akim Demaille <akim@epita.fr>
821
822 * data/lalr1.cc: Use temporary variables instead of casts to
823 change integer types.
824 Suggested by Paul Eggert.
825
826 2003-02-21 Akim Demaille <akim@epita.fr>
827
828 * doc/bison.texinfo: Use "location" consistently to refer to @n,
829 to avoid confusions with lalr1.cc's notion of Position.
830 Suggested by Paul Eggert.
831
832 2003-02-20 Akim Demaille <akim@epita.fr>
833
834 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
835 before initial_columns.
836 (location.hh): Use consistent variable names when defining the
837 operator<<.
838 Use "last" so that we subtract from Positions, not from unsigned.
839
840 2003-02-20 Akim Demaille <akim@epita.fr>
841
842 * data/lalr1.cc (position.hh): New subfile, including the extended
843 and Doxygen'ed documentation of class Position.
844 (location.hh): Use it.
845 Document a` la Doxygen.
846 With the help of Benoit Perrot.
847
848 2003-02-20 Akim Demaille <akim@epita.fr>
849
850 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
851 AT_YACC_IF.
852 Redefine AT_YYERROR_SEES_LOC_IF using it.
853 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
854 not defined.
855 Don't use the location in yy::Parser::error_ and
856 yy::Parser::print_ when not %locations.
857 Activate more lalr1.cc tests.
858
859 2003-02-19 Akim Demaille <akim@epita.fr>
860
861 * data/lalr1.cc: When displaying a line number, be sure to make it
862 an int.
863
864 2003-02-19 Akim Demaille <akim@epita.fr>
865
866 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
867 Remove, useless.
868 (YYABORT, YYACCEPT, YYERROR): New.
869 * tests/calc.at: Renable the lalr1.cc test.
870
871 2003-02-19 Akim Demaille <akim@epita.fr>
872
873 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
874 error recovery, mixing with/without pops and discarding of the
875 lookahead.
876 Exercise YYERROR.
877 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
878
879 2003-02-17 Paul Eggert <eggert@twinsun.com>
880
881 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
882 * tests/testsuite.at (AT_COMPILE): Use them.
883 This fixes the testsuite problem reported by Robert Lentz in
884 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
885
886 2003-02-12 Paul Eggert <eggert@twinsun.com>
887
888 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
889 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
890 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
891 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
892 Check for malloc failure, for consistency with yacc.c.
893 (yytname_size): Remove, for consistency with yacc.c.
894
895 The bug still remains in data/lalr1.cc, as I didn't have time
896 to fix it there.
897
898 2003-02-06 Akim Demaille <akim@epita.fr>
899
900 * configure.ac (GXX): Rename as...
901 (CXX): this, to keep the original Autoconf semantics.
902 Require 2.57.
903 * data/lalr1.cc: Fix b4_copyright invocations.
904 If YYDEBUG is not defined, don't depend upon name_ being defined.
905 (location.hh): Include string and iostream.
906 (Position::filename): New member.
907 (Position::Position ()): New.
908 (operator<< (Position)): New.
909 (operator- (Position, int)): New.
910 (Location::first, Location::last): Rename as...
911 (Location::begin, Location::end): these, to mock the conventional
912 iterator names.
913 (operator<< (Location)): New.
914 * tests/atlocal.in (CXX): New.
915 * tests/testsuite.at (AT_COMPILE_CXX): New.
916 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
917 locations in a more synthetic way.
918 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
919 lalr1.cc is used.
920 Adjust the C locations to match those from Emacs: first column is
921 column 0.
922 Change all the expected results.
923 Conform to the GCS: simplify the locations when applicable.
924 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
925 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
926 these CPP macros with the m4 macros new defined by...
927 (AT_CHECK_PUSHDEFS): this, i.e.:
928 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
929 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
930 New macros.
931 (AT_CHECK_POPDEFS): Undefine them.
932 (AT_CHECK_CALC_LALR1_CC): New.
933 Use it for the first lalr1.cc test.
934
935 2003-02-04 Akim Demaille <akim@epita.fr>
936
937 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
938 Location as is defined.
939
940 2003-02-04 Akim Demaille <akim@epita.fr>
941
942 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
943 name_ being defined.
944
945 2003-02-03 Paul Eggert <eggert@twinsun.com>
946
947 * src/gram.h (start_symbol): Remove unused decl.
948
949 Use more-consistent naming conventions for local vars.
950
951 * src/derives.c (derives_compute): Change type of local var from
952 int to rule_number.
953 * src/gram.c (grammar_rules_partial_print): Likewise.
954 * src/print.c (print_core): Likewise.
955 * src/reduce.c (reduce_grammar_tables): Likewise.
956
957 * src/gram.c (grammar_dump): Change name of item_number *
958 local var from r to rp.
959 * src/nullable.c (nullable_compute): Likewise.
960
961 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
962
963 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
964 for symbol or symbol_number var.
965 * src/reader.c (grammar_start_symbol_set): Likewise.
966 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
967 Likewise.
968 * src/state.c (transitions_to): Likewise.
969 * src/state.h: Likewise.
970 * src/tables.c (symbol_number_to_vector_number): Likewise.
971
972 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
973 char * var.
974
975 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
976 var.
977
978 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
979 var.
980
981 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
982 Use str, not s, for char * var. Use ch, not c, for character var.
983 Use size for size var.
984
985 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
986 char * var.
987 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
988 uniqstr var.
989 * src/uniqstr.h: Likewise.
990
991 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
992 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
993 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
994 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
995 param to have same name as that of enum, so that we don't use
996 "s" to stand for a non-state.
997
998 2003-02-02 Akim Demaille <akim@epita.fr>
999
1000 * src/scan-skel.l: Scan more than one inert character per yylex
1001 invocation.
1002
1003 2003-02-01 Paul Eggert <eggert@twinsun.com>
1004
1005 Version 1.875a.
1006
1007 * po/LINGUAS: Add ms.
1008
1009 2003-01-30 Akim Demaille <akim@epita.fr>
1010
1011 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
1012
1013 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1014
1015 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
1016 of $1.
1017
1018 Changes in response to error report by S. Eken: GLR mode does not
1019 handle negative $ indices or $ indices in embedded rules correctly.
1020 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
1021
1022 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
1023 (b4_rhs_location): Ditto.
1024 (yyfill): New function to copy from stack tree into array
1025 incrementally.
1026 (yyuserAction): Modify to allow incremental move of semantic values
1027 to rhs array when in GLR mode.
1028 Define YYFILL to use in user-defined actions to fill semantic array
1029 as needed.
1030 Remove dummy use of yystack, as there is now a guaranteed use.
1031 (yydoAction): Modify to allow incremental move of semantic values
1032 to rhs array when in GLR mode.
1033 (yyresolveAction): Ditto.
1034 (yyglrShiftDefer): Update comment.
1035 (yyresolveStates): Use X == NULL for pointers, not !X.
1036 (yyglrReduce): Ditto.
1037 (yydoAction): Ditto
1038
1039 * tests/glr-regr1.at: Rename to ...
1040 * tests/glr-regression.at: Add new regression test for the problems
1041 described above (adapted from S. Eken).
1042 Update copyright notice.
1043 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
1044 * tests/Makefile.am: Ditto.
1045
1046 2003-01-28 Paul Eggert <eggert@twinsun.com>
1047
1048 * data/lalr1.cc: Do not use @output_header_name@ unless
1049 b4_defines_flag is set. This fixes two bugs reported by
1050 Tim Van Holder in
1051 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
1052 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
1053
1054 2003-01-21 Paul Eggert <eggert@twinsun.com>
1055
1056 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
1057 we don't need to worry about yyerrlab1 being reported as an
1058 "unused label" by non-GCC C compilers. The downside is that if
1059 locations are used then a couple of statements are duplicated each
1060 time YYERROR is invoked, but the upside is that the warnings
1061 should vanish.
1062 (yyerrlab1): Move code to YERROR.
1063 (yyerrlab2): Remove. Change uses back to yyerrlab1.
1064 This reverts some of the 2002-12-27 change.
1065
1066 2003-01-17 Paul Eggert <eggert@twinsun.com>
1067
1068 * src/output.c (symbol_printers_output): Fix typo that led
1069 to core dump. Problem reported by Antonio Rus in
1070 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
1071
1072 2003-01-13 Akim Demaille <akim@epita.fr>,
1073 Quoc Peyrot <chojin@lrde.epita.fr>,
1074 Robert Anisko <anisko_r@lrde.epita.fr>
1075
1076 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
1077 when the stacks contain one element, as the loop would otherwise
1078 free the last state, and then use the top state (the one we just
1079 popped). This means that the initial elements will not be freed
1080 explicitly, as is the case in yacc.c; it is not a problem, as
1081 these elements have fake values.
1082
1083 2003-01-11 Paul Eggert <eggert@twinsun.com>
1084
1085 * NEWS: %expect-violations are now just warnings, reverting
1086 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
1087 bootstrapping problem reported by Matthias Klose; see
1088 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
1089 * src/conflicts.c (conflicts_print): Likewise.
1090 * tests/conflicts.at (%expect not enough, %expect too much,
1091 %expect with reduce conflicts): Likewise.
1092 * doc/bison.texinfo (Expect Decl): Document this. Also mention
1093 that the warning is enabled if the number of conflicts changes
1094 (not necessarily increases).
1095
1096 * src/getargs.c (version): Update copyright year.
1097
1098 2003-01-09 Akim Demaille <akim@epita.fr>
1099
1100 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
1101
1102 2003-01-08 Paul Eggert <eggert@twinsun.com>
1103
1104 * Makefile.maint (WGETFLAGS):
1105 New macro, containing "-C off" to disable proxy caches.
1106 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
1107 (rel-check): Use $(WGET) instead of wget.
1108
1109 2003-01-06 Paul Eggert <eggert@twinsun.com>
1110
1111 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
1112 the GLR paper of Scott, Johnstone and Hussain.
1113
1114 2003-01-04 Paul Eggert <eggert@twinsun.com>
1115
1116 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
1117 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
1118 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
1119 (EXTRA_LIBRARIES): New var, for liby.a.
1120 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
1121 (EXTRA_SCRIPTS): New var, for yacc.
1122
1123 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
1124 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
1125 Problem reported by Nelson H. F. Beebe.
1126
1127 2003-01-03 Paul Eggert <eggert@twinsun.com>
1128
1129 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
1130 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1131 when compiling Bison 1.875's `bitset bset = obstack_alloc
1132 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
1133
1134 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
1135 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
1136 grow to a huge size with typical invocation.
1137
1138 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
1139 Use the pattern recommended by Autoconf 2.57, except also protect
1140 against double-definition.
1141 * src/system.h: Likewise.
1142 Portability issues reported by Nelson H. F. Beebe.
1143
1144 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
1145 All uses changed. Provide a definition in both C and C++.
1146 (yytrue, yyfalse): Define even if defined (__cplusplus).
1147
1148 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
1149 Reported by Nelson H. F. Beebe.
1150
1151 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
1152
1153 2003-01-02 Paul Eggert <eggert@twinsun.com>
1154
1155 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
1156 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
1157 Bug reported by Nelson H. F. Beebe.
1158
1159 2003-01-01 Paul Eggert <eggert@twinsun.com>
1160
1161 * Version 1.875.
1162
1163 2002-12-30 Paul Eggert <eggert@twinsun.com>
1164
1165 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
1166 Moved here from...
1167 (<INITIAL>","): Here. This causes stray "," to be treated
1168 more uniformly.
1169
1170 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
1171 last brace in braced code when not in Yacc mode, for compatibility
1172 with Bison 1.35. This resurrects the 2001-12-15 patch to
1173 src/reader.c.
1174
1175 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
1176 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
1177
1178 2002-12-28 Paul Eggert <eggert@twinsun.com>
1179
1180 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
1181 that of SYM's type. This fixes Debian bug 168069, reported by
1182 Thomas Olsson.
1183
1184 2002-12-28 Paul Eggert <eggert@twinsun.com>
1185
1186 Version 1.75f.
1187
1188 Switch back to the Yacc style of conflict reports, undoing some
1189 of the 2002-07-30 change.
1190 * doc/bison.texinfo (Understanding): Use Yacc style for
1191 conflict reports. Also, use new way of locating rules.
1192 * src/conflicts.c (conflict_report):
1193 Renamed from conflict_report_yacc, removing the old
1194 'conflict_report'. Translate the entire conflict report at once,
1195 so that we don't assume that "," has the same interpretation in
1196 all languages.
1197 (conflicts_output): Use Yacc-style conflict report for each state,
1198 instead of our more-complicated style.
1199 (conflicts_print): Use Yacc-style conflict report, except print
1200 the input file name when not emulating Yacc.
1201 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
1202 Conflicted Reduction, %expect not enough, %expect too much,
1203 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
1204 * tests/existing.at (GNU Cim Grammar): Likewise.
1205 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
1206
1207 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
1208 fatal): Don't invoke fflush; it's not needed and it might even be
1209 harmful for stdout, as stdout might not be open.
1210 * src/reduce.c (reduce_print): Likewise.
1211
1212 2002-12-27 Paul Eggert <eggert@twinsun.com>
1213
1214 Fix a bug where error locations were not being recorded correctly.
1215 This problem was originally reported by Paul Hilfinger in
1216 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
1217
1218 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1219 top of the location stack's error locations.
1220 (yyerrlab): Set it. When discarding a token, push its location
1221 onto yylerrsp so that we don't lose track of the error's end.
1222 (yyerrlab1): Now is only the target of YYERROR, so that we can
1223 properly record the location of the action that failed. For GCC
1224 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1225 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1226 (yyerrlab2): New label, which yyerrlab now falls through to.
1227 Compute the error's location by applying YYLLOC_DEFAULT to
1228 the locations of all the symbols that went into the error.
1229 * doc/bison.texinfo (Location Default Action): Mention that
1230 YYLLOC_DEFAULT is also invoked for syntax errors.
1231 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1232 Error locations include the locations of all the tokens that were
1233 discarded, not just the last token.
1234
1235 2002-12-26 Paul Eggert <eggert@twinsun.com>
1236
1237 * src/files.c: Include quote.h.
1238 (compute_output_file_names): Warn if we detect conflicting
1239 outputs to the same file. This should catch the misunderstanding
1240 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1241
1242 * src/conflicts.c (conflicts_print): If the user specifies
1243 "%expect N", report an error if there are any reduce/reduce
1244 conflicts. This is what the manual says should happen.
1245 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1246 * tests/conflicts.at (%expect with reduce conflicts): New test.
1247
1248 Don't use m4_include on relative file names, as it doesn't work as
1249 desired if there happens to be a file with that name under ".".
1250
1251 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1252 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1253 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1254 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1255 * src/output.c (output_skeleton): Use full path names when
1256 specifying a file to include; don't rely on include path, as
1257 it's unreliable when the working file contains a file with
1258 that name.
1259
1260 2002-12-25 Paul Eggert <eggert@twinsun.com>
1261
1262 Remove obsolete references to bison.simple and bison.hairy.
1263 Problem mentioned by Aubin Mahe in
1264 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
1265 * data/glr.c: Comment fix.
1266 * doc/bison.1: Remove references. Also, mention "yacc".
1267
1268 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1269 with -g option.
1270
1271 * src/parse-gram.y (declaration): Use enum "report_states" rather
1272 than its numeric value 1.
1273
1274 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1275 opening a new one. This fixes Debian bug 165349, reported by
1276 Bruce Stephens.
1277
1278 2002-12-24 Paul Eggert <eggert@twinsun.com>
1279
1280 Version 1.75e.
1281
1282 * Makefile.maint (cvs-update): Don't assume that the shell
1283 supports $(...), as Solaris sh doesn't.
1284
1285 * src/parse-gram.y (lloc_default): Remove test for empty
1286 nonterminals at the end, since it didn't change the result.
1287
1288 2002-12-24 Paul Eggert <eggert@twinsun.com>
1289
1290 If the user does not define YYSTYPE as a macro, Bison now declares it
1291 using typedef instead of defining it as a macro. POSIX requires this.
1292 For consistency, YYLTYPE is also declared instead of defined.
1293
1294 %union directives can now have a tag before the `{', e.g., the
1295 directive `%union foo {...}' now generates the C code
1296 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1297 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1298 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1299 instead of `yyltype'.
1300
1301 `yystype' and `yyltype' are now obsolescent macros instead of being
1302 typedefs or tags; they are no longer documented and will be
1303 withdrawn in a future release.
1304
1305 * data/glr.c (b4_location_type): Remove.
1306 (YYSTYPE): Renamed from yystype.
1307 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
1308 (struct YYLTYPE): Renamed from struct yyltype.
1309 (YYLTYPE): Renamed from yyltype.
1310 (yyltype, yystype): New (and obsolescent) macros,
1311 for backward compatibility.
1312 * data/yacc.c: Likewise.
1313
1314 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
1315 does not specify a union tag. This is for compatibility with
1316 Solaris 9 yacc.
1317
1318 * src/parse-gram.y (add_param): 2nd arg is now char * not char
1319 const *, since it is now modified by stripping surrounding { }.
1320 (current_braced_code): Remove.
1321 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
1322 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
1323 trailing " {...}". Now of type <chars>.
1324 (grammar_declaration): Adjust to bundled tokens.
1325 (code_content): Remove; stripping is now done by add_param.
1326 (print_token_value): Print contents of bundled tokens.
1327 (token_name): New function.
1328
1329 * src/reader.h (braced_code, current_braced_code): Remove.
1330 (token_name): New decl.
1331
1332 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
1333 token_type, not braced_code code_kind. All uses changed.
1334 (SC_PRE_CODE): New state, for scanning after a keyword that
1335 has (or usually has) an immediately-following braced code.
1336 (token_type): New local var, to keep track of which token type
1337 to return when scanning braced code.
1338 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
1339 <INITIAL>"%parse-param", <INITIAL>"%printer",
1340 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
1341 instead of returning a token type immediately.
1342 (<INITIAL>"{"): Set token type.
1343 (<SC_BRACED_CODE>"}"): Use it.
1344 (handle_action_dollar, handle_action_at): Now returns bool
1345 indicating success. Fail if ! current_rule; this prevents a core dump.
1346 (handle_symbol_code_dollar, handle_symbol_code_at):
1347 Remove; merge body into caller.
1348 (handle_dollar, handle_at): Complain in invalid contexts.
1349
1350 * NEWS, doc/bison.texinfo: Document the above.
1351 * NEWS: Fix years and program names in copyright notice.
1352
1353 2002-12-17 Paul Eggert <eggert@twinsun.com>
1354
1355 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
1356 Reporting, Table of Symbols): Omit mentions of %lex-param and
1357 %parse-param from the documentation for now.
1358
1359 2002-12-15 Paul Eggert <eggert@twinsun.com>
1360
1361 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
1362 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
1363 lookahead symbol, and which sets yychar in parser actions) and it
1364 disagreed with the Bison documentation. Bug
1365 reported by Andrew Walrond.
1366
1367 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
1368 as the caller now does that.
1369 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
1370 (YYEMPTY): Parenthesize right hand side, since others use it.
1371 (yyparse): Don't assume that our generated code is the only code
1372 that sets yychar.
1373
1374 2002-12-13 Paul Eggert <eggert@twinsun.com>
1375
1376 Version 1.75d.
1377
1378 POSIX requires a "yacc" command.
1379 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
1380 (MOSTLYCLEANFILES): Add yacc.
1381 (yacc): New rule.
1382 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
1383 as an alias for bison y.
1384
1385 * po/LINGUAS: Add da.
1386
1387 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
1388 problem with latest <getopt.h>.
1389 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
1390
1391 * doc/fdl.texi: Upgrade to 1.2.
1392 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
1393 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
1394 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
1395 gnulib.
1396 * config/install-sh: Sync with autotools.
1397
1398 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
1399 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1400 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
1401 locations are requested.
1402 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
1403 locations are requested.
1404
1405 2002-12-12 Paul Eggert <eggert@twinsun.com>
1406
1407 Remove unportable casts and storage allocation tricks.
1408 While we're at it, remove almost all casts, since they
1409 usually aren't needed and are a sign of trouble.
1410
1411 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
1412
1413 * src/derives.c (derives_compute): Do not subtract NTOKENS from
1414 the pointer DSET returned by malloc; this isn't portable.
1415 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
1416 Similarly for DERIVES.
1417 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
1418 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
1419 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
1420
1421 * src/derives.c (derives_compute): Do not bother invoking
1422 int_of_rule_number, since rule numbers are integers.
1423
1424 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
1425 rather than XMALLOC (char, N).
1426
1427 * src/files.c (filename_split): Rewrite to avoid cast.
1428
1429 * src/gram.h (symbol_number_as_item_number,
1430 item_number_as_symbol_number, rule_number_as_item_number,
1431 item_number_as_rule_number):
1432 Now inline functions rather than macros, to avoid casts.
1433 * src/state.h (state_number_as_int): Likewise.
1434 * src/tables.c (state_number_to_vector_number,
1435 symbol_number_to_vector_number): Likewise.
1436
1437 * src/gram.h (int_of_rule_number): Remove; no longer used.
1438
1439 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
1440 since the resulting storage is always stored into.
1441
1442 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
1443 where it's needed.
1444
1445 * src/muscle_tab.c (muscle_m4_output):
1446 Now inline. Return bool, not int.
1447 * src/state.c (state_compare): Likewise.
1448 * src/symtab.c (symbol_check_defined,
1449 symbol_check_alias_consistency, symbol_pack, symbol_translation,
1450 hash_compare_symbol, hash_symbol):
1451 Likewise.
1452 * src/uniqstr.c (uniqstr_print): Likewise.
1453 * src/muscle_tab.c (muscle_m4_output_processor):
1454 New function, to avoid casts.
1455 * src/state.c (state_comparator, stage_hasher): Likewise.
1456 * src/symtab.c (symbol_check_defined_processor,
1457 symbol_check_alias_consistency_processor, symbol_pack_processor,
1458 symbol_translation_processor, hash_symbol_comparator,
1459 hash_symbol_hasher): Likewise.
1460 * src/uniqstr.c (uniqstr_print_processor): Likewise.
1461 * src/muscle_tab.c (muscles_m4_output):
1462 Use new functions instead of casting old functions unportably.
1463 * src/state.c (state_hash_new): Likewise.
1464 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
1465 symbols_token_translations_init):
1466 Likewise.
1467 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
1468
1469 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
1470 var instead of casting to long, to avoid casts.
1471 (prepare_states): Use MALLOC rather than alloca, so that we don't
1472 have to worry about alloca.
1473 * src/state.c (state_hash_lookup): Likewise.
1474
1475 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
1476 local var instead of casting to unsigned char, to avoid casts.
1477
1478 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
1479 STATE_ALLOC): Remove.
1480 (transitions_new, errs_new, reductions_new, state_new): Use malloc
1481 rather than calloc, and use offsetof to avoid allocating slightly
1482 too much storage.
1483 (state_new): Initialize all members.
1484
1485 * src/state.c (state_hash): Use unsigned accumulator, not signed.
1486
1487 * src/symtab.c (symbol_free): Remove; unused.
1488 (symbol_get): Remove cast in lhs of assignment.
1489 (symbols_do): Now static. Accept generic arguments, not
1490 hashing-related ones.
1491
1492 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
1493 (symbol_processor): Remove.
1494 (symbols_do): Remove decl; now static.
1495
1496 * src/system.h (alloca): Remove; decl no longer needed.
1497 (<stddef.h>): Include, for offsetof.
1498 (<inttypes.>, <stdint.h>): Include if available.
1499 (uintptr_t): New type, if system lacks it.
1500 (CALLOC, MALLOC, REALLOC): New macros.
1501 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
1502 new macros.
1503
1504 * src/tables.c (table_size): Now int, to pacify GCC.
1505 (table_grow, table_ninf_remap): Use signed table size.
1506 (save_row): Don't bother initializing locals when not needed.
1507 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
1508 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
1509
1510 * src/vcg.h: Correct misspellings.
1511
1512 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
1513
1514
1515 * src/getargs.c (getargs): Don't assume EOF == -1.
1516
1517 2002-12-09 Paul Eggert <eggert@twinsun.com>
1518
1519 Change identifier spellings to avoid collisions with names
1520 that are reserved by POSIX.
1521
1522 Don't use names ending in _t, since POSIX reserves them.
1523 For consistency, remove _e and _s endings -- they're weren't
1524 needed to remove ambiguity. All uses changed.
1525 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
1526 turn was just renamed from struniq_t.
1527 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
1528 which in turn was just renamed from struniq_processor_t.
1529 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
1530 in turn was renamed from hash_compare_struniq_t.
1531 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
1532 (state_list): Renamed from state_list_t.
1533 * src/assoc.h (assoc): Renamed from assoc_t.
1534 * src/conflicts.c (enum conflict_resolution): Renamed from
1535 enum conflict_resolution_e.
1536 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
1537 (rule_list): Renamed from rule_list_t.
1538 * src/getargs.h (enum trace): Renamed from enum trace_e.
1539 (enum report): Renamed from enum report_e.
1540 * src/gram.h (item_number): Renamed from item_number_t.
1541 (rule_number): Renamed from rule_number_t.
1542 (struct rule_s): Remove the "rule_s" part; not used.
1543 (rule): Renamed from rule_t.
1544 (rule_filter): Renamed from rule_filter_t.
1545 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
1546 (goto_list): Renamed from goto_list_t.
1547 * src/lalr.h (goto_number): Renamed from goto_number_t.
1548 * src/location.h (location): Renamed from location_t.
1549 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
1550 and moved here from:
1551 * src/muscle_tab.h (muscle_entry_t): here.
1552 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
1553 (rule_list): Renamed from rule_list_t.
1554 * src/print_graph.c (static_graph): Renamed from graph.
1555 * src/reader.h (braced_code): Renamed from braced_code_t.
1556 Remove brace_code_e tag.
1557 * src/relation.h (relation_node): Renamed from relation_node_t.
1558 (relation_nodes): Renamed from relation_nodes_t.
1559 (relation): Renamed from relation_t.
1560 * src/state.h (state_number): Renamed from state_number_t.
1561 (struct state): Renamed from struct state_s.
1562 (state): Renamed from state_t.
1563 (transitions): Renamed from transitions_t. Unused (and
1564 misspelled) transtion_s tag removed.
1565 (errs): Renamed from errs_t. Unused errs_s tag removed.
1566 (reductions): Renamed from reductions_t. Unused tag
1567 reductions_s removed.
1568 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
1569 (struct symbol_list): Renamed from struct symbol_list_s.
1570 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
1571 (struct symbol): Renamed from struct symbol_s.
1572 (symbol): Renamed from symbol_t.
1573 * src/tables.c (vector_number): Renamed from vector_number_t.
1574 (action_number): Renamed from action_t.
1575 * src/tables.h (base_number): Renamed from base_t.
1576 * src/vcg.h (enum color): Renamed from enum color_e.
1577 (enum textmode): Renamed from enum textmode_e.
1578 (enum shape): Renamed from enum shape_e.
1579 (struct colorentry): Renamed from struct colorentry_s.
1580 (struct classname): Renamed from struct classname_s.
1581 (struct infoname): Renamed from struct infoname_s.
1582 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
1583 (enum decision): Renamed from enum decision_e.
1584 (enum orientation): Renamed from enum orientation_e.
1585 (enum alignment): Renamed from enum alignment_e.
1586 (enum arrow_mode): Renamed from enum arrow_mode_e.
1587 (enum crossing_type): Renamed from enum crossing_type_e.
1588 (enum view): Renamed from enum view_e.
1589 (struct node): Renamed from struct node_s.
1590 (node): Renamed from node_t.
1591 (enum linestyle): Renamed from enum linestyle_e.
1592 (enum arrowstyle): Renamed from enum arrowstyle_e.
1593 (struct edge): Renamed from struct edge.
1594 (edge): Renamed from edge_t.
1595 (struct graph): Renamed from struct graph_s.
1596 (graph): Renamed from graph_t.
1597 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
1598 Rename value_t -> value.
1599 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
1600 value_t_as_yystype -> value_as_yystype.
1601
1602 Don't include <errno.h> in the mainstream code, since it
1603 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
1604 * lib/get-errno.c, lib/get-errno.h: New files.
1605 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
1606 get-errno.c.
1607 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
1608 * src/output.c (output_skeleton): Likewise.
1609 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
1610 instead of errno.
1611 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
1612 Likewise.
1613 (handle_action_dollar, handle_action_at): Likewise.
1614 * src/system.h: Do not include <errno.h>.
1615 (TAB_EXT): Renamed from EXT_TAB.
1616 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
1617
1618 Avoid str[a-z]*, since <string.h> reserves that name space.
1619 Change all instances of "struniq" in names to "uniqstr", and
1620 likewise for "STRUNIQ" and "UNIQSTR".
1621 * src/uniqstr.c: Renamed from src/struniq.c.
1622 * src/uniqstr.h: Renamed from src/struniq.h.
1623 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
1624 * src/files.c (strsuffix): Remove; unused.
1625 (concat2): Renamed from stringappend. Now static.
1626 * src/files.h (strsuffix, stringappend): Remove; unused.
1627 * src/parse-gram.y (<chars>): Renamed from <string>.
1628 (<uniqstr>): Renamed from <struniq>.
1629 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
1630 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
1631 (struct graph_s.expand): Renamed from struct graph_s.stretch.
1632 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
1633 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
1634 (N_EXPAND): Renamed from N_STRETCH.
1635
1636 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
1637 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
1638 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
1639 Remove; unused.
1640 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
1641 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
1642 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
1643 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
1644 (BASE_MAXIMUM): Renamed from BASE_MAX.
1645 (BASE_MINIMUM): Renamed from BASE_MIN.
1646 (ACTION_MAX): Remove; unused.
1647 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
1648 Unnecessary casts removed from above defines.
1649
1650
1651 Fix misspelling in names.
1652 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
1653 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
1654 G_NODE_ALIGNEMENT.
1655
1656
1657 * lib/timevar.c (timevar_report): Renamed from time_report,
1658 for consistency with other names.
1659 * lib/timevar.h (timevar_report): New decl.
1660 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
1661
1662
1663 Sort include-file uses.
1664
1665 Reorder all include files under src to be in the order "system.h".
1666 then the ../lib include files in angle brackets (alphabetized),
1667 then the . include files in double-quotes (alphabetized). Fix
1668 dependency breakages encountered in this process, as follows:
1669 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
1670 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
1671 * src/state.h: Include "symtab.h".
1672
1673 2002-12-08 Paul Eggert <eggert@twinsun.com>
1674
1675 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
1676 since this causes problems when __file__ contains character
1677 sequences like "@" that are treated specially by src/scan-skel.l.
1678 Instead, just use the file's basename. This fixes the bug
1679 reported by Martin Mokrejs in
1680 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
1681
1682 2002-12-06 Paul Eggert <eggert@twinsun.com>
1683
1684 Add support for rules that do not have trailing semicolons, as
1685 POSIX requires. Improve the quality of locations in Bison
1686 diagnostics.
1687
1688 * src/location.c: Include <quotearg.h>.
1689 (empty_location): Now const.
1690 (location_print): New function. Follow the recommendation of the
1691 GNU Coding Standards for locations that span file boundaries.
1692 * src/location.h: Do not include <quotearg.h>; no longer needed.
1693 (boundary): New type.
1694 (location_t): Use it. This allows locations to span file boundaries.
1695 All member uses changed: file -> start.file or end.file (as needed),
1696 first_line -> start.line, first_column -> start.column,
1697 last_line -> end.line, last_column -> end.column.
1698 (equal_boundaries): New function.
1699 (LOCATION_RESET, LOCATION_STEP): Remove.
1700 (LOCATION_PRINT): Remove. All callers changed to use location_print.
1701 (empty_location): Now const.
1702 (location_print): New decl.
1703 * src/parse-gram.y (lloc_default): New function, which handles
1704 empty locations more accurately.
1705 (YYLLOC_DEFAULT): Use it.
1706 (%token COLON): Remove.
1707 (%token ID_COLON): New token.
1708 (rules): Use it.
1709 (declarations, rules): Remove trailing semicolon.
1710 (declaration, rules_or_grammar_declaration):
1711 Allow empty (";") declaration.
1712 (symbol_def): Remove empty actions; no longer needed.
1713 (rules_or_grammar_declaration): Remove trailing semicolon.
1714 (semi_colon.opt): Remove.
1715 * src/reader.h: Include location.h.
1716 (scanner_cursor): New decl.
1717 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
1718 rolling our own.
1719 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
1720 of *loc.
1721 (STEP): Remove. No longer needed, now that adjust_location does
1722 the work. All uses removed.
1723 (scanner_cursor): New var.
1724 (adjust_location): Renamed from extend_location. It now sets
1725 *loc and adjusts the scanner cursor. All uses changed.
1726 Don't bother testing for CR.
1727 (handle_syncline): Remove location arg; now updates scanner cursor.
1728 All callers changed.
1729 (unexpected_end_of_file): Now accepts start boundary of token or
1730 comment, not location. All callers changed. Update scanner cursor,
1731 not the location.
1732 (SC_AFTER_IDENTIFIER): New state.
1733 (context_state): Renamed from c_context. All uses changed.
1734 (id_loc, code_start, token_start): New local vars.
1735 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
1736 processing of Yacc white space and equivalents here.
1737 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
1738 instead of returning ID immediately, since we need to search for
1739 a subsequent colon.
1740 (<INITIAL>"'", "\""): Save token_start.
1741 (<INITIAL>"%{", "{", "%%"): Save code_start.
1742 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
1743 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
1744 BEGIN context_state at end, not INITIAL.
1745 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
1746 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
1747 Return correct token start.
1748 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
1749 the start of a character, string or multiline comment is found.
1750 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
1751 Reduction): Adjust reported locations to match the more-precise
1752 results now expected.
1753 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
1754 * tests/reduce.at (Useless Rules, Reduced Automaton,
1755 Underivable Rules): Likewise.
1756 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1757 or "|"' now that so many other tokens are allowed by the new grammar.
1758
1759 * src/complain.h (current_file): Remove duplicate decl;
1760 current_file is now owned by files.h.
1761 * src/complain.c, src/scan-gram.l: Include files.h.
1762
1763 2002-12-06 Paul Eggert <eggert@twinsun.com>
1764
1765 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1766 promotes to int; it might be unsigned int.
1767 * data/yacc.c (yy_reduce_print): Likewise.
1768
1769 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1770 be #defined in the prologue, not in the Bison declarations.
1771 This fixes Debian Bug 102878, reported by Shaul Karl.
1772
1773 2002-12-02 Paul Eggert <eggert@twinsun.com>
1774
1775 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1776 * lib/strtoul.c: New file, from gnulib.
1777 This fixes a porting bug reported by Peter Klein in
1778 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
1779
1780 2002-11-30 Paul Eggert <eggert@twinsun.com>
1781
1782 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1783 and put only a forward declaration in the prologue. This is for
1784 consistency with the other scanner helper functions.
1785
1786 Type clashes now generate warnings, not errors, since it
1787 appears that POSIX may allow some grammars with type clashes.
1788 * src/reader.c (grammar_current_rule_check): Warn about
1789 type clashes instead of complaining.
1790 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1791
1792 Add Yacc library, since POSIX requires it.
1793 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1794 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1795 * lib/main.c, lib/yyerror.c: New files.
1796
1797 gram_error can be static; it need not be extern.
1798 * src/reader.h (gram_error): Remove decl.
1799 * src/parse-gram.y (gram_error): Now static. Add static decl.
1800 (print_token_value): Omit parameter names from forward decl,
1801 for consistency.
1802
1803 2002-11-29 Paul Eggert <eggert@twinsun.com>
1804
1805 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1806 be declared before being used. E.g., one should typically
1807 declare them in the prologue. Use GNU coding style in examples.
1808 Put "const" consistently after the type it modifies. Mention
1809 that C99 supports "inline". Mention that yyerror traditionally
1810 returns "int".
1811
1812 %parse-param and %lex-param now take just one argument, the
1813 declaration; the argument name is deduced from the declaration.
1814
1815 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1816 Reporting, Table of Symbols): Document this.
1817 * src/parse-gram.y (add_param): New function.
1818 (COMMA): Remove.
1819 (declaration): Implement new rule for %parse-param and %lex-param.
1820 * src/scan-gram.l: "," now elicits a warning, rather than being
1821 a token; this is more compatible with byacc.
1822 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1823
1824 2002-11-27 Paul Eggert <eggert@twinsun.com>
1825
1826 Rename identifiers to avoid real and potential collisions.
1827
1828 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1829 to avoid collision with lex macro described by Bruce Lilly in
1830 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1831 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1832 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1833 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1834 All uses changed.
1835 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1836 The name "yycontrol" violates the name space rules, and this stuff
1837 wasn't being used anyway.
1838 (input): Remove action; this stuff wasn't being used.
1839 (gram_error): Rename local variable yylloc -> loc.
1840 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1841 (YY_DECL): Don't use "yy" at start of local variables.
1842 All uses changed, e.g., yylloc -> loc.
1843 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1844 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1845 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1846 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1847
1848 * src/parse-gram.y (gram_error): loc is now const *.
1849 * src/reader.h (gram_error): Likewise.
1850
1851 2002-11-24 Paul Eggert <eggert@twinsun.com>
1852
1853 Version 1.75c.
1854
1855 * tests/actions.at (Actions after errors): Use an output format
1856 more similar to that of the Printers and Destructors test.
1857 Test the position of the ';' token too.
1858 (Printers and Destructors): Likewise.
1859 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1860 unnecessarily alarming people when the test fails.
1861
1862 * data/yacc.c (yyerrlab1): Move this label down, so that the
1863 parser does not discard the lookahead token if the user code
1864 invokes YYERROR. This change is required for POSIX conformance.
1865
1866 * lib/error.c: Sync with gnulib.
1867
1868 2002-11-22 Paul Eggert <eggert@twinsun.com>
1869
1870 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1871 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1872 * lib/xmalloc.c: Likewise.
1873
1874 2002-11-20 Paul Eggert <eggert@twinsun.com>
1875
1876 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1877
1878 2002-11-20 Paul Eggert <eggert@twinsun.com>
1879
1880 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1881 should use `if (! x) abort ();' rather than `assert (x);', and
1882 anyway it's one less thing to worry about configuring.
1883
1884 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1885 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1886 and replace all instances of assert with abort.
1887 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1888 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1889
1890 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1891 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1892 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1893 hash_find_entry, hash_rehash, hash_insert): Likewise.
1894 * src/conflicts.c (resolve_sr_conflict): Likewise.
1895 * src/lalr.c (set_goto_map, map_goto): Likewise.
1896 * src/nullable.c (nullable_compute): Likewise.
1897 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1898 * src/reader.c (packgram, reader): Likewise.
1899 * src/state.c (state_new, state_free, state_transitions_set,
1900 state_reduction_find): Likewise.
1901 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1902 symbol_pack): Likewise.
1903 * src/tables.c (conflict_row, pack_vector): Likewise.
1904 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1905 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1906 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1907 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1908
1909 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1910 (ARGMATCH_CONSTRAINT): New macro.
1911 (ARGMATCH_ASSERT): Use it.
1912
1913 * src/system.h (verify): New macro.
1914 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1915 rather than assert.
1916 * src/tables.c (tables_generate): Likewise.
1917
1918 * src/struniq.c (struniq_assert): Now returns void, and aborts
1919 if the assertion is false.
1920 (struniq_assert_p): Remove.
1921 * src/struniq.h: Likewise.
1922
1923 2002-11-18 Paul Eggert <eggert@twinsun.com>
1924
1925 * data/glr.c (yygetLRActions): Replace `yyindex' with
1926 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1927 This fixes the regression with Sun ONE Studio 7 cc that I reported in
1928 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
1929
1930 2002-11-18 Akim Demaille <akim@epita.fr>
1931
1932 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1933 space.
1934 From Tim Van Holder.
1935
1936 2002-11-17 Paul Eggert <eggert@twinsun.com>
1937
1938 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1939 to "SyntaxError" for consistency with my 2002-11-15 change.
1940
1941 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1942 not define to {}, since this breaks the common use of `YYDPRINTF
1943 ((...));' if a single statement is desired (e.g. before `else').
1944 Work around GCC warnings by surrounding corresponding calls with
1945 {} if needed.
1946 (yyhasResolvedValue): Remove unused function.
1947 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1948 loop body.
1949 (yyreportSyntaxError): Renamed from yyreportParseError.
1950 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1951 All uses changed.
1952 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1953 extern when possible. Remove unused initializations.
1954
1955 2002-11-16 Akim Demaille <akim@epita.fr>
1956
1957 Augment the similarity between GLR and LALR traces.
1958
1959 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1960 (YY_REDUCE_PRINT): New.
1961 (yyparse): Use them.
1962 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1963 YYDPRINT here.
1964 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1965 state reached after the reduction/recovery, since...
1966 (yyparse, yyprocessOneStack): Report the state we are entering in.
1967
1968 2002-11-16 Akim Demaille <akim@epita.fr>
1969
1970 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1971 Add support for --trace=skeleton.
1972 * src/scan-skel.l: %option debug.
1973 Scan strings of non-@ or \n instead of character by character.
1974 (scan_skel): Handle trace_skeleton.
1975 (QPUTS): New.
1976 (@output_parser_name@, @output_header_name@): ``Restore'' their
1977 support (used to be M4 macros).
1978 * data/yacc.c: Quote larger chunks, a la glr.c.
1979 * data/lalr1.cc: Likewise.
1980 The header guards are no longer available, so use some other
1981 string than `YYLSP_NEEDED'.
1982
1983 2002-11-16 Akim Demaille <akim@epita.fr>
1984
1985 Make the ``Printers and Destructors'' test more verbose, taking
1986 `yacc.c''s behavior as (possibly wrong) reference.
1987
1988 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1989 instead of fprint on stdout.
1990 Set and report the last_line of the symbols.
1991 Consistently display values and locations.
1992
1993 2002-11-16 Paul Eggert <eggert@twinsun.com>
1994
1995 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1996
1997 2002-11-15 Paul Eggert <eggert@twinsun.com>
1998
1999 * tests/actions.at (Actions after errors): New test case.
2000
2001 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
2002 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
2003 tests/action.at, tests/calc.at, tests/conflicts.at,
2004 tests/cxx-type.at, tests/regression.at:
2005 "parse error" -> "syntax error" for POSIX compatibility.
2006 "parsing stack overflow..." -> "parser stack overflow" so
2007 that code matches Bison documentation.
2008
2009 2002-11-15 Akim Demaille <akim@epita.fr>
2010
2011 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
2012 take two BRACED_CODE, not two string_content.
2013 Free the scanner's obstack when we are done.
2014 (code_content): New.
2015 * tests/calc.at: Adjust.
2016 * doc/bison.texinfo: Adjust.
2017 Also, make sure to include the `,' for these declarations.
2018
2019 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
2020
2021 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
2022 definition; avoids potential autoreconf problems.
2023
2024 2002-11-15 Akim Demaille <akim@epita.fr>
2025
2026 Always check the value returned by yyparse.
2027
2028 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
2029 returned by yyparse.
2030 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
2031 Adjust calls.
2032 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
2033 returned by yyparse.
2034
2035 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2036
2037 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
2038 on input.at test.
2039
2040 2002-11-14 Paul Eggert <eggert@twinsun.com>
2041
2042 * src/output.c (output_skeleton): Call xfopen instead of
2043 duplicating xfopen's body.
2044
2045 Fix bugs reported by Nelson H. F. Beebe in
2046 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
2047
2048 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
2049 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
2050 Group compiler. Instead, use "$CC -E bar.c". Include the .h
2051 file twice in the grammar, as an extra check.
2052
2053 * tests/input.at (Torturing the Scanner): Surround the
2054 backslash-newline tests with "#if 0", to make it less likely that
2055 we'll run into compiler bugs. Bring back solitary \ inside
2056 comment, but add a closing comment to work around HP C bug. Don't
2057 test backslash-newline in C character constant.
2058
2059 2002-11-14 Akim Demaille <akim@epita.fr>
2060
2061 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
2062 status of the compiler.
2063 Calling `exit 1' is no longer needed.
2064 Reported by Nelson H. F. Beebe.
2065
2066 2002-11-14 Akim Demaille <akim@epita.fr>
2067
2068 * tests/atlocal.in (CPPFLAGS): We have config.h.
2069 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
2070 New.
2071 * tests/actions.at, tests/calc.at, tests/conflicts.at,
2072 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
2073 * tests/regression.at, tests/torture.at: Use them for all the
2074 grammars that are to be compiled.
2075 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
2076 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
2077 * doc/bison.texinfo (GLR Parsers): Document `inline'.
2078
2079 2002-11-14 Akim Demaille <akim@epita.fr>
2080
2081 * doc/bison.texinfo: Various formatting changes (alignments in
2082 samples, additional @group/@end group, GCS in samples.
2083 Use @deffn instead of simple @table to define the directives,
2084 macros, variables etc.
2085
2086 2002-11-13 Paul Eggert <eggert@twinsun.com>
2087
2088 Fix some bugs reported by Albert Chin-A-Young in
2089 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
2090
2091 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
2092 -o c"; the HP C compiler chatters during compilation.
2093 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
2094 * tests/headers.at (export YYLTYPE): Likewise.
2095
2096 * tests/input.at (Torturing the Scanner): Remove lines containing
2097 solitary backslashes, as they tickle a bug in the HP C compiler.
2098
2099 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
2100 comments, since they're not portable. Use GNU coding style.
2101
2102 2002-11-13 Akim Demaille <akim@epita.fr>
2103
2104 * data/yacc.c: Leave bigger chunks of quoted text.
2105 (YYDSYMPRINTF): New.
2106 Use it to report symbol activities.
2107 * data/glr.c (YYDSYMPRINTF): New.
2108 Use it.
2109
2110 2002-11-12 Paul Eggert <eggert@twinsun.com>
2111
2112 Version 1.75b.
2113
2114 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
2115 (yyglrReduce): Return yyok, not 0.
2116 This should avoid the enumerated-type warnings reported
2117 by Nelson H. F. Beebe in
2118 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
2119
2120 * lib/bbitset.h (BITSET_INLINE): Remove.
2121 * lib/bitset.h [! BITSET_INLINE]: Remove.
2122 (bitset_set, bitset_reset, bitset_test): Rename local vars
2123 to avoid shadowing warnings by GCC.
2124
2125 * data/glr.c (inline): Remove #define. It's the user's
2126 responsibility to #define it away, just like 'const'.
2127 This fixes one of the bugs reported by Nelson H. F. Beebe in
2128 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
2129
2130 * Makefile.maint (po-check): Scan .l and .y files instead of the
2131 .c and the .h files that they generate. This fixes the bug
2132 reported by Tim Van Holder in:
2133 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
2134 Look for N_ as well as for _. Try to avoid matching #define for
2135 N_ and _.
2136 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
2137 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
2138 * src/scan-gram.l: Revamp regular expressions so that " and '
2139 do not confuse xgettext.
2140
2141 * src/struniq.h (struniq_new): Do not declare the return type
2142 to be 'const'; this violates the C standard.
2143 * src/struniq.c (struniq_new): Likewise.
2144
2145 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
2146
2147 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
2148 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
2149 linker.
2150
2151 2002-11-12 Akim Demaille <akim@epita.fr>
2152
2153 * Makefile.maint: Sync with Autoconf:
2154 (local_updates): New.
2155
2156 2002-11-12 Akim Demaille <akim@epita.fr>
2157
2158 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
2159
2160 2002-11-12 Akim Demaille <akim@epita.fr>
2161
2162 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
2163 locations.
2164
2165 2002-11-12 Akim Demaille <akim@epita.fr>
2166
2167 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
2168 not yyvalue.
2169
2170 2002-11-12 Akim Demaille <akim@epita.fr>
2171
2172 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
2173 Use it to test the GLR parser.
2174
2175 2002-11-12 Akim Demaille <akim@epita.fr>
2176
2177 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
2178 defines it.
2179 * data/glr.c (yystos): New.
2180 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
2181 (YYDSYMPRINT): New.
2182 (yyval): Don't define it, it is handled via M4.
2183 (yyrecoverParseError): Free verbosely the discarded symbols.
2184 * data/yacc.c (yysymprint): Remove, rather...
2185 (b4_yysymprint_generate): invoke.
2186 * data/c.m4 (b4_yysymprint_generate): New.
2187 Accept pointers as arguments, as opposed to the version from
2188 yacc.c.
2189 (b4_yydestruct_generate): Likewise.
2190 * tests/cations.at (Printers and Destructors): Use Bison directives
2191 instead of CPP macros.
2192 Don't rely on internal details.
2193
2194 2002-11-12 Akim Demaille <akim@epita.fr>
2195
2196 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
2197 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
2198 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
2199 it against YYEMPTY and so forth), work on yytoken (i.e., set
2200 it to YYEMPTY etc.).
2201 (yydestruct): Replace with a b4_yydestruct_generate invocation.
2202 (b4_symbol_actions): Remove.
2203 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
2204 for 0, end-of-input.
2205
2206 2002-11-12 Akim Demaille <akim@epita.fr>
2207
2208 * doc/bison.texinfo (Destructor Decl): New.
2209
2210 2002-11-12 Akim Demaille <akim@epita.fr>
2211
2212 * src/tables.c (tables_generate): Use free for pointers that
2213 cannot be NULL, not XFREE.
2214 (pack_vector): Use assert, not fatal, for bound violations.
2215 * src/state.c (state_new): Likewise.
2216 * src/reader.c (reader): Likewise.
2217 * src/lalr.c (set_goto_map): Likewise.
2218 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
2219 the file name.
2220
2221 2002-11-12 Akim Demaille <akim@epita.fr>
2222
2223 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2224 Restore.
2225 * src/scan-gram.l (last_string): Is global to the file, not to
2226 yylex.
2227 * src/parse-gram.y (input): Don't append the epilogue here,
2228 (epilogue.opt): do it here, and free the scanner's obstack.
2229 * src/reader.c (epilogue_set): Rename as...
2230 (epilogue_augment): this.
2231 * data/c.m4 (b4_epilogue): Defaults to empty.
2232
2233 2002-11-12 Akim Demaille <akim@epita.fr>
2234
2235 * src/getargs.c (long_options): Remove duplicates.
2236 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2237 Remove.
2238 * doc/bison.rnh: Remove.
2239 * doc/bison.texinfo (VMS Invocation): Remove.
2240
2241 2002-11-12 Akim Demaille <akim@epita.fr>
2242
2243 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2244 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2245
2246 Use struniq for symbols.
2247
2248 * src/symtab.h (symbol_t): The tag member is a struniq.
2249 (symbol_type_set): Adjust.
2250 * src/symtab.c (symbol_new): Takes a struniq.
2251 (symbol_free): Don't free the tag member.
2252 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2253 (hash_compare_symbol, hash_symbol): these.
2254 Use the fact that tags as struniqs.
2255 (symbol_get): Use struniq_new.
2256 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2257 Returns a strniq.
2258 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2259 and type members are struniqs.
2260 * src/reader.c (get_merge_function)
2261 (grammar_current_rule_merge_set): Adjust.
2262 (TYPE, current_type): Are struniq.
2263
2264 Use struniq for file names.
2265
2266 * src/files.h, src/files.c (infile): Split into...
2267 (grammar_file, current_file): these.
2268 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2269 * src/reduce.c (reduce_print): Likewise.
2270 * src/getargs.c (getargs): Likewise.
2271 * src/complain.h, src/complain.c: Likewise.
2272 * src/main.c (main): Call struniqs_new early enough to use it for
2273 file names.
2274 Don't free the input file name.
2275
2276 2002-11-12 Akim Demaille <akim@epita.fr>
2277
2278 * src/symtab.c (symbol_free): Remove dead deactivated code:
2279 type_name are properly removed.
2280 Don't use XFREE to free items that cannot be NULL.
2281 * src/struniq.h, src/struniq.c: New.
2282 * src/main.c (main): Initialize/free struniqs.
2283 * src/parse-gram.y (%union): Add astruniq member.
2284 (yyprint): Adjust.
2285 * src/scan-gram.l (<{tag}>): Return a struniq.
2286 Free the obstack bit that used to store it.
2287 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2288
2289 2002-11-11 Paul Eggert <eggert@twinsun.com>
2290
2291 Revamp to fix many (but not all) of the C- and M4-related quoting
2292 problems. Among other things, this fixes the Bison bug reported
2293 by Jan Hubicka when processing the Bash grammar; see:
2294 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
2295
2296 Use new @ escapes consistently. Represent brackets with @{ and @}
2297 rather than @<:@ and @:>@, since this works a bit better with dumb
2298 editors like vi. Represent @ with @@, since @ is now consistently
2299 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2300 __ofile__, to avoid unexpected expansions. Similarly, use @output
2301 rather than #output.
2302
2303 * data/c.m4 (b4_copyright): Omit file name from comment, since
2304 the file name could contain "*/".
2305 (b4_synclines_flag): Don't quote the 2nd argument; it should already
2306 be quoted. All uses changed.
2307
2308 * data/glr.c: Use new @ escapes consistently.
2309 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
2310 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
2311 Remove, since they couldn't handle arbitrary characters in file
2312 names.
2313 * data/lalr1.cc: Likewise.
2314 * data/yacc.c: Likewise.
2315
2316 * src/files.c (output_infix): Remove; all uses removed.
2317 * src/files.h: Likewise.
2318
2319 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
2320 mishandled funny characters in file names, and anyway it isn't
2321 needed any more.
2322 * data/yacc.c: Likewise.
2323 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
2324
2325 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
2326 * data/yacc.c: Likewise.
2327
2328 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
2329 strings now.
2330 (muscle_init): Quote filename as a C string.
2331 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
2332 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
2333 * src/output.c (escaped_file_name_output): New function.
2334 (prepare_symbols): Quote tokens for M4.
2335 (prepare): Don't insert output_infix, output_prefix,
2336 output_parser_name, output_header_name; this is now down by scan-skel.
2337 Insert skeleton as a C string.
2338
2339 * src/output.c (user_actions_output, symbol_destructors_output,
2340 symbol_printers_output): Quote filenames for C and M4.
2341 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2342
2343 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
2344 escapes other than \\ and \'; this simplifies the code.
2345 (<SC_STRING>): Likewise, for \\ and \".
2346 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
2347 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
2348 Use new escapes @{ and @} for [ and ].
2349
2350 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
2351 them with auto vars.
2352 Switch to new escape scheme, where @ is the escape character uniformly.
2353 Abort if a stray escape character is found. Avoid unbounded input
2354 buffer when parsing non-escaped text.
2355
2356 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
2357 __oline__, #output, $@, and @{ do not have unintended meanings.
2358
2359 2002-11-09 Paul Eggert <eggert@twinsun.com>
2360
2361 Fix the test failure due to GCC warnings described in
2362 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
2363 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
2364 evaluate to 0 if it's impossible for NINF to be in the respective
2365 table.
2366 (yygetLRActions, yyrecoverParseError): Use them.
2367
2368 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
2369 counted in the token inserted at end of file. Now takes
2370 location_t *, not location_t, so that the location can be
2371 adjusted. All uses changed.
2372
2373 * tests/regression.at (Invalid inputs): Adjust wording in
2374 diagnostic to match the new behavior.
2375
2376 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
2377 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
2378 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
2379 abort ();'. This reduces the runtime of the "Many lookaheads"
2380 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
2381 GCC 3.2.
2382
2383 2002-11-07 Paul Eggert <eggert@twinsun.com>
2384
2385 * src/parse-gram.y (CHARACTER): Remove unused token.
2386 All uses removed.
2387
2388 * src/scan-gram.l: Remove stack option. We no longer use the
2389 stack, since the stack was never deeper than 1; instead, use the
2390 new auto var c_context to record the stacked value.
2391
2392 Remove nounput option. At an unexpected end of file, we now unput
2393 the minimal input necessary to end cleanly; this simplifies the
2394 code.
2395
2396 Avoid unbounded token sizes where this is easy.
2397
2398 (unexpected_end_of_file): New function.
2399 Use it to systematize the error message on unexpected EOF.
2400 (last-string): Now auto, not static.
2401 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
2402 (scanner_last_string_free): Remove; not used.
2403 (percent_percent_count): Move decl to just before use.
2404 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
2405 not the (never otherwised-used) CHARACTER.
2406
2407 2002-11-07 Akim Demaille <akim@epita.fr>
2408
2409 Let yyerror always receive the msg as last argument, so that
2410 yyerror can be variadic.
2411
2412 * data/yacc.c (b4_yyerror_args): New.
2413 Use it when calling yyerror.
2414 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
2415 Use it when calling yyerror.
2416 * doc/bison.texinfo (Error Reporting): Adjust.
2417 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
2418 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
2419
2420 2002-11-06 Akim Demaille <akim@epita.fr>
2421
2422 #line should have quoted strings.
2423 Ideally, this should be done by m4_quotearg.
2424
2425 * src/scan-skel.l: Include quotearg.h.
2426 Quote __ofile__.
2427 * src/output.c (symbol_printers_output)
2428 (symbol_destructors_output): Quote the file name.
2429
2430 2002-11-06 Akim Demaille <akim@epita.fr>
2431
2432 * tests/regression.at (Invalid inputs): Adjust to the recent
2433 messages.
2434
2435 2002-11-06 Akim Demaille <akim@epita.fr>
2436
2437 Restore --no-lines.
2438 Reported by Jim Kent.
2439
2440 * data/c.m4 (b4_syncline): New.
2441 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
2442 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
2443 * src/output.c (user_actions_output): Likewise.
2444 (prepare): Define 'b4_synclines_flag'.
2445 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
2446
2447 2002-11-06 Akim Demaille <akim@epita.fr>
2448
2449 * src/main.c (main): Free `infile'.
2450 * src/scan-gram.l (handle_syncline): New.
2451 Recognize `#line'.
2452 * src/output.c (user_actions_output, symbol_destructors_output)
2453 (symbol_printers_output): Use the location's file name, not
2454 infile.
2455 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2456
2457 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2458
2459 * src/tables.c (matching_state): Don't allow states to match if
2460 either has GLR conflict entries.
2461
2462 2002-11-05 Paul Eggert <eggert@twinsun.com>
2463
2464 * src/scan-gram.l: Use more accurate diagnostics, e.g.
2465 "integer out of range" rather than "invalid value".
2466 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
2467 accordingly.
2468
2469 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
2470 Also, remove one static variable in the scanner.
2471
2472 * src/scan-gram.l (braces_level): Now auto, not static.
2473 Initialize to zero if the compiler is being picky.
2474 (INITIAL): Clear braces_level instead of incrementing it.
2475 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
2476 as POSIX 1003.1-2001 requires.
2477 * src/system.h (IF_LINT): New macro, taken from coreutils.
2478 * configure.ac: Define "lint" if --enable-gcc-warnings.
2479
2480 2002-11-05 Akim Demaille <akim@epita.fr>
2481
2482 * src/scan-gram.l: When it starts with `%', complain about the
2483 whole directive, not just that `invalid character: %'.
2484
2485 2002-11-04 Akim Demaille <akim@epita.fr>
2486
2487 * Makefile.maint: Update from Autoconf.
2488 (update, cvs-update, po-update, do-po-update): New.
2489
2490 2002-11-04 Akim Demaille <akim@epita.fr>
2491
2492 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
2493 and yyerror.
2494 Have yyerror `use' its arguments.
2495 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
2496 returns true when location & yacc & pure & parse-param.
2497 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
2498
2499 2002-11-04 Akim Demaille <akim@epita.fr>
2500
2501 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
2502 clashes.
2503 * src/scan-gram.l: Use [\'] instead of ['] to pacify
2504 font-lock-mode.
2505 Use complain_at.
2506 Use quote, not quote_n since LOCATION_PRINT no longer uses the
2507 slot 0.
2508
2509 2002-11-03 Paul Eggert <eggert@twinsun.com>
2510
2511 * src/reader.c (get_merge_function, grammar_current_rule_check):
2512 Use consistent diagnostics for reporting type name clashes.
2513 Quote the types with <>, for consistency with Yacc.
2514 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
2515
2516 2002-11-03 Akim Demaille <akim@epita.fr>
2517
2518 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
2519 New.
2520 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
2521 (b4_parse_param): Remove.
2522 Use b4_identification.
2523 Propagate b4_pure_args where needed to pass them to yyerror.
2524 * data/glr.m4 (b4_parse_param): Remove.
2525 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
2526 (b4_lpure_formals): New.
2527 Use b4_identification.
2528 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
2529 b4_user_formals and b4_user_args.
2530 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
2531 (yyreportAmbiguity): When using a pure parser, also need
2532 the location, and the parse-params.
2533 Adjust callers.
2534 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
2535 When using a pure parser, also need the parse-params.
2536 Adjust callers.
2537 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
2538 (%pure-parser + %parse-param) LALR and GLR parsers.
2539 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
2540 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
2541 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
2542 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
2543 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
2544 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
2545 * doc/bison.texinfo: Untabify the whole file.
2546 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
2547 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
2548 (Error Reporting): Adjust to these new directives.
2549 Document %error-verbose, deprecate YYERROR_VERBOSE.
2550
2551 2002-11-03 Akim Demaille <akim@epita.fr>
2552
2553 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
2554 AT_CHECK_CALC_GLR invocations to use % directives, instead of
2555 command line options.
2556 * tests/cxx-type.at: Formatting changes.
2557
2558 2002-11-03 Paul Eggert <eggert@twinsun.com>
2559
2560 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
2561 to count columns correctly, and to check for invalid inputs.
2562
2563 Use mbsnwidth to count columns correctly. Account for tabs, too.
2564 Include mbswidth.h.
2565 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
2566 (extend_location): New function.
2567 (YY_LINES): Remove.
2568
2569 Handle CRLF in C code rather than in Lex code.
2570 (YY_INPUT): New macro.
2571 (no_cr_read): New function.
2572
2573 Scan UCNs, even though we don't fully handle them yet.
2574 (convert_ucn_to_byte): New function.
2575
2576 Handle backslash-newline correctly in C code.
2577 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
2578 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
2579 all uses changed.
2580 (tag, splice): New EREs. Do not allow NUL or newline in tags.
2581 Use {splice} wherever C allows backslash-newline.
2582 YY_STEP after space, newline, vertical-tab.
2583 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
2584
2585 (letter, id): Don't assume ASCII; e.g., spell out a-z.
2586
2587 ({int}, handle_action_dollar, handle_action_at): Check for integer
2588 overflow.
2589
2590 (YY_STEP): Omit trailing semicolon, so that it's more like C.
2591
2592 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
2593 as well as \000. Check for UCHAR_MAX, not 255.
2594 Allow \x with an arbitrary positive number of digits, as in C.
2595 Check for overflow here.
2596 Allow \? and UCNs, for compatibility with C.
2597
2598 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
2599 with quote slot used by complain_at.
2600
2601 * tests/input.at: Add tests for backslash-newline, m4 quotes
2602 in symbols, long literals, and funny escapes in strings.
2603
2604 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
2605 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
2606 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
2607 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
2608 * m4/mbswidth.m4: New file, from GNU coreutils.
2609
2610 * doc/bison.texinfo (Grammar Outline): Document // comments.
2611 (Symbols): Document that trigraphs have no special meaning in Bison,
2612 nor is backslash-newline allowed.
2613 (Actions): Document that trigraphs have no special meaning.
2614
2615 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
2616 no longer used.
2617
2618 2002-11-02 Paul Eggert <eggert@twinsun.com>
2619
2620 * src/reader.c: Don't include quote.h; not needed.
2621 (get_merge_function): Reword warning to be consistent with
2622 type clash diagnostic in grammar_current_rule_check.
2623
2624 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
2625 bug in trigraph handling.
2626
2627 * src/output.c (prepare_symbols): When printing token names,
2628 escape "[" as "@<:@" and likewise for "]".
2629
2630 * src/system.h (errno): Remove declaration, as we are now
2631 assuming C89 or better, and C89 guarantees errno.
2632
2633 2002-10-30 Paul Eggert <eggert@twinsun.com>
2634
2635 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
2636 Check for close failures.
2637 * src/files.h (xfclose): Return void, not int, since it always
2638 returned zero.
2639 * src/files.c (xfclose): Likewise. Report I/O error if ferror
2640 indicates one.
2641 * src/output.c (output_skeleton): Use xfclose rather than fclose
2642 and ferror. xfclose now checks ferror.
2643
2644 * data/glr.c (YYLEFTMOST_STATE): Remove.
2645 (yyreportTree): Use a stack-based leftmost state. This avoids
2646 our continuing battles with bogus warnings about initializers.
2647
2648 2002-10-30 Akim Demaille <akim@epita.fr>
2649
2650 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
2651 #if.
2652
2653 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2654
2655 * tests/glr-regr1.at: New test for reported regressions.
2656 * tests/testsuite.at: Add glr-regr1.at test.
2657 * tests/Makefile.am: Add glr-regr1.at test.
2658
2659 2002-10-24 Paul Eggert <eggert@twinsun.com>
2660
2661 Version 1.75a.
2662
2663 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
2664 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
2665 we use malloc. Don't assume 'A' through 'Z' are contiguous.
2666 Don't assume strdup exists; POSIX says its an XSI extension.
2667 Check for buffer overflow on input.
2668
2669 2002-10-24 Akim Demaille <akim@epita.fr>
2670
2671 * src/output.c (output_skeleton): Don't disable M4sugar comments
2672 too soon: it results in comments being expanded.
2673 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
2674 first output.
2675
2676 2002-10-24 Akim Demaille <akim@epita.fr>
2677
2678 * data/yacc.c (m4_int_type): New.
2679 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
2680 char' as only yacc.c wants K&R portability.
2681 * data/glr.c (yysigned_char): Remove.
2682 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
2683 Reported by Quoc Peyrot.
2684
2685 2002-10-23 Paul Eggert <eggert@twinsun.com>
2686
2687 * src/main.c (main): With --trace=time, report times even if a
2688 non-fatal error occurs. Formerly, the times were reported in some
2689 such cases but not in others.
2690 * src/reader.c (reader): Just return if a complaint has been issued,
2691 instead of exiting, so that 'main' can report times.
2692
2693 2002-10-22 Akim Demaille <akim@epita.fr>
2694
2695 * src/system.h: Include sys/types.
2696 Reported by Bert Deknuydt.
2697
2698 2002-10-23 Paul Eggert <eggert@twinsun.com>
2699
2700 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
2701 Suggested by Art Haas.
2702
2703 2002-10-22 Paul Eggert <eggert@twinsun.com>
2704
2705 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
2706 decl; not needed any more.
2707 * src/main.c (main): Use return to exit, undoing yesterday's change.
2708 The last OS that we could find where this wouldn't work is
2709 SunOS 3.5, and that's too old to worry about now.
2710
2711 * data/glr.c (struct yyltype): Define members even when not
2712 doing locations. This is more consistent with yacc.c, and it
2713 works around the following bug reports:
2714 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
2715 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
2716
2717 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
2718 @acronym consistently. Standardize on "Yacc" instead of "YACC",
2719 "Algol" instead of "ALGOL". Give a bit more history about BNF.
2720
2721 2002-10-22 Akim Demaille <akim@epita.fr>
2722
2723 * data/README: New.
2724
2725 2002-10-21 Paul Eggert <eggert@twinsun.com>
2726
2727 Be consistent about 'bool'; the old code used an enum in one
2728 module and an int in another, and this violates the C standard.
2729 * m4/stdbool.m4: New file, from coreutils 4.5.3.
2730 * configure.ac (AC_HEADER_STDBOOL): Add.
2731 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
2732 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
2733 * src/symtab.c (hash_compare_symbol_t): Likewise.
2734 * src/system.h (bool, false, true): Use a definition consistent
2735 with ../lib/hash.c. All uses changed.
2736
2737 * src/complain.c (warning_issued): Renamed from warn_message_count,
2738 so that we needn't worry about integer overflow (!).
2739 Now of type bool. All uses changed.
2740 (complaint_issued): Renamed from complain_message_count; likewise.
2741
2742 * src/main.c (main): Use exit to exit with failure.
2743
2744 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
2745 rather than 1 and 0.
2746 * src/main.c (main): Likewise.
2747 * src/getargs.c (getargs): Likewise.
2748 * src/reader.c (reader): Likewise.
2749
2750 * src/getarg.c (getargs): Remove duplicate code for
2751 "Try `bison --help'".
2752
2753 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
2754 What was that "2" for?
2755
2756 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2757 * src/getargs.c (usage): Likewise.
2758
2759 * src/getargs.c (getargs): When there are too few operands, report
2760 the last one. When there are too many, report the first extra
2761 one. This is how diffutils does it.
2762
2763 2002-10-20 Paul Eggert <eggert@twinsun.com>
2764
2765 Remove K&R vestiges.
2766 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2767 * src/complain.c (VA_START): Remove. Assume prototypes.
2768 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2769 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2770 fatal): Assume prototypes.
2771 * src/complain.h: Assume prototypes.
2772 * src/system.h (PARAMS): Remove.
2773 Include <limits.h> unconditionally, since it's guaranteeed even
2774 for a freestanding C89 compiler.
2775 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2776 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
2777
2778 2002-10-20 Akim Demaille <akim@epita.fr>
2779
2780 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2781 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2782 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2783 (yyresolveStates, yyresolveAction, yyresolveStack)
2784 (yyprocessOneStack): Use them.
2785 (yy_reduce_print): New.
2786 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2787
2788 2002-10-20 Akim Demaille <akim@epita.fr>
2789
2790 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2791 arguments and output `void'.
2792 (b4_c_function): Rename as...
2793 (b4_c_function_def): this.
2794 (b4_c_function_decl, b4_c_ansi_function_def)
2795 (b4_c_ansi_function_decl): New.
2796 Change the interpretation of the arguments: before `int, foo', now
2797 `int foo, foo'.
2798 * data/yacc.c (yyparse): Prototype and define thanks to these.
2799 Adjust b4_c_function_def uses.
2800 * data/glr.c (yyparse): Likewise, but ANSI only.
2801
2802 2002-10-20 Akim Demaille <akim@epita.fr>
2803
2804 * src/output.c (prepare): Move the definition of `tokens_number',
2805 `nterms_number', `undef_token_number', `user_token_number_max'
2806 to...
2807 (prepare_tokens): Here.
2808 (prepare_tokens): Rename as...
2809 (prepare_symbols): this.
2810 (prepare): Move the definition of `rules_number' to...
2811 (prepare_rules): here.
2812 (prepare): Move the definition of `last', `final_state_number',
2813 `states_number' to...
2814 (prepare_states): here.
2815 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2816
2817 2002-10-20 Akim Demaille <akim@epita.fr>
2818
2819 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2820
2821 2002-10-20 Akim Demaille <akim@epita.fr>
2822
2823 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2824 * data/c.m4: here.
2825
2826 2002-10-20 Akim Demaille <akim@epita.fr>
2827
2828 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2829 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2830 `pair'.
2831 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2832 `name' to...
2833 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2834 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2835 These.
2836
2837 2002-10-19 Paul Eggert <eggert@twinsun.com>
2838
2839 Do not create a temporary file, as that involves security and
2840 cleanup headaches. Instead, use a pair of pipes.
2841 Derived from a suggestion by Florian Krohm.
2842 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2843 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2844 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2845 (BISON_PREREQ_SUBPIPE): Add.
2846 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2847 Add subpipe.h, subpipe.c.
2848 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2849 * po/POTFILES.in: Add lib/subpipe.c.
2850 * src/output.c: Include "subpipe.h".
2851 (m4_invoke): Remove decl.
2852 (scan_skel): New decl.
2853 (output_skeleton): Use pipe rather than temporary file for m4 input.
2854 Check that m4sugar.m4 is readable, to avoid deadlock.
2855 Check for pipe I/O error.
2856 * src/scan-skel.l (readpipe): Remove decl.
2857 (scan_skel): New function, to be used in place of m4_invoke.
2858 Read from stream rather than file.
2859
2860 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2861 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2862 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2863 this generates a more-accurate value anyway.
2864
2865 * lib/timevar.c (timervar_accumulate): Rename locals to
2866 avoid confusion with similarly-named more-global.
2867 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2868
2869 * src/output.c (prepare): Use xstrdup to convert char const *
2870 to char *, to avoid GCC warning.
2871
2872 2002-10-19 Akim Demaille <akim@epita.fr>
2873
2874 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2875 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2876 Use them to have `calc.y' ready for %pure-parser.
2877 * data/yacc.c (YYLEX): Pass a yylex return type to
2878 b4_c_function_call.
2879
2880 2002-10-19 Akim Demaille <akim@epita.fr>
2881
2882 Prototype support of %lex-param and %parse-param.
2883
2884 * src/parse-gram.y: Add the definition of the %lex-param and
2885 %parse-param tokens, plus their rules.
2886 Drop the `_' version of %glr-parser.
2887 Add the "," token.
2888 * src/scan-gram.l (INITIAL): Scan them.
2889 * src/muscle_tab.c: Comment changes.
2890 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2891 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2892 (muscle_entry_s): The `value' member is no longer const.
2893 Adjust all dependencies.
2894 * src/muscle_tab.c (muscle_init): Adjust: use
2895 MUSCLE_INSERT_STRING.
2896 Initialize the obstack earlier.
2897 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2898 (muscle_pair_list_grow): New.
2899 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2900 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2901 * tests/calc.at: Use %locations, not --locations.
2902 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2903
2904 2002-10-19 Akim Demaille <akim@epita.fr>
2905
2906 * src/getargs.c (usage): Take status as argument and exit
2907 accordingly.
2908 Report the traditional `Try ... --help' message when status != 0.
2909 (usage, version): Don't take a FILE * as arg, it is pointless.
2910 (getargs): When there is an incorrect number of arguments, make it
2911 an error, and report it GNUlically thanks to `usage ()'.
2912
2913 2002-10-18 Paul Eggert <eggert@twinsun.com>
2914
2915 * data/glr.c (yyreportParseError): Don't assume that sprintf
2916 yields the length of the printed string, as this is not true
2917 on SunOS 4.1.4. Reported by Peter Klein.
2918
2919 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2920 * tests/conflicts.at (%nonassoc and eof): Likewise.
2921 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2922
2923 2002-10-17 Akim Demaille <akim@epita.fr>
2924
2925 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2926 * src/getargs.c (trace_types, trace_args): Adjust.
2927 * src/reader.c (grammar_current_rule_prec_set)
2928 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2929 Standardize error messages.
2930 And s/@prec/%prec/!
2931 (reader): Use trace_flag to enable scanner/parser debugging,
2932 instead of an adhoc scheme.
2933 * src/scan-gram.l: Remove trailing debugging code.
2934
2935 2002-10-16 Paul Eggert <eggert@twinsun.com>
2936
2937 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2938 MUSCLE_TAB_H.
2939
2940 * NEWS: Officially drop support for building Bison with K&R C,
2941 since it didn't work anyway and it's not worth worrying about.
2942 * Makefile.maint (wget_files): Remove ansi2knr.c.
2943 (ansi2knr.c-url_prefix): Remove.
2944 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2945 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2946 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2947
2948 2002-10-15 Paul Eggert <eggert@twinsun.com>
2949
2950 Stop using the "enum_" trick for K&R-style function definitions;
2951 it confused me, and I was the author! Instead, assume that people
2952 who want to use K&R C compilers (when using these modules in GCC,
2953 perhaps?) will run ansi2knr.
2954
2955 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2956 All uses of "enum_" changed to "enum ".
2957 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2958 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2959
2960 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2961 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2962 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2963 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2964 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2965 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2966 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2967 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2968 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2969 Use function prototypes; this removes the need for declaring
2970 static functions simply to provide their prototypes.
2971 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2972 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2973 bitset_count_, bitset_create, bitset_dump, bitset_first,
2974 bitset_free, bitset_init, bitset_last, bitset_next,
2975 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2976 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2977 bitset_print, bitset_release_memory, bitset_toggle_,
2978 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2979 debug_bitset): Likewise.
2980 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2981 * lib/bitset_stats.c (bitset_log_histogram_print,
2982 bitset_percent_histogram_print, bitset_stats_and,
2983 bitset_stats_and_cmp, bitset_stats_and_or,
2984 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2985 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2986 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2987 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2988 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2989 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2990 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2991 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2992 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2993 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2994 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2995 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2996 bitset_stats_zero): Likewise.
2997 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2998 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2999 bitsetv_dump, debug_bitsetv): Likewise.
3000 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
3001 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
3002 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
3003 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
3004 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
3005 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
3006 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
3007 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
3008 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
3009 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
3010 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
3011 Likewise.
3012 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
3013 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
3014 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
3015 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
3016 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
3017 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
3018 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
3019 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
3020 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
3021 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
3022 lbitset_xor_cmp, lbitset_zero): Likewise.
3023
3024 2002-10-14 Akim Demaille <akim@epita.fr>
3025
3026 Version 1.75.
3027
3028 2002-10-14 Akim Demaille <akim@epita.fr>
3029
3030 * tests/Makefile.am (maintainer-check-posix): New.
3031
3032 2002-10-14 Akim Demaille <akim@epita.fr>
3033
3034 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
3035 member.
3036
3037 2002-10-14 Akim Demaille <akim@epita.fr>
3038
3039 * src/tables.c (table_ninf_remap): base -> tab.
3040 Reported by Matt Rosing.
3041
3042 2002-10-14 Paul Eggert <eggert@twinsun.com>
3043
3044 * tests/action.at, tests/calc.at, tests/conflicts.at,
3045 tests/cxx-type.at, tests/headers.at, tests/input.at,
3046 tests/regression.at, tests/synclines.at, tests/torture.at:
3047 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
3048 so that the tests still work even if POSIXLY_CORRECT is set.
3049 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
3050
3051 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
3052 for portability to K&R hosts. Fix typo: signed char is guaranteed
3053 only to 127, not to 128.
3054 * data/glr.c (yysigned_char): New type.
3055 * data/yacc.c (yysigned_char): Likewise.
3056 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
3057
3058 2002-10-13 Paul Eggert <eggert@twinsun.com>
3059
3060 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
3061 true due to limited range of data type" warning from GCC.
3062
3063 * data/c.m4 (b4_token_defines): Protect against double-inclusion
3064 by wrapping enum yytokentype's definition inside #ifndef
3065 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
3066
3067 2002-10-13 Akim Demaille <akim@epita.fr>
3068
3069 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
3070 Un yy- yyrhs to avoid the name clash with the global YYRHS.
3071
3072 2002-10-13 Akim Demaille <akim@epita.fr>
3073
3074 * Makefile.maint: Update from Autoconf 2.54.
3075 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
3076
3077 2002-10-13 Akim Demaille <akim@epita.fr>
3078
3079 * src/print.c (print_state): Separate the list of solved conflicts
3080 from the other items.
3081 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
3082
3083 2002-10-13 Akim Demaille <akim@epita.fr>
3084
3085 Let nondeterministic skeletons be usable with deterministic
3086 tables.
3087
3088 With the patch, GAWK compiled by GCC without -O2 passes its test
3089 suite using a GLR parser driven by LALR tables. It fails with -O2
3090 because `struct stat' gives two different answers on my machine:
3091 88 (definition of an auto var) and later 96 (memset on this var).
3092 Hence the stack is badly corrumpted. The headers inclusion is to
3093 blame: if I move the awk.h inclusion before GLR's system header
3094 inclusion, the two struct stat have the same size.
3095
3096 * src/tables.c (pack_table): Always create conflict_table.
3097 (token_actions): Always create conflict_list.
3098 * data/glr.c (YYFLAG): Remove, unused.
3099
3100 2002-10-13 Akim Demaille <akim@epita.fr>
3101
3102 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
3103 (O0FLAGS): New.
3104 (VALGRIND, GXX): New.
3105 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
3106 * tests/bison.in: Run $PREBISON a pre-command.
3107 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
3108 (maintainer-check-g++): New.
3109 * Makefile.am (maintainer-check): New.
3110
3111 2002-10-13 Akim Demaille <akim@epita.fr>
3112
3113 * data/glr.c: Formatting changes.
3114 Tweak some trace messages to match yacc.c's.
3115
3116 2002-10-13 Akim Demaille <akim@epita.fr>
3117
3118 GLR parsers sometimes raise parse errors instead of performing the
3119 default reduction.
3120 Reported by Charles-Henry de Boysson.
3121
3122 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
3123 check the length of the traces when %glr.
3124 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
3125 GLR's traces.
3126 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
3127 Test GLR parsers.
3128 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
3129 (yyltype): Remove the yy prefix from the member names.
3130 (yytable): Complete its comment.
3131 (yygetLRActions): Map error action number from YYTABLE from
3132 YYTABLE_NINF to 0.
3133 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
3134 (which was a bug: it should have been YYTABEL_NINF, and yet it was
3135 not satisfying as we could compare an YYACTION computed from
3136 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
3137 only value for error actions.
3138 (yyreportParseError): In verbose parse error messages, don't issue
3139 `error' in the list of expected tokens.
3140 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
3141 next action to perform to match glr.c's decoding.
3142 (yytable): Complete its comment.
3143
3144 2002-10-13 Paul Eggert <eggert@twinsun.com>
3145
3146 Fix problem reported by Henrik Grubbstroem in
3147 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
3148 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
3149 because the Bison parser reads the second action before reducing
3150 the first one.
3151 * src/scan-gram.l (rule_length): New static var.
3152 Use it to keep track of the rule length in the scanner, since
3153 we can't expect the parser to be in lock-step sync with the scanner.
3154 (handle_action_dollar, handle_action_at): Use this var.
3155 * tests/actions.at (Exotic Dollars): Test for the problem.
3156
3157 2002-10-12 Paul Eggert <eggert@twinsun.com>
3158
3159 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
3160 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
3161 Include <sys/time.h> when checking for clock_t and struct tms.
3162 Use same include order as source.
3163 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
3164 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
3165
3166 * lib/timevar.c: Update copyright date and clarify comments.
3167 (get_time) [IN_GCC]: Keep the GCC version for reference.
3168
3169 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
3170 GCC version as of today, then merge Bison's changes.
3171 Change "GCC" to "Bison" in copyright notice. timevar.def's
3172 author is Akim, so change that too.
3173
3174 * src/reader.c (grammar_current_rule_check):
3175 Don't worry about the default action if $$ is untyped.
3176 Prevents bogus warnings reported by Jim Gifford in
3177 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
3178
3179 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
3180 * data/glr.c, data/lalr1.cc, data/yacc.c:
3181 Output token definitions before the first part of user declarations.
3182 Fixes compatibility problem reported by Jim Gifford for kbd in
3183 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
3184
3185 2002-10-11 Paul Eggert <eggert@twinsun.com>
3186
3187 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
3188 (yyparse): here. This undoes some of the 2002-07-25 change.
3189 Compatibility problem reported by Ralf S. Engelschall with
3190 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
3191
3192 2002-10-11 Akim Demaille <akim@epita.fr>
3193
3194 * tests/regression.at Characters Escapes): New.
3195 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
3196 characters.
3197 Reported by Jan Nieuwenhuizen.
3198
3199 2002-10-11 Akim Demaille <akim@epita.fr>
3200
3201 * po/id.po: New.
3202
3203 2002-10-10 Paul Eggert <eggert@twinsun.com>
3204
3205 Portability fixes for bitsets; this also avoids several GCC
3206 warnings.
3207
3208 * lib/abitset.c: Include <stddef.h>, for offsetof.
3209 * lib/lbitset.c: Likewise.
3210
3211 * lib/abitset.c (abitset_bytes): Return a size that is aligned
3212 properly for vectors of objects. Do not assume that adding a
3213 header size to a multiple of a word size yields a value that is
3214 properly aligned for the whole union.
3215 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3216
3217 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3218 unique names for structures.
3219 * lib/ebitset.c (ebitset_bytes): Likewise.
3220 * lib/lbitset.c (lbitset_bytes): Likewise.
3221
3222 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3223 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3224 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3225 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3226 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3227 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3228 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3229 to improve the type-checking that GCC can do.
3230 * lib/bitset.c (bitset_op4_cmp): Likewise.
3231 * lib/bitset_stats.c (bitset_stats_count,
3232 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3233 bitset_stats_copy, bitset_stats_disjoint_p,
3234 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3235 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3236 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3237 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3238 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3239 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3240 bitset_stats_or_and_cmp): Likewise.
3241 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3242 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3243 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3244 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3245
3246 * lib/abitset.h: Include bitset.h, not bbitset.h.
3247 * lib/ebitset.h: Likewise.
3248 * lib/lbitset.h: Likewise.
3249
3250 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3251 All instances of parameters of type enum bitset_opts are now of
3252 type enum_bitset_opts, to conform to the C Standard, and similarly
3253 for enum_bitset_type.
3254 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3255 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3256
3257 Do not use "struct bitset_struct" to mean different things in
3258 different modules. Not only is this confusing, it violates
3259 the C Standard, which requires that structure types in different
3260 modules must be compatible if one is to be passed to the other.
3261 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3262 All instances of "struct bitset_struct *" replaced with "bitset".
3263 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3264 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3265 struct lbitset_struct, struct bitset_stats_struct): New types.
3266 All uses of struct bitset_struct changed to union bitset_union,
3267 etc.
3268 * lib/abitset.c (struct abitset_struct, abitset,
3269 struct bitset_struct): Remove.
3270 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3271 struct bitset_struct): Remove.
3272 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3273 bitset_struct): Remove.
3274 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3275 Likewise.
3276
3277 Do not call a function of type T using a call that assumes the
3278 function is of a different type U. Standard C requires that a
3279 function must be called with a type that is compatible with its
3280 definition.
3281 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3282 New decls.
3283 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3284 New functions.
3285 * lib/ebitset.c (PFV): Remove.
3286 * lib/lbitset.c (PFV): Likewise.
3287 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3288 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3289 decls.
3290 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3291 (ebitset_vtable): Use them.
3292 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3293 lbitset_xor): New functions.
3294 (lbitset_vtable): Use them.
3295
3296 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3297 Declare.
3298
3299 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3300 GCC warning.
3301 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
3302 Use offsetof, for simplicity.
3303
3304 2002-10-06 Paul Eggert <eggert@twinsun.com>
3305
3306 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
3307 the same width as int. This reapplies a hunk of the 2002-08-12 patch
3308 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
3309 which was inadvertently undone by the 2002-09-30 patch.
3310 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
3311 the same width as int.
3312
3313 2002-10-04 Paul Eggert <eggert@twinsun.com>
3314
3315 Version 1.50.
3316
3317 * configure.ac (AC_INIT), NEWS: Increment version number.
3318
3319 * doc/bison.texinfo: Minor spelling, grammar, and white space
3320 fixes.
3321 (Symbols): Mention that any negative value returned from yylex
3322 signifies end-of-input. Warn about negative chars. Mention
3323 the portable Standard C character set.
3324
3325 The GNU coding standard says CFLAGS and YFLAGS are reserved
3326 for the installer to set.
3327 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
3328 * src/Makefile.am (AM_CFLAGS): Likewise.
3329 (AM_YFLAGS): Renamed from YFLAGS.
3330
3331 Fix some MAX and MIN problems.
3332 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
3333 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
3334 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
3335 * src/reader.c (reader): Use it.
3336
3337 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
3338 POSIX 1003.1-2001 has removed fgrep.
3339
3340 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3341
3342 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
3343 interpreted as signed.
3344 * lib/ebitset.c (ebitset_list): Fix bug.
3345
3346 2002-10-01 Paul Eggert <eggert@twinsun.com>
3347
3348 More fixes for 64-bit hosts and large bitsets.
3349
3350 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
3351 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
3352 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
3353 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
3354 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
3355 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
3356 bitset_count_): Likewise.
3357 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
3358 bitset_first, bitset_last): Likewise.
3359 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
3360 bitset_stats_list_reverse, bitset_stats_size,
3361 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
3362 Likewise.
3363 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3364 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3365 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3366 bitsetv_reflexive_transitive_closure): Likewise.
3367 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
3368 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
3369 Likewise.
3370 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
3371 Likewise.
3372
3373 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
3374 Use size_t, not unsigned int, to count bytes.
3375 * lib/abitset.h (abitset_bytes): Likewise.
3376 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
3377 Likewise.
3378 * lib/bitset.h (bitset_bytes): Likewise.
3379 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
3380 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
3381 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3382 * lib/ebitset.c (ebitset_bytes): Likewise.
3383 * lib/ebitset.h (ebitset_bytes): Likewise.
3384 * lib/lbitset.c (lbitset_bytes): Likewise.
3385 * lib/lbitset.h (lbitset_bytes): Likewise.
3386
3387 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
3388 abitset_subset_p, abitset_disjoint_p, abitset_and,
3389 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
3390 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
3391 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
3392 abitset_or_and, abitset_or_and_cmp):
3393 Use bitset_windex instead of unsigned int.
3394 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3395 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
3396 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
3397 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
3398 Likewise.
3399 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
3400
3401 * lib/bitset.c (bitset_print):
3402 Use proper printf formats for widths of integer types.
3403 * lib/bitset_stats.c (bitset_percent_histogram_print,
3404 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
3405 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3406 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3407 * lib/lbitset.c (lbitset_bytes): Likewise.
3408
3409 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
3410 BITSET_SIZE_MAX): New macros.
3411 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
3412 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
3413 to BITSET_WINDEX_MAX.
3414
3415 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
3416 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
3417 since we now return the bitset_bindex type (not int).
3418
3419 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
3420 when computing sizes.
3421 * lib/ebitset.c (ebitset_elts_grow): Likewise.
3422
3423 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
3424 and avoid cast to unsigned.
3425
3426 2002-09-30 Akim Demaille <akim@epita.fr>
3427
3428 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3429 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
3430 Updates from Michael Hayes.
3431
3432 2002-09-30 Art Haas <ahaas@neosoft.com>
3433
3434 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
3435 invocations.
3436 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
3437 defined.
3438
3439 2002-09-27 Akim Demaille <akim@epita.fr>
3440
3441 Version 1.49c.
3442
3443 2002-09-27 Akim Demaille <akim@epita.fr>
3444
3445 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
3446 (Because of AC_LIBSOURCE).
3447
3448 2002-09-27 Akim Demaille <akim@epita.fr>
3449
3450 Playing with Autoscan.
3451
3452 * configure.ac: Remove the old LIBOBJ tweaks.
3453 (AC_REPLACE_FUNCS): Add strrchr and strtol.
3454 * lib/strrchr.c: New.
3455 * lib/strtol.c: New, from the Coreutils 4.5.1.
3456
3457 2002-09-27 Akim Demaille <akim@epita.fr>
3458
3459 Playing with Autoscan.
3460
3461 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
3462 * lib/Makefile.am (libbison_a_SOURCES): No longer include
3463 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
3464 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
3465 Coreutils 4.5.1.
3466
3467 2002-09-24 Akim Demaille <akim@epita.fr>
3468
3469 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
3470 (Frequently Asked Questions, Parser Stack Overflow): New.
3471
3472 2002-09-13 Akim Demaille <akim@epita.fr>
3473
3474 Playing with autoscan.
3475
3476 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
3477 * src/files.c (skeleton_find): Remove, unused.
3478 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
3479 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
3480
3481 2002-09-13 Akim Demaille <akim@epita.fr>
3482
3483 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
3484 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
3485
3486 2002-09-13 Akim Demaille <akim@epita.fr>
3487
3488 * configure.ac: Require 2.54.
3489 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
3490 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
3491 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
3492 Remove, provided by Autoconf macros.
3493
3494 2002-09-12 Akim Demaille <akim@epita.fr>
3495
3496 * m4/prereq.m4: Update, from Coreutils 4.5.1.
3497
3498 2002-09-12 Akim Demaille <akim@epita.fr>
3499
3500 * m4/prereq.m4: Update, from Fileutils 4.1.5.
3501 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
3502 Reported by Martin Mokrejs.
3503
3504 2002-09-10 Akim Demaille <akim@epita.fr>
3505
3506 * src/parse-gram.y: Associate a human readable string to each
3507 token type.
3508 * tests/regression.at (Invalid inputs): Adjust.
3509
3510 2002-09-10 Gary V. Vaughan <gary@gnu.org>
3511
3512 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
3513 with an Autoconf-2.5x style configure.ac.
3514
3515 2002-09-06 Paul Eggert <eggert@twinsun.com>
3516
3517 * doc/bison.texinfo (Conditions): Make explicit that the GPL
3518 exception applies only to yacc.c. This is a modification of a
3519 patch originally suggested by Akim Demaille.
3520
3521 2002-09-06 Akim Demaille <akim@epita.fr>
3522
3523 * data/c.m4 (b4_copyright): Move the GPL exception comment from
3524 here to...
3525 * data/yacc.c: here.
3526
3527 * data/lalr1.cc (struct yyltype): Don't define it, since we use
3528 LocationType.
3529 (b4_ltype): Default to yy::Location from location.hh.
3530
3531 2002-09-04 Jim Meyering <jim@meyering.net>
3532
3533 * data/yacc.c: Guard the declaration of yytoknum also with
3534 `#ifdef YYPRINT', so it is declared only when used.
3535
3536 2002-09-04 Akim Demaille <akim@epita.fr>
3537
3538 * configure.in: Rename as...
3539 * configure.ac: this.
3540 Bump to 1.49c.
3541
3542 2002-09-04 Akim Demaille <akim@epita.fr>
3543
3544 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
3545 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
3546 translate maintainer only messages.
3547
3548 2002-08-12 Paul Eggert <eggert@twinsun.com>
3549
3550 Version 1.49b.
3551
3552 * Makefile.am (SUBDIRS): Remove intl.
3553 (DISTCLEANFILES): Remove.
3554 * NEWS: Mention that GNU M4 is now required. Clarify what is
3555 meant by "larger grammars". Mention the pt_BR translation.
3556 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
3557 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
3558 Bump version from 0.11.2 to 0.11.5.
3559 (BISON_PREREQ_STAGE): Remove.
3560 (AM_GNU_GETTEXT): Use external gettext.
3561 (AC_OUTPUT): Remove intl/Makefile.
3562
3563 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
3564
3565 * data/glr.c: Include string.h, for strlen.
3566 (yyreportParseError): Use size_t for yysize.
3567 (yy_yypstack): No longer nested inside yypstates, as nested
3568 functions are not portable. Do not assume size_t is the
3569 same width as int.
3570 (yypstates): Do not assume that ptrdiff_t is the same width
3571 as int, and similarly for yyposn and YYINDEX.
3572
3573 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
3574
3575 * lib/Makefile.am (INCLUDES): Do not include from the intl
3576 directory, which has been removed.
3577 * src/Makefile.am (INCLUDES): Likewise.
3578
3579 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
3580 (bitsets_sources, additional_bitsets_sources, timevars_sources):
3581 New vars.
3582
3583 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
3584 * tests/Makefile.am (EXTRA_DIST): Likewise.
3585
3586 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
3587 Do not assume that bitset_windex is the same width as unsigned.
3588
3589 * lib/abitset.c (abitset_unused_clear): Do not assume that
3590 bitset_word is the same width as int.
3591 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
3592 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
3593 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
3594 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
3595 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
3596
3597 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
3598 portability to one's complement hosts!).
3599 * lib/ebitset.c (ebitset_op1): Likewise.
3600 * lib/lbitset.c (lbitset_op1): Likewise.
3601
3602 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
3603 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3604 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
3605 Sync with fileutils.
3606 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
3607 lib/gettext.h: Sync with diffutils.
3608
3609 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
3610 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
3611
3612 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
3613 PROTOTYPES to check for prototypes, and "defined __STDC__" to
3614 check for void *.
3615
3616 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
3617 size_t; the old version tried to do this but casted improperly.
3618 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
3619 (bitset_test): Now returns int, not unsigned long.
3620
3621 * lib/bitset_stats.c: Include "gettext.h".
3622 (_): New macro.
3623 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
3624 name locals "index", as it generates unnecessary warnings on some
3625 hosts that have an "index" function.
3626
3627 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
3628 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
3629 they need translation.
3630 * src/LR0.c (state_list_append, new_itemsets, get_state,
3631 append_states, generate_states): Likewise.
3632 * src/assoc.c (assoc_to_string): Likewise.
3633 * src/closure.c (print_closure, set_firsts, closure): Likewise.
3634 * src/gram.c (grammar_dump): Likewise.
3635 * src/injections.c (injections_compute): Likewise.
3636 * src/lalr.c (lookaheads_print): Likewise.
3637 * src/relation.c (relation_transpose): Likewise.
3638 * src/scan-gram.l: Likewise.
3639 * src/tables.c (table_grow, pack_vector): Likewise.
3640
3641 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
3642 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
3643 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
3644 * m4/mbstate_t.m4: Sync with fileutils.
3645 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
3646
3647 * po/LINGUAS: Add pt_BR.
3648 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
3649 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
3650 lib/timevar.c.
3651 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
3652 manual recommends.
3653 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
3654
3655 * src/complain.c (strerror_r): Remove decl; not needed.
3656 (strerror): Use same pattern as ../lib/error.c.
3657
3658 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
3659
3660 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
3661
3662 * src/main.c (main): Cast result of bindtextdomain and textdomain
3663 to void, to avoid a GCC warning when --disable-nls is in effect.
3664
3665 * src/scan-gram.l: Use strings rather than escapes when possible,
3666 to minimize the number of warnings from xgettext.
3667 (handle_action_dollar, handle_action_at): Don't use isdigit,
3668 as it mishandles negative chars and it may not work as expected
3669 outside the C locale.
3670
3671 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
3672 this is a GCC extension and is not portable to other compilers.
3673
3674 * src/system.h (alloca): Use same pattern as ../lib/error.c.
3675 Do not include <ctype.h>; no longer needed.
3676 Do not include <malloc.h>; no longer needed (and generates
3677 warnings on OpenBSD 3.0).
3678
3679 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
3680 it's not portable.
3681
3682 * tests/regression.at: Do not use 'cc -c input.c -o input';
3683 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
3684
3685 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
3686 exit status as failure, not just exit status 1. Sun C exits
3687 with status 2 sometimes.
3688
3689 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
3690 Use it for the two large tests.
3691
3692 2002-08-02 Akim Demaille <akim@epita.fr>
3693
3694 * src/conflicts.c (conflicts_output): Don't output rules never
3695 reduced here, since anyway that computation doesn't work.
3696 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
3697 (rule_useless_p, rule_never_reduced_p): New.
3698 (grammar_rules_partial_print): Use a filter instead of a range.
3699 Display the title only if needed.
3700 (grammar_rules_print): Adjust.
3701 (grammar_rules_never_reduced_report): New.
3702 * src/tables.c (action_row): Move the computation of rules never
3703 reduced to...
3704 (token_actions): here.
3705 * src/main.c (main): Make the parser before making the report, so
3706 that rules never reduced are computed.
3707 Call grammar_rules_never_reduced_report.
3708 * src/print.c (print_results): Report rules never reduced.
3709 * tests/conflicts.at, tests/reduce.at: Adjust.
3710
3711 2002-08-01 Akim Demaille <akim@epita.fr>
3712
3713 Instead of attaching lookaheads and duplicating the rules being
3714 reduced by a state, attach the lookaheads to the reductions.
3715
3716 * src/state.h (state_t): Remove the `lookaheads',
3717 `lookaheads_rule' member.
3718 (reductions_t): Add a `lookaheads' member.
3719 Use a regular array for the `rules'.
3720 * src/state.c (reductions_new): Initialize the lookaheads member
3721 to 0.
3722 (state_rule_lookaheads_print): Adjust.
3723 * src/state.h, src/state.c (state_reductions_find): New.
3724 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
3725 (count_rr_conflicts): Adjust.
3726 * src/lalr.c (LArule): Remove.
3727 (add_lookback_edge): Adjust.
3728 (state_lookaheads_count): New.
3729 (states_lookaheads_initialize): Merge into...
3730 (initialize_LA): this.
3731 (lalr_free): Adjust.
3732 * src/main.c (main): Don't free nullable and derives too early: it
3733 is used by --verbose.
3734 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
3735
3736 2002-08-01 Akim Demaille <akim@epita.fr>
3737
3738 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
3739 `rule_number_t**'.
3740 (set_derives, free_derives): Rename as...
3741 (derives_compute, derives_free): this.
3742 Adjust all dependencies.
3743 * src/nullable.c (set_nullable, free_nullable): Rename as...
3744 (nullable_compute, nullable_free): these.
3745 (rule_list_t): Store rule_t *, not rule_number_t.
3746 * src/state.c (state_rule_lookaheads_print): Directly compare rule
3747 pointers, instead of their numbers.
3748 * src/main.c (main): Call nullable_free, and derives_free earlier,
3749 as they were lo longer used.
3750
3751 2002-08-01 Akim Demaille <akim@epita.fr>
3752
3753 * lib/timevar.c (get_time): Include children time.
3754 * src/lalr.h (LA, LArule): Don't export them: used with the
3755 state_t.
3756 * src/lalr.c (LA, LArule): Static.
3757 * src/lalr.h, src/lalr.c (lalr_free): New.
3758 * src/main.c (main): Call it.
3759 * src/tables.c (pack_vector): Check whether loc is >= to the
3760 table_size, not >.
3761 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3762 (tables_generate): do it, since that's also it which allocates
3763 them.
3764 Don't free LA and LArule, main does.
3765
3766 2002-07-31 Akim Demaille <akim@epita.fr>
3767
3768 Separate parser tables computation and output.
3769
3770 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3771 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3772 (yydefgoto, yydefact, high): Move to...
3773 * src/tables.h, src/tables.c: here.
3774 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3775 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3776 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3777 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3778 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3779 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3780 (action_row, save_row, token_actions, save_column, default_goto)
3781 (goto_actions, sort_actions, matching_state, pack_vector)
3782 (table_ninf_remap, pack_table, prepare_actions): Move to...
3783 * src/tables.c: here.
3784 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3785 * src/output.c (token_actions, output_base, output_conflicts)
3786 (output_check): Merge into...
3787 (prepare_actions): this.
3788 (actions_output): Rename as...
3789 (user_actions_output): this.
3790 * src/main.c (main): Call tables_generate and tables_free.
3791
3792 2002-07-31 Akim Demaille <akim@epita.fr>
3793
3794 Steal GCC's --time-report support.
3795
3796 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3797 stolen/adjusted from GCC.
3798 * m4/stage.m4: Remove time related checks.
3799 * m4/timevar.m4: New.
3800 * configure.in: Adjust.
3801 * src/system.h: Adjust to using timevar.h.
3802 * src/getargs.h, src/getargs.c: Support trace_time for
3803 --trace=time.
3804 * src/main.c (stage): Remove.
3805 (main): Replace `stage' invocations with timevar calls.
3806 * src/output.c: Insert pertinent timevar calls.
3807
3808 2002-07-31 Akim Demaille <akim@epita.fr>
3809
3810 Let --trace have arguments.
3811
3812 * src/getargs.h (enum trace_e): New.
3813 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3814 (long_options, short_options): --trace/-T takes an optional
3815 argument.
3816 Change all the uses of trace_flag to reflect the new flags.
3817 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3818
3819 Strengthen `stage' portability.
3820
3821 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3822 * configure.in: Use it.
3823 Don't check for malloc.h and sys/times.h.
3824 * src/system.h: Include them when appropriate.
3825 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3826 times and struct tms are available.
3827
3828 2002-07-30 Akim Demaille <akim@epita.fr>
3829
3830 In verbose parse error message, don't report `error' as an
3831 expected token.
3832 * tests/actions.at (Printers and Destructors): Adjust.
3833 * tests/calc.at (Calculator $1): Adjust.
3834 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3835 error message, do not report the parser accepts the error token in
3836 that state.
3837
3838 2002-07-30 Akim Demaille <akim@epita.fr>
3839
3840 Normalize conflict related messages.
3841
3842 * src/complain.h, src/complain.c (warn, complain): New.
3843 * src/conflicts.c (conflicts_print): Use them.
3844 (conflict_report_yacc): New, extracted from...
3845 (conflicts_print): here.
3846 * tests/conflicts.at, tests/existing.at: Adjust.
3847
3848 2002-07-30 Akim Demaille <akim@epita.fr>
3849
3850 Report rules which are never reduced by the parser: those hidden
3851 by conflicts.
3852
3853 * src/LR0.c (save_reductions): Don't make the final state too
3854 different: save its reduction (accept) instead of having a state
3855 without any action (no shift or goto, no reduce).
3856 Note: the final state is now a ``regular'' state, i.e., the
3857 parsers now contain `reduce 0' as default reduction.
3858 Nevertheless, since they decide to `accept' when yystate =
3859 final_state, they still will not reduce rule 0.
3860 * src/print.c (print_actions, print_reduction): Adjust.
3861 * src/output.c (action_row): Track reduced rules.
3862 (token_actions): Report rules never reduced.
3863 * tests/conflicts.at, tests/regression.at: Adjust.
3864
3865 2002-07-30 Akim Demaille <akim@epita.fr>
3866
3867 `stage' was accidently included in a previous patch.
3868 Initiate its autoconfiscation.
3869
3870 * configure.in: Look for malloc.h and sys/times.h.
3871 * src/main.c (stage): Adjust.
3872 Report only when trace_flag.
3873
3874 2002-07-29 Akim Demaille <akim@epita.fr>
3875
3876 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3877 state_number_t.
3878 (errs_t): symbol_t*, not symbol_number_t.
3879 (reductions_t): rule_t*, not rule_number_t.
3880 (FOR_EACH_SHIFT): New.
3881 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3882 * src/print.c, src/print_graph.c: Adjust.
3883
3884 2002-07-29 Akim Demaille <akim@epita.fr>
3885
3886 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3887
3888 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3889 (endtoken, accept): these.
3890 * src/reader.c (reader): Set endtoken's default tag to "$end".
3891 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3892 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3893 Adjust.
3894
3895 2002-07-29 Akim Demaille <akim@epita.fr>
3896
3897 * src/reduce.c (reduce_grammar): When the language is empty,
3898 complain about the start symbol, not the axiom.
3899 Use its location.
3900 * tests/reduce.at (Empty Language): New.
3901
3902 2002-07-26 Akim Demaille <akim@epita.fr>
3903
3904 * src/reader.h, src/reader.c (gram_error): ... can't get
3905 yycontrol without making too strong assumptions on the parser
3906 itself.
3907 * src/output.c (prepare_tokens): Use the real 0th value of
3908 token_translations instead of `0'.
3909 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3910 visible here.
3911 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3912 for the time being: %locations ought to provide it to yyerror.
3913
3914 2002-07-25 Akim Demaille <akim@epita.fr>
3915
3916 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3917 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3918 * tests/regression.at (Web2c Actions): Adjust.
3919
3920 2002-07-25 Akim Demaille <akim@epita.fr>
3921
3922 Stop storing rules from 1 to nrules + 1.
3923
3924 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3925 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3926 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3927 Iterate from 0 to nrules.
3928 Use rule_number_as_item_number and item_number_as_rule_number.
3929 Adjust to `derive' now containing possibly 0.
3930 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3931 Handle the `- 1' part in rule numbers from/to item numbers.
3932 * src/conflicts.c (log_resolution): Fix the message which reversed
3933 shift and reduce.
3934 * src/output.c (action_row): Initialize default_rule to -1.
3935 (token_actions): Adjust.
3936 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3937 expected output.
3938 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3939
3940 2002-07-25 Akim Demaille <akim@epita.fr>
3941
3942 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3943 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3944 (b4_c_knr_arg_decl): New.
3945 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3946 yyreport_parse_error.
3947
3948 2002-07-25 Akim Demaille <akim@epita.fr>
3949
3950 * data/yacc.c (yyreport_parse_error): New, extracted from...
3951 (yyparse): here.
3952 (yydestruct, yysymprint): Move above yyparse.
3953 Be K&R compliant.
3954
3955 2002-07-25 Akim Demaille <akim@epita.fr>
3956
3957 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3958 replace...
3959 (b4_sint_type, b4_uint_type): these.
3960 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3961 * tests/regression.at (Web2c Actions): Adjust.
3962
3963 2002-07-25 Akim Demaille <akim@epita.fr>
3964
3965 * src/gram.h (TIEM_NUMBER_MAX): New.
3966 (item_number_of_rule_number, rule_number_of_item_number): Rename
3967 as...
3968 (rule_number_as_item_number, item_number_as_rule_number): these.
3969 Adjust dependencies.
3970 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3971 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3972 (symbol_number_to_vector_number): New.
3973 (order): Of vector_number_t* type.
3974 (base_t, BASE_MAX, BASE_MIN): New.
3975 (froms, tos, width, pos, check): Of base_t type.
3976 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3977 (actrow): Of action_number_t type.
3978 (conflrow): Of unsigned int type.
3979 (table_ninf, base_ninf): New.
3980 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3981 (muscle_insert_int_table, muscle_insert_base_table)
3982 (muscle_insert_rule_number_table): New.
3983 (prepare_tokens): Output `toknum' as int_table.
3984 (action_row): Returns a rule_number_t.
3985 Use ACTION_MIN, not SHRT_MIN.
3986 (token_actions): yydefact is rule_number_t*.
3987 (table_ninf_remap): New.
3988 (pack_table): Use it for `base' and `table'.
3989 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3990 replaced with...
3991 (YYPACT_NINF, YYTABLE_NINF): these.
3992 (yypact, yytable): Compute their types instead of hard-coded
3993 `short'.
3994 * tests/regression.at (Web2c Actions): Adjust.
3995
3996 2002-07-19 Akim Demaille <akim@epita.fr>
3997
3998 * src/scan-gram.l (id): Can start with an underscore.
3999
4000 2002-07-16 Akim Demaille <akim@epita.fr>
4001
4002 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
4003 Adjust all former `associativity' dependencies.
4004 * src/symtab.c (symbol_new): Default associativity is `undef', not
4005 `right'.
4006 (symbol_check_alias_consistence): Adjust.
4007
4008 2002-07-09 Akim Demaille <akim@epita.fr>
4009
4010 * doc/bison.texinfo: Properly set the ``header'' part.
4011 Use @dircategory ``GNU programming tools'' as per Texinfo's
4012 documentation.
4013 Use @copying.
4014
4015 2002-07-09 Akim Demaille <akim@epita.fr>
4016
4017 * lib/quotearg.h: Protect against multiple inclusions.
4018 * src/location.h (location_t): Add a `file' member.
4019 (LOCATION_RESET, LOCATION_PRINT): Adjust.
4020 * src/complain.c (warn_at, complain_at, fatal_at): Drop
4021 `error_one_per_line' support.
4022
4023 2002-07-09 Akim Demaille <akim@epita.fr>
4024
4025 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
4026 * src/reader.c (lineno): Remove.
4027 Adjust all dependencies.
4028 (get_merge_function): Take a location and use complain_at.
4029 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
4030 * tests/regression.at (Invalid inputs, Mixing %token styles):
4031 Adjust.
4032
4033 2002-07-09 Akim Demaille <akim@epita.fr>
4034
4035 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
4036 recovery rule, and forbid extensions when --yacc.
4037 (gram_error): Use complain_at.
4038 * src/reader.c (reader): Exit if there were parse errors.
4039
4040 2002-07-09 Akim Demaille <akim@epita.fr>
4041
4042 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
4043 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
4044 Reported by R Blake <blakers@mac.com>.
4045
4046 2002-07-09 Akim Demaille <akim@epita.fr>
4047
4048 * data/yacc.c: Output the copyright notive in the header.
4049
4050 2002-07-03 Akim Demaille <akim@epita.fr>
4051
4052 * src/output.c (froms, tos): Are state_number_t.
4053 (save_column): sp, sp1, and sp2 are state_number_t.
4054 (prepare): Rename `final' as `final_state_number', `nnts' as
4055 `nterms_number', `nrules' as `rules_number', `nstates' as
4056 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
4057 unused.
4058 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
4059 * data/lalr1.cc (nsym_): Remove, unused.
4060
4061 2002-07-03 Akim Demaille <akim@epita.fr>
4062
4063 * src/lalr.h, src/lalr.c (goto_number_t): New.
4064 * src/lalr.c (goto_list_t): New.
4065 Propagate them.
4066 * src/nullable.c (rule_list_t): New.
4067 Propagate.
4068 * src/types.h: Remove.
4069
4070 2002-07-03 Akim Demaille <akim@epita.fr>
4071
4072 * src/closure.c (print_fderives): Use rule_rhs_print.
4073 * src/derives.c (print_derives): Use rule_rhs_print.
4074 (rule_list_t): New, replaces `shorts'.
4075 (set_derives): Add comments.
4076 * tests/sets.at (Nullable, Firsts): Adjust.
4077
4078 2002-07-03 Akim Demaille <akim@epita.fr>
4079
4080 * src/output.c (prepare_actions): Free `tally' and `width'.
4081 (prepare_actions): Allocate and free `order'.
4082 * src/symtab.c (symbols_free): Free `symbols'.
4083 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
4084 * src/output.c (m4_invoke): Move to...
4085 * src/scan-skel.l: here.
4086 (<<EOF>>): Close yyout, and free its name.
4087
4088 2002-07-03 Akim Demaille <akim@epita.fr>
4089
4090 Fix some memory leaks, and fix a bug: state 0 was examined twice.
4091
4092 * src/LR0.c (new_state): Merge into...
4093 (state_list_append): this.
4094 (new_states): Merge into...
4095 (generate_states): here.
4096 (set_states): Don't ensure a proper `errs' state member here, do it...
4097 * src/conflicts.c (conflicts_solve): here.
4098 * src/state.h, src/state.c: Comment changes.
4099 (state_t): Rename member `shifts' as `transitions'.
4100 Adjust all dependencies.
4101 (errs_new): For consistency, also take the values as argument.
4102 (errs_dup): Remove.
4103 (state_errs_set): New.
4104 (state_reductions_set, state_transitions_set): Assert that no
4105 previous value was assigned.
4106 (state_free): New.
4107 (states_free): Use it.
4108 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
4109 temporary storage: use `errs' and `nerrs' as elsewhere.
4110 (set_conflicts): Allocate and free this `errs'.
4111
4112 2002-07-02 Akim Demaille <akim@epita.fr>
4113
4114 * lib/libiberty.h: New.
4115 * lib: Update the bitset implementation from upstream.
4116 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
4117 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
4118 * src/main.c: Adjust bitset stats calls.
4119
4120 2002-07-01 Paul Eggert <eggert@twinsun.com>
4121
4122 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
4123 char, so that negative chars don't collide with $.
4124
4125 2002-06-30 Akim Demaille <akim@epita.fr>
4126
4127 Have the GLR tests be `warning' checked, and fix the warnings.
4128
4129 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
4130 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
4131 (yyremoveDeletes): `yyi' and `yyj' are size_t.
4132 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
4133 (yyaddDeferredAction): static.
4134 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
4135 (yyreportParseError): yyprefix is const.
4136 yytokenp is used only when verbose.
4137 (yy__GNUC__): Replace with __GNUC__.
4138 (yypdumpstack): yyi is size_t.
4139 (yypreference): Un-yy local variables and arguments, to avoid
4140 clashes with `yyr1'. Anyway, we are not in the user name space.
4141 (yytname_size): be an int, as is compared with ints.
4142 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
4143 Use them.
4144 * tests/cxx-gram.at: Use quotation to protect $1.
4145 Use AT_COMPILE to enable warnings hunts.
4146 Prototype yylex and yyerror.
4147 `Use' argc.
4148 Include `string.h', not `strings.h'.
4149 Produce and prototype stmtMerge only when used.
4150 yylex takes a location.
4151
4152 2002-06-30 Akim Demaille <akim@epita.fr>
4153
4154 We spend a lot of time in quotearg, in particular when --verbose.
4155
4156 * src/symtab.c (symbol_get): Store a quoted version of the key.
4157 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
4158 Adjust all callers.
4159
4160 2002-06-30 Akim Demaille <akim@epita.fr>
4161
4162 * src/state.h (reductions_t): Rename member `nreds' as num.
4163 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
4164 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
4165
4166 2002-06-30 Akim Demaille <akim@epita.fr>
4167
4168 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
4169 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
4170 (shifts_to): Rename as...
4171 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
4172 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
4173 (TRANSITION_IS_DISABLED, transitions_to): these.
4174
4175 2002-06-30 Akim Demaille <akim@epita.fr>
4176
4177 * src/print.c (print_shifts, print_gotos): Merge into...
4178 (print_transitions): this.
4179 (print_transitions, print_errs, print_reductions): Align the
4180 lookaheads columns.
4181 (print_core, print_transitions, print_errs, print_state,
4182 print_grammar): Output empty lines separator before, not after.
4183 (state_default_rule_compute): Rename as...
4184 (state_default_rule): this.
4185 * tests/conflicts.at (Defaulted Conflicted Reduction),
4186 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
4187 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
4188
4189 2002-06-30 Akim Demaille <akim@epita.fr>
4190
4191 Display items as we display rules.
4192
4193 * src/gram.h, src/gram.c (rule_lhs_print): New.
4194 * src/gram.c (grammar_rules_partial_print): Use it.
4195 * src/print.c (print_core): Likewise.
4196 * tests/conflicts.at (Defaulted Conflicted Reduction),
4197 (Unresolved SR Conflicts): Adjust.
4198 (Unresolved SR Conflicts): Adjust and rename as...
4199 (Resolved SR Conflicts): this, as was meant.
4200 * tests/regression.at (Web2c Report): Adjust.
4201
4202 2002-06-30 Akim Demaille <akim@epita.fr>
4203
4204 * src/print.c (state_default_rule_compute): New, extracted from...
4205 (print_reductions): here.
4206 Pessimize, but clarify the code.
4207 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
4208
4209 2002-06-30 Akim Demaille <akim@epita.fr>
4210
4211 * src/output.c (action_row): Let default_rule be always a rule
4212 number.
4213
4214 2002-06-30 Akim Demaille <akim@epita.fr>
4215
4216 * src/closure.c (print_firsts, print_fderives, closure):
4217 Use BITSET_EXECUTE.
4218 * src/lalr.c (lookaheads_print): Likewise.
4219 * src/state.c (state_rule_lookaheads_print): Likewise.
4220 * src/print_graph.c (print_core): Likewise.
4221 * src/print.c (print_reductions): Likewise.
4222 * src/output.c (action_row): Likewise.
4223 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4224
4225 2002-06-30 Akim Demaille <akim@epita.fr>
4226
4227 * src/print_graph.c: Use report_flag.
4228
4229 2002-06-30 Akim Demaille <akim@epita.fr>
4230
4231 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4232 to...
4233 * src/relation.h, src/relation.c (traverse, relation_digraph)
4234 (relation_print, relation_transpose): New.
4235
4236 2002-06-30 Akim Demaille <akim@epita.fr>
4237
4238 * src/state.h, src/state.c (shifts_to): New.
4239 * src/lalr.c (build_relations): Use it.
4240
4241 2002-06-30 Akim Demaille <akim@epita.fr>
4242
4243 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4244 (item_number_of_rule_number, rule_number_of_item_number): New.
4245 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4246 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4247 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4248 Propagate their use.
4249 Much remains to be done, in particular wrt `shorts' from types.h.
4250
4251 2002-06-30 Akim Demaille <akim@epita.fr>
4252
4253 * src/symtab.c (symbol_new): Initialize the `printer' member.
4254
4255 2002-06-30 Akim Demaille <akim@epita.fr>
4256
4257 * src/LR0.c (save_reductions): Remove, replaced by...
4258 * src/state.h, src/state.c (state_reductions_set): New.
4259 (reductions, errs): Rename as...
4260 (reductions_t, errs_t): these.
4261 Adjust all dependencies.
4262
4263 2002-06-30 Akim Demaille <akim@epita.fr>
4264
4265 * src/LR0.c (state_list_t, state_list_append): New.
4266 (first_state, last_state): Now symbol_list_t.
4267 (this_state): Remove.
4268 (new_itemsets, append_states, save_reductions): Take a state_t as
4269 argument.
4270 (set_states, generate_states): Adjust.
4271 (save_shifts): Remove, replaced by...
4272 * src/state.h, src/state.c (state_shifts_set): New.
4273 (shifts): Rename as...
4274 (shifts_t): this.
4275 Adjust all dependencies.
4276 * src/state.h (state_t): Remove the `next' member.
4277
4278 2002-06-30 Akim Demaille <akim@epita.fr>
4279
4280 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4281 escaped in slot 0.
4282
4283 2002-06-30 Akim Demaille <akim@epita.fr>
4284
4285 Use hash.h for the state hash table.
4286
4287 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4288 (allocate_storage): Use state_hash_new.
4289 (free_storage): Use state_hash_free.
4290 (new_state, get_state): Adjust.
4291 * src/lalr.h, src/lalr.c (states): Move to...
4292 * src/states.h (state_t): Remove the `link' member, no longer
4293 used.
4294 * src/states.h, src/states.c: here.
4295 (state_hash_new, state_hash_free, state_hash_lookup)
4296 (state_hash_insert, states_free): New.
4297 * src/states.c (state_table, state_compare, state_hash): New.
4298 * src/output.c (output_actions): Do not free states now, since we
4299 still need to know the final_state number in `prepare', called
4300 afterwards. Do it...
4301 * src/main.c (main): here: call states_free after `output'.
4302
4303 2002-06-30 Akim Demaille <akim@epita.fr>
4304
4305 * src/state.h, src/state.c (state_new): New, extracted from...
4306 * src/LR0.c (new_state): here.
4307 * src/state.h (STATE_ALLOC): Move to...
4308 * src/state.c: here.
4309 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
4310 * src/state.h, src/state.c: here.
4311
4312 2002-06-30 Akim Demaille <akim@epita.fr>
4313
4314 * src/reader.c (gensym): Rename as...
4315 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
4316 (getsym): Rename as...
4317 (symbol_get): this.
4318
4319 2002-06-30 Akim Demaille <akim@epita.fr>
4320
4321 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
4322 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
4323 * src/output.c, src/print.c, src/print_graph.c: Propagate.
4324 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
4325
4326 2002-06-30 Akim Demaille <akim@epita.fr>
4327
4328 Make the test suite pass with warnings checked.
4329
4330 * tests/actions.at (Printers and Destructors): Improve.
4331 Avoid unsigned vs. signed issues.
4332 * tests/calc.at: Don't exercise the scanner here, do it...
4333 * tests/input.at (Torturing the Scanner): here.
4334
4335 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4336
4337 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
4338 reorganize first lines parallel to yacc.c.
4339
4340 2002-06-28 Akim Demaille <akim@epita.fr>
4341
4342 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
4343 (b4_token_enum, b4_token_defines): New, factored from...
4344 * data/lalr1.cc, data/yacc.c, glr.c: here.
4345
4346 2002-06-28 Akim Demaille <akim@epita.fr>
4347
4348 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
4349 unused variables.
4350 * src/output.c (merger_output): static.
4351
4352 2002-06-28 Akim Demaille <akim@epita.fr>
4353
4354 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
4355 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
4356 pacify GCC.
4357 * src/output.c (save_row): Initialize all the variables to pacify GCC.
4358
4359 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4360
4361 Accumulated changelog for new GLR parsing features.
4362
4363 * src/conflicts.c (count_total_conflicts): Change name to
4364 conflicts_total_count.
4365 * src/conflicts.h: Ditto.
4366 * src/output.c (token_actions): Use the new name.
4367 (output_conflicts): Change conflp => conflict_list_heads, and
4368 confl => conflict_list for better readability.
4369 * data/glr.c: Use the new names.
4370 * NEWS: Add self to GLR announcement.
4371
4372 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
4373
4374 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
4375 Akim Demaille.
4376
4377 * data/bison.glr: Change name to glr.c
4378 * data/glr.c: Renamed from bison.glr.
4379 * data/Makefile.am: Add glr.c
4380
4381 * src/getargs.c:
4382
4383 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
4384 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
4385
4386 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4387
4388 * data/bison.glr: Be sure to restore the
4389 current #line when returning to the skeleton contents after having
4390 exposed the input file's #line.
4391
4392 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4393
4394 * data/bison.glr: Bring up to date with changes to bison.simple.
4395
4396 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4397
4398 * data/bison.glr: Correct definitions that use b4_prefix.
4399 Various reformatting.
4400 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
4401 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
4402 yytokenp argument; now part of stack.
4403 (yychar): Define to behave as documented.
4404 (yyclearin): Ditto.
4405
4406 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4407
4408 * src/reader.h: Add declaration for free_merger_functions.
4409
4410 * src/reader.c (merge_functions): New variable.
4411 (get_merge_function): New function.
4412 (free_merger_functions): New function.
4413 (readgram): Check for %prec that is not followed by a symbol.
4414 Handle %dprec and %merge declarations.
4415 (packgram): Initialize dprec and merger fields in rules array.
4416
4417 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
4418 conflict_list_cnt, conflict_list_free): New variables.
4419 (table_grow): Also grow conflict_table.
4420 (prepare_rules): Output dprec and merger tables.
4421 (conflict_row): New function.
4422 (action_row): Output conflict lists for GLR parser. Don't use
4423 default reduction in conflicted states for GLR parser so that there
4424 are spaces for the conflict lists.
4425 (save_row): Also save conflict information.
4426 (token_actions): Allocate conflict list.
4427 (merger_output): New function.
4428 (pack_vector): Pack conflict table, too.
4429 (output_conflicts): New function to output yyconflp and yyconfl.
4430 (output_check): Allocate conflict_tos.
4431 (output_actions): Output conflict tables, also.
4432 (output_skeleton): Output b4_mergers definition.
4433 (prepare): Output b4_max_rhs_length definition.
4434 Use 'bison.glr' as default skeleton for GLR parsers.
4435
4436 * src/gram.c (glr_parser): New flag.
4437 (grammar_free): Call free_merger_functions.
4438
4439 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
4440 all pairs of conflicting reductions, rather than just all tokens
4441 causing conflicts. Needed to size conflict tables.
4442 (conflicts_output): Modify call to count_rr_conflicts for new
4443 interface.
4444 (conflicts_print): Ditto.
4445 (count_total_conflicts): New function.
4446
4447 * src/reader.h (merger_list): New type.
4448 (merge_functions): New variable.
4449
4450 * src/lex.h (tok_dprec, tok_merge): New token types.
4451
4452 * src/gram.h (rule_s): Add dprec and merger fields.
4453 (glr_parser): New flag.
4454
4455 * src/conflicts.h (count_total_conflicts): New function.
4456
4457 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
4458
4459 * doc/bison.texinfo (Generalized LR Parsing): New section.
4460 (GLR Parsers): New section.
4461 (Language and Grammar): Mention GLR parsing.
4462 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
4463 Correct typo ("tge" -> "the").
4464
4465 * data/bison.glr: New skeleton for GLR parsing.
4466
4467 * tests/cxx-gram.at: New tests for GLR parsing.
4468
4469 * tests/testsuite.at: Include cxx-gram.at.
4470
4471 * tests/Makefile.am: Add cxx-gram.at.
4472
4473 * src/parse-gram.y:
4474
4475 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
4476
4477 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
4478
4479 2002-06-27 Akim Demaille <akim@epita.fr>
4480
4481 * src/options.h, src/options.c: Remove.
4482 * src/getargs.c (short_options, long_options): New.
4483
4484 2002-06-27 Akim Demaille <akim@epita.fr>
4485
4486 * data/bison.simple, data/bison.c++: Rename as...
4487 * data/yacc.c, data/lalr1.cc: these.
4488 * doc/bison.texinfo (Environment Variables): Remove.
4489
4490 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
4491
4492 * src/getargs.c (report_argmatch): Initialize strtok().
4493
4494 2002-06-20 Akim Demaille <akim@epita.fr>
4495
4496 * data/bison.simple (b4_symbol_actions): New, replaces...
4497 (b4_symbol_destructor, b4_symbol_printer): these.
4498 (yysymprint): Be sure to call YYPRINT only for tokens, and using
4499 user token numbers.
4500
4501 2002-06-20 Akim Demaille <akim@epita.fr>
4502
4503 * data/bison.simple (yydestructor): Rename as...
4504 (yydestruct): this.
4505
4506 2002-06-20 Akim Demaille <akim@epita.fr>
4507
4508 * src/symtab.h, src/symtab.c (symbol_type_set)
4509 (symbol_destructor_set, symbol_precedence_set): The location is
4510 the last argument.
4511 Adjust all callers.
4512
4513 2002-06-20 Akim Demaille <akim@epita.fr>
4514
4515 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
4516 internals.
4517 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
4518 Takes a location.
4519 * src/symtab.h, src/symtab.c (symbol_class_set)
4520 (symbol_user_token_number_set): Likewise.
4521 Adjust all callers.
4522 Promote complain_at.
4523 * tests/input.at (Type Clashes): Adjust.
4524
4525 2002-06-20 Akim Demaille <akim@epita.fr>
4526
4527 * data/bison.simple (YYLEX): Fix the declaration when
4528 %pure-parser.
4529
4530 2002-06-20 Akim Demaille <akim@epita.fr>
4531
4532 * data/bison.simple (yysymprint): Don't print the token number,
4533 just its name.
4534 * tests/actions.at (Destructors): Rename as...
4535 (Printers and Destructors): this.
4536 Also exercise %printer.
4537
4538 2002-06-20 Akim Demaille <akim@epita.fr>
4539
4540 * data/bison.simple (YYDSYMPRINT): New.
4541 Use it to remove many of the #if YYDEBUG/if (yydebug).
4542
4543 2002-06-20 Akim Demaille <akim@epita.fr>
4544
4545 * src/symtab.h, src/symtab.c (symbol_t): printer and
4546 printer_location are new members.
4547 (symbol_printer_set): New.
4548 * src/parse-gram.y (PERCENT_PRINTER): New token.
4549 Handle its associated rule.
4550 * src/scan-gram.l: Adjust.
4551 (handle_destructor_at, handle_destructor_dollar): Rename as...
4552 (handle_symbol_code_at, handle_symbol_code_dollar): these.
4553 * src/output.c (symbol_printers_output): New.
4554 (output_skeleton): Call it.
4555 * data/bison.simple (yysymprint): New. Cannot be named yyprint
4556 since there are already many grammar files with a user `yyprint'.
4557 Replace the calls to YYPRINT to calls to yysymprint.
4558 * tests/calc.at: Adjust.
4559 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
4560 taking advantage of parser very internal details (stack size!).
4561
4562 2002-06-20 Akim Demaille <akim@epita.fr>
4563
4564 * src/scan-gram.l: Complete the scanner with the missing patterns
4565 to pacify Flex.
4566 Use `quote' and `symbol_tag_get' where appropriate.
4567
4568 2002-06-19 Akim Demaille <akim@epita.fr>
4569
4570 * tests/actions.at (Destructors): Augment to test locations.
4571 * data/bison.simple (yydestructor): Pass it the current location
4572 if locations are enabled.
4573 Prototype only when __STDC__ or C++.
4574 Change the argument names to move into the yy name space: there is
4575 user code here.
4576
4577 2002-06-19 Akim Demaille <akim@epita.fr>
4578
4579 * data/bison.simple (b4_pure_if): New.
4580 Use it instead of #ifdef YYPURE.
4581
4582 2002-06-19 Akim Demaille <akim@epita.fr>
4583
4584 * data/bison.simple (b4_location_if): New.
4585 Use it instead of #ifdef YYLSP_NEEDED.
4586
4587 2002-06-19 Akim Demaille <akim@epita.fr>
4588
4589 Prepare @$ in %destructor, but currently don't bind it in the
4590 skeleton, as %location use is not cleaned up yet.
4591
4592 * src/scan-gram.l (handle_dollar, handle_destructor_at)
4593 (handle_action_at): New.
4594 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
4595 a braced_code_t and a location as additional arguments.
4596 (handle_destructor_dollar): Instead of requiring `b4_eval', just
4597 unquote one when outputting `b4_dollar_dollar'.
4598 Adjust callers.
4599 * data/bison.simple (b4_eval): Remove.
4600 (b4_symbol_destructor): Adjust.
4601 * tests/input.at (Invalid @n): Adjust.
4602
4603 2002-06-19 Zack Weinberg <zack@codesourcery.com>
4604
4605 * doc/bison.texinfo: Document ability to have multiple
4606 prologue sections.
4607
4608 2002-06-18 Akim Demaille <akim@epita.fr>
4609
4610 * src/files.c (compute_base_names): When computing the output file
4611 names from the input file name, strip the directory part.
4612
4613 2002-06-18 Akim Demaille <akim@epita.fr>
4614
4615 * data/bison.simple.new: Comment changes.
4616 Reported by Andreas Schwab.
4617
4618 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
4619
4620 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
4621 there are no `label `yyoverflowlab' defined but not used' warnings
4622 when yyoverflow is defined.
4623
4624 2002-06-18 Akim Demaille <akim@epita.fr>
4625
4626 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
4627 new member.
4628 (symbol_destructor_set): Adjust.
4629 * src/output.c (symbol_destructors_output): Output the destructor
4630 locations.
4631 Output the symbol name.
4632 * data/bison.simple (b4_symbol_destructor): Adjust.
4633
4634 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
4635 and Akim Demaille <akim@epita.fr>
4636
4637 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
4638 what's left on the stack when the error recovery hits EOF.
4639 * tests/actions.at (Destructors): Complete to exercise this case.
4640
4641 2002-06-17 Akim Demaille <akim@epita.fr>
4642
4643 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
4644 arguments is really empty, not only equal to `[]'.
4645 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
4646 member.
4647 (symbol_destructor_set): New.
4648 * src/output.c (symbol_destructors_output): New.
4649 * src/reader.h (brace_code_t, current_braced_code): New.
4650 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
4651 (handle_dollar): Rename as...
4652 (handle_action_dollar): this.
4653 (handle_destructor_dollar): New.
4654 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
4655 (grammar_declaration): Use it.
4656 * data/bison.simple (yystos): Is always defined.
4657 (yydestructor): New.
4658 * tests/actions.at (Destructors): New.
4659 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
4660
4661 2002-06-17 Akim Demaille <akim@epita.fr>
4662
4663 * src/symlist.h, src/symlist.c (symbol_list_length): New.
4664 * src/scan-gram.l (handle_dollar, handle_at): Compute the
4665 rule_length only when needed.
4666 * src/output.c (actions_output, token_definitions_output): Output
4667 the full M4 block.
4668 * src/symtab.c: Don't access directly to the symbol tag, use
4669 symbol_tag_get.
4670 * src/parse-gram.y: Use symbol_list_free.
4671
4672 2002-06-17 Akim Demaille <akim@epita.fr>
4673
4674 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
4675 (symbol_list_prepend, get_type_name): Move to...
4676 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
4677 (symbol_list_prepend, symbol_list_n_type_name_get): here.
4678 Adjust all callers.
4679 (symbol_list_free): New.
4680 * src/scan-gram.l (handle_dollar): Takes a location.
4681 * tests/input.at (Invalid $n): Adjust.
4682
4683 2002-06-17 Akim Demaille <akim@epita.fr>
4684
4685 * src/reader.h, src/reader.c (symbol_list_new): Export it.
4686 (symbol_list_prepend): New.
4687 * src/parse-gram.y (%union): `list' is a new member.
4688 (symbols.1): New, replaces...
4689 (terms_to_prec.1, nterms_to_type.1): these.
4690 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
4691 Take a location as additional argument.
4692 Adjust all callers.
4693
4694 2002-06-15 Akim Demaille <akim@epita.fr>
4695
4696 * src/parse-gram.y: Move %token in the declaration section so that
4697 we don't depend upon CVS Bison.
4698
4699 2002-06-15 Akim Demaille <akim@epita.fr>
4700
4701 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
4702 * src/print.c (print_core): Use it.
4703
4704 2002-06-15 Akim Demaille <akim@epita.fr>
4705
4706 * src/conflicts.c (log_resolution): Accept the rule involved in
4707 the sr conflicts instead of the lookahead number that points to
4708 that rule.
4709 (flush_reduce): Accept the current lookahead vector as argument,
4710 instead of the index in LA.
4711 (resolve_sr_conflict): Accept the current number of lookahead
4712 bitset to consider for the STATE, instead of the index in LA.
4713 (set_conflicts): Adjust.
4714 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
4715
4716 2002-06-15 Akim Demaille <akim@epita.fr>
4717
4718 * src/state.h (state_t): Replace the `lookaheadsp' member, a
4719 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
4720 Adjust all dependencies.
4721 * src/lalr.c (initialize_lookaheads): Split into...
4722 (states_lookaheads_count, states_lookaheads_initialize): these.
4723 (lalr): Adjust.
4724
4725 2002-06-15 Akim Demaille <akim@epita.fr>
4726
4727 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
4728 out of...
4729 (grammar_rules_print): here.
4730 * src/reduce.c (reduce_output): Use it.
4731 * tests/reduce.at (Useless Rules, Reduced Automaton)
4732 (Underivable Rules): Adjust.
4733
4734 2002-06-15 Akim Demaille <akim@epita.fr>
4735
4736 Copy BYacc's nice way to report the grammar.
4737
4738 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
4739 New.
4740 Don't print the rules' location, it is confusing and useless.
4741 (rule_print): Use grammar_rhs_print.
4742 * src/print.c (print_grammar): Use grammar_rules_print.
4743
4744 2002-06-15 Akim Demaille <akim@epita.fr>
4745
4746 Complete and rationalize `useless thing' warnings.
4747
4748 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
4749 (symbol_tag_print): New.
4750 Use them everywhere in place of accessing directly the tag member.
4751 * src/gram.h, src/gram.c (rule_print): New.
4752 Use it where a rule used to be printed `by hand'.
4753 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
4754 (reduce_grammar_tables): Report the useless rules.
4755 (reduce_print): Useless things are a warning, not an error.
4756 Report it as such.
4757 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4758 (Reduced Automaton, Underivable Rules): Adjust.
4759 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4760 * tests/conflicts.at (Unresolved SR Conflicts)
4761 (Solved SR Conflicts): Adjust.
4762
4763 2002-06-15 Akim Demaille <akim@epita.fr>
4764
4765 Let symbols have a location.
4766
4767 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4768 (getsym): Adjust.
4769 Adjust all callers.
4770 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4771 Use location_t, not int.
4772 * src/symtab.c (symbol_check_defined): Take advantage of the
4773 location.
4774 * tests/regression.at (Invalid inputs): Adjust.
4775
4776 2002-06-15 Akim Demaille <akim@epita.fr>
4777
4778 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4779 (input): Don't try to initialize yylloc here, do it in the
4780 scanner.
4781 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4782 * src/gram.h (rule_t): Change line and action_line into location
4783 and action_location, of location_t type.
4784 Adjust all dependencies.
4785 * src/location.h, src/location.c (empty_location): New.
4786 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4787 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4788 (grammar_current_rule_symbol_append)
4789 (grammar_current_rule_action_append): Expect a location as argument.
4790 * src/reader.c (grammar_midrule_action): Adjust to attach an
4791 action's location as dummy symbol location.
4792 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4793 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4794 the line numbers.
4795
4796 2002-06-14 Akim Demaille <akim@epita.fr>
4797
4798 Grammar declarations may be found in the grammar section.
4799
4800 * src/parse-gram.y (rules_or_grammar_declaration): New.
4801 (declarations): Each declaration may end with a semicolon, not
4802 just...
4803 (grammar_declaration): `"%union"'.
4804 (grammar): Branch to rules_or_grammar_declaration.
4805
4806 2002-06-14 Akim Demaille <akim@epita.fr>
4807
4808 * src/main.c (main): Invoke scanner_free.
4809
4810 2002-06-14 Akim Demaille <akim@epita.fr>
4811
4812 * src/output.c (m4_invoke): Extracted from...
4813 (output_skeleton): here.
4814 Free tempfile.
4815
4816 2002-06-14 Akim Demaille <akim@epita.fr>
4817
4818 * src/parse-gram.y (directives, directive, gram)
4819 (grammar_directives, precedence_directives, precedence_directive):
4820 Rename as...
4821 (declarations, declaration, grammar, grammar_declaration)
4822 (precedence_declaration, precedence_declarator): these.
4823 (symbol_declaration): New.
4824
4825 2002-06-14 Akim Demaille <akim@epita.fr>
4826
4827 * src/files.c (action_obstack): Remove, unused.
4828 (output_obstack): Remove it, and all its dependencies, as it is no
4829 longer needed.
4830 * src/reader.c (epilogue_set): Build the epilogue in the
4831 muscle_obstack.
4832 * src/output.h, src/output.c (muscle_obstack): Move to...
4833 * src/muscle_tab.h, src/muscle_tab.h: here.
4834 (muscle_init): Initialize muscle_obstack.
4835 (muscle_free): New.
4836 * src/main.c (main): Call it.
4837
4838 2002-06-14 Akim Demaille <akim@epita.fr>
4839
4840 * src/location.h: New, extracted from...
4841 * src/reader.h: here.
4842 * src/Makefile.am (noinst_HEADERS): Merge into
4843 (bison_SOURCES): this.
4844 Add location.h.
4845 * src/parse-gram.y: Use location_t instead of Bison's.
4846 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4847 Use location_t instead of ints.
4848
4849 2002-06-14 Akim Demaille <akim@epita.fr>
4850
4851 * data/bison.simple, data/bison.c++: Be sure to restore the
4852 current #line when returning to the skeleton contents after having
4853 exposed the input file's #line.
4854
4855 2002-06-12 Akim Demaille <akim@epita.fr>
4856
4857 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4858 eager.
4859 * tests/actions.at (Exotic Dollars): New.
4860
4861 2002-06-12 Akim Demaille <akim@epita.fr>
4862
4863 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4864 ['"/] too eagerly.
4865 * tests/input.at (Torturing the Scanner): New.
4866
4867 2002-06-11 Akim Demaille <akim@epita.fr>
4868
4869 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4870 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4871 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4872 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4873 * src/reader.c (reader): Use it.
4874
4875 2002-06-11 Akim Demaille <akim@epita.fr>
4876
4877 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4878 Adjust all callers.
4879 (scanner_last_string_free): New.
4880
4881 2002-06-11 Akim Demaille <akim@epita.fr>
4882
4883 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4884 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4885 (last_string, YY_OBS_FREE): New.
4886 Use them when returning an ID.
4887
4888 2002-06-11 Akim Demaille <akim@epita.fr>
4889
4890 Have Bison grammars parsed by a Bison grammar.
4891
4892 * src/reader.c, src/reader.h (prologue_augment): New.
4893 * src/reader.c (copy_definition): Remove.
4894
4895 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4896 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4897 (grammar_current_rule_prec_set, grammar_current_rule_check)
4898 (grammar_current_rule_symbol_append)
4899 (grammar_current_rule_action_append): Export.
4900 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4901 (symbol_list_action_append): Remove.
4902 Hook the routines from reader.
4903 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4904 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4905
4906 * src/reader.c (read_declarations): Remove, unused.
4907
4908 * src/parse-gram.y: Handle the epilogue.
4909 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4910 (grammar_start_symbol_set): this.
4911 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4912 * src/reader.c (readgram): Remove, unused.
4913 (reader): Adjust to insert eoftoken and axiom where appropriate.
4914
4915 * src/reader.c (copy_dollar): Replace with...
4916 * src/scan-gram.h (handle_dollar): this.
4917 * src/parse-gram.y: Remove `%thong'.
4918
4919 * src/reader.c (copy_at): Replace with...
4920 * src/scan-gram.h (handle_at): this.
4921
4922 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4923 New.
4924
4925 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4926 time being.
4927
4928 * src/reader.h, src/reader.c (grammar_rule_end): New.
4929
4930 * src/parse.y (current_type, current_class): New.
4931 Implement `%nterm', `%token' support.
4932 Merge `%term' into `%token'.
4933 (string_as_id): New.
4934 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4935 type name.
4936
4937 * src/parse-gram.y: Be sure to handle properly the beginning of
4938 rules.
4939
4940 * src/parse-gram.y: Handle %type.
4941 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4942
4943 * src/parse-gram.y: More directives support.
4944 * src/options.c: No longer handle source directives.
4945
4946 * src/parse-gram.y: Fix %output.
4947
4948 * src/parse-gram.y: Handle %union.
4949 Use the prologue locations.
4950 * src/reader.c (parse_union_decl): Remove.
4951
4952 * src/reader.h, src/reader.c (epilogue_set): New.
4953 * src/parse-gram.y: Use it.
4954
4955 * data/bison.simple, data/bison.c++: b4_stype is now either not
4956 defined, then default to int, or to the contents of %union,
4957 without `union' itself.
4958 Adjust.
4959 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4960
4961 * src/output.c (actions_output): Don't output braces, as they are
4962 already handled by the scanner.
4963
4964 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4965 characters to themselves.
4966
4967 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4968 that the epilogue has a proper #line.
4969
4970 * src/parse-gram.y: Handle precedence/associativity.
4971
4972 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4973 a terminal.
4974 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4975 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4976 at all to define terminals that cannot be emitted.
4977
4978 * src/scan-gram.l: Escape M4 characters.
4979
4980 * src/scan-gram.l: Working properly with escapes in user
4981 strings/characters.
4982
4983 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4984 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4985 grammar.
4986 Use more modest sizes, as for the time being the parser does not
4987 release memory, and therefore the process swallows a huge amount
4988 of memory.
4989
4990 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4991 stricter %token grammar.
4992
4993 * src/symtab.h (associativity): Add `undef_assoc'.
4994 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4995 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4996
4997 * tests/regression.at (Invalid %directive): Remove, as it is now
4998 meaningless.
4999 (Invalid inputs): Adjust to the new error messages.
5000 (Token definitions): The new grammar doesn't allow too many
5001 eccentricities.
5002
5003 * src/lex.h, src/lex.c: Remove.
5004 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
5005 (copy_character, copy_string2, copy_string, copy_identifier)
5006 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
5007 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
5008 (parse_action): Remove.
5009 * po/POTFILES.in: Adjust.
5010
5011 2002-06-11 Akim Demaille <akim@epita.fr>
5012
5013 * src/reader.c (parse_action): Don't store directly into the
5014 rule's action member: return the action as a string.
5015 Don't require `rule_length' as an argument: compute it.
5016 (grammar_current_rule_symbol_append)
5017 (grammar_current_rule_action_append): New, eved out from
5018 (readgram): here.
5019 Remove `action_flag', `rulelength', unused now.
5020
5021 2002-06-11 Akim Demaille <akim@epita.fr>
5022
5023 * src/reader.c (grammar_current_rule_prec_set).
5024 (grammar_current_rule_check): New, eved out from...
5025 (readgram): here.
5026 Remove `xaction', `first_rhs': useless.
5027 * tests/input.at (Type clashes): New.
5028 * tests/existing.at (GNU Cim Grammar): Adjust.
5029
5030 2002-06-11 Akim Demaille <akim@epita.fr>
5031
5032 * src/reader.c (grammar_midrule_action): New, Eved out from
5033 (readgram): here.
5034
5035 2002-06-11 Akim Demaille <akim@epita.fr>
5036
5037 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
5038 New.
5039 (readgram): Use them as replacement of inlined code, crule and
5040 crule1.
5041
5042 2002-06-11 Akim Demaille <akim@epita.fr>
5043
5044 * src/reader.c (grammar_end, grammar_symbol_append): New.
5045 (readgram): Use them.
5046 Make the use of `p' as local as possible.
5047
5048 2002-06-10 Akim Demaille <akim@epita.fr>
5049
5050 GCJ's parser requires the tokens to be defined before the prologue.
5051
5052 * data/bison.simple: Output the token definition before the user's
5053 prologue.
5054 * tests/regression.at (Braces parsing, Duplicate string)
5055 (Mixing %token styles): Check the output from bison.
5056 (Early token definitions): New.
5057
5058 2002-06-10 Akim Demaille <akim@epita.fr>
5059
5060 * src/symtab.c (symbol_user_token_number_set): Don't complain when
5061 assigning twice the same user number to a token, so that we can
5062 use it in...
5063 * src/lex.c (lex): here.
5064 Also use `symbol_class_set' instead of hand written code.
5065 * src/reader.c (parse_assoc_decl): Likewise.
5066
5067 2002-06-10 Akim Demaille <akim@epita.fr>
5068
5069 * src/symtab.c, src/symtab.c (symbol_class_set)
5070 (symbol_user_token_number_set): New.
5071 * src/reader.c (parse_token_decl): Use them.
5072 Use a switch instead of ifs.
5073 Use a single argument.
5074
5075 2002-06-10 Akim Demaille <akim@epita.fr>
5076
5077 Remove `%thong' support as it is undocumented, unused, duplicates
5078 `%token's job, and creates useless e-mail traffic with people who
5079 want to know what it is, why it is undocumented, unused, and
5080 duplicates `%token's job.
5081
5082 * src/reader.c (parse_thong_decl): Remove.
5083 * src/options.c (option_table): Remove "thong".
5084 * src/lex.h (tok_thong): Remove.
5085
5086 2002-06-10 Akim Demaille <akim@epita.fr>
5087
5088 * src/symtab.c, src/symtab.c (symbol_type_set)
5089 (symbol_precedence_set): New.
5090 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
5091 (value_components_used): Remove, unused.
5092
5093 2002-06-09 Akim Demaille <akim@epita.fr>
5094
5095 Move symbols handling code out of the reader.
5096
5097 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
5098 (axiom): Move to...
5099 * src/symtab.h, src/symtab.c: here.
5100
5101 * src/gram.c (start_symbol): Remove: use startsymbol->number.
5102 * src/reader.c (startval): Rename as...
5103 * src/symtab.h, src/symtab.c (startsymbol): this.
5104 * src/reader.c: Adjust.
5105
5106 * src/reader.c (symbol_check_defined, symbol_make_alias)
5107 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5108 (token_translations_init)
5109 Move to...
5110 * src/symtab.c: here.
5111 * src/reader.c (packsymbols): Move to...
5112 * src/symtab.h, src/symtab.c (symbols_pack): here.
5113 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
5114 argument.
5115
5116 2002-06-03 Akim Demaille <akim@epita.fr>
5117
5118 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
5119 then statements.
5120
5121 2002-06-03 Akim Demaille <akim@epita.fr>
5122
5123 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
5124 structs with non literals.
5125 * src/scan-skel.l: never-interactive.
5126 * src/conflicts.c (enum conflict_resolution_e): No trailing
5127 comma.
5128 * src/getargs.c (usage): Split long literal strings.
5129 Reported by Hans Aberg.
5130
5131 2002-05-28 Akim Demaille <akim@epita.fr>
5132
5133 * data/bison.c++: Use C++ ostreams.
5134 (cdebug_): New member.
5135
5136 2002-05-28 Akim Demaille <akim@epita.fr>
5137
5138 * src/output.c (output_skeleton): Be sure to allocate enough room
5139 for `/' _and_ for `\0' in full_skeleton.
5140
5141 2002-05-28 Akim Demaille <akim@epita.fr>
5142
5143 * data/bison.c++: Catch up with bison.simple:
5144 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5145 and Paul Eggert <eggert@twinsun.com>: `error' handing.
5146 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
5147 and popping traces.
5148
5149 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5150
5151 * src/output.c (output_skeleton): Put an explicit path in front of
5152 the skeleton file name, rather than relying on the -I directory,
5153 to partially alleviate effects of having a skeleton file lying around
5154 in the current directory.
5155
5156 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5157
5158 * src/conflicts.c (log_resolution): Correct typo:
5159 obstack_printf should be obstack_fgrow1.
5160
5161 2002-05-26 Akim Demaille <akim@epita.fr>
5162
5163 * src/state.h (state_t): `solved_conflicts' is a new member.
5164 * src/LR0.c (new_state): Set it to 0.
5165 * src/conflicts.h, src/conflicts.c (print_conflicts)
5166 (free_conflicts, solve_conflicts): Rename as...
5167 (conflicts_print, conflicts_free, conflicts_solve): these.
5168 Adjust callers.
5169 * src/conflicts.c (enum conflict_resolution_e)
5170 (solved_conflicts_obstack): New, used by...
5171 (log_resolution): this.
5172 Adjust to attach the conflict resolution to each state.
5173 Complete the description with the precedence/associativity
5174 information.
5175 (resolve_sr_conflict): Adjust.
5176 * src/print.c (print_state): Output its solved_conflicts.
5177 * tests/conflicts.at (Unresolved SR Conflicts)
5178 (Solved SR Conflicts): Exercise --report=all.
5179
5180 2002-05-26 Akim Demaille <akim@epita.fr>
5181
5182 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5183 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5184 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
5185 (token_number_t, item_number_as_token_number)
5186 (token_number_as_item_number, muscle_insert_token_number_table):
5187 Rename as...
5188 (symbol_number_t, item_number_as_symbol_number)
5189 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
5190 these, since it is more appropriate.
5191
5192 2002-05-26 Akim Demaille <akim@epita.fr>
5193
5194 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
5195 `Error:' lines.
5196 * data/bison.simple (yystos) [YYDEBUG]: New.
5197 (yyparse) [YYDEBUG]: Display the symbols which are popped during
5198 error recovery.
5199 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
5200
5201 2002-05-25 Akim Demaille <akim@epita.fr>
5202
5203 * doc/bison.texinfo (Debugging): Split into...
5204 (Tracing): this new section, its former contents, and...
5205 (Understanding): this new section.
5206 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
5207 by...
5208 (report_flag): this.
5209 Adjust all dependencies.
5210 (report_args, report_types, report_argmatch): New.
5211 (usage, getargs): Report/support -r, --report.
5212 * src/options.h
5213 (struct option_table_struct): Rename as..,
5214 (struct option_table_s): this.
5215 Rename the `set_flag' member to `flag' to match with getopt_long's
5216 struct.
5217 * src/options.c (option_table): Split verbose into an entry for
5218 %verbose, and another for --verbose.
5219 Support --report/-r, so remove -r from the obsolete --raw.
5220 * src/print.c: Attach full item sets and lookaheads reports to
5221 report_flag instead of trace_flag.
5222 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5223
5224 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5225 and Paul Eggert <eggert@twinsun.com>
5226
5227 * data/bison.simple (yyparse): Correct error handling to conform to
5228 POSIX and yacc. Specifically, after syntax error is discovered,
5229 do not reduce further before shifting the error token.
5230 Clean up the code a bit by removing the labels yyerrdefault,
5231 yyerrhandle, yyerrpop.
5232 * NEWS: Document the above.
5233
5234 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5235
5236 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5237 type; it isn't always big enough, since it doesn't necessarily
5238 include non-terminals.
5239 (yytranslate): Expand definition of yy_token_number_type, so that
5240 the latter can be removed.
5241 (yy_token_number_type): Remove, only one use.
5242 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5243 don't use TokenNumberType as element type.
5244
5245 * tests/regression.at: Modify expected output to agree with change
5246 to yyr1 and yytranslate.
5247
5248 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5249
5250 * src/reader.c (parse_action): Use copy_character instead of
5251 obstack_1grow.
5252
5253 2002-05-13 Akim Demaille <akim@epita.fr>
5254
5255 * tests/regression.at (Token definitions): Prototype yylex and
5256 yyerror.
5257
5258 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5259
5260 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
5261 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5262 32-bit arithmetic.
5263 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5264
5265 2002-05-07 Akim Demaille <akim@epita.fr>
5266
5267 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5268 avoid GCC warnings.
5269
5270 2002-05-07 Akim Demaille <akim@epita.fr>
5271
5272 Kill GCC warnings.
5273
5274 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5275 over the RHS of each rule.
5276 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5277 * src/state.h (state_t): Member `nitems' is unsigned short.
5278 * src/LR0.c (get_state): Adjust.
5279 * src/reader.c (packgram): Likewise.
5280 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5281 `Type'.
5282 (muscle_insert_int_table): Remove, unused.
5283 (prepare_rules): Remove `max'.
5284
5285 2002-05-06 Akim Demaille <akim@epita.fr>
5286
5287 * src/closure.c (print_firsts): Display of the symbol tags.
5288 (bitmatrix_print): Move to...
5289 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5290 here.
5291 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5292
5293 2002-05-06 Akim Demaille <akim@epita.fr>
5294
5295 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5296 hash_do_for_each.
5297
5298 2002-05-06 Akim Demaille <akim@epita.fr>
5299
5300 * src/LR0.c (new_state, get_state): Instead of using the global
5301 `kernel_size' and `kernel_base', have two new arguments:
5302 `core_size' and `core'.
5303 Adjust callers.
5304
5305 2002-05-06 Akim Demaille <akim@epita.fr>
5306
5307 * src/reader.c (packgram): No longer end `ritem' with a 0
5308 sentinel: it is not used.
5309
5310 2002-05-05 Akim Demaille <akim@epita.fr>
5311
5312 New experimental feature: display the lookaheads in the report and
5313 graph.
5314
5315 * src/print (print_core): When --trace-flag, display the rules
5316 lookaheads.
5317 * src/print_graph.c (print_core): Likewise.
5318 Swap the arguments.
5319 Adjust caller.
5320
5321 2002-05-05 Akim Demaille <akim@epita.fr>
5322
5323 * tests/torture.at (Many lookaheads): New test.
5324
5325 2002-05-05 Akim Demaille <akim@epita.fr>
5326
5327 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
5328 (GENERATE_MUSCLE_INSERT_TABLE): this.
5329 (output_int_table, output_unsigned_int_table, output_short_table)
5330 (output_token_number_table, output_item_number_table): Replace with...
5331 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
5332 (muscle_insert_short_table, muscle_insert_token_number_table)
5333 (muscle_insert_item_number_table): these.
5334 Adjust all callers.
5335 (prepare_tokens): Don't free `translations', since...
5336 * src/reader.h, src/reader.c (grammar_free): do it.
5337 Move to...
5338 * src/gram.h, src/gram.c (grammar_free): here.
5339 * data/bison.simple, data/bison.c++: b4_token_number_max is now
5340 b4_translate_max.
5341
5342 2002-05-05 Akim Demaille <akim@epita.fr>
5343
5344 * src/output.c (output_unsigned_int_table): New.
5345 (prepare_rules): `i' is unsigned.
5346 `prhs', `rline', `r2' are unsigned int.
5347 Rename muscle `rhs_number_max' as `rhs_max'.
5348 Output muscles `prhs_max', `rline_max', and `r2_max'.
5349 Free rline and r1.
5350 * data/bison.simple, data/bison.c++: Adjust to use these muscles
5351 to compute types instead of constant types.
5352 * tests/regression.at (Web2c Actions): Adjust.
5353
5354 2002-05-04 Akim Demaille <akim@epita.fr>
5355
5356 * src/symtab.h (SALIAS, SUNDEF): Rename as...
5357 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
5358 Adjust dependencies.
5359 * src/output.c (token_definitions_output): Be sure not to output a
5360 `#define 'a'' when fed with `%token 'a' "a"'.
5361 * tests/regression.at (Token definitions): New.
5362
5363 2002-05-03 Paul Eggert <eggert@twinsun.com>
5364
5365 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
5366 for K&R C.
5367
5368 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
5369
5370 * Makefile.am (SUBDIRS): Remove intl.
5371 (EXTRA_DIST): Add config/config.rpath.
5372
5373 2002-05-03 Akim Demaille <akim@epita.fr>
5374
5375 * data/bison.simple (m4_if): Don't output empty enums.
5376 And actually, output valid enum definitions :(.
5377
5378 2002-05-03 Akim Demaille <akim@epita.fr>
5379
5380 * configure.bat: Remove, completely obsolete.
5381 * Makefile.am (EXTRA_DIST): Adjust.
5382 Don't distribute config.rpath...
5383 * config/Makefile.am (EXTRA_DIST): Do it.
5384
5385 2002-05-03 Akim Demaille <akim@epita.fr>
5386
5387 * configure.in (GETTEXT_VERSION): New.
5388 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
5389
5390 2002-05-03 Akim Demaille <akim@epita.fr>
5391
5392 * data/bison.simple (b4_token_enum): New.
5393 (b4_token_defines): Use it to output tokens both as #define and
5394 enums.
5395 Suggested by Paul Eggert.
5396 * src/output.c (token_definitions_output): Don't output spurious
5397 white spaces.
5398
5399 2002-05-03 Akim Demaille <akim@epita.fr>
5400
5401 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5402
5403 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
5404
5405 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
5406 Update the stack class, give a try to deque as the default container.
5407
5408 2002-05-02 Akim Demaille <akim@epita.fr>
5409
5410 * data/bison.simple (yyparse): Do not implement @$ = @1.
5411 (YYLLOC_DEFAULT): Adjust to do it.
5412 * doc/bison.texinfo (Location Default Action): Fix.
5413
5414 2002-05-02 Akim Demaille <akim@epita.fr>
5415
5416 * src/reader.c (parse_braces): Merge into...
5417 (parse_action): this.
5418
5419 2002-05-02 Akim Demaille <akim@epita.fr>
5420
5421 * configure.in (ALL_LINGUAS): Remove.
5422 * po/LINGUAS, hr.po: New.
5423
5424 2002-05-02 Akim Demaille <akim@epita.fr>
5425
5426 Remove the so called hairy (semantic) parsers.
5427
5428 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
5429 * src/gram.h, src/gram.c (semantic_parser): Remove.
5430 (rule_t): Remove the guard and guard_line members.
5431 * src/lex.h (token_t): remove tok_guard.
5432 * src/options.c (option_table): Remove %guard and %semantic_parser
5433 support.
5434 * src/output.c, src/output.h (guards_output): Remove.
5435 (prepare): Adjust.
5436 (token_definitions_output): Don't output the `T'
5437 tokens (???).
5438 (output_skeleton): Don't output the guards.
5439 * src/files.c, src/files.c (attrsfile): Remove.
5440 * src/reader.c (symbol_list): Remove the guard and guard_line
5441 members.
5442 Adjust dependencies.
5443 (parse_guard): Remove.
5444 * data/bison.hairy: Remove.
5445 * doc/bison.texinfo (Environment Variables): Remove occurrences of
5446 BISON_HAIRY.
5447
5448 2002-05-02 Akim Demaille <akim@epita.fr>
5449
5450 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
5451 (parse_guard): Rename the formal argument `stack_offset' as
5452 `rule_length', which is more readable.
5453 Adjust callers.
5454 (copy_at, copy_dollar): Instead of outputting the hard coded
5455 values of $$, $n and so forth, output invocation to b4_lhs_value,
5456 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
5457 Note: this patch partially drops `semantic-parser' support: it
5458 always does `rule_length - n', where semantic parsers ought to
5459 always use `-n'.
5460 * data/bison.simple, data/bison.c++ (b4_lhs_value)
5461 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
5462
5463 2002-05-02 Akim Demaille <akim@epita.fr>
5464
5465 * configure.in (AC_INIT): Bump to 1.49b.
5466 (AM_INIT_AUTOMAKE): Short invocation.
5467
5468 2002-05-02 Akim Demaille <akim@epita.fr>
5469
5470 Version 1.49a.
5471
5472 2002-05-01 Akim Demaille <akim@epita.fr>
5473
5474 * src/skeleton.h: Remove.
5475
5476 2002-05-01 Akim Demaille <akim@epita.fr>
5477
5478 * src/skeleton.h: Fix the #endif.
5479 Reported by Magnus Fromreide.
5480
5481 2002-04-26 Paul Eggert <eggert@twinsun.com>
5482
5483 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
5484 Define if we define YYSTYPE and YYLTYPE, respectively.
5485 (YYCOPY): Fix [] quoting problem in the non-GCC case.
5486
5487 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
5488
5489 * src/scan-skel.l: Postprocess quadrigraphs.
5490
5491 * src/reader.c (copy_character): New function, used to output
5492 single characters while replacing `[' and `]' with quadrigraphs, to
5493 avoid troubles with M4 quotes.
5494 (copy_comment): Output characters with copy_character.
5495 (read_additionnal_code): Likewise.
5496 (copy_string2): Likewise.
5497 (copy_definition): Likewise.
5498
5499 * tests/calc.at: Exercise M4 quoting.
5500
5501 2002-04-25 Akim Demaille <akim@epita.fr>
5502
5503 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
5504 between `!' and the command.
5505 Reported by Paul Eggert.
5506
5507 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
5508
5509 * tests/calc.at: Exercise prologue splitting.
5510
5511 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
5512 `b4_post_prologue' instead of `b4_prologue'.
5513
5514 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
5515 muscles.
5516 (output): Free pre_prologue_obstack and post_prologue_obstack.
5517 * src/files.h, src/files.c (attrs_obstack): Remove.
5518 (pre_prologue_obstack, post_prologue_obstack): New.
5519 * src/reader.c (copy_definition): Add a parameter to specify the
5520 obstack to fill, instead of using attrs_obstack unconditionally.
5521 (read_declarations): Pass pre_prologue_obstack to copy_definition if
5522 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
5523
5524 2002-04-23 Paul Eggert <eggert@twinsun.com>
5525
5526 * data/bison.simple: Remove unnecessary commentary and white
5527 space differences from 1_29-branch.
5528 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
5529
5530 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
5531 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
5532 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
5533 constructors or destructors.
5534
5535 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
5536
5537 2002-04-23 Akim Demaille <akim@epita.fr>
5538
5539 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
5540 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
5541 location with columns.
5542 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
5543 All reported by Paul Eggert.
5544
5545 2002-04-22 Akim Demaille <akim@epita.fr>
5546
5547 * src/reduce.c (dump_grammar): Move to...
5548 * src/gram.h, src/gram.c (grammar_dump): here.
5549 Be sure to separate long item numbers.
5550 Don't read the members of a rule's prec if its nil.
5551
5552 2002-04-22 Akim Demaille <akim@epita.fr>
5553
5554 * src/output.c (table_size, table_grow): New.
5555 (MAXTABLE): Remove, replace uses with table_size.
5556 (pack_vector): Instead of dying when the table is too big, grow it.
5557
5558 2002-04-22 Akim Demaille <akim@epita.fr>
5559
5560 * data/bison.simple (yyr1): Its type is that of a token number.
5561 * data/bison.c++ (r1_): Likewise.
5562 * tests/regression.at (Web2c Actions): Adjust.
5563
5564 2002-04-22 Akim Demaille <akim@epita.fr>
5565
5566 * src/reader.c (token_translations_init): 256 is now the default
5567 value for the error token, i.e., it will be assigned another
5568 number if the user assigned 256 to one of her tokens.
5569 (reader): Don't force 256 to error.
5570 * doc/bison.texinfo (Symbols): Adjust.
5571 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
5572 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
5573 etc. instead of 10, 20, 30 (which was used to `jump' over error
5574 (256) and undefined (2)).
5575
5576 2002-04-22 Akim Demaille <akim@epita.fr>
5577
5578 Propagate more token_number_t.
5579
5580 * src/gram.h (token_number_as_item_number)
5581 (item_number_as_token_number): New.
5582 * src/output.c (GENERATE_OUTPUT_TABLE): New.
5583 Use it to create output_item_number_table and
5584 output_token_number_table.
5585 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5586 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
5587 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
5588 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
5589
5590 2002-04-22 Akim Demaille <akim@epita.fr>
5591
5592 * src/output.h, src/output.c (get_lines_number): Remove.
5593
5594 2002-04-19 Akim Demaille <akim@epita.fr>
5595
5596 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
5597 as Lex/Flex'.
5598 (Debugging): More details about enabling the debugging features.
5599 (Table of Symbols): Describe $$, $n, @$, and @n.
5600 Suggested by Tim Josling.
5601
5602 2002-04-19 Akim Demaille <akim@epita.fr>
5603
5604 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
5605
5606 2002-04-10 Akim Demaille <akim@epita.fr>
5607
5608 * src/system.h: Rely on HAVE_LIMITS_H.
5609 Suggested by Paul Eggert.
5610
5611 2002-04-09 Akim Demaille <akim@epita.fr>
5612
5613 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
5614 full stderr, and strip it according to the bison options, instead
5615 of composing the error message from different bits.
5616 This makes it easier to check for several error messages.
5617 Adjust all the invocations.
5618 Add an invocation exercising the error token.
5619 Add an invocation demonstrating a stupid error message.
5620 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
5621 Adjust the tests.
5622 Error message are for stderr, not stdout.
5623
5624 2002-04-09 Akim Demaille <akim@epita.fr>
5625
5626 * src/gram.h, src/gram.c (error_token_number): Remove, use
5627 errtoken->number.
5628 * src/reader.c (reader): Don't specify the user token number (2)
5629 for $undefined, as it uselessly prevents using it.
5630 * src/gram.h (token_number_t): Move to...
5631 * src/symtab.h: here.
5632 (state_t.number): Is a token_number_t.
5633 * src/print.c, src/reader.c: Use undeftoken->number instead of
5634 hard coded 2.
5635 (Even though this 2 is not the same as above: the number of the
5636 undeftoken remains being 2, it is its user token number which
5637 might not be 2).
5638 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
5639 `user_token_number_max'.
5640 Output `undef_token_number'.
5641 * data/bison.simple, data/bison.c++: Use them.
5642 Be sure to map invalid yylex return values to
5643 `undef_token_number'. This saves us from gratuitous SEGV.
5644
5645 * tests/conflicts.at (Solved SR Conflicts)
5646 (Unresolved SR Conflicts): Adjust.
5647 * tests/regression.at (Web2c Actions): Adjust.
5648
5649 2002-04-08 Akim Demaille <akim@epita.fr>
5650
5651 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
5652 Adding #line.
5653 Remove the duplicate `typedefs'.
5654 (RhsNumberType): Fix the declaration and various other typos.
5655 Use __ofile__.
5656 * data/bison.simple: Use __ofile__.
5657 * src/scan-skel.l: Handle __ofile__.
5658
5659 2002-04-08 Akim Demaille <akim@epita.fr>
5660
5661 * src/gram.h (item_number_t): New, the type of item numbers in
5662 RITEM. Note that it must be able to code symbol numbers as
5663 positive number, and the negation of rule numbers as negative
5664 numbers.
5665 Adjust all dependencies (pretty many).
5666 * src/reduce.c (rule): Remove this `short *' pointer: use
5667 item_number_t.
5668 * src/system.h (MINSHORT, MAXSHORT): Remove.
5669 Include `limits.h'.
5670 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
5671 (shortcpy): Remove.
5672 (MAXTABLE): Move to...
5673 * src/output.c (MAXTABLE): here.
5674 (prepare_rules): Use output_int_table to output rhs.
5675 * data/bison.simple, data/bison.c++: Adjust.
5676 * tests/torture.at (Big triangle): Move the limit from 254 to
5677 500.
5678 * tests/regression.at (Web2c Actions): Ajust.
5679
5680 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
5681 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
5682 passes, but produces negative #line number, once fixed, GCC is
5683 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
5684 C), it passes.
5685 * src/state.h (state_h): Code input lines on ints, not shorts.
5686
5687 2002-04-08 Akim Demaille <akim@epita.fr>
5688
5689 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
5690 and then the grammar.
5691
5692 2002-04-08 Akim Demaille <akim@epita.fr>
5693
5694 * src/system.h: No longer using strndup.
5695
5696 2002-04-07 Akim Demaille <akim@epita.fr>
5697
5698 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
5699 * src/output.c (output_table_data): Return the longest number.
5700 (prepare_tokens): Output `token_number_max').
5701 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
5702 New.
5703 Use them to define yy_token_number_type/TokenNumberType.
5704 Use this type for yytranslate.
5705 * tests/torture.at (Big triangle): Push the limit from 124 to
5706 253.
5707 * tests/regression.at (Web2c Actions): Adjust.
5708
5709 2002-04-07 Akim Demaille <akim@epita.fr>
5710
5711 * tests/torture.at (Big triangle): New.
5712 (GNU AWK Grammar, GNU Cim Grammar): Move to...
5713 * tests/existing.at: here.
5714
5715 2002-04-07 Akim Demaille <akim@epita.fr>
5716
5717 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
5718 nritems.
5719 Adjust dependencies.
5720
5721 2002-04-07 Akim Demaille <akim@epita.fr>
5722
5723 * src/reader.c: Normalize increments to prefix form.
5724
5725 2002-04-07 Akim Demaille <akim@epita.fr>
5726
5727 * src/reader.c, symtab.c: Remove debugging code.
5728
5729 2002-04-07 Akim Demaille <akim@epita.fr>
5730
5731 Rename all the `bucket's as `symbol_t'.
5732
5733 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
5734 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
5735 * src/symtab.c, src/symtab.h (bucket): Rename as...
5736 (symbol_t): this.
5737 (symbol_list_new, bucket_check_defined, bucket_make_alias)
5738 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
5739 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5740 (buckets_new, buckets_free, buckets_do): Rename as...
5741 (symbol_list_new, symbol_check_defined, symbol_make_alias)
5742 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5743 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
5744 (symbols_new, symbols_free, symbols_do): these.
5745
5746 2002-04-07 Akim Demaille <akim@epita.fr>
5747
5748 Use lib/hash for the symbol table.
5749
5750 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
5751 EOF.
5752 * src/lex.c (lex): Set the `number' member of new terminals.
5753 * src/reader.c (bucket_check_defined, bucket_make_alias)
5754 (bucket_check_alias_consistence, bucket_translation): New.
5755 (reader, grammar_free, readgram, token_translations_init)
5756 (packsymbols): Adjust.
5757 (reader): Number the predefined tokens.
5758 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5759 for predefined tokens.
5760 * src/symtab.h (bucket): Remove all the hash table related
5761 members.
5762 * src/symtab.c (symtab): Replace by...
5763 (bucket_table): this.
5764 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5765 (buckets_new, buckets_do): New.
5766
5767 2002-04-07 Akim Demaille <akim@epita.fr>
5768
5769 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5770 (start_symbol, max_user_token_number, semantic_parser)
5771 (error_token_number): Initialize.
5772 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5773 Initialize.
5774 (reader): Don't.
5775 (errtoken, eoftoken, undeftoken, axiom): Extern.
5776
5777 2002-04-07 Akim Demaille <akim@epita.fr>
5778
5779 * src/gram.h (rule_s): prec and precsym are now pointers
5780 to the bucket giving the priority/associativity.
5781 Member `associativity' removed: useless.
5782 * src/reduce.c, src/conflicts.c: Adjust.
5783
5784 2002-04-07 Akim Demaille <akim@epita.fr>
5785
5786 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5787 Properly escape the symbols' TAG when outputting them.
5788
5789 2002-04-07 Akim Demaille <akim@epita.fr>
5790
5791 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5792
5793 2002-04-07 Akim Demaille <akim@epita.fr>
5794
5795 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5796 (LArule): this, which is an array to rule_t*.
5797 * src/print.c, src/conflicts.c: Adjust.
5798
5799 2002-04-07 Akim Demaille <akim@epita.fr>
5800
5801 * src/gram.h (rule_t): Rename `number' as `user_number'.
5802 `number' is a new member.
5803 Adjust dependencies.
5804 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5805
5806 2002-04-07 Akim Demaille <akim@epita.fr>
5807
5808 As a result of the previous patch, it is no longer needed
5809 to reorder ritem itself.
5810
5811 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5812
5813 2002-04-07 Akim Demaille <akim@epita.fr>
5814
5815 Be sure never to walk through RITEMS, but use only data related to
5816 the rules themselves. RITEMS should be banished.
5817
5818 * src/output.c (output_token_translations): Rename as...
5819 (prepare_tokens): this.
5820 In addition to `translate', prepare the muscles `tname' and
5821 `toknum', which were handled by...
5822 (output_rule_data): this.
5823 Remove, and move the remainder of its outputs into...
5824 (prepare_rules): this new routines, which also merges content from
5825 (output_gram): this.
5826 (prepare_rules): Be sure never to walk through RITEMS.
5827 (output_stos): Rename as...
5828 (prepare_stos): this.
5829 (output): Always invoke prepare_states, after all, just don't use it
5830 in the output if you don't need it.
5831
5832 2002-04-07 Akim Demaille <akim@epita.fr>
5833
5834 * src/LR0.c (new_state): Display `nstates' as the name of the
5835 newly created state.
5836 Adjust to initialize first_state and last_state if needed.
5837 Be sure to distinguish the initial from the final state.
5838 (new_states): Create the itemset of the initial state, and use
5839 new_state.
5840 * src/closure.c (closure): Now that the initial state has its
5841 items properly set, there is no need for a special case when
5842 creating `ruleset'.
5843
5844 As a result, now the rule 0, reducing to $axiom, is visible in the
5845 outputs. Adjust the test suite.
5846
5847 * tests/conflicts.at (Solved SR Conflicts)
5848 (Unresolved SR Conflicts): Adjust.
5849 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5850 * tests/conflicts.at (S/R in initial): New.
5851
5852 2002-04-07 Akim Demaille <akim@epita.fr>
5853
5854 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5855 the RHS of the rules.
5856 * src/output.c (output_gram): Likewise.
5857
5858 2002-04-07 Akim Demaille <akim@epita.fr>
5859
5860 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5861 bucket.
5862 Adjust all dependencies.
5863 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5864 `number' of the buckets too.
5865 * src/gram.h: Include `symtab.h'.
5866 (associativity): Move to...
5867 * src/symtab.h: here.
5868 No longer include `gram.h'.
5869
5870 2002-04-07 Akim Demaille <akim@epita.fr>
5871
5872 * src/gram.h, src/gram.c (rules_rhs_length): New.
5873 (ritem_longest_rhs): Use it.
5874 * src/gram.h (rule_t): `number' is a new member.
5875 * src/reader.c (packgram): Set it.
5876 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5877 the end of `rules', and count them out of `nrules'.
5878 (reduce_output, dump_grammar): Adjust.
5879 * src/print.c (print_grammar): It is no longer needed to check for
5880 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5881 * tests/reduce.at (Reduced Automaton): New test.
5882
5883 2002-04-07 Akim Demaille <akim@epita.fr>
5884
5885 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5886 lacking `+ 1' to nrules, Bison reported as useless a token if it
5887 was used solely to set the precedence of the last rule...
5888
5889 2002-04-07 Akim Demaille <akim@epita.fr>
5890
5891 * data/bison.c++, data/bison.simple: Don't output the current file
5892 name in #line, to avoid useless diffs between two identical
5893 outputs under different names.
5894
5895 2002-04-07 Akim Demaille <akim@epita.fr>
5896
5897 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5898 Normalize loops to using `< nrules + 1', not `<= nrules'.
5899
5900 2002-04-07 Akim Demaille <akim@epita.fr>
5901
5902 * TODO: Update.
5903
5904 2002-04-07 Akim Demaille <akim@epita.fr>
5905
5906 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5907 bucket.value as bucket.number.
5908
5909 2002-04-07 Akim Demaille <akim@epita.fr>
5910
5911 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5912 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5913 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5914 RHS, instead of being an index in RITEMS.
5915
5916 2002-04-04 Paul Eggert <eggert@twinsun.com>
5917
5918 * doc/bison.texinfo: Update copyright date.
5919 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5920 (Symbols): Warn about running Bison in one character set,
5921 but compiling and/or running in an incompatible one.
5922 Warn about character code 256, too.
5923
5924 2002-04-03 Paul Eggert <eggert@twinsun.com>
5925
5926 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5927 YYERROR_VERBOSE is nonzero, not whether it is defined.
5928
5929 Merge changes from bison-1_29-branch.
5930
5931 2002-03-20 Paul Eggert <eggert@twinsun.com>
5932
5933 Merge fixes from Debian bison_1.34-1.diff.
5934
5935 * configure.in (AC_PREREQ): 2.53.
5936
5937 2002-03-20 Akim Demaille <akim@epita.fr>
5938
5939 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5940
5941 2002-03-19 Paul Eggert <eggert@twinsun.com>
5942
5943 * src/bison.simple (YYCOPY): New macro.
5944 (YYSTACK_RELOCATE): Use it.
5945 Remove Type arg; no longer needed. All callers changed.
5946 (yymemcpy): Remove; no longer needed.
5947
5948 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5949 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5950
5951 2002-03-19 Akim Demaille <akim@epita.fr>
5952
5953 Test and fix the #line outputs.
5954
5955 * tests/atlocal.at (GCC): New.
5956 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5957 (Prologue synch line, ,%union synch line, Postprologue synch line)
5958 (Action synch line, Epilogue synch line): New tests.
5959 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5960 * data/bison.simple, data/bison.c++: Use it.
5961
5962 2002-03-19 Akim Demaille <akim@epita.fr>
5963
5964 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5965 (Solved SR Conflicts, %expect not enough, %expect right)
5966 (%expect too much): Move to...
5967 * tests/conflicts.at: this new file.
5968
5969 2002-03-19 Akim Demaille <akim@epita.fr>
5970
5971 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5972 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5973 that we can move to enums for instance.
5974 * src/output.c (token_definitions_output): Output a list of
5975 `token-name, token-number' instead of the #define.
5976 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5977
5978 2002-03-14 Akim Demaille <akim@epita.fr>
5979
5980 Use Gettext 0.11.1.
5981
5982 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
5983
5984 * data/bison.c++: Make the user able to add members to the generated
5985 parser by subclassing.
5986
5987 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
5988
5989 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5990 a character.
5991 Reported by Nicolas Tisserand and Nicolas Burrus.
5992
5993 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5994
5995 * src/reader.c: Warn about lacking semi-colons, do not complain.
5996
5997 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5998
5999 * data/bison.c++: Remove a debug line.
6000
6001 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6002
6003 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
6004 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
6005 provide a default implementation.
6006
6007 2002-03-04 Akim Demaille <akim@epita.fr>
6008
6009 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
6010 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
6011 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
6012 * tests/semantic.at (Parsing Guards): Similarly.
6013 * src/reader.at (readgram): Complain if the last rule is not ended
6014 with a semi-colon.
6015
6016 2002-03-04 Akim Demaille <akim@epita.fr>
6017
6018 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
6019 * src/closure.c: here.
6020 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
6021 RTC.
6022 * src/warshall.h, src/warshall.c: Remove.
6023 * tests/sets.at (Broken Closure): Adjust.
6024
6025 2002-03-04 Akim Demaille <akim@epita.fr>
6026
6027 * src/output.c (output_skeleton): tempdir is const.
6028 bytes_read is unused.
6029
6030 2002-03-04 Akim Demaille <akim@epita.fr>
6031
6032 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6033 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
6034 Update.
6035 From Michael Hayes.
6036
6037 2002-03-04 Akim Demaille <akim@epita.fr>
6038
6039 * src/closure.c (closure): `r' is unused.
6040
6041 2002-03-04 Akim Demaille <akim@epita.fr>
6042
6043 * tests/sets.at (Broken Closure): Add the ending `;'.
6044 * src/reader.at (readgram): Complain if a rule is not ended with a
6045 semi-colon.
6046
6047 2002-03-04 Akim Demaille <akim@epita.fr>
6048
6049 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
6050 (count_sr_conflicts): Use bitset_count.
6051 * src/reduce.c (inaccessable_symbols): Ditto.
6052 (bits_size): Remove.
6053 * src/warshall.h, src/warshall.c: Convert to bitsetv.
6054
6055 2002-03-04 Akim Demaille <akim@epita.fr>
6056
6057 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
6058 * src/reduce.c: Remove the `bitset_zero's following the
6059 `bitset_create's, as now it is performed by the latter.
6060
6061 2002-03-04 Akim Demaille <akim@epita.fr>
6062
6063 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
6064 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
6065 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
6066 latest sources from Michael.
6067
6068 2002-03-04 Akim Demaille <akim@epita.fr>
6069
6070 * src/output.c (output): Don't free the grammar.
6071 * src/reader.c (grammar_free): New.
6072 * src/main.c (main): Call it and don't free symtab here.
6073
6074 2002-03-04 Akim Demaille <akim@epita.fr>
6075
6076 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
6077 before returning.
6078 Reported by Benoit Perrot.
6079
6080 2002-03-04 Akim Demaille <akim@epita.fr>
6081
6082 Use bitset operations when possible, not loops over bits.
6083
6084 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
6085 bitset_or.
6086 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
6087 * src/reduce.c (useless_nonterminals): Formatting changes.
6088 * src/warshall.c (TC): Use bitset_or.
6089
6090 2002-03-04 Akim Demaille <akim@epita.fr>
6091
6092 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
6093 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
6094 Ditto.
6095
6096 2002-03-04 Akim Demaille <akim@epita.fr>
6097
6098 * src/lalr.c (F): Now a bitset*.
6099 Adjust all dependencies.
6100
6101 2002-03-04 Akim Demaille <akim@epita.fr>
6102
6103 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
6104 Adjust all dependencies.
6105
6106 2002-03-04 Akim Demaille <akim@epita.fr>
6107
6108 * src/L0.c, src/LR0.h (nstates): Be size_t.
6109 Adjust comparisons (signed vs unsigned).
6110 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
6111 bitset*.
6112 Adjust all dependencies.
6113
6114 2002-03-04 Akim Demaille <akim@epita.fr>
6115
6116 * src/closure.c (firsts): Now, also a bitset.
6117 Adjust all dependencies.
6118 (varsetsize): Remove, now unused.
6119 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
6120
6121 2002-03-04 Akim Demaille <akim@epita.fr>
6122
6123 * src/print.c: Convert to use bitset.h, not hand coded iterations
6124 over ints.
6125
6126 2002-03-04 Akim Demaille <akim@epita.fr>
6127
6128 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
6129
6130 2002-03-04 Akim Demaille <akim@epita.fr>
6131
6132 * src/closure.c (ruleset): Be a bitset.
6133 (rulesetsize): Remove.
6134
6135 2002-03-04 Akim Demaille <akim@epita.fr>
6136
6137 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6138 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
6139 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
6140 * src/closure.c (fderives): Be an array of bitsets.
6141
6142 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
6143
6144 * data/bison.c++: Merge the two generated headers. Insert a copyright
6145 notice in each output file.
6146
6147 2002-02-28 Akim Demaille <akim@epita.fr>
6148
6149 * data/bison.c++: Copy the prologue of bison.simple to fetch
6150 useful M4 definitions, such as b4_header_guard.
6151
6152 2002-02-25 Akim Demaille <akim@epita.fr>
6153
6154 * src/getargs.c (version): Give the name of the authors, and use a
6155 translator friendly scheme for the bgr
6156 copyright notice.
6157
6158 2002-02-25 Akim Demaille <akim@epita.fr>
6159
6160 * src/output.c (header_output): Remove, now handled completely via
6161 M4.
6162
6163 2002-02-25 Akim Demaille <akim@epita.fr>
6164
6165 * m4/m4.m4: New, from CVS Autoconf.
6166 * configure.in: Invoke it.
6167 * src/output.c (output_skeleton): Use its result instead of the
6168 hard coded name.
6169
6170 2002-02-25 Akim Demaille <akim@epita.fr>
6171
6172 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
6173 Fileutils 4.1.5.
6174 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
6175 * src/output.c (output_skeleton): Use mkstemp to create a real
6176 temporary file.
6177 Move the filling of `skeleton' and its muscle to...
6178 (prepare): here.
6179 (output): Move the definition of the prologue muscle to...
6180 (prepare): here.
6181 * src/system.h (DEFAULT_TMPDIR): New.
6182
6183 2002-02-14 Paul Eggert <eggert@twinsun.com>
6184
6185 Remove the support for C++ namespace cleanliness; it was
6186 causing more problems than it was curing, since it didn't work
6187 properly on some nonstandard C++ compilers. This can wait
6188 for a proper C++ parser.
6189
6190 * NEWS: Document this.
6191 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
6192 of C++, as it's treated like C now.
6193 * src/bison.simple (YYSTD): Remove.
6194 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
6195 Treat C++ just like Standard C instead of trying to support
6196 namespace cleanliness.
6197
6198 2002-02-14 Akim Demaille <akim@epita.fr>
6199
6200 * tests/regression.at (else): Adjust to Andreas' change.
6201
6202 2002-02-14 Akim Demaille <akim@epita.fr>
6203
6204 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
6205
6206 2002-02-13 Andreas Schwab <schwab@suse.de>
6207
6208 * src/output.c (output_rule_data): Don't output NULL, it might
6209 not be defined yet.
6210
6211 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
6212
6213 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6214 (Copyright notice): Update.
6215
6216 2002-02-11 Akim Demaille <akim@epita.fr>
6217
6218 * tests/regression.at (%nonassoc and eof): Don't include
6219 nonportable headers.
6220
6221 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
6222
6223 * data/bison.c++: Correct error recovery. Make the user able to
6224 initialize the starting location.
6225
6226 2002-02-07 Akim Demaille <akim@epita.fr>
6227
6228 * tests/input.at: New.
6229
6230 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6231
6232 * data/bison.c++: Replace some direct m4 expansions by constants. Be
6233 more consistent when naming methods and variables. Put preprocessor
6234 directives around tables only needed for debugging.
6235
6236 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6237
6238 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6239 C++ parsers.
6240 (yy::b4_name::parse): Use print_.
6241
6242 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6243
6244 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6245
6246 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6247
6248 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6249 C++ parsers.
6250 (yy::b4_name::parse): Build verbose error messages, and use error_.
6251
6252 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6253
6254 * data/bison.c++: Fix m4 quoting in comments.
6255
6256 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6257
6258 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6259 not expanded by m4.
6260
6261 2002-02-05 Akim Demaille <akim@epita.fr>
6262
6263 * data/bison.c++: Adjust to the M4 back end.
6264 More is certainly needed.
6265
6266 2002-02-05 Akim Demaille <akim@epita.fr>
6267
6268 Give a try to M4 as a back end.
6269
6270 * lib/readpipe.c: New, from wdiff.
6271 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6272 BISON_HAIRY.
6273 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6274 specific values. Now it is m4 that performs the lookup.
6275 * src/parse-skel.y: Remove.
6276 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6277 * src/output.c (actions_output, guards_output)
6278 (token_definitions_output): No longer keeps track of the output
6279 line number, hence remove the second argument.
6280 (guards_output): Check against the guard member of a rule, not the
6281 action member.
6282 Adjust callers.
6283 (output_skeleton): Don't look for the skeleton location, let m4 do
6284 that.
6285 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6286 file will be used.
6287 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6288 (prepare): Given that for the time being changesyntax is not
6289 usable in M4, rename the muscles using `-' to `_'.
6290 Define `defines_flag', `output_parser_name' and `output_header_name'.
6291 * src/output.h (actions_output, guards_output)
6292 (token_definitions_output): Adjust prototypes.
6293 * src/scan-skel.l: Instead of scanning the skeletons, it now
6294 processes the output of m4: `__oline__' and `#output'.
6295 * data/bison.simple: Adjust to be used by M4(sugar).
6296 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6297 to date.
6298 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6299 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6300 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6301 shamelessly stolen from CVS Autoconf.
6302
6303 2002-02-05 Akim Demaille <akim@epita.fr>
6304
6305 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
6306 * configure.in: Check for the declarations of free and malloc.
6307 * src/muscle_tab.c: Adjust.
6308
6309 2002-02-05 Akim Demaille <akim@epita.fr>
6310
6311 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
6312 which have no values.
6313
6314 2002-02-05 Akim Demaille <akim@epita.fr>
6315
6316 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
6317 * data/: here.
6318
6319 2002-01-29 Paul Eggert <eggert@twinsun.com>
6320
6321 * src/bison.simple (YYSIZE_T): Do not define merely because
6322 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
6323 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6324
6325 2002-01-27 Akim Demaille <akim@epita.fr>
6326
6327 Fix `%nonassoc and eof'.
6328
6329 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
6330 which were not properly copied! Replace
6331 memcpy (res->errs, src->errs, src->nerrs);
6332 with
6333 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
6334 !!!
6335 * tests/regression.at (%nonassoc and eof): Adjust to newest
6336 Autotest: `.' is not in the PATH.
6337
6338 2002-01-27 Akim Demaille <akim@epita.fr>
6339
6340 * tests/sets.at (AT_EXTRACT_SETS): New.
6341 (Nullable): Use it.
6342 (Firsts): New.
6343
6344 2002-01-26 Akim Demaille <akim@epita.fr>
6345
6346 * tests/actions.at, tests/calc.at, tests/headers.at,
6347 * tests/torture.at: Adjust to the newest Autotest which no longer
6348 forces `.' in the PATH.
6349
6350 2002-01-25 Akim Demaille <akim@epita.fr>
6351
6352 * tests/regression.at (%nonassoc and eof): New.
6353 Suggested by Robert Anisko.
6354
6355 2002-01-24 Akim Demaille <akim@epita.fr>
6356
6357 Bison dumps core when trying to complain about broken input files.
6358 Reported by Cris van Pelt.
6359
6360 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
6361 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
6362 into...
6363 (Invalid inputs): Strengthen: exercise parse_percent_token.
6364
6365 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
6366
6367 * src/Makefile.am: Add bison.c++.
6368 * src/bison.c++: New skeleton.
6369
6370 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
6371
6372 * po/it.po: New.
6373
6374 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6375
6376 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
6377
6378 2002-01-20 Marc Autret <marc@gnu.org>
6379
6380 * src/files.c (compute_output_file_names): Fix
6381
6382 2002-01-20 Marc Autret <marc@gnu.org>
6383
6384 * tests/output.at: New test.
6385 * src/files.c (compute_base_names): Don't map extensions when
6386 the YACC flag is set, use defaults.
6387 Reported by Evgeny Stambulchik.
6388
6389 2002-01-20 Marc Autret <marc@gnu.org>
6390
6391 * src/system.h: Need to define __attribute__ away for non-GCC
6392 compilers as well (i.e. the vendor C compiler).
6393 Suggested by Albert Chin-A-Young.
6394
6395 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
6396
6397 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
6398 canonical definition.
6399 * src/system.h: Use the canonical definition for PARAMS (avoids
6400 a conflict with the macro from lib/hash.h).
6401
6402 2002-01-11 Akim Demaille <akim@epita.fr>
6403
6404 * configure.in: Use AC_FUNC_STRNLEN.
6405 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
6406
6407 2002-01-09 Akim Demaille <akim@epita.fr>
6408
6409 * src/files.c, src/files.h (output_infix): New.
6410 (tab_extension): Remove.
6411 (compute_base_names): Compute the former, drop the latter.
6412 * src/output.c (prepare): Insert the muscles `output-infix', and
6413 `output-suffix'.
6414 * src/parse-skel.y (string, string.1): New.
6415 (section.header): Use it.
6416 (section.yacc): Remove.
6417 (prefix): Remove too.
6418 * src/scan-skel.l: Adjust.
6419 * src/bison.simple, src/bison.hairy: Adjust.
6420
6421 2002-01-09 Akim Demaille <akim@epita.fr>
6422
6423 * configure.in (WERROR_CFLAGS): Compute it.
6424 * src/Makefile.am (CFLAGS): Pass it.
6425 * tests/atlocal.in (CFLAGS): Idem.
6426 * src/files.c: Fix a few warnings.
6427 (get_extension_index): Remove, unused.
6428
6429 2002-01-08 Akim Demaille <akim@epita.fr>
6430
6431 * src/getargs.c (AS_FILE_NAME): New.
6432 (getargs): Use it to convert DOSish file names.
6433 * src/files.c (base_name): Rename as full_base_name to avoid
6434 clashes with `base_name ()'.
6435 (filename_split): New.
6436 (compute_base_names): N-th rewrite, using filename_split.
6437
6438 2002-01-08 Akim Demaille <akim@epita.fr>
6439
6440 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
6441 New, stolen from the Fileutils 4.1.
6442 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6443 * configure.in: Check for the presence of memrchr, and of its
6444 prototype.
6445
6446 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
6447
6448 * lib/hash.h (__P): Added definition for this macro.
6449 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
6450 BUILT_SOURCES, to ensure they are generated first.
6451 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
6452 %error-verbose to allow bootstrapping with bison 1.30x.
6453
6454 2002-01-06 Akim Demaille <akim@epita.fr>
6455
6456 * src/reader.c (parse_braces): Don't fetch the next char, the
6457 convention is to fetch on entry.
6458 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
6459 'switch' without a following semicolon.
6460 * tests/regression.at (braces parsing): New.
6461
6462 2002-01-06 Akim Demaille <akim@epita.fr>
6463
6464 Bison is dead wrong in its RR conflict reports.
6465
6466 * tests/torture.at (GNU Cim Grammar): New.
6467 * src/conflicts.c (count_rr_conflicts): Fix.
6468
6469 2002-01-06 Akim Demaille <akim@epita.fr>
6470
6471 Creating package.m4 from configure.ac causes too many problems.
6472
6473 * tests/Makefile.am (package.m4): Create it by hand,
6474 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
6475
6476 2002-01-06 Akim Demaille <akim@epita.fr>
6477
6478 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
6479 skeleton.h.
6480
6481 2002-01-04 Paul Eggert <eggert@twinsun.com>
6482
6483 * doc/bison.texinfo (Debugging):
6484 Remove YYSTDERR; it's no longer defined or used.
6485 Also, s/cstdio.h/cstdio/.
6486
6487 2002-01-03 Akim Demaille <akim@epita.fr>
6488
6489 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
6490
6491 2002-01-03 Akim Demaille <akim@epita.fr>
6492
6493 * src/parse-skel.y (process_skeleton): Don't bind the parser's
6494 tracing code to --trace, wait for a better --trace option, with
6495 args.
6496
6497 2002-01-03 Akim Demaille <akim@epita.fr>
6498
6499 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
6500 The ISO C++ standard is extremely clear about it: stderr is
6501 considered a macro, not a regular symbol (see table 94 `Header
6502 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
6503 Therefore std:: does not apply to it. It still does with fprintf.
6504 Also, s/cstdio.h/cstdio/.
6505
6506 2002-01-03 Akim Demaille <akim@epita.fr>
6507
6508 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
6509 for non system headers.
6510
6511 2002-01-02 Akim Demaille <akim@epita.fr>
6512
6513 Equip the skeleton chain with location tracking, runtime trace,
6514 pure parser and scanner.
6515
6516 * src/parse-skel.y: Request a pure parser, locations, and prefix
6517 renaming.
6518 (%union): Having several members with the same type does not help
6519 type mismatches, simplify.
6520 (YYPRINT, yyprint): New.
6521 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
6522 (skel_error): this.
6523 Handle locations.
6524 * src/scan-skel.l: Adjust to these changes.
6525 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
6526 (LOCATION_PRINT, skel_control_t): New.
6527
6528 2001-12-30 Akim Demaille <akim@epita.fr>
6529
6530 * src/parse-skel.y: Get rid of the shift/reduce conflict:
6531 replace `gb' with BLANKS.
6532 * src/scan-skel.l: Adjust.
6533
6534 2001-12-30 Akim Demaille <akim@epita.fr>
6535
6536 * src/system.h: We don't need nor want bcopy.
6537 Throw away MS-DOS crap: we don't need getpid.
6538 * configure.in: We don't need strndup. It was even causing
6539 problems: because Flex includes the headers *before* us,
6540 _GNU_SOURCE is not defined by config.h, and therefore strndup was
6541 not visible.
6542 * lib/xstrndup.c: New.
6543 * src/scan-skel.l: Use it.
6544 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
6545 * src/parse-skel.y: Use %directives instead of #defines.
6546
6547 2001-12-30 Akim Demaille <akim@epita.fr>
6548
6549 * src/skeleton.h: New.
6550 * src/output.c (output_parser, output_master_parser): Remove, dead
6551 code.
6552 * src/output.h (get_lines_number, actions_output, guards_output)
6553 (token_definitions_output): Prototype them.
6554 * src/parse-skel.y: Add the license notice.
6555 Include output.h and skeleton.h.
6556 (process_skeleton): Returns void, and takes a single parameter.
6557 * src/scan-skel.l: Add the license notice.
6558 Include skeleton.h.
6559 Don't use %option yylineno: it seems that then Flex imagines
6560 REJECT has been used, and therefore it won't reallocate its
6561 buffers (which makes no other sense to me than a bug). It results
6562 in warnings for `unused: yy_flex_realloc'.
6563
6564 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
6565
6566 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6567 (MUSCLE_INSERT_PREFIX): ...to there.
6568 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6569 (MUSCLE_INSERT_PREFIX): Move from here...
6570
6571 * src/bison.hairy: Add a section directive. Put braces around muscle
6572 names. This parser skeleton is still broken, but Bison should not
6573 choke on a bad muscle 'syntax'.
6574 * src/bison.simple: Add a section directive. Put braces around muscle
6575 names.
6576
6577 * src/files.h (strsuffix, stringappend): Add declarations.
6578 (tab_extension): Add declaration.
6579 (short_base_name): Add declaration.
6580
6581 * src/files.c (strsuffix, stringappend): No longer static. These
6582 functions are used in the skeleton parser.
6583 (tab_extension): New.
6584 (compute_base_names): Use the computations done in this function
6585 to guess if the generated parsers should have '.tab' in their
6586 names.
6587 (short_base_name): No longer static.
6588
6589 * src/output.c (output_skeleton): New.
6590 (output): Disable call to output_master_parser, and give a try to
6591 a new skeleton handling system.
6592 (guards_output, actions_output): No longer static.
6593 (token_definitions_output, get_lines_number): No longer static.
6594
6595 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
6596
6597 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
6598 parse-skel.y.
6599
6600 * src/parse-skel.y: New file.
6601 * src/scan-skel.l: New file.
6602
6603 2001-12-29 Akim Demaille <akim@epita.fr>
6604
6605 %name-prefix is broken.
6606
6607 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
6608 Adjust all dependencies.
6609 * tests/headers.at (export YYLTYPE): Strengthen this test: use
6610 %name-prefix.
6611
6612 Renaming yylval but not yylloc is not consistent. Now we do.
6613
6614 * src/bison.simple: Prefix yylloc if used.
6615 * doc/bison.texinfo (Decl Summary): Document that.
6616
6617 2001-12-29 Akim Demaille <akim@epita.fr>
6618
6619 * doc/bison.texinfo: Promote `%long-directive' over
6620 `%long_directive'.
6621 Remove all references to fixed-output-files, yacc is enough.
6622
6623 2001-12-29 Akim Demaille <akim@epita.fr>
6624
6625 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
6626 user prologue. These are defaults.
6627 * tests/actions.at (Mid-rule actions): Make sure the user can
6628 define YYDEBUG and YYERROR_VERBOSE.
6629
6630 2001-12-29 Akim Demaille <akim@epita.fr>
6631
6632 * src/output.c (header_output): Don't forget to export YYLTYPE and
6633 yylloc.
6634 * tests/headers.at (export YYLTYPE): New, make sure it does.
6635 * tests/regression.at (%union and --defines, Invalid CPP headers):
6636 Move to...
6637 * tests/headers.at: here.
6638
6639 2001-12-29 Akim Demaille <akim@epita.fr>
6640
6641 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
6642
6643 2001-12-29 Akim Demaille <akim@epita.fr>
6644
6645 * tests/actions.at (Mid-rule actions): Output on a single line
6646 instead of several.
6647
6648 2001-12-29 Akim Demaille <akim@epita.fr>
6649
6650 * doc/bison.texinfo: Formatting changes.
6651
6652 2001-12-29 Akim Demaille <akim@epita.fr>
6653
6654 Don't store the token defs in a muscle, just be ready to output it
6655 on command. Now possible via `symbols'. Fixes a memory leak.
6656
6657 * src/output.c (token_definitions_output): New.
6658 (output_parser, header_output): Use it.
6659 * src/reader.c (symbols_save): Remove.
6660
6661 2001-12-29 Akim Demaille <akim@epita.fr>
6662
6663 * src/bison.simple: Do not provide a default for YYSTYPE and
6664 YYLTYPE before the user's prologue. Otherwise it's hardly... a
6665 default.
6666
6667 2001-12-29 Akim Demaille <akim@epita.fr>
6668
6669 Mid-rule actions are simply... ignored!
6670
6671 * src/reader.c (readgram): Be sure to attach mid-rule actions to
6672 the empty-rule associated to the dummy symbol, not to the host
6673 rule.
6674 * tests/actions.at (Mid-rule actions): New.
6675
6676 2001-12-29 Akim Demaille <akim@epita.fr>
6677
6678 Memory leak.
6679
6680 * src/reader.c (reader): Free grammar.
6681
6682 2001-12-29 Akim Demaille <akim@epita.fr>
6683
6684 Memory leak.
6685
6686 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
6687 since it allocates it for each state, although only one is needed.
6688 (allocate_storage): Do it here.
6689
6690 2001-12-29 Akim Demaille <akim@epita.fr>
6691
6692 * src/options.h, src/options.c (create_long_option_table): Rename
6693 as...
6694 (long_option_table_new): this, with a clearer prototype.
6695 (percent_table): Remove, unused,
6696 * src/getargs.c (getargs): Adjust.
6697
6698 2001-12-29 Akim Demaille <akim@epita.fr>
6699
6700 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
6701 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
6702 as states.
6703
6704 2001-12-29 Akim Demaille <akim@epita.fr>
6705
6706 * src/lalr.c (build_relations): Rename `states' as `states1'.
6707 Sorry, I don't understand exactly what it is, no better name...
6708
6709 2001-12-29 Akim Demaille <akim@epita.fr>
6710
6711 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
6712 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
6713 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
6714 as rules.
6715
6716 2001-12-29 Akim Demaille <akim@epita.fr>
6717
6718 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
6719 ago.
6720
6721 2001-12-29 Akim Demaille <akim@epita.fr>
6722
6723 * src/reader.c, src/reader.h (user_toknums): Remove.
6724 Adjust all users to use symbols[i]->user_token_number.
6725
6726 2001-12-29 Akim Demaille <akim@epita.fr>
6727
6728 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
6729 Adjust all users to use symbols[i]->prec or ->assoc.
6730
6731 2001-12-29 Akim Demaille <akim@epita.fr>
6732
6733 * src/reader.c, src/reader.h (tags): Remove.
6734 Adjust all users to use symbols[i]->tag.
6735
6736 2001-12-29 Akim Demaille <akim@epita.fr>
6737
6738 * src/gram.h, src/gram.c (symbols): New, similar to state_table
6739 and rule_table.
6740 * src/reader.c (packsymbols): Fill this table.
6741 Drop sprec.
6742 * src/conflicts.c (resolve_sr_conflict): Adjust.
6743 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
6744 single table.
6745 Use symbols[i]->tag instead of tags[i].
6746
6747 2001-12-29 Akim Demaille <akim@epita.fr>
6748
6749 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
6750 In addition, put a comment in there, to replace...
6751 * tests/regression.at (%union and C comments): Remove.
6752
6753 2001-12-29 Akim Demaille <akim@epita.fr>
6754
6755 * tests/regression.at (Web2c Actions): Blindly move the actual
6756 output as expected output. The contents *seem* right to me, but I
6757 can't pretend reading perfectly parser tables... Nonetheless, all
6758 the other tests pass correctly, the table look OK, even though the
6759 presence of `$axiom' is to be noted: AFAICS it is useless (but
6760 harmless).
6761
6762 2001-12-29 Akim Demaille <akim@epita.fr>
6763
6764 * src/reader.c (readgram): Don't add the rule 0 if there were no
6765 rules read. In other words, add it _after_ having performed
6766 grammar sanity checks.
6767 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6768
6769 2001-12-29 Akim Demaille <akim@epita.fr>
6770
6771 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6772 visible, and some states have now a different number.
6773
6774 2001-12-29 Akim Demaille <akim@epita.fr>
6775
6776 * src/reader.c (readgram): Bind the initial rule's lineno to that
6777 of the first rule.
6778 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6779 (Solved SR Conflicts): Adjust rule 0's line number.
6780
6781 2001-12-29 Akim Demaille <akim@epita.fr>
6782
6783 Fix the `GAWK Grammar' failure.
6784
6785 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6786 the reductions of the first state which was mistakenly confused
6787 with the final state because precisely final_state was initialized
6788 to 0.
6789 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6790 now noticed by Bison.
6791 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6792 have a reduction on $default.
6793
6794 2001-12-29 Akim Demaille <akim@epita.fr>
6795
6796 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6797 rule line numbers.
6798 * src/closure.c (print_closure): Likewise.
6799 * src/derives.c (print_derives): Likewise.
6800 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6801 now.
6802
6803 2001-12-29 Akim Demaille <akim@epita.fr>
6804
6805 * src/lalr.c (lookaheads_print): New.
6806 (lalr): Call it when --trace-flag.
6807 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6808 are dumped.
6809
6810 2001-12-29 Akim Demaille <akim@epita.fr>
6811
6812 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6813 when walking through ritem, even via rule->rhs.
6814 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6815 (useful_production, useless_nonterminals): Likewise.
6816 (reduce_grammar_tables): Likewise, plus update nritems.
6817 * src/nullable.c (set_nullable): Likewise.
6818 * src/lalr.c (build_relations): Likewise.
6819 * tests/sets.at (Nullable): Adjust.
6820 Fortunately, now, the $axiom is no longer nullable.
6821
6822 2001-12-29 Akim Demaille <akim@epita.fr>
6823
6824 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6825 the 0-sentinel.
6826 * src/gram.c (ritem_longest_rhs): Likewise.
6827 * src/reduce.c (nonterminals_reduce): Likewise.
6828 * src/print_graph.c (print_graph): Likewise.
6829 * src/output.c (output_rule_data): Likewise.
6830 * src/nullable.c (set_nullable): Likewise.
6831
6832 2001-12-29 Akim Demaille <akim@epita.fr>
6833
6834 * src/output.c: Comment changes.
6835
6836 2001-12-27 Paul Eggert <eggert@twinsun.com>
6837
6838 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6839 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6840 Sparc, as they were causing more porting problems than the
6841 (minor) performance improvement was worth.
6842
6843 Also, catch up with 1.31's YYSTD.
6844
6845 2001-12-27 Akim Demaille <akim@epita.fr>
6846
6847 * src/output.c (output_gram): Rely on nritems, not the
6848 0-sentinel. See below.
6849 Use -1 as separator, not 0.
6850 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6851 Rely on -1 as separator in yyrhs, instead of 0.
6852 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6853 twice `Now at end of input', therefore there are two lines less to
6854 expect.
6855
6856 2001-12-27 Akim Demaille <akim@epita.fr>
6857
6858 * tests/regression.at (Unresolved SR Conflicts):
6859 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6860 below.
6861
6862 2001-12-27 Akim Demaille <akim@epita.fr>
6863
6864 * src/LR0.c (new_state): Recognize the final state by the fact it
6865 is reached by eoftoken.
6866 (insert_start_shifting_state, insert_eof_shifting_state)
6867 (insert_accepting_state, augment_automaton): Remove, since now
6868 these states are automatically computed from the initial state.
6869 (generate_states): Adjust.
6870 * src/print.c: When reporting a rule number to the user, substract
6871 1, so that the axiom rule is rule 0, and the first user rule is 1.
6872 * src/reduce.c: Likewise.
6873 * src/print_graph.c (print_core): For the time being, just as for
6874 the report, depend upon --trace-flags to dump the full set of
6875 items.
6876 * src/reader.c (readgram): Once the grammar read, insert the rule
6877 0: `$axiom: START-SYMBOL $'.
6878 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6879 number of the states has changed (the final state is no longer
6880 necessarily the last), catch up.
6881
6882 2001-12-27 Akim Demaille <akim@epita.fr>
6883
6884 Try to make the use of the eoftoken valid. Given that its value
6885 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6886 is used instead of > 0 where appropriate, (ii), depend upon nritems
6887 instead of the 0-sentinel.
6888
6889 * src/gram.h, src/gram.c (nritems): New.
6890 Expected to be duplication of nitems, but for the time being...
6891 * src/reader.c (packgram): Assert nritems and nitems are equal.
6892 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6893 * src/closure.c (print_closure, print_fderives): Likewise.
6894 * src/gram.c (ritem_print): Likewise.
6895 * src/print.c (print_core, print_grammar): Likewise.
6896 * src/print_graph.c: Likewise.
6897
6898 2001-12-27 Akim Demaille <akim@epita.fr>
6899
6900 * src/main.c (main): If there are complains after grammar
6901 reductions, then output the report anyway if requested, then die.
6902 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6903 * src/reader.c (eoftoken): New.
6904 (parse_token_decl): If the token being defined has value `0', it
6905 is the eoftoken.
6906 (packsymbols): No longer hack `tags' to insert `$' by hand.
6907 Be sure to preserve the value of the eoftoken.
6908 (reader): Make sure eoftoken is defined.
6909 Initialize nsyms to 0: now eoftoken is created just like the others.
6910 * src/print.c (print_grammar): Don't special case the eof token.
6911 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6912 lie anyway, albeit pleasant.
6913 * tests/calc.at: Exercise error messages with eoftoken.
6914 Change the grammar so that empty input is invalid.
6915 Adjust expectations.
6916 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6917
6918 2001-12-27 Akim Demaille <akim@epita.fr>
6919
6920 * configure.in: Check the protos of strchr ans strspn.
6921 Replace strchr if needed.
6922 * src/system.h: Provide the protos of strchr, strspn and memchr if
6923 missing.
6924 * lib/strchr.c: New.
6925 * src/reader.c (symbols_save): Use strchr.
6926
6927 2001-12-27 Akim Demaille <akim@epita.fr>
6928
6929 * src/print.c, src/print_graph.c (escape): New.
6930 Use it to quote the TAGS outputs.
6931 * src/print_graph.c (print_state): Now errors are in red, and
6932 reductions in green.
6933 Prefer high to wide: output the state number on a line of its own.
6934
6935 2001-12-27 Akim Demaille <akim@epita.fr>
6936
6937 * src/state.h, src/state.c (reductions_new): New.
6938 * src/LR0.c (set_state_table): Let all the states have a
6939 `reductions', even if reduced to 0.
6940 (save_reductions): Adjust.
6941 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6942 * src/print.c (print_reductions, print_actions): Adjust.
6943 * src/output.c (action_row): Adjust.
6944
6945 2001-12-27 Akim Demaille <akim@epita.fr>
6946
6947 * src/state.h, src/state.c (errs_new, errs_dup): New.
6948 * src/LR0.c (set_state_table): Let all the states have an errs,
6949 even if reduced to 0.
6950 * src/print.c (print_errs, print_reductions): Adjust.
6951 * src/output.c (output_actions, action_row): Adjust.
6952 * src/conflicts.c (resolve_sr_conflict): Adjust.
6953
6954 2001-12-27 Akim Demaille <akim@epita.fr>
6955
6956 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6957
6958 2001-12-27 Akim Demaille <akim@epita.fr>
6959
6960 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6961 * src/print.c: here.
6962 (lookaheadset, shiftset): New, used as additional storage by
6963 print_reductions.
6964 (print_results): Adjust.
6965 (print_shifts, print_gotos, print_errs): New, extracted from...
6966 (print_actions): here.
6967 * src/print_graph.c (print_actions): Remove dead code.
6968
6969 2001-12-27 Akim Demaille <akim@epita.fr>
6970
6971 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6972 `$n' and `@n'.
6973
6974 2001-12-27 Akim Demaille <akim@epita.fr>
6975
6976 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6977 (build_relations): Adjust.
6978
6979 2001-12-27 Akim Demaille <akim@epita.fr>
6980
6981 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6982 duplication.
6983
6984 2001-12-27 Akim Demaille <akim@epita.fr>
6985
6986 * src/reader.c (packgram): Catch nitems overflows.
6987
6988 2001-12-27 Akim Demaille <akim@epita.fr>
6989
6990 * src/files.c, src/files.h (guard_obstack): Remove.
6991 * src/output.c (output): Adjust.
6992 * src/reader.c (parse_braces): New, factoring...
6993 (copy_action, copy_guard): these two which are renamed as...
6994 (parse_action, parse_guard): these.
6995 As a voluntary consequence, using braces around guards is now
6996 mandatory.
6997
6998 2001-12-27 Akim Demaille <akim@epita.fr>
6999
7000 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
7001 * src/reader.c (symbol_list): `guard' and `guard_line' are new
7002 members.
7003 (symbol_list_new): Adjust.
7004 (copy_action): action_line is the first line, not the last.
7005 (copy_guard): Just as for actions, store the `action' only, not
7006 the switch/case/break flesh.
7007 Don't parse the user action that might follow the guard, let...
7008 (readgram): do it, i.e., now, there can be an action after a
7009 guard.
7010 In other words the guard is just explicitly optional.
7011 (packgram): Adjust.
7012 * src/output.c (guards_output): New.
7013 (output_parser): Call it when needed.
7014 (output): Also free the guard and attrs obstacks.
7015 * src/files.c, src/files.h (obstack_save): Remove.
7016 (output_files): Remove.
7017 As a result, if one needs the former `.act' file, using an
7018 appropriate skeleton which requires actions and guards is now
7019 required.
7020 * src/main.c (main): Adjust.
7021 * tests/semantic.at: New.
7022 * tests/regression.at: Use `input.y' as input file name.
7023 Avoid 8+3 problems by requiring input.c when the test needs the
7024 parser.
7025
7026 2001-12-27 Akim Demaille <akim@epita.fr>
7027
7028 * src/reader.c (symbol_list_new): Be sure to initialize all the
7029 fields.
7030
7031 2001-12-27 Akim Demaille <akim@epita.fr>
7032
7033 All the hacks using a final pseudo state are now useless.
7034
7035 * src/LR0.c (set_state_table): state_table holds exactly nstates.
7036 * src/lalr.c (nLA): New.
7037 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
7038 instead of lookaheadsp from the pseudo state (nstate + 1).
7039
7040 2001-12-27 Akim Demaille <akim@epita.fr>
7041
7042 * src/output.c (action_row, token_actions): Use a state_t instead
7043 of a integer, and nlookaheads instead of the following state's
7044 lookaheadsp.
7045
7046 2001-12-27 Akim Demaille <akim@epita.fr>
7047
7048 * src/conflicts.c (log_resolution, flush_shift)
7049 (resolve_sr_conflict, set_conflicts, solve_conflicts)
7050 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
7051 (conflicts_print, print_reductions): Use a state_t instead of an
7052 integer when referring to a state.
7053 As much as possible, depend upon nlookaheads, instead of the
7054 `lookaheadsp' member of the following state (since lookaheads of
7055 successive states are successive, the difference between state n + 1
7056 and n served as the number of lookaheads for state n).
7057 * src/lalr.c (add_lookback_edge): Likewise.
7058 * src/print.c (print_core, print_actions, print_state)
7059 (print_results): Likewise.
7060 * src/print_graph.c (print_core, print_actions, print_state)
7061 (print_graph): Likewise.
7062 * src/conflicts.h: Adjust.
7063
7064 2001-12-27 Akim Demaille <akim@epita.fr>
7065
7066 * src/bison.hairy: Formatting/comment changes.
7067 ANSIfy.
7068 Remove `register' indications.
7069 Add plenty of `static'.
7070
7071 2001-12-27 Akim Demaille <akim@epita.fr>
7072
7073 * src/output.c (prepare): Drop the muscle `ntbase' which
7074 duplicates ntokens.
7075 * src/bison.simple: Formatting/comment changes.
7076 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
7077 is an undocumented synonym.
7078
7079 2001-12-22 Akim Demaille <akim@epita.fr>
7080
7081 * src/output.c (output_table_data): Change the prototype to use
7082 `int' for array ranges: some invocations do pass an int, not a
7083 short.
7084 Reported by Wayne Green.
7085
7086 2001-12-22 Akim Demaille <akim@epita.fr>
7087
7088 Some actions of web2c.y are improperly triggered.
7089 Reported by Mike Castle.
7090
7091 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
7092 * tests/regression.at (Web2c): Rename as...
7093 (Web2c Report): this.
7094 (Web2c Actions): New.
7095
7096 2001-12-22 Akim Demaille <akim@epita.fr>
7097
7098 Reductions in web2c.y are improperly reported.
7099 Reported by Mike Castle.
7100
7101 * src/conflicts.c (print_reductions): Fix.
7102 * tests/regression.at (Web2c): New.
7103
7104 2001-12-18 Akim Demaille <akim@epita.fr>
7105
7106 Some host fail on `assert (!"foo")', which expands to
7107 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
7108 Reported by Nelson Beebee.
7109
7110 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
7111 `#define it_succeeded 0' and `assert (it_succeeded)'.
7112
7113 2001-12-17 Marc Autret <autret_m@epita.fr>
7114
7115 * src/bison.simple: Don't hard code the skeleton line and filename.
7116 * src/output.c (output_parser): Rename 'line' as 'output_line'.
7117 New line counter 'skeleton_line' (skeleton-line muscle).
7118
7119 2001-12-17 Paul Eggert <eggert@twinsun.com>
7120
7121 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
7122 YYDEBUG must be defined to a nonzero value.
7123
7124 * src/bison.simple (yytname): Do not assume that the user defines
7125 YYDEBUG to a properly parenthesized expression.
7126
7127 2001-12-17 Akim Demaille <akim@epita.fr>
7128
7129 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
7130 nlookaheads is a new member.
7131 Adjust all users.
7132 * src/lalr.h (nlookaheads): Remove this orphan declaration.
7133 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
7134 state.
7135
7136 2001-12-17 Akim Demaille <akim@epita.fr>
7137
7138 * src/files.h, src/files.c (open_files, close_files): Remove.
7139 * src/main.c (main): Don't open/close files, nor invoke lex_free,
7140 let...
7141 * src/reader.c (reader): Do it.
7142
7143 2001-12-17 Akim Demaille <akim@epita.fr>
7144
7145 * src/conflicts.c (print_reductions): Formatting changes.
7146
7147 2001-12-17 Akim Demaille <akim@epita.fr>
7148
7149 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
7150 (flush_reduce): New.
7151 (resolve_sr_conflict): Adjust.
7152
7153 2001-12-17 Akim Demaille <akim@epita.fr>
7154
7155 * src/output.c (output_obstack): Be static and rename as...
7156 (format_obstack): this, to avoid any confusion with files.c's
7157 output_obstack.
7158 * src/reader.h (muscle_obstack): Move to...
7159 * src/output.h: here, since it's defined in output.c.
7160
7161 2001-12-17 Akim Demaille <akim@epita.fr>
7162
7163 * src/output.c (action_row, save_column, default_goto)
7164 (sort_actions, matching_state, pack_vector): Better variable
7165 locality.
7166
7167 2001-12-17 Akim Demaille <akim@epita.fr>
7168
7169 * src/output.c: Various formatting changes.
7170
7171 2001-12-17 Akim Demaille <akim@epita.fr>
7172
7173 * src/files.c (output_files): Free the output_obstack.
7174 * src/main.c (main): Call print and print_graph conditionally.
7175 * src/print.c (print): Work unconditionally.
7176 * src/print_graph.c (print_graph): Work unconditionally.
7177 * src/conflicts.c (log_resolution): Output only if verbose_flag.
7178
7179 2001-12-16 Marc Autret <autret_m@epita.fr>
7180
7181 * src/output.c (actions_output): Fix. When we use %no-lines,
7182 there is one less line per action.
7183
7184 2001-12-16 Marc Autret <autret_m@epita.fr>
7185
7186 * src/bison.simple: Remove a useless #line directive.
7187 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
7188 * src/output.c (get_lines_number): New.
7189 (output_parser): Adjust, now takes care about the lines of a
7190 output muscles.
7191 Fix line numbering.
7192 (actions_output): Computes the number of lines taken by actions.
7193 (output_master_parser): Insert new skeleton which is the name of
7194 the output parser file name.
7195
7196 2001-12-15 Marc Autret <autret_m@epita.fr>
7197
7198 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
7199
7200 2001-12-15 Marc Autret <autret_m@epita.fr>
7201
7202 * src/output.c (output_gram): Keep track of the hairy one.
7203
7204 2001-12-15 Akim Demaille <akim@epita.fr>
7205
7206 Make `make distcheck' work.
7207
7208 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
7209 system.h which uses libgettext.h.
7210
7211 2001-12-15 Akim Demaille <akim@epita.fr>
7212
7213 * src/nullable.c (set_nullable): Useless rules must be skipped,
7214 otherwise, since we range over their symbols, we might look at a
7215 nonterminal which no longer ``exists'', i.e., it is not counted in
7216 `nvars', hence we overflow our arrays.
7217
7218 2001-12-15 Akim Demaille <akim@epita.fr>
7219
7220 The header can also be produced directly, without any obstack!
7221 Yahoo!
7222
7223 * src/files.c, src/files.h (defines_obstack): Remove.
7224 (compute_header_macro): Global.
7225 (defines_obstack_save): Remove.
7226 * src/reader.c (parse_union_decl): No longer output to
7227 defines_obstack: its content can be found in the `stype' muscle
7228 anyway.
7229 (output_token_translations): Merge into...
7230 (symbols_output): this.
7231 Rename as...
7232 (symbols_save): this.
7233 (reader): Adjust.
7234 * src/output.c (header_output): New.
7235 (output): Call it.
7236
7237 2001-12-15 Akim Demaille <akim@epita.fr>
7238
7239 * src/reader.c (parse_union_decl): Instead of handling two obstack
7240 simultaneously, use one to define the `stype' muscle, and use the
7241 value of the latter to fill defines_obstack.
7242 (copy_comment): Remove.
7243 (copy_comment2): Work for a single obstack.
7244 Rename as...
7245 (copy_comment): this.
7246
7247 2001-12-15 Akim Demaille <akim@epita.fr>
7248
7249 * src/lex.c, src/lex.h (xgetc): No longer static.
7250 * src/reader.c (parse_union_decl): Revamp.
7251
7252 2001-12-15 Akim Demaille <akim@epita.fr>
7253
7254 Still making progress in separating Bison into (i) input, (ii)
7255 process, (iii) output: now we can directly output the parser file
7256 without using table_obstack at all.
7257
7258 * src/files.c, src/files.h (table_obstack): Bye bye.
7259 (parser_file_name): New.
7260 * src/files.c (compute_output_file_names): Compute it.
7261 * src/output.c (actions_output, output_parser)
7262 (output_master_parser): To a file instead of an obstack.
7263
7264 2001-12-15 Akim Demaille <akim@epita.fr>
7265
7266 Attach actions to rules, instead of pre-outputting them to
7267 actions_obstack.
7268
7269 * src/gram.h (rule_t): action and action_line are new members.
7270 * src/reader.c (symbol_list): Likewise.
7271 (copy_action): Save the actions within the rule.
7272 (packgram): Save them in rule_table.
7273 * src/output.c (actions_output): New.
7274 (output_parser): Use it on `%%actions'.
7275 (output_rule_data): Don't free rule_table.
7276 (output): Do it.
7277 (prepare): Don't save the `action' muscle.
7278 * src/bison.simple: s/%%action/%%actions/.
7279
7280 2001-12-15 Akim Demaille <akim@epita.fr>
7281
7282 * src/reader.c (copy_action): When --yacc, don't append a `;'
7283 to the user action: let it fail if lacking.
7284 Suggested by Arnold Robbins and Tom Tromey.
7285
7286 2001-12-14 Akim Demaille <akim@epita.fr>
7287
7288 * src/lex.c (literalchar): Simply return the char you decoded, non
7289 longer mess around with obstacks and int pointers.
7290 Adjust all callers.
7291
7292 2001-12-14 Akim Demaille <akim@epita.fr>
7293
7294 * src/lex.c (literalchar): Don't escape the special characters,
7295 just decode them, and keep them as char (before, eol was output as
7296 the 2 char string `\n' etc.).
7297 * src/output.c (output_rule_data): Use quotearg to output the
7298 token strings.
7299
7300 2001-12-13 Paul Eggert <eggert@twinsun.com>
7301
7302 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
7303 Do not infringe on the global user namespace when using C++.
7304 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
7305 All uses of `fprintf' and `stderr' changed.
7306
7307 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
7308
7309 2001-12-13 Akim Demaille <akim@epita.fr>
7310
7311 The computation of nullable is broken: it doesn't handle empty
7312 RHS's properly.
7313
7314 * tests/torture.at (GNU AWK Grammar): New.
7315 * tests/sets.at (Nullable): New.
7316 * src/nullable.c (set_nullable): Instead of blindly looping over
7317 `ritems', loop over the rules, and then over their rhs's.
7318
7319 Work around Autotest bugs.
7320
7321 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
7322 frame, because Autotest understand lines starting with a `+' as
7323 traces from the shell. Then, they are not processed properly.
7324 Admittedly an Autotest bug, but we don't have time to wait for
7325 Autotest to catch up.
7326 * tests/regression.at (Broken Closure): Adjust to the new table
7327 frames.
7328 Move to...
7329 * tests/sets.at: here.
7330
7331 2001-12-13 Akim Demaille <akim@epita.fr>
7332
7333 * src/closure.c (closure): Use nrules instead of playing tricks
7334 with BITS_PER_WORD.
7335
7336 2001-12-13 Akim Demaille <akim@epita.fr>
7337
7338 * src/print.c (print_actions): Output the handling of `$' as the
7339 traces do: shifting the token EOF. Before EOF was treated as a
7340 nonterminal.
7341 * tests/regression.at: Adjust some tests.
7342 * src/print_graph.c (print_core): Complete the set of items via
7343 closure. The next-to-final and final states are still unsatisfying,
7344 but that's to be addressed elsewhere.
7345 No longer output the rule numbers, but do output the state number.
7346 A single loop for the shifts + gotos is enough, but picked a
7347 distinct color for each.
7348 (print_graph): Initialize and finalize closure.
7349
7350 2001-12-13 Akim Demaille <akim@epita.fr>
7351
7352 * src/reader.c (readgram): Remove dead code, an strip useless
7353 braces.
7354 (get_type): Remove, unused.
7355
7356 2001-12-12 Akim Demaille <akim@epita.fr>
7357
7358 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
7359 on that of lib/error.c.
7360
7361 2001-12-12 Akim Demaille <akim@epita.fr>
7362
7363 Some hosts don't like `/' in includes.
7364
7365 * src/system.h: Include libgettext.h without qualifying the path.
7366 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
7367 $(top_srcdir).
7368
7369 2001-12-11 Marc Autret <autret_m@epita.fr>
7370
7371 * src/output.c (output_parser): Remove useless muscle.
7372
7373 2001-12-11 Marc Autret <autret_m@epita.fr>
7374
7375 * src/bison.simple: Remove #line just before %%epilogue. It
7376 is now handled in ...
7377 * src/reader.c (read_additionnal_code): Add the output of a
7378 #line for the epilogue.
7379
7380 2001-12-10 Marc Autret <autret_m@epita.fr>
7381
7382 * src/reader.c (copy_definition): Re-use CPP-outed code which
7383 replace precedent remove.
7384 * src/bison.simple: Remove #line before %%prologue because
7385 %%input-line is wrong at this time.
7386
7387 2001-12-10 Marc Autret <autret_m@epita.fr>
7388
7389 * src/reader.c (symbols_output): Clean up.
7390 * src/output.c (output_gram, output): Clean up.
7391
7392 2001-12-10 Akim Demaille <akim@epita.fr>
7393
7394 * src/lalr.c (initialize_lookaheads): New. Extracted from...
7395 * src/LR0.c (set_state_table): here.
7396 * src/lalr.c (lalr): Call it.
7397
7398 2001-12-10 Akim Demaille <akim@epita.fr>
7399
7400 * src/state.h (shifts): Remove the `number' member: shifts are
7401 attached to state, hence no longer need to be labelled with a
7402 state number.
7403
7404 2001-12-10 Akim Demaille <akim@epita.fr>
7405
7406 Now that states have a complete set of members, the linked list of
7407 shifts is useless: just fill directly the state's shifts member.
7408
7409 * src/state.h (shifts): Remove the `next' member.
7410 * src/LR0.c (first_state, last_state): Remove.
7411 Adjust the callers.
7412 (augment_automaton): Don't look for the shifts that must be added
7413 a shift on EOF: it is those of the state we looked for! But now,
7414 since shifts are attached, it is no longer needed to looking
7415 merely by its id: its number.
7416
7417 2001-12-10 Akim Demaille <akim@epita.fr>
7418
7419 * src/LR0.c (augment_automaton): Better variable locality.
7420 Remove an impossible branch: if there is a state corresponding to
7421 the start symbol being shifted, then there is shift for the start
7422 symbol from the initial state.
7423
7424 2001-12-10 Akim Demaille <akim@epita.fr>
7425
7426 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
7427 only when appropriate: when insert_start_shifting_state' is not
7428 invoked.
7429 * tests/regression.at (Rule Line Numbers): Adjust.
7430
7431 2001-12-10 Akim Demaille <akim@epita.fr>
7432
7433 * src/LR0.c (augment_automaton): Now that all states have shifts,
7434 merge the two cases addition shifts to the initial state.
7435
7436 2001-12-10 Akim Demaille <akim@epita.fr>
7437
7438 * src/lalr.c (set_state_table): Move to...
7439 * src/LR0.c: here.
7440 * src/lalr.c (lalr): Don't call it...
7441 * src/LR0.c (generate_states): do it.
7442 * src/LR0.h (first_state): Remove, only the table is used.
7443
7444 2001-12-10 Akim Demaille <akim@epita.fr>
7445
7446 * src/LR0.h (first_shift, first_reduction): Remove.
7447 * src/lalr.c: Don't use first_shift: find shifts through the
7448 states.
7449
7450 2001-12-10 Akim Demaille <akim@epita.fr>
7451
7452 * src/LR0.c: Attach shifts to states as soon as they are
7453 computed.
7454 * src/lalr.c (set_state_table): Instead of assigning shifts to
7455 state, just assert that the mapping was properly done.
7456
7457 2001-12-10 Akim Demaille <akim@epita.fr>
7458
7459 * src/LR0.c (insert_start_shift): Rename as...
7460 (insert_start_shifting_state): this.
7461 (insert_eof_shifting_state, insert_accepting_state): New.
7462 (augment_automaton): Adjust.
7463 Better locality of the variables.
7464 When looking if the start_symbol is shifted from the initial
7465 state, using `while (... symbol != start_symbol ...)' sounds
7466 better than `while (... symbol < start_symbol ...)': If fail
7467 to see how the order between symbols could be relevant!
7468
7469 2001-12-10 Akim Demaille <akim@epita.fr>
7470
7471 * src/getargs.h: Don't declare `spec_name_prefix' and
7472 `spec_file_prefix', declared by src/files.h.
7473 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
7474 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
7475 * src/output.c (prepare): Adjust.
7476 * src/reader.c (symbols_output): Likewise.
7477 * src/vmsgetargs.c: Vaguely adjust, but who cares?
7478
7479 2001-12-10 Akim Demaille <akim@epita.fr>
7480
7481 * src/muscle_tab.c (muscle_init): NULL is a better default than
7482 `"0"'.
7483
7484 2001-12-10 Akim Demaille <akim@epita.fr>
7485
7486 * src/reader.c (reader): Calling symbols_output once is enough.
7487
7488 2001-12-10 Akim Demaille <akim@epita.fr>
7489
7490 Now that states have a complete set of members, the linked list of
7491 reductions is useless: just fill directly the state's reductions
7492 member.
7493
7494 * src/state.h (struct reductions): Remove member `number' and
7495 `next'.
7496 * src/LR0.c (first_reduction, last_reduction): Remove.
7497 (save_reductions): Don't link the new reductions, store them in
7498 this_state.
7499 * src/lalr.c (set_state_table): No need to attach reductions to
7500 states, it's already done.
7501 * src/output.c (output_actions): No longer free the shifts, then
7502 the reductions, then the states: free all the states and their
7503 members.
7504
7505 2001-12-10 Akim Demaille <akim@epita.fr>
7506
7507 * src/options.c (OPTN, DRTV, BOTH): New.
7508 (option_table): Use them.
7509
7510 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
7511 the job of system.h.
7512 * src/options.c: Don't include stdio.h and xalloc.h for the same
7513 reasons.
7514
7515 2001-12-10 Akim Demaille <akim@epita.fr>
7516
7517 * src/output.c (output, prepare): Make sure the values of the
7518 muscles `action' and `prologue' are 0-terminated.
7519
7520 2001-12-10 Akim Demaille <akim@epita.fr>
7521
7522 Clean up GCC warnings.
7523
7524 * src/reader.c (copy_action): `buf' is not used.
7525 (parse_skel_decl): Be static.
7526 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
7527 * src/options.h (create_long_option_table): Have a real prototype.
7528 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
7529 (hash_delete_at): Return const void *.
7530 Adjust casts to preserve the const.
7531
7532 2001-12-10 Akim Demaille <akim@epita.fr>
7533
7534 * configure.in: Require 2.52g.
7535 M4 is not needed, but AUTOM4TE is.
7536 * m4/m4.m4: Remove.
7537 * tests/Makefile.am: Adjust.
7538
7539 2001-12-10 Akim Demaille <akim@epita.fr>
7540
7541 One structure for states is enough, even though theoretically
7542 there are LR(0) states and LALR(1) states.
7543
7544 * src/lalr.h (state_t): Remove.
7545 (state_table): Be state_t **, not state_t *.
7546 * src/state.h (core, CORE_ALLOC): Rename as...
7547 (state_t, STATE_ALLOC): this.
7548 Add the LALR(1) members: shifts, reductions, errs.
7549 * src/LR0.c (state_table): Rename as...
7550 (state_hash): this, to avoid name clashes with the global
7551 `state_table'.
7552 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
7553 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
7554
7555 2001-12-10 Akim Demaille <akim@epita.fr>
7556
7557 Bison dumps core on bash.y.
7558 Reported by Pascal Bart.
7559
7560 * src/warshall.c (bitmatrix_print): New.
7561 (TC): Use it.
7562 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
7563 j must be the outer loop.
7564 * tests/regression.at (Broken Closure): New.
7565
7566 2001-12-05 Akim Demaille <akim@epita.fr>
7567
7568 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
7569 its argument.
7570 Reported by Peter Hamorsky.
7571
7572 2001-12-05 Akim Demaille <akim@epita.fr>
7573
7574 * src/conflicts.c (err_table): Remove.
7575 (resolve_sr_conflict): Adjust.
7576 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
7577 Rename as...
7578 (state_t.reductions, state_t.shifts): this.
7579
7580 2001-12-05 Akim Demaille <akim@epita.fr>
7581
7582 * src/reduce.c (reduce_grammar_tables): No longer disable the
7583 removal of useless rules via CPP but via `if (0)', so that the
7584 compiler still check the code is valid.
7585 For instance, it should have noticed `rline' no longer exists: use
7586 the `line' member of rule_t.
7587 * src/gram.c (dummy, rline): Remove, unused.
7588
7589 2001-12-05 Akim Demaille <akim@epita.fr>
7590
7591 * src/output.c (pack_vector): Use assert, not berror.
7592 * src/main.c (berror): Remove, unused.
7593
7594 2001-12-05 Akim Demaille <akim@epita.fr>
7595
7596 New experimental feature: if --verbose --trace output all the
7597 items of a state, not only its kernel.
7598
7599 * src/print.c (print_core): If `trace_flag', then invoke closure
7600 before outputting the items of the state (print_core is no longer
7601 a correct name them).
7602 (print_results): Invoke new_closure/free_closure if needed.
7603
7604 2001-12-05 Akim Demaille <akim@epita.fr>
7605
7606 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
7607 * src/closure.c, src/closure.h (itemsetsize): Rename as...
7608 (nitemset): for consistency with the rest of the project.
7609
7610 2001-12-05 Akim Demaille <akim@epita.fr>
7611
7612 * src/closure.c (print_closure): Improve.
7613 (closure): Use it for printing input and output.
7614
7615 2001-12-05 Akim Demaille <akim@epita.fr>
7616
7617 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
7618 indexed by nonterminals.
7619
7620 2001-12-05 Akim Demaille <akim@epita.fr>
7621
7622 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
7623 what it was!).
7624 * src/warshall.h: Remove accidental duplication of the content.
7625
7626 2001-12-05 Akim Demaille <akim@epita.fr>
7627
7628 * src/closure.c (set_fderives): De-obfuscate.
7629
7630 2001-12-05 Akim Demaille <akim@epita.fr>
7631
7632 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
7633
7634 2001-12-05 Akim Demaille <akim@epita.fr>
7635
7636 * src/closure.c (set_firsts): De-obfuscate.
7637
7638 2001-12-05 Akim Demaille <akim@epita.fr>
7639
7640 * src/output.c (action_row): De-obfuscate
7641 using the good o' techniques: arrays not pointers, variable
7642 locality, BITISSET, RESETBIT etc.
7643
7644 2001-12-05 Akim Demaille <akim@epita.fr>
7645
7646 Pessimize the code to simplify it: from now on, all the states
7647 have a valid SHIFTS, which NSHIFTS is possibly 0.
7648
7649 * src/LR0.c (shifts_new): Be global and move to..
7650 * src/state.c, src/state.h: here.
7651 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
7652 * src/print_graph: Adjust.
7653
7654 2001-12-05 Akim Demaille <akim@epita.fr>
7655
7656 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
7657 * src/conflicts.c: Use it.
7658 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
7659 incorrectly ``simplified''.
7660
7661 2001-12-05 Akim Demaille <akim@epita.fr>
7662
7663 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
7664 using the good o' techniques: arrays not pointers, variable
7665 locality, BITISSET, RESETBIT etc.
7666
7667 2001-12-05 Akim Demaille <akim@epita.fr>
7668
7669 * src/state.h (SHIFT_SYMBOL): New.
7670 * src/conflicts.c: Use it to deobfuscate.
7671
7672 2001-12-05 Akim Demaille <akim@epita.fr>
7673
7674 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
7675 (print_reductions): De-obfuscate using the good o' techniques:
7676 arrays not pointers, variable locality, BITISSET.
7677
7678 2001-12-05 Akim Demaille <akim@epita.fr>
7679
7680 * src/conflicts.c (print_reductions): Arrays, not pointers.
7681 Use BITISSET.
7682
7683 2001-12-05 Akim Demaille <akim@epita.fr>
7684
7685 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7686
7687 2001-12-05 Akim Demaille <akim@epita.fr>
7688
7689 * src/conflicts.c (print_reductions): Improve variable locality.
7690
7691 2001-12-05 Akim Demaille <akim@epita.fr>
7692
7693 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7694
7695 2001-12-05 Akim Demaille <akim@epita.fr>
7696
7697 * src/conflicts.c (print_reductions): Improve variable locality.
7698
7699 2001-12-05 Akim Demaille <akim@epita.fr>
7700
7701 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
7702 * src/lalr.c: Use them.
7703
7704 2001-12-05 Akim Demaille <akim@epita.fr>
7705
7706 * src/LR0.c (augment_automaton): Formatting changes.
7707 Better variable locality.
7708
7709 2001-12-05 Akim Demaille <akim@epita.fr>
7710
7711 * src/lalr.c (matrix_print): New.
7712 (transpose): Use it.
7713 Use arrays instead of pointers.
7714
7715 2001-12-05 Akim Demaille <akim@epita.fr>
7716
7717 * src/lalr.c (maxrhs): Move to...
7718 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
7719 * src/lalr.c (build_relations): Adjust.
7720
7721 2001-12-05 Akim Demaille <akim@epita.fr>
7722
7723 * src/lalr.c (transpose): Free the memory allocated to the
7724 argument, as it is replaced by the results by the unique caller.
7725 (build_relations): Merely invoke transpose: it handles the memory
7726 deallocation.
7727 Improve variable locality.
7728 Avoid variables used as mere abbreviations.
7729 (compute_lookaheads): Use arrays instead of pointers.
7730
7731 2001-12-05 Akim Demaille <akim@epita.fr>
7732
7733 * src/lalr.c (initialize_F): Improve variable locality.
7734 Avoid variables used as mere abbreviations.
7735
7736 2001-12-05 Akim Demaille <akim@epita.fr>
7737
7738 * src/derives.c (print_derives): Display the ruleno.
7739 * src/lalr.c (initialize_F, transpose): Better variable locality
7740 to improve readability.
7741 Avoid variables used as mere abbreviations.
7742
7743 2001-12-05 Akim Demaille <akim@epita.fr>
7744
7745 * src/lalr.c (traverse): Use arrays instead of pointers.
7746
7747 2001-12-05 Akim Demaille <akim@epita.fr>
7748
7749 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
7750 the handling of squeue.
7751 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7752
7753 2001-12-05 Akim Demaille <akim@epita.fr>
7754
7755 Because useless nonterminals are now kept alive (instead of being
7756 `destroyed'), we now sometimes examine them, and store information
7757 related to them. Hence we need to know their number, and adjust
7758 memory allocations.
7759
7760 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7761 static.
7762 * src/LR0.c (allocate_itemsets): The memory allocated to
7763 `symbol_count' was used for two different purpose: once to count
7764 the number of occurrences of each symbol, and later reassigned to
7765 `shift_symbol', containing the symbol that can be shifted from a
7766 given state.
7767 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7768 only, and...
7769 (new_itemsets): Allocate `shift_symbol' here.
7770 (allocate_itemsets): symbol_count includes useless nonterminals.
7771 Make room for them.
7772 (free_storage): Use `free', not `XFREE', for pointers that cannot
7773 be null.
7774
7775 2001-12-05 Akim Demaille <akim@epita.fr>
7776
7777 * src/nullable.c (set_nullable): Deobfuscate the handling of
7778 ritem.
7779 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7780
7781 2001-12-05 Akim Demaille <akim@epita.fr>
7782
7783 * src/gram.c, src/gram.h (ritem_print): New.
7784 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7785 (This useless function was defined only to work around VMS linkers
7786 that can't handle compilation units with variables only).
7787 * src/reduce.c (dump_grammar): Use it to trace the construction of
7788 ritem.
7789
7790 2001-12-04 Paul Eggert <eggert@twinsun.com>
7791
7792 * src/bison.simple (union yyalloc): Change member names
7793 to be the same as the stack names.
7794 (yyparse): yyptr is now union yyalloc *, not char *.
7795 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7796 and may generate better code on some machines.
7797 (yystpcpy): Use prototype if __STDC__ is defined, not just
7798 if __cplusplus is defined.
7799
7800 2001-11-30 Akim Demaille <akim@epita.fr>
7801
7802 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7803 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7804 Gettext doesn't compile cleanly, and dies with -Werror.
7805 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7806 Include WARNING_CFLAGS here.
7807 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7808 before being defined.
7809
7810 2001-11-27 Paul Eggert <eggert@twinsun.com>
7811
7812 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7813 First arg is int, not unsigned.
7814 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7815 (SIZE_MAX, UINT_MAX): New macros.
7816 (quotearg_n_options): Abort if N is negative.
7817 Avoid overflow check on hosts where size_t is 64 bits and int
7818 is 32 bits, as overflow is impossible there.
7819 Fix off-by-one typo that caused unnecessary reallocation.
7820
7821 2001-11-29 Paul Eggert <eggert@twinsun.com>
7822
7823 Name space cleanup in generated parser.
7824
7825 * doc/bison.texinfo (Bison Parser): Discuss system headers
7826 and their effect on the user name space.
7827
7828 * src/bison.simple:
7829 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7830 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7831 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7832
7833 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7834 on user names when possible.
7835
7836 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7837 Simplify test for whather <alloca.h> exists.
7838
7839 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7840
7841 (<stdio.h>): Include if YYDEBUG.
7842
7843 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7844 ! defined (yyoverflow) && ! defined (yymemcpy).
7845
7846 (yymemcpy, yyparse): Rename local variables as needed so that
7847 they all begin with 'yy'.
7848
7849 (yystrlen, yystpcpy): New functions.
7850
7851 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7852 All uses changed.
7853
7854 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7855 instead of relying on string.h functions. Use YYSTACK_ALLOC
7856 and YYSTACK_FREE instead of malloc and free.
7857
7858 2001-11-30 Akim Demaille <akim@epita.fr>
7859
7860 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7861 before their first uses.
7862 (YYBISON, YYPURE): Move to the top of the output.
7863
7864 2001-11-30 Akim Demaille <akim@epita.fr>
7865
7866 * tests/reduce.at (Useless Nonterminals): Fix.
7867
7868 2001-11-30 Akim Demaille <akim@epita.fr>
7869
7870 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7871 if body instead of `;' to pacify GCC's warnings.
7872
7873 2001-11-30 Akim Demaille <akim@epita.fr>
7874
7875 Instead of mapping the LHS of unused rules to -1, keep the LHS
7876 valid, but flag the rules as invalid.
7877
7878 * src/gram.h (rule_t): `useful' is a new member.
7879 * src/print.c (print_grammar): Adjust.
7880 * src/derives.c (set_derives): Likewise.
7881 * src/reader.c (packgram, reduce_output): Likewise.
7882 * src/reduce.c (reduce_grammar_tables): Likewise.
7883 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7884
7885 2001-11-30 Akim Demaille <akim@epita.fr>
7886
7887 * src/reduce.c (reduce_output): Formatting changes.
7888 * src/print.c (print_results, print_grammar): Likewise.
7889 * tests/regression.at (Rule Line Numbers)
7890 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7891
7892 2001-11-30 Akim Demaille <akim@epita.fr>
7893
7894 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7895 useless nonterminals, move them at the end of the symbol arrays.
7896 (reduce_output): Adjust.
7897 * tests/reduce.at (Useless Nonterminals): Adjust.
7898
7899 2001-11-30 Akim Demaille <akim@epita.fr>
7900
7901 * src/reduce.c: Various comment/formatting changes.
7902 (nonterminals_reduce): New, extracted from...
7903 (reduce_grammar_tables): here.
7904 (reduce_grammar): Call nonterminals_reduce.
7905
7906 2001-11-29 Paul Eggert <eggert@twinsun.com>
7907
7908 * src/bison.simple (YYSTACK_REALLOC): Remove.
7909 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7910 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7911 New macros.
7912 (union yyalloc): New type.
7913 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7914 an arbitrary restriction on hosts where size_t is wider than int.
7915
7916 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7917 a parser stack overflow. Allocate just one block of memory for all
7918 three stacks, instead of allocating three blocks; this typically is
7919 faster and reduces fragmentation.
7920
7921 Do not limit the number of items in the stack to a value that fits
7922 in 'int', as this is an arbitrary limit on hosts with 64-bit
7923 size_t and 32-bit int.
7924
7925 2001-11-29 Marc Autret <autret_m@epita.fr>
7926
7927 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7928 of defining YYERROR_VERBOSE.
7929 [AT_DATA]: $4 is now out of C declarations in the prologue.
7930
7931 2001-11-28 Marc Autret <autret_m@epita.fr>
7932
7933 * src/reader.c (parse_dquoted_param): New.
7934 (parse_skel_decl): Use it.
7935 * src/lex.h: Add its prototype.
7936 * src/lex.c (literalchar): Become not static.
7937
7938 2001-11-28 Marc Autret <autret_m@epita.fr>
7939
7940 * src/output.h: And put its extern declaration here.
7941 * src/output.c (error_verbose): Define here.
7942 (prepare): Echo name modification.
7943 * src/getargs.h: Clean its extern declaration.
7944 * src/getargs.c (error_verbose_flag): Remove.
7945 (getargs): Remove case 'e'.
7946 * src/options.c (option_table): 'error-verbose' is now seen as simple
7947 percent option.
7948 Include output.h.
7949
7950 * src/reader.c (read_declarations): Remove case tok_include.
7951 (parse_include_decl): Remove.
7952 * src/lex.h (token_t): Remove tok_include.
7953 * src/options.c (option_table): 'include' is now a simple command line
7954 option.
7955
7956 2001-11-28 Marc Autret <autret_m@epita.fr>
7957
7958 * src/bison.simple: Adjust muscle names.
7959 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7960 * src/output.c (prepare): s/_/-/ for the muscles names.
7961 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7962
7963 2001-11-28 Marc Autret <autret_m@epita.fr>
7964
7965 * src/bison.simple: Fix debug.
7966 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7967
7968 2001-11-28 Akim Demaille <akim@epita.fr>
7969
7970 * src/LR0.c (shifts_new): New.
7971 (save_shifts, insert_start_shift, augment_automaton): Use it.
7972
7973 2001-11-28 Akim Demaille <akim@epita.fr>
7974
7975 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7976 keep ruleno only.
7977
7978 2001-11-28 Akim Demaille <akim@epita.fr>
7979
7980 * src/closure.c (closure): Instead of looping over word in array
7981 then bits in words, loop over bits in array.
7982
7983 2001-11-28 Akim Demaille <akim@epita.fr>
7984
7985 * src/closure.c (closure): No longer optimize the special case
7986 where all the bits of `ruleset[r]' are set to 0, to make the code
7987 clearer.
7988
7989 2001-11-28 Akim Demaille <akim@epita.fr>
7990
7991 * src/closure.c (closure): `r' and `c' are new variables, used to
7992 de-obfuscate accesses to RULESET and CORE.
7993
7994 2001-11-28 Akim Demaille <akim@epita.fr>
7995
7996 * src/reduce.c (reduce_print): Use ngettext.
7997 (dump_grammar): Improve the trace accuracy.
7998
7999 2001-11-28 Akim Demaille <akim@epita.fr>
8000
8001 * src/reduce.c (dump_grammar): Don't translate trace messages.
8002
8003 2001-11-28 Akim Demaille <akim@epita.fr>
8004
8005 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
8006 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
8007 as all tags are free'ed afterwards.
8008 From Enrico Scholz.
8009
8010 2001-11-27 Paul Eggert <eggert@twinsun.com>
8011
8012 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
8013 use alloca when we didn't want to, and vice versa.
8014
8015 2001-11-27 Marc Autret <autret_m@epita.fr>
8016
8017 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
8018 initialization.
8019 * src/output.c (prepare): Remove its update.
8020
8021 2001-11-27 Marc Autret <autret_m@epita.fr>
8022
8023 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
8024 Use %error-verbose.
8025
8026 2001-11-27 Marc Autret <autret_m@epita.fr>
8027
8028 * src/bison.simple: Remove YYERROR_VERBOSE using.
8029 Use %%error_verbose.
8030 (yyparse): Likewise.
8031 * src/output.c (prepare): Give its final value.
8032 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
8033 * src/getargs.h: Add its extern declaration.
8034 * src/getargs.c (error_verbose_flag): New int.
8035 (getargs): Update to catch new case.
8036 * src/options.c (option_table): 'error-verbose' is a new option.
8037 (shortopts): Update.
8038
8039 2001-11-27 Akim Demaille <akim@epita.fr>
8040
8041 * src/system.h: Use intl/libgettext.h.
8042 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
8043
8044 2001-11-27 Akim Demaille <akim@epita.fr>
8045
8046 * tests/torture.at (Exploding the Stack Size with Malloc):
8047 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
8048
8049 2001-11-27 Akim Demaille <akim@epita.fr>
8050
8051 * src/files.c: Include error.h.
8052 Reported by Hans Aberg.
8053
8054 2001-11-26 Marc Autret <autret_m@epita.fr>
8055
8056 * src/reader.c (parse_include_decl): New, not yet implemented.
8057 (read_declarations): Add case tok_include.
8058 * src/getargs.h (include): Add its extern definition.
8059 * src/getargs.c (include): New const char *.
8060 (getargs): Add case '-I'.
8061 * src/options.c (option_table): Add include as command line and
8062 percent option.
8063 * src/lex.h (token_t): Add tok_include.
8064
8065 2001-11-26 Akim Demaille <akim@epita.fr>
8066
8067 * src/reader.c (readgram): Make sure rules for mid-rule actions
8068 have a lineno equal to that of their host rule.
8069 Reported by Hans Aberg.
8070 * tests/regression.at (Rule Line Numbers): New.
8071
8072 2001-11-26 Akim Demaille <akim@epita.fr>
8073
8074 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
8075 size_ts.
8076
8077 2001-11-26 Akim Demaille <akim@epita.fr>
8078
8079 * src/complain.c, src/complain.h (error): Remove, provided by
8080 lib/error.[ch].
8081
8082 2001-11-26 Akim Demaille <akim@epita.fr>
8083
8084 * src/reader.c (read_declarations): Don't abort on tok_illegal,
8085 issue an error message.
8086 * tests/regression.at (Invalid %directive): New.
8087 Reported by Hans Aberg.
8088
8089 2001-11-26 Akim Demaille <akim@epita.fr>
8090
8091 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
8092 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8093
8094 2001-11-26 Akim Demaille <akim@epita.fr>
8095
8096 * src/conflicts.c (conflicts_print): Don't complain at all when
8097 there are no reduce/reduce conflicts, and as many shift/reduce
8098 conflicts as expected.
8099 * tests/regression.at (%expect right): Adjust.
8100
8101 2001-11-23 Akim Demaille <akim@epita.fr>
8102
8103 * lib/alloca.c: Update, from fileutils.
8104
8105 2001-11-23 Akim Demaille <akim@epita.fr>
8106
8107 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
8108
8109 2001-11-23 Akim Demaille <akim@epita.fr>
8110
8111 * src/system.h: Include alloca.h.
8112 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
8113
8114 2001-11-23 Akim Demaille <akim@epita.fr>
8115
8116 * src/print_graph.c (print_actions): Remove `rule', unused.
8117 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
8118 pacify GCC's signed < unsigned warnings.
8119 * src/closure.c (itemsetsize): Likewise.
8120 * src/reader.c (symbol_list_new): Static.
8121
8122 2001-11-23 Akim Demaille <akim@epita.fr>
8123
8124 Attaching lineno to buckets is stupid, since only one copy of each
8125 symbol is kept, only the line of the first occurrence is kept too.
8126
8127 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
8128 * src/reader.c (rline_allocated): Remove, unused.
8129 (symbol_list): Have a `line' member.
8130 (symbol_list_new): New.
8131 (readgram): Use it.
8132 * src/print.c (print_grammar): Output the rule line numbers.
8133 * tests/regression.at (Solved SR Conflicts)
8134 (Unresolved SR Conflicts): Adjust.
8135 Reported by Hans Aberg.
8136
8137 2001-11-22 Marc Autret <autret_m@epita.fr>
8138
8139 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
8140
8141 2001-11-22 Marc Autret <autret_m@epita.fr>
8142
8143 * src/muscle_tab.c (muscle_init): Remove initialization of
8144 skeleton muscle.
8145 * src/output.c (output_master_parser): Do it here.
8146
8147 2001-11-20 Akim Demaille <akim@epita.fr>
8148
8149 * po/sv.po: New.
8150 * configure.in (ALL_LINGUAS): Adjust.
8151 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
8152 longer contains strings to translate.
8153
8154 2001-11-19 Akim Demaille <akim@epita.fr>
8155
8156 * src/conflicts.c (conflicts_print): Add a missing \n.
8157
8158 2001-11-19 Akim Demaille <akim@epita.fr>
8159
8160 * src/nullable.c (nullable_print): New.
8161 (set_nullable): Call it when tracing.
8162 Better locality of variables.
8163
8164 2001-11-19 Akim Demaille <akim@epita.fr>
8165
8166 * src/print.c (print_actions): Better locality of variables.
8167
8168 2001-11-19 Akim Demaille <akim@epita.fr>
8169
8170 * src/derives.c (print_derives): Fix and enrich.
8171 * src/closure.c (print_fderives): Likewise.
8172
8173 2001-11-19 Akim Demaille <akim@epita.fr>
8174
8175 * src/closure.c (itemsetend): Remove, replaced with...
8176 (itemsetsize): new.
8177
8178 2001-11-19 Akim Demaille <akim@epita.fr>
8179
8180 * src/LR0.c (kernel_end): Remove, replaced with...
8181 (kernel_size): new.
8182
8183 2001-11-19 Akim Demaille <akim@epita.fr>
8184
8185 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
8186 to clarify.
8187
8188 2001-11-19 Akim Demaille <akim@epita.fr>
8189
8190 * src/closure.c (closure): Use arrays instead of pointers to clarify.
8191
8192 2001-11-19 Akim Demaille <akim@epita.fr>
8193
8194 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
8195 trace messages.
8196 * src/LR0.c: Likewise.
8197 (allocate_itemsets): Use arrays instead of pointers to clarify.
8198
8199 2001-11-19 Akim Demaille <akim@epita.fr>
8200
8201 * src/getargs.c (statistics_flag): Replace with...
8202 (trace_flag): New.
8203 (longopts): Accept --trace instead of --statistics.
8204 * src/getargs.h, src/options.c: Adjust.
8205 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
8206 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
8207
8208 2001-11-19 Akim Demaille <akim@epita.fr>
8209
8210 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
8211 pointers to clarify the code.
8212 (save_reductions, save_shifts): Factor common parts of alternatives.
8213
8214 2001-11-19 Akim Demaille <akim@epita.fr>
8215
8216 * src/LR0.c (new_state, get_state): Complete TRACE code.
8217 * src/closure.c: Include `reader.h' to get `tags', needed by the
8218 trace code.
8219 Rename the conditional DEBUG as TRACE.
8220 Output consistently TRACEs to stderr, not stdout.
8221 * src/derives.c: Likewise.
8222 * src/reduce.c: (inaccessable_symbols): Using if is better style
8223 than goto.
8224 Use `#if TRACE' instead of `#if 0' for tracing code.
8225
8226 2001-11-19 Akim Demaille <akim@epita.fr>
8227
8228 * src/system.h (LIST_FREE, shortcpy): New.
8229 * src/LR0.c: Use them.
8230 * src/output.c (free_itemsets, free_reductions, free_shifts):
8231 Remove, replaced by LIST_FREE.
8232
8233 2001-11-19 Akim Demaille <akim@epita.fr>
8234
8235 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8236 (REDUCTIONS_ALLOC): New.
8237 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8238 allocation.
8239
8240 2001-11-19 Akim Demaille <akim@epita.fr>
8241
8242 * src/LR0.c (new_state): Complete trace code.
8243 * src/nullable.c (set_nullable): Don't translate traces.
8244
8245 2001-11-19 Akim Demaille <akim@epita.fr>
8246
8247 * src/print_graph.c (print_core): Better locality of variables.
8248 * src/print.c (print_core): Likewise.
8249
8250 2001-11-19 Akim Demaille <akim@epita.fr>
8251
8252 * src/vcg.c: You do the output, so you are responsible of the
8253 handling of VCG syntax, in particular: use quotearg.
8254 * src/print_graph.c: Don't.
8255 (print_actions): Don't output the actions as part of the nodes,
8256 since that's the job of the edges.
8257 (print_state): Don't output by hand: fill the node description,
8258 and ask for its output.
8259
8260 2001-11-19 Akim Demaille <akim@epita.fr>
8261
8262 * src/bison.simple (yyparse): When verbosely reporting an error,
8263 no longer put additional quotes around token names.
8264 * tests/calc.at: Adjust.
8265
8266 2001-11-19 Akim Demaille <akim@epita.fr>
8267
8268 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8269 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8270 * src/output.c: Adjust.
8271
8272 2001-11-19 Akim Demaille <akim@epita.fr>
8273
8274 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8275 (rule_t): this.
8276 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8277
8278 2001-11-19 Akim Demaille <akim@epita.fr>
8279
8280 * src/gram.h (rule_t): New.
8281 (rule_table): New.
8282 (rrhs, rlhs): Remove, part of state_t.
8283 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8284 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8285 * src/reader.c, src/reduce.c: Adjust.
8286
8287 2001-11-19 Akim Demaille <akim@epita.fr>
8288
8289 * src/reader.c (symbols_output): New, extracted from...
8290 (packsymbols): Here.
8291 (reader): Call it.
8292
8293 2001-11-19 Akim Demaille <akim@epita.fr>
8294
8295 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8296 (maxrhs): this new function.
8297
8298 2001-11-19 Akim Demaille <akim@epita.fr>
8299
8300 * src/lalr.c (F): New macro to access the variable F.
8301 Adjust.
8302
8303 2001-11-19 Akim Demaille <akim@epita.fr>
8304
8305 * src/lalr.h (LA): New macro to access the variable LA.
8306 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8307 * src/lalr.c: Adjust.
8308
8309 2001-11-19 Akim Demaille <akim@epita.fr>
8310
8311 * src/lalr.c (initialize_LA): Only initialize LA. Let...
8312 (set_state_table): handle the `lookaheads' members.
8313
8314 2001-11-19 Akim Demaille <akim@epita.fr>
8315
8316 * src/lalr.h (lookaheads): Removed array, whose contents is now
8317 a member of...
8318 (state_t): this structure.
8319 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8320 Adjust.
8321
8322 2001-11-19 Akim Demaille <akim@epita.fr>
8323
8324 * src/lalr.h (consistent): Removed array, whose contents is now
8325 a member of...
8326 (state_t): this structure.
8327 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8328 Adjust.
8329
8330 2001-11-19 Akim Demaille <akim@epita.fr>
8331
8332 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
8333 contents are now members of...
8334 (state_t): this structure.
8335 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8336 Adjust.
8337
8338 2001-11-19 Akim Demaille <akim@epita.fr>
8339
8340 * src/lalr.h (state_t): New.
8341 (state_table): Be a state_t * instead of a core **.
8342 (accessing_symbol): Remove, part of state_t.
8343 * src/lalr.c: Adjust.
8344 (set_accessing_symbol): Merge into...
8345 (set_state_table): this.
8346 * src/print_graph.c, src/conflicts.c: Adjust.
8347
8348 2001-11-14 Akim Demaille <akim@epita.fr>
8349
8350 * tests/calc.at, tests/output.at, tests/regression.at,
8351 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
8352 now the tests are run in private dirs, therefore AC_CLEANUP and
8353 family can be simplified to 0-ary.
8354 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
8355 use abs. path to find config.h.
8356 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
8357 stderr, there can be way too much random noise.
8358 Instead pass -Werror to GCC and rely on the exit status.
8359 Reported by Wolfram Wagner.
8360
8361 2001-11-14 Akim Demaille <akim@epita.fr>
8362
8363 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
8364 defined only if yyoverflow is defined, to avoid `warning: unused
8365 variable `yyvs1''.
8366 Reported by The Test Suite.
8367
8368 2001-11-14 Akim Demaille <akim@epita.fr>
8369
8370 * src/print.c: Include reduce.h.
8371 Reported by Hans Aberg.
8372
8373 2001-11-14 Akim Demaille <akim@epita.fr>
8374
8375 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
8376 Revert a previous patch: these are really const.
8377 * src/conflicts.c (conflict_report): Additional useless pair of
8378 braces to pacify GCC's warnings for `if () if () {} else {}'.
8379 * src/lex.c (parse_percent_token): Replace equal_offset with
8380 arg_offset.
8381 arg is const.
8382 Be sure to strdup `arg' when used, since there is no reason for
8383 token_buffer not to change.
8384
8385 2001-11-14 Akim Demaille <akim@epita.fr>
8386
8387 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
8388 definition.
8389 * src/main.c (main): Use them.
8390 Suggested by Hans Aberg.
8391
8392 2001-11-12 Akim Demaille <akim@epita.fr>
8393
8394 * src/system.h (ngettext): Now that we use ngettext, be sure to
8395 provide a default definition when NLS are not used.
8396
8397 2001-11-12 Akim Demaille <akim@epita.fr>
8398
8399 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
8400 Use @kbd to denote user input.
8401 (Language and Grammar): ANSIfy the example.
8402 Adjust its layout for info/notinfo.
8403 (Location Tracking Calc): Output error messages to stderr.
8404 Output locations in a more GNUtically correct way.
8405 Fix a couple of Englishos.
8406 Adjust @group/@end group pairs.
8407
8408 2001-11-12 Akim Demaille <akim@epita.fr>
8409
8410 %expect was not functioning at all.
8411
8412 * src/conflicts.c (expected_conflicts): Set to -1.
8413 (conflict_report): Use ngettext.
8414 (conflicts_print): Check %expect and make its violation an error.
8415 * doc/bison.texinfo (Expect Decl): Adjust.
8416 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
8417 * tests/regression.at (%expect not enough, %expect right)
8418 (%expect too much): New.
8419
8420 2001-11-12 Akim Demaille <akim@epita.fr>
8421
8422 * tests/regression.at (Conflicts): Rename as...
8423 (Unresolved SR Conflicts): this.
8424 (Solved SR Conflicts): New.
8425
8426 2001-11-12 Akim Demaille <akim@epita.fr>
8427
8428 * src/reduce.c (print_results): Rename as...
8429 (reduce_output): This.
8430 Output to OUT, passed as argument, instead of output_obstack.
8431 (dump_grammar): Likewise.
8432 (reduce_free): New.
8433 Also free V1.
8434 (reduce_grammar): No longer call reduce_output, since...
8435 * src/print.c (print_results): do it.
8436 * src/main.c (main): Call reduce_free;
8437
8438 2001-11-12 Akim Demaille <akim@epita.fr>
8439
8440 * src/conflicts.c (print_reductions): Accept OUT as argument.
8441 Output to it, not to output_obstack.
8442 * src/print.c (print_actions): Adjust.
8443
8444 2001-11-12 Akim Demaille <akim@epita.fr>
8445
8446 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
8447 the result instead of using...
8448 (src_total, rrc_total, src_count, rrc_count): Remove.
8449 (any_conflicts): Remove.
8450 (print_conflicts): Split into...
8451 (conflicts_print, conflicts_output): New.
8452 * src/conflicts.h: Adjust.
8453 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
8454 * src/print.c (print_grammar): Issue `\n' between two rules.
8455 * tests/regression.at (Conflicts): New.
8456 Reported by Tom Lane.
8457
8458 2001-11-12 Akim Demaille <akim@epita.fr>
8459
8460 * tests/regression.at (Invalid input): Remove, duplicate with
8461 ``Invalid input: 1''.
8462
8463 2001-11-12 Akim Demaille <akim@epita.fr>
8464
8465 * tests/torture.at (AT_DATA_STACK_TORTURE)
8466 (Exploding the Stack Size with Alloca)
8467 (Exploding the Stack Size with Malloc): New.
8468
8469 2001-11-12 Akim Demaille <akim@epita.fr>
8470
8471 * src/bison.simple (YYSTACK_REALLOC): New.
8472 (yyparse) [!yyoverflow]: Use it and free the old stack.
8473 Reported by Per Allansson.
8474
8475 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
8476
8477 * src/bison.simple: Define type yystype instead of YYSTYPE, and
8478 define CPP macro, which substitute YYSTYPE by yystype.
8479 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
8480 with yyltype/YYLTYPE. This allows inclusion of the generated
8481 header within the parser if the compiler, such as GGC, accepts
8482 multiple equivalent #defines.
8483 From Akim.
8484
8485 2001-11-05 Akim Demaille <akim@epita.fr>
8486
8487 * src/reader.c (symbols_output): New, extracted from...
8488 (packsymbols): here.
8489 (reader): Adjust.
8490
8491 2001-11-05 Akim Demaille <akim@epita.fr>
8492
8493 * src/lex.c (parse_percent_token): s/quotearg/quote/.
8494
8495 2001-11-05 Akim Demaille <akim@epita.fr>
8496
8497 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
8498 pattern.
8499
8500 2001-11-05 Akim Demaille <akim@epita.fr>
8501
8502 * src/options.h (struct option_table_struct): set_flags is void*.
8503 * src/options.c (longopts): Support `--output' and `%output'.
8504 (usage): Adjust.
8505 * src/lex.h (tok_setopt): Remove, replaced with...
8506 (tok_intopt, tok_stropt): these new guys.
8507 * src/lex.c (getopt.h): Not needed.
8508 (token_buffer, unlexed_token_buffer): Not const.
8509 (percent_table): Promote `-' over `_' in directive names.
8510 Active `%name-prefix', `file-prefix', and `output'.
8511 (parse_percent_token): Accept possible arguments to directives.
8512 Promote `-' over `_' in directive names.
8513
8514 2001-11-04 Akim Demaille <akim@epita.fr>
8515
8516 * doc/bison.texinfo (Decl Summary): Split the list into
8517 `directives for grammars' and `directives for bison'.
8518 Sort'em.
8519 Add description of `%name-prefix', `file-prefix', and `output'.
8520 Promote `-' over `_' in directive names.
8521 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
8522 Simplify the description of `--name-prefix'.
8523 Promote `-' over `_' in directive names.
8524 Promote `--output' over `--output-file'.
8525 Fix the description of `--defines'.
8526 * tests/output.at: Exercise %file-prefix and %output.
8527
8528 2001-11-02 Akim Demaille <akim@epita.fr>
8529
8530 * doc/refcard.tex: Update.
8531
8532 2001-11-02 Akim Demaille <akim@epita.fr>
8533
8534 * src/symtab.h (SUNDEF): New.
8535 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
8536 stand for `uninitialized', instead of 0.
8537 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
8538 * src/lex.c (lex): Adjust.
8539
8540 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
8541 Number it 0.
8542 Let yylex return it instead of a plain 0.
8543 Reported by Dick Streefland.
8544
8545 2001-11-02 Akim Demaille <akim@epita.fr>
8546
8547 * tests/regression.at (Mixing %token styles): New test.
8548
8549 2001-11-02 Akim Demaille <akim@epita.fr>
8550
8551 * src/reader.c (parse_thong_decl): Formatting changes.
8552 (token_translations_init): New, extracted from...
8553 (packsymbols): Here.
8554 Adjust.
8555
8556 2001-11-01 Akim Demaille <akim@epita.fr>
8557
8558 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
8559 Check that `9foo.y' produces correct cpp guards.
8560 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
8561 guards.
8562 Reported by Wwp.
8563
8564 2001-11-01 Akim Demaille <akim@epita.fr>
8565
8566 * tests/regression.at (Invalid input: 2): New.
8567 * src/lex.c (unlexed_token_buffer): New.
8568 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
8569 too.
8570 Reported by Wwp.
8571
8572 2001-11-01 Akim Demaille <akim@epita.fr>
8573
8574 * tests/calc.at: Catch up with 1.30.
8575 * configure.in: Bump to 1.49a.
8576 Adjust to newer Autotest.
8577
8578 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
8579
8580 * src/conflicts.c: Move global variables rrc_total and src_total ...
8581 (print_conflicts): here.
8582 * src/output.c (output): Free global variable user_toknums.
8583 * src/lex.c (token_obstack): Become static.
8584
8585 2001-10-18 Akim Demaille <akim@epita.fr>
8586
8587 * tests/atlocal.in (GCC): Add.
8588 * tests/calc.at: s/m4_match/m4_bmatch/.
8589 s/m4_patsubst/m4_bpatsubst/.
8590 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
8591 * configure.in: AC_SUBST(GCC).
8592
8593 2001-10-14 Marc Autret <autret_m@epita.fr>
8594
8595 * src/options.c (create_long_option_table): Fix.
8596
8597 2001-10-10 Akim Demaille <akim@epita.fr>
8598
8599 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
8600
8601 2001-10-04 Akim Demaille <akim@epita.fr>
8602
8603 * src/reader.c (parse_union_decl): Push the caracters in
8604 union_obstack, not attrs_obstack.
8605
8606 2001-10-04 Akim Demaille <akim@epita.fr>
8607
8608 Merge in the branch 1.29.
8609
8610 * src/reader.c (packsymbols): Use a temporary obstack for
8611 `%%tokendef', since output_stack is already used elsewhere.
8612
8613 2001-10-02 Akim Demaille <akim@epita.fr>
8614
8615 Bump 1.29d.
8616
8617 2001-10-02 Akim Demaille <akim@epita.fr>
8618
8619 Version 1.29c.
8620
8621 2001-10-02 Akim Demaille <akim@epita.fr>
8622
8623 * tests/regression.at (Invalid CPP headers): New.
8624 From Alexander Belopolsky.
8625 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
8626
8627 2001-10-02 Akim Demaille <akim@epita.fr>
8628
8629 * tests/regression.at (Invalid input): New.
8630 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
8631 Reported by Shura.
8632
8633 2001-10-02 Akim Demaille <akim@epita.fr>
8634
8635 * tests/calc.at: Now that --debug works, the tests must be adjusted.
8636
8637 2001-10-02 Akim Demaille <akim@epita.fr>
8638
8639 * src/output.c (output_parser): Assert `skeleton'.
8640 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
8641 systems.
8642 From Shura.
8643
8644 2001-10-01 Marc Autret <autret_m@epita.fr>
8645
8646 * src/lex.h: Echo modifications.
8647 * src/lex.c (unlex): Parameter is now token_t.
8648 From Hans Aberg.
8649
8650 2001-10-01 Marc Autret <autret_m@epita.fr>
8651
8652 * src/main.c: Include lex.h.
8653 From Hans Aberg.
8654
8655 2001-09-29 Akim Demaille <akim@epita.fr>
8656
8657 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
8658
8659 2001-09-28 Akim Demaille <akim@epita.fr>
8660
8661 * tests/testsuite.at: Update to newer Autotest.
8662 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
8663
8664 2001-09-27 Akim Demaille <akim@epita.fr>
8665
8666 Position independent wrapper.
8667
8668 * tests/bison: Remove.
8669 * tests/bison.in: New.
8670 * configure.in: Adjust.
8671
8672 2001-09-27 Paul Eggert <eggert@twinsun.com>
8673
8674 Port quotearg fixes from tar 1.13.24.
8675
8676 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
8677 tm to be declared.
8678 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
8679 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
8680
8681 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
8682 * m4/mbrtowc.m4: New file.
8683 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
8684 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
8685
8686 2001-09-27 Akim Demaille <akim@epita.fr>
8687
8688 Bump to 1.29c.
8689
8690 2001-09-27 Akim Demaille <akim@epita.fr>
8691
8692 Version 1.29b.
8693
8694 2001-09-25 Akim Demaille <akim@epita.fr>
8695
8696 * src/system.h: Include `xalloc.h'.
8697 Remove it from the C files.
8698 * src/files.c (output_files): Free the obstacks.
8699 * src/lex.c (init_lex): Rename as...
8700 (lex_init): this.
8701 (lex_free): New.
8702 * src/main.c (main): Use it.
8703
8704 2001-09-24 Marc Autret <autret_m@epita.fr>
8705
8706 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
8707 to output informations in fout (FILE*).
8708 (open_graph, close_graph): Likewise.
8709 (output_graph, output_edge, output_node): Likewise.
8710 * src/vcg.h: Update function prototypes.
8711 * src/print_graph.c (print_graph): Open output graph file.
8712 (print_actions): Adjust.
8713 * src/files.h: Remove extern declaration.
8714 * src/files.c: Remove graph_obstack declaration.
8715 (open_files): Remove graph_obstack initialization.
8716 (output_files): Remove graph_obstack saving.
8717
8718 2001-09-24 Marc Autret <autret_m@epita.fr>
8719
8720 * src/files.c (compute_output_file_names): Fix.
8721
8722 2001-09-24 Marc Autret <autret_m@epita.fr>,
8723 Akim Demaille <akim@epita.fr>
8724
8725 * src/reader.c (reader): Remove call to free_symtab ().
8726 * src/main.c (main): Call it here.
8727 Include symtab.h.
8728 * src/conflicts.c (initialize_conflicts): Rename as...
8729 (solve_conflicts): this.
8730 * src/print.c (print_core, print_actions, print_state)
8731 (print_grammar): Dump to a file instead a `output_obstack'.
8732 (print_results): Dump `output_obstack', and then proceed with the
8733 FILE *.
8734 * src/files.c (compute_output_file_names, close_files): New.
8735 (output_files): Adjust.
8736 * src/main.c (main): Adjust.
8737
8738 2001-09-23 Marc Autret <autret_m@epita.fr>
8739
8740 * src/files.c (compute_header_macro): Computes header macro name
8741 from spec_defines_file when given.
8742
8743 2001-09-23 Marc Autret <autret_m@epita.fr>
8744
8745 * src/files.c (output_files): Add default extensions.
8746
8747 2001-09-22 Akim Demaille <akim@epita.fr>
8748
8749 * src/conflicts.c (finalize_conflicts): Rename as...
8750 (free_conflicts): this.
8751
8752 2001-09-22 Akim Demaille <akim@epita.fr>
8753
8754 * src/gram.c (gram_free): Rename back as...
8755 (dummy): this.
8756 (output_token_translations): Free `token_translations'.
8757 * src/symtab.c (free_symtab): Free the tag field.
8758
8759 2001-09-22 Akim Demaille <akim@epita.fr>
8760
8761 Remove `translations' as it is always set to true.
8762
8763 * src/gram.h: Adjust.
8764 * src/reader.c (packsymbols, parse_token_decl): Adjust
8765 * src/print.c (print_grammar): Adjust.
8766 * src/output.c (output_token_translations): Adjust.
8767 * src/lex.c (lex): Adjust.
8768 * src/gram.c: Be sure the set pointers to NULL.
8769 (dummy): Rename as...
8770 (gram_free): this.
8771
8772 2001-09-22 Akim Demaille <akim@epita.fr>
8773
8774 * configure.in: Invoke AM_LIB_DMALLOC.
8775 * src/system.h: Use dmalloc.
8776 * src/LR0.c: Be sure to have pointers initialized to NULL.
8777 (allocate_itemsets): Allocate kernel_items only if needed.
8778
8779 2001-09-22 Akim Demaille <akim@epita.fr>
8780
8781 * configure.in: Bump to 1.29b.
8782 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8783 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8784 need xmalloc.c in calc.y.
8785 From Pascal Bart.
8786
8787 2001-09-21 Akim Demaille <akim@epita.fr>
8788
8789 Version 1.29a.
8790 * Makefile.maint, config/config.guess, config/config.sub,
8791 * config/missing: Update from masters.
8792 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8793 upon package.m4.
8794 * configure.in (ALL_LINGUAS): Add `tr'.
8795
8796 2001-09-21 Akim Demaille <akim@epita.fr>
8797
8798 * tests/Makefile.am (package.m4): Move to...
8799 ($(srcdir)/$(TESTSUITE)): here.
8800
8801 2001-09-20 Akim Demaille <akim@epita.fr>
8802
8803 * src/complain.c: No longer try to be standalone: use system.h.
8804 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8805 * src/complain.h: Likewise.
8806 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8807 Remove the unused variable `n'.
8808 From Albert Chin-A-Young.
8809
8810 2001-09-18 Marc Autret <autret_m@epita.fr>
8811
8812 * doc/bison.1: Update.
8813 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8814 descriptions.
8815 (Option Cross Key): Update.
8816 Add --graph.
8817
8818 2001-09-18 Marc Autret <autret_m@epita.fr>
8819
8820 * tests/regression.at: New test (comment in %union).
8821
8822 2001-09-18 Marc Autret <autret_m@epita.fr>
8823
8824 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8825 do that.
8826 Reported by Keith Browne.
8827
8828 2001-09-18 Marc Autret <autret_m@epita.fr>
8829
8830 * tests/output.at: Add tests for --defines and --graph.
8831
8832 2001-09-18 Marc Autret <autret_m@epita.fr>
8833
8834 * tests/output.at: Removes tests of %{header,src}_extension features.
8835
8836 2001-09-18 Akim Demaille <akim@epita.fr>
8837
8838 * tests/Makefile.am (package.m4): New.
8839 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8840 (_AT_CHECK_CALC_ERROR): Likewise.
8841 Factor the `, ' part of verbose error messages.
8842
8843 2001-09-18 Marc Autret <autret_m@epita.fr>
8844
8845 * src/getargs.c (longopts): Declare --defines and --graph as options
8846 with optional arguments.
8847 * src/files.h: Add extern declarations.
8848 * src/files.c (spec_graph_file, spec_defines_file): New.
8849 (output_files): Update.
8850 Remove CPP-outed code.
8851
8852 2001-09-18 Marc Autret <autret_m@epita.fr>
8853
8854 Turn off %{source,header}_extension feature.
8855
8856 * src/files.c (compute_exts_from_gf): Update.
8857 (compute_exts_from_src): Update.
8858 (output_files): CPP-out useless code.
8859 * src/files.h: Remove {header,source}_extension extern declarations.
8860 * src/reader.c (parse_dquoted_param): CPP-out.
8861 (parse_header_extension_decl): Remove.
8862 (parse_source_extension_decl): Remove.
8863 (read_declarations): Remove cases tok_{hdrext,srcext}.
8864 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8865 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8866
8867 2001-09-10 Akim Demaille <akim@epita.fr>
8868
8869 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8870 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8871 (AT_CHECK_OUTPUT): this.
8872 Merely check ls' exit status, its output is useless.
8873
8874 2001-09-10 Akim Demaille <akim@epita.fr>
8875
8876 * tests/calc.at: Use m4_match.
8877 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8878
8879 2001-09-10 Marc Autret <autret_m@epita.fr>,
8880 Akim Demaille <akim@epita.fr>
8881
8882 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8883 enum color_e.
8884 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8885 to `normal'.
8886 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8887 * src/lex.h: Adjust prototype.
8888 (token_t): Add `tok_undef'.
8889 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8890 (parse_percent_token): Now returns token_t.
8891 Add default statement in switch.
8892 (lex): Separate `c' as an input variable, from the token_t result
8893 part.
8894 (unlexed): Is a token_t.
8895
8896 2001-09-10 Akim Demaille <akim@epita.fr>
8897
8898 * configure.in: Bump to 1.29a.
8899
8900 2001-09-07 Akim Demaille <akim@epita.fr>
8901
8902 Version 1.29.
8903
8904 2001-08-30 Akim Demaille <akim@epita.fr>
8905
8906 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8907 * m4/atconfig.m4: Remove.
8908 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8909 * tests/bison: New.
8910 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8911 m4_if, m4_patsubst, and m4_regexp.
8912 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8913 `input' file instead of echo.
8914
8915 2001-08-29 Akim Demaille <akim@epita.fr>
8916
8917 Bump to 1.28e.
8918
8919 2001-08-29 Akim Demaille <akim@epita.fr>
8920
8921 Version 1.28d.
8922
8923 2001-08-29 Paul Eggert <eggert@twinsun.com>
8924
8925 * src/bison.simple (yyparse): Don't take the address of an
8926 item before the start of an array, as that doesn't conform to
8927 the C Standard.
8928
8929 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8930
8931 * doc/bison.texinfo (Location Tracking Calc): New node.
8932
8933 2001-08-29 Paul Eggert <eggert@twinsun.com>
8934
8935 * src/output.c (output): Do not define const, as this now
8936 causes more problems than it cures.
8937
8938 2001-08-29 Akim Demaille <akim@epita.fr>
8939
8940 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8941 the nodes.
8942 Be sure to tag the `detailmenu'.
8943
8944 2001-08-29 Akim Demaille <akim@epita.fr>
8945
8946 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8947 download in a tmp dir.
8948
8949 2001-08-28 Marc Autret <autret_m@epita.fr>
8950
8951 * config/depcomp: New file.
8952
8953 2001-08-28 Marc Autret <autret_m@epita.fr>
8954
8955 * doc/bison.1 (mandoc): Adjust.
8956 From Juan Manuel Guerrero.
8957
8958 2001-08-28 Marc Autret <autret_m@epita.fr>
8959
8960 * src/print_graph.c (print_state): Fix.
8961
8962 2001-08-27 Marc Autret <autret_m@epita.fr>
8963
8964 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8965 char * members.
8966 Echo modifications to the functions prototypes.
8967 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8968
8969 2001-08-27 Marc Autret <autret_m@epita.fr>
8970
8971 * src/vcg.c: Include `xalloc.h'.
8972 (add_colorentry): New.
8973 (add_classname): New.
8974 (add_infoname): New.
8975 * src/vcg.h: Add new prototypes.
8976
8977 2001-08-27 Akim Demaille <akim@epita.fr>
8978
8979 * Makefile.maint: Sync. again with CVS Autoconf.
8980
8981 2001-08-27 Akim Demaille <akim@epita.fr>
8982
8983 * Makefile.maint: Formatting changes.
8984 (po-update, cvs-update, update): New targets.
8985 (AMTAR): Remove.
8986
8987 2001-08-27 Akim Demaille <akim@epita.fr>
8988
8989 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8990 * Makefile.maint: Sync. with CVS Autoconf.
8991
8992 2001-08-27 Marc Autret <autret_m@epita.fr>
8993
8994 * src/vcg.h (struct infoname_s): New.
8995 (struct colorentry_s): New.
8996 (graph_s): New fields {vertical,horizontal}_order in structure.
8997 Add `infoname' field.
8998 Add `colorentry' field;
8999 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
9000 (G_HORIZONTAL_ORDER): New.
9001 (G_INFONAME): New.
9002 (G_COLORENTRY): New.
9003 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
9004 Add output of `infoname'.
9005 Add output of `colorentry'.
9006
9007 2001-08-27 Marc Autret <autret_m@epita.fr>
9008
9009 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
9010 This one shadowed a global parameter.
9011
9012 2001-08-24 Marc Autret <autret_m@epita.fr>
9013
9014 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
9015 instead of `unsigned'.
9016 (print_state): Do not call obstack_object_size () in obstack_grow ()
9017 to avoid macro variables shadowing.
9018
9019 2001-08-23 Marc Autret <autret_m@epita.fr>
9020
9021 * src/lex.c (percent_table): Typo: s/naem/name/.
9022 Add graph option.
9023 Normalize new options declarations.
9024
9025 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
9026
9027 * tests/suite.at: Exercise %header_extension and %source_extension.
9028
9029 2001-08-16 Marc Autret <autret_m@epita.fr>
9030
9031 * src/reader.c (parse_dquoted_param): New.
9032 (parse_header_extension_decl): Use it.
9033 (parse_source_extension_decl): Likewise.
9034
9035 2001-08-16 Marc Autret <autret_m@epita.fr>
9036
9037 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
9038 (get_xxxx_str): Use assert () instead of complain ().
9039 Remove return invokations in default cases.
9040 (get_decision_str): Modify default behaviour. Remove second argument.
9041 Echo modifications on calls.
9042 (output_graph): Fix.
9043
9044 2001-08-16 Marc Autret <autret_m@epita.fr>
9045
9046 * src/getargs.c (usage): Update with ``-g, --graph''.
9047
9048 2001-08-16 Marc Autret <autret_m@epita.fr>
9049
9050 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
9051 (Option Cross Key): Likewise.
9052 * doc/bison.1: Update.
9053
9054 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
9055
9056 * src/output.c (output_master_parser): Don't finish action_obstack.
9057 (output_parser): Don't care about the muscle action, here.
9058 (prepare): Copy the action_obstack in the action muscle.
9059 (output): Free action_obstack.
9060
9061 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9062
9063 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
9064 will contain `%union' declaration.
9065 (parse_union_decl): Delete #line directive output.
9066 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
9067 informations about %union.
9068 (parse_union_decl): Copy the union_obstack in the muscle stype.
9069 * src/bison.simple: Add new #line directive.
9070 Add typdef %%stype YYSTYPE.
9071
9072 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9073
9074 * src/bison.simple: Add new `#line' directive.
9075
9076 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
9077
9078 * src/bison.simple: New `#line' directive.
9079 * src/output.c (output_parser): Support new dynamic muscle input_line.
9080
9081 2001-09-22 Marc Autret <autret_m@epita.fr>
9082
9083 * src/output.c (output_master_parser): New.
9084 (output_parser): Be more re-entrant.
9085
9086 2001-09-21 Marc Autret <autret_m@epita.fr>
9087
9088 * src/reader.c (copy_definition, parse_union_decl): Update and use
9089 `linef' muscle.
9090 (copy_action): Likewise.
9091 Use obstack_1grow ().
9092 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
9093
9094 2001-09-21 Marc Autret <autret_m@epita.fr>
9095
9096 * src/options.c (option_table): Adjust.
9097 * src/lex.c (parse_percent_token): Fix.
9098
9099 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9100
9101 * src/options.c (symtab.h): Include it, need by lex.h.
9102
9103 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9104
9105 * src/lex.c (parse_percent_token): Change type of variable `tx', which
9106 is now an option_table_struct*.
9107 (option_strcmp): New function option_strcmp.
9108 (parse_percent_token): Call option_strcmp.
9109 * src/getargs.c (xalloc.h, options.h): Include it.
9110 (getargs): Call create_long_option_table.
9111 (getargs): Free longopts at the end of the function.
9112 (shortopts): Move in options.c.
9113 * src/options.c (create_long_option_table): New function. Convert
9114 information from option_table to option structure.
9115 * src/reader.c (options.h): Include it.
9116
9117 * src/Makefile.am: Adjust.
9118 * src/options.c (option_table): Create from longopts and percent_table.
9119 * src/getargs.c (longopts): Delete.
9120 * src/lex.c (struct percent_table_struct): Delete.
9121 (percent_table): Delete.
9122 (options.h): Include it.
9123 * src/options.c: Create.
9124 * src/options.h: Create.
9125 Declare enum opt_access_e.
9126 Define struct option_table_struct.
9127
9128 2001-09-20 Marc Autret <autret_m@epita.fr>
9129
9130 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
9131 sections of Bison.
9132
9133 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
9134
9135 * src/bison.simple: s/%%filename/%%skeleton.
9136 * src/muscle_tab.c (getargs.h): Include it.
9137 (muscle_init): Insert new muscle skeleton.
9138
9139 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
9140
9141 * src/output.c (output_parser): Delete unused variable actions_dumped.
9142
9143 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
9144
9145 * src/output.c (output): Delete call to reader_output_yylsp.
9146 * src/reader.c (reader): Likewise.
9147 * src/reader.h: Delete declaration of reader_output_yylsp.
9148
9149 2001-09-02 Marc Autret <autret_m@epita.fr>
9150
9151 * src/reader.c: Include muscle_tab.h.
9152 (parse_union_decl): Update.
9153 (parse_macro_decl): Rename parse_muscle_decl.
9154 Update to use renamed functions and variable.
9155 (read_declarations, copy_action, read_additionnal_code, : Updated
9156 with correct variables and functions names.
9157 (packsymbols, reader): Likewise.
9158
9159 * src/reader.h (muscle_obstack): Extern declaration update.
9160
9161 * src/output.c: Include muscle_tab.h
9162 In all functions using macro_insert, change by using muscle_insert ().
9163 (macro_obstack): Rename muscle_obstack.
9164 Echo modifications in the whole file.
9165 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
9166 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
9167 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
9168
9169 * src/muscle_tab.h: Update double inclusion macros.
9170 (macro_entry_s): Rename muscle_entry_s.
9171 Update prototypes.
9172
9173 * src/muscle_tab.c: Include muscle_tab.h.
9174 Rename macro_tabble to muscle_table.
9175 (mhash1, mhash2, mcmp): Use muscle_entry.
9176 (macro_init): Rename muscle_init. Update.
9177 (macro_insert): Rename muscle_insert. Update.
9178 (macro_find): Rename muscle_find. Update.
9179
9180 * src/main.c: Include muscle_tab.h.
9181 (main): Call muscle_init ().
9182 * src/Makefile.am (bison_SOURCES): Echo modifications.
9183
9184 2001-09-02 Marc Autret <autret_m@epita.fr>
9185
9186 Now the files macro_tab.[ch] are named muscle_tab.[ch].
9187
9188 * src/muscle_tab.c, src/muscle_tab.h: Add files.
9189
9190 2001-09-02 Marc Autret <autret_m@epita.fr>
9191
9192 * src/macrotab.c, src/macrotab.h: Remove.
9193
9194 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
9195
9196 * src/reader.c (copy_guard): Use muscle to specify the `#line'
9197 filename.
9198
9199 2001-09-01 Marc Autret <autret_m@epita.fr>
9200
9201 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
9202 to an explicit value to activate the feature. We do it here.
9203
9204 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9205
9206 * src/output.c (prepare): Delete the `filename' muscule insertion.
9207 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
9208 (parse_union_decl): Likewise.
9209 * src/macrotab.c (macro_init): Initialize filename by infile.
9210
9211 2001-08-31 Marc Autret <autret_m@epita.fr>
9212
9213 * src/bison.simple (YYLSP_NEEDED): New definition.
9214 * src/output.c (prepare): Add macro insertion of `locations_flag'
9215
9216 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9217
9218 * src/output.c (prepare): Delete insertion of previous muscles,
9219 and insert the `prefix' muscles.
9220 * src/macrotab.c (macro_init): Likewise.
9221 (macro_init): Initialization prefix directive by `yy'.
9222 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
9223 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9224 yylval, yydebug, yyerror, yynerrs and yyparse.
9225 New directive `#define' to substitute yydebug, ... with option
9226 name_prefix.
9227
9228 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9229
9230 * src/main.c (main): Standardize.
9231 * src/output.c (output_table_data, output_parser): Likewise.
9232 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9233
9234 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9235
9236 * src/reader.c (read_additionnal_code): Rename %%user_code to
9237 %%epilogue.
9238 * src/output.c (output): Rename %%declarations to %%prologue.
9239 * src/bison.simple: Echo modifications.
9240
9241 2001-08-31 Marc Autret <autret_m@epita.fr>
9242
9243 * src/reader.c (readgram): CleanUp.
9244 (output_token_defines): Likewise.
9245 (packsymbols): Likewise.
9246 (reader): Likewise.
9247 * src/output.c (output): CPP-out useless code.
9248
9249 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9250
9251 * src/reader.c (reader): Delete obsolete call to function
9252 output_trailers and output_headers.
9253 * src/output.h: Remove obsolete functions prototypes of output_headers
9254 and output_trailers.
9255
9256 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
9257
9258 * src/main.c: Include macrotab.h.
9259 * src/macrotab.h (macro_entry_s): Constify fields.
9260 Adjust functions prototypes.
9261 * src/macrotab.c (macro_insert): Constify key and value.
9262 (macro_find): Constify key.
9263 (macro_insert): Include 'xalloc.h'
9264 (macro_insert): Use XMALLOC.
9265 (macro_find): Constify return value.
9266 * src/output.c (output_table_data): Rename table to table_data.
9267 (output_parser): Constify macro_key, macro_value.
9268
9269 2001-08-30 Marc Autret <autret_m@epita.fr>
9270
9271 * src/reader.c (parse_skel_decl): New.
9272 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
9273 * src/lex.h (token_t): New token `tok_skel'.
9274 * src/lex.c (percent_table): Add skeleton option entry.
9275 Standardize.
9276
9277 2001-08-29 Marc Autret <autret_m@epita.fr>
9278
9279 * src/bison.simple: Add %%user_code directive at the end.
9280 * src/reader.c (read_additionnal_code): New.
9281 (reader): Use it.
9282 * src/output.c (output_program): Remove.
9283 (output): Update.
9284
9285 2001-08-28 Marc Autret <autret_m@epita.fr>
9286
9287 * src/output.c (output_actions): Clean up.
9288 (output_gram): CPP-out useless code.
9289 * src/reader.c (reader): Clean up, CPP-out useless code.
9290
9291 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
9292
9293 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
9294 directive.
9295 * src/bison.simple: Add `%%definitions'.
9296
9297 2001-08-28 Marc Autret <autret_m@epita.fr>
9298
9299 * config/depcomp: New file.
9300
9301 2001-08-27 Paul Eggert <eggert@twinsun.com>
9302
9303 * src/bison.simple (yyparse): Don't take the address of an
9304 item before the start of an array, as that doesn't conform to
9305 the C Standard.
9306
9307 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9308
9309 * src/output.c (output): Remove the initialization of the macro
9310 obstack. It was done too late here.
9311
9312 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
9313 completely wrong.
9314 (reader): Initialize the macro obstack here, since we need it to grow
9315 '%define' directives.
9316
9317 * src/reader.h: Declare the macro obstack as extern.
9318
9319 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9320
9321 * src/output.c (output_parser): Fix. Store single '%' characters in
9322 the output obstack instead of throwing them away.
9323
9324 2001-08-27 Akim Demaille <akim@epita.fr>
9325
9326 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9327
9328 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9329
9330 * lib/Makefile.am: Adjust.
9331
9332 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9333
9334 * src/bison.simple: Update and add '%%' directives.
9335
9336 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9337
9338 * src/reader.c (reader): Remove calls to 'output_headers' and
9339 'output_trailers'. Remove some C output.
9340 (readgram): Disable a piece of code that was writing a default
9341 definition for 'YYSTYPE'.
9342 (reader_output_yylsp): Remove.
9343 (packsymbols): Output token defintions to a macro.
9344 (copy_definition): Disable C output.
9345
9346 * src/reader.c (parse_macro_decl): New function used to parse macro
9347 declarations.
9348 (copy_string2): Put the body of copy_string into this new function.
9349 Add a parameter to let the caller choose whether he wants to copy the
9350 string delimiters or not.
9351 (copy_string): Be a simple call to copy_string2 with the last argument
9352 bound to true.
9353 (read_declarations): Add case for macro definition.
9354 (copy_identifier): New.
9355 (parse_macro_decl): Read macro identifiers using copy_identifier
9356 rather than lex.
9357
9358 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9359
9360 * src/output.c (prepare): Add prefixed names.
9361 (output_parser): Output semantic actions.
9362 (output_parser): Fix bug on '%%line' directives.
9363
9364 * src/output.c (output_headers): Remove. The C code printed by this
9365 function should now be in the skeletons.
9366 (output_trailers): Remove.
9367 (output): Disable call to 'reader_output_yylsp'.
9368 (output_rule_data): Do not output tables to the table obstack.
9369
9370 * src/output.c: Remove some C dedicated output.
9371 Improve the use of macro and output obstacks.
9372 (output_defines): Remove.
9373
9374 * src/output.c (output_token_translations): Associate 'translate'
9375 table with a macro. No output to the table obstack.
9376 (output_gram): Same for 'rhs' and 'prhs'.
9377 (output_stos): Same for 'stos'.
9378 (output_rule_data): Same for 'r1' and 'r2'.
9379 (token_actions): Same for 'defact'.
9380 (goto_actions): Same for 'defgoto'.
9381 (output_base): Same for 'pact' and 'pgoto'.
9382 (output_table): Same for 'table'.
9383 (output_check): Same for 'check'.
9384
9385 * src/output.c (output_table_data): New function.
9386 (output_short_table): Remove.
9387 (output_short_or_char_table): Remove.
9388
9389 * src/output.c (output_parser): Replace most of the skeleton copy code
9390 with something new. Skeletons are now processed character by character
9391 rather than line by line, and Bison looks for '%%' macros. This is the
9392 first step in making Bison's output process (a lot) more flexible.
9393 (output_parser): Use the macro table.
9394
9395 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9396
9397 * src/main.c (main): Initialize the macro table.
9398
9399 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9400
9401 * src/lex.c (percent_table): Add tok_define.
9402 * src/lex.h: Add tok_define.
9403
9404 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9405
9406 * src/macrotab.c: New file.
9407 * src/macrotab.h: New file.
9408 * src/Makefile.am: Update.
9409
9410 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9411
9412 * lib/hash.c: New file.
9413 * lib/hash.h: New file.
9414 * lib/Makefile.am: Update.
9415
9416 2001-08-15 Akim Demaille <akim@epita.fr>
9417
9418 Version 1.28c.
9419
9420 2001-08-15 Marc Autret <autret_m@epita.fr>
9421
9422 * src/reader.c (readgram): Indent output macro YYSTYPE.
9423 (packsymbols): Likewise.
9424 (output_token_defines): Likewise.
9425 * src/files.c: Standardize.
9426 (compute_header_macro): New.
9427 (defines_obstack_save): New. Use compute_header_macro.
9428 (output_files): Update. Use defines_obstack_save.
9429
9430 2001-08-15 Akim Demaille <akim@epita.fr>
9431
9432 * doc/bison.texinfo (Table of Symbols): Document
9433 YYSTACK_USE_ALLOCA.
9434
9435 2001-08-15 Akim Demaille <akim@epita.fr>
9436
9437 * missing: Update from CVS Automake.
9438 * config/config.guess, config/config.sub, config/texinfo.tex:
9439 Update from gnu.org.
9440
9441 2001-08-15 Akim Demaille <akim@epita.fr>
9442
9443 * Makefile.maint: Sync with CVS Autoconf.
9444
9445 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
9446
9447 * doc/bison.texinfo: Include GNU Free Documentation License from
9448 `fdl.texi'.
9449 * doc/fdl.texi: Add to package.
9450
9451 2001-08-14 Marc Autret <autret_m@epita.fr>
9452
9453 Turn on %{source,header}_extension features.
9454
9455 * src/lex.c (percent_table): Un-CPP out header_extension and
9456 source_extension.
9457 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
9458 (compute_exts_from_src): Remove conditions. It restores priorities
9459 between options.
9460
9461 2001-08-14 Marc Autret <autret_m@epita.fr>
9462
9463 * src/files.c (compute_base_names): Add extensions computing when
9464 `--file-prefix' used.
9465 Standardize function calls.
9466
9467 2001-08-13 Marc Autret <autret_m@epita.fr>
9468
9469 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
9470 defining it (defined but null disables alloca).
9471
9472 2001-08-13 Marc Autret <autret_m@epita.fr>
9473
9474 * src/bison.simple (_yy_memcpy): CPP reformat.
9475
9476 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
9477
9478 * tests/atconfig.in (CPPFLAGS): Fix.
9479
9480 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
9481
9482 * doc/bison.texinfo: Include GNU General Public License from
9483 `gpl.texi'.
9484 * doc/gpl.texi: Add to package.
9485
9486 2001-08-10 Marc Autret <autret_m@epita.fr>
9487
9488 * src/print_graph.h: Fix.
9489 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
9490
9491 2001-08-10 Akim Demaille <akim@epita.fr>
9492
9493 * src/system.h: Provide default declarations for stpcpy, strndup,
9494 and strnlen.
9495
9496 2001-08-10 Robert Anisko <anisko_r@epita.fr>
9497
9498 * doc/bison.texinfo (Locations): Update @$ stuff.
9499
9500 2001-08-09 Robert Anisko <anisko_r@epita.fr>
9501
9502 * src/bison.simple (YYLLOC_DEFAULT): Update.
9503 (yyparse): Adjust.
9504
9505 2001-08-08 Marc Autret <autret_m@epita.fr>
9506
9507 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
9508 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
9509 Reported by Fabrice Bauzac.
9510
9511 2001-08-08 Marc Autret <autret_m@epita.fr>
9512
9513 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
9514 * src/vcg.c (output_node): Fix.
9515 * src/vcg.h: Cleanup.
9516 * src/print_graph.c: Add comments.
9517 (node_output_size): New global variable. Simplify the formatting of
9518 the VCG graph output.
9519 (print_actions): Unused code is now used. It notifies the final state
9520 and no action states in the VCG graph. It also give the reduce actions.
9521 The `shift and goto' edges are red and the `go to state' edges are
9522 blue.
9523 Get the current node name and node_obstack by argument.
9524 (node_obstack): New variable.
9525 (print_state): Manage node_obstack.
9526 (print_core): Use node_obstack given by argument.
9527 A node is not only computed here but in print_actions also.
9528 (print_graph): CPP out useless code instead of commenting it.
9529
9530 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
9531
9532 * tests/atconfig.in (CPPFLAGS): Fix.
9533
9534 2001-08-07 Akim Demaille <akim@epita.fr>
9535
9536 * src/print_graph.c (quote): New.
9537 (print_core): Use it.
9538
9539 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
9540
9541 * src/vcg.c (complain.h): Include it.
9542 Unepitaize `return' invocations.
9543 [NDEBUG] (main): Remove.
9544 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
9545 * src/files.c (open_files): Initialize graph_obstack.
9546 * src/print_graph.c (print_actions): CPP out useless code.
9547 (print_core): Don't output the last `\n' in labels.
9548 Use `quote'.
9549 * src/files.c (output_files): Output the VCG file.
9550 * src/main.c (main): Invoke print_graph ();
9551
9552 2001-08-06 Marc Autret <autret_m@epita.fr>
9553
9554 Automaton VCG graph output.
9555 Using option ``-g'' or long option ``--graph'', you can generate
9556 a gram_filename.vcg file containing a VCG description of the LALR (1)
9557 automaton of your grammar.
9558
9559 * src/main.c: Call to print_graph() function.
9560 * src/getargs.h: Update.
9561 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
9562 (graph_flag): New flag.
9563 (longopts): Update.
9564 (getargs): Add case `g'.
9565 * src/files.c (graph_obstack): New obstack struct.
9566 (open_files): Initialize new obstack.
9567 (output_files): Saves graph_obstack if required.
9568 * src/files.h (graph_obstack): New extern declaration.
9569 * src/Makefile.am: Add new source files.
9570
9571 2001-08-06 Marc Autret <autret_m@epita.fr>
9572
9573 * src/print_graph.c, src/print_graph.h (graph): New.
9574 * src/vcg.h: New file.
9575 * src/vcg.c: New file, VCG graph handling.
9576
9577 2001-08-06 Marc Autret <autret_m@epita.fr>
9578
9579 Add of %source_extension and %header_extension which specify
9580 the source or/and the header output file extension.
9581
9582 * src/files.c (compute_base_names): Remove initialisation of
9583 src_extension and header_extension.
9584 (compute_exts_from_gf): Update.
9585 (compute_exts_from_src): Update.
9586 (output_files): Update.
9587 * src/reader.c (parse_header_extension_decl): New.
9588 (parse_source_extension_decl): New.
9589 (read_declarations): New case statements for the new tokens.
9590 * src/lex.c (percent_table): Add entries for %source_extension
9591 and %header_extension.
9592 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
9593
9594 2001-08-06 Marc Autret <autret_m@epita.fr>
9595
9596 * configure.in: Bump to 1.28c.
9597 * doc/bison.texinfo: Texinfo thingies.
9598
9599 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
9600
9601 * tests/atconfig.in (CPPFLAGS): Add.
9602 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
9603
9604 2001-08-03 Akim Demaille <akim@epita.fr>
9605
9606 Version 1.28b.
9607
9608 2001-08-03 Akim Demaille <akim@epita.fr>
9609
9610 * tests/Makefile.am (check-local): Ship testsuite.
9611 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
9612 Include `string.h'.
9613
9614 2001-08-03 Akim Demaille <akim@epita.fr>
9615
9616 * configure.in: Try using -Wformat when compiling.
9617
9618 2001-08-03 Akim Demaille <akim@epita.fr>
9619
9620 * configure.in: Bump to 1.28b.
9621
9622 2001-08-03 Akim Demaille <akim@epita.fr>
9623
9624 * src/complain.c: Adjust strerror_r portability issues.
9625
9626 2001-08-03 Akim Demaille <akim@epita.fr>
9627
9628 Version 1.28a.
9629
9630 2001-08-03 Akim Demaille <akim@epita.fr>
9631
9632 * src/getargs.c, src/getarg.h (skeleton)): Constify.
9633 * src/lex.c (literalchar): Avoid name clashes on `buf'.
9634 * src/getargs.c: Include complain.h.
9635 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
9636 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
9637
9638 2001-08-03 Akim Demaille <akim@epita.fr>
9639
9640 * src/reader.c (readgram): Display hidden chars in error messages.
9641
9642 2001-08-03 Akim Demaille <akim@epita.fr>
9643
9644 Update to gettext 0.10.39.
9645
9646 2001-08-03 Akim Demaille <akim@epita.fr>
9647
9648 * lib/strspn.c: New.
9649
9650 2001-08-01 Marc Autret <autret_m@epita.fr>
9651
9652 * doc/bison.texinfo: Update.
9653 * doc/bison.1 (mandoc): Update.
9654 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
9655 * src/files.c: Support output files extensions computing.
9656 (src_extension): New static variable.
9657 (header_extension): New static variable.
9658 (tr): New function.
9659 (get_extension_index): New function, gets the index of an extension
9660 filename in a string.
9661 (compute_exts_from_gf): New function, computes extensions from the
9662 grammar file extension.
9663 (compute_exts_from_src): New functions, computes extensions from the
9664 C source file extension, file given by ``-o'' option.
9665 (compute_base_names): Update.
9666 (output_files): Update.
9667
9668 2001-08-01 Robert Anisko <anisko_r@epita.fr>
9669
9670 * doc/bison.texi: Document @$.
9671 (Locations): New section.
9672
9673 2001-07-18 Akim Demaille <akim@epita.fr>
9674
9675 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
9676 * config/prev-version.txt, config/move-if-change: New.
9677 * Makefile.am: Adjust.
9678
9679 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
9680
9681 * src/bison.simple (yyparse): Suppress warning `comparaison
9682 between signed and unsigned'.
9683
9684 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
9685
9686 * src/getargs.h (raw_flag): Remove.
9687 * src/getargs.c: Die on `-r'/`--raw'.
9688 * src/lex.c (parse_percent_token): Die on `%raw'.
9689 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
9690 * tests/calc.at: Suppress test with option `--raw'.
9691
9692 2001-07-14 Akim Demaille <akim@epita.fr>
9693
9694 * config/: New.
9695 * configure.in: Require Autoconf 2.50.
9696 Update to gettext 0.10.38.
9697
9698 2001-03-16 Akim Demaille <akim@epita.fr>
9699
9700 * doc/bison.texinfo: ANSIfy the examples.
9701
9702 2001-03-16 Akim Demaille <akim@epita.fr>
9703
9704 * getargs.c (skeleton): New variable.
9705 (longopts): --skeleton is a new option.
9706 (shortopts, getargs): -S is a new option.
9707 * getargs.h: Declare skeleton.
9708 * output.c (output_parser): Use it.
9709
9710 2001-03-16 Akim Demaille <akim@epita.fr>
9711
9712 * m4/strerror_r.m4: New.
9713 * m4/error.m4: Run AC_FUNC_STRERROR_R.
9714 * lib/error.h, lib/error.c: Update.
9715
9716 2001-03-16 Akim Demaille <akim@epita.fr>
9717
9718 * src/getargs.c (longopts): Clean up.
9719
9720 2001-02-21 Akim Demaille <akim@epita.fr>
9721
9722 * src/reader.c (gensym): `gensym_count' is your own.
9723 Use a static buf to create the symbol name, as token_buffer is no
9724 longer a buffer.
9725
9726 2001-02-08 Akim Demaille <akim@epita.fr>
9727
9728 * src/conflicts.c (conflict_report): Be sure not to append to res
9729 between two calls, which could happen if both first sprintf were
9730 skipped, but not the first cp += strlen.
9731
9732 2001-02-08 Akim Demaille <akim@epita.fr>
9733
9734 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
9735 New, from fileutils 4.0.37.
9736 * configure.in: Require Autoconf 2.49c. I took some time before
9737 making this decision. This is the only way out for portability
9738 issues in Bison, it would mean way too much duplicate effort to
9739 import in Bison features implemented in 2.49c since 2.13.
9740 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
9741
9742 2001-02-02 Akim Demaille <akim@epita.fr>
9743
9744 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
9745 * lib/xalloc.h, lib/xmalloc.c: Update.
9746
9747 2001-01-19 Akim Demaille <akim@epita.fr>
9748
9749 Get rid of the ad hoc handling of token_buffer in the scanner: use
9750 the obstacks.
9751
9752 * src/lex.c (token_obstack): New.
9753 (init_lex): Initialize it. No longer call...
9754 (grow_token_buffer): this. Remove it.
9755 Adjust all the places which used it to use the obstack.
9756
9757 2001-01-19 Akim Demaille <akim@epita.fr>
9758
9759 * src/lex.h: Rename all the tokens:
9760 s/\bENDFILE\b/tok_eof/g;
9761 s/\bIDENTIFIER\b/tok_identifier/g;
9762 etc.
9763 Let them be enums, not #define, to ease debugging.
9764 Adjust all the code.
9765
9766 2001-01-18 Akim Demaille <akim@epita.fr>
9767
9768 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9769 * src/lex.c (maxtoken, grow_token_buffer): Static.
9770
9771 2001-01-18 Akim Demaille <akim@epita.fr>
9772
9773 Since we now use obstacks, more % directives can be enabled.
9774
9775 * src/lex.c (percent_table): Also accept `%yacc',
9776 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9777 `%debug'.
9778 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9779 instead of returning a token.
9780 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9781 * src/reader.c (read_declarations): Adjust.
9782 * src/files.c (open_files): Don't call `compute_base_names', don't
9783 compute `attrsfile' since they depend upon data which might be
9784 *in* the input file now.
9785 (output_files): Do it here.
9786 * src/output.c (output_headers): Document the fact that this patch
9787 introduces a guaranteed SEGV for semantic parsers.
9788 * doc/bison.texinfo: Document them.
9789 * tests/suite.at: Exercise these %options.
9790
9791 2000-12-20 Akim Demaille <akim@epita.fr>
9792
9793 Also handle the output file (--verbose) with obstacks.
9794
9795 * files.c (foutput): Remove.
9796 (output_obstack): New.
9797 Adjust all dependencies.
9798 * src/conflicts.c: Return a string.
9799 * src/system.h (obstack_grow_string): Rename as...
9800 (obstack_sgrow): this. Be ready to work with non literals.
9801 (obstack_fgrow4): New.
9802
9803 2000-12-20 Akim Demaille <akim@epita.fr>
9804
9805 * src/files.c (open_files): Fix the computation of short_base_name
9806 in the case of `-o foo.tab.c'.
9807
9808 2000-12-20 Akim Demaille <akim@epita.fr>
9809
9810 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9811 (copy_dollar): Now that everything uses obstacks, get rid of the
9812 FILE * parameters.
9813
9814 2000-12-20 Akim Demaille <akim@epita.fr>
9815
9816 * src/files.c (open_files): Actually the `.output' file is based
9817 on the short_base_name, not base_name.
9818 * tests/suite.at (Checking output file names): Adjust.
9819
9820 2000-12-20 Akim Demaille <akim@epita.fr>
9821
9822 * src/bison.s1: Remove, we now use directly...
9823 * src/bison.simple: this.
9824 * src/Makefile.am: Use pkgdata instead of data.
9825
9826 2000-12-20 Akim Demaille <akim@epita.fr>
9827
9828 * src/files.c (guard_obstack): New.
9829 (open_files): Initialize it.
9830 (output_files): Dump it...
9831 * src/files.h: Export it.
9832 * src/reader.c (copy_guard): Use it.
9833
9834 2000-12-19 Akim Demaille <akim@epita.fr>
9835
9836 * src/files.c (outfile, defsfile, actfile): Removed as global
9837 vars.
9838 (open_files): Don't compute them.
9839 (output_files): Adjust.
9840 (base_name, short_base_name): Be global.
9841 Adjust dependencies.
9842
9843 2000-12-19 Akim Demaille <akim@epita.fr>
9844
9845 * src/files.c (strsuffix): New.
9846 (stringappend): Be just like strcat but allocate.
9847 (base_names): Eve out from open_files.
9848 Try to simplify the rather hairy computation of base_name and
9849 short_base_name.
9850 (open_files): Use it.
9851 * tests/suite.at (Checking output file names): New test.
9852
9853 2000-12-19 Akim Demaille <akim@epita.fr>
9854
9855 * src/system.h (obstack_grow_literal_string): Rename as...
9856 (obstack_grow_string): this.
9857 * src/output.c (output_parser): Recognize `%% actions' instead of
9858 `$'.
9859 * src/bison.s1: s/$/%% actions/.
9860 * src/bison.hairy: Likewise.
9861
9862 2000-12-19 Akim Demaille <akim@epita.fr>
9863
9864 * src/output.c (output_parser): Compute the `#line' lines when
9865 there are.
9866 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9867 Suggested by Hans Aberg.
9868
9869 2000-12-19 Akim Demaille <akim@epita.fr>
9870
9871 Let the handling of the skeleton files be local to the procedures
9872 that use it.
9873
9874 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9875 longer static.
9876 (fparser, open_extra_files): Remove.
9877 (open_files, output_files): Don't take care of fparser.
9878 * src/files.h: Adjust.
9879 * src/output.c (output_parser): Open and close the file to the
9880 skeleton.
9881 * src/reader.c (read_declarations): When %semantic_parser, open
9882 fguard.
9883
9884 2000-12-19 Akim Demaille <akim@epita.fr>
9885
9886 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9887 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9888
9889 2000-12-19 Akim Demaille <akim@epita.fr>
9890
9891 * src/files.c (open_files): Yipee! We no longer need all the code
9892 looking for `/tmp' since we have no tmp file.
9893
9894 2000-12-19 Akim Demaille <akim@epita.fr>
9895
9896 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9897 New macros.
9898 * src/files.c (open_files): Less dependency on MSDOS etc.
9899
9900 2000-12-14 Akim Demaille <akim@epita.fr>
9901
9902 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9903 Provide a default definition.
9904 Use it when executing the default @ action.
9905 * src/reader.c (reader_output_yylsp): No longer include
9906 `timestamp' and `text' in the default YYLTYPE.
9907
9908 2000-12-12 Akim Demaille <akim@epita.fr>
9909
9910 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9911 (copy_guard): Quote the file names.
9912 Reported by Laurent Mascherpa.
9913
9914 2000-12-12 Akim Demaille <akim@epita.fr>
9915
9916 * src/output.c (output_headers, output_program, output): Be sure
9917 to escape special characters when outputting filenames.
9918 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9919 (output_headers): Don't depend on them, Use ACTSTR.
9920
9921 2000-11-17 Akim Demaille <akim@epita.fr>
9922
9923 * lib/obstack.h: Formatting changes.
9924 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9925 prevents type checking.
9926 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9927 cast the value to (void *): assigning a `foo *' to a `void *'
9928 variable is valid.
9929 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9930 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9931 append characters.
9932
9933 2000-11-17 Akim Demaille <akim@epita.fr>
9934
9935 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9936 as...
9937 (suite.m4, regression.m4, calc.m4): these.
9938 * tests/atgeneral.m4: Update from CVS Autoconf.
9939
9940 2000-11-17 Akim Demaille <akim@epita.fr>
9941
9942 * tests/regression.m4 (%union and --defines): New test,
9943 demonstrating a current bug in the obstack implementation.
9944
9945 2000-11-17 Akim Demaille <akim@epita.fr>
9946
9947 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9948 macros.
9949 Use them to declare the variables which are global or local to
9950 `yyparse'.
9951
9952 2000-11-17 Akim Demaille <akim@epita.fr>
9953
9954 * acconfig.h: Remove, no longer used.
9955
9956 2000-11-07 Akim Demaille <akim@epita.fr>
9957
9958 * src: s/Copyright (C)/Copyright/g.
9959
9960 2000-11-07 Akim Demaille <akim@epita.fr>
9961
9962 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9963 defining.
9964 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9965
9966 2000-11-07 Akim Demaille <akim@epita.fr>
9967
9968 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9969 Merge in a single CPP if/else.
9970
9971 2000-11-07 Akim Demaille <akim@epita.fr>
9972
9973 * src/output.c (output): Remove useless variables.
9974 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9975 argument `data' for consistency with the prototypes.
9976 Qualify it `const'.
9977 (obstack_copy, obstack_copy0): Rename the second argument as
9978 `address' for consistency. Qualify it `const'.
9979 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9980 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9981 `const' their input argument (`data' or `address').
9982 Adjust the corresponding macros to include `const' in casts.
9983
9984 2000-11-03 Akim Demaille <akim@epita.fr>
9985
9986 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9987 s/PFILE1/BISON_HAIRY/.
9988 Adjust dependencies.
9989
9990 2000-11-03 Akim Demaille <akim@epita.fr>
9991
9992 For some reason, this was not applied.
9993
9994 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9995 `unlink': it's no longer used.
9996
9997 2000-11-03 Akim Demaille <akim@epita.fr>
9998
9999 * src/files.c (skeleton_find): New function, eved out of...
10000 (open_files, open_extra_files): here.
10001
10002 2000-11-03 Akim Demaille <akim@epita.fr>
10003
10004 Don't use `atexit'.
10005
10006 * src/files.c (obstack_save): New function.
10007 (done): Rename as...
10008 (output_files): this.
10009 Use `obstack_save'.
10010 * src/main.c (main): Don't use `atexit' to register `done', since
10011 it no longer has to remove tmp files, just call `output_files'
10012 when there are no errors.
10013
10014 2000-11-02 Akim Demaille <akim@epita.fr>
10015
10016 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10017 `unlink': it's no longer used.
10018 * src/files.h: Formatting changes.
10019
10020 2000-11-02 Akim Demaille <akim@epita.fr>
10021
10022 Remove the last uses of mktemp and unlink/delete.
10023
10024 * src/files.c (fdefines, ftable): Removed.
10025 (defines_ostack, table_obstack): New.
10026 Adjust dependencies of the former into uses of the latter.
10027 * src/output.c (output_short_or_char_table, output_short_table):
10028 Convert to using obstacks.
10029 * src/reader.c (copy_comment2): Accept one FILE * and two
10030 obstacks.
10031 (output_token_defines, reader_output_yylsp): Use obstacks.
10032 * src/system.h (obstack_fgrow3): New.
10033
10034 2000-11-01 Akim Demaille <akim@epita.fr>
10035
10036 Change each use of `fattrs' into a use of `attrs_obstack'.
10037
10038 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
10039 * src/files.c (fattrs): Remove.
10040 (attrs_obstack): New.
10041 Adjust all dependencies.
10042 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
10043
10044 2000-11-01 Akim Demaille <akim@epita.fr>
10045
10046 Introduce obstacks.
10047 Change each use of `faction' into a use of `action_obstack'.
10048
10049 * lib/obstack.h, lib/obstack.c: New files.
10050 * src/files.c (faction): Remove.
10051 (action_obstack): New.
10052 Adjust all dependencies.
10053
10054 2000-10-20 Akim Demaille <akim@epita.fr>
10055
10056 * lib/quote.h (PARAMS): New macro. Use it.
10057
10058 2000-10-16 Akim Demaille <akim@epita.fr>
10059
10060 * src/output.c (output_short_or_char_table): New function.
10061 (output_short_table, output_token_translations): Use it.
10062 (goto_actions): Use output_short_table.
10063
10064 2000-10-16 Akim Demaille <akim@epita.fr>
10065
10066 * src/symtab.c (bucket_new): New function.
10067 (getsym): Use it.
10068
10069 * src/output.c (output_short_table): New argument to display the
10070 comment associated with the table.
10071 Adjust dependencies.
10072 (output_gram): Use it.
10073 (output_rule_data): Nicer output layout for YYTNAME.
10074
10075 2000-10-16 Akim Demaille <akim@epita.fr>
10076
10077 * src/lex.c (read_typename): New function.
10078 (lex): Use it.
10079 * src/reader.c (copy_dollar): Likewise.
10080
10081 2000-10-16 Akim Demaille <akim@epita.fr>
10082
10083 * src/reader.c (copy_comment2): Expect the input stream to be on
10084 the `/' which is suspected to open a comment, instead of being
10085 called after `//' or `/*' was read.
10086 (copy_comment, copy_definition, parse_union_decl, copy_action)
10087 (copy_guard): Adjust.
10088
10089 2000-10-16 Akim Demaille <akim@epita.fr>
10090
10091 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
10092 `read_signed_integer'.
10093
10094 2000-10-16 Akim Demaille <akim@epita.fr>
10095
10096 * src/reader.c (copy_dollar): New function.
10097 (copy_guard, copy_action): Use it.
10098
10099 2000-10-16 Akim Demaille <akim@epita.fr>
10100
10101 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
10102 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
10103 New files, from Fileutils 4.0.27.
10104 * src/main.c (printable_version): Remove.
10105 * src/lex.c, src/reader.c: Use `quote'.
10106
10107 2000-10-04 Akim Demaille <akim@epita.fr>
10108
10109 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
10110
10111 2000-10-04 Akim Demaille <akim@epita.fr>
10112
10113 * doc/bison.texinfo: Various typos spotted by Neil Booth.
10114
10115 2000-10-04 Akim Demaille <akim@epita.fr>
10116
10117 When a literal string is used to define two different tokens,
10118 `bison -v' segfaults.
10119 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
10120
10121 * tests/regression.m4: New file.
10122 Include the core of the sample provided by Piotr Gackiewicz.
10123 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
10124 properly.
10125
10126 2000-10-04 Akim Demaille <akim@epita.fr>
10127
10128 * src/reader.c (parse_expect_decl): Keep `count' within the size
10129 of `buffer'.
10130 From Neil Booth.
10131
10132 2000-10-02 Paul Eggert <eggert@twinsun.com>
10133
10134 * bison.s1 (yyparse): Assign the default value
10135 unconditionally, to avoid a GCC warning and make the parser a
10136 tad smaller.
10137
10138 2000-10-02 Akim Demaille <akim@epita.fr>
10139
10140 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
10141 options.
10142
10143 2000-10-02 Akim Demaille <akim@epita.fr>
10144
10145 * src/derives.c, src/print.c, src/reduce.c: To ease the
10146 translation, move some `\n' out of the translated strings.
10147
10148 2000-10-02 Akim Demaille <akim@epita.fr>
10149
10150 The location tracking mechanism is precious for parse error
10151 messages. Nevertheless, it is enabled only when `@n' is used in
10152 the grammar, which is a different issue (you can use it in error
10153 message, but not in the grammar per se). Therefore, there should
10154 be another means to enable it.
10155
10156 * src/getargs.c (getargs): Support `--locations'.
10157 (usage): Report it.
10158 * src/getargs.h (locationsflag): Export it.
10159 * src/lex.c (percent_table): Support `%locations'.
10160 * src/reader.c (yylsp_needed): Remove this variable, now replaced
10161 with `locationsflag'.
10162 * doc/bison.texinfo: Document `--locations' and `%locations'.
10163 Sort the options.
10164 * tests/calc.m4: Test it.
10165
10166 For regularity of the names, replace each
10167 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
10168 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
10169 In addition replace each `flag' with `_flag'.
10170
10171 2000-10-02 Akim Demaille <akim@epita.fr>
10172
10173 Also test parse error messages, including with YYERROR_VERBOSE.
10174
10175 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
10176 associative).
10177 Use it to check the computations.
10178 Use it to check `nonassoc' is honored.
10179 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
10180 `--yyerror-verbose'.
10181 (_AT_CHECK_CALC): Adjust to this option.
10182 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
10183
10184 2000-10-02 Akim Demaille <akim@epita.fr>
10185
10186 Test also `--verbose', `--defines' and `--name-prefix'. Testing
10187 the latter demonstrates a flaw in the handling of non debugging
10188 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
10189 was used in order to simplify:
10190
10191 #if YYDEBUG
10192 if (yydebug)
10193 {
10194 ...
10195 }
10196 #endif
10197
10198 into
10199
10200 if (yydebug)
10201 {
10202 ...
10203 }
10204
10205 unfortunately this leads to a CPP conflict when
10206 `--name-prefix=foo' is used since it produces `#define yydebug
10207 foodebug'.
10208
10209 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
10210 (YYDPRINTF): New macro.
10211 Spread its use.
10212 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10213 the bison options.
10214 Also test `--verbose', `--defines' and `--name-prefix'.
10215
10216 2000-10-02 Akim Demaille <akim@epita.fr>
10217
10218 Improve the readability of the produced parsers.
10219
10220 * src/bison.s1: Formatting changes.
10221 Improve the comment related to the `$' mark.
10222 (yydefault): Don't fall through to `yyresume': `goto' there.
10223 * src/output.c (output_parser): When the `$' is met, skip the end
10224 of its line.
10225 New variable, `number_of_dollar_signs', to check there's exactly
10226 one `$' in the parser skeleton.
10227
10228 2000-10-02 Akim Demaille <akim@epita.fr>
10229
10230 * lib/xstrdup.c: New file, from the fileutils.
10231 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10232 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10233 instead of strlen + xmalloc + strcpy.
10234 * src/symtab.c (copys): Remove, use xstrdup instead.
10235
10236 2000-10-02 Akim Demaille <akim@epita.fr>
10237
10238 * src/gram.h (associativity): New enum type which replaces the
10239 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10240 `right_assoc', `left_assoc' and `non_assoc'.
10241 Adjust all dependencies.
10242 * src/reader.c: Formatting changes.
10243 (LTYPESTR): Don't define it, use it as a literal in
10244 `reader_output_yylsp'.
10245 * src/symtab.h (symbol_class): New enum type which replaces the
10246 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10247 `sunknown', `stoken and `snterm'.
10248
10249 2000-10-02 Akim Demaille <akim@epita.fr>
10250
10251 * src/getargs.c (fixed_outfiles): Rename as...
10252 (yaccflag): for consistency and accuracy.
10253 Adjust dependencies.
10254
10255 2000-10-02 Akim Demaille <akim@epita.fr>
10256
10257 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10258 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10259 difficult and introduced a lot of core dump. It turns out that
10260 Bison used an implementation of `xmalloc' based on `calloc', and
10261 at various places it does depend upon the initialization to 0. I
10262 have not tried to isolate the pertinent places, and all the former
10263 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10264 someone should address this issue.
10265
10266 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10267 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10268 files.
10269 Adjust dependencies.
10270 * src/warshall.h: New file.
10271 Propagate.
10272
10273 2000-10-02 Akim Demaille <akim@epita.fr>
10274
10275 Various anti-`extern in *.c' changes.
10276
10277 * src/system.h: Include `assert.h'.
10278
10279 2000-10-02 Akim Demaille <akim@epita.fr>
10280
10281 * src/state.h (nstates, final_state, first_state, first_shift)
10282 (first_reduction): Move their exportation from here...
10283 * src/LR0.h: to here.
10284 Adjust dependencies.
10285 * src/getargs.c (statisticsflag): New variable.
10286 Add support for `--statistics'.
10287 Adjust dependencies.
10288
10289 Remove a lot of now useless `extern' statements in most files.
10290
10291 2000-10-02 Akim Demaille <akim@epita.fr>
10292
10293 * src/LR0.h: New file.
10294 Propagate its use.
10295
10296 2000-10-02 Akim Demaille <akim@epita.fr>
10297
10298 * src/print.h: New file.
10299 Propagate its use.
10300 * src/print.c: Formatting and ordering changes.
10301 (verbose, terse): Replace with...
10302 (print_results): this new function.
10303 Adjust dependencies.
10304
10305 2000-10-02 Akim Demaille <akim@epita.fr>
10306
10307 * src/conflicts.c (conflict_report): New function.
10308 (conflict_log, verbose_conflict_log): Replace with...
10309 (print_conflicts): this function.
10310 Adjust dependencies.
10311 * src/conflicts.h: New file.
10312 Propagate its inclusion.
10313
10314 2000-10-02 Akim Demaille <akim@epita.fr>
10315
10316 * src/nullable.h: New file.
10317 Propagate its inclusion.
10318 * src/nullable.c: Formatting changes.
10319
10320 2000-10-02 Akim Demaille <akim@epita.fr>
10321
10322 * src/reduce.h: New file.
10323 Propagate its inclusion.
10324 * src/reduce.c: Topological sort and other formatting changes.
10325 (bool, TRUE, FALSE): Move their definition to...
10326 * src/system.h: here.
10327
10328 2000-10-02 Akim Demaille <akim@epita.fr>
10329
10330 * src/files.c: Formatting changes.
10331 (tryopen, tryclose, openfiles): Rename as...
10332 (xfopen, xfclose, open_files): this.
10333 (stringappend): static.
10334 * src/files.h: Complete the list of exported symbols.
10335 Propagate its use.
10336
10337 2000-10-02 Akim Demaille <akim@epita.fr>
10338
10339 * src/reader.h: New file.
10340 Propagate its use instead of tedious list of `extern' and
10341 prototypes.
10342 * src/reader.c: Formatting changes, topological sort,
10343 s/register//.
10344
10345 2000-10-02 Akim Demaille <akim@epita.fr>
10346
10347 * src/lex.h: Prototype `lex.c' exported functions.
10348 * src/reader.c: Adjust.
10349 * src/lex.c: Formatting changes.
10350 (safegetc): Rename as...
10351 (xgetc): this.
10352
10353 2000-10-02 Akim Demaille <akim@epita.fr>
10354
10355 * src/lalr.h: New file.
10356 Propagate its inclusion instead of prototypes and `extern'.
10357 * src/lalr.c: Formatting changes, topological sorting etc.
10358
10359 2000-10-02 Akim Demaille <akim@epita.fr>
10360
10361 * src/output.c (token_actions): Introduce a temporary array,
10362 YYDEFACT, that makes it possible for this function to use
10363 output_short_table.
10364
10365 2000-10-02 Akim Demaille <akim@epita.fr>
10366
10367 `user_toknums' is output as a `short[]' in `output.c', while it is
10368 defined as a `int[]' in `reader.c'. For consistency with the
10369 other output tables, `user_toknums' is now defined as a table of
10370 shorts.
10371
10372 * src/reader.c (user_toknums): Be a short table instead of an int
10373 table.
10374 Adjust dependencies.
10375
10376 Factor the short table outputs.
10377
10378 * src/output.c (output_short_table): New function.
10379 * src/output.c (output_gram, output_stos, output_rule_data)
10380 (output_base, output_table, output_check): Use it.
10381
10382 2000-10-02 Akim Demaille <akim@epita.fr>
10383
10384 * src/output.c (output): Topological sort of the functions, in
10385 order to get rid of the `static' prototypes.
10386 No longer use `register'.
10387 * src/output.h: New file.
10388 Propagate its inclusion in files explicitly prototyping functions
10389 from output.c.
10390
10391 2000-09-21 Akim Demaille <akim@epita.fr>
10392
10393 * src/atgeneral.m4: Update from Autoconf.
10394
10395 2000-09-21 Akim Demaille <akim@epita.fr>
10396
10397 * src/closure.h: New file.
10398 * src/closure.c: Formatting changes, topological sort over the
10399 functions, use of closure.h.
10400 (initialize_closure, finalize_closure): Rename as...
10401 (new_closure, free_closure): these. Adjust dependencies.
10402 * src/LR0.c: Formatting changes, topological sort, use of
10403 cloture.h.
10404 (initialize_states): Rename as...
10405 (new_states): this.
10406 * src/Makefile.am (noinst_HEADERS): Adjust.
10407
10408 2000-09-20 Akim Demaille <akim@epita.fr>
10409
10410 * src/acconfig.h: Don't protect config.h against multiple
10411 inclusion.
10412 Don't define PARAMS.
10413 * src/system.h: Define PARAMS.
10414 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
10415 purpose of config.h. system.h must not try to fix wrong
10416 definitions in config.h.
10417
10418 2000-09-20 Akim Demaille <akim@epita.fr>
10419
10420 * src/derives.h: New file.
10421 * src/main.c, src/derives.h: Use it.
10422 Formatting changes.
10423 * src/Makefile.am (noinst_HEADERS): Adjust.
10424
10425 2000-09-20 Akim Demaille <akim@epita.fr>
10426
10427 * tests/atgeneral.m4: Update from Autoconf.
10428 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
10429 (AT_CHECK_CALC): New macros.
10430 Use these macros to test bison with options `', `--raw',
10431 `--debug', `--yacc', `--yacc --debug'.
10432
10433 2000-09-19 Akim Demaille <akim@epita.fr>
10434
10435 * src/output.c: Formatting changes.
10436 * src/machine.h: Remove, leaving its contents in...
10437 * src/system.h: here.
10438 Include stdio.h.
10439 Adjust all dependencies on stdio.h and machine.h.
10440 * src/getargs.h: New file.
10441 Let all `extern' declarations about getargs.c be replaced with
10442 inclusion of `getargs.h'.
10443 * src/Makefile.am (noinst_HEADERS): Adjust.
10444
10445 * tests/calc.m4 (yyin): Be initialized in main, not on the global
10446 scope.
10447 (yyerror): Returns void, not int.
10448 * doc/bison.texinfo: Formatting changes.
10449
10450 2000-09-19 Akim Demaille <akim@epita.fr>
10451
10452 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
10453 portable.
10454
10455 2000-09-18 Akim Demaille <akim@epita.fr>
10456
10457 * configure.in: Append WARNING_CFLAGS to CFLAGS.
10458 * src/Makefile.am (INCLUDES): Don't.
10459 Be ready to fetch headers in lib/.
10460
10461 2000-09-18 Akim Demaille <akim@epita.fr>
10462
10463 * doc/bison.texinfo: Update the copyright.
10464 ANSIfy and GNUify the examples.
10465 Remove the old menu.
10466
10467 2000-09-18 Akim Demaille <akim@epita.fr>
10468
10469 First set of tests: use the `calc' example from the documentation.
10470
10471 * src/bison.s1 (yyparse): Condition the code using `yytname' which
10472 is defined only when YYDEBUG is.
10473 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
10474 * src/files.c (tryopen, tryclose): Formatting changes.
10475 Move to the top and be static.
10476 * src/reader.c (read_signed_integer): Likewise.
10477 * tests/calc.m4: New file.
10478 * Makefile.am, suite.m4: Adjust.
10479 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
10480
10481 2000-09-18 Akim Demaille <akim@epita.fr>
10482
10483 Add support for an Autotest test suite for Bison.
10484
10485 * m4/m4.m4, m4/atconfig.m4: New files.
10486 * m4/Makefile.am (EXTRA_DIST): Adjust.
10487 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
10488 files.
10489 * src/getargs.c: Display a more standard --version message.
10490 * src/reader.c (reader): Formatting changes.
10491 No longer depend upon VERSION_STRING.
10492 * configure.in: No longer use `dnl'.
10493 Set up the test suite and the new directory `tests/.
10494 (VERSION_STRING): Remove.
10495
10496 2000-04-14 Akim Demaille <akim@epita.fr>
10497
10498 * src/reader.c (copy_comment2): New function, same as former
10499 `copy_comment', but outputs into two FILE *.
10500 (copy_comment): Use it.
10501 (parse_union_decl): Use it.
10502 (get_type, parse_start_decl): Use the same `invalid' message.
10503 (parse_start_decl, parse_union_decl): Use the same `multiple'
10504 message.
10505 (parse_union_decl, copy_guard, copy_action): Use the same
10506 `unmatched' message.
10507 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
10508
10509 2000-03-31 Akim Demaille <akim@epita.fr>
10510
10511 * src/files.c (tryopen, tryclose): Move to the top.
10512 Be static.
10513
10514 2000-03-31 Akim Demaille <akim@epita.fr>
10515
10516 * src/main.c (main): Don't call `done', exit does it.
10517
10518 2000-03-31 Akim Demaille <akim@epita.fr>
10519
10520 * allocate.c: s/return (foo)/return foo/.
10521 * lalr.c: Likewise.
10522 * LR0.c: Likewise.
10523 * output.c: Likewise.
10524 * reader.c: Likewise.
10525 * symtab.c: Likewise.
10526 * vmsgetargs.c: Likewise.
10527
10528 2000-03-31 Akim Demaille <akim@epita.fr>
10529
10530 Clean up the error reporting functions.
10531
10532 * src/report.c: New file.
10533 * src/report.h: Likewise.
10534 * src/Makefile.am: Adjust.
10535 * m4/error.m4: New file.
10536 * m4/Makefile.am: Adjust.
10537 * configure.in (jm_PREREQ_ERROR): Call it.
10538 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
10539 Remove.
10540 (fatal, fatals): Remove. All callers use complain.c::fatal.
10541 (warn, warni, warns, warnss, warnss): Remove. All callers use
10542 complain.c::complain.
10543 (toomany): Remove, use fatal instead.
10544 * src/files.c (done): No argument, use complain_message_count.
10545 * src/main.c (main): Register `done' to `atexit'.
10546
10547 * src/getargs.c (usage): More `fputs', less `fprintf'.
10548
10549 2000-03-28 Akim Demaille <akim@epita.fr>
10550
10551 * lib/: New directory.
10552 * Makefile.am (SUBDIRS): Adjust.
10553 * configure.in: Adjust.
10554 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
10555 useless.
10556 * src/alloca.c: Moved to lib/.
10557 * src/getopt.c: Likewise.
10558 * src/getopt1.c: Likewise.
10559 * src/getopt.h: Likewise.
10560 * src/ansi2knr.c: Likewise.
10561 * src/ansi2knr.1: Likewise.
10562 * src/Makefile.am: Adjust.
10563 * lib/Makefile.am: New file.
10564
10565 2000-03-28 Akim Demaille <akim@epita.fr>
10566
10567 * src/getargs.c (usage): Refresh the help message.
10568
10569 2000-03-17 Akim Demaille <akim@epita.fr>
10570
10571 * src/getopt1.c: Updated from textutils 2.0e
10572 * src/getopt.c: Likewise.
10573 * src/getopt.h: Likewise.
10574
10575 2000-03-17 Akim Demaille <akim@epita.fr>
10576
10577 * src/Makefile.am (bison.simple): Fix the awk program: quote only
10578 the file name, not the whole `#line LINE FILE'.
10579
10580 2000-03-17 Akim Demaille <akim@epita.fr>
10581
10582 On syntax errors, report the token on which we choked.
10583
10584 * src/bison.s1 (yyparse): In the label yyerrlab, when
10585 YYERROR_VERBOSE, add yychar in msg.
10586
10587 2000-03-17 Akim Demaille <akim@epita.fr>
10588
10589 * src/reader.c (copy_at): New function.
10590 (copy_guard): Use it.
10591 (copy_action): Use it.
10592
10593 2000-03-17 Akim Demaille <akim@epita.fr>
10594
10595 Be kind to translators, save some useless translations.
10596
10597 * src/main.c (banner): New function.
10598 (fatal_banner): Use it.
10599 (warn_banner): Use it.
10600
10601 2000-03-17 Akim Demaille <akim@epita.fr>
10602
10603 * src/reader.c (copy_definition): Use copy_string and
10604 copy_comment. Removed now unused `match', `ended',
10605 `cplus_comment'.
10606 (copy_comment, copy_string): Moved, to be visible from
10607 copy_definition.
10608
10609 2000-03-17 Akim Demaille <akim@epita.fr>
10610
10611 * src/reader.c (copy_string): Declare `static inline'. No
10612 problems with inline, since it is checked by configure.
10613 (copy_comment): Likewise.
10614
10615 2000-03-17 Akim Demaille <akim@epita.fr>
10616
10617 * src/reader.c (packsymbols): Formatting changes.
10618
10619 2000-03-17 Akim Demaille <akim@epita.fr>
10620
10621 * src/reader.c (copy_comment): New function, factored out from:
10622 (copy_action): Use it. Removed now unused `match', `ended',
10623 `cplus_comment'.
10624 (copy_guard): Likewise.
10625
10626 2000-03-17 Akim Demaille <akim@epita.fr>
10627
10628 * src/reader.c (copy_string): New function, factored out from:
10629 (copy_action): Use it.
10630 (copy_guard): Likewise.
10631
10632 2000-03-17 Akim Demaille <akim@epita.fr>
10633
10634 Change the handling of @s so that they behave exactly like $s.
10635 There is now a pseudo variable @$ (readble and writable), location
10636 of the lhs of the rule (by default ranging from the location of
10637 the first symbol of the rhs, to the location of the last symbol,
10638 or, if the rhs is empty, YYLLOC).
10639
10640 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
10641 yyval.
10642 (yyparse): When providing a default semantic action, provide a
10643 default location action.
10644 (after the $): No longer change `*YYLSP', just stack YYLOC the
10645 same way you stack YYVAL.
10646 * src/reader.c (read_declarations): Use warns.
10647 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
10648 (copy_action, case '@'): Likewise.
10649 Use a standard error message, to save useless work from
10650 translators.
10651
10652 2000-03-17 Akim Demaille <akim@epita.fr>
10653
10654 * src/bison.s1: Formatting and cosmetics changes.
10655 * src/reader.c: Likewise.
10656 Update the Copyright notice.
10657
10658 2000-03-17 Akim Demaille <akim@epita.fr>
10659
10660 * src/bison.s1 (#line): All set to `#line' only, since the
10661 Makefile now handles them.
10662
10663 2000-03-16 Akim Demaille <akim@epita.fr>
10664
10665 * src/output.c (output_rule_data): Output the documentation of
10666 some of the tables.
10667 (Copyright notice): Update.
10668 Formatting changes.
10669
10670 2000-03-16 Akim Demaille <akim@epita.fr>
10671
10672 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
10673 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
10674 One `#if YYDEBUG' remains, since it uses variables which are
10675 defined only if `YYDEBUG != 0'.
10676
10677 2000-03-16 Akim Demaille <akim@epita.fr>
10678
10679 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
10680 and related variables so that the similarities are highlighted.
10681
10682 2000-03-16 Akim Demaille <akim@epita.fr>
10683
10684 * src/bison.s1: Properly indent CPP directives.
10685
10686 2000-03-16 Akim Demaille <akim@epita.fr>
10687
10688 * src/bison.s1: Properly indent the `alloca' CPP section.
10689
10690 2000-03-16 Akim Demaille <akim@epita.fr>
10691
10692 Do not hard code values of directories in `configure.in'.
10693 Update the `configure' tool chain.
10694
10695 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
10696 src/makefile.am.
10697 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
10698 (AC_OUTPUT): Add m4/Makefile.
10699 Bump to bison 1.28a, 1.29 has never been released.
10700 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
10701 handled via src/Makefile.am.
10702 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
10703 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
10704 autoheader.
10705 * Makefile.am (SUBDIRS): Add m4.
10706 (ACLOCAL_AM_FLAGS): New variable.
10707 (AUTOMAKE_OPTIONS): Add check-news.
10708 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
10709 the proper line number and file name.
10710 (DEFS): Propagate the location of bison library files and of the
10711 locale files.
10712 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
10713 builddir.
10714 * acinclude.m4: Remove, replaced by the directory m4.
10715 * m4/Makefile.am (EXTRA_DIST): New variable.
10716 * m4/gettext.m4: New file, from the fileutils.
10717 * m4/lcmessage.m4: Likewise
10718 * m4/progtest.m4: Likewise.
10719 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
10720
10721 2000-03-10 Akim Demaille <akim@epita.fr>
10722
10723 * src/closure.c:
10724 Formatting changes of various comments.
10725 Respect the GNU coding standards at various places.
10726 Don't use `_()' when no translation is needed.
10727
10728 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10729
10730 * src/files.c:
10731 OS/2 honors TMPDIR environment variable.
10732
10733 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10734
10735 * doc/bison.texinfo: Tweaked spelling and grammar.
10736 Updated ISBN.
10737 Removed reference to price of printed copy.
10738 Mention BISON_SIMPLE and BISON_HAIRY.
10739
10740 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10741
10742 * configure.in, NEWS:
10743 Bison 1.29 released.
10744
10745 1999-10-27 Jesse Thilo <jthilo@gnu.org>
10746
10747 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
10748 Added reference card.
10749
10750 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10751
10752 * po/ru.po: Added Russian translation.
10753
10754 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10755
10756 * configure.in: Added Russian translation.
10757
10758 1999-07-06 Jesse Thilo <jthilo@gnu.org>
10759
10760 * configure.in, NEWS, README:
10761 Released version 1.28.
10762
10763 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10764
10765 * src/system.h:
10766 Squashed redefinition warning on some systems.
10767
10768 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10769 Have configure build version string instead of relying on ANSI string
10770 concatentation.
10771
10772 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10773
10774 * po/POTFILES.in: Got rid of version.c.
10775
10776 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10777
10778 * acconfig.h, configure.in:
10779 Have configure build version string instead of relying on ANSI string
10780 concatentation.
10781
10782 1999-06-08 Jesse Thilo <jthilo@gnu.org>
10783
10784 * doc/bison.1:
10785 Dropped mention of `+' for long-named options.
10786
10787 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10788
10789 * src/files.c: Added <unistd.h> for unlink().
10790
10791 * src/Makefile.am, src/system.h:
10792 I18n fixes.
10793
10794 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10795
10796 * README: Added a FAQ list.
10797
10798 * configure.in, acconfig.h:
10799 I18n fixes.
10800
10801 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10802
10803 * doc/FAQ, doc/Makefile.am:
10804 Added a FAQ list.
10805
10806 1999-05-19 Jesse Thilo <jthilo@gnu.org>
10807
10808 * src/alloc.h, src/symtab.h, src/version.c:
10809 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10810
10811 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10812
10813 * src/.cvsignore, src/Makefile.am:
10814 Reorganized: sources in `src', documentation in `doc'.
10815
10816 * src/lex.c (literalchar):
10817 fixed the code for escaping double quotes (thanks
10818 Jonathan Czisny.)
10819
10820 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10821
10822 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10823 Adjusted paths to reflect directory reorganization.
10824
10825 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10826
10827 * doc/.cvsignore, doc/Makefile.am:
10828 Reorganized: sources in `src', documentation in `doc'.
10829
10830 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10831
10832 * configure.in:
10833 Updated AC_INIT file to reflect directory reorganization.
10834
10835 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10836 Reorganized: sources in `src', documentation in `doc'.
10837
10838 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10839
10840 * src/allocate.c:
10841 Don't declare calloc() and realloc() if not necessary.
10842
10843 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10844
10845 * configure.in, acconfig.h, acinclude.m4:
10846 Don't declare calloc() and realloc() if not necessary.
10847
10848 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10849
10850 * po/.cvsignore: Added i18n support.
10851
10852 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10853
10854 * acconfig.h, configure.in, Makefile.am:
10855 Added i18n support.
10856
10857 1999-03-22 Jesse Thilo <jthilo@gnu.org>
10858
10859 * src/bison.s1: Fixed #line numbers.
10860
10861 1999-03-15 Jesse Thilo <jthilo@gnu.org>
10862
10863 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10864 Added PO files from Translation Project.
10865
10866 1999-03-03 Jesse Thilo <jthilo@gnu.org>
10867
10868 * Makefile.am:
10869 Added support for non-ANSI compilers (ansi2knr).
10870
10871 1999-02-16 Jesse Thilo <jthilo@gnu.org>
10872
10873 * configure.in: Bumped version number to 1.27.
10874
10875 * Makefile.am:
10876 Added `bison.simple' to list of files removed by `make distclean'.
10877
10878 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10879
10880 * src/files.c, src/files.h:
10881 Defined locations of parser files in config.h instead of Makefile.
10882
10883 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10884
10885 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10886 Defined locations of parser files in config.h instead of Makefile.
10887
10888 1999-02-09 Jesse Thilo <jthilo@gnu.org>
10889
10890 * Makefile.am:
10891 Removed inappropriate use of $< macro.
10892
10893 1999-02-05 Jesse Thilo <jthilo@gnu.org>
10894
10895 * po/Makefile.in.in, po/POTFILES.in:
10896 Add `po' directory skeleton.
10897
10898 1999-01-27 Jesse Thilo <jthilo@gnu.org>
10899
10900 * README: Document help-bison list.
10901
10902 * configure.in: Add check for mkstemp().
10903
10904 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10905
10906 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10907 Hush a few compiler warnings.
10908
10909 * src/files.c:
10910 Add tryclose(), which verifies that fclose was successful.
10911 Hush a couple of compiler warnings.
10912
10913 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10914
10915 * Makefile.am, OChangeLog:
10916 ChangeLog is now automatically generated. Include the old version as
10917 OChangeLog.
10918
10919 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10920
10921 * 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:
10922 Update FSF address.
10923
10924 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10925
10926 * doc/bison.texinfo: Fix formatting glitch.
10927
10928 * doc/bison.texinfo: Update FSF address.
10929
10930 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10931
10932 * acconfig.h: Update FSF address.
10933
10934 1999-01-08 Jesse Thilo <jthilo@gnu.org>
10935
10936 * src/system.h:
10937 Don't define PACKAGE here, since config.h defines it.
10938
10939 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10940
10941 * src/reader.c: Update copyright date.
10942
10943 * src/main.c:
10944 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10945 favor of output directly to stderr (avoids buffer overruns).
10946
10947 * src/reader.c: Some checks for premature EOF.
10948
10949 * 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:
10950 Use prototypes if the compiler understands them.
10951
10952 * src/files.c: Honor TMPDIR on Unix hosts.
10953 Use prototypes if the compiler understands them.
10954
10955 * src/reader.c:
10956 Fix a couple of buffer overrun bugs.
10957 Use prototypes if the compiler understands them.
10958
10959 * src/system.h: Include unistd.h and ctype.h.
10960 Use #ifdef instead of #if for NLS symbols.
10961
10962 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10963
10964 * doc/bison.texinfo:
10965 Delete comment "consider using @set for edition number, etc..." since
10966 we now are doing so.
10967
10968 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10969
10970 * configure.in:
10971 Use prototypes if the compiler understands them.
10972
10973 * NEWS: Document 1.26 highlights.
10974
10975 * Makefile.am: Require Automake 1.3 or later.
10976
10977 * acconfig.h:
10978 Use prototypes if the compiler understands them.
10979
10980 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10981
10982 * src/version.c:
10983 Use VERSION symbol from automake for version number.
10984
10985 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10986
10987 * acconfig.h, configure.in, version.cin:
10988 Use VERSION symbol from automake for version number.
10989
10990 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10991
10992 * Makefile.am:
10993 Distribute original version of simple parser (bison.s1), not built
10994 version (bison.simple).
10995
10996 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10997
10998 * doc/bison.texinfo: Add info dir entry.
10999
11000 * doc/bison.texinfo:
11001 Let automake put version number into documentation.
11002
11003 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11004
11005 * src/bison.cld, src/build.com, src/vmshlp.mar:
11006 Add non-RCS files from /gd/gnu/bison.
11007
11008 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11009
11010 * doc/bison.1:
11011 Document the BISON_HAIRY and BISON_SIMPLE variables.
11012
11013 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11014
11015 * src/version.c: Build version.c automatically.
11016
11017 * src/reader.c:
11018 Fix token numbering (used to start at 258, not 257).
11019
11020 * src/system.h: Include config.h.
11021
11022 * src/getargs.c: Update bug report address.
11023
11024 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
11025 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
11026
11027 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11028
11029 * Makefile.am:
11030 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11031
11032 * configure.in, version.cin:
11033 Build version.c automatically.
11034
11035 * AUTHORS: Add AUTHORS file.
11036
11037 * README: Update bug report address.
11038
11039 * bison.simple:
11040 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11041
11042 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
11043 Add automake stuff.
11044
11045 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11046
11047 * doc/bison.texinfo: Clean up some formatting.
11048
11049 1998-05-05 Richard Stallman <rms@gnu.org>
11050
11051 * doc/bison.texinfo:
11052 Explain better why to make a pure parser.
11053
11054 1998-01-05 Richard Stallman <rms@gnu.org>
11055
11056 * src/files.c (openfiles):
11057 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
11058 find a temporary directory, if possible. Do not unlink files while
11059 they are open.
11060
11061 1997-08-25 Richard Stallman <rms@gnu.org>
11062
11063 * src/reader.c (stack_offset;):
11064 Change some warni to warns.
11065
11066 * src/lex.c (literalchar): Use warns, not warni.
11067
11068 1997-06-28 Richard Stallman <rms@gnu.org>
11069
11070 * src/bison.s1: Add a Bison version comment.
11071
11072 * src/main.c (fatal, warn, berror):
11073 Use program_name.
11074
11075 1997-06-28 Richard Stallman <rms@gnu.org>
11076
11077 * Makefile.in (bison_version): New variable.
11078 (dist): Use that variable.
11079 (bison.s1): Substitute the Bison version into bison.simple.
11080
11081 * bison.simple: Add a Bison version comment.
11082
11083 1997-06-18 Richard Stallman <rms@gnu.org>
11084
11085 * src/main.c (fatal, warn, berror):
11086 Make error messages standard.
11087 (toomany): Improve error message text.
11088
11089 * 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:
11090 new.h renamed to alloc.h.
11091
11092 1997-06-18 Richard Stallman <rms@gnu.org>
11093
11094 * Makefile.in: new.h renamed to alloc.h.
11095
11096 1997-05-24 Richard Stallman <rms@gnu.org>
11097
11098 * src/lex.c (literalchar):
11099 Fix the code for escaping \, " and '.
11100
11101 (lex): Avoid trouble when there are many chars
11102 to discard in a char literal with just several chars in it.
11103
11104 1997-05-17 Richard Stallman <rms@gnu.org>
11105
11106 * src/bison.s1:
11107 Use malloc, if using alloca is troublesome.
11108 (YYSTACK_USE_ALLOCA): New flag macro.
11109 Define it for some systems and compilers.
11110 (YYSTACK_ALLOC): New macro.
11111 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11112 If it was malloc'd, free it.
11113
11114 1997-05-17 Richard Stallman <rms@gnu.org>
11115
11116 * bison.simple:
11117 Use malloc, if using alloca is troublesome.
11118 (YYSTACK_USE_ALLOCA): New flag macro.
11119 Define it for some systems and compilers.
11120 (YYSTACK_ALLOC): New macro.
11121 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11122 If it was malloc'd, free it.
11123
11124 1997-04-23 Richard Stallman <rms@gnu.org>
11125
11126 * src/bison.s1:
11127 (alloca) [__hpux]: Always define as __builtin_alloca.
11128
11129 1997-04-23 Richard Stallman <rms@gnu.org>
11130
11131 * bison.simple:
11132 (alloca) [__hpux]: Always define as __builtin_alloca.
11133
11134 1997-04-22 Richard Stallman <rms@gnu.org>
11135
11136 * src/bison.s1:
11137 [__hpux]: Include alloca.h (right for HPUX 10)
11138 instead of declaring alloca (right for HPUX 9).
11139
11140 * src/bison.s1 (__yy_memcpy):
11141 Declare arg `count' as unsigned int.
11142 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11143
11144 1997-04-22 Richard Stallman <rms@gnu.org>
11145
11146 * bison.simple:
11147 [__hpux]: Include alloca.h (right for HPUX 10)
11148 instead of declaring alloca (right for HPUX 9).
11149
11150 * bison.simple (__yy_memcpy):
11151 Declare arg `count' as unsigned int.
11152 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11153
11154 1997-01-03 Richard Stallman <rms@gnu.org>
11155
11156 * src/allocate.c: [__STDC__ or _MSC_VER]:
11157 Declare calloc and realloc to return void *.
11158
11159 1997-01-02 Richard Stallman <rms@gnu.org>
11160
11161 * src/system.h:
11162 [_MSC_VER]: Include stdlib.h and process.h.
11163 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
11164
11165 * src/main.c (main): Return FAILURE as a value.
11166 (printable_version): Declare arg as int, not char.
11167
11168 1997-01-02 Richard Stallman <rms@gnu.org>
11169
11170 * Makefile.in (dist):
11171 Explicitly check for symlinks, and copy them.
11172
11173 1996-12-19 Richard Stallman <rms@gnu.org>
11174
11175 * src/files.c:
11176 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
11177
11178 1996-12-18 Paul Eggert <eggert@gnu.org>
11179
11180 * src/bison.s1 (yyparse):
11181 If __GNUC__ and YYPARSE_PARAM are both defined,
11182 declare yyparse to have a void * argument.
11183
11184 1996-12-18 Paul Eggert <eggert@gnu.org>
11185
11186 * bison.simple (yyparse):
11187 If __GNUC__ and YYPARSE_PARAM are both defined,
11188 declare yyparse to have a void * argument.
11189
11190 1996-12-17 Richard Stallman <rms@gnu.org>
11191
11192 * src/reduce.c (nbits): Add some casts.
11193
11194 1996-08-12 Richard Stallman <rms@gnu.org>
11195
11196 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
11197
11198 1996-08-12 Richard Stallman <rms@gnu.org>
11199
11200 * bison.simple: Test _MSDOS as well as _MSDOS_.
11201
11202 1996-07-31 Richard Stallman <rms@gnu.org>
11203
11204 * src/bison.s1:
11205 [__sun && __i386]: Include alloca.h.
11206
11207 1996-07-31 Richard Stallman <rms@gnu.org>
11208
11209 * bison.simple:
11210 [__sun && __i386]: Include alloca.h.
11211
11212 1996-07-30 Richard Stallman <rms@gnu.org>
11213
11214 * src/bison.s1: Comment change.
11215
11216 * src/bison.s1: Test _MSDOS_, not MSDOS.
11217
11218 1996-07-30 Richard Stallman <rms@gnu.org>
11219
11220 * bison.simple: Comment change.
11221
11222 * bison.simple: Test _MSDOS_, not MSDOS.
11223
11224 1996-06-01 Richard Stallman <rms@gnu.org>
11225
11226 * 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:
11227 Insert `_' macro around many string constants.
11228
11229 * src/main.c:
11230 Insert `_' macro around many string constants.
11231
11232 (main): Call setlocale, bindtextdomain and textdomain.
11233
11234 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11235 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11236 [ENABLE_NLS]: Include libintl.h.
11237 [ENABLE_NLS] (gettext): Define.
11238 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11239 (N_, PACKAGE, LOCALEDIR): New macros.
11240
11241 1996-06-01 Richard Stallman <rms@gnu.org>
11242
11243 * POTFILES.in: New file.
11244
11245 * Makefile.in (allocate.o):
11246 Define target explicitly.
11247
11248 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11249 (LDFLAGS): Set to @LDFLAGS@.
11250 (configure): Run autoconf only if preceding `cd' succeeds.
11251 (bison.s1): Redirect output to temporary file then move the
11252 temporary to the target, rather than redirecting directly to bison.s1.
11253 (clean): Remove config.status and config.log.
11254 (distclean): Don't remove config.status here.
11255
11256 1996-05-12 Richard Stallman <rms@gnu.org>
11257
11258 * src/bison.s1:
11259 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11260
11261 1996-05-12 Richard Stallman <rms@gnu.org>
11262
11263 * bison.simple:
11264 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11265
11266 1996-05-11 Richard Stallman <rms@gnu.org>
11267
11268 * src/bison.s1 (__yy_memcpy):
11269 Really reorder the args, as was supposedly done on Feb 14 1995.
11270 (yyparse): Calls changed accordingly.
11271
11272 1996-05-11 Richard Stallman <rms@gnu.org>
11273
11274 * Makefile.in (dist): Don't use $(srcdir).
11275
11276 * bison.simple (__yy_memcpy):
11277 Really reorder the args, as was supposedly done on Feb 14 1995.
11278 (yyparse): Calls changed accordingly.
11279
11280 1996-01-27 Richard Stallman <rms@gnu.org>
11281
11282 * src/output.c (output_rule_data):
11283 Test YYERROR_VERBOSE in the conditional
11284 around the definition of ttyname.
11285
11286 1995-12-29 Richard Stallman <rms@gnu.org>
11287
11288 * src/bison.s1:
11289 Fix line numbers in #line commands.
11290
11291 1995-12-29 Richard Stallman <rms@gnu.org>
11292
11293 * bison.simple:
11294 Fix line numbers in #line commands.
11295
11296 1995-12-27 Richard Stallman <rms@gnu.org>
11297
11298 * src/bison.s1 (YYPARSE_PARAM_DECL):
11299 In C++, make it always null.
11300 (YYPARSE_PARAM_ARG): New macro.
11301 (yyparse): Use YYPARSE_PARAM_ARG.
11302
11303 1995-12-27 Richard Stallman <rms@gnu.org>
11304
11305 * bison.simple (YYPARSE_PARAM_DECL):
11306 In C++, make it always null.
11307 (YYPARSE_PARAM_ARG): New macro.
11308 (yyparse): Use YYPARSE_PARAM_ARG.
11309
11310 1995-11-29 Richard Stallman <rms@gnu.org>
11311
11312 * doc/bison.texinfo:
11313 Describe literal string tokens, %raw, %no_lines, %token_table.
11314
11315 1995-11-29 Daniel Hagerty <hag@gnu.org>
11316
11317 * doc/bison.texinfo: Fixed update date
11318
11319 1995-10-16 Richard Stallman <rms@gnu.org>
11320
11321 * src/version.c: Version 1.25.
11322
11323 1995-10-16 Richard Stallman <rms@gnu.org>
11324
11325 * NEWS: *** empty log message ***
11326
11327 1995-10-16 Richard Stallman <rms@gnu.org>
11328
11329 * doc/bison.1, doc/bison.rnh:
11330 Add new options.
11331
11332 1995-10-15 Richard Stallman <rms@gnu.org>
11333
11334 * src/vmsgetargs.c, src/getargs.c:
11335 Added -n, -k, and -raw switches.
11336 (noparserflag, toknumflag, rawtoknumflag): New variables.
11337
11338 * src/symtab.h (SALIAS):
11339 New #define for adding aliases to %token.
11340 (struct bucket): Added `alias' field.
11341
11342 * src/reduce.c (reduce_grammar):
11343 Revise error message.
11344 (print_notices): Remove final `.' from error message.
11345
11346 * src/reader.c (reader_output_yylsp):
11347 New function.
11348 (readgram): Use `#if 0' around code that accepted %command
11349 inside grammar rules: The documentation doesn't allow it,
11350 and it will fail since the %command processors scan for the next %.
11351 (parse_token_decl): Extended the %token
11352 declaration to allow a multi-character symbol as an alias.
11353 (parse_thong_decl): New function.
11354 (read_declarations): Added %thong declarations.
11355 (read_declarations): Handle NOOP to deal with allowing
11356 % declarations as another means to specify the flags.
11357 (readgram): Allow %prec prior to semantics embedded in a rule.
11358 (skip_to_char, read_declarations, copy_definition)
11359 (parse_token_decl, parse_start_decl, parse_type_decl)
11360 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
11361 (get_type_name, copy_guard, copy_action, readgram)
11362 (get_type, packsymbols): Revised most error messages.
11363 Changed `fatal' to `warnxxx' to avoid aborting for error.
11364 Revised and use multiple warnxxx functions to avoid using VARARGS1.
11365 (read_declarations): Improve the error message for
11366 an invalid character. Do not abort.
11367 (read_declarations, copy_guard, copy_action): Use
11368 printable_version to avoid unprintable characters in printed output.
11369 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
11370 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
11371 Allow the type of a non-terminal can be given
11372 more than once, as long as all specifications give the same type.
11373
11374 * src/output.c:
11375 (output_headers, output_trailers, output, output_gram)
11376 (output_rule_data): Implement noparserflag variable.
11377 Implement toknumflag variable.
11378 (output): Call reader_output_yylsp to output LTYPESTR.
11379
11380 * src/main.c (main):
11381 If reader sees an error, don't process the grammar.
11382 (fatals): Updated to not use VARARGS1.
11383 (printable_version, int_to_string, warn, warni, warns, warnss)
11384 (warnsss): New error reporting functions. Avoid abort for error.
11385
11386 * src/lex.h:
11387 Added THONG and NOOP for alias processing.
11388 Added SETOPT for the new code that allows setting options with %flags.
11389
11390 * src/lex.c:
11391 Include getopt.h. Add some extern decls.
11392 (safegetc): New function to deal with EOF gracefully.
11393 (literalchar); new function to deal with reading \ escapes.
11394 (lex): Use literalchar.
11395 (lex): Implemented "..." tokens.
11396 (literalchar, lex, parse_percent_token): Made tokenbuffer
11397 always contain the token. This includes growing the token
11398 buffer while reading an integer.
11399 (parse_percent_token): Replaced if-else statement with percent_table.
11400 (parse_percent_token): Added % declarations as another
11401 way to specify the flags -n, -l, and -r. Also added hooks for
11402 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
11403 major changes to files.c.
11404 (lex) Retain in the incoming stream a character following
11405 an incorrect '/'.
11406 (skip_white_space, lex): Revised most error messages
11407 and changed fatal to warn to avoid aborting.
11408 (percent_table): Added %thong declarations.
11409
11410 * src/gram.h: Comment changes.
11411
11412 * src/files.c (openfiles, open_extra_files, done):
11413 Add faction flag
11414 and actfile file. Handle noparserflag. Both for -n switch.
11415
11416 * src/conflicts.c (resolve_sr_conflict):
11417 Remove use of alloca.
11418
11419 1995-06-01 Jim Meyering <meyering@gnu.org>
11420
11421 * doc/bison.texinfo: *** empty log message ***
11422
11423 1995-05-06 Richard Stallman <rms@gnu.org>
11424
11425 * src/bison.s1: Comment change.
11426
11427 1995-05-06 Richard Stallman <rms@gnu.org>
11428
11429 * bison.simple: Comment change.
11430
11431 1995-05-03 Richard Stallman <rms@gnu.org>
11432
11433 * src/version.c: Version now 1.24.
11434
11435 * src/bison.s1: Change distribution terms.
11436
11437 * src/version.c: Version now 1.23.
11438
11439 1995-05-03 Richard Stallman <rms@gnu.org>
11440
11441 * doc/bison.texinfo:
11442 Rewrite "Conditions for Using Bison".
11443 Update version to 1.24.
11444
11445 1995-05-03 Richard Stallman <rms@gnu.org>
11446
11447 * bison.simple: Change distribution terms.
11448
11449 1995-02-23 Richard Stallman <rms@gnu.org>
11450
11451 * src/files.c: Test __VMS_POSIX as well as VMS.
11452
11453 1995-02-14 Jim Meyering <meyering@gnu.org>
11454
11455 * src/bison.s1 (__yy_memcpy):
11456 Renamed from __yy_bcopy to avoid
11457 confusion. Reverse FROM and TO arguments to be consistent with
11458 those of memcpy.
11459
11460 1995-02-14 Jim Meyering <meyering@gnu.org>
11461
11462 * bison.simple (__yy_memcpy):
11463 Renamed from __yy_bcopy to avoid
11464 confusion. Reverse FROM and TO arguments to be consistent with
11465 those of memcpy.
11466
11467 1994-11-10 David J. MacKenzie <djm@gnu.org>
11468
11469 * NEWS: reformat
11470
11471 * NEWS: New file.
11472
11473 * Makefile.in (DISTFILES): Include NEWS.
11474
11475 * Makefile.in (DISTFILES):
11476 Include install-sh, not install.sh.
11477
11478 * configure.in: Update to Autoconf v2 macro names.
11479
11480 1994-10-05 David J. MacKenzie <djm@gnu.org>
11481
11482 * Makefile.in: fix typo
11483
11484 * Makefile.in (prefix, exec_prefix):
11485 Let configure set them.
11486
11487 1994-09-28 David J. MacKenzie <djm@gnu.org>
11488
11489 * Makefile.in: Set datadir to $(prefix)/share.
11490
11491 1994-09-15 Richard Stallman <rms@gnu.org>
11492
11493 * src/bison.s1:
11494 Update copyright notice and GPL version.
11495
11496 1994-09-15 Richard Stallman <rms@gnu.org>
11497
11498 * bison.simple:
11499 Update copyright notice and GPL version.
11500
11501 1994-07-12 Richard Stallman <rms@gnu.org>
11502
11503 * src/reduce.c, src/reader.c:
11504 entered into RCS
11505
11506 1994-05-05 David J. MacKenzie <djm@gnu.org>
11507
11508 * Makefile.in: entered into RCS
11509
11510 1994-03-26 Richard Stallman <rms@gnu.org>
11511
11512 * src/bison.s1: entered into RCS
11513
11514 1994-03-26 Richard Stallman <rms@gnu.org>
11515
11516 * bison.simple: entered into RCS
11517
11518 1994-03-25 Richard Stallman <rms@gnu.org>
11519
11520 * src/main.c: entered into RCS
11521
11522 1994-03-24 Richard Stallman <rms@gnu.org>
11523
11524 * src/conflicts.c: entered into RCS
11525
11526 1994-01-02 Richard Stallman <rms@gnu.org>
11527
11528 * Makefile.in: *** empty log message ***
11529
11530 1993-11-21 Richard Stallman <rms@gnu.org>
11531
11532 * src/bison.s1: *** empty log message ***
11533
11534 1993-11-21 Richard Stallman <rms@gnu.org>
11535
11536 * doc/bison.texinfo: entered into RCS
11537
11538 * doc/bison.texinfo: *** empty log message ***
11539
11540 1993-11-21 Richard Stallman <rms@gnu.org>
11541
11542 * bison.simple: *** empty log message ***
11543
11544 1993-10-25 David J. MacKenzie <djm@gnu.org>
11545
11546 * doc/bison.texinfo: *** empty log message ***
11547
11548 1993-10-19 Richard Stallman <rms@gnu.org>
11549
11550 * src/bison.s1: *** empty log message ***
11551
11552 1993-10-19 Richard Stallman <rms@gnu.org>
11553
11554 * bison.simple: *** empty log message ***
11555
11556 1993-10-14 Richard Stallman <rms@gnu.org>
11557
11558 * src/bison.s1: *** empty log message ***
11559
11560 1993-10-14 Richard Stallman <rms@gnu.org>
11561
11562 * bison.simple: *** empty log message ***
11563
11564 1993-09-14 David J. MacKenzie <djm@gnu.org>
11565
11566 * doc/bison.texinfo: *** empty log message ***
11567
11568 1993-09-13 Noah Friedman <friedman@gnu.org>
11569
11570 * Makefile.in: *** empty log message ***
11571
11572 1993-09-10 Richard Stallman <rms@gnu.org>
11573
11574 * src/conflicts.c: *** empty log message ***
11575
11576 * src/system.h: entered into RCS
11577
11578 1993-09-10 Richard Stallman <rms@gnu.org>
11579
11580 * doc/bison.1: entered into RCS
11581
11582 1993-09-06 Noah Friedman <friedman@gnu.org>
11583
11584 * src/version.c: entered into RCS
11585
11586 1993-09-06 Noah Friedman <friedman@gnu.org>
11587
11588 * Makefile.in: *** empty log message ***
11589
11590 1993-07-30 David J. MacKenzie <djm@gnu.org>
11591
11592 * Makefile.in: *** empty log message ***
11593
11594 1993-07-24 Richard Stallman <rms@gnu.org>
11595
11596 * src/bison.s1: *** empty log message ***
11597
11598 1993-07-24 Richard Stallman <rms@gnu.org>
11599
11600 * bison.simple: *** empty log message ***
11601
11602 1993-07-08 David J. MacKenzie <djm@gnu.org>
11603
11604 * Makefile.in: *** empty log message ***
11605
11606 1993-07-04 Richard Stallman <rms@gnu.org>
11607
11608 * src/bison.s1: *** empty log message ***
11609
11610 1993-07-04 Richard Stallman <rms@gnu.org>
11611
11612 * bison.simple: *** empty log message ***
11613
11614 1993-06-26 David J. MacKenzie <djm@gnu.org>
11615
11616 * src/getargs.c: entered into RCS
11617
11618 1993-06-26 David J. MacKenzie <djm@gnu.org>
11619
11620 * doc/bison.texinfo: *** empty log message ***
11621
11622 * doc/bison.1: New file.
11623
11624 1993-06-25 Richard Stallman <rms@gnu.org>
11625
11626 * src/getargs.c: New file.
11627
11628 1993-06-16 Richard Stallman <rms@gnu.org>
11629
11630 * src/bison.s1: *** empty log message ***
11631
11632 1993-06-16 Richard Stallman <rms@gnu.org>
11633
11634 * bison.simple: *** empty log message ***
11635
11636 1993-06-03 Richard Stallman <rms@gnu.org>
11637
11638 * src/bison.s1: New file.
11639
11640 1993-06-03 Richard Stallman <rms@gnu.org>
11641
11642 * doc/bison.texinfo: *** empty log message ***
11643
11644 1993-06-03 Richard Stallman <rms@gnu.org>
11645
11646 * bison.simple: New file.
11647
11648 1993-05-19 Richard Stallman <rms@gnu.org>
11649
11650 * doc/bison.texinfo: New file.
11651
11652 1993-05-07 Noah Friedman <friedman@gnu.org>
11653
11654 * Makefile.in: *** empty log message ***
11655
11656 1993-04-28 Noah Friedman <friedman@gnu.org>
11657
11658 * src/reader.c: *** empty log message ***
11659
11660 1993-04-23 Noah Friedman <friedman@gnu.org>
11661
11662 * src/alloc.h: entered into RCS
11663
11664 1993-04-20 David J. MacKenzie <djm@gnu.org>
11665
11666 * src/version.c: *** empty log message ***
11667
11668 * src/files.c, src/allocate.c:
11669 entered into RCS
11670
11671 * src/reader.c: *** empty log message ***
11672
11673 * src/lex.c: entered into RCS
11674
11675 * src/conflicts.c: New file.
11676
11677 * src/symtab.c: entered into RCS
11678
11679 * src/alloc.h: New file.
11680
11681 * src/LR0.c: entered into RCS
11682
11683 1993-04-18 Noah Friedman <friedman@gnu.org>
11684
11685 * src/reader.c: New file.
11686
11687 * src/version.c: *** empty log message ***
11688
11689 1993-04-18 Noah Friedman <friedman@gnu.org>
11690
11691 * Makefile.in: *** empty log message ***
11692
11693 1993-04-17 Noah Friedman <friedman@gnu.org>
11694
11695 * Makefile.in: *** empty log message ***
11696
11697 1993-04-15 Richard Stallman <rms@gnu.org>
11698
11699 * src/main.c, src/files.c:
11700 New file.
11701
11702 1993-04-15 Noah Friedman <friedman@gnu.org>
11703
11704 * configure.in: entered into RCS
11705
11706 * configure.in: *** empty log message ***
11707
11708 * configure.in: New file.
11709
11710 1993-04-14 Richard Stallman <rms@gnu.org>
11711
11712 * Makefile.in: New file.
11713
11714 1993-04-13 Richard Stallman <rms@gnu.org>
11715
11716 * src/version.c: New file.
11717
11718 1993-03-25 Richard Stallman <rms@gnu.org>
11719
11720 * src/output.c: entered into RCS
11721
11722 1992-09-25 Richard Stallman <rms@gnu.org>
11723
11724 * configure.bat: entered into RCS
11725
11726 1992-06-22 Richard Stallman <rms@gnu.org>
11727
11728 * src/vmsgetargs.c: entered into RCS
11729
11730 1992-06-22 Richard Stallman <rms@gnu.org>
11731
11732 * doc/bison.rnh: entered into RCS
11733
11734 1992-04-20 David J. MacKenzie <djm@gnu.org>
11735
11736 * README: entered into RCS
11737
11738 1992-01-22 Richard Stallman <rms@gnu.org>
11739
11740 * src/machine.h: entered into RCS
11741
11742 1991-12-21 Richard Stallman <rms@gnu.org>
11743
11744 * src/lalr.c, src/closure.c:
11745 entered into RCS
11746
11747 1991-12-20 Richard Stallman <rms@gnu.org>
11748
11749 * src/state.h: entered into RCS
11750
11751 1991-12-18 Richard Stallman <rms@gnu.org>
11752
11753 * src/print.c, src/nullable.c, src/derives.c:
11754 entered into RCS
11755
11756 1991-11-03 David J. MacKenzie <djm@gnu.org>
11757
11758 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11759 entered into RCS
11760
11761 1988-09-09 Richard Stallman <rms@gnu.org>
11762
11763 * src/bison.hairy: entered into RCS
11764
11765 1987-12-16 Richard Stallman <rms@gnu.org>
11766
11767 * REFERENCES: entered into RCS
11768
11769 -----
11770
11771 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
11772 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
11773
11774 This file is part of Bison, the GNU Compiler Compiler.
11775
11776 Bison is free software; you can redistribute it and/or modify
11777 it under the terms of the GNU General Public License as published by
11778 the Free Software Foundation; either version 2, or (at your option)
11779 any later version.
11780
11781 Bison is distributed in the hope that it will be useful,
11782 but WITHOUT ANY WARRANTY; without even the implied warranty of
11783 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11784 GNU General Public License for more details.
11785
11786 You should have received a copy of the GNU General Public License
11787 along with Bison; see the file COPYING. If not, write to
11788 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11789 Boston, MA 02111-1307, USA.