]> git.saurik.com Git - bison.git/blob - ChangeLog
a7301cc127ab79e2d36f2237bd5e3d522bc7dcf5
[bison.git] / ChangeLog
1 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2
3 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
4 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5 Add %expect-rr rule.
6
7 * src/scan-gram.l: Recognize %expect-rr.
8
9 * src/conflicts.h (expected_sr_conflicts): Rename from
10 expected_conflicts.
11 (expected_rr_conflicts): Declare.
12
13 * src/conflicts.c (expected_sr_conflicts): Rename from
14 expected_conflicts.
15 (expected_rr_conflicts): Define.
16 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
17 for GLR parsers.
18 Use expected_sr_conflicts in place of expected_conflicts.
19 Warn if expected_rr_conflicts used in non-GLR parser.
20
21 * doc/bison.texinfo: Add documentation for %expect-rr.
22
23 2004-03-08 Paul Eggert <eggert@gnu.org>
24
25 Add support for hex token numbers. Suggested by Odd Arild Olsen in
26 <http://mail.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
27
28 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
29 in lalr1.cc.
30 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
31 * src/scan-gram.l (scan_integer): New function.
32 ({int}): Use it.
33 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
34 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
35 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
36 Say "long int", not "long", for uniformity with GNU style.
37
38 2004-02-25 Paul Eggert <eggert@twinsun.com>
39
40 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
41 compilers. This fixes a problem with Intel's C++ compiler being
42 chatty, reported by Guido Trentalancia in
43 <http://mail.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
44
45 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
46
47 Support %destructor and merge error locations in lalr1.cc.
48
49 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
50 (Parser::stos_): Define unconditionally.
51 (Parser::destruct_): New method. Generate its body with
52 b4_yydestruct_generate.
53 (Parser::error_start_): New attribute.
54 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
55 token which are discarded.
56 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
57 error_start_ when erroneous token are discarded.
58 (Parser::parse) <yyerrlab1>: Compute the location of the error
59 token so that it covers all the discarded tokens.
60 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
61 it can be called with `%skeleton "lalr1.cc"', and do that.
62
63 2004-02-02 Paul Eggert <eggert@twinsun.com>
64
65 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
66 $(top_srcdir)/lib and ../lib. This fixes a bug reported
67 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
68 There's no need to mention top_builddir since Automake does that
69 for us.
70 (INCLUDES): Remove, as Automake says it's obsolescent.
71 Contents migrated into AM_CPPFLAGS as described above.
72 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
73
74 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
75
76 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
77 (yyreportSyntaxError): Handle case where lookahead token is
78 YYEMPTY.
79
80 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
81
82 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
83 resulting parsers are compilable with C++.
84
85 2003-12-23 Paul Eggert <eggert@twinsun.com>
86
87 * config/depcomp, config/install-sh: Sync with Automake 1.8.
88 * src/output.c (output_skeleton): Rename local var.
89 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
90 Bison tokens, as this runs afoul of the 2003-10-07 change that
91 disallowed NUL bytes in character constants or string literals.
92
93 * tests/local.at: Require Autoconf 2.59's Autotest.
94 * tests/testsuite.at: Don't include local.at, since we now assume
95 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
96 including it.
97 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
98 multiple inclusion warnings.
99
100 2003-12-02 Akim Demaille <akim@epita.fr>
101
102 * doc/bison.texinfo (How Can I Reset the Parser): More about start
103 conditions.
104 From Bruno Haible.
105
106 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
107
108 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
109
110 2003-10-07 Paul Eggert <eggert@twinsun.com>
111
112 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
113 if testsuite doesn't exist.
114
115 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
116 literals, unfortunately.
117 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
118 Complain about NUL bytes in character constants or string literals.
119
120 2003-10-05 Paul Eggert <eggert@twinsun.com>
121
122 * NEWS: Don't document %no-default-prec, as it's still
123 too experimental.
124 * doc/bison.texinfo: Document %no-default-prec only if
125 the defaultprec flag is set. Normally it's not.
126
127 2003-10-04 Paul Eggert <eggert@twinsun.com>
128
129 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
130 non-modifiable lvalue, instead of a modifiable one.
131 * doc/bison.texinfo (Actions): Document that $$ can
132 be assigned to. Do not claim that $$ and $N are
133 array element references: user code should not rely on this.
134
135 2003-10-01 Paul Eggert <eggert@twinsun.com>
136
137 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
138 (grammar_declaration): Use it.
139 * src/scan-gram.l: New token %no-default-prec.
140 * tests/conflicts.at: Revamp tests to use %no-default-prec.
141 * NEWS, doc/bison.texinfo: Document the above.
142
143 2003-10-01 Akim Demaille <akim@epita.fr>
144
145 VCG no longer supports long_straight_phase.
146
147 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
148 * src/print_graph.c (print_graph): Adjust.
149
150 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
151 and Paul Eggert <eggert@twinsun.com>
152
153 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
154 Table of Symbols): Document %default-prec.
155 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
156 (grammar_declaration): Set default_prec on %default-prec.
157 * src/scan-gram.l (%default-prec): New token.
158 * src/reader.h (default_prec): New flag.
159 * src/reader.c: Likewise.
160 (packgram): Handle it.
161 * tests/conflicts.at (%default-prec without %prec,
162 %default-prec with %prec, %default-prec 1): New tests.
163
164 2003-09-30 Paul Eggert <eggert@twinsun.com>
165
166 * tests/testsuite.at: Include local.at, not input.at, fixing
167 a typo in the 2003-08-25 patch.
168
169 2003-08-27 Akim Demaille <akim@epita.fr>
170
171 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
172 GCC warnings.
173
174 2003-08-26 Akim Demaille <akim@epita.fr>
175
176 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
177 "<\#" to avoid magic from Gnus when posting parts of this script.
178
179 2003-08-26 Akim Demaille <akim@epita.fr>
180
181 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
182 (Parser::parse): here.
183 Adjust: nerrs and errstatus is now replaced by...
184 (Parser::nerrs_, Parser::errstatus_): New.
185
186 2003-08-25 Akim Demaille <akim@epita.fr>
187
188 * config/announce-gen, Makefile.cfg: New.
189 * Makefile.am: Adjust.
190 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
191 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
192
193 2003-08-25 Akim Demaille <akim@epita.fr>
194
195 When reducing initial empty rules, Bison parser read an initial
196 location that is not defined. This results in garbage, and that
197 affects Bison's own parser. Therefore we need (i) to extend Bison
198 to support a means to initialize this location, and (ii) to use
199 this CVS Bison to fix CVS Bison's parser.
200
201 * src/reader.h, reader.c (epilogue_augment): Remove, replace
202 with...
203 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
204 * src/parse-gram.y: Adjust.
205 (%initial-action): New.
206 (%error-verbose): Since we require CVS Bison, there is no reason
207 not to use it.
208 * src/scan-gram.l: Adjust.
209 * src/Makefile.am (YACC): New, to make sure we use our own parser.
210 * data/yacc.c (yyparse): Use b4_initial_action.
211
212 2003-08-25 Akim Demaille <akim@epita.fr>
213
214 * doc/bison.texinfo: Don't promote stdout for error messages.
215
216 2003-08-25 Akim Demaille <akim@epita.fr>
217
218 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
219 From Alexandre Duret-Lutz.
220
221 2003-08-25 Akim Demaille <akim@epita.fr>
222
223 Version 1.875c.
224
225 2003-08-25 Akim Demaille <akim@epita.fr>
226
227 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
228 Use them.
229
230 2003-08-25 Akim Demaille <akim@epita.fr>
231
232 * data/lalr1.cc (Parser::reduce_print_): New.
233 Use it.
234
235 2003-08-25 Akim Demaille <akim@epita.fr>
236
237 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
238 error recovery loops. This patch is based on
239 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
240 Also, augment the similarity between lalr1.cc and yacc.c.
241 Note: the locations of error recovery rules are not correct yet.
242
243 * data/lalr1.cc: Comment changes to augment the similarity between
244 lalr1.cc and yacc.c.
245 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
246 (yyerrlab1): Remove, but where it used to be (now the bottom part of
247 yyerrlab), when hitting EOF, pop the whole stack here instead of
248 merely falling thru the default error handling mechanism.
249 (yyerrorlab): New label, with the old contents of YYERROR,
250 plus the following change: pop the stack of rhs corresponding
251 to the production that invoked YYERROR. That is how Yacc
252 behaves (required by POSIX).
253 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
254 fail.
255
256 2003-08-25 Akim Demaille <akim@epita.fr>
257
258 Tune local.at so that people can "autom4te -l autotest calc.at -o
259 calc" for instance, to extract a sub test suite.
260
261 * tests/testsuite.at: Move the initialization, Autotest version
262 requirement, and AT_TESTED invocation into...
263 * tests/local.at: here.
264 * tests/testsuite.at: Include it for compatibility with Autoconf
265 2.57.
266 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
267 be ignore.
268
269 2003-08-04 Paul Eggert <eggert@twinsun.com>
270
271 Rework code slightly to avoid gcc -Wtraditional warnings.
272 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
273 The returned value is now stored in *YY0. All callers changed.
274 * src/output.c (merge_output): Adjust to the above change.
275
276 2003-07-26 Paul Eggert <eggert@twinsun.com>
277
278 * data/glr.c (YYASSERT): New macro.
279 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
280 yyresolveStates, yyprocessOneStack):
281 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
282 Derived from a suggestion by Frank Heckenbach.
283
284 2003-07-25 Paul Eggert <eggert@twinsun.com>
285
286 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
287 for portability to K&R C (after ansi2knr, presumably). See
288 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
289 by Frank Heckenbach, though I have omitted the structure-initialization
290 part of his glr-knr.diff patch since I recall that the Portable
291 C Compiler didn't require that change.
292
293 Let the user specify how to allocate and free memory.
294 Derived from a suggestion by Frank Heckenbach in
295 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
296 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
297 All uses of free, malloc, realloc changed to use these macros,
298 and unnecessary casts removed.
299 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
300
301 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
302
303 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
304 use s.empty() rather than s == "" to test for empty string; see
305 <http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
306 (trivial change)
307
308 2003-06-25 Akim Demaille <akim@epita.fr>
309
310 * config/depcomp, config/install-sh: Update from masters.
311
312 2003-06-20 Paul Eggert <eggert@twinsun.com>
313
314 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
315 and return properly parenthesized result.
316 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
317 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
318 Remove unnecessary parentheses from uses.
319 * doc/bison.texinfo (Location Default Action): Describe the
320 conventions for parentheses.
321
322 2003-06-19 Paul Eggert <eggert@twinsun.com>
323
324 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
325 yyreportTree): Do not assume that size_t is the same width as int,
326 when printing sizes. Print sizes using an unsigned format.
327 Problem reported by Frank Heckenbach in
328 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
329
330 Port to Forte Developer 7 C compiler.
331 * data/glr.c (struct YYLTYPE): If locations are not being used,
332 declare a single dummy member, as empty structs do not conform
333 to the C standard.
334 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
335 the Forte Developer 7 C compiler complains that end-of-loop
336 code is not reached.
337
338 2003-06-17 Paul Eggert <eggert@twinsun.com>
339
340 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
341 avoid warnings from picky compilers about redefinition of PARAMS.
342
343 2003-06-17 Paul Eggert <eggert@twinsun.com>
344
345 Version 1.875b.
346
347 * NEWS: Document 1.875b.
348
349 * lib/bbitset.h: Do not include config.h; that's the includer's job.
350 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
351 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
352 Don't use 'index' in comments, as it's a builtin fn on some hosts.
353 * lib/bitset_stats.c: Include gettext.h unconditionally, as
354 per recent gettext manual's suggestion.
355 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
356 Use prototypes, not old-style definitions.
357 * lib/lbitset.c (lbitset_unused_clear): Likewise.
358 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
359 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
360 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
361 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
362 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
363 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
364 vbitset_or_and_cmp, vbitset_copy): Likewise.
365
366 * lib/libiberty.h: Do not include config.h; that's the includer's job.
367 Do not include <stdlib.h>.
368 (PARAMS): Define unconditionally for C89.
369 (ATTRIBUTE_NORETURN): Remove.
370 (ATTRIBUTE_UNUSED): Define unconditionally.
371
372 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
373 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
374 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
375 * lib/vbitset.c, lib/vbitset.h: New files.
376 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
377 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
378 from libbitset.
379
380 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
381 `How Can I Reset @code{yyparse}', since texinfo does not allow
382 arbitrary @ in node names.
383
384 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
385 shouldn't be needed according to the gettext 0.12.1 documentation
386 but which seem to be needed anyway: codeset.m4 glibc21.m4
387 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
388 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
389 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
390
391 * lib/.cvsignore: Add stdbool.h.
392 * m4/.cvsignore: Add nls.m4, po.m4.
393
394 Upgrade to CVS gnulib.
395 * stdbool_.h: File renamed from stdbool.h.in.
396 * configure.ac (AM_STDBOOL_H): Invoke this instead of
397 AC_HEADER_STDBOOL.
398 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
399 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
400 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
401 (MOSTLYCLEANFILES): New var.
402 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
403 (stdbool.h): New rule.
404 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
405 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
406 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
407 m4/quote.m4: Upgrade to today's gnulib.
408
409 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
410 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
411 the tests right now.
412 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
413 yyerror are declared before use; C99 requires this.
414
415 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
416
417 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
418 first.
419 (yyrecoverSyntaxError): Correct the logic for setting and testing
420 yyerrState.
421 Correct comment on handling EOF.
422 Allow states with only a default reduction, rather than failing
423 (I can't quite reconstruct why these were not allowed before).
424
425 Fixes to avoid problem that $-N rules in GLR parsers can cause
426 buffer overruns, corrupting state.
427
428 * src/output.c (prepare_rules): Output max_left_semantic_context
429 definition.
430 * src/reader.h (max_left_semantic_context): New variable declaration.
431 * src/scan-gram.l (max_left_semantic_context): Define.
432 (handle_action_dollar): Update max_left_semantic_context.
433 * data/glr.c (YYMAXLEFT): New definition.
434 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
435 (yyresolveAction): Ditto.
436
437 Fixes to problems with location handling in GLR parsers reported by
438 Frank Heckenbach (2003/06/05).
439
440 * data/glr.c (YYLTYPE): Make trivial if locations not used.
441 (YYRHSLOC): Add parentheses, and define only if locations used.
442 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
443 locations not used.
444 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
445 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
446
447 * tests/cxx-type.at: Exercise location information; update tests
448 to differentiate output with and without locations.
449 Remove forward declarations of yylex and yyerror---caused errors
450 because default YYLTYPE not yet defined.
451 Change semantic actions to compute strings, rather than printing
452 them directly (to test proper passing of semantics values). Change
453 output to prefix notation and update test data and expected results.
454 (yylex): Track locations.
455 (stmtMerge): Return value rather than printing, and include arguments
456 in value.
457
458 2003-06-03 Paul Eggert <eggert@twinsun.com>
459
460 Avoid warnings generated by GCC 2.95.4 when Bison is
461 configured with --enable-gcc-warnings.
462 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
463 yy::]b4_parser_class_name[::translate_,
464 yy::Stack::operator[] (unsigned),
465 yy::Stack::operator[] (unsigned) const,
466 yy::Slice::operator[] (unsigned),
467 yy::Slice::operator[] (unsigned) const):
468 Rename local vars to avoid warnings.
469 * tests/glr-regression.at (Improper handling of embedded actions
470 and $-N in GLR parsers): Remove unused local variable from yylex.
471 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
472 (void) as arg when not pure, since we now assume C89 when building
473 Bison. Pacify GCC by using parameter.
474
475 2003-06-02 Paul Eggert <eggert@twinsun.com>
476
477 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
478 yy::Location::lines, yy::Location::columns): Rename arguments
479 to avoid shadowing; this removes a warning generated by GCC 3.3.
480
481 2003-06-01 Paul Eggert <eggert@twinsun.com>
482
483 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
484 to g++, as GCC 3.3 complains if you do it.
485 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
486 everything that WARNING_CFLAGS has, except omit warnings
487 not suitable for C++.
488 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
489 * tests/atlocal.in (CXXFLAGS): New var.
490 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
491
492 Fix a GLR parser bug I reported in February; see
493 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
494 The problem was that GLR parsers did not conform to the C standard,
495 because actions like { $1 = $2 + $3; } expanded to expressions
496 that invoked YYFILL in separate subexpressions, and YYFILL assigned
497 to a local variable. The C standard says that expressions
498 like (var = f ()) + (var = f ()) have undefined behavior.
499 Another problem was that GCC sometimes issues warnings that
500 yyfill and its parameters are unused.
501
502 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
503 as possibly unused.
504 (yyfill): New function.
505 (YYFILL): Use it.
506 (yyuserAction): Change type of yynormal to bool, so that it matches
507 the new yyfill signature. Mark it as possibly unused.
508
509
510 Follow up on a bug I reported in February, where a Bison-generated
511 parser can loop. Provide a test case and a fix for yacc.c. I
512 don't have a fix for lalr1.cc or for glr.c, unfortunately.
513 The original bug report is in:
514 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
515
516 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
517 macro's size was becoming unwieldy.
518 (yyerrlab): Do not discard an empty lookahead symbol, as this
519 might destroy garbage.
520 (yyerrorlab): New label, with the old contents of YYERROR,
521 plus the following change: pop the stack of rhs corresponding
522 to the production that invoked YYERROR. That is how Yacc
523 behaves, and POSIX requires this behavior.
524 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
525 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
526 Define 'alarm' to do nothing if unistd.h is not available.
527 Add a new rule "exp: '-' error;" to test the above change to
528 data/yacc.c. Use 'alarm' to abort any test taking longer than
529 10 seconds, as it's probably looping.
530 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
531 Also, the new yacc.c generates two fewer diagnostics for an
532 existing test.
533
534 2003-05-24 Paul Eggert <eggert@twinsun.com>
535
536 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
537 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
538 This fixes a problem reported by John Bowman when the Compaq/HP
539 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
540 -ansi -Wall -gall).
541 * data/yacc.c (union yyalloc): Likewise.
542 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
543
544 Switch from 'int' to 'bool' where that makes sense.
545
546 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
547 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
548 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
549 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
550 Return or accept bool, not int. All callers changed.
551 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
552 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
553 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
554 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
555 bitset_or_and_cmp_): Likewise.
556 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
557 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
558 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
559 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
560 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
561 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
562 bitset_stats_or_and_cmp): Likewise.
563 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
564 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
565 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
566 ebitset_xor_cmp): Likewise.
567 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
568 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
569 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
570 lbitset_xor_cmp): Likewise.
571 * lib/bbitset.h: Include <stdbool.h>.
572 (struct bitset_vtable): The following members now return bool, not
573 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
574 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
575 or_and_cmp).
576 * src/conflicts.c (count_rr_conflicts): Likewise.
577 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
578 All uses changed.
579 * lib/ebitset.c (ebitset_obstack_init): Likewise.
580 * lib/lbitset.c (lbitset_obstack_init): Likewise.
581 * src/getargs.c (debug_flag, defines_flag, locations_flag,
582 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
583 graph_flag): Likewise.
584 * src/getargs.h (debug_flag, defines_flag, locations_flag,
585 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
586 graph_flag): Likewise.
587 * src/output.c (error_verbose): Likewise.
588 * src/output.h (error_verbose): Likewise.
589 * src/reader.c (start_flag, typed): Likewise.
590 * src/reader.h (typed): Likewise.
591 * src/getargs.c (LOCATIONS_OPTION): New constant.
592 (long_options, getargs): Use it.
593 * src/lalr.c (build_relations): Use bool, not int.
594 * src/nullable.c (nullable_compute): Likewise.
595 * src/print.c (print_reductions): Likewise.
596 * src/tables.c (action_row, pack_vector): Likewise.
597 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
598 * src/output.c (prepare): Use it.
599 * src/output.c (token_definitions_output,
600 symbol_destructors_output, symbol_destructors_output): Use string,
601 not boolean integer, to keep track of whether to output separator.
602 * src/print_graph.c (print_core): Likewise.
603 * src/state.c (state_rule_lookaheads_print): Likewise.
604
605 * config/install-sh: Sync from automake 1.7.5.
606
607 2003-05-14 Paul Eggert <eggert@twinsun.com>
608
609 * src/parse-gram.y (rules_or_grammar_declaration): Require a
610 semicolon after a grammar declaration, in the interest of possible
611 future changes to the Bison input language.
612 Do not allow a stray semicolon at the start of the grammar.
613 (rhses.1): Allow one or more semicolons after any rule, including
614 just before "|" as required by POSIX.
615 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
616 grammar.
617
618 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
619
620 %parse-param support for lalr1.cc.
621
622 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
623 b4_cc_constructor_calls, b4_cc_constructor_call,
624 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
625 definitions.
626 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
627 parse-param arguments.
628 (yy::b4_parser_class_name): Declare instance variables to
629 hold parse-param arguments.
630 * tests/calc.at: s/value/semantic_value/ because value clashes
631 with a member of yy::b4_parser_class_name. Adjust C++ code
632 to handle %parse-param. Enable %parse-param test in C++.
633
634 2003-05-12 Paul Eggert <eggert@twinsun.com>
635
636 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
637 English a bit. Fix fclose typo. Change "const char" to "char
638 const", and use ANSI C rather than K&R for "main". Suggest
639 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
640 and suggest yy_switch_to_buffer.
641
642 2003-05-05 Paul Eggert <eggert@twinsun.com>
643
644 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
645 C89. This avoids a diagnostic on compilers that define __STDC__
646 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
647 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
648
649 2003-05-03 Paul Eggert <eggert@twinsun.com>
650
651 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
652 Do not overrun array bounds.
653 This should fix a bug reported today by Olatunji Oluwabukunmi in
654 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
655
656 2003-04-29 Akim Demaille <akim@epita.fr>
657
658 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
659 * src/getargs.c, src/getargs.h: here, as bool, not int.
660 (nondeterministic_parser): New.
661 * src/parse-gram.y, src/scan-gram.l: Support
662 %nondeterministic-parser.
663 * src/output.c (prepare): Use nondeterministic_parser instead
664 of glr_parser where appropriate.
665 * src/tables.c (conflict_row, action_row, save_row)
666 (token_actions, token_actions, pack_vector): Ditto.
667
668 2003-04-29 Akim Demaille <akim@epita.fr>
669
670 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
671
672 2003-04-29 Akim Demaille <akim@epita.fr>
673
674 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
675 with %pure-parser and %locations to exercise the patch from Yakov
676 Markovitch below.
677
678 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
679
680 * data/yacc.c: (b4_lex_param): Corrected for the case where
681 %lex-param is provided and %pure-parser isn't.
682
683 2003-04-27 Paul Eggert <eggert@twinsun.com>
684
685 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
686 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
687 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
688 if it is not defined.
689 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
690
691 2003-04-26 Paul Eggert <eggert@twinsun.com>
692
693 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
694 Declare to be of type suitable for the ninf value itself, not of
695 type suitable for the corresponding table, since the latter might
696 be unsigned but the ninf value might be negative. This fixes a
697 bug reported by Alexandre Duret-Lutz in
698 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
699
700 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
701 invokes it. We shouldn't invoke it twice because it will attempt
702 to put error.o in the archive twice. This fixes a glitch reported
703 by Martin Mokrejs in
704 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
705
706 2003-04-21 Paul Eggert <eggert@twinsun.com>
707
708 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
709 to gnulib.
710
711 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
712
713 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
714 Fix obvious typo that results in uncompilable GLR parsers
715 when both %pure-parser and %locations are used. (trivial change)
716
717 2003-04-17 Paul Eggert <eggert@twinsun.com>
718
719 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
720 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
721 Do not insert the expected token via unput, as this runs afoul
722 of a POSIX-compatibility bug in flex 2.5.31.
723 All uses changed to BEGIN the parent state,
724 since we no longer insert the expected token via unput.
725 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
726 that is no longer emitted after the above change.
727
728 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
729 the first one. This change is from Paul Hilfinger, and it fixes
730 regression reported by Werner Lemberg in
731 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
732
733 (resolve_sr_conflict): Don't invoke state_errs_set
734 unless one or more tokens have been explicitly made errors.
735 Otherwise, the above change causes Bison to abort.
736
737 * tests/existing.at (GNU pic Grammar): New test case, taken from
738 Lemberg's email.
739
740 2003-03-31 Akim Demaille <akim@epita.fr>
741
742 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
743
744 2003-03-31 Akim Demaille <akim@epita.fr>
745
746 * src/output.c (prepare_symbols): Avoid trailing spaces in the
747 output.
748
749 2003-03-31 Akim Demaille <akim@epita.fr>
750
751 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
752 From Paul Hilfinger.
753
754 2003-03-29 Akim Demaille <akim@epita.fr>
755
756 * m4/error.m4: Do not put under dynamic conditions some code which
757 expansion is under static control.
758
759 2003-03-29 Akim Demaille <akim@epita.fr>
760
761 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
762
763 2003-03-29 Akim Demaille <akim@epita.fr>
764
765 * doc/bison.texinfo (Strings are Destroyed): New.
766
767 2003-03-13 Paul Eggert <eggert@twinsun.com>
768
769 * .cvsignore: Add configure.lineno.
770 * src/.cvsignore: Add yacc.
771 * tests/.cvsignore: Add testsuite.log.
772 * doc/fdl.texi: Sync with latest FSF version.
773
774 2003-03-12 Paul Eggert <eggert@twinsun.com>
775
776 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
777 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
778 cursor, instead of leaving it undefined. This fixes a bug
779 reported by Tim Van Holder in
780 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
781 * tests/input.at (Torturing the Scanner): Test the scanner on
782 an empty input file, which was Tim Van Holder's test case.
783
784 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
785 <sys/resource.h> can be included, include sys/time.h and
786 sys/times.h first, if available. This works around the SunOS
787 4.1.4 porting bug reported by Bruce Becker in
788 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
789
790 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
791 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
792 AC_HEADER_SYS_WAIT.
793
794 Merge changes from gnulib. This was prompted because the CVS
795 snapshot didn't build on Solaris 7 due to strnlen problems.
796
797 These changes need to be merged back into gnulib:
798 * lib/hash.c: Include <stdbool.h> unconditionally.
799 * m4/onceonly.m4 (m4_quote): New macro.
800 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
801 Quote AC_FOREACH variable-expansions properly.
802 The 2003-01-03 obstack.h change also needs merging.
803 {end of changes requiring merging}
804
805 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
806 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
807 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
808 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
809 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
810 New files, imported from gnulib.
811 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
812 above.
813
814 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
815 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
816 gnulib sources.
817
818 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
819 Add.
820 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
821 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
822 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
823 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
824 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
825 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
826 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
827 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
828 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
829 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
830 (jm_PREREQ_ARGMATCH): Remove.
831 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
832 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
833
834 * src/system.h: Include <stdbool.h> unconditionally.
835
836 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
837 assuming at least C89 in the bitset code for some time now.
838
839 2003-03-03 Akim Demaille <akim@epita.fr>
840
841 * ro.po: New.
842
843 2003-03-02 Akim Demaille <akim@epita.fr>
844
845 * doc/bison.texinfo (Table of Symbols): Reactivate the
846 documentation for %lex-param, and %parse-param.
847
848 2003-03-02 Akim Demaille <akim@epita.fr>
849
850 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
851 generate verbose error messages.
852 Use the number of tokens as an upper bound in yytname, as it
853 cannot be a non terminal.
854
855 2003-03-02 Akim Demaille <akim@epita.fr>
856
857 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
858 message.
859
860 2003-03-02 Akim Demaille <akim@epita.fr>
861
862 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
863 Use them to exercise yycheck overrun.
864 Based on Andrew Suffield's grammar.
865
866 2003-03-02 Akim Demaille <akim@epita.fr>
867
868 Create tests/local.at for Bison generic testing macros.
869
870 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
871 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
872 This new file.
873 * tests/calc.at (AT_CHECK_CALC): Adjust.
874 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
875 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
876 * tests/local.at: here.
877 (AT_COMPILE_CXX): Tags the tests using it as c++.
878 Ignore the test if CXX is not functional.
879
880 2003-03-01 Paul Eggert <eggert@twinsun.com>
881
882 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
883 not loc->end, since loc->end might contain garbage and this leads
884 to undefined behavior on some platforms.
885 (id_loc, token_start): Use (IF_LINTed) initial values that do not
886 depend on *loc, so that the reader doesn't give the the false
887 impression that *loc is initialized.
888 (<INITIAL>"%%"): Do not bother setting code_start, since its value
889 does not survive the return.
890
891 2003-03-01 Akim Demaille <akim@epita.fr>
892
893 * src/scan-gram.l (code_start): Always initialize it when entering
894 into yylex, as SC_EPILOGUE is activated *before* the corresponding
895 yylex invocation. An alternative would be making it static, but
896 then it starts with the second %%'s beginning, instead of its end.
897
898 2003-02-28 Paul Eggert <eggert@twinsun.com>
899
900 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
901 around a UnixWare 7.1.1 porting bug reported by John Hughes in
902 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
903
904 2003-02-26 Paul Eggert <eggert@twinsun.com>
905
906 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
907 Remove Sequent/Pyramid discussion (nobody uses them any more).
908 Merge VMS and MS-DOS discussion; these ports may well be dead
909 but let's keep mentioning them for now. Put <> around email
910 addresses. Add copyright notice.
911
912 2003-02-24 Paul Eggert <eggert@twinsun.com>
913
914 * data/glr.c (yy_reduce_print): yylineno -> yylno,
915 to avoid collision with flex use of yylineno.
916 Problem reported by Bruce Lilly in
917 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
918 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
919 * data/yacc.c (yy_reduce_print): Likewise.
920
921 * config/depcomp: Sync with Automake 1.7.3.
922
923 2003-02-21 Akim Demaille <akim@epita.fr>
924
925 * data/lalr1.cc: Use temporary variables instead of casts to
926 change integer types.
927 Suggested by Paul Eggert.
928
929 2003-02-21 Akim Demaille <akim@epita.fr>
930
931 * doc/bison.texinfo: Use "location" consistently to refer to @n,
932 to avoid confusions with lalr1.cc's notion of Position.
933 Suggested by Paul Eggert.
934
935 2003-02-20 Akim Demaille <akim@epita.fr>
936
937 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
938 before initial_columns.
939 (location.hh): Use consistent variable names when defining the
940 operator<<.
941 Use "last" so that we subtract from Positions, not from unsigned.
942
943 2003-02-20 Akim Demaille <akim@epita.fr>
944
945 * data/lalr1.cc (position.hh): New subfile, including the extended
946 and Doxygen'ed documentation of class Position.
947 (location.hh): Use it.
948 Document a` la Doxygen.
949 With the help of Benoit Perrot.
950
951 2003-02-20 Akim Demaille <akim@epita.fr>
952
953 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
954 AT_YACC_IF.
955 Redefine AT_YYERROR_SEES_LOC_IF using it.
956 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
957 not defined.
958 Don't use the location in yy::Parser::error_ and
959 yy::Parser::print_ when not %locations.
960 Activate more lalr1.cc tests.
961
962 2003-02-19 Akim Demaille <akim@epita.fr>
963
964 * data/lalr1.cc: When displaying a line number, be sure to make it
965 an int.
966
967 2003-02-19 Akim Demaille <akim@epita.fr>
968
969 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
970 Remove, useless.
971 (YYABORT, YYACCEPT, YYERROR): New.
972 * tests/calc.at: Renable the lalr1.cc test.
973
974 2003-02-19 Akim Demaille <akim@epita.fr>
975
976 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
977 error recovery, mixing with/without pops and discarding of the
978 lookahead.
979 Exercise YYERROR.
980 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
981
982 2003-02-17 Paul Eggert <eggert@twinsun.com>
983
984 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
985 * tests/testsuite.at (AT_COMPILE): Use them.
986 This fixes the testsuite problem reported by Robert Lentz in
987 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
988
989 2003-02-12 Paul Eggert <eggert@twinsun.com>
990
991 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
992 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
993 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
994 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
995 Check for malloc failure, for consistency with yacc.c.
996 (yytname_size): Remove, for consistency with yacc.c.
997
998 The bug still remains in data/lalr1.cc, as I didn't have time
999 to fix it there.
1000
1001 2003-02-06 Akim Demaille <akim@epita.fr>
1002
1003 * configure.ac (GXX): Rename as...
1004 (CXX): this, to keep the original Autoconf semantics.
1005 Require 2.57.
1006 * data/lalr1.cc: Fix b4_copyright invocations.
1007 If YYDEBUG is not defined, don't depend upon name_ being defined.
1008 (location.hh): Include string and iostream.
1009 (Position::filename): New member.
1010 (Position::Position ()): New.
1011 (operator<< (Position)): New.
1012 (operator- (Position, int)): New.
1013 (Location::first, Location::last): Rename as...
1014 (Location::begin, Location::end): these, to mock the conventional
1015 iterator names.
1016 (operator<< (Location)): New.
1017 * tests/atlocal.in (CXX): New.
1018 * tests/testsuite.at (AT_COMPILE_CXX): New.
1019 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
1020 locations in a more synthetic way.
1021 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
1022 lalr1.cc is used.
1023 Adjust the C locations to match those from Emacs: first column is
1024 column 0.
1025 Change all the expected results.
1026 Conform to the GCS: simplify the locations when applicable.
1027 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
1028 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
1029 these CPP macros with the m4 macros new defined by...
1030 (AT_CHECK_PUSHDEFS): this, i.e.:
1031 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
1032 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
1033 New macros.
1034 (AT_CHECK_POPDEFS): Undefine them.
1035 (AT_CHECK_CALC_LALR1_CC): New.
1036 Use it for the first lalr1.cc test.
1037
1038 2003-02-04 Akim Demaille <akim@epita.fr>
1039
1040 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
1041 Location as is defined.
1042
1043 2003-02-04 Akim Demaille <akim@epita.fr>
1044
1045 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
1046 name_ being defined.
1047
1048 2003-02-03 Paul Eggert <eggert@twinsun.com>
1049
1050 * src/gram.h (start_symbol): Remove unused decl.
1051
1052 Use more-consistent naming conventions for local vars.
1053
1054 * src/derives.c (derives_compute): Change type of local var from
1055 int to rule_number.
1056 * src/gram.c (grammar_rules_partial_print): Likewise.
1057 * src/print.c (print_core): Likewise.
1058 * src/reduce.c (reduce_grammar_tables): Likewise.
1059
1060 * src/gram.c (grammar_dump): Change name of item_number *
1061 local var from r to rp.
1062 * src/nullable.c (nullable_compute): Likewise.
1063
1064 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
1065
1066 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
1067 for symbol or symbol_number var.
1068 * src/reader.c (grammar_start_symbol_set): Likewise.
1069 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
1070 Likewise.
1071 * src/state.c (transitions_to): Likewise.
1072 * src/state.h: Likewise.
1073 * src/tables.c (symbol_number_to_vector_number): Likewise.
1074
1075 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
1076 char * var.
1077
1078 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
1079 var.
1080
1081 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
1082 var.
1083
1084 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
1085 Use str, not s, for char * var. Use ch, not c, for character var.
1086 Use size for size var.
1087
1088 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
1089 char * var.
1090 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
1091 uniqstr var.
1092 * src/uniqstr.h: Likewise.
1093
1094 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1095 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1096 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
1097 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
1098 param to have same name as that of enum, so that we don't use
1099 "s" to stand for a non-state.
1100
1101 2003-02-02 Akim Demaille <akim@epita.fr>
1102
1103 * src/scan-skel.l: Scan more than one inert character per yylex
1104 invocation.
1105
1106 2003-02-01 Paul Eggert <eggert@twinsun.com>
1107
1108 Version 1.875a.
1109
1110 * po/LINGUAS: Add ms.
1111
1112 2003-01-30 Akim Demaille <akim@epita.fr>
1113
1114 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
1115
1116 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1117
1118 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
1119 of $1.
1120
1121 Changes in response to error report by S. Eken: GLR mode does not
1122 handle negative $ indices or $ indices in embedded rules correctly.
1123 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
1124
1125 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
1126 (b4_rhs_location): Ditto.
1127 (yyfill): New function to copy from stack tree into array
1128 incrementally.
1129 (yyuserAction): Modify to allow incremental move of semantic values
1130 to rhs array when in GLR mode.
1131 Define YYFILL to use in user-defined actions to fill semantic array
1132 as needed.
1133 Remove dummy use of yystack, as there is now a guaranteed use.
1134 (yydoAction): Modify to allow incremental move of semantic values
1135 to rhs array when in GLR mode.
1136 (yyresolveAction): Ditto.
1137 (yyglrShiftDefer): Update comment.
1138 (yyresolveStates): Use X == NULL for pointers, not !X.
1139 (yyglrReduce): Ditto.
1140 (yydoAction): Ditto
1141
1142 * tests/glr-regr1.at: Rename to ...
1143 * tests/glr-regression.at: Add new regression test for the problems
1144 described above (adapted from S. Eken).
1145 Update copyright notice.
1146 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
1147 * tests/Makefile.am: Ditto.
1148
1149 2003-01-28 Paul Eggert <eggert@twinsun.com>
1150
1151 * data/lalr1.cc: Do not use @output_header_name@ unless
1152 b4_defines_flag is set. This fixes two bugs reported by
1153 Tim Van Holder in
1154 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
1155 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
1156
1157 2003-01-21 Paul Eggert <eggert@twinsun.com>
1158
1159 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
1160 we don't need to worry about yyerrlab1 being reported as an
1161 "unused label" by non-GCC C compilers. The downside is that if
1162 locations are used then a couple of statements are duplicated each
1163 time YYERROR is invoked, but the upside is that the warnings
1164 should vanish.
1165 (yyerrlab1): Move code to YERROR.
1166 (yyerrlab2): Remove. Change uses back to yyerrlab1.
1167 This reverts some of the 2002-12-27 change.
1168
1169 2003-01-17 Paul Eggert <eggert@twinsun.com>
1170
1171 * src/output.c (symbol_printers_output): Fix typo that led
1172 to core dump. Problem reported by Antonio Rus in
1173 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
1174
1175 2003-01-13 Akim Demaille <akim@epita.fr>,
1176 Quoc Peyrot <chojin@lrde.epita.fr>,
1177 Robert Anisko <anisko_r@lrde.epita.fr>
1178
1179 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
1180 when the stacks contain one element, as the loop would otherwise
1181 free the last state, and then use the top state (the one we just
1182 popped). This means that the initial elements will not be freed
1183 explicitly, as is the case in yacc.c; it is not a problem, as
1184 these elements have fake values.
1185
1186 2003-01-11 Paul Eggert <eggert@twinsun.com>
1187
1188 * NEWS: %expect-violations are now just warnings, reverting
1189 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
1190 bootstrapping problem reported by Matthias Klose; see
1191 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
1192 * src/conflicts.c (conflicts_print): Likewise.
1193 * tests/conflicts.at (%expect not enough, %expect too much,
1194 %expect with reduce conflicts): Likewise.
1195 * doc/bison.texinfo (Expect Decl): Document this. Also mention
1196 that the warning is enabled if the number of conflicts changes
1197 (not necessarily increases).
1198
1199 * src/getargs.c (version): Update copyright year.
1200
1201 2003-01-09 Akim Demaille <akim@epita.fr>
1202
1203 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
1204
1205 2003-01-08 Paul Eggert <eggert@twinsun.com>
1206
1207 * Makefile.maint (WGETFLAGS):
1208 New macro, containing "-C off" to disable proxy caches.
1209 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
1210 (rel-check): Use $(WGET) instead of wget.
1211
1212 2003-01-06 Paul Eggert <eggert@twinsun.com>
1213
1214 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
1215 the GLR paper of Scott, Johnstone and Hussain.
1216
1217 2003-01-04 Paul Eggert <eggert@twinsun.com>
1218
1219 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
1220 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
1221 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
1222 (EXTRA_LIBRARIES): New var, for liby.a.
1223 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
1224 (EXTRA_SCRIPTS): New var, for yacc.
1225
1226 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
1227 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
1228 Problem reported by Nelson H. F. Beebe.
1229
1230 2003-01-03 Paul Eggert <eggert@twinsun.com>
1231
1232 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
1233 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1234 when compiling Bison 1.875's `bitset bset = obstack_alloc
1235 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
1236
1237 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
1238 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
1239 grow to a huge size with typical invocation.
1240
1241 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
1242 Use the pattern recommended by Autoconf 2.57, except also protect
1243 against double-definition.
1244 * src/system.h: Likewise.
1245 Portability issues reported by Nelson H. F. Beebe.
1246
1247 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
1248 All uses changed. Provide a definition in both C and C++.
1249 (yytrue, yyfalse): Define even if defined (__cplusplus).
1250
1251 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
1252 Reported by Nelson H. F. Beebe.
1253
1254 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
1255
1256 2003-01-02 Paul Eggert <eggert@twinsun.com>
1257
1258 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
1259 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
1260 Bug reported by Nelson H. F. Beebe.
1261
1262 2003-01-01 Paul Eggert <eggert@twinsun.com>
1263
1264 * Version 1.875.
1265
1266 2002-12-30 Paul Eggert <eggert@twinsun.com>
1267
1268 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
1269 Moved here from...
1270 (<INITIAL>","): Here. This causes stray "," to be treated
1271 more uniformly.
1272
1273 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
1274 last brace in braced code when not in Yacc mode, for compatibility
1275 with Bison 1.35. This resurrects the 2001-12-15 patch to
1276 src/reader.c.
1277
1278 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
1279 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
1280
1281 2002-12-28 Paul Eggert <eggert@twinsun.com>
1282
1283 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
1284 that of SYM's type. This fixes Debian bug 168069, reported by
1285 Thomas Olsson.
1286
1287 2002-12-28 Paul Eggert <eggert@twinsun.com>
1288
1289 Version 1.75f.
1290
1291 Switch back to the Yacc style of conflict reports, undoing some
1292 of the 2002-07-30 change.
1293 * doc/bison.texinfo (Understanding): Use Yacc style for
1294 conflict reports. Also, use new way of locating rules.
1295 * src/conflicts.c (conflict_report):
1296 Renamed from conflict_report_yacc, removing the old
1297 'conflict_report'. Translate the entire conflict report at once,
1298 so that we don't assume that "," has the same interpretation in
1299 all languages.
1300 (conflicts_output): Use Yacc-style conflict report for each state,
1301 instead of our more-complicated style.
1302 (conflicts_print): Use Yacc-style conflict report, except print
1303 the input file name when not emulating Yacc.
1304 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
1305 Conflicted Reduction, %expect not enough, %expect too much,
1306 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
1307 * tests/existing.at (GNU Cim Grammar): Likewise.
1308 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
1309
1310 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
1311 fatal): Don't invoke fflush; it's not needed and it might even be
1312 harmful for stdout, as stdout might not be open.
1313 * src/reduce.c (reduce_print): Likewise.
1314
1315 2002-12-27 Paul Eggert <eggert@twinsun.com>
1316
1317 Fix a bug where error locations were not being recorded correctly.
1318 This problem was originally reported by Paul Hilfinger in
1319 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
1320
1321 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1322 top of the location stack's error locations.
1323 (yyerrlab): Set it. When discarding a token, push its location
1324 onto yylerrsp so that we don't lose track of the error's end.
1325 (yyerrlab1): Now is only the target of YYERROR, so that we can
1326 properly record the location of the action that failed. For GCC
1327 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1328 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1329 (yyerrlab2): New label, which yyerrlab now falls through to.
1330 Compute the error's location by applying YYLLOC_DEFAULT to
1331 the locations of all the symbols that went into the error.
1332 * doc/bison.texinfo (Location Default Action): Mention that
1333 YYLLOC_DEFAULT is also invoked for syntax errors.
1334 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1335 Error locations include the locations of all the tokens that were
1336 discarded, not just the last token.
1337
1338 2002-12-26 Paul Eggert <eggert@twinsun.com>
1339
1340 * src/files.c: Include quote.h.
1341 (compute_output_file_names): Warn if we detect conflicting
1342 outputs to the same file. This should catch the misunderstanding
1343 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1344
1345 * src/conflicts.c (conflicts_print): If the user specifies
1346 "%expect N", report an error if there are any reduce/reduce
1347 conflicts. This is what the manual says should happen.
1348 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1349 * tests/conflicts.at (%expect with reduce conflicts): New test.
1350
1351 Don't use m4_include on relative file names, as it doesn't work as
1352 desired if there happens to be a file with that name under ".".
1353
1354 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1355 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1356 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1357 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1358 * src/output.c (output_skeleton): Use full path names when
1359 specifying a file to include; don't rely on include path, as
1360 it's unreliable when the working file contains a file with
1361 that name.
1362
1363 2002-12-25 Paul Eggert <eggert@twinsun.com>
1364
1365 Remove obsolete references to bison.simple and bison.hairy.
1366 Problem mentioned by Aubin Mahe in
1367 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
1368 * data/glr.c: Comment fix.
1369 * doc/bison.1: Remove references. Also, mention "yacc".
1370
1371 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1372 with -g option.
1373
1374 * src/parse-gram.y (declaration): Use enum "report_states" rather
1375 than its numeric value 1.
1376
1377 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1378 opening a new one. This fixes Debian bug 165349, reported by
1379 Bruce Stephens.
1380
1381 2002-12-24 Paul Eggert <eggert@twinsun.com>
1382
1383 Version 1.75e.
1384
1385 * Makefile.maint (cvs-update): Don't assume that the shell
1386 supports $(...), as Solaris sh doesn't.
1387
1388 * src/parse-gram.y (lloc_default): Remove test for empty
1389 nonterminals at the end, since it didn't change the result.
1390
1391 2002-12-24 Paul Eggert <eggert@twinsun.com>
1392
1393 If the user does not define YYSTYPE as a macro, Bison now declares it
1394 using typedef instead of defining it as a macro. POSIX requires this.
1395 For consistency, YYLTYPE is also declared instead of defined.
1396
1397 %union directives can now have a tag before the `{', e.g., the
1398 directive `%union foo {...}' now generates the C code
1399 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1400 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1401 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1402 instead of `yyltype'.
1403
1404 `yystype' and `yyltype' are now obsolescent macros instead of being
1405 typedefs or tags; they are no longer documented and will be
1406 withdrawn in a future release.
1407
1408 * data/glr.c (b4_location_type): Remove.
1409 (YYSTYPE): Renamed from yystype.
1410 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
1411 (struct YYLTYPE): Renamed from struct yyltype.
1412 (YYLTYPE): Renamed from yyltype.
1413 (yyltype, yystype): New (and obsolescent) macros,
1414 for backward compatibility.
1415 * data/yacc.c: Likewise.
1416
1417 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
1418 does not specify a union tag. This is for compatibility with
1419 Solaris 9 yacc.
1420
1421 * src/parse-gram.y (add_param): 2nd arg is now char * not char
1422 const *, since it is now modified by stripping surrounding { }.
1423 (current_braced_code): Remove.
1424 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
1425 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
1426 trailing " {...}". Now of type <chars>.
1427 (grammar_declaration): Adjust to bundled tokens.
1428 (code_content): Remove; stripping is now done by add_param.
1429 (print_token_value): Print contents of bundled tokens.
1430 (token_name): New function.
1431
1432 * src/reader.h (braced_code, current_braced_code): Remove.
1433 (token_name): New decl.
1434
1435 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
1436 token_type, not braced_code code_kind. All uses changed.
1437 (SC_PRE_CODE): New state, for scanning after a keyword that
1438 has (or usually has) an immediately-following braced code.
1439 (token_type): New local var, to keep track of which token type
1440 to return when scanning braced code.
1441 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
1442 <INITIAL>"%parse-param", <INITIAL>"%printer",
1443 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
1444 instead of returning a token type immediately.
1445 (<INITIAL>"{"): Set token type.
1446 (<SC_BRACED_CODE>"}"): Use it.
1447 (handle_action_dollar, handle_action_at): Now returns bool
1448 indicating success. Fail if ! current_rule; this prevents a core dump.
1449 (handle_symbol_code_dollar, handle_symbol_code_at):
1450 Remove; merge body into caller.
1451 (handle_dollar, handle_at): Complain in invalid contexts.
1452
1453 * NEWS, doc/bison.texinfo: Document the above.
1454 * NEWS: Fix years and program names in copyright notice.
1455
1456 2002-12-17 Paul Eggert <eggert@twinsun.com>
1457
1458 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
1459 Reporting, Table of Symbols): Omit mentions of %lex-param and
1460 %parse-param from the documentation for now.
1461
1462 2002-12-15 Paul Eggert <eggert@twinsun.com>
1463
1464 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
1465 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
1466 lookahead symbol, and which sets yychar in parser actions) and it
1467 disagreed with the Bison documentation. Bug
1468 reported by Andrew Walrond.
1469
1470 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
1471 as the caller now does that.
1472 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
1473 (YYEMPTY): Parenthesize right hand side, since others use it.
1474 (yyparse): Don't assume that our generated code is the only code
1475 that sets yychar.
1476
1477 2002-12-13 Paul Eggert <eggert@twinsun.com>
1478
1479 Version 1.75d.
1480
1481 POSIX requires a "yacc" command.
1482 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
1483 (MOSTLYCLEANFILES): Add yacc.
1484 (yacc): New rule.
1485 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
1486 as an alias for bison y.
1487
1488 * po/LINGUAS: Add da.
1489
1490 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
1491 problem with latest <getopt.h>.
1492 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
1493
1494 * doc/fdl.texi: Upgrade to 1.2.
1495 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
1496 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
1497 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
1498 gnulib.
1499 * config/install-sh: Sync with autotools.
1500
1501 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
1502 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1503 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
1504 locations are requested.
1505 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
1506 locations are requested.
1507
1508 2002-12-12 Paul Eggert <eggert@twinsun.com>
1509
1510 Remove unportable casts and storage allocation tricks.
1511 While we're at it, remove almost all casts, since they
1512 usually aren't needed and are a sign of trouble.
1513
1514 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
1515
1516 * src/derives.c (derives_compute): Do not subtract NTOKENS from
1517 the pointer DSET returned by malloc; this isn't portable.
1518 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
1519 Similarly for DERIVES.
1520 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
1521 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
1522 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
1523
1524 * src/derives.c (derives_compute): Do not bother invoking
1525 int_of_rule_number, since rule numbers are integers.
1526
1527 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
1528 rather than XMALLOC (char, N).
1529
1530 * src/files.c (filename_split): Rewrite to avoid cast.
1531
1532 * src/gram.h (symbol_number_as_item_number,
1533 item_number_as_symbol_number, rule_number_as_item_number,
1534 item_number_as_rule_number):
1535 Now inline functions rather than macros, to avoid casts.
1536 * src/state.h (state_number_as_int): Likewise.
1537 * src/tables.c (state_number_to_vector_number,
1538 symbol_number_to_vector_number): Likewise.
1539
1540 * src/gram.h (int_of_rule_number): Remove; no longer used.
1541
1542 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
1543 since the resulting storage is always stored into.
1544
1545 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
1546 where it's needed.
1547
1548 * src/muscle_tab.c (muscle_m4_output):
1549 Now inline. Return bool, not int.
1550 * src/state.c (state_compare): Likewise.
1551 * src/symtab.c (symbol_check_defined,
1552 symbol_check_alias_consistency, symbol_pack, symbol_translation,
1553 hash_compare_symbol, hash_symbol):
1554 Likewise.
1555 * src/uniqstr.c (uniqstr_print): Likewise.
1556 * src/muscle_tab.c (muscle_m4_output_processor):
1557 New function, to avoid casts.
1558 * src/state.c (state_comparator, stage_hasher): Likewise.
1559 * src/symtab.c (symbol_check_defined_processor,
1560 symbol_check_alias_consistency_processor, symbol_pack_processor,
1561 symbol_translation_processor, hash_symbol_comparator,
1562 hash_symbol_hasher): Likewise.
1563 * src/uniqstr.c (uniqstr_print_processor): Likewise.
1564 * src/muscle_tab.c (muscles_m4_output):
1565 Use new functions instead of casting old functions unportably.
1566 * src/state.c (state_hash_new): Likewise.
1567 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
1568 symbols_token_translations_init):
1569 Likewise.
1570 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
1571
1572 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
1573 var instead of casting to long, to avoid casts.
1574 (prepare_states): Use MALLOC rather than alloca, so that we don't
1575 have to worry about alloca.
1576 * src/state.c (state_hash_lookup): Likewise.
1577
1578 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
1579 local var instead of casting to unsigned char, to avoid casts.
1580
1581 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
1582 STATE_ALLOC): Remove.
1583 (transitions_new, errs_new, reductions_new, state_new): Use malloc
1584 rather than calloc, and use offsetof to avoid allocating slightly
1585 too much storage.
1586 (state_new): Initialize all members.
1587
1588 * src/state.c (state_hash): Use unsigned accumulator, not signed.
1589
1590 * src/symtab.c (symbol_free): Remove; unused.
1591 (symbol_get): Remove cast in lhs of assignment.
1592 (symbols_do): Now static. Accept generic arguments, not
1593 hashing-related ones.
1594
1595 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
1596 (symbol_processor): Remove.
1597 (symbols_do): Remove decl; now static.
1598
1599 * src/system.h (alloca): Remove; decl no longer needed.
1600 (<stddef.h>): Include, for offsetof.
1601 (<inttypes.>, <stdint.h>): Include if available.
1602 (uintptr_t): New type, if system lacks it.
1603 (CALLOC, MALLOC, REALLOC): New macros.
1604 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
1605 new macros.
1606
1607 * src/tables.c (table_size): Now int, to pacify GCC.
1608 (table_grow, table_ninf_remap): Use signed table size.
1609 (save_row): Don't bother initializing locals when not needed.
1610 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
1611 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
1612
1613 * src/vcg.h: Correct misspellings.
1614
1615 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
1616
1617
1618 * src/getargs.c (getargs): Don't assume EOF == -1.
1619
1620 2002-12-09 Paul Eggert <eggert@twinsun.com>
1621
1622 Change identifier spellings to avoid collisions with names
1623 that are reserved by POSIX.
1624
1625 Don't use names ending in _t, since POSIX reserves them.
1626 For consistency, remove _e and _s endings -- they're weren't
1627 needed to remove ambiguity. All uses changed.
1628 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
1629 turn was just renamed from struniq_t.
1630 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
1631 which in turn was just renamed from struniq_processor_t.
1632 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
1633 in turn was renamed from hash_compare_struniq_t.
1634 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
1635 (state_list): Renamed from state_list_t.
1636 * src/assoc.h (assoc): Renamed from assoc_t.
1637 * src/conflicts.c (enum conflict_resolution): Renamed from
1638 enum conflict_resolution_e.
1639 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
1640 (rule_list): Renamed from rule_list_t.
1641 * src/getargs.h (enum trace): Renamed from enum trace_e.
1642 (enum report): Renamed from enum report_e.
1643 * src/gram.h (item_number): Renamed from item_number_t.
1644 (rule_number): Renamed from rule_number_t.
1645 (struct rule_s): Remove the "rule_s" part; not used.
1646 (rule): Renamed from rule_t.
1647 (rule_filter): Renamed from rule_filter_t.
1648 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
1649 (goto_list): Renamed from goto_list_t.
1650 * src/lalr.h (goto_number): Renamed from goto_number_t.
1651 * src/location.h (location): Renamed from location_t.
1652 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
1653 and moved here from:
1654 * src/muscle_tab.h (muscle_entry_t): here.
1655 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
1656 (rule_list): Renamed from rule_list_t.
1657 * src/print_graph.c (static_graph): Renamed from graph.
1658 * src/reader.h (braced_code): Renamed from braced_code_t.
1659 Remove brace_code_e tag.
1660 * src/relation.h (relation_node): Renamed from relation_node_t.
1661 (relation_nodes): Renamed from relation_nodes_t.
1662 (relation): Renamed from relation_t.
1663 * src/state.h (state_number): Renamed from state_number_t.
1664 (struct state): Renamed from struct state_s.
1665 (state): Renamed from state_t.
1666 (transitions): Renamed from transitions_t. Unused (and
1667 misspelled) transtion_s tag removed.
1668 (errs): Renamed from errs_t. Unused errs_s tag removed.
1669 (reductions): Renamed from reductions_t. Unused tag
1670 reductions_s removed.
1671 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
1672 (struct symbol_list): Renamed from struct symbol_list_s.
1673 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
1674 (struct symbol): Renamed from struct symbol_s.
1675 (symbol): Renamed from symbol_t.
1676 * src/tables.c (vector_number): Renamed from vector_number_t.
1677 (action_number): Renamed from action_t.
1678 * src/tables.h (base_number): Renamed from base_t.
1679 * src/vcg.h (enum color): Renamed from enum color_e.
1680 (enum textmode): Renamed from enum textmode_e.
1681 (enum shape): Renamed from enum shape_e.
1682 (struct colorentry): Renamed from struct colorentry_s.
1683 (struct classname): Renamed from struct classname_s.
1684 (struct infoname): Renamed from struct infoname_s.
1685 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
1686 (enum decision): Renamed from enum decision_e.
1687 (enum orientation): Renamed from enum orientation_e.
1688 (enum alignment): Renamed from enum alignment_e.
1689 (enum arrow_mode): Renamed from enum arrow_mode_e.
1690 (enum crossing_type): Renamed from enum crossing_type_e.
1691 (enum view): Renamed from enum view_e.
1692 (struct node): Renamed from struct node_s.
1693 (node): Renamed from node_t.
1694 (enum linestyle): Renamed from enum linestyle_e.
1695 (enum arrowstyle): Renamed from enum arrowstyle_e.
1696 (struct edge): Renamed from struct edge.
1697 (edge): Renamed from edge_t.
1698 (struct graph): Renamed from struct graph_s.
1699 (graph): Renamed from graph_t.
1700 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
1701 Rename value_t -> value.
1702 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
1703 value_t_as_yystype -> value_as_yystype.
1704
1705 Don't include <errno.h> in the mainstream code, since it
1706 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
1707 * lib/get-errno.c, lib/get-errno.h: New files.
1708 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
1709 get-errno.c.
1710 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
1711 * src/output.c (output_skeleton): Likewise.
1712 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
1713 instead of errno.
1714 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
1715 Likewise.
1716 (handle_action_dollar, handle_action_at): Likewise.
1717 * src/system.h: Do not include <errno.h>.
1718 (TAB_EXT): Renamed from EXT_TAB.
1719 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
1720
1721 Avoid str[a-z]*, since <string.h> reserves that name space.
1722 Change all instances of "struniq" in names to "uniqstr", and
1723 likewise for "STRUNIQ" and "UNIQSTR".
1724 * src/uniqstr.c: Renamed from src/struniq.c.
1725 * src/uniqstr.h: Renamed from src/struniq.h.
1726 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
1727 * src/files.c (strsuffix): Remove; unused.
1728 (concat2): Renamed from stringappend. Now static.
1729 * src/files.h (strsuffix, stringappend): Remove; unused.
1730 * src/parse-gram.y (<chars>): Renamed from <string>.
1731 (<uniqstr>): Renamed from <struniq>.
1732 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
1733 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
1734 (struct graph_s.expand): Renamed from struct graph_s.stretch.
1735 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
1736 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
1737 (N_EXPAND): Renamed from N_STRETCH.
1738
1739 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
1740 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
1741 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
1742 Remove; unused.
1743 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
1744 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
1745 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
1746 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
1747 (BASE_MAXIMUM): Renamed from BASE_MAX.
1748 (BASE_MINIMUM): Renamed from BASE_MIN.
1749 (ACTION_MAX): Remove; unused.
1750 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
1751 Unnecessary casts removed from above defines.
1752
1753
1754 Fix misspelling in names.
1755 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
1756 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
1757 G_NODE_ALIGNEMENT.
1758
1759
1760 * lib/timevar.c (timevar_report): Renamed from time_report,
1761 for consistency with other names.
1762 * lib/timevar.h (timevar_report): New decl.
1763 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
1764
1765
1766 Sort include-file uses.
1767
1768 Reorder all include files under src to be in the order "system.h".
1769 then the ../lib include files in angle brackets (alphabetized),
1770 then the . include files in double-quotes (alphabetized). Fix
1771 dependency breakages encountered in this process, as follows:
1772 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
1773 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
1774 * src/state.h: Include "symtab.h".
1775
1776 2002-12-08 Paul Eggert <eggert@twinsun.com>
1777
1778 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
1779 since this causes problems when __file__ contains character
1780 sequences like "@" that are treated specially by src/scan-skel.l.
1781 Instead, just use the file's basename. This fixes the bug
1782 reported by Martin Mokrejs in
1783 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
1784
1785 2002-12-06 Paul Eggert <eggert@twinsun.com>
1786
1787 Add support for rules that do not have trailing semicolons, as
1788 POSIX requires. Improve the quality of locations in Bison
1789 diagnostics.
1790
1791 * src/location.c: Include <quotearg.h>.
1792 (empty_location): Now const.
1793 (location_print): New function. Follow the recommendation of the
1794 GNU Coding Standards for locations that span file boundaries.
1795 * src/location.h: Do not include <quotearg.h>; no longer needed.
1796 (boundary): New type.
1797 (location_t): Use it. This allows locations to span file boundaries.
1798 All member uses changed: file -> start.file or end.file (as needed),
1799 first_line -> start.line, first_column -> start.column,
1800 last_line -> end.line, last_column -> end.column.
1801 (equal_boundaries): New function.
1802 (LOCATION_RESET, LOCATION_STEP): Remove.
1803 (LOCATION_PRINT): Remove. All callers changed to use location_print.
1804 (empty_location): Now const.
1805 (location_print): New decl.
1806 * src/parse-gram.y (lloc_default): New function, which handles
1807 empty locations more accurately.
1808 (YYLLOC_DEFAULT): Use it.
1809 (%token COLON): Remove.
1810 (%token ID_COLON): New token.
1811 (rules): Use it.
1812 (declarations, rules): Remove trailing semicolon.
1813 (declaration, rules_or_grammar_declaration):
1814 Allow empty (";") declaration.
1815 (symbol_def): Remove empty actions; no longer needed.
1816 (rules_or_grammar_declaration): Remove trailing semicolon.
1817 (semi_colon.opt): Remove.
1818 * src/reader.h: Include location.h.
1819 (scanner_cursor): New decl.
1820 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
1821 rolling our own.
1822 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
1823 of *loc.
1824 (STEP): Remove. No longer needed, now that adjust_location does
1825 the work. All uses removed.
1826 (scanner_cursor): New var.
1827 (adjust_location): Renamed from extend_location. It now sets
1828 *loc and adjusts the scanner cursor. All uses changed.
1829 Don't bother testing for CR.
1830 (handle_syncline): Remove location arg; now updates scanner cursor.
1831 All callers changed.
1832 (unexpected_end_of_file): Now accepts start boundary of token or
1833 comment, not location. All callers changed. Update scanner cursor,
1834 not the location.
1835 (SC_AFTER_IDENTIFIER): New state.
1836 (context_state): Renamed from c_context. All uses changed.
1837 (id_loc, code_start, token_start): New local vars.
1838 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
1839 processing of Yacc white space and equivalents here.
1840 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
1841 instead of returning ID immediately, since we need to search for
1842 a subsequent colon.
1843 (<INITIAL>"'", "\""): Save token_start.
1844 (<INITIAL>"%{", "{", "%%"): Save code_start.
1845 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
1846 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
1847 BEGIN context_state at end, not INITIAL.
1848 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
1849 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
1850 Return correct token start.
1851 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
1852 the start of a character, string or multiline comment is found.
1853 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
1854 Reduction): Adjust reported locations to match the more-precise
1855 results now expected.
1856 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
1857 * tests/reduce.at (Useless Rules, Reduced Automaton,
1858 Underivable Rules): Likewise.
1859 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1860 or "|"' now that so many other tokens are allowed by the new grammar.
1861
1862 * src/complain.h (current_file): Remove duplicate decl;
1863 current_file is now owned by files.h.
1864 * src/complain.c, src/scan-gram.l: Include files.h.
1865
1866 2002-12-06 Paul Eggert <eggert@twinsun.com>
1867
1868 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1869 promotes to int; it might be unsigned int.
1870 * data/yacc.c (yy_reduce_print): Likewise.
1871
1872 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1873 be #defined in the prologue, not in the Bison declarations.
1874 This fixes Debian Bug 102878, reported by Shaul Karl.
1875
1876 2002-12-02 Paul Eggert <eggert@twinsun.com>
1877
1878 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1879 * lib/strtoul.c: New file, from gnulib.
1880 This fixes a porting bug reported by Peter Klein in
1881 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
1882
1883 2002-11-30 Paul Eggert <eggert@twinsun.com>
1884
1885 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1886 and put only a forward declaration in the prologue. This is for
1887 consistency with the other scanner helper functions.
1888
1889 Type clashes now generate warnings, not errors, since it
1890 appears that POSIX may allow some grammars with type clashes.
1891 * src/reader.c (grammar_current_rule_check): Warn about
1892 type clashes instead of complaining.
1893 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1894
1895 Add Yacc library, since POSIX requires it.
1896 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1897 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1898 * lib/main.c, lib/yyerror.c: New files.
1899
1900 gram_error can be static; it need not be extern.
1901 * src/reader.h (gram_error): Remove decl.
1902 * src/parse-gram.y (gram_error): Now static. Add static decl.
1903 (print_token_value): Omit parameter names from forward decl,
1904 for consistency.
1905
1906 2002-11-29 Paul Eggert <eggert@twinsun.com>
1907
1908 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1909 be declared before being used. E.g., one should typically
1910 declare them in the prologue. Use GNU coding style in examples.
1911 Put "const" consistently after the type it modifies. Mention
1912 that C99 supports "inline". Mention that yyerror traditionally
1913 returns "int".
1914
1915 %parse-param and %lex-param now take just one argument, the
1916 declaration; the argument name is deduced from the declaration.
1917
1918 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1919 Reporting, Table of Symbols): Document this.
1920 * src/parse-gram.y (add_param): New function.
1921 (COMMA): Remove.
1922 (declaration): Implement new rule for %parse-param and %lex-param.
1923 * src/scan-gram.l: "," now elicits a warning, rather than being
1924 a token; this is more compatible with byacc.
1925 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1926
1927 2002-11-27 Paul Eggert <eggert@twinsun.com>
1928
1929 Rename identifiers to avoid real and potential collisions.
1930
1931 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1932 to avoid collision with lex macro described by Bruce Lilly in
1933 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1934 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1935 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1936 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1937 All uses changed.
1938 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1939 The name "yycontrol" violates the name space rules, and this stuff
1940 wasn't being used anyway.
1941 (input): Remove action; this stuff wasn't being used.
1942 (gram_error): Rename local variable yylloc -> loc.
1943 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1944 (YY_DECL): Don't use "yy" at start of local variables.
1945 All uses changed, e.g., yylloc -> loc.
1946 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1947 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1948 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1949 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1950
1951 * src/parse-gram.y (gram_error): loc is now const *.
1952 * src/reader.h (gram_error): Likewise.
1953
1954 2002-11-24 Paul Eggert <eggert@twinsun.com>
1955
1956 Version 1.75c.
1957
1958 * tests/actions.at (Actions after errors): Use an output format
1959 more similar to that of the Printers and Destructors test.
1960 Test the position of the ';' token too.
1961 (Printers and Destructors): Likewise.
1962 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1963 unnecessarily alarming people when the test fails.
1964
1965 * data/yacc.c (yyerrlab1): Move this label down, so that the
1966 parser does not discard the lookahead token if the user code
1967 invokes YYERROR. This change is required for POSIX conformance.
1968
1969 * lib/error.c: Sync with gnulib.
1970
1971 2002-11-22 Paul Eggert <eggert@twinsun.com>
1972
1973 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1974 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1975 * lib/xmalloc.c: Likewise.
1976
1977 2002-11-20 Paul Eggert <eggert@twinsun.com>
1978
1979 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1980
1981 2002-11-20 Paul Eggert <eggert@twinsun.com>
1982
1983 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1984 should use `if (! x) abort ();' rather than `assert (x);', and
1985 anyway it's one less thing to worry about configuring.
1986
1987 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1988 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1989 and replace all instances of assert with abort.
1990 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1991 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1992
1993 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1994 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1995 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1996 hash_find_entry, hash_rehash, hash_insert): Likewise.
1997 * src/conflicts.c (resolve_sr_conflict): Likewise.
1998 * src/lalr.c (set_goto_map, map_goto): Likewise.
1999 * src/nullable.c (nullable_compute): Likewise.
2000 * src/output.c (prepare_rules, token_definitions_output): Likewise.
2001 * src/reader.c (packgram, reader): Likewise.
2002 * src/state.c (state_new, state_free, state_transitions_set,
2003 state_reduction_find): Likewise.
2004 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
2005 symbol_pack): Likewise.
2006 * src/tables.c (conflict_row, pack_vector): Likewise.
2007 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
2008 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
2009 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
2010 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
2011
2012 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
2013 (ARGMATCH_CONSTRAINT): New macro.
2014 (ARGMATCH_ASSERT): Use it.
2015
2016 * src/system.h (verify): New macro.
2017 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
2018 rather than assert.
2019 * src/tables.c (tables_generate): Likewise.
2020
2021 * src/struniq.c (struniq_assert): Now returns void, and aborts
2022 if the assertion is false.
2023 (struniq_assert_p): Remove.
2024 * src/struniq.h: Likewise.
2025
2026 2002-11-18 Paul Eggert <eggert@twinsun.com>
2027
2028 * data/glr.c (yygetLRActions): Replace `yyindex' with
2029 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
2030 This fixes the regression with Sun ONE Studio 7 cc that I reported in
2031 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
2032
2033 2002-11-18 Akim Demaille <akim@epita.fr>
2034
2035 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
2036 space.
2037 From Tim Van Holder.
2038
2039 2002-11-17 Paul Eggert <eggert@twinsun.com>
2040
2041 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
2042 to "SyntaxError" for consistency with my 2002-11-15 change.
2043
2044 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
2045 not define to {}, since this breaks the common use of `YYDPRINTF
2046 ((...));' if a single statement is desired (e.g. before `else').
2047 Work around GCC warnings by surrounding corresponding calls with
2048 {} if needed.
2049 (yyhasResolvedValue): Remove unused function.
2050 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
2051 loop body.
2052 (yyreportSyntaxError): Renamed from yyreportParseError.
2053 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
2054 All uses changed.
2055 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
2056 extern when possible. Remove unused initializations.
2057
2058 2002-11-16 Akim Demaille <akim@epita.fr>
2059
2060 Augment the similarity between GLR and LALR traces.
2061
2062 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
2063 (YY_REDUCE_PRINT): New.
2064 (yyparse): Use them.
2065 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
2066 YYDPRINT here.
2067 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
2068 state reached after the reduction/recovery, since...
2069 (yyparse, yyprocessOneStack): Report the state we are entering in.
2070
2071 2002-11-16 Akim Demaille <akim@epita.fr>
2072
2073 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
2074 Add support for --trace=skeleton.
2075 * src/scan-skel.l: %option debug.
2076 Scan strings of non-@ or \n instead of character by character.
2077 (scan_skel): Handle trace_skeleton.
2078 (QPUTS): New.
2079 (@output_parser_name@, @output_header_name@): ``Restore'' their
2080 support (used to be M4 macros).
2081 * data/yacc.c: Quote larger chunks, a la glr.c.
2082 * data/lalr1.cc: Likewise.
2083 The header guards are no longer available, so use some other
2084 string than `YYLSP_NEEDED'.
2085
2086 2002-11-16 Akim Demaille <akim@epita.fr>
2087
2088 Make the ``Printers and Destructors'' test more verbose, taking
2089 `yacc.c''s behavior as (possibly wrong) reference.
2090
2091 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
2092 instead of fprint on stdout.
2093 Set and report the last_line of the symbols.
2094 Consistently display values and locations.
2095
2096 2002-11-16 Paul Eggert <eggert@twinsun.com>
2097
2098 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
2099
2100 2002-11-15 Paul Eggert <eggert@twinsun.com>
2101
2102 * tests/actions.at (Actions after errors): New test case.
2103
2104 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
2105 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
2106 tests/action.at, tests/calc.at, tests/conflicts.at,
2107 tests/cxx-type.at, tests/regression.at:
2108 "parse error" -> "syntax error" for POSIX compatibility.
2109 "parsing stack overflow..." -> "parser stack overflow" so
2110 that code matches Bison documentation.
2111
2112 2002-11-15 Akim Demaille <akim@epita.fr>
2113
2114 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
2115 take two BRACED_CODE, not two string_content.
2116 Free the scanner's obstack when we are done.
2117 (code_content): New.
2118 * tests/calc.at: Adjust.
2119 * doc/bison.texinfo: Adjust.
2120 Also, make sure to include the `,' for these declarations.
2121
2122 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
2123
2124 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
2125 definition; avoids potential autoreconf problems.
2126
2127 2002-11-15 Akim Demaille <akim@epita.fr>
2128
2129 Always check the value returned by yyparse.
2130
2131 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
2132 returned by yyparse.
2133 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
2134 Adjust calls.
2135 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
2136 returned by yyparse.
2137
2138 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2139
2140 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
2141 on input.at test.
2142
2143 2002-11-14 Paul Eggert <eggert@twinsun.com>
2144
2145 * src/output.c (output_skeleton): Call xfopen instead of
2146 duplicating xfopen's body.
2147
2148 Fix bugs reported by Nelson H. F. Beebe in
2149 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
2150
2151 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
2152 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
2153 Group compiler. Instead, use "$CC -E bar.c". Include the .h
2154 file twice in the grammar, as an extra check.
2155
2156 * tests/input.at (Torturing the Scanner): Surround the
2157 backslash-newline tests with "#if 0", to make it less likely that
2158 we'll run into compiler bugs. Bring back solitary \ inside
2159 comment, but add a closing comment to work around HP C bug. Don't
2160 test backslash-newline in C character constant.
2161
2162 2002-11-14 Akim Demaille <akim@epita.fr>
2163
2164 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
2165 status of the compiler.
2166 Calling `exit 1' is no longer needed.
2167 Reported by Nelson H. F. Beebe.
2168
2169 2002-11-14 Akim Demaille <akim@epita.fr>
2170
2171 * tests/atlocal.in (CPPFLAGS): We have config.h.
2172 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
2173 New.
2174 * tests/actions.at, tests/calc.at, tests/conflicts.at,
2175 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
2176 * tests/regression.at, tests/torture.at: Use them for all the
2177 grammars that are to be compiled.
2178 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
2179 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
2180 * doc/bison.texinfo (GLR Parsers): Document `inline'.
2181
2182 2002-11-14 Akim Demaille <akim@epita.fr>
2183
2184 * doc/bison.texinfo: Various formatting changes (alignments in
2185 samples, additional @group/@end group, GCS in samples.
2186 Use @deffn instead of simple @table to define the directives,
2187 macros, variables etc.
2188
2189 2002-11-13 Paul Eggert <eggert@twinsun.com>
2190
2191 Fix some bugs reported by Albert Chin-A-Young in
2192 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
2193
2194 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
2195 -o c"; the HP C compiler chatters during compilation.
2196 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
2197 * tests/headers.at (export YYLTYPE): Likewise.
2198
2199 * tests/input.at (Torturing the Scanner): Remove lines containing
2200 solitary backslashes, as they tickle a bug in the HP C compiler.
2201
2202 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
2203 comments, since they're not portable. Use GNU coding style.
2204
2205 2002-11-13 Akim Demaille <akim@epita.fr>
2206
2207 * data/yacc.c: Leave bigger chunks of quoted text.
2208 (YYDSYMPRINTF): New.
2209 Use it to report symbol activities.
2210 * data/glr.c (YYDSYMPRINTF): New.
2211 Use it.
2212
2213 2002-11-12 Paul Eggert <eggert@twinsun.com>
2214
2215 Version 1.75b.
2216
2217 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
2218 (yyglrReduce): Return yyok, not 0.
2219 This should avoid the enumerated-type warnings reported
2220 by Nelson H. F. Beebe in
2221 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
2222
2223 * lib/bbitset.h (BITSET_INLINE): Remove.
2224 * lib/bitset.h [! BITSET_INLINE]: Remove.
2225 (bitset_set, bitset_reset, bitset_test): Rename local vars
2226 to avoid shadowing warnings by GCC.
2227
2228 * data/glr.c (inline): Remove #define. It's the user's
2229 responsibility to #define it away, just like 'const'.
2230 This fixes one of the bugs reported by Nelson H. F. Beebe in
2231 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
2232
2233 * Makefile.maint (po-check): Scan .l and .y files instead of the
2234 .c and the .h files that they generate. This fixes the bug
2235 reported by Tim Van Holder in:
2236 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
2237 Look for N_ as well as for _. Try to avoid matching #define for
2238 N_ and _.
2239 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
2240 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
2241 * src/scan-gram.l: Revamp regular expressions so that " and '
2242 do not confuse xgettext.
2243
2244 * src/struniq.h (struniq_new): Do not declare the return type
2245 to be 'const'; this violates the C standard.
2246 * src/struniq.c (struniq_new): Likewise.
2247
2248 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
2249
2250 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
2251 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
2252 linker.
2253
2254 2002-11-12 Akim Demaille <akim@epita.fr>
2255
2256 * Makefile.maint: Sync with Autoconf:
2257 (local_updates): New.
2258
2259 2002-11-12 Akim Demaille <akim@epita.fr>
2260
2261 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
2262
2263 2002-11-12 Akim Demaille <akim@epita.fr>
2264
2265 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
2266 locations.
2267
2268 2002-11-12 Akim Demaille <akim@epita.fr>
2269
2270 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
2271 not yyvalue.
2272
2273 2002-11-12 Akim Demaille <akim@epita.fr>
2274
2275 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
2276 Use it to test the GLR parser.
2277
2278 2002-11-12 Akim Demaille <akim@epita.fr>
2279
2280 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
2281 defines it.
2282 * data/glr.c (yystos): New.
2283 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
2284 (YYDSYMPRINT): New.
2285 (yyval): Don't define it, it is handled via M4.
2286 (yyrecoverParseError): Free verbosely the discarded symbols.
2287 * data/yacc.c (yysymprint): Remove, rather...
2288 (b4_yysymprint_generate): invoke.
2289 * data/c.m4 (b4_yysymprint_generate): New.
2290 Accept pointers as arguments, as opposed to the version from
2291 yacc.c.
2292 (b4_yydestruct_generate): Likewise.
2293 * tests/cations.at (Printers and Destructors): Use Bison directives
2294 instead of CPP macros.
2295 Don't rely on internal details.
2296
2297 2002-11-12 Akim Demaille <akim@epita.fr>
2298
2299 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
2300 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
2301 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
2302 it against YYEMPTY and so forth), work on yytoken (i.e., set
2303 it to YYEMPTY etc.).
2304 (yydestruct): Replace with a b4_yydestruct_generate invocation.
2305 (b4_symbol_actions): Remove.
2306 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
2307 for 0, end-of-input.
2308
2309 2002-11-12 Akim Demaille <akim@epita.fr>
2310
2311 * doc/bison.texinfo (Destructor Decl): New.
2312
2313 2002-11-12 Akim Demaille <akim@epita.fr>
2314
2315 * src/tables.c (tables_generate): Use free for pointers that
2316 cannot be NULL, not XFREE.
2317 (pack_vector): Use assert, not fatal, for bound violations.
2318 * src/state.c (state_new): Likewise.
2319 * src/reader.c (reader): Likewise.
2320 * src/lalr.c (set_goto_map): Likewise.
2321 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
2322 the file name.
2323
2324 2002-11-12 Akim Demaille <akim@epita.fr>
2325
2326 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2327 Restore.
2328 * src/scan-gram.l (last_string): Is global to the file, not to
2329 yylex.
2330 * src/parse-gram.y (input): Don't append the epilogue here,
2331 (epilogue.opt): do it here, and free the scanner's obstack.
2332 * src/reader.c (epilogue_set): Rename as...
2333 (epilogue_augment): this.
2334 * data/c.m4 (b4_epilogue): Defaults to empty.
2335
2336 2002-11-12 Akim Demaille <akim@epita.fr>
2337
2338 * src/getargs.c (long_options): Remove duplicates.
2339 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2340 Remove.
2341 * doc/bison.rnh: Remove.
2342 * doc/bison.texinfo (VMS Invocation): Remove.
2343
2344 2002-11-12 Akim Demaille <akim@epita.fr>
2345
2346 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2347 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2348
2349 Use struniq for symbols.
2350
2351 * src/symtab.h (symbol_t): The tag member is a struniq.
2352 (symbol_type_set): Adjust.
2353 * src/symtab.c (symbol_new): Takes a struniq.
2354 (symbol_free): Don't free the tag member.
2355 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2356 (hash_compare_symbol, hash_symbol): these.
2357 Use the fact that tags as struniqs.
2358 (symbol_get): Use struniq_new.
2359 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2360 Returns a strniq.
2361 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2362 and type members are struniqs.
2363 * src/reader.c (get_merge_function)
2364 (grammar_current_rule_merge_set): Adjust.
2365 (TYPE, current_type): Are struniq.
2366
2367 Use struniq for file names.
2368
2369 * src/files.h, src/files.c (infile): Split into...
2370 (grammar_file, current_file): these.
2371 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2372 * src/reduce.c (reduce_print): Likewise.
2373 * src/getargs.c (getargs): Likewise.
2374 * src/complain.h, src/complain.c: Likewise.
2375 * src/main.c (main): Call struniqs_new early enough to use it for
2376 file names.
2377 Don't free the input file name.
2378
2379 2002-11-12 Akim Demaille <akim@epita.fr>
2380
2381 * src/symtab.c (symbol_free): Remove dead deactivated code:
2382 type_name are properly removed.
2383 Don't use XFREE to free items that cannot be NULL.
2384 * src/struniq.h, src/struniq.c: New.
2385 * src/main.c (main): Initialize/free struniqs.
2386 * src/parse-gram.y (%union): Add astruniq member.
2387 (yyprint): Adjust.
2388 * src/scan-gram.l (<{tag}>): Return a struniq.
2389 Free the obstack bit that used to store it.
2390 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2391
2392 2002-11-11 Paul Eggert <eggert@twinsun.com>
2393
2394 Revamp to fix many (but not all) of the C- and M4-related quoting
2395 problems. Among other things, this fixes the Bison bug reported
2396 by Jan Hubicka when processing the Bash grammar; see:
2397 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
2398
2399 Use new @ escapes consistently. Represent brackets with @{ and @}
2400 rather than @<:@ and @:>@, since this works a bit better with dumb
2401 editors like vi. Represent @ with @@, since @ is now consistently
2402 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2403 __ofile__, to avoid unexpected expansions. Similarly, use @output
2404 rather than #output.
2405
2406 * data/c.m4 (b4_copyright): Omit file name from comment, since
2407 the file name could contain "*/".
2408 (b4_synclines_flag): Don't quote the 2nd argument; it should already
2409 be quoted. All uses changed.
2410
2411 * data/glr.c: Use new @ escapes consistently.
2412 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
2413 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
2414 Remove, since they couldn't handle arbitrary characters in file
2415 names.
2416 * data/lalr1.cc: Likewise.
2417 * data/yacc.c: Likewise.
2418
2419 * src/files.c (output_infix): Remove; all uses removed.
2420 * src/files.h: Likewise.
2421
2422 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
2423 mishandled funny characters in file names, and anyway it isn't
2424 needed any more.
2425 * data/yacc.c: Likewise.
2426 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
2427
2428 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
2429 * data/yacc.c: Likewise.
2430
2431 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
2432 strings now.
2433 (muscle_init): Quote filename as a C string.
2434 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
2435 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
2436 * src/output.c (escaped_file_name_output): New function.
2437 (prepare_symbols): Quote tokens for M4.
2438 (prepare): Don't insert output_infix, output_prefix,
2439 output_parser_name, output_header_name; this is now down by scan-skel.
2440 Insert skeleton as a C string.
2441
2442 * src/output.c (user_actions_output, symbol_destructors_output,
2443 symbol_printers_output): Quote filenames for C and M4.
2444 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2445
2446 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
2447 escapes other than \\ and \'; this simplifies the code.
2448 (<SC_STRING>): Likewise, for \\ and \".
2449 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
2450 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
2451 Use new escapes @{ and @} for [ and ].
2452
2453 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
2454 them with auto vars.
2455 Switch to new escape scheme, where @ is the escape character uniformly.
2456 Abort if a stray escape character is found. Avoid unbounded input
2457 buffer when parsing non-escaped text.
2458
2459 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
2460 __oline__, #output, $@, and @{ do not have unintended meanings.
2461
2462 2002-11-09 Paul Eggert <eggert@twinsun.com>
2463
2464 Fix the test failure due to GCC warnings described in
2465 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
2466 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
2467 evaluate to 0 if it's impossible for NINF to be in the respective
2468 table.
2469 (yygetLRActions, yyrecoverParseError): Use them.
2470
2471 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
2472 counted in the token inserted at end of file. Now takes
2473 location_t *, not location_t, so that the location can be
2474 adjusted. All uses changed.
2475
2476 * tests/regression.at (Invalid inputs): Adjust wording in
2477 diagnostic to match the new behavior.
2478
2479 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
2480 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
2481 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
2482 abort ();'. This reduces the runtime of the "Many lookaheads"
2483 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
2484 GCC 3.2.
2485
2486 2002-11-07 Paul Eggert <eggert@twinsun.com>
2487
2488 * src/parse-gram.y (CHARACTER): Remove unused token.
2489 All uses removed.
2490
2491 * src/scan-gram.l: Remove stack option. We no longer use the
2492 stack, since the stack was never deeper than 1; instead, use the
2493 new auto var c_context to record the stacked value.
2494
2495 Remove nounput option. At an unexpected end of file, we now unput
2496 the minimal input necessary to end cleanly; this simplifies the
2497 code.
2498
2499 Avoid unbounded token sizes where this is easy.
2500
2501 (unexpected_end_of_file): New function.
2502 Use it to systematize the error message on unexpected EOF.
2503 (last-string): Now auto, not static.
2504 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
2505 (scanner_last_string_free): Remove; not used.
2506 (percent_percent_count): Move decl to just before use.
2507 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
2508 not the (never otherwised-used) CHARACTER.
2509
2510 2002-11-07 Akim Demaille <akim@epita.fr>
2511
2512 Let yyerror always receive the msg as last argument, so that
2513 yyerror can be variadic.
2514
2515 * data/yacc.c (b4_yyerror_args): New.
2516 Use it when calling yyerror.
2517 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
2518 Use it when calling yyerror.
2519 * doc/bison.texinfo (Error Reporting): Adjust.
2520 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
2521 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
2522
2523 2002-11-06 Akim Demaille <akim@epita.fr>
2524
2525 #line should have quoted strings.
2526 Ideally, this should be done by m4_quotearg.
2527
2528 * src/scan-skel.l: Include quotearg.h.
2529 Quote __ofile__.
2530 * src/output.c (symbol_printers_output)
2531 (symbol_destructors_output): Quote the file name.
2532
2533 2002-11-06 Akim Demaille <akim@epita.fr>
2534
2535 * tests/regression.at (Invalid inputs): Adjust to the recent
2536 messages.
2537
2538 2002-11-06 Akim Demaille <akim@epita.fr>
2539
2540 Restore --no-lines.
2541 Reported by Jim Kent.
2542
2543 * data/c.m4 (b4_syncline): New.
2544 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
2545 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
2546 * src/output.c (user_actions_output): Likewise.
2547 (prepare): Define 'b4_synclines_flag'.
2548 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
2549
2550 2002-11-06 Akim Demaille <akim@epita.fr>
2551
2552 * src/main.c (main): Free `infile'.
2553 * src/scan-gram.l (handle_syncline): New.
2554 Recognize `#line'.
2555 * src/output.c (user_actions_output, symbol_destructors_output)
2556 (symbol_printers_output): Use the location's file name, not
2557 infile.
2558 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2559
2560 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2561
2562 * src/tables.c (matching_state): Don't allow states to match if
2563 either has GLR conflict entries.
2564
2565 2002-11-05 Paul Eggert <eggert@twinsun.com>
2566
2567 * src/scan-gram.l: Use more accurate diagnostics, e.g.
2568 "integer out of range" rather than "invalid value".
2569 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
2570 accordingly.
2571
2572 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
2573 Also, remove one static variable in the scanner.
2574
2575 * src/scan-gram.l (braces_level): Now auto, not static.
2576 Initialize to zero if the compiler is being picky.
2577 (INITIAL): Clear braces_level instead of incrementing it.
2578 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
2579 as POSIX 1003.1-2001 requires.
2580 * src/system.h (IF_LINT): New macro, taken from coreutils.
2581 * configure.ac: Define "lint" if --enable-gcc-warnings.
2582
2583 2002-11-05 Akim Demaille <akim@epita.fr>
2584
2585 * src/scan-gram.l: When it starts with `%', complain about the
2586 whole directive, not just that `invalid character: %'.
2587
2588 2002-11-04 Akim Demaille <akim@epita.fr>
2589
2590 * Makefile.maint: Update from Autoconf.
2591 (update, cvs-update, po-update, do-po-update): New.
2592
2593 2002-11-04 Akim Demaille <akim@epita.fr>
2594
2595 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
2596 and yyerror.
2597 Have yyerror `use' its arguments.
2598 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
2599 returns true when location & yacc & pure & parse-param.
2600 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
2601
2602 2002-11-04 Akim Demaille <akim@epita.fr>
2603
2604 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
2605 clashes.
2606 * src/scan-gram.l: Use [\'] instead of ['] to pacify
2607 font-lock-mode.
2608 Use complain_at.
2609 Use quote, not quote_n since LOCATION_PRINT no longer uses the
2610 slot 0.
2611
2612 2002-11-03 Paul Eggert <eggert@twinsun.com>
2613
2614 * src/reader.c (get_merge_function, grammar_current_rule_check):
2615 Use consistent diagnostics for reporting type name clashes.
2616 Quote the types with <>, for consistency with Yacc.
2617 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
2618
2619 2002-11-03 Akim Demaille <akim@epita.fr>
2620
2621 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
2622 New.
2623 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
2624 (b4_parse_param): Remove.
2625 Use b4_identification.
2626 Propagate b4_pure_args where needed to pass them to yyerror.
2627 * data/glr.m4 (b4_parse_param): Remove.
2628 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
2629 (b4_lpure_formals): New.
2630 Use b4_identification.
2631 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
2632 b4_user_formals and b4_user_args.
2633 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
2634 (yyreportAmbiguity): When using a pure parser, also need
2635 the location, and the parse-params.
2636 Adjust callers.
2637 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
2638 When using a pure parser, also need the parse-params.
2639 Adjust callers.
2640 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
2641 (%pure-parser + %parse-param) LALR and GLR parsers.
2642 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
2643 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
2644 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
2645 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
2646 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
2647 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
2648 * doc/bison.texinfo: Untabify the whole file.
2649 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
2650 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
2651 (Error Reporting): Adjust to these new directives.
2652 Document %error-verbose, deprecate YYERROR_VERBOSE.
2653
2654 2002-11-03 Akim Demaille <akim@epita.fr>
2655
2656 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
2657 AT_CHECK_CALC_GLR invocations to use % directives, instead of
2658 command line options.
2659 * tests/cxx-type.at: Formatting changes.
2660
2661 2002-11-03 Paul Eggert <eggert@twinsun.com>
2662
2663 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
2664 to count columns correctly, and to check for invalid inputs.
2665
2666 Use mbsnwidth to count columns correctly. Account for tabs, too.
2667 Include mbswidth.h.
2668 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
2669 (extend_location): New function.
2670 (YY_LINES): Remove.
2671
2672 Handle CRLF in C code rather than in Lex code.
2673 (YY_INPUT): New macro.
2674 (no_cr_read): New function.
2675
2676 Scan UCNs, even though we don't fully handle them yet.
2677 (convert_ucn_to_byte): New function.
2678
2679 Handle backslash-newline correctly in C code.
2680 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
2681 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
2682 all uses changed.
2683 (tag, splice): New EREs. Do not allow NUL or newline in tags.
2684 Use {splice} wherever C allows backslash-newline.
2685 YY_STEP after space, newline, vertical-tab.
2686 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
2687
2688 (letter, id): Don't assume ASCII; e.g., spell out a-z.
2689
2690 ({int}, handle_action_dollar, handle_action_at): Check for integer
2691 overflow.
2692
2693 (YY_STEP): Omit trailing semicolon, so that it's more like C.
2694
2695 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
2696 as well as \000. Check for UCHAR_MAX, not 255.
2697 Allow \x with an arbitrary positive number of digits, as in C.
2698 Check for overflow here.
2699 Allow \? and UCNs, for compatibility with C.
2700
2701 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
2702 with quote slot used by complain_at.
2703
2704 * tests/input.at: Add tests for backslash-newline, m4 quotes
2705 in symbols, long literals, and funny escapes in strings.
2706
2707 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
2708 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
2709 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
2710 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
2711 * m4/mbswidth.m4: New file, from GNU coreutils.
2712
2713 * doc/bison.texinfo (Grammar Outline): Document // comments.
2714 (Symbols): Document that trigraphs have no special meaning in Bison,
2715 nor is backslash-newline allowed.
2716 (Actions): Document that trigraphs have no special meaning.
2717
2718 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
2719 no longer used.
2720
2721 2002-11-02 Paul Eggert <eggert@twinsun.com>
2722
2723 * src/reader.c: Don't include quote.h; not needed.
2724 (get_merge_function): Reword warning to be consistent with
2725 type clash diagnostic in grammar_current_rule_check.
2726
2727 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
2728 bug in trigraph handling.
2729
2730 * src/output.c (prepare_symbols): When printing token names,
2731 escape "[" as "@<:@" and likewise for "]".
2732
2733 * src/system.h (errno): Remove declaration, as we are now
2734 assuming C89 or better, and C89 guarantees errno.
2735
2736 2002-10-30 Paul Eggert <eggert@twinsun.com>
2737
2738 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
2739 Check for close failures.
2740 * src/files.h (xfclose): Return void, not int, since it always
2741 returned zero.
2742 * src/files.c (xfclose): Likewise. Report I/O error if ferror
2743 indicates one.
2744 * src/output.c (output_skeleton): Use xfclose rather than fclose
2745 and ferror. xfclose now checks ferror.
2746
2747 * data/glr.c (YYLEFTMOST_STATE): Remove.
2748 (yyreportTree): Use a stack-based leftmost state. This avoids
2749 our continuing battles with bogus warnings about initializers.
2750
2751 2002-10-30 Akim Demaille <akim@epita.fr>
2752
2753 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
2754 #if.
2755
2756 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2757
2758 * tests/glr-regr1.at: New test for reported regressions.
2759 * tests/testsuite.at: Add glr-regr1.at test.
2760 * tests/Makefile.am: Add glr-regr1.at test.
2761
2762 2002-10-24 Paul Eggert <eggert@twinsun.com>
2763
2764 Version 1.75a.
2765
2766 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
2767 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
2768 we use malloc. Don't assume 'A' through 'Z' are contiguous.
2769 Don't assume strdup exists; POSIX says its an XSI extension.
2770 Check for buffer overflow on input.
2771
2772 2002-10-24 Akim Demaille <akim@epita.fr>
2773
2774 * src/output.c (output_skeleton): Don't disable M4sugar comments
2775 too soon: it results in comments being expanded.
2776 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
2777 first output.
2778
2779 2002-10-24 Akim Demaille <akim@epita.fr>
2780
2781 * data/yacc.c (m4_int_type): New.
2782 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
2783 char' as only yacc.c wants K&R portability.
2784 * data/glr.c (yysigned_char): Remove.
2785 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
2786 Reported by Quoc Peyrot.
2787
2788 2002-10-23 Paul Eggert <eggert@twinsun.com>
2789
2790 * src/main.c (main): With --trace=time, report times even if a
2791 non-fatal error occurs. Formerly, the times were reported in some
2792 such cases but not in others.
2793 * src/reader.c (reader): Just return if a complaint has been issued,
2794 instead of exiting, so that 'main' can report times.
2795
2796 2002-10-22 Akim Demaille <akim@epita.fr>
2797
2798 * src/system.h: Include sys/types.
2799 Reported by Bert Deknuydt.
2800
2801 2002-10-23 Paul Eggert <eggert@twinsun.com>
2802
2803 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
2804 Suggested by Art Haas.
2805
2806 2002-10-22 Paul Eggert <eggert@twinsun.com>
2807
2808 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
2809 decl; not needed any more.
2810 * src/main.c (main): Use return to exit, undoing yesterday's change.
2811 The last OS that we could find where this wouldn't work is
2812 SunOS 3.5, and that's too old to worry about now.
2813
2814 * data/glr.c (struct yyltype): Define members even when not
2815 doing locations. This is more consistent with yacc.c, and it
2816 works around the following bug reports:
2817 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
2818 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
2819
2820 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
2821 @acronym consistently. Standardize on "Yacc" instead of "YACC",
2822 "Algol" instead of "ALGOL". Give a bit more history about BNF.
2823
2824 2002-10-22 Akim Demaille <akim@epita.fr>
2825
2826 * data/README: New.
2827
2828 2002-10-21 Paul Eggert <eggert@twinsun.com>
2829
2830 Be consistent about 'bool'; the old code used an enum in one
2831 module and an int in another, and this violates the C standard.
2832 * m4/stdbool.m4: New file, from coreutils 4.5.3.
2833 * configure.ac (AC_HEADER_STDBOOL): Add.
2834 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
2835 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
2836 * src/symtab.c (hash_compare_symbol_t): Likewise.
2837 * src/system.h (bool, false, true): Use a definition consistent
2838 with ../lib/hash.c. All uses changed.
2839
2840 * src/complain.c (warning_issued): Renamed from warn_message_count,
2841 so that we needn't worry about integer overflow (!).
2842 Now of type bool. All uses changed.
2843 (complaint_issued): Renamed from complain_message_count; likewise.
2844
2845 * src/main.c (main): Use exit to exit with failure.
2846
2847 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
2848 rather than 1 and 0.
2849 * src/main.c (main): Likewise.
2850 * src/getargs.c (getargs): Likewise.
2851 * src/reader.c (reader): Likewise.
2852
2853 * src/getarg.c (getargs): Remove duplicate code for
2854 "Try `bison --help'".
2855
2856 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
2857 What was that "2" for?
2858
2859 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2860 * src/getargs.c (usage): Likewise.
2861
2862 * src/getargs.c (getargs): When there are too few operands, report
2863 the last one. When there are too many, report the first extra
2864 one. This is how diffutils does it.
2865
2866 2002-10-20 Paul Eggert <eggert@twinsun.com>
2867
2868 Remove K&R vestiges.
2869 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2870 * src/complain.c (VA_START): Remove. Assume prototypes.
2871 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2872 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2873 fatal): Assume prototypes.
2874 * src/complain.h: Assume prototypes.
2875 * src/system.h (PARAMS): Remove.
2876 Include <limits.h> unconditionally, since it's guaranteeed even
2877 for a freestanding C89 compiler.
2878 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2879 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
2880
2881 2002-10-20 Akim Demaille <akim@epita.fr>
2882
2883 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2884 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2885 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2886 (yyresolveStates, yyresolveAction, yyresolveStack)
2887 (yyprocessOneStack): Use them.
2888 (yy_reduce_print): New.
2889 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2890
2891 2002-10-20 Akim Demaille <akim@epita.fr>
2892
2893 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2894 arguments and output `void'.
2895 (b4_c_function): Rename as...
2896 (b4_c_function_def): this.
2897 (b4_c_function_decl, b4_c_ansi_function_def)
2898 (b4_c_ansi_function_decl): New.
2899 Change the interpretation of the arguments: before `int, foo', now
2900 `int foo, foo'.
2901 * data/yacc.c (yyparse): Prototype and define thanks to these.
2902 Adjust b4_c_function_def uses.
2903 * data/glr.c (yyparse): Likewise, but ANSI only.
2904
2905 2002-10-20 Akim Demaille <akim@epita.fr>
2906
2907 * src/output.c (prepare): Move the definition of `tokens_number',
2908 `nterms_number', `undef_token_number', `user_token_number_max'
2909 to...
2910 (prepare_tokens): Here.
2911 (prepare_tokens): Rename as...
2912 (prepare_symbols): this.
2913 (prepare): Move the definition of `rules_number' to...
2914 (prepare_rules): here.
2915 (prepare): Move the definition of `last', `final_state_number',
2916 `states_number' to...
2917 (prepare_states): here.
2918 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2919
2920 2002-10-20 Akim Demaille <akim@epita.fr>
2921
2922 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2923
2924 2002-10-20 Akim Demaille <akim@epita.fr>
2925
2926 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2927 * data/c.m4: here.
2928
2929 2002-10-20 Akim Demaille <akim@epita.fr>
2930
2931 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2932 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2933 `pair'.
2934 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2935 `name' to...
2936 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2937 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2938 These.
2939
2940 2002-10-19 Paul Eggert <eggert@twinsun.com>
2941
2942 Do not create a temporary file, as that involves security and
2943 cleanup headaches. Instead, use a pair of pipes.
2944 Derived from a suggestion by Florian Krohm.
2945 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2946 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2947 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2948 (BISON_PREREQ_SUBPIPE): Add.
2949 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2950 Add subpipe.h, subpipe.c.
2951 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2952 * po/POTFILES.in: Add lib/subpipe.c.
2953 * src/output.c: Include "subpipe.h".
2954 (m4_invoke): Remove decl.
2955 (scan_skel): New decl.
2956 (output_skeleton): Use pipe rather than temporary file for m4 input.
2957 Check that m4sugar.m4 is readable, to avoid deadlock.
2958 Check for pipe I/O error.
2959 * src/scan-skel.l (readpipe): Remove decl.
2960 (scan_skel): New function, to be used in place of m4_invoke.
2961 Read from stream rather than file.
2962
2963 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2964 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2965 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2966 this generates a more-accurate value anyway.
2967
2968 * lib/timevar.c (timervar_accumulate): Rename locals to
2969 avoid confusion with similarly-named more-global.
2970 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2971
2972 * src/output.c (prepare): Use xstrdup to convert char const *
2973 to char *, to avoid GCC warning.
2974
2975 2002-10-19 Akim Demaille <akim@epita.fr>
2976
2977 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2978 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2979 Use them to have `calc.y' ready for %pure-parser.
2980 * data/yacc.c (YYLEX): Pass a yylex return type to
2981 b4_c_function_call.
2982
2983 2002-10-19 Akim Demaille <akim@epita.fr>
2984
2985 Prototype support of %lex-param and %parse-param.
2986
2987 * src/parse-gram.y: Add the definition of the %lex-param and
2988 %parse-param tokens, plus their rules.
2989 Drop the `_' version of %glr-parser.
2990 Add the "," token.
2991 * src/scan-gram.l (INITIAL): Scan them.
2992 * src/muscle_tab.c: Comment changes.
2993 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2994 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2995 (muscle_entry_s): The `value' member is no longer const.
2996 Adjust all dependencies.
2997 * src/muscle_tab.c (muscle_init): Adjust: use
2998 MUSCLE_INSERT_STRING.
2999 Initialize the obstack earlier.
3000 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
3001 (muscle_pair_list_grow): New.
3002 * data/c.m4 (b4_c_function_call, b4_c_args): New.
3003 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
3004 * tests/calc.at: Use %locations, not --locations.
3005 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
3006
3007 2002-10-19 Akim Demaille <akim@epita.fr>
3008
3009 * src/getargs.c (usage): Take status as argument and exit
3010 accordingly.
3011 Report the traditional `Try ... --help' message when status != 0.
3012 (usage, version): Don't take a FILE * as arg, it is pointless.
3013 (getargs): When there is an incorrect number of arguments, make it
3014 an error, and report it GNUlically thanks to `usage ()'.
3015
3016 2002-10-18 Paul Eggert <eggert@twinsun.com>
3017
3018 * data/glr.c (yyreportParseError): Don't assume that sprintf
3019 yields the length of the printed string, as this is not true
3020 on SunOS 4.1.4. Reported by Peter Klein.
3021
3022 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
3023 * tests/conflicts.at (%nonassoc and eof): Likewise.
3024 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
3025
3026 2002-10-17 Akim Demaille <akim@epita.fr>
3027
3028 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
3029 * src/getargs.c (trace_types, trace_args): Adjust.
3030 * src/reader.c (grammar_current_rule_prec_set)
3031 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
3032 Standardize error messages.
3033 And s/@prec/%prec/!
3034 (reader): Use trace_flag to enable scanner/parser debugging,
3035 instead of an adhoc scheme.
3036 * src/scan-gram.l: Remove trailing debugging code.
3037
3038 2002-10-16 Paul Eggert <eggert@twinsun.com>
3039
3040 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
3041 MUSCLE_TAB_H.
3042
3043 * NEWS: Officially drop support for building Bison with K&R C,
3044 since it didn't work anyway and it's not worth worrying about.
3045 * Makefile.maint (wget_files): Remove ansi2knr.c.
3046 (ansi2knr.c-url_prefix): Remove.
3047 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
3048 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3049 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3050
3051 2002-10-15 Paul Eggert <eggert@twinsun.com>
3052
3053 Stop using the "enum_" trick for K&R-style function definitions;
3054 it confused me, and I was the author! Instead, assume that people
3055 who want to use K&R C compilers (when using these modules in GCC,
3056 perhaps?) will run ansi2knr.
3057
3058 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
3059 All uses of "enum_" changed to "enum ".
3060 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3061 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3062
3063 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
3064 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
3065 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
3066 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
3067 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
3068 abitset_not, abitset_ones, abitset_or, abitset_or_and,
3069 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
3070 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
3071 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
3072 Use function prototypes; this removes the need for declaring
3073 static functions simply to provide their prototypes.
3074 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
3075 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
3076 bitset_count_, bitset_create, bitset_dump, bitset_first,
3077 bitset_free, bitset_init, bitset_last, bitset_next,
3078 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
3079 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
3080 bitset_print, bitset_release_memory, bitset_toggle_,
3081 bitset_type_choose, bitset_type_get, bitset_type_name_get,
3082 debug_bitset): Likewise.
3083 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
3084 * lib/bitset_stats.c (bitset_log_histogram_print,
3085 bitset_percent_histogram_print, bitset_stats_and,
3086 bitset_stats_and_cmp, bitset_stats_and_or,
3087 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
3088 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
3089 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
3090 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
3091 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
3092 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
3093 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
3094 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
3095 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
3096 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
3097 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
3098 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
3099 bitset_stats_zero): Likewise.
3100 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3101 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3102 bitsetv_dump, debug_bitsetv): Likewise.
3103 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
3104 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
3105 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
3106 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
3107 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
3108 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
3109 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
3110 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
3111 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
3112 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
3113 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
3114 Likewise.
3115 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
3116 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
3117 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
3118 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
3119 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
3120 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
3121 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
3122 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
3123 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
3124 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
3125 lbitset_xor_cmp, lbitset_zero): Likewise.
3126
3127 2002-10-14 Akim Demaille <akim@epita.fr>
3128
3129 Version 1.75.
3130
3131 2002-10-14 Akim Demaille <akim@epita.fr>
3132
3133 * tests/Makefile.am (maintainer-check-posix): New.
3134
3135 2002-10-14 Akim Demaille <akim@epita.fr>
3136
3137 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
3138 member.
3139
3140 2002-10-14 Akim Demaille <akim@epita.fr>
3141
3142 * src/tables.c (table_ninf_remap): base -> tab.
3143 Reported by Matt Rosing.
3144
3145 2002-10-14 Paul Eggert <eggert@twinsun.com>
3146
3147 * tests/action.at, tests/calc.at, tests/conflicts.at,
3148 tests/cxx-type.at, tests/headers.at, tests/input.at,
3149 tests/regression.at, tests/synclines.at, tests/torture.at:
3150 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
3151 so that the tests still work even if POSIXLY_CORRECT is set.
3152 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
3153
3154 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
3155 for portability to K&R hosts. Fix typo: signed char is guaranteed
3156 only to 127, not to 128.
3157 * data/glr.c (yysigned_char): New type.
3158 * data/yacc.c (yysigned_char): Likewise.
3159 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
3160
3161 2002-10-13 Paul Eggert <eggert@twinsun.com>
3162
3163 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
3164 true due to limited range of data type" warning from GCC.
3165
3166 * data/c.m4 (b4_token_defines): Protect against double-inclusion
3167 by wrapping enum yytokentype's definition inside #ifndef
3168 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
3169
3170 2002-10-13 Akim Demaille <akim@epita.fr>
3171
3172 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
3173 Un yy- yyrhs to avoid the name clash with the global YYRHS.
3174
3175 2002-10-13 Akim Demaille <akim@epita.fr>
3176
3177 * Makefile.maint: Update from Autoconf 2.54.
3178 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
3179
3180 2002-10-13 Akim Demaille <akim@epita.fr>
3181
3182 * src/print.c (print_state): Separate the list of solved conflicts
3183 from the other items.
3184 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
3185
3186 2002-10-13 Akim Demaille <akim@epita.fr>
3187
3188 Let nondeterministic skeletons be usable with deterministic
3189 tables.
3190
3191 With the patch, GAWK compiled by GCC without -O2 passes its test
3192 suite using a GLR parser driven by LALR tables. It fails with -O2
3193 because `struct stat' gives two different answers on my machine:
3194 88 (definition of an auto var) and later 96 (memset on this var).
3195 Hence the stack is badly corrumpted. The headers inclusion is to
3196 blame: if I move the awk.h inclusion before GLR's system header
3197 inclusion, the two struct stat have the same size.
3198
3199 * src/tables.c (pack_table): Always create conflict_table.
3200 (token_actions): Always create conflict_list.
3201 * data/glr.c (YYFLAG): Remove, unused.
3202
3203 2002-10-13 Akim Demaille <akim@epita.fr>
3204
3205 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
3206 (O0FLAGS): New.
3207 (VALGRIND, GXX): New.
3208 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
3209 * tests/bison.in: Run $PREBISON a pre-command.
3210 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
3211 (maintainer-check-g++): New.
3212 * Makefile.am (maintainer-check): New.
3213
3214 2002-10-13 Akim Demaille <akim@epita.fr>
3215
3216 * data/glr.c: Formatting changes.
3217 Tweak some trace messages to match yacc.c's.
3218
3219 2002-10-13 Akim Demaille <akim@epita.fr>
3220
3221 GLR parsers sometimes raise parse errors instead of performing the
3222 default reduction.
3223 Reported by Charles-Henry de Boysson.
3224
3225 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
3226 check the length of the traces when %glr.
3227 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
3228 GLR's traces.
3229 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
3230 Test GLR parsers.
3231 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
3232 (yyltype): Remove the yy prefix from the member names.
3233 (yytable): Complete its comment.
3234 (yygetLRActions): Map error action number from YYTABLE from
3235 YYTABLE_NINF to 0.
3236 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
3237 (which was a bug: it should have been YYTABEL_NINF, and yet it was
3238 not satisfying as we could compare an YYACTION computed from
3239 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
3240 only value for error actions.
3241 (yyreportParseError): In verbose parse error messages, don't issue
3242 `error' in the list of expected tokens.
3243 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
3244 next action to perform to match glr.c's decoding.
3245 (yytable): Complete its comment.
3246
3247 2002-10-13 Paul Eggert <eggert@twinsun.com>
3248
3249 Fix problem reported by Henrik Grubbstroem in
3250 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
3251 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
3252 because the Bison parser reads the second action before reducing
3253 the first one.
3254 * src/scan-gram.l (rule_length): New static var.
3255 Use it to keep track of the rule length in the scanner, since
3256 we can't expect the parser to be in lock-step sync with the scanner.
3257 (handle_action_dollar, handle_action_at): Use this var.
3258 * tests/actions.at (Exotic Dollars): Test for the problem.
3259
3260 2002-10-12 Paul Eggert <eggert@twinsun.com>
3261
3262 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
3263 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
3264 Include <sys/time.h> when checking for clock_t and struct tms.
3265 Use same include order as source.
3266 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
3267 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
3268
3269 * lib/timevar.c: Update copyright date and clarify comments.
3270 (get_time) [IN_GCC]: Keep the GCC version for reference.
3271
3272 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
3273 GCC version as of today, then merge Bison's changes.
3274 Change "GCC" to "Bison" in copyright notice. timevar.def's
3275 author is Akim, so change that too.
3276
3277 * src/reader.c (grammar_current_rule_check):
3278 Don't worry about the default action if $$ is untyped.
3279 Prevents bogus warnings reported by Jim Gifford in
3280 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
3281
3282 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
3283 * data/glr.c, data/lalr1.cc, data/yacc.c:
3284 Output token definitions before the first part of user declarations.
3285 Fixes compatibility problem reported by Jim Gifford for kbd in
3286 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
3287
3288 2002-10-11 Paul Eggert <eggert@twinsun.com>
3289
3290 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
3291 (yyparse): here. This undoes some of the 2002-07-25 change.
3292 Compatibility problem reported by Ralf S. Engelschall with
3293 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
3294
3295 2002-10-11 Akim Demaille <akim@epita.fr>
3296
3297 * tests/regression.at Characters Escapes): New.
3298 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
3299 characters.
3300 Reported by Jan Nieuwenhuizen.
3301
3302 2002-10-11 Akim Demaille <akim@epita.fr>
3303
3304 * po/id.po: New.
3305
3306 2002-10-10 Paul Eggert <eggert@twinsun.com>
3307
3308 Portability fixes for bitsets; this also avoids several GCC
3309 warnings.
3310
3311 * lib/abitset.c: Include <stddef.h>, for offsetof.
3312 * lib/lbitset.c: Likewise.
3313
3314 * lib/abitset.c (abitset_bytes): Return a size that is aligned
3315 properly for vectors of objects. Do not assume that adding a
3316 header size to a multiple of a word size yields a value that is
3317 properly aligned for the whole union.
3318 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3319
3320 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3321 unique names for structures.
3322 * lib/ebitset.c (ebitset_bytes): Likewise.
3323 * lib/lbitset.c (lbitset_bytes): Likewise.
3324
3325 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3326 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3327 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3328 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3329 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3330 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3331 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3332 to improve the type-checking that GCC can do.
3333 * lib/bitset.c (bitset_op4_cmp): Likewise.
3334 * lib/bitset_stats.c (bitset_stats_count,
3335 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3336 bitset_stats_copy, bitset_stats_disjoint_p,
3337 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3338 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3339 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3340 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3341 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3342 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3343 bitset_stats_or_and_cmp): Likewise.
3344 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3345 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3346 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3347 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3348
3349 * lib/abitset.h: Include bitset.h, not bbitset.h.
3350 * lib/ebitset.h: Likewise.
3351 * lib/lbitset.h: Likewise.
3352
3353 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3354 All instances of parameters of type enum bitset_opts are now of
3355 type enum_bitset_opts, to conform to the C Standard, and similarly
3356 for enum_bitset_type.
3357 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3358 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3359
3360 Do not use "struct bitset_struct" to mean different things in
3361 different modules. Not only is this confusing, it violates
3362 the C Standard, which requires that structure types in different
3363 modules must be compatible if one is to be passed to the other.
3364 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3365 All instances of "struct bitset_struct *" replaced with "bitset".
3366 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3367 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3368 struct lbitset_struct, struct bitset_stats_struct): New types.
3369 All uses of struct bitset_struct changed to union bitset_union,
3370 etc.
3371 * lib/abitset.c (struct abitset_struct, abitset,
3372 struct bitset_struct): Remove.
3373 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3374 struct bitset_struct): Remove.
3375 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3376 bitset_struct): Remove.
3377 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3378 Likewise.
3379
3380 Do not call a function of type T using a call that assumes the
3381 function is of a different type U. Standard C requires that a
3382 function must be called with a type that is compatible with its
3383 definition.
3384 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3385 New decls.
3386 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3387 New functions.
3388 * lib/ebitset.c (PFV): Remove.
3389 * lib/lbitset.c (PFV): Likewise.
3390 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3391 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3392 decls.
3393 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3394 (ebitset_vtable): Use them.
3395 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3396 lbitset_xor): New functions.
3397 (lbitset_vtable): Use them.
3398
3399 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3400 Declare.
3401
3402 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3403 GCC warning.
3404 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
3405 Use offsetof, for simplicity.
3406
3407 2002-10-06 Paul Eggert <eggert@twinsun.com>
3408
3409 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
3410 the same width as int. This reapplies a hunk of the 2002-08-12 patch
3411 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
3412 which was inadvertently undone by the 2002-09-30 patch.
3413 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
3414 the same width as int.
3415
3416 2002-10-04 Paul Eggert <eggert@twinsun.com>
3417
3418 Version 1.50.
3419
3420 * configure.ac (AC_INIT), NEWS: Increment version number.
3421
3422 * doc/bison.texinfo: Minor spelling, grammar, and white space
3423 fixes.
3424 (Symbols): Mention that any negative value returned from yylex
3425 signifies end-of-input. Warn about negative chars. Mention
3426 the portable Standard C character set.
3427
3428 The GNU coding standard says CFLAGS and YFLAGS are reserved
3429 for the installer to set.
3430 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
3431 * src/Makefile.am (AM_CFLAGS): Likewise.
3432 (AM_YFLAGS): Renamed from YFLAGS.
3433
3434 Fix some MAX and MIN problems.
3435 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
3436 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
3437 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
3438 * src/reader.c (reader): Use it.
3439
3440 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
3441 POSIX 1003.1-2001 has removed fgrep.
3442
3443 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3444
3445 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
3446 interpreted as signed.
3447 * lib/ebitset.c (ebitset_list): Fix bug.
3448
3449 2002-10-01 Paul Eggert <eggert@twinsun.com>
3450
3451 More fixes for 64-bit hosts and large bitsets.
3452
3453 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
3454 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
3455 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
3456 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
3457 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
3458 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
3459 bitset_count_): Likewise.
3460 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
3461 bitset_first, bitset_last): Likewise.
3462 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
3463 bitset_stats_list_reverse, bitset_stats_size,
3464 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
3465 Likewise.
3466 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3467 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3468 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3469 bitsetv_reflexive_transitive_closure): Likewise.
3470 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
3471 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
3472 Likewise.
3473 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
3474 Likewise.
3475
3476 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
3477 Use size_t, not unsigned int, to count bytes.
3478 * lib/abitset.h (abitset_bytes): Likewise.
3479 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
3480 Likewise.
3481 * lib/bitset.h (bitset_bytes): Likewise.
3482 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
3483 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
3484 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3485 * lib/ebitset.c (ebitset_bytes): Likewise.
3486 * lib/ebitset.h (ebitset_bytes): Likewise.
3487 * lib/lbitset.c (lbitset_bytes): Likewise.
3488 * lib/lbitset.h (lbitset_bytes): Likewise.
3489
3490 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
3491 abitset_subset_p, abitset_disjoint_p, abitset_and,
3492 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
3493 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
3494 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
3495 abitset_or_and, abitset_or_and_cmp):
3496 Use bitset_windex instead of unsigned int.
3497 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3498 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
3499 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
3500 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
3501 Likewise.
3502 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
3503
3504 * lib/bitset.c (bitset_print):
3505 Use proper printf formats for widths of integer types.
3506 * lib/bitset_stats.c (bitset_percent_histogram_print,
3507 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
3508 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3509 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3510 * lib/lbitset.c (lbitset_bytes): Likewise.
3511
3512 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
3513 BITSET_SIZE_MAX): New macros.
3514 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
3515 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
3516 to BITSET_WINDEX_MAX.
3517
3518 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
3519 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
3520 since we now return the bitset_bindex type (not int).
3521
3522 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
3523 when computing sizes.
3524 * lib/ebitset.c (ebitset_elts_grow): Likewise.
3525
3526 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
3527 and avoid cast to unsigned.
3528
3529 2002-09-30 Akim Demaille <akim@epita.fr>
3530
3531 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3532 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
3533 Updates from Michael Hayes.
3534
3535 2002-09-30 Art Haas <ahaas@neosoft.com>
3536
3537 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
3538 invocations.
3539 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
3540 defined.
3541
3542 2002-09-27 Akim Demaille <akim@epita.fr>
3543
3544 Version 1.49c.
3545
3546 2002-09-27 Akim Demaille <akim@epita.fr>
3547
3548 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
3549 (Because of AC_LIBSOURCE).
3550
3551 2002-09-27 Akim Demaille <akim@epita.fr>
3552
3553 Playing with Autoscan.
3554
3555 * configure.ac: Remove the old LIBOBJ tweaks.
3556 (AC_REPLACE_FUNCS): Add strrchr and strtol.
3557 * lib/strrchr.c: New.
3558 * lib/strtol.c: New, from the Coreutils 4.5.1.
3559
3560 2002-09-27 Akim Demaille <akim@epita.fr>
3561
3562 Playing with Autoscan.
3563
3564 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
3565 * lib/Makefile.am (libbison_a_SOURCES): No longer include
3566 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
3567 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
3568 Coreutils 4.5.1.
3569
3570 2002-09-24 Akim Demaille <akim@epita.fr>
3571
3572 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
3573 (Frequently Asked Questions, Parser Stack Overflow): New.
3574
3575 2002-09-13 Akim Demaille <akim@epita.fr>
3576
3577 Playing with autoscan.
3578
3579 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
3580 * src/files.c (skeleton_find): Remove, unused.
3581 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
3582 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
3583
3584 2002-09-13 Akim Demaille <akim@epita.fr>
3585
3586 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
3587 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
3588
3589 2002-09-13 Akim Demaille <akim@epita.fr>
3590
3591 * configure.ac: Require 2.54.
3592 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
3593 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
3594 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
3595 Remove, provided by Autoconf macros.
3596
3597 2002-09-12 Akim Demaille <akim@epita.fr>
3598
3599 * m4/prereq.m4: Update, from Coreutils 4.5.1.
3600
3601 2002-09-12 Akim Demaille <akim@epita.fr>
3602
3603 * m4/prereq.m4: Update, from Fileutils 4.1.5.
3604 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
3605 Reported by Martin Mokrejs.
3606
3607 2002-09-10 Akim Demaille <akim@epita.fr>
3608
3609 * src/parse-gram.y: Associate a human readable string to each
3610 token type.
3611 * tests/regression.at (Invalid inputs): Adjust.
3612
3613 2002-09-10 Gary V. Vaughan <gary@gnu.org>
3614
3615 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
3616 with an Autoconf-2.5x style configure.ac.
3617
3618 2002-09-06 Paul Eggert <eggert@twinsun.com>
3619
3620 * doc/bison.texinfo (Conditions): Make explicit that the GPL
3621 exception applies only to yacc.c. This is a modification of a
3622 patch originally suggested by Akim Demaille.
3623
3624 2002-09-06 Akim Demaille <akim@epita.fr>
3625
3626 * data/c.m4 (b4_copyright): Move the GPL exception comment from
3627 here to...
3628 * data/yacc.c: here.
3629
3630 * data/lalr1.cc (struct yyltype): Don't define it, since we use
3631 LocationType.
3632 (b4_ltype): Default to yy::Location from location.hh.
3633
3634 2002-09-04 Jim Meyering <jim@meyering.net>
3635
3636 * data/yacc.c: Guard the declaration of yytoknum also with
3637 `#ifdef YYPRINT', so it is declared only when used.
3638
3639 2002-09-04 Akim Demaille <akim@epita.fr>
3640
3641 * configure.in: Rename as...
3642 * configure.ac: this.
3643 Bump to 1.49c.
3644
3645 2002-09-04 Akim Demaille <akim@epita.fr>
3646
3647 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
3648 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
3649 translate maintainer only messages.
3650
3651 2002-08-12 Paul Eggert <eggert@twinsun.com>
3652
3653 Version 1.49b.
3654
3655 * Makefile.am (SUBDIRS): Remove intl.
3656 (DISTCLEANFILES): Remove.
3657 * NEWS: Mention that GNU M4 is now required. Clarify what is
3658 meant by "larger grammars". Mention the pt_BR translation.
3659 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
3660 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
3661 Bump version from 0.11.2 to 0.11.5.
3662 (BISON_PREREQ_STAGE): Remove.
3663 (AM_GNU_GETTEXT): Use external gettext.
3664 (AC_OUTPUT): Remove intl/Makefile.
3665
3666 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
3667
3668 * data/glr.c: Include string.h, for strlen.
3669 (yyreportParseError): Use size_t for yysize.
3670 (yy_yypstack): No longer nested inside yypstates, as nested
3671 functions are not portable. Do not assume size_t is the
3672 same width as int.
3673 (yypstates): Do not assume that ptrdiff_t is the same width
3674 as int, and similarly for yyposn and YYINDEX.
3675
3676 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
3677
3678 * lib/Makefile.am (INCLUDES): Do not include from the intl
3679 directory, which has been removed.
3680 * src/Makefile.am (INCLUDES): Likewise.
3681
3682 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
3683 (bitsets_sources, additional_bitsets_sources, timevars_sources):
3684 New vars.
3685
3686 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
3687 * tests/Makefile.am (EXTRA_DIST): Likewise.
3688
3689 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
3690 Do not assume that bitset_windex is the same width as unsigned.
3691
3692 * lib/abitset.c (abitset_unused_clear): Do not assume that
3693 bitset_word is the same width as int.
3694 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
3695 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
3696 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
3697 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
3698 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
3699
3700 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
3701 portability to one's complement hosts!).
3702 * lib/ebitset.c (ebitset_op1): Likewise.
3703 * lib/lbitset.c (lbitset_op1): Likewise.
3704
3705 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
3706 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3707 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
3708 Sync with fileutils.
3709 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
3710 lib/gettext.h: Sync with diffutils.
3711
3712 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
3713 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
3714
3715 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
3716 PROTOTYPES to check for prototypes, and "defined __STDC__" to
3717 check for void *.
3718
3719 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
3720 size_t; the old version tried to do this but casted improperly.
3721 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
3722 (bitset_test): Now returns int, not unsigned long.
3723
3724 * lib/bitset_stats.c: Include "gettext.h".
3725 (_): New macro.
3726 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
3727 name locals "index", as it generates unnecessary warnings on some
3728 hosts that have an "index" function.
3729
3730 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
3731 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
3732 they need translation.
3733 * src/LR0.c (state_list_append, new_itemsets, get_state,
3734 append_states, generate_states): Likewise.
3735 * src/assoc.c (assoc_to_string): Likewise.
3736 * src/closure.c (print_closure, set_firsts, closure): Likewise.
3737 * src/gram.c (grammar_dump): Likewise.
3738 * src/injections.c (injections_compute): Likewise.
3739 * src/lalr.c (lookaheads_print): Likewise.
3740 * src/relation.c (relation_transpose): Likewise.
3741 * src/scan-gram.l: Likewise.
3742 * src/tables.c (table_grow, pack_vector): Likewise.
3743
3744 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
3745 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
3746 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
3747 * m4/mbstate_t.m4: Sync with fileutils.
3748 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
3749
3750 * po/LINGUAS: Add pt_BR.
3751 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
3752 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
3753 lib/timevar.c.
3754 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
3755 manual recommends.
3756 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
3757
3758 * src/complain.c (strerror_r): Remove decl; not needed.
3759 (strerror): Use same pattern as ../lib/error.c.
3760
3761 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
3762
3763 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
3764
3765 * src/main.c (main): Cast result of bindtextdomain and textdomain
3766 to void, to avoid a GCC warning when --disable-nls is in effect.
3767
3768 * src/scan-gram.l: Use strings rather than escapes when possible,
3769 to minimize the number of warnings from xgettext.
3770 (handle_action_dollar, handle_action_at): Don't use isdigit,
3771 as it mishandles negative chars and it may not work as expected
3772 outside the C locale.
3773
3774 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
3775 this is a GCC extension and is not portable to other compilers.
3776
3777 * src/system.h (alloca): Use same pattern as ../lib/error.c.
3778 Do not include <ctype.h>; no longer needed.
3779 Do not include <malloc.h>; no longer needed (and generates
3780 warnings on OpenBSD 3.0).
3781
3782 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
3783 it's not portable.
3784
3785 * tests/regression.at: Do not use 'cc -c input.c -o input';
3786 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
3787
3788 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
3789 exit status as failure, not just exit status 1. Sun C exits
3790 with status 2 sometimes.
3791
3792 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
3793 Use it for the two large tests.
3794
3795 2002-08-02 Akim Demaille <akim@epita.fr>
3796
3797 * src/conflicts.c (conflicts_output): Don't output rules never
3798 reduced here, since anyway that computation doesn't work.
3799 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
3800 (rule_useless_p, rule_never_reduced_p): New.
3801 (grammar_rules_partial_print): Use a filter instead of a range.
3802 Display the title only if needed.
3803 (grammar_rules_print): Adjust.
3804 (grammar_rules_never_reduced_report): New.
3805 * src/tables.c (action_row): Move the computation of rules never
3806 reduced to...
3807 (token_actions): here.
3808 * src/main.c (main): Make the parser before making the report, so
3809 that rules never reduced are computed.
3810 Call grammar_rules_never_reduced_report.
3811 * src/print.c (print_results): Report rules never reduced.
3812 * tests/conflicts.at, tests/reduce.at: Adjust.
3813
3814 2002-08-01 Akim Demaille <akim@epita.fr>
3815
3816 Instead of attaching lookaheads and duplicating the rules being
3817 reduced by a state, attach the lookaheads to the reductions.
3818
3819 * src/state.h (state_t): Remove the `lookaheads',
3820 `lookaheads_rule' member.
3821 (reductions_t): Add a `lookaheads' member.
3822 Use a regular array for the `rules'.
3823 * src/state.c (reductions_new): Initialize the lookaheads member
3824 to 0.
3825 (state_rule_lookaheads_print): Adjust.
3826 * src/state.h, src/state.c (state_reductions_find): New.
3827 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
3828 (count_rr_conflicts): Adjust.
3829 * src/lalr.c (LArule): Remove.
3830 (add_lookback_edge): Adjust.
3831 (state_lookaheads_count): New.
3832 (states_lookaheads_initialize): Merge into...
3833 (initialize_LA): this.
3834 (lalr_free): Adjust.
3835 * src/main.c (main): Don't free nullable and derives too early: it
3836 is used by --verbose.
3837 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
3838
3839 2002-08-01 Akim Demaille <akim@epita.fr>
3840
3841 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
3842 `rule_number_t**'.
3843 (set_derives, free_derives): Rename as...
3844 (derives_compute, derives_free): this.
3845 Adjust all dependencies.
3846 * src/nullable.c (set_nullable, free_nullable): Rename as...
3847 (nullable_compute, nullable_free): these.
3848 (rule_list_t): Store rule_t *, not rule_number_t.
3849 * src/state.c (state_rule_lookaheads_print): Directly compare rule
3850 pointers, instead of their numbers.
3851 * src/main.c (main): Call nullable_free, and derives_free earlier,
3852 as they were lo longer used.
3853
3854 2002-08-01 Akim Demaille <akim@epita.fr>
3855
3856 * lib/timevar.c (get_time): Include children time.
3857 * src/lalr.h (LA, LArule): Don't export them: used with the
3858 state_t.
3859 * src/lalr.c (LA, LArule): Static.
3860 * src/lalr.h, src/lalr.c (lalr_free): New.
3861 * src/main.c (main): Call it.
3862 * src/tables.c (pack_vector): Check whether loc is >= to the
3863 table_size, not >.
3864 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3865 (tables_generate): do it, since that's also it which allocates
3866 them.
3867 Don't free LA and LArule, main does.
3868
3869 2002-07-31 Akim Demaille <akim@epita.fr>
3870
3871 Separate parser tables computation and output.
3872
3873 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3874 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3875 (yydefgoto, yydefact, high): Move to...
3876 * src/tables.h, src/tables.c: here.
3877 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3878 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3879 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3880 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3881 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3882 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3883 (action_row, save_row, token_actions, save_column, default_goto)
3884 (goto_actions, sort_actions, matching_state, pack_vector)
3885 (table_ninf_remap, pack_table, prepare_actions): Move to...
3886 * src/tables.c: here.
3887 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3888 * src/output.c (token_actions, output_base, output_conflicts)
3889 (output_check): Merge into...
3890 (prepare_actions): this.
3891 (actions_output): Rename as...
3892 (user_actions_output): this.
3893 * src/main.c (main): Call tables_generate and tables_free.
3894
3895 2002-07-31 Akim Demaille <akim@epita.fr>
3896
3897 Steal GCC's --time-report support.
3898
3899 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3900 stolen/adjusted from GCC.
3901 * m4/stage.m4: Remove time related checks.
3902 * m4/timevar.m4: New.
3903 * configure.in: Adjust.
3904 * src/system.h: Adjust to using timevar.h.
3905 * src/getargs.h, src/getargs.c: Support trace_time for
3906 --trace=time.
3907 * src/main.c (stage): Remove.
3908 (main): Replace `stage' invocations with timevar calls.
3909 * src/output.c: Insert pertinent timevar calls.
3910
3911 2002-07-31 Akim Demaille <akim@epita.fr>
3912
3913 Let --trace have arguments.
3914
3915 * src/getargs.h (enum trace_e): New.
3916 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3917 (long_options, short_options): --trace/-T takes an optional
3918 argument.
3919 Change all the uses of trace_flag to reflect the new flags.
3920 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3921
3922 Strengthen `stage' portability.
3923
3924 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3925 * configure.in: Use it.
3926 Don't check for malloc.h and sys/times.h.
3927 * src/system.h: Include them when appropriate.
3928 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3929 times and struct tms are available.
3930
3931 2002-07-30 Akim Demaille <akim@epita.fr>
3932
3933 In verbose parse error message, don't report `error' as an
3934 expected token.
3935 * tests/actions.at (Printers and Destructors): Adjust.
3936 * tests/calc.at (Calculator $1): Adjust.
3937 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3938 error message, do not report the parser accepts the error token in
3939 that state.
3940
3941 2002-07-30 Akim Demaille <akim@epita.fr>
3942
3943 Normalize conflict related messages.
3944
3945 * src/complain.h, src/complain.c (warn, complain): New.
3946 * src/conflicts.c (conflicts_print): Use them.
3947 (conflict_report_yacc): New, extracted from...
3948 (conflicts_print): here.
3949 * tests/conflicts.at, tests/existing.at: Adjust.
3950
3951 2002-07-30 Akim Demaille <akim@epita.fr>
3952
3953 Report rules which are never reduced by the parser: those hidden
3954 by conflicts.
3955
3956 * src/LR0.c (save_reductions): Don't make the final state too
3957 different: save its reduction (accept) instead of having a state
3958 without any action (no shift or goto, no reduce).
3959 Note: the final state is now a ``regular'' state, i.e., the
3960 parsers now contain `reduce 0' as default reduction.
3961 Nevertheless, since they decide to `accept' when yystate =
3962 final_state, they still will not reduce rule 0.
3963 * src/print.c (print_actions, print_reduction): Adjust.
3964 * src/output.c (action_row): Track reduced rules.
3965 (token_actions): Report rules never reduced.
3966 * tests/conflicts.at, tests/regression.at: Adjust.
3967
3968 2002-07-30 Akim Demaille <akim@epita.fr>
3969
3970 `stage' was accidently included in a previous patch.
3971 Initiate its autoconfiscation.
3972
3973 * configure.in: Look for malloc.h and sys/times.h.
3974 * src/main.c (stage): Adjust.
3975 Report only when trace_flag.
3976
3977 2002-07-29 Akim Demaille <akim@epita.fr>
3978
3979 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3980 state_number_t.
3981 (errs_t): symbol_t*, not symbol_number_t.
3982 (reductions_t): rule_t*, not rule_number_t.
3983 (FOR_EACH_SHIFT): New.
3984 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3985 * src/print.c, src/print_graph.c: Adjust.
3986
3987 2002-07-29 Akim Demaille <akim@epita.fr>
3988
3989 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3990
3991 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3992 (endtoken, accept): these.
3993 * src/reader.c (reader): Set endtoken's default tag to "$end".
3994 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3995 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3996 Adjust.
3997
3998 2002-07-29 Akim Demaille <akim@epita.fr>
3999
4000 * src/reduce.c (reduce_grammar): When the language is empty,
4001 complain about the start symbol, not the axiom.
4002 Use its location.
4003 * tests/reduce.at (Empty Language): New.
4004
4005 2002-07-26 Akim Demaille <akim@epita.fr>
4006
4007 * src/reader.h, src/reader.c (gram_error): ... can't get
4008 yycontrol without making too strong assumptions on the parser
4009 itself.
4010 * src/output.c (prepare_tokens): Use the real 0th value of
4011 token_translations instead of `0'.
4012 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
4013 visible here.
4014 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
4015 for the time being: %locations ought to provide it to yyerror.
4016
4017 2002-07-25 Akim Demaille <akim@epita.fr>
4018
4019 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
4020 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
4021 * tests/regression.at (Web2c Actions): Adjust.
4022
4023 2002-07-25 Akim Demaille <akim@epita.fr>
4024
4025 Stop storing rules from 1 to nrules + 1.
4026
4027 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
4028 * src/nullable.c, src/output.c, src/print.c, src/reader.c
4029 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
4030 Iterate from 0 to nrules.
4031 Use rule_number_as_item_number and item_number_as_rule_number.
4032 Adjust to `derive' now containing possibly 0.
4033 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
4034 Handle the `- 1' part in rule numbers from/to item numbers.
4035 * src/conflicts.c (log_resolution): Fix the message which reversed
4036 shift and reduce.
4037 * src/output.c (action_row): Initialize default_rule to -1.
4038 (token_actions): Adjust.
4039 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
4040 expected output.
4041 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
4042
4043 2002-07-25 Akim Demaille <akim@epita.fr>
4044
4045 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
4046 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
4047 (b4_c_knr_arg_decl): New.
4048 * data/yacc.c: Use it to define yysymprint, yydestruct, and
4049 yyreport_parse_error.
4050
4051 2002-07-25 Akim Demaille <akim@epita.fr>
4052
4053 * data/yacc.c (yyreport_parse_error): New, extracted from...
4054 (yyparse): here.
4055 (yydestruct, yysymprint): Move above yyparse.
4056 Be K&R compliant.
4057
4058 2002-07-25 Akim Demaille <akim@epita.fr>
4059
4060 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
4061 replace...
4062 (b4_sint_type, b4_uint_type): these.
4063 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
4064 * tests/regression.at (Web2c Actions): Adjust.
4065
4066 2002-07-25 Akim Demaille <akim@epita.fr>
4067
4068 * src/gram.h (TIEM_NUMBER_MAX): New.
4069 (item_number_of_rule_number, rule_number_of_item_number): Rename
4070 as...
4071 (rule_number_as_item_number, item_number_as_rule_number): these.
4072 Adjust dependencies.
4073 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4074 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4075 (symbol_number_to_vector_number): New.
4076 (order): Of vector_number_t* type.
4077 (base_t, BASE_MAX, BASE_MIN): New.
4078 (froms, tos, width, pos, check): Of base_t type.
4079 (action_number_t, ACTION_MIN, ACTION_MAX): New.
4080 (actrow): Of action_number_t type.
4081 (conflrow): Of unsigned int type.
4082 (table_ninf, base_ninf): New.
4083 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
4084 (muscle_insert_int_table, muscle_insert_base_table)
4085 (muscle_insert_rule_number_table): New.
4086 (prepare_tokens): Output `toknum' as int_table.
4087 (action_row): Returns a rule_number_t.
4088 Use ACTION_MIN, not SHRT_MIN.
4089 (token_actions): yydefact is rule_number_t*.
4090 (table_ninf_remap): New.
4091 (pack_table): Use it for `base' and `table'.
4092 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
4093 replaced with...
4094 (YYPACT_NINF, YYTABLE_NINF): these.
4095 (yypact, yytable): Compute their types instead of hard-coded
4096 `short'.
4097 * tests/regression.at (Web2c Actions): Adjust.
4098
4099 2002-07-19 Akim Demaille <akim@epita.fr>
4100
4101 * src/scan-gram.l (id): Can start with an underscore.
4102
4103 2002-07-16 Akim Demaille <akim@epita.fr>
4104
4105 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
4106 Adjust all former `associativity' dependencies.
4107 * src/symtab.c (symbol_new): Default associativity is `undef', not
4108 `right'.
4109 (symbol_check_alias_consistence): Adjust.
4110
4111 2002-07-09 Akim Demaille <akim@epita.fr>
4112
4113 * doc/bison.texinfo: Properly set the ``header'' part.
4114 Use @dircategory ``GNU programming tools'' as per Texinfo's
4115 documentation.
4116 Use @copying.
4117
4118 2002-07-09 Akim Demaille <akim@epita.fr>
4119
4120 * lib/quotearg.h: Protect against multiple inclusions.
4121 * src/location.h (location_t): Add a `file' member.
4122 (LOCATION_RESET, LOCATION_PRINT): Adjust.
4123 * src/complain.c (warn_at, complain_at, fatal_at): Drop
4124 `error_one_per_line' support.
4125
4126 2002-07-09 Akim Demaille <akim@epita.fr>
4127
4128 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
4129 * src/reader.c (lineno): Remove.
4130 Adjust all dependencies.
4131 (get_merge_function): Take a location and use complain_at.
4132 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
4133 * tests/regression.at (Invalid inputs, Mixing %token styles):
4134 Adjust.
4135
4136 2002-07-09 Akim Demaille <akim@epita.fr>
4137
4138 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
4139 recovery rule, and forbid extensions when --yacc.
4140 (gram_error): Use complain_at.
4141 * src/reader.c (reader): Exit if there were parse errors.
4142
4143 2002-07-09 Akim Demaille <akim@epita.fr>
4144
4145 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
4146 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
4147 Reported by R Blake <blakers@mac.com>.
4148
4149 2002-07-09 Akim Demaille <akim@epita.fr>
4150
4151 * data/yacc.c: Output the copyright notive in the header.
4152
4153 2002-07-03 Akim Demaille <akim@epita.fr>
4154
4155 * src/output.c (froms, tos): Are state_number_t.
4156 (save_column): sp, sp1, and sp2 are state_number_t.
4157 (prepare): Rename `final' as `final_state_number', `nnts' as
4158 `nterms_number', `nrules' as `rules_number', `nstates' as
4159 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
4160 unused.
4161 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
4162 * data/lalr1.cc (nsym_): Remove, unused.
4163
4164 2002-07-03 Akim Demaille <akim@epita.fr>
4165
4166 * src/lalr.h, src/lalr.c (goto_number_t): New.
4167 * src/lalr.c (goto_list_t): New.
4168 Propagate them.
4169 * src/nullable.c (rule_list_t): New.
4170 Propagate.
4171 * src/types.h: Remove.
4172
4173 2002-07-03 Akim Demaille <akim@epita.fr>
4174
4175 * src/closure.c (print_fderives): Use rule_rhs_print.
4176 * src/derives.c (print_derives): Use rule_rhs_print.
4177 (rule_list_t): New, replaces `shorts'.
4178 (set_derives): Add comments.
4179 * tests/sets.at (Nullable, Firsts): Adjust.
4180
4181 2002-07-03 Akim Demaille <akim@epita.fr>
4182
4183 * src/output.c (prepare_actions): Free `tally' and `width'.
4184 (prepare_actions): Allocate and free `order'.
4185 * src/symtab.c (symbols_free): Free `symbols'.
4186 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
4187 * src/output.c (m4_invoke): Move to...
4188 * src/scan-skel.l: here.
4189 (<<EOF>>): Close yyout, and free its name.
4190
4191 2002-07-03 Akim Demaille <akim@epita.fr>
4192
4193 Fix some memory leaks, and fix a bug: state 0 was examined twice.
4194
4195 * src/LR0.c (new_state): Merge into...
4196 (state_list_append): this.
4197 (new_states): Merge into...
4198 (generate_states): here.
4199 (set_states): Don't ensure a proper `errs' state member here, do it...
4200 * src/conflicts.c (conflicts_solve): here.
4201 * src/state.h, src/state.c: Comment changes.
4202 (state_t): Rename member `shifts' as `transitions'.
4203 Adjust all dependencies.
4204 (errs_new): For consistency, also take the values as argument.
4205 (errs_dup): Remove.
4206 (state_errs_set): New.
4207 (state_reductions_set, state_transitions_set): Assert that no
4208 previous value was assigned.
4209 (state_free): New.
4210 (states_free): Use it.
4211 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
4212 temporary storage: use `errs' and `nerrs' as elsewhere.
4213 (set_conflicts): Allocate and free this `errs'.
4214
4215 2002-07-02 Akim Demaille <akim@epita.fr>
4216
4217 * lib/libiberty.h: New.
4218 * lib: Update the bitset implementation from upstream.
4219 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
4220 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
4221 * src/main.c: Adjust bitset stats calls.
4222
4223 2002-07-01 Paul Eggert <eggert@twinsun.com>
4224
4225 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
4226 char, so that negative chars don't collide with $.
4227
4228 2002-06-30 Akim Demaille <akim@epita.fr>
4229
4230 Have the GLR tests be `warning' checked, and fix the warnings.
4231
4232 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
4233 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
4234 (yyremoveDeletes): `yyi' and `yyj' are size_t.
4235 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
4236 (yyaddDeferredAction): static.
4237 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
4238 (yyreportParseError): yyprefix is const.
4239 yytokenp is used only when verbose.
4240 (yy__GNUC__): Replace with __GNUC__.
4241 (yypdumpstack): yyi is size_t.
4242 (yypreference): Un-yy local variables and arguments, to avoid
4243 clashes with `yyr1'. Anyway, we are not in the user name space.
4244 (yytname_size): be an int, as is compared with ints.
4245 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
4246 Use them.
4247 * tests/cxx-gram.at: Use quotation to protect $1.
4248 Use AT_COMPILE to enable warnings hunts.
4249 Prototype yylex and yyerror.
4250 `Use' argc.
4251 Include `string.h', not `strings.h'.
4252 Produce and prototype stmtMerge only when used.
4253 yylex takes a location.
4254
4255 2002-06-30 Akim Demaille <akim@epita.fr>
4256
4257 We spend a lot of time in quotearg, in particular when --verbose.
4258
4259 * src/symtab.c (symbol_get): Store a quoted version of the key.
4260 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
4261 Adjust all callers.
4262
4263 2002-06-30 Akim Demaille <akim@epita.fr>
4264
4265 * src/state.h (reductions_t): Rename member `nreds' as num.
4266 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
4267 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
4268
4269 2002-06-30 Akim Demaille <akim@epita.fr>
4270
4271 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
4272 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
4273 (shifts_to): Rename as...
4274 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
4275 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
4276 (TRANSITION_IS_DISABLED, transitions_to): these.
4277
4278 2002-06-30 Akim Demaille <akim@epita.fr>
4279
4280 * src/print.c (print_shifts, print_gotos): Merge into...
4281 (print_transitions): this.
4282 (print_transitions, print_errs, print_reductions): Align the
4283 lookaheads columns.
4284 (print_core, print_transitions, print_errs, print_state,
4285 print_grammar): Output empty lines separator before, not after.
4286 (state_default_rule_compute): Rename as...
4287 (state_default_rule): this.
4288 * tests/conflicts.at (Defaulted Conflicted Reduction),
4289 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
4290 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
4291
4292 2002-06-30 Akim Demaille <akim@epita.fr>
4293
4294 Display items as we display rules.
4295
4296 * src/gram.h, src/gram.c (rule_lhs_print): New.
4297 * src/gram.c (grammar_rules_partial_print): Use it.
4298 * src/print.c (print_core): Likewise.
4299 * tests/conflicts.at (Defaulted Conflicted Reduction),
4300 (Unresolved SR Conflicts): Adjust.
4301 (Unresolved SR Conflicts): Adjust and rename as...
4302 (Resolved SR Conflicts): this, as was meant.
4303 * tests/regression.at (Web2c Report): Adjust.
4304
4305 2002-06-30 Akim Demaille <akim@epita.fr>
4306
4307 * src/print.c (state_default_rule_compute): New, extracted from...
4308 (print_reductions): here.
4309 Pessimize, but clarify the code.
4310 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
4311
4312 2002-06-30 Akim Demaille <akim@epita.fr>
4313
4314 * src/output.c (action_row): Let default_rule be always a rule
4315 number.
4316
4317 2002-06-30 Akim Demaille <akim@epita.fr>
4318
4319 * src/closure.c (print_firsts, print_fderives, closure):
4320 Use BITSET_EXECUTE.
4321 * src/lalr.c (lookaheads_print): Likewise.
4322 * src/state.c (state_rule_lookaheads_print): Likewise.
4323 * src/print_graph.c (print_core): Likewise.
4324 * src/print.c (print_reductions): Likewise.
4325 * src/output.c (action_row): Likewise.
4326 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4327
4328 2002-06-30 Akim Demaille <akim@epita.fr>
4329
4330 * src/print_graph.c: Use report_flag.
4331
4332 2002-06-30 Akim Demaille <akim@epita.fr>
4333
4334 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4335 to...
4336 * src/relation.h, src/relation.c (traverse, relation_digraph)
4337 (relation_print, relation_transpose): New.
4338
4339 2002-06-30 Akim Demaille <akim@epita.fr>
4340
4341 * src/state.h, src/state.c (shifts_to): New.
4342 * src/lalr.c (build_relations): Use it.
4343
4344 2002-06-30 Akim Demaille <akim@epita.fr>
4345
4346 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4347 (item_number_of_rule_number, rule_number_of_item_number): New.
4348 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4349 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4350 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4351 Propagate their use.
4352 Much remains to be done, in particular wrt `shorts' from types.h.
4353
4354 2002-06-30 Akim Demaille <akim@epita.fr>
4355
4356 * src/symtab.c (symbol_new): Initialize the `printer' member.
4357
4358 2002-06-30 Akim Demaille <akim@epita.fr>
4359
4360 * src/LR0.c (save_reductions): Remove, replaced by...
4361 * src/state.h, src/state.c (state_reductions_set): New.
4362 (reductions, errs): Rename as...
4363 (reductions_t, errs_t): these.
4364 Adjust all dependencies.
4365
4366 2002-06-30 Akim Demaille <akim@epita.fr>
4367
4368 * src/LR0.c (state_list_t, state_list_append): New.
4369 (first_state, last_state): Now symbol_list_t.
4370 (this_state): Remove.
4371 (new_itemsets, append_states, save_reductions): Take a state_t as
4372 argument.
4373 (set_states, generate_states): Adjust.
4374 (save_shifts): Remove, replaced by...
4375 * src/state.h, src/state.c (state_shifts_set): New.
4376 (shifts): Rename as...
4377 (shifts_t): this.
4378 Adjust all dependencies.
4379 * src/state.h (state_t): Remove the `next' member.
4380
4381 2002-06-30 Akim Demaille <akim@epita.fr>
4382
4383 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4384 escaped in slot 0.
4385
4386 2002-06-30 Akim Demaille <akim@epita.fr>
4387
4388 Use hash.h for the state hash table.
4389
4390 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4391 (allocate_storage): Use state_hash_new.
4392 (free_storage): Use state_hash_free.
4393 (new_state, get_state): Adjust.
4394 * src/lalr.h, src/lalr.c (states): Move to...
4395 * src/states.h (state_t): Remove the `link' member, no longer
4396 used.
4397 * src/states.h, src/states.c: here.
4398 (state_hash_new, state_hash_free, state_hash_lookup)
4399 (state_hash_insert, states_free): New.
4400 * src/states.c (state_table, state_compare, state_hash): New.
4401 * src/output.c (output_actions): Do not free states now, since we
4402 still need to know the final_state number in `prepare', called
4403 afterwards. Do it...
4404 * src/main.c (main): here: call states_free after `output'.
4405
4406 2002-06-30 Akim Demaille <akim@epita.fr>
4407
4408 * src/state.h, src/state.c (state_new): New, extracted from...
4409 * src/LR0.c (new_state): here.
4410 * src/state.h (STATE_ALLOC): Move to...
4411 * src/state.c: here.
4412 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
4413 * src/state.h, src/state.c: here.
4414
4415 2002-06-30 Akim Demaille <akim@epita.fr>
4416
4417 * src/reader.c (gensym): Rename as...
4418 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
4419 (getsym): Rename as...
4420 (symbol_get): this.
4421
4422 2002-06-30 Akim Demaille <akim@epita.fr>
4423
4424 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
4425 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
4426 * src/output.c, src/print.c, src/print_graph.c: Propagate.
4427 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
4428
4429 2002-06-30 Akim Demaille <akim@epita.fr>
4430
4431 Make the test suite pass with warnings checked.
4432
4433 * tests/actions.at (Printers and Destructors): Improve.
4434 Avoid unsigned vs. signed issues.
4435 * tests/calc.at: Don't exercise the scanner here, do it...
4436 * tests/input.at (Torturing the Scanner): here.
4437
4438 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4439
4440 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
4441 reorganize first lines parallel to yacc.c.
4442
4443 2002-06-28 Akim Demaille <akim@epita.fr>
4444
4445 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
4446 (b4_token_enum, b4_token_defines): New, factored from...
4447 * data/lalr1.cc, data/yacc.c, glr.c: here.
4448
4449 2002-06-28 Akim Demaille <akim@epita.fr>
4450
4451 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
4452 unused variables.
4453 * src/output.c (merger_output): static.
4454
4455 2002-06-28 Akim Demaille <akim@epita.fr>
4456
4457 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
4458 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
4459 pacify GCC.
4460 * src/output.c (save_row): Initialize all the variables to pacify GCC.
4461
4462 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4463
4464 Accumulated changelog for new GLR parsing features.
4465
4466 * src/conflicts.c (count_total_conflicts): Change name to
4467 conflicts_total_count.
4468 * src/conflicts.h: Ditto.
4469 * src/output.c (token_actions): Use the new name.
4470 (output_conflicts): Change conflp => conflict_list_heads, and
4471 confl => conflict_list for better readability.
4472 * data/glr.c: Use the new names.
4473 * NEWS: Add self to GLR announcement.
4474
4475 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
4476
4477 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
4478 Akim Demaille.
4479
4480 * data/bison.glr: Change name to glr.c
4481 * data/glr.c: Renamed from bison.glr.
4482 * data/Makefile.am: Add glr.c
4483
4484 * src/getargs.c:
4485
4486 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
4487 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
4488
4489 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4490
4491 * data/bison.glr: Be sure to restore the
4492 current #line when returning to the skeleton contents after having
4493 exposed the input file's #line.
4494
4495 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4496
4497 * data/bison.glr: Bring up to date with changes to bison.simple.
4498
4499 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4500
4501 * data/bison.glr: Correct definitions that use b4_prefix.
4502 Various reformatting.
4503 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
4504 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
4505 yytokenp argument; now part of stack.
4506 (yychar): Define to behave as documented.
4507 (yyclearin): Ditto.
4508
4509 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4510
4511 * src/reader.h: Add declaration for free_merger_functions.
4512
4513 * src/reader.c (merge_functions): New variable.
4514 (get_merge_function): New function.
4515 (free_merger_functions): New function.
4516 (readgram): Check for %prec that is not followed by a symbol.
4517 Handle %dprec and %merge declarations.
4518 (packgram): Initialize dprec and merger fields in rules array.
4519
4520 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
4521 conflict_list_cnt, conflict_list_free): New variables.
4522 (table_grow): Also grow conflict_table.
4523 (prepare_rules): Output dprec and merger tables.
4524 (conflict_row): New function.
4525 (action_row): Output conflict lists for GLR parser. Don't use
4526 default reduction in conflicted states for GLR parser so that there
4527 are spaces for the conflict lists.
4528 (save_row): Also save conflict information.
4529 (token_actions): Allocate conflict list.
4530 (merger_output): New function.
4531 (pack_vector): Pack conflict table, too.
4532 (output_conflicts): New function to output yyconflp and yyconfl.
4533 (output_check): Allocate conflict_tos.
4534 (output_actions): Output conflict tables, also.
4535 (output_skeleton): Output b4_mergers definition.
4536 (prepare): Output b4_max_rhs_length definition.
4537 Use 'bison.glr' as default skeleton for GLR parsers.
4538
4539 * src/gram.c (glr_parser): New flag.
4540 (grammar_free): Call free_merger_functions.
4541
4542 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
4543 all pairs of conflicting reductions, rather than just all tokens
4544 causing conflicts. Needed to size conflict tables.
4545 (conflicts_output): Modify call to count_rr_conflicts for new
4546 interface.
4547 (conflicts_print): Ditto.
4548 (count_total_conflicts): New function.
4549
4550 * src/reader.h (merger_list): New type.
4551 (merge_functions): New variable.
4552
4553 * src/lex.h (tok_dprec, tok_merge): New token types.
4554
4555 * src/gram.h (rule_s): Add dprec and merger fields.
4556 (glr_parser): New flag.
4557
4558 * src/conflicts.h (count_total_conflicts): New function.
4559
4560 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
4561
4562 * doc/bison.texinfo (Generalized LR Parsing): New section.
4563 (GLR Parsers): New section.
4564 (Language and Grammar): Mention GLR parsing.
4565 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
4566 Correct typo ("tge" -> "the").
4567
4568 * data/bison.glr: New skeleton for GLR parsing.
4569
4570 * tests/cxx-gram.at: New tests for GLR parsing.
4571
4572 * tests/testsuite.at: Include cxx-gram.at.
4573
4574 * tests/Makefile.am: Add cxx-gram.at.
4575
4576 * src/parse-gram.y:
4577
4578 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
4579
4580 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
4581
4582 2002-06-27 Akim Demaille <akim@epita.fr>
4583
4584 * src/options.h, src/options.c: Remove.
4585 * src/getargs.c (short_options, long_options): New.
4586
4587 2002-06-27 Akim Demaille <akim@epita.fr>
4588
4589 * data/bison.simple, data/bison.c++: Rename as...
4590 * data/yacc.c, data/lalr1.cc: these.
4591 * doc/bison.texinfo (Environment Variables): Remove.
4592
4593 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
4594
4595 * src/getargs.c (report_argmatch): Initialize strtok().
4596
4597 2002-06-20 Akim Demaille <akim@epita.fr>
4598
4599 * data/bison.simple (b4_symbol_actions): New, replaces...
4600 (b4_symbol_destructor, b4_symbol_printer): these.
4601 (yysymprint): Be sure to call YYPRINT only for tokens, and using
4602 user token numbers.
4603
4604 2002-06-20 Akim Demaille <akim@epita.fr>
4605
4606 * data/bison.simple (yydestructor): Rename as...
4607 (yydestruct): this.
4608
4609 2002-06-20 Akim Demaille <akim@epita.fr>
4610
4611 * src/symtab.h, src/symtab.c (symbol_type_set)
4612 (symbol_destructor_set, symbol_precedence_set): The location is
4613 the last argument.
4614 Adjust all callers.
4615
4616 2002-06-20 Akim Demaille <akim@epita.fr>
4617
4618 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
4619 internals.
4620 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
4621 Takes a location.
4622 * src/symtab.h, src/symtab.c (symbol_class_set)
4623 (symbol_user_token_number_set): Likewise.
4624 Adjust all callers.
4625 Promote complain_at.
4626 * tests/input.at (Type Clashes): Adjust.
4627
4628 2002-06-20 Akim Demaille <akim@epita.fr>
4629
4630 * data/bison.simple (YYLEX): Fix the declaration when
4631 %pure-parser.
4632
4633 2002-06-20 Akim Demaille <akim@epita.fr>
4634
4635 * data/bison.simple (yysymprint): Don't print the token number,
4636 just its name.
4637 * tests/actions.at (Destructors): Rename as...
4638 (Printers and Destructors): this.
4639 Also exercise %printer.
4640
4641 2002-06-20 Akim Demaille <akim@epita.fr>
4642
4643 * data/bison.simple (YYDSYMPRINT): New.
4644 Use it to remove many of the #if YYDEBUG/if (yydebug).
4645
4646 2002-06-20 Akim Demaille <akim@epita.fr>
4647
4648 * src/symtab.h, src/symtab.c (symbol_t): printer and
4649 printer_location are new members.
4650 (symbol_printer_set): New.
4651 * src/parse-gram.y (PERCENT_PRINTER): New token.
4652 Handle its associated rule.
4653 * src/scan-gram.l: Adjust.
4654 (handle_destructor_at, handle_destructor_dollar): Rename as...
4655 (handle_symbol_code_at, handle_symbol_code_dollar): these.
4656 * src/output.c (symbol_printers_output): New.
4657 (output_skeleton): Call it.
4658 * data/bison.simple (yysymprint): New. Cannot be named yyprint
4659 since there are already many grammar files with a user `yyprint'.
4660 Replace the calls to YYPRINT to calls to yysymprint.
4661 * tests/calc.at: Adjust.
4662 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
4663 taking advantage of parser very internal details (stack size!).
4664
4665 2002-06-20 Akim Demaille <akim@epita.fr>
4666
4667 * src/scan-gram.l: Complete the scanner with the missing patterns
4668 to pacify Flex.
4669 Use `quote' and `symbol_tag_get' where appropriate.
4670
4671 2002-06-19 Akim Demaille <akim@epita.fr>
4672
4673 * tests/actions.at (Destructors): Augment to test locations.
4674 * data/bison.simple (yydestructor): Pass it the current location
4675 if locations are enabled.
4676 Prototype only when __STDC__ or C++.
4677 Change the argument names to move into the yy name space: there is
4678 user code here.
4679
4680 2002-06-19 Akim Demaille <akim@epita.fr>
4681
4682 * data/bison.simple (b4_pure_if): New.
4683 Use it instead of #ifdef YYPURE.
4684
4685 2002-06-19 Akim Demaille <akim@epita.fr>
4686
4687 * data/bison.simple (b4_location_if): New.
4688 Use it instead of #ifdef YYLSP_NEEDED.
4689
4690 2002-06-19 Akim Demaille <akim@epita.fr>
4691
4692 Prepare @$ in %destructor, but currently don't bind it in the
4693 skeleton, as %location use is not cleaned up yet.
4694
4695 * src/scan-gram.l (handle_dollar, handle_destructor_at)
4696 (handle_action_at): New.
4697 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
4698 a braced_code_t and a location as additional arguments.
4699 (handle_destructor_dollar): Instead of requiring `b4_eval', just
4700 unquote one when outputting `b4_dollar_dollar'.
4701 Adjust callers.
4702 * data/bison.simple (b4_eval): Remove.
4703 (b4_symbol_destructor): Adjust.
4704 * tests/input.at (Invalid @n): Adjust.
4705
4706 2002-06-19 Zack Weinberg <zack@codesourcery.com>
4707
4708 * doc/bison.texinfo: Document ability to have multiple
4709 prologue sections.
4710
4711 2002-06-18 Akim Demaille <akim@epita.fr>
4712
4713 * src/files.c (compute_base_names): When computing the output file
4714 names from the input file name, strip the directory part.
4715
4716 2002-06-18 Akim Demaille <akim@epita.fr>
4717
4718 * data/bison.simple.new: Comment changes.
4719 Reported by Andreas Schwab.
4720
4721 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
4722
4723 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
4724 there are no `label `yyoverflowlab' defined but not used' warnings
4725 when yyoverflow is defined.
4726
4727 2002-06-18 Akim Demaille <akim@epita.fr>
4728
4729 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
4730 new member.
4731 (symbol_destructor_set): Adjust.
4732 * src/output.c (symbol_destructors_output): Output the destructor
4733 locations.
4734 Output the symbol name.
4735 * data/bison.simple (b4_symbol_destructor): Adjust.
4736
4737 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
4738 and Akim Demaille <akim@epita.fr>
4739
4740 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
4741 what's left on the stack when the error recovery hits EOF.
4742 * tests/actions.at (Destructors): Complete to exercise this case.
4743
4744 2002-06-17 Akim Demaille <akim@epita.fr>
4745
4746 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
4747 arguments is really empty, not only equal to `[]'.
4748 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
4749 member.
4750 (symbol_destructor_set): New.
4751 * src/output.c (symbol_destructors_output): New.
4752 * src/reader.h (brace_code_t, current_braced_code): New.
4753 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
4754 (handle_dollar): Rename as...
4755 (handle_action_dollar): this.
4756 (handle_destructor_dollar): New.
4757 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
4758 (grammar_declaration): Use it.
4759 * data/bison.simple (yystos): Is always defined.
4760 (yydestructor): New.
4761 * tests/actions.at (Destructors): New.
4762 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
4763
4764 2002-06-17 Akim Demaille <akim@epita.fr>
4765
4766 * src/symlist.h, src/symlist.c (symbol_list_length): New.
4767 * src/scan-gram.l (handle_dollar, handle_at): Compute the
4768 rule_length only when needed.
4769 * src/output.c (actions_output, token_definitions_output): Output
4770 the full M4 block.
4771 * src/symtab.c: Don't access directly to the symbol tag, use
4772 symbol_tag_get.
4773 * src/parse-gram.y: Use symbol_list_free.
4774
4775 2002-06-17 Akim Demaille <akim@epita.fr>
4776
4777 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
4778 (symbol_list_prepend, get_type_name): Move to...
4779 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
4780 (symbol_list_prepend, symbol_list_n_type_name_get): here.
4781 Adjust all callers.
4782 (symbol_list_free): New.
4783 * src/scan-gram.l (handle_dollar): Takes a location.
4784 * tests/input.at (Invalid $n): Adjust.
4785
4786 2002-06-17 Akim Demaille <akim@epita.fr>
4787
4788 * src/reader.h, src/reader.c (symbol_list_new): Export it.
4789 (symbol_list_prepend): New.
4790 * src/parse-gram.y (%union): `list' is a new member.
4791 (symbols.1): New, replaces...
4792 (terms_to_prec.1, nterms_to_type.1): these.
4793 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
4794 Take a location as additional argument.
4795 Adjust all callers.
4796
4797 2002-06-15 Akim Demaille <akim@epita.fr>
4798
4799 * src/parse-gram.y: Move %token in the declaration section so that
4800 we don't depend upon CVS Bison.
4801
4802 2002-06-15 Akim Demaille <akim@epita.fr>
4803
4804 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
4805 * src/print.c (print_core): Use it.
4806
4807 2002-06-15 Akim Demaille <akim@epita.fr>
4808
4809 * src/conflicts.c (log_resolution): Accept the rule involved in
4810 the sr conflicts instead of the lookahead number that points to
4811 that rule.
4812 (flush_reduce): Accept the current lookahead vector as argument,
4813 instead of the index in LA.
4814 (resolve_sr_conflict): Accept the current number of lookahead
4815 bitset to consider for the STATE, instead of the index in LA.
4816 (set_conflicts): Adjust.
4817 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
4818
4819 2002-06-15 Akim Demaille <akim@epita.fr>
4820
4821 * src/state.h (state_t): Replace the `lookaheadsp' member, a
4822 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
4823 Adjust all dependencies.
4824 * src/lalr.c (initialize_lookaheads): Split into...
4825 (states_lookaheads_count, states_lookaheads_initialize): these.
4826 (lalr): Adjust.
4827
4828 2002-06-15 Akim Demaille <akim@epita.fr>
4829
4830 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
4831 out of...
4832 (grammar_rules_print): here.
4833 * src/reduce.c (reduce_output): Use it.
4834 * tests/reduce.at (Useless Rules, Reduced Automaton)
4835 (Underivable Rules): Adjust.
4836
4837 2002-06-15 Akim Demaille <akim@epita.fr>
4838
4839 Copy BYacc's nice way to report the grammar.
4840
4841 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
4842 New.
4843 Don't print the rules' location, it is confusing and useless.
4844 (rule_print): Use grammar_rhs_print.
4845 * src/print.c (print_grammar): Use grammar_rules_print.
4846
4847 2002-06-15 Akim Demaille <akim@epita.fr>
4848
4849 Complete and rationalize `useless thing' warnings.
4850
4851 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
4852 (symbol_tag_print): New.
4853 Use them everywhere in place of accessing directly the tag member.
4854 * src/gram.h, src/gram.c (rule_print): New.
4855 Use it where a rule used to be printed `by hand'.
4856 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
4857 (reduce_grammar_tables): Report the useless rules.
4858 (reduce_print): Useless things are a warning, not an error.
4859 Report it as such.
4860 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4861 (Reduced Automaton, Underivable Rules): Adjust.
4862 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4863 * tests/conflicts.at (Unresolved SR Conflicts)
4864 (Solved SR Conflicts): Adjust.
4865
4866 2002-06-15 Akim Demaille <akim@epita.fr>
4867
4868 Let symbols have a location.
4869
4870 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4871 (getsym): Adjust.
4872 Adjust all callers.
4873 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4874 Use location_t, not int.
4875 * src/symtab.c (symbol_check_defined): Take advantage of the
4876 location.
4877 * tests/regression.at (Invalid inputs): Adjust.
4878
4879 2002-06-15 Akim Demaille <akim@epita.fr>
4880
4881 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4882 (input): Don't try to initialize yylloc here, do it in the
4883 scanner.
4884 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4885 * src/gram.h (rule_t): Change line and action_line into location
4886 and action_location, of location_t type.
4887 Adjust all dependencies.
4888 * src/location.h, src/location.c (empty_location): New.
4889 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4890 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4891 (grammar_current_rule_symbol_append)
4892 (grammar_current_rule_action_append): Expect a location as argument.
4893 * src/reader.c (grammar_midrule_action): Adjust to attach an
4894 action's location as dummy symbol location.
4895 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4896 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4897 the line numbers.
4898
4899 2002-06-14 Akim Demaille <akim@epita.fr>
4900
4901 Grammar declarations may be found in the grammar section.
4902
4903 * src/parse-gram.y (rules_or_grammar_declaration): New.
4904 (declarations): Each declaration may end with a semicolon, not
4905 just...
4906 (grammar_declaration): `"%union"'.
4907 (grammar): Branch to rules_or_grammar_declaration.
4908
4909 2002-06-14 Akim Demaille <akim@epita.fr>
4910
4911 * src/main.c (main): Invoke scanner_free.
4912
4913 2002-06-14 Akim Demaille <akim@epita.fr>
4914
4915 * src/output.c (m4_invoke): Extracted from...
4916 (output_skeleton): here.
4917 Free tempfile.
4918
4919 2002-06-14 Akim Demaille <akim@epita.fr>
4920
4921 * src/parse-gram.y (directives, directive, gram)
4922 (grammar_directives, precedence_directives, precedence_directive):
4923 Rename as...
4924 (declarations, declaration, grammar, grammar_declaration)
4925 (precedence_declaration, precedence_declarator): these.
4926 (symbol_declaration): New.
4927
4928 2002-06-14 Akim Demaille <akim@epita.fr>
4929
4930 * src/files.c (action_obstack): Remove, unused.
4931 (output_obstack): Remove it, and all its dependencies, as it is no
4932 longer needed.
4933 * src/reader.c (epilogue_set): Build the epilogue in the
4934 muscle_obstack.
4935 * src/output.h, src/output.c (muscle_obstack): Move to...
4936 * src/muscle_tab.h, src/muscle_tab.h: here.
4937 (muscle_init): Initialize muscle_obstack.
4938 (muscle_free): New.
4939 * src/main.c (main): Call it.
4940
4941 2002-06-14 Akim Demaille <akim@epita.fr>
4942
4943 * src/location.h: New, extracted from...
4944 * src/reader.h: here.
4945 * src/Makefile.am (noinst_HEADERS): Merge into
4946 (bison_SOURCES): this.
4947 Add location.h.
4948 * src/parse-gram.y: Use location_t instead of Bison's.
4949 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4950 Use location_t instead of ints.
4951
4952 2002-06-14 Akim Demaille <akim@epita.fr>
4953
4954 * data/bison.simple, data/bison.c++: Be sure to restore the
4955 current #line when returning to the skeleton contents after having
4956 exposed the input file's #line.
4957
4958 2002-06-12 Akim Demaille <akim@epita.fr>
4959
4960 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4961 eager.
4962 * tests/actions.at (Exotic Dollars): New.
4963
4964 2002-06-12 Akim Demaille <akim@epita.fr>
4965
4966 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4967 ['"/] too eagerly.
4968 * tests/input.at (Torturing the Scanner): New.
4969
4970 2002-06-11 Akim Demaille <akim@epita.fr>
4971
4972 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4973 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4974 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4975 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4976 * src/reader.c (reader): Use it.
4977
4978 2002-06-11 Akim Demaille <akim@epita.fr>
4979
4980 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4981 Adjust all callers.
4982 (scanner_last_string_free): New.
4983
4984 2002-06-11 Akim Demaille <akim@epita.fr>
4985
4986 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4987 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4988 (last_string, YY_OBS_FREE): New.
4989 Use them when returning an ID.
4990
4991 2002-06-11 Akim Demaille <akim@epita.fr>
4992
4993 Have Bison grammars parsed by a Bison grammar.
4994
4995 * src/reader.c, src/reader.h (prologue_augment): New.
4996 * src/reader.c (copy_definition): Remove.
4997
4998 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4999 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
5000 (grammar_current_rule_prec_set, grammar_current_rule_check)
5001 (grammar_current_rule_symbol_append)
5002 (grammar_current_rule_action_append): Export.
5003 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
5004 (symbol_list_action_append): Remove.
5005 Hook the routines from reader.
5006 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
5007 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
5008
5009 * src/reader.c (read_declarations): Remove, unused.
5010
5011 * src/parse-gram.y: Handle the epilogue.
5012 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
5013 (grammar_start_symbol_set): this.
5014 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
5015 * src/reader.c (readgram): Remove, unused.
5016 (reader): Adjust to insert eoftoken and axiom where appropriate.
5017
5018 * src/reader.c (copy_dollar): Replace with...
5019 * src/scan-gram.h (handle_dollar): this.
5020 * src/parse-gram.y: Remove `%thong'.
5021
5022 * src/reader.c (copy_at): Replace with...
5023 * src/scan-gram.h (handle_at): this.
5024
5025 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
5026 New.
5027
5028 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
5029 time being.
5030
5031 * src/reader.h, src/reader.c (grammar_rule_end): New.
5032
5033 * src/parse.y (current_type, current_class): New.
5034 Implement `%nterm', `%token' support.
5035 Merge `%term' into `%token'.
5036 (string_as_id): New.
5037 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
5038 type name.
5039
5040 * src/parse-gram.y: Be sure to handle properly the beginning of
5041 rules.
5042
5043 * src/parse-gram.y: Handle %type.
5044 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
5045
5046 * src/parse-gram.y: More directives support.
5047 * src/options.c: No longer handle source directives.
5048
5049 * src/parse-gram.y: Fix %output.
5050
5051 * src/parse-gram.y: Handle %union.
5052 Use the prologue locations.
5053 * src/reader.c (parse_union_decl): Remove.
5054
5055 * src/reader.h, src/reader.c (epilogue_set): New.
5056 * src/parse-gram.y: Use it.
5057
5058 * data/bison.simple, data/bison.c++: b4_stype is now either not
5059 defined, then default to int, or to the contents of %union,
5060 without `union' itself.
5061 Adjust.
5062 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
5063
5064 * src/output.c (actions_output): Don't output braces, as they are
5065 already handled by the scanner.
5066
5067 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
5068 characters to themselves.
5069
5070 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
5071 that the epilogue has a proper #line.
5072
5073 * src/parse-gram.y: Handle precedence/associativity.
5074
5075 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
5076 a terminal.
5077 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
5078 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
5079 at all to define terminals that cannot be emitted.
5080
5081 * src/scan-gram.l: Escape M4 characters.
5082
5083 * src/scan-gram.l: Working properly with escapes in user
5084 strings/characters.
5085
5086 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
5087 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
5088 grammar.
5089 Use more modest sizes, as for the time being the parser does not
5090 release memory, and therefore the process swallows a huge amount
5091 of memory.
5092
5093 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
5094 stricter %token grammar.
5095
5096 * src/symtab.h (associativity): Add `undef_assoc'.
5097 (symbol_precedence_set): Do nothing when passed an undef_assoc.
5098 * src/symtab.c (symbol_check_alias_consistence): Adjust.
5099
5100 * tests/regression.at (Invalid %directive): Remove, as it is now
5101 meaningless.
5102 (Invalid inputs): Adjust to the new error messages.
5103 (Token definitions): The new grammar doesn't allow too many
5104 eccentricities.
5105
5106 * src/lex.h, src/lex.c: Remove.
5107 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
5108 (copy_character, copy_string2, copy_string, copy_identifier)
5109 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
5110 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
5111 (parse_action): Remove.
5112 * po/POTFILES.in: Adjust.
5113
5114 2002-06-11 Akim Demaille <akim@epita.fr>
5115
5116 * src/reader.c (parse_action): Don't store directly into the
5117 rule's action member: return the action as a string.
5118 Don't require `rule_length' as an argument: compute it.
5119 (grammar_current_rule_symbol_append)
5120 (grammar_current_rule_action_append): New, eved out from
5121 (readgram): here.
5122 Remove `action_flag', `rulelength', unused now.
5123
5124 2002-06-11 Akim Demaille <akim@epita.fr>
5125
5126 * src/reader.c (grammar_current_rule_prec_set).
5127 (grammar_current_rule_check): New, eved out from...
5128 (readgram): here.
5129 Remove `xaction', `first_rhs': useless.
5130 * tests/input.at (Type clashes): New.
5131 * tests/existing.at (GNU Cim Grammar): Adjust.
5132
5133 2002-06-11 Akim Demaille <akim@epita.fr>
5134
5135 * src/reader.c (grammar_midrule_action): New, Eved out from
5136 (readgram): here.
5137
5138 2002-06-11 Akim Demaille <akim@epita.fr>
5139
5140 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
5141 New.
5142 (readgram): Use them as replacement of inlined code, crule and
5143 crule1.
5144
5145 2002-06-11 Akim Demaille <akim@epita.fr>
5146
5147 * src/reader.c (grammar_end, grammar_symbol_append): New.
5148 (readgram): Use them.
5149 Make the use of `p' as local as possible.
5150
5151 2002-06-10 Akim Demaille <akim@epita.fr>
5152
5153 GCJ's parser requires the tokens to be defined before the prologue.
5154
5155 * data/bison.simple: Output the token definition before the user's
5156 prologue.
5157 * tests/regression.at (Braces parsing, Duplicate string)
5158 (Mixing %token styles): Check the output from bison.
5159 (Early token definitions): New.
5160
5161 2002-06-10 Akim Demaille <akim@epita.fr>
5162
5163 * src/symtab.c (symbol_user_token_number_set): Don't complain when
5164 assigning twice the same user number to a token, so that we can
5165 use it in...
5166 * src/lex.c (lex): here.
5167 Also use `symbol_class_set' instead of hand written code.
5168 * src/reader.c (parse_assoc_decl): Likewise.
5169
5170 2002-06-10 Akim Demaille <akim@epita.fr>
5171
5172 * src/symtab.c, src/symtab.c (symbol_class_set)
5173 (symbol_user_token_number_set): New.
5174 * src/reader.c (parse_token_decl): Use them.
5175 Use a switch instead of ifs.
5176 Use a single argument.
5177
5178 2002-06-10 Akim Demaille <akim@epita.fr>
5179
5180 Remove `%thong' support as it is undocumented, unused, duplicates
5181 `%token's job, and creates useless e-mail traffic with people who
5182 want to know what it is, why it is undocumented, unused, and
5183 duplicates `%token's job.
5184
5185 * src/reader.c (parse_thong_decl): Remove.
5186 * src/options.c (option_table): Remove "thong".
5187 * src/lex.h (tok_thong): Remove.
5188
5189 2002-06-10 Akim Demaille <akim@epita.fr>
5190
5191 * src/symtab.c, src/symtab.c (symbol_type_set)
5192 (symbol_precedence_set): New.
5193 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
5194 (value_components_used): Remove, unused.
5195
5196 2002-06-09 Akim Demaille <akim@epita.fr>
5197
5198 Move symbols handling code out of the reader.
5199
5200 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
5201 (axiom): Move to...
5202 * src/symtab.h, src/symtab.c: here.
5203
5204 * src/gram.c (start_symbol): Remove: use startsymbol->number.
5205 * src/reader.c (startval): Rename as...
5206 * src/symtab.h, src/symtab.c (startsymbol): this.
5207 * src/reader.c: Adjust.
5208
5209 * src/reader.c (symbol_check_defined, symbol_make_alias)
5210 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5211 (token_translations_init)
5212 Move to...
5213 * src/symtab.c: here.
5214 * src/reader.c (packsymbols): Move to...
5215 * src/symtab.h, src/symtab.c (symbols_pack): here.
5216 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
5217 argument.
5218
5219 2002-06-03 Akim Demaille <akim@epita.fr>
5220
5221 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
5222 then statements.
5223
5224 2002-06-03 Akim Demaille <akim@epita.fr>
5225
5226 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
5227 structs with non literals.
5228 * src/scan-skel.l: never-interactive.
5229 * src/conflicts.c (enum conflict_resolution_e): No trailing
5230 comma.
5231 * src/getargs.c (usage): Split long literal strings.
5232 Reported by Hans Aberg.
5233
5234 2002-05-28 Akim Demaille <akim@epita.fr>
5235
5236 * data/bison.c++: Use C++ ostreams.
5237 (cdebug_): New member.
5238
5239 2002-05-28 Akim Demaille <akim@epita.fr>
5240
5241 * src/output.c (output_skeleton): Be sure to allocate enough room
5242 for `/' _and_ for `\0' in full_skeleton.
5243
5244 2002-05-28 Akim Demaille <akim@epita.fr>
5245
5246 * data/bison.c++: Catch up with bison.simple:
5247 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5248 and Paul Eggert <eggert@twinsun.com>: `error' handing.
5249 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
5250 and popping traces.
5251
5252 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5253
5254 * src/output.c (output_skeleton): Put an explicit path in front of
5255 the skeleton file name, rather than relying on the -I directory,
5256 to partially alleviate effects of having a skeleton file lying around
5257 in the current directory.
5258
5259 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5260
5261 * src/conflicts.c (log_resolution): Correct typo:
5262 obstack_printf should be obstack_fgrow1.
5263
5264 2002-05-26 Akim Demaille <akim@epita.fr>
5265
5266 * src/state.h (state_t): `solved_conflicts' is a new member.
5267 * src/LR0.c (new_state): Set it to 0.
5268 * src/conflicts.h, src/conflicts.c (print_conflicts)
5269 (free_conflicts, solve_conflicts): Rename as...
5270 (conflicts_print, conflicts_free, conflicts_solve): these.
5271 Adjust callers.
5272 * src/conflicts.c (enum conflict_resolution_e)
5273 (solved_conflicts_obstack): New, used by...
5274 (log_resolution): this.
5275 Adjust to attach the conflict resolution to each state.
5276 Complete the description with the precedence/associativity
5277 information.
5278 (resolve_sr_conflict): Adjust.
5279 * src/print.c (print_state): Output its solved_conflicts.
5280 * tests/conflicts.at (Unresolved SR Conflicts)
5281 (Solved SR Conflicts): Exercise --report=all.
5282
5283 2002-05-26 Akim Demaille <akim@epita.fr>
5284
5285 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5286 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5287 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
5288 (token_number_t, item_number_as_token_number)
5289 (token_number_as_item_number, muscle_insert_token_number_table):
5290 Rename as...
5291 (symbol_number_t, item_number_as_symbol_number)
5292 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
5293 these, since it is more appropriate.
5294
5295 2002-05-26 Akim Demaille <akim@epita.fr>
5296
5297 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
5298 `Error:' lines.
5299 * data/bison.simple (yystos) [YYDEBUG]: New.
5300 (yyparse) [YYDEBUG]: Display the symbols which are popped during
5301 error recovery.
5302 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
5303
5304 2002-05-25 Akim Demaille <akim@epita.fr>
5305
5306 * doc/bison.texinfo (Debugging): Split into...
5307 (Tracing): this new section, its former contents, and...
5308 (Understanding): this new section.
5309 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
5310 by...
5311 (report_flag): this.
5312 Adjust all dependencies.
5313 (report_args, report_types, report_argmatch): New.
5314 (usage, getargs): Report/support -r, --report.
5315 * src/options.h
5316 (struct option_table_struct): Rename as..,
5317 (struct option_table_s): this.
5318 Rename the `set_flag' member to `flag' to match with getopt_long's
5319 struct.
5320 * src/options.c (option_table): Split verbose into an entry for
5321 %verbose, and another for --verbose.
5322 Support --report/-r, so remove -r from the obsolete --raw.
5323 * src/print.c: Attach full item sets and lookaheads reports to
5324 report_flag instead of trace_flag.
5325 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5326
5327 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5328 and Paul Eggert <eggert@twinsun.com>
5329
5330 * data/bison.simple (yyparse): Correct error handling to conform to
5331 POSIX and yacc. Specifically, after syntax error is discovered,
5332 do not reduce further before shifting the error token.
5333 Clean up the code a bit by removing the labels yyerrdefault,
5334 yyerrhandle, yyerrpop.
5335 * NEWS: Document the above.
5336
5337 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5338
5339 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5340 type; it isn't always big enough, since it doesn't necessarily
5341 include non-terminals.
5342 (yytranslate): Expand definition of yy_token_number_type, so that
5343 the latter can be removed.
5344 (yy_token_number_type): Remove, only one use.
5345 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5346 don't use TokenNumberType as element type.
5347
5348 * tests/regression.at: Modify expected output to agree with change
5349 to yyr1 and yytranslate.
5350
5351 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5352
5353 * src/reader.c (parse_action): Use copy_character instead of
5354 obstack_1grow.
5355
5356 2002-05-13 Akim Demaille <akim@epita.fr>
5357
5358 * tests/regression.at (Token definitions): Prototype yylex and
5359 yyerror.
5360
5361 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5362
5363 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
5364 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5365 32-bit arithmetic.
5366 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5367
5368 2002-05-07 Akim Demaille <akim@epita.fr>
5369
5370 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5371 avoid GCC warnings.
5372
5373 2002-05-07 Akim Demaille <akim@epita.fr>
5374
5375 Kill GCC warnings.
5376
5377 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5378 over the RHS of each rule.
5379 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5380 * src/state.h (state_t): Member `nitems' is unsigned short.
5381 * src/LR0.c (get_state): Adjust.
5382 * src/reader.c (packgram): Likewise.
5383 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5384 `Type'.
5385 (muscle_insert_int_table): Remove, unused.
5386 (prepare_rules): Remove `max'.
5387
5388 2002-05-06 Akim Demaille <akim@epita.fr>
5389
5390 * src/closure.c (print_firsts): Display of the symbol tags.
5391 (bitmatrix_print): Move to...
5392 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5393 here.
5394 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5395
5396 2002-05-06 Akim Demaille <akim@epita.fr>
5397
5398 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5399 hash_do_for_each.
5400
5401 2002-05-06 Akim Demaille <akim@epita.fr>
5402
5403 * src/LR0.c (new_state, get_state): Instead of using the global
5404 `kernel_size' and `kernel_base', have two new arguments:
5405 `core_size' and `core'.
5406 Adjust callers.
5407
5408 2002-05-06 Akim Demaille <akim@epita.fr>
5409
5410 * src/reader.c (packgram): No longer end `ritem' with a 0
5411 sentinel: it is not used.
5412
5413 2002-05-05 Akim Demaille <akim@epita.fr>
5414
5415 New experimental feature: display the lookaheads in the report and
5416 graph.
5417
5418 * src/print (print_core): When --trace-flag, display the rules
5419 lookaheads.
5420 * src/print_graph.c (print_core): Likewise.
5421 Swap the arguments.
5422 Adjust caller.
5423
5424 2002-05-05 Akim Demaille <akim@epita.fr>
5425
5426 * tests/torture.at (Many lookaheads): New test.
5427
5428 2002-05-05 Akim Demaille <akim@epita.fr>
5429
5430 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
5431 (GENERATE_MUSCLE_INSERT_TABLE): this.
5432 (output_int_table, output_unsigned_int_table, output_short_table)
5433 (output_token_number_table, output_item_number_table): Replace with...
5434 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
5435 (muscle_insert_short_table, muscle_insert_token_number_table)
5436 (muscle_insert_item_number_table): these.
5437 Adjust all callers.
5438 (prepare_tokens): Don't free `translations', since...
5439 * src/reader.h, src/reader.c (grammar_free): do it.
5440 Move to...
5441 * src/gram.h, src/gram.c (grammar_free): here.
5442 * data/bison.simple, data/bison.c++: b4_token_number_max is now
5443 b4_translate_max.
5444
5445 2002-05-05 Akim Demaille <akim@epita.fr>
5446
5447 * src/output.c (output_unsigned_int_table): New.
5448 (prepare_rules): `i' is unsigned.
5449 `prhs', `rline', `r2' are unsigned int.
5450 Rename muscle `rhs_number_max' as `rhs_max'.
5451 Output muscles `prhs_max', `rline_max', and `r2_max'.
5452 Free rline and r1.
5453 * data/bison.simple, data/bison.c++: Adjust to use these muscles
5454 to compute types instead of constant types.
5455 * tests/regression.at (Web2c Actions): Adjust.
5456
5457 2002-05-04 Akim Demaille <akim@epita.fr>
5458
5459 * src/symtab.h (SALIAS, SUNDEF): Rename as...
5460 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
5461 Adjust dependencies.
5462 * src/output.c (token_definitions_output): Be sure not to output a
5463 `#define 'a'' when fed with `%token 'a' "a"'.
5464 * tests/regression.at (Token definitions): New.
5465
5466 2002-05-03 Paul Eggert <eggert@twinsun.com>
5467
5468 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
5469 for K&R C.
5470
5471 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
5472
5473 * Makefile.am (SUBDIRS): Remove intl.
5474 (EXTRA_DIST): Add config/config.rpath.
5475
5476 2002-05-03 Akim Demaille <akim@epita.fr>
5477
5478 * data/bison.simple (m4_if): Don't output empty enums.
5479 And actually, output valid enum definitions :(.
5480
5481 2002-05-03 Akim Demaille <akim@epita.fr>
5482
5483 * configure.bat: Remove, completely obsolete.
5484 * Makefile.am (EXTRA_DIST): Adjust.
5485 Don't distribute config.rpath...
5486 * config/Makefile.am (EXTRA_DIST): Do it.
5487
5488 2002-05-03 Akim Demaille <akim@epita.fr>
5489
5490 * configure.in (GETTEXT_VERSION): New.
5491 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
5492
5493 2002-05-03 Akim Demaille <akim@epita.fr>
5494
5495 * data/bison.simple (b4_token_enum): New.
5496 (b4_token_defines): Use it to output tokens both as #define and
5497 enums.
5498 Suggested by Paul Eggert.
5499 * src/output.c (token_definitions_output): Don't output spurious
5500 white spaces.
5501
5502 2002-05-03 Akim Demaille <akim@epita.fr>
5503
5504 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5505
5506 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
5507
5508 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
5509 Update the stack class, give a try to deque as the default container.
5510
5511 2002-05-02 Akim Demaille <akim@epita.fr>
5512
5513 * data/bison.simple (yyparse): Do not implement @$ = @1.
5514 (YYLLOC_DEFAULT): Adjust to do it.
5515 * doc/bison.texinfo (Location Default Action): Fix.
5516
5517 2002-05-02 Akim Demaille <akim@epita.fr>
5518
5519 * src/reader.c (parse_braces): Merge into...
5520 (parse_action): this.
5521
5522 2002-05-02 Akim Demaille <akim@epita.fr>
5523
5524 * configure.in (ALL_LINGUAS): Remove.
5525 * po/LINGUAS, hr.po: New.
5526
5527 2002-05-02 Akim Demaille <akim@epita.fr>
5528
5529 Remove the so called hairy (semantic) parsers.
5530
5531 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
5532 * src/gram.h, src/gram.c (semantic_parser): Remove.
5533 (rule_t): Remove the guard and guard_line members.
5534 * src/lex.h (token_t): remove tok_guard.
5535 * src/options.c (option_table): Remove %guard and %semantic_parser
5536 support.
5537 * src/output.c, src/output.h (guards_output): Remove.
5538 (prepare): Adjust.
5539 (token_definitions_output): Don't output the `T'
5540 tokens (???).
5541 (output_skeleton): Don't output the guards.
5542 * src/files.c, src/files.c (attrsfile): Remove.
5543 * src/reader.c (symbol_list): Remove the guard and guard_line
5544 members.
5545 Adjust dependencies.
5546 (parse_guard): Remove.
5547 * data/bison.hairy: Remove.
5548 * doc/bison.texinfo (Environment Variables): Remove occurrences of
5549 BISON_HAIRY.
5550
5551 2002-05-02 Akim Demaille <akim@epita.fr>
5552
5553 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
5554 (parse_guard): Rename the formal argument `stack_offset' as
5555 `rule_length', which is more readable.
5556 Adjust callers.
5557 (copy_at, copy_dollar): Instead of outputting the hard coded
5558 values of $$, $n and so forth, output invocation to b4_lhs_value,
5559 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
5560 Note: this patch partially drops `semantic-parser' support: it
5561 always does `rule_length - n', where semantic parsers ought to
5562 always use `-n'.
5563 * data/bison.simple, data/bison.c++ (b4_lhs_value)
5564 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
5565
5566 2002-05-02 Akim Demaille <akim@epita.fr>
5567
5568 * configure.in (AC_INIT): Bump to 1.49b.
5569 (AM_INIT_AUTOMAKE): Short invocation.
5570
5571 2002-05-02 Akim Demaille <akim@epita.fr>
5572
5573 Version 1.49a.
5574
5575 2002-05-01 Akim Demaille <akim@epita.fr>
5576
5577 * src/skeleton.h: Remove.
5578
5579 2002-05-01 Akim Demaille <akim@epita.fr>
5580
5581 * src/skeleton.h: Fix the #endif.
5582 Reported by Magnus Fromreide.
5583
5584 2002-04-26 Paul Eggert <eggert@twinsun.com>
5585
5586 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
5587 Define if we define YYSTYPE and YYLTYPE, respectively.
5588 (YYCOPY): Fix [] quoting problem in the non-GCC case.
5589
5590 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
5591
5592 * src/scan-skel.l: Postprocess quadrigraphs.
5593
5594 * src/reader.c (copy_character): New function, used to output
5595 single characters while replacing `[' and `]' with quadrigraphs, to
5596 avoid troubles with M4 quotes.
5597 (copy_comment): Output characters with copy_character.
5598 (read_additionnal_code): Likewise.
5599 (copy_string2): Likewise.
5600 (copy_definition): Likewise.
5601
5602 * tests/calc.at: Exercise M4 quoting.
5603
5604 2002-04-25 Akim Demaille <akim@epita.fr>
5605
5606 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
5607 between `!' and the command.
5608 Reported by Paul Eggert.
5609
5610 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
5611
5612 * tests/calc.at: Exercise prologue splitting.
5613
5614 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
5615 `b4_post_prologue' instead of `b4_prologue'.
5616
5617 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
5618 muscles.
5619 (output): Free pre_prologue_obstack and post_prologue_obstack.
5620 * src/files.h, src/files.c (attrs_obstack): Remove.
5621 (pre_prologue_obstack, post_prologue_obstack): New.
5622 * src/reader.c (copy_definition): Add a parameter to specify the
5623 obstack to fill, instead of using attrs_obstack unconditionally.
5624 (read_declarations): Pass pre_prologue_obstack to copy_definition if
5625 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
5626
5627 2002-04-23 Paul Eggert <eggert@twinsun.com>
5628
5629 * data/bison.simple: Remove unnecessary commentary and white
5630 space differences from 1_29-branch.
5631 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
5632
5633 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
5634 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
5635 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
5636 constructors or destructors.
5637
5638 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
5639
5640 2002-04-23 Akim Demaille <akim@epita.fr>
5641
5642 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
5643 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
5644 location with columns.
5645 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
5646 All reported by Paul Eggert.
5647
5648 2002-04-22 Akim Demaille <akim@epita.fr>
5649
5650 * src/reduce.c (dump_grammar): Move to...
5651 * src/gram.h, src/gram.c (grammar_dump): here.
5652 Be sure to separate long item numbers.
5653 Don't read the members of a rule's prec if its nil.
5654
5655 2002-04-22 Akim Demaille <akim@epita.fr>
5656
5657 * src/output.c (table_size, table_grow): New.
5658 (MAXTABLE): Remove, replace uses with table_size.
5659 (pack_vector): Instead of dying when the table is too big, grow it.
5660
5661 2002-04-22 Akim Demaille <akim@epita.fr>
5662
5663 * data/bison.simple (yyr1): Its type is that of a token number.
5664 * data/bison.c++ (r1_): Likewise.
5665 * tests/regression.at (Web2c Actions): Adjust.
5666
5667 2002-04-22 Akim Demaille <akim@epita.fr>
5668
5669 * src/reader.c (token_translations_init): 256 is now the default
5670 value for the error token, i.e., it will be assigned another
5671 number if the user assigned 256 to one of her tokens.
5672 (reader): Don't force 256 to error.
5673 * doc/bison.texinfo (Symbols): Adjust.
5674 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
5675 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
5676 etc. instead of 10, 20, 30 (which was used to `jump' over error
5677 (256) and undefined (2)).
5678
5679 2002-04-22 Akim Demaille <akim@epita.fr>
5680
5681 Propagate more token_number_t.
5682
5683 * src/gram.h (token_number_as_item_number)
5684 (item_number_as_token_number): New.
5685 * src/output.c (GENERATE_OUTPUT_TABLE): New.
5686 Use it to create output_item_number_table and
5687 output_token_number_table.
5688 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5689 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
5690 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
5691 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
5692
5693 2002-04-22 Akim Demaille <akim@epita.fr>
5694
5695 * src/output.h, src/output.c (get_lines_number): Remove.
5696
5697 2002-04-19 Akim Demaille <akim@epita.fr>
5698
5699 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
5700 as Lex/Flex'.
5701 (Debugging): More details about enabling the debugging features.
5702 (Table of Symbols): Describe $$, $n, @$, and @n.
5703 Suggested by Tim Josling.
5704
5705 2002-04-19 Akim Demaille <akim@epita.fr>
5706
5707 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
5708
5709 2002-04-10 Akim Demaille <akim@epita.fr>
5710
5711 * src/system.h: Rely on HAVE_LIMITS_H.
5712 Suggested by Paul Eggert.
5713
5714 2002-04-09 Akim Demaille <akim@epita.fr>
5715
5716 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
5717 full stderr, and strip it according to the bison options, instead
5718 of composing the error message from different bits.
5719 This makes it easier to check for several error messages.
5720 Adjust all the invocations.
5721 Add an invocation exercising the error token.
5722 Add an invocation demonstrating a stupid error message.
5723 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
5724 Adjust the tests.
5725 Error message are for stderr, not stdout.
5726
5727 2002-04-09 Akim Demaille <akim@epita.fr>
5728
5729 * src/gram.h, src/gram.c (error_token_number): Remove, use
5730 errtoken->number.
5731 * src/reader.c (reader): Don't specify the user token number (2)
5732 for $undefined, as it uselessly prevents using it.
5733 * src/gram.h (token_number_t): Move to...
5734 * src/symtab.h: here.
5735 (state_t.number): Is a token_number_t.
5736 * src/print.c, src/reader.c: Use undeftoken->number instead of
5737 hard coded 2.
5738 (Even though this 2 is not the same as above: the number of the
5739 undeftoken remains being 2, it is its user token number which
5740 might not be 2).
5741 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
5742 `user_token_number_max'.
5743 Output `undef_token_number'.
5744 * data/bison.simple, data/bison.c++: Use them.
5745 Be sure to map invalid yylex return values to
5746 `undef_token_number'. This saves us from gratuitous SEGV.
5747
5748 * tests/conflicts.at (Solved SR Conflicts)
5749 (Unresolved SR Conflicts): Adjust.
5750 * tests/regression.at (Web2c Actions): Adjust.
5751
5752 2002-04-08 Akim Demaille <akim@epita.fr>
5753
5754 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
5755 Adding #line.
5756 Remove the duplicate `typedefs'.
5757 (RhsNumberType): Fix the declaration and various other typos.
5758 Use __ofile__.
5759 * data/bison.simple: Use __ofile__.
5760 * src/scan-skel.l: Handle __ofile__.
5761
5762 2002-04-08 Akim Demaille <akim@epita.fr>
5763
5764 * src/gram.h (item_number_t): New, the type of item numbers in
5765 RITEM. Note that it must be able to code symbol numbers as
5766 positive number, and the negation of rule numbers as negative
5767 numbers.
5768 Adjust all dependencies (pretty many).
5769 * src/reduce.c (rule): Remove this `short *' pointer: use
5770 item_number_t.
5771 * src/system.h (MINSHORT, MAXSHORT): Remove.
5772 Include `limits.h'.
5773 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
5774 (shortcpy): Remove.
5775 (MAXTABLE): Move to...
5776 * src/output.c (MAXTABLE): here.
5777 (prepare_rules): Use output_int_table to output rhs.
5778 * data/bison.simple, data/bison.c++: Adjust.
5779 * tests/torture.at (Big triangle): Move the limit from 254 to
5780 500.
5781 * tests/regression.at (Web2c Actions): Ajust.
5782
5783 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
5784 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
5785 passes, but produces negative #line number, once fixed, GCC is
5786 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
5787 C), it passes.
5788 * src/state.h (state_h): Code input lines on ints, not shorts.
5789
5790 2002-04-08 Akim Demaille <akim@epita.fr>
5791
5792 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
5793 and then the grammar.
5794
5795 2002-04-08 Akim Demaille <akim@epita.fr>
5796
5797 * src/system.h: No longer using strndup.
5798
5799 2002-04-07 Akim Demaille <akim@epita.fr>
5800
5801 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
5802 * src/output.c (output_table_data): Return the longest number.
5803 (prepare_tokens): Output `token_number_max').
5804 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
5805 New.
5806 Use them to define yy_token_number_type/TokenNumberType.
5807 Use this type for yytranslate.
5808 * tests/torture.at (Big triangle): Push the limit from 124 to
5809 253.
5810 * tests/regression.at (Web2c Actions): Adjust.
5811
5812 2002-04-07 Akim Demaille <akim@epita.fr>
5813
5814 * tests/torture.at (Big triangle): New.
5815 (GNU AWK Grammar, GNU Cim Grammar): Move to...
5816 * tests/existing.at: here.
5817
5818 2002-04-07 Akim Demaille <akim@epita.fr>
5819
5820 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
5821 nritems.
5822 Adjust dependencies.
5823
5824 2002-04-07 Akim Demaille <akim@epita.fr>
5825
5826 * src/reader.c: Normalize increments to prefix form.
5827
5828 2002-04-07 Akim Demaille <akim@epita.fr>
5829
5830 * src/reader.c, symtab.c: Remove debugging code.
5831
5832 2002-04-07 Akim Demaille <akim@epita.fr>
5833
5834 Rename all the `bucket's as `symbol_t'.
5835
5836 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
5837 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
5838 * src/symtab.c, src/symtab.h (bucket): Rename as...
5839 (symbol_t): this.
5840 (symbol_list_new, bucket_check_defined, bucket_make_alias)
5841 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
5842 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5843 (buckets_new, buckets_free, buckets_do): Rename as...
5844 (symbol_list_new, symbol_check_defined, symbol_make_alias)
5845 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5846 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
5847 (symbols_new, symbols_free, symbols_do): these.
5848
5849 2002-04-07 Akim Demaille <akim@epita.fr>
5850
5851 Use lib/hash for the symbol table.
5852
5853 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
5854 EOF.
5855 * src/lex.c (lex): Set the `number' member of new terminals.
5856 * src/reader.c (bucket_check_defined, bucket_make_alias)
5857 (bucket_check_alias_consistence, bucket_translation): New.
5858 (reader, grammar_free, readgram, token_translations_init)
5859 (packsymbols): Adjust.
5860 (reader): Number the predefined tokens.
5861 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5862 for predefined tokens.
5863 * src/symtab.h (bucket): Remove all the hash table related
5864 members.
5865 * src/symtab.c (symtab): Replace by...
5866 (bucket_table): this.
5867 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5868 (buckets_new, buckets_do): New.
5869
5870 2002-04-07 Akim Demaille <akim@epita.fr>
5871
5872 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5873 (start_symbol, max_user_token_number, semantic_parser)
5874 (error_token_number): Initialize.
5875 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5876 Initialize.
5877 (reader): Don't.
5878 (errtoken, eoftoken, undeftoken, axiom): Extern.
5879
5880 2002-04-07 Akim Demaille <akim@epita.fr>
5881
5882 * src/gram.h (rule_s): prec and precsym are now pointers
5883 to the bucket giving the priority/associativity.
5884 Member `associativity' removed: useless.
5885 * src/reduce.c, src/conflicts.c: Adjust.
5886
5887 2002-04-07 Akim Demaille <akim@epita.fr>
5888
5889 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5890 Properly escape the symbols' TAG when outputting them.
5891
5892 2002-04-07 Akim Demaille <akim@epita.fr>
5893
5894 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5895
5896 2002-04-07 Akim Demaille <akim@epita.fr>
5897
5898 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5899 (LArule): this, which is an array to rule_t*.
5900 * src/print.c, src/conflicts.c: Adjust.
5901
5902 2002-04-07 Akim Demaille <akim@epita.fr>
5903
5904 * src/gram.h (rule_t): Rename `number' as `user_number'.
5905 `number' is a new member.
5906 Adjust dependencies.
5907 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5908
5909 2002-04-07 Akim Demaille <akim@epita.fr>
5910
5911 As a result of the previous patch, it is no longer needed
5912 to reorder ritem itself.
5913
5914 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5915
5916 2002-04-07 Akim Demaille <akim@epita.fr>
5917
5918 Be sure never to walk through RITEMS, but use only data related to
5919 the rules themselves. RITEMS should be banished.
5920
5921 * src/output.c (output_token_translations): Rename as...
5922 (prepare_tokens): this.
5923 In addition to `translate', prepare the muscles `tname' and
5924 `toknum', which were handled by...
5925 (output_rule_data): this.
5926 Remove, and move the remainder of its outputs into...
5927 (prepare_rules): this new routines, which also merges content from
5928 (output_gram): this.
5929 (prepare_rules): Be sure never to walk through RITEMS.
5930 (output_stos): Rename as...
5931 (prepare_stos): this.
5932 (output): Always invoke prepare_states, after all, just don't use it
5933 in the output if you don't need it.
5934
5935 2002-04-07 Akim Demaille <akim@epita.fr>
5936
5937 * src/LR0.c (new_state): Display `nstates' as the name of the
5938 newly created state.
5939 Adjust to initialize first_state and last_state if needed.
5940 Be sure to distinguish the initial from the final state.
5941 (new_states): Create the itemset of the initial state, and use
5942 new_state.
5943 * src/closure.c (closure): Now that the initial state has its
5944 items properly set, there is no need for a special case when
5945 creating `ruleset'.
5946
5947 As a result, now the rule 0, reducing to $axiom, is visible in the
5948 outputs. Adjust the test suite.
5949
5950 * tests/conflicts.at (Solved SR Conflicts)
5951 (Unresolved SR Conflicts): Adjust.
5952 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5953 * tests/conflicts.at (S/R in initial): New.
5954
5955 2002-04-07 Akim Demaille <akim@epita.fr>
5956
5957 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5958 the RHS of the rules.
5959 * src/output.c (output_gram): Likewise.
5960
5961 2002-04-07 Akim Demaille <akim@epita.fr>
5962
5963 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5964 bucket.
5965 Adjust all dependencies.
5966 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5967 `number' of the buckets too.
5968 * src/gram.h: Include `symtab.h'.
5969 (associativity): Move to...
5970 * src/symtab.h: here.
5971 No longer include `gram.h'.
5972
5973 2002-04-07 Akim Demaille <akim@epita.fr>
5974
5975 * src/gram.h, src/gram.c (rules_rhs_length): New.
5976 (ritem_longest_rhs): Use it.
5977 * src/gram.h (rule_t): `number' is a new member.
5978 * src/reader.c (packgram): Set it.
5979 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5980 the end of `rules', and count them out of `nrules'.
5981 (reduce_output, dump_grammar): Adjust.
5982 * src/print.c (print_grammar): It is no longer needed to check for
5983 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5984 * tests/reduce.at (Reduced Automaton): New test.
5985
5986 2002-04-07 Akim Demaille <akim@epita.fr>
5987
5988 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5989 lacking `+ 1' to nrules, Bison reported as useless a token if it
5990 was used solely to set the precedence of the last rule...
5991
5992 2002-04-07 Akim Demaille <akim@epita.fr>
5993
5994 * data/bison.c++, data/bison.simple: Don't output the current file
5995 name in #line, to avoid useless diffs between two identical
5996 outputs under different names.
5997
5998 2002-04-07 Akim Demaille <akim@epita.fr>
5999
6000 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
6001 Normalize loops to using `< nrules + 1', not `<= nrules'.
6002
6003 2002-04-07 Akim Demaille <akim@epita.fr>
6004
6005 * TODO: Update.
6006
6007 2002-04-07 Akim Demaille <akim@epita.fr>
6008
6009 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
6010 bucket.value as bucket.number.
6011
6012 2002-04-07 Akim Demaille <akim@epita.fr>
6013
6014 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
6015 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
6016 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
6017 RHS, instead of being an index in RITEMS.
6018
6019 2002-04-04 Paul Eggert <eggert@twinsun.com>
6020
6021 * doc/bison.texinfo: Update copyright date.
6022 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
6023 (Symbols): Warn about running Bison in one character set,
6024 but compiling and/or running in an incompatible one.
6025 Warn about character code 256, too.
6026
6027 2002-04-03 Paul Eggert <eggert@twinsun.com>
6028
6029 * src/bison.data (YYSTACK_ALLOC): Depend on whether
6030 YYERROR_VERBOSE is nonzero, not whether it is defined.
6031
6032 Merge changes from bison-1_29-branch.
6033
6034 2002-03-20 Paul Eggert <eggert@twinsun.com>
6035
6036 Merge fixes from Debian bison_1.34-1.diff.
6037
6038 * configure.in (AC_PREREQ): 2.53.
6039
6040 2002-03-20 Akim Demaille <akim@epita.fr>
6041
6042 * src/conflicts.c (log_resolution): Argument `resolution' is const.
6043
6044 2002-03-19 Paul Eggert <eggert@twinsun.com>
6045
6046 * src/bison.simple (YYCOPY): New macro.
6047 (YYSTACK_RELOCATE): Use it.
6048 Remove Type arg; no longer needed. All callers changed.
6049 (yymemcpy): Remove; no longer needed.
6050
6051 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
6052 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6053
6054 2002-03-19 Akim Demaille <akim@epita.fr>
6055
6056 Test and fix the #line outputs.
6057
6058 * tests/atlocal.at (GCC): New.
6059 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
6060 (Prologue synch line, ,%union synch line, Postprologue synch line)
6061 (Action synch line, Epilogue synch line): New tests.
6062 * src/reader.c (parse_union_decl): Define the muscle stype_line.
6063 * data/bison.simple, data/bison.c++: Use it.
6064
6065 2002-03-19 Akim Demaille <akim@epita.fr>
6066
6067 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
6068 (Solved SR Conflicts, %expect not enough, %expect right)
6069 (%expect too much): Move to...
6070 * tests/conflicts.at: this new file.
6071
6072 2002-03-19 Akim Demaille <akim@epita.fr>
6073
6074 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6075 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
6076 that we can move to enums for instance.
6077 * src/output.c (token_definitions_output): Output a list of
6078 `token-name, token-number' instead of the #define.
6079 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
6080
6081 2002-03-14 Akim Demaille <akim@epita.fr>
6082
6083 Use Gettext 0.11.1.
6084
6085 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
6086
6087 * data/bison.c++: Make the user able to add members to the generated
6088 parser by subclassing.
6089
6090 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
6091
6092 * src/reader.c (read_additionnal_code): `c' should be an integer, not
6093 a character.
6094 Reported by Nicolas Tisserand and Nicolas Burrus.
6095
6096 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6097
6098 * src/reader.c: Warn about lacking semi-colons, do not complain.
6099
6100 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6101
6102 * data/bison.c++: Remove a debug line.
6103
6104 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6105
6106 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
6107 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
6108 provide a default implementation.
6109
6110 2002-03-04 Akim Demaille <akim@epita.fr>
6111
6112 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
6113 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
6114 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
6115 * tests/semantic.at (Parsing Guards): Similarly.
6116 * src/reader.at (readgram): Complain if the last rule is not ended
6117 with a semi-colon.
6118
6119 2002-03-04 Akim Demaille <akim@epita.fr>
6120
6121 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
6122 * src/closure.c: here.
6123 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
6124 RTC.
6125 * src/warshall.h, src/warshall.c: Remove.
6126 * tests/sets.at (Broken Closure): Adjust.
6127
6128 2002-03-04 Akim Demaille <akim@epita.fr>
6129
6130 * src/output.c (output_skeleton): tempdir is const.
6131 bytes_read is unused.
6132
6133 2002-03-04 Akim Demaille <akim@epita.fr>
6134
6135 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6136 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
6137 Update.
6138 From Michael Hayes.
6139
6140 2002-03-04 Akim Demaille <akim@epita.fr>
6141
6142 * src/closure.c (closure): `r' is unused.
6143
6144 2002-03-04 Akim Demaille <akim@epita.fr>
6145
6146 * tests/sets.at (Broken Closure): Add the ending `;'.
6147 * src/reader.at (readgram): Complain if a rule is not ended with a
6148 semi-colon.
6149
6150 2002-03-04 Akim Demaille <akim@epita.fr>
6151
6152 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
6153 (count_sr_conflicts): Use bitset_count.
6154 * src/reduce.c (inaccessable_symbols): Ditto.
6155 (bits_size): Remove.
6156 * src/warshall.h, src/warshall.c: Convert to bitsetv.
6157
6158 2002-03-04 Akim Demaille <akim@epita.fr>
6159
6160 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
6161 * src/reduce.c: Remove the `bitset_zero's following the
6162 `bitset_create's, as now it is performed by the latter.
6163
6164 2002-03-04 Akim Demaille <akim@epita.fr>
6165
6166 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
6167 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
6168 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
6169 latest sources from Michael.
6170
6171 2002-03-04 Akim Demaille <akim@epita.fr>
6172
6173 * src/output.c (output): Don't free the grammar.
6174 * src/reader.c (grammar_free): New.
6175 * src/main.c (main): Call it and don't free symtab here.
6176
6177 2002-03-04 Akim Demaille <akim@epita.fr>
6178
6179 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
6180 before returning.
6181 Reported by Benoit Perrot.
6182
6183 2002-03-04 Akim Demaille <akim@epita.fr>
6184
6185 Use bitset operations when possible, not loops over bits.
6186
6187 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
6188 bitset_or.
6189 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
6190 * src/reduce.c (useless_nonterminals): Formatting changes.
6191 * src/warshall.c (TC): Use bitset_or.
6192
6193 2002-03-04 Akim Demaille <akim@epita.fr>
6194
6195 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
6196 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
6197 Ditto.
6198
6199 2002-03-04 Akim Demaille <akim@epita.fr>
6200
6201 * src/lalr.c (F): Now a bitset*.
6202 Adjust all dependencies.
6203
6204 2002-03-04 Akim Demaille <akim@epita.fr>
6205
6206 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
6207 Adjust all dependencies.
6208
6209 2002-03-04 Akim Demaille <akim@epita.fr>
6210
6211 * src/L0.c, src/LR0.h (nstates): Be size_t.
6212 Adjust comparisons (signed vs unsigned).
6213 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
6214 bitset*.
6215 Adjust all dependencies.
6216
6217 2002-03-04 Akim Demaille <akim@epita.fr>
6218
6219 * src/closure.c (firsts): Now, also a bitset.
6220 Adjust all dependencies.
6221 (varsetsize): Remove, now unused.
6222 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
6223
6224 2002-03-04 Akim Demaille <akim@epita.fr>
6225
6226 * src/print.c: Convert to use bitset.h, not hand coded iterations
6227 over ints.
6228
6229 2002-03-04 Akim Demaille <akim@epita.fr>
6230
6231 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
6232
6233 2002-03-04 Akim Demaille <akim@epita.fr>
6234
6235 * src/closure.c (ruleset): Be a bitset.
6236 (rulesetsize): Remove.
6237
6238 2002-03-04 Akim Demaille <akim@epita.fr>
6239
6240 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6241 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
6242 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
6243 * src/closure.c (fderives): Be an array of bitsets.
6244
6245 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
6246
6247 * data/bison.c++: Merge the two generated headers. Insert a copyright
6248 notice in each output file.
6249
6250 2002-02-28 Akim Demaille <akim@epita.fr>
6251
6252 * data/bison.c++: Copy the prologue of bison.simple to fetch
6253 useful M4 definitions, such as b4_header_guard.
6254
6255 2002-02-25 Akim Demaille <akim@epita.fr>
6256
6257 * src/getargs.c (version): Give the name of the authors, and use a
6258 translator friendly scheme for the bgr
6259 copyright notice.
6260
6261 2002-02-25 Akim Demaille <akim@epita.fr>
6262
6263 * src/output.c (header_output): Remove, now handled completely via
6264 M4.
6265
6266 2002-02-25 Akim Demaille <akim@epita.fr>
6267
6268 * m4/m4.m4: New, from CVS Autoconf.
6269 * configure.in: Invoke it.
6270 * src/output.c (output_skeleton): Use its result instead of the
6271 hard coded name.
6272
6273 2002-02-25 Akim Demaille <akim@epita.fr>
6274
6275 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
6276 Fileutils 4.1.5.
6277 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
6278 * src/output.c (output_skeleton): Use mkstemp to create a real
6279 temporary file.
6280 Move the filling of `skeleton' and its muscle to...
6281 (prepare): here.
6282 (output): Move the definition of the prologue muscle to...
6283 (prepare): here.
6284 * src/system.h (DEFAULT_TMPDIR): New.
6285
6286 2002-02-14 Paul Eggert <eggert@twinsun.com>
6287
6288 Remove the support for C++ namespace cleanliness; it was
6289 causing more problems than it was curing, since it didn't work
6290 properly on some nonstandard C++ compilers. This can wait
6291 for a proper C++ parser.
6292
6293 * NEWS: Document this.
6294 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
6295 of C++, as it's treated like C now.
6296 * src/bison.simple (YYSTD): Remove.
6297 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
6298 Treat C++ just like Standard C instead of trying to support
6299 namespace cleanliness.
6300
6301 2002-02-14 Akim Demaille <akim@epita.fr>
6302
6303 * tests/regression.at (else): Adjust to Andreas' change.
6304
6305 2002-02-14 Akim Demaille <akim@epita.fr>
6306
6307 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
6308
6309 2002-02-13 Andreas Schwab <schwab@suse.de>
6310
6311 * src/output.c (output_rule_data): Don't output NULL, it might
6312 not be defined yet.
6313
6314 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
6315
6316 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6317 (Copyright notice): Update.
6318
6319 2002-02-11 Akim Demaille <akim@epita.fr>
6320
6321 * tests/regression.at (%nonassoc and eof): Don't include
6322 nonportable headers.
6323
6324 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
6325
6326 * data/bison.c++: Correct error recovery. Make the user able to
6327 initialize the starting location.
6328
6329 2002-02-07 Akim Demaille <akim@epita.fr>
6330
6331 * tests/input.at: New.
6332
6333 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6334
6335 * data/bison.c++: Replace some direct m4 expansions by constants. Be
6336 more consistent when naming methods and variables. Put preprocessor
6337 directives around tables only needed for debugging.
6338
6339 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6340
6341 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6342 C++ parsers.
6343 (yy::b4_name::parse): Use print_.
6344
6345 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6346
6347 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6348
6349 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6350
6351 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6352 C++ parsers.
6353 (yy::b4_name::parse): Build verbose error messages, and use error_.
6354
6355 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6356
6357 * data/bison.c++: Fix m4 quoting in comments.
6358
6359 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6360
6361 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6362 not expanded by m4.
6363
6364 2002-02-05 Akim Demaille <akim@epita.fr>
6365
6366 * data/bison.c++: Adjust to the M4 back end.
6367 More is certainly needed.
6368
6369 2002-02-05 Akim Demaille <akim@epita.fr>
6370
6371 Give a try to M4 as a back end.
6372
6373 * lib/readpipe.c: New, from wdiff.
6374 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6375 BISON_HAIRY.
6376 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6377 specific values. Now it is m4 that performs the lookup.
6378 * src/parse-skel.y: Remove.
6379 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6380 * src/output.c (actions_output, guards_output)
6381 (token_definitions_output): No longer keeps track of the output
6382 line number, hence remove the second argument.
6383 (guards_output): Check against the guard member of a rule, not the
6384 action member.
6385 Adjust callers.
6386 (output_skeleton): Don't look for the skeleton location, let m4 do
6387 that.
6388 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6389 file will be used.
6390 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6391 (prepare): Given that for the time being changesyntax is not
6392 usable in M4, rename the muscles using `-' to `_'.
6393 Define `defines_flag', `output_parser_name' and `output_header_name'.
6394 * src/output.h (actions_output, guards_output)
6395 (token_definitions_output): Adjust prototypes.
6396 * src/scan-skel.l: Instead of scanning the skeletons, it now
6397 processes the output of m4: `__oline__' and `#output'.
6398 * data/bison.simple: Adjust to be used by M4(sugar).
6399 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6400 to date.
6401 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6402 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6403 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6404 shamelessly stolen from CVS Autoconf.
6405
6406 2002-02-05 Akim Demaille <akim@epita.fr>
6407
6408 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
6409 * configure.in: Check for the declarations of free and malloc.
6410 * src/muscle_tab.c: Adjust.
6411
6412 2002-02-05 Akim Demaille <akim@epita.fr>
6413
6414 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
6415 which have no values.
6416
6417 2002-02-05 Akim Demaille <akim@epita.fr>
6418
6419 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
6420 * data/: here.
6421
6422 2002-01-29 Paul Eggert <eggert@twinsun.com>
6423
6424 * src/bison.simple (YYSIZE_T): Do not define merely because
6425 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
6426 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6427
6428 2002-01-27 Akim Demaille <akim@epita.fr>
6429
6430 Fix `%nonassoc and eof'.
6431
6432 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
6433 which were not properly copied! Replace
6434 memcpy (res->errs, src->errs, src->nerrs);
6435 with
6436 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
6437 !!!
6438 * tests/regression.at (%nonassoc and eof): Adjust to newest
6439 Autotest: `.' is not in the PATH.
6440
6441 2002-01-27 Akim Demaille <akim@epita.fr>
6442
6443 * tests/sets.at (AT_EXTRACT_SETS): New.
6444 (Nullable): Use it.
6445 (Firsts): New.
6446
6447 2002-01-26 Akim Demaille <akim@epita.fr>
6448
6449 * tests/actions.at, tests/calc.at, tests/headers.at,
6450 * tests/torture.at: Adjust to the newest Autotest which no longer
6451 forces `.' in the PATH.
6452
6453 2002-01-25 Akim Demaille <akim@epita.fr>
6454
6455 * tests/regression.at (%nonassoc and eof): New.
6456 Suggested by Robert Anisko.
6457
6458 2002-01-24 Akim Demaille <akim@epita.fr>
6459
6460 Bison dumps core when trying to complain about broken input files.
6461 Reported by Cris van Pelt.
6462
6463 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
6464 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
6465 into...
6466 (Invalid inputs): Strengthen: exercise parse_percent_token.
6467
6468 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
6469
6470 * src/Makefile.am: Add bison.c++.
6471 * src/bison.c++: New skeleton.
6472
6473 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
6474
6475 * po/it.po: New.
6476
6477 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6478
6479 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
6480
6481 2002-01-20 Marc Autret <marc@gnu.org>
6482
6483 * src/files.c (compute_output_file_names): Fix
6484
6485 2002-01-20 Marc Autret <marc@gnu.org>
6486
6487 * tests/output.at: New test.
6488 * src/files.c (compute_base_names): Don't map extensions when
6489 the YACC flag is set, use defaults.
6490 Reported by Evgeny Stambulchik.
6491
6492 2002-01-20 Marc Autret <marc@gnu.org>
6493
6494 * src/system.h: Need to define __attribute__ away for non-GCC
6495 compilers as well (i.e. the vendor C compiler).
6496 Suggested by Albert Chin-A-Young.
6497
6498 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
6499
6500 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
6501 canonical definition.
6502 * src/system.h: Use the canonical definition for PARAMS (avoids
6503 a conflict with the macro from lib/hash.h).
6504
6505 2002-01-11 Akim Demaille <akim@epita.fr>
6506
6507 * configure.in: Use AC_FUNC_STRNLEN.
6508 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
6509
6510 2002-01-09 Akim Demaille <akim@epita.fr>
6511
6512 * src/files.c, src/files.h (output_infix): New.
6513 (tab_extension): Remove.
6514 (compute_base_names): Compute the former, drop the latter.
6515 * src/output.c (prepare): Insert the muscles `output-infix', and
6516 `output-suffix'.
6517 * src/parse-skel.y (string, string.1): New.
6518 (section.header): Use it.
6519 (section.yacc): Remove.
6520 (prefix): Remove too.
6521 * src/scan-skel.l: Adjust.
6522 * src/bison.simple, src/bison.hairy: Adjust.
6523
6524 2002-01-09 Akim Demaille <akim@epita.fr>
6525
6526 * configure.in (WERROR_CFLAGS): Compute it.
6527 * src/Makefile.am (CFLAGS): Pass it.
6528 * tests/atlocal.in (CFLAGS): Idem.
6529 * src/files.c: Fix a few warnings.
6530 (get_extension_index): Remove, unused.
6531
6532 2002-01-08 Akim Demaille <akim@epita.fr>
6533
6534 * src/getargs.c (AS_FILE_NAME): New.
6535 (getargs): Use it to convert DOSish file names.
6536 * src/files.c (base_name): Rename as full_base_name to avoid
6537 clashes with `base_name ()'.
6538 (filename_split): New.
6539 (compute_base_names): N-th rewrite, using filename_split.
6540
6541 2002-01-08 Akim Demaille <akim@epita.fr>
6542
6543 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
6544 New, stolen from the Fileutils 4.1.
6545 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6546 * configure.in: Check for the presence of memrchr, and of its
6547 prototype.
6548
6549 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
6550
6551 * lib/hash.h (__P): Added definition for this macro.
6552 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
6553 BUILT_SOURCES, to ensure they are generated first.
6554 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
6555 %error-verbose to allow bootstrapping with bison 1.30x.
6556
6557 2002-01-06 Akim Demaille <akim@epita.fr>
6558
6559 * src/reader.c (parse_braces): Don't fetch the next char, the
6560 convention is to fetch on entry.
6561 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
6562 'switch' without a following semicolon.
6563 * tests/regression.at (braces parsing): New.
6564
6565 2002-01-06 Akim Demaille <akim@epita.fr>
6566
6567 Bison is dead wrong in its RR conflict reports.
6568
6569 * tests/torture.at (GNU Cim Grammar): New.
6570 * src/conflicts.c (count_rr_conflicts): Fix.
6571
6572 2002-01-06 Akim Demaille <akim@epita.fr>
6573
6574 Creating package.m4 from configure.ac causes too many problems.
6575
6576 * tests/Makefile.am (package.m4): Create it by hand,
6577 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
6578
6579 2002-01-06 Akim Demaille <akim@epita.fr>
6580
6581 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
6582 skeleton.h.
6583
6584 2002-01-04 Paul Eggert <eggert@twinsun.com>
6585
6586 * doc/bison.texinfo (Debugging):
6587 Remove YYSTDERR; it's no longer defined or used.
6588 Also, s/cstdio.h/cstdio/.
6589
6590 2002-01-03 Akim Demaille <akim@epita.fr>
6591
6592 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
6593
6594 2002-01-03 Akim Demaille <akim@epita.fr>
6595
6596 * src/parse-skel.y (process_skeleton): Don't bind the parser's
6597 tracing code to --trace, wait for a better --trace option, with
6598 args.
6599
6600 2002-01-03 Akim Demaille <akim@epita.fr>
6601
6602 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
6603 The ISO C++ standard is extremely clear about it: stderr is
6604 considered a macro, not a regular symbol (see table 94 `Header
6605 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
6606 Therefore std:: does not apply to it. It still does with fprintf.
6607 Also, s/cstdio.h/cstdio/.
6608
6609 2002-01-03 Akim Demaille <akim@epita.fr>
6610
6611 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
6612 for non system headers.
6613
6614 2002-01-02 Akim Demaille <akim@epita.fr>
6615
6616 Equip the skeleton chain with location tracking, runtime trace,
6617 pure parser and scanner.
6618
6619 * src/parse-skel.y: Request a pure parser, locations, and prefix
6620 renaming.
6621 (%union): Having several members with the same type does not help
6622 type mismatches, simplify.
6623 (YYPRINT, yyprint): New.
6624 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
6625 (skel_error): this.
6626 Handle locations.
6627 * src/scan-skel.l: Adjust to these changes.
6628 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
6629 (LOCATION_PRINT, skel_control_t): New.
6630
6631 2001-12-30 Akim Demaille <akim@epita.fr>
6632
6633 * src/parse-skel.y: Get rid of the shift/reduce conflict:
6634 replace `gb' with BLANKS.
6635 * src/scan-skel.l: Adjust.
6636
6637 2001-12-30 Akim Demaille <akim@epita.fr>
6638
6639 * src/system.h: We don't need nor want bcopy.
6640 Throw away MS-DOS crap: we don't need getpid.
6641 * configure.in: We don't need strndup. It was even causing
6642 problems: because Flex includes the headers *before* us,
6643 _GNU_SOURCE is not defined by config.h, and therefore strndup was
6644 not visible.
6645 * lib/xstrndup.c: New.
6646 * src/scan-skel.l: Use it.
6647 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
6648 * src/parse-skel.y: Use %directives instead of #defines.
6649
6650 2001-12-30 Akim Demaille <akim@epita.fr>
6651
6652 * src/skeleton.h: New.
6653 * src/output.c (output_parser, output_master_parser): Remove, dead
6654 code.
6655 * src/output.h (get_lines_number, actions_output, guards_output)
6656 (token_definitions_output): Prototype them.
6657 * src/parse-skel.y: Add the license notice.
6658 Include output.h and skeleton.h.
6659 (process_skeleton): Returns void, and takes a single parameter.
6660 * src/scan-skel.l: Add the license notice.
6661 Include skeleton.h.
6662 Don't use %option yylineno: it seems that then Flex imagines
6663 REJECT has been used, and therefore it won't reallocate its
6664 buffers (which makes no other sense to me than a bug). It results
6665 in warnings for `unused: yy_flex_realloc'.
6666
6667 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
6668
6669 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6670 (MUSCLE_INSERT_PREFIX): ...to there.
6671 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6672 (MUSCLE_INSERT_PREFIX): Move from here...
6673
6674 * src/bison.hairy: Add a section directive. Put braces around muscle
6675 names. This parser skeleton is still broken, but Bison should not
6676 choke on a bad muscle 'syntax'.
6677 * src/bison.simple: Add a section directive. Put braces around muscle
6678 names.
6679
6680 * src/files.h (strsuffix, stringappend): Add declarations.
6681 (tab_extension): Add declaration.
6682 (short_base_name): Add declaration.
6683
6684 * src/files.c (strsuffix, stringappend): No longer static. These
6685 functions are used in the skeleton parser.
6686 (tab_extension): New.
6687 (compute_base_names): Use the computations done in this function
6688 to guess if the generated parsers should have '.tab' in their
6689 names.
6690 (short_base_name): No longer static.
6691
6692 * src/output.c (output_skeleton): New.
6693 (output): Disable call to output_master_parser, and give a try to
6694 a new skeleton handling system.
6695 (guards_output, actions_output): No longer static.
6696 (token_definitions_output, get_lines_number): No longer static.
6697
6698 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
6699
6700 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
6701 parse-skel.y.
6702
6703 * src/parse-skel.y: New file.
6704 * src/scan-skel.l: New file.
6705
6706 2001-12-29 Akim Demaille <akim@epita.fr>
6707
6708 %name-prefix is broken.
6709
6710 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
6711 Adjust all dependencies.
6712 * tests/headers.at (export YYLTYPE): Strengthen this test: use
6713 %name-prefix.
6714
6715 Renaming yylval but not yylloc is not consistent. Now we do.
6716
6717 * src/bison.simple: Prefix yylloc if used.
6718 * doc/bison.texinfo (Decl Summary): Document that.
6719
6720 2001-12-29 Akim Demaille <akim@epita.fr>
6721
6722 * doc/bison.texinfo: Promote `%long-directive' over
6723 `%long_directive'.
6724 Remove all references to fixed-output-files, yacc is enough.
6725
6726 2001-12-29 Akim Demaille <akim@epita.fr>
6727
6728 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
6729 user prologue. These are defaults.
6730 * tests/actions.at (Mid-rule actions): Make sure the user can
6731 define YYDEBUG and YYERROR_VERBOSE.
6732
6733 2001-12-29 Akim Demaille <akim@epita.fr>
6734
6735 * src/output.c (header_output): Don't forget to export YYLTYPE and
6736 yylloc.
6737 * tests/headers.at (export YYLTYPE): New, make sure it does.
6738 * tests/regression.at (%union and --defines, Invalid CPP headers):
6739 Move to...
6740 * tests/headers.at: here.
6741
6742 2001-12-29 Akim Demaille <akim@epita.fr>
6743
6744 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
6745
6746 2001-12-29 Akim Demaille <akim@epita.fr>
6747
6748 * tests/actions.at (Mid-rule actions): Output on a single line
6749 instead of several.
6750
6751 2001-12-29 Akim Demaille <akim@epita.fr>
6752
6753 * doc/bison.texinfo: Formatting changes.
6754
6755 2001-12-29 Akim Demaille <akim@epita.fr>
6756
6757 Don't store the token defs in a muscle, just be ready to output it
6758 on command. Now possible via `symbols'. Fixes a memory leak.
6759
6760 * src/output.c (token_definitions_output): New.
6761 (output_parser, header_output): Use it.
6762 * src/reader.c (symbols_save): Remove.
6763
6764 2001-12-29 Akim Demaille <akim@epita.fr>
6765
6766 * src/bison.simple: Do not provide a default for YYSTYPE and
6767 YYLTYPE before the user's prologue. Otherwise it's hardly... a
6768 default.
6769
6770 2001-12-29 Akim Demaille <akim@epita.fr>
6771
6772 Mid-rule actions are simply... ignored!
6773
6774 * src/reader.c (readgram): Be sure to attach mid-rule actions to
6775 the empty-rule associated to the dummy symbol, not to the host
6776 rule.
6777 * tests/actions.at (Mid-rule actions): New.
6778
6779 2001-12-29 Akim Demaille <akim@epita.fr>
6780
6781 Memory leak.
6782
6783 * src/reader.c (reader): Free grammar.
6784
6785 2001-12-29 Akim Demaille <akim@epita.fr>
6786
6787 Memory leak.
6788
6789 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
6790 since it allocates it for each state, although only one is needed.
6791 (allocate_storage): Do it here.
6792
6793 2001-12-29 Akim Demaille <akim@epita.fr>
6794
6795 * src/options.h, src/options.c (create_long_option_table): Rename
6796 as...
6797 (long_option_table_new): this, with a clearer prototype.
6798 (percent_table): Remove, unused,
6799 * src/getargs.c (getargs): Adjust.
6800
6801 2001-12-29 Akim Demaille <akim@epita.fr>
6802
6803 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
6804 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
6805 as states.
6806
6807 2001-12-29 Akim Demaille <akim@epita.fr>
6808
6809 * src/lalr.c (build_relations): Rename `states' as `states1'.
6810 Sorry, I don't understand exactly what it is, no better name...
6811
6812 2001-12-29 Akim Demaille <akim@epita.fr>
6813
6814 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
6815 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
6816 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
6817 as rules.
6818
6819 2001-12-29 Akim Demaille <akim@epita.fr>
6820
6821 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
6822 ago.
6823
6824 2001-12-29 Akim Demaille <akim@epita.fr>
6825
6826 * src/reader.c, src/reader.h (user_toknums): Remove.
6827 Adjust all users to use symbols[i]->user_token_number.
6828
6829 2001-12-29 Akim Demaille <akim@epita.fr>
6830
6831 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
6832 Adjust all users to use symbols[i]->prec or ->assoc.
6833
6834 2001-12-29 Akim Demaille <akim@epita.fr>
6835
6836 * src/reader.c, src/reader.h (tags): Remove.
6837 Adjust all users to use symbols[i]->tag.
6838
6839 2001-12-29 Akim Demaille <akim@epita.fr>
6840
6841 * src/gram.h, src/gram.c (symbols): New, similar to state_table
6842 and rule_table.
6843 * src/reader.c (packsymbols): Fill this table.
6844 Drop sprec.
6845 * src/conflicts.c (resolve_sr_conflict): Adjust.
6846 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
6847 single table.
6848 Use symbols[i]->tag instead of tags[i].
6849
6850 2001-12-29 Akim Demaille <akim@epita.fr>
6851
6852 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
6853 In addition, put a comment in there, to replace...
6854 * tests/regression.at (%union and C comments): Remove.
6855
6856 2001-12-29 Akim Demaille <akim@epita.fr>
6857
6858 * tests/regression.at (Web2c Actions): Blindly move the actual
6859 output as expected output. The contents *seem* right to me, but I
6860 can't pretend reading perfectly parser tables... Nonetheless, all
6861 the other tests pass correctly, the table look OK, even though the
6862 presence of `$axiom' is to be noted: AFAICS it is useless (but
6863 harmless).
6864
6865 2001-12-29 Akim Demaille <akim@epita.fr>
6866
6867 * src/reader.c (readgram): Don't add the rule 0 if there were no
6868 rules read. In other words, add it _after_ having performed
6869 grammar sanity checks.
6870 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6871
6872 2001-12-29 Akim Demaille <akim@epita.fr>
6873
6874 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6875 visible, and some states have now a different number.
6876
6877 2001-12-29 Akim Demaille <akim@epita.fr>
6878
6879 * src/reader.c (readgram): Bind the initial rule's lineno to that
6880 of the first rule.
6881 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6882 (Solved SR Conflicts): Adjust rule 0's line number.
6883
6884 2001-12-29 Akim Demaille <akim@epita.fr>
6885
6886 Fix the `GAWK Grammar' failure.
6887
6888 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6889 the reductions of the first state which was mistakenly confused
6890 with the final state because precisely final_state was initialized
6891 to 0.
6892 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6893 now noticed by Bison.
6894 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6895 have a reduction on $default.
6896
6897 2001-12-29 Akim Demaille <akim@epita.fr>
6898
6899 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6900 rule line numbers.
6901 * src/closure.c (print_closure): Likewise.
6902 * src/derives.c (print_derives): Likewise.
6903 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6904 now.
6905
6906 2001-12-29 Akim Demaille <akim@epita.fr>
6907
6908 * src/lalr.c (lookaheads_print): New.
6909 (lalr): Call it when --trace-flag.
6910 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6911 are dumped.
6912
6913 2001-12-29 Akim Demaille <akim@epita.fr>
6914
6915 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6916 when walking through ritem, even via rule->rhs.
6917 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6918 (useful_production, useless_nonterminals): Likewise.
6919 (reduce_grammar_tables): Likewise, plus update nritems.
6920 * src/nullable.c (set_nullable): Likewise.
6921 * src/lalr.c (build_relations): Likewise.
6922 * tests/sets.at (Nullable): Adjust.
6923 Fortunately, now, the $axiom is no longer nullable.
6924
6925 2001-12-29 Akim Demaille <akim@epita.fr>
6926
6927 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6928 the 0-sentinel.
6929 * src/gram.c (ritem_longest_rhs): Likewise.
6930 * src/reduce.c (nonterminals_reduce): Likewise.
6931 * src/print_graph.c (print_graph): Likewise.
6932 * src/output.c (output_rule_data): Likewise.
6933 * src/nullable.c (set_nullable): Likewise.
6934
6935 2001-12-29 Akim Demaille <akim@epita.fr>
6936
6937 * src/output.c: Comment changes.
6938
6939 2001-12-27 Paul Eggert <eggert@twinsun.com>
6940
6941 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6942 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6943 Sparc, as they were causing more porting problems than the
6944 (minor) performance improvement was worth.
6945
6946 Also, catch up with 1.31's YYSTD.
6947
6948 2001-12-27 Akim Demaille <akim@epita.fr>
6949
6950 * src/output.c (output_gram): Rely on nritems, not the
6951 0-sentinel. See below.
6952 Use -1 as separator, not 0.
6953 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6954 Rely on -1 as separator in yyrhs, instead of 0.
6955 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6956 twice `Now at end of input', therefore there are two lines less to
6957 expect.
6958
6959 2001-12-27 Akim Demaille <akim@epita.fr>
6960
6961 * tests/regression.at (Unresolved SR Conflicts):
6962 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6963 below.
6964
6965 2001-12-27 Akim Demaille <akim@epita.fr>
6966
6967 * src/LR0.c (new_state): Recognize the final state by the fact it
6968 is reached by eoftoken.
6969 (insert_start_shifting_state, insert_eof_shifting_state)
6970 (insert_accepting_state, augment_automaton): Remove, since now
6971 these states are automatically computed from the initial state.
6972 (generate_states): Adjust.
6973 * src/print.c: When reporting a rule number to the user, substract
6974 1, so that the axiom rule is rule 0, and the first user rule is 1.
6975 * src/reduce.c: Likewise.
6976 * src/print_graph.c (print_core): For the time being, just as for
6977 the report, depend upon --trace-flags to dump the full set of
6978 items.
6979 * src/reader.c (readgram): Once the grammar read, insert the rule
6980 0: `$axiom: START-SYMBOL $'.
6981 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6982 number of the states has changed (the final state is no longer
6983 necessarily the last), catch up.
6984
6985 2001-12-27 Akim Demaille <akim@epita.fr>
6986
6987 Try to make the use of the eoftoken valid. Given that its value
6988 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6989 is used instead of > 0 where appropriate, (ii), depend upon nritems
6990 instead of the 0-sentinel.
6991
6992 * src/gram.h, src/gram.c (nritems): New.
6993 Expected to be duplication of nitems, but for the time being...
6994 * src/reader.c (packgram): Assert nritems and nitems are equal.
6995 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6996 * src/closure.c (print_closure, print_fderives): Likewise.
6997 * src/gram.c (ritem_print): Likewise.
6998 * src/print.c (print_core, print_grammar): Likewise.
6999 * src/print_graph.c: Likewise.
7000
7001 2001-12-27 Akim Demaille <akim@epita.fr>
7002
7003 * src/main.c (main): If there are complains after grammar
7004 reductions, then output the report anyway if requested, then die.
7005 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
7006 * src/reader.c (eoftoken): New.
7007 (parse_token_decl): If the token being defined has value `0', it
7008 is the eoftoken.
7009 (packsymbols): No longer hack `tags' to insert `$' by hand.
7010 Be sure to preserve the value of the eoftoken.
7011 (reader): Make sure eoftoken is defined.
7012 Initialize nsyms to 0: now eoftoken is created just like the others.
7013 * src/print.c (print_grammar): Don't special case the eof token.
7014 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
7015 lie anyway, albeit pleasant.
7016 * tests/calc.at: Exercise error messages with eoftoken.
7017 Change the grammar so that empty input is invalid.
7018 Adjust expectations.
7019 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
7020
7021 2001-12-27 Akim Demaille <akim@epita.fr>
7022
7023 * configure.in: Check the protos of strchr ans strspn.
7024 Replace strchr if needed.
7025 * src/system.h: Provide the protos of strchr, strspn and memchr if
7026 missing.
7027 * lib/strchr.c: New.
7028 * src/reader.c (symbols_save): Use strchr.
7029
7030 2001-12-27 Akim Demaille <akim@epita.fr>
7031
7032 * src/print.c, src/print_graph.c (escape): New.
7033 Use it to quote the TAGS outputs.
7034 * src/print_graph.c (print_state): Now errors are in red, and
7035 reductions in green.
7036 Prefer high to wide: output the state number on a line of its own.
7037
7038 2001-12-27 Akim Demaille <akim@epita.fr>
7039
7040 * src/state.h, src/state.c (reductions_new): New.
7041 * src/LR0.c (set_state_table): Let all the states have a
7042 `reductions', even if reduced to 0.
7043 (save_reductions): Adjust.
7044 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
7045 * src/print.c (print_reductions, print_actions): Adjust.
7046 * src/output.c (action_row): Adjust.
7047
7048 2001-12-27 Akim Demaille <akim@epita.fr>
7049
7050 * src/state.h, src/state.c (errs_new, errs_dup): New.
7051 * src/LR0.c (set_state_table): Let all the states have an errs,
7052 even if reduced to 0.
7053 * src/print.c (print_errs, print_reductions): Adjust.
7054 * src/output.c (output_actions, action_row): Adjust.
7055 * src/conflicts.c (resolve_sr_conflict): Adjust.
7056
7057 2001-12-27 Akim Demaille <akim@epita.fr>
7058
7059 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
7060
7061 2001-12-27 Akim Demaille <akim@epita.fr>
7062
7063 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
7064 * src/print.c: here.
7065 (lookaheadset, shiftset): New, used as additional storage by
7066 print_reductions.
7067 (print_results): Adjust.
7068 (print_shifts, print_gotos, print_errs): New, extracted from...
7069 (print_actions): here.
7070 * src/print_graph.c (print_actions): Remove dead code.
7071
7072 2001-12-27 Akim Demaille <akim@epita.fr>
7073
7074 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
7075 `$n' and `@n'.
7076
7077 2001-12-27 Akim Demaille <akim@epita.fr>
7078
7079 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
7080 (build_relations): Adjust.
7081
7082 2001-12-27 Akim Demaille <akim@epita.fr>
7083
7084 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
7085 duplication.
7086
7087 2001-12-27 Akim Demaille <akim@epita.fr>
7088
7089 * src/reader.c (packgram): Catch nitems overflows.
7090
7091 2001-12-27 Akim Demaille <akim@epita.fr>
7092
7093 * src/files.c, src/files.h (guard_obstack): Remove.
7094 * src/output.c (output): Adjust.
7095 * src/reader.c (parse_braces): New, factoring...
7096 (copy_action, copy_guard): these two which are renamed as...
7097 (parse_action, parse_guard): these.
7098 As a voluntary consequence, using braces around guards is now
7099 mandatory.
7100
7101 2001-12-27 Akim Demaille <akim@epita.fr>
7102
7103 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
7104 * src/reader.c (symbol_list): `guard' and `guard_line' are new
7105 members.
7106 (symbol_list_new): Adjust.
7107 (copy_action): action_line is the first line, not the last.
7108 (copy_guard): Just as for actions, store the `action' only, not
7109 the switch/case/break flesh.
7110 Don't parse the user action that might follow the guard, let...
7111 (readgram): do it, i.e., now, there can be an action after a
7112 guard.
7113 In other words the guard is just explicitly optional.
7114 (packgram): Adjust.
7115 * src/output.c (guards_output): New.
7116 (output_parser): Call it when needed.
7117 (output): Also free the guard and attrs obstacks.
7118 * src/files.c, src/files.h (obstack_save): Remove.
7119 (output_files): Remove.
7120 As a result, if one needs the former `.act' file, using an
7121 appropriate skeleton which requires actions and guards is now
7122 required.
7123 * src/main.c (main): Adjust.
7124 * tests/semantic.at: New.
7125 * tests/regression.at: Use `input.y' as input file name.
7126 Avoid 8+3 problems by requiring input.c when the test needs the
7127 parser.
7128
7129 2001-12-27 Akim Demaille <akim@epita.fr>
7130
7131 * src/reader.c (symbol_list_new): Be sure to initialize all the
7132 fields.
7133
7134 2001-12-27 Akim Demaille <akim@epita.fr>
7135
7136 All the hacks using a final pseudo state are now useless.
7137
7138 * src/LR0.c (set_state_table): state_table holds exactly nstates.
7139 * src/lalr.c (nLA): New.
7140 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
7141 instead of lookaheadsp from the pseudo state (nstate + 1).
7142
7143 2001-12-27 Akim Demaille <akim@epita.fr>
7144
7145 * src/output.c (action_row, token_actions): Use a state_t instead
7146 of a integer, and nlookaheads instead of the following state's
7147 lookaheadsp.
7148
7149 2001-12-27 Akim Demaille <akim@epita.fr>
7150
7151 * src/conflicts.c (log_resolution, flush_shift)
7152 (resolve_sr_conflict, set_conflicts, solve_conflicts)
7153 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
7154 (conflicts_print, print_reductions): Use a state_t instead of an
7155 integer when referring to a state.
7156 As much as possible, depend upon nlookaheads, instead of the
7157 `lookaheadsp' member of the following state (since lookaheads of
7158 successive states are successive, the difference between state n + 1
7159 and n served as the number of lookaheads for state n).
7160 * src/lalr.c (add_lookback_edge): Likewise.
7161 * src/print.c (print_core, print_actions, print_state)
7162 (print_results): Likewise.
7163 * src/print_graph.c (print_core, print_actions, print_state)
7164 (print_graph): Likewise.
7165 * src/conflicts.h: Adjust.
7166
7167 2001-12-27 Akim Demaille <akim@epita.fr>
7168
7169 * src/bison.hairy: Formatting/comment changes.
7170 ANSIfy.
7171 Remove `register' indications.
7172 Add plenty of `static'.
7173
7174 2001-12-27 Akim Demaille <akim@epita.fr>
7175
7176 * src/output.c (prepare): Drop the muscle `ntbase' which
7177 duplicates ntokens.
7178 * src/bison.simple: Formatting/comment changes.
7179 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
7180 is an undocumented synonym.
7181
7182 2001-12-22 Akim Demaille <akim@epita.fr>
7183
7184 * src/output.c (output_table_data): Change the prototype to use
7185 `int' for array ranges: some invocations do pass an int, not a
7186 short.
7187 Reported by Wayne Green.
7188
7189 2001-12-22 Akim Demaille <akim@epita.fr>
7190
7191 Some actions of web2c.y are improperly triggered.
7192 Reported by Mike Castle.
7193
7194 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
7195 * tests/regression.at (Web2c): Rename as...
7196 (Web2c Report): this.
7197 (Web2c Actions): New.
7198
7199 2001-12-22 Akim Demaille <akim@epita.fr>
7200
7201 Reductions in web2c.y are improperly reported.
7202 Reported by Mike Castle.
7203
7204 * src/conflicts.c (print_reductions): Fix.
7205 * tests/regression.at (Web2c): New.
7206
7207 2001-12-18 Akim Demaille <akim@epita.fr>
7208
7209 Some host fail on `assert (!"foo")', which expands to
7210 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
7211 Reported by Nelson Beebee.
7212
7213 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
7214 `#define it_succeeded 0' and `assert (it_succeeded)'.
7215
7216 2001-12-17 Marc Autret <autret_m@epita.fr>
7217
7218 * src/bison.simple: Don't hard code the skeleton line and filename.
7219 * src/output.c (output_parser): Rename 'line' as 'output_line'.
7220 New line counter 'skeleton_line' (skeleton-line muscle).
7221
7222 2001-12-17 Paul Eggert <eggert@twinsun.com>
7223
7224 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
7225 YYDEBUG must be defined to a nonzero value.
7226
7227 * src/bison.simple (yytname): Do not assume that the user defines
7228 YYDEBUG to a properly parenthesized expression.
7229
7230 2001-12-17 Akim Demaille <akim@epita.fr>
7231
7232 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
7233 nlookaheads is a new member.
7234 Adjust all users.
7235 * src/lalr.h (nlookaheads): Remove this orphan declaration.
7236 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
7237 state.
7238
7239 2001-12-17 Akim Demaille <akim@epita.fr>
7240
7241 * src/files.h, src/files.c (open_files, close_files): Remove.
7242 * src/main.c (main): Don't open/close files, nor invoke lex_free,
7243 let...
7244 * src/reader.c (reader): Do it.
7245
7246 2001-12-17 Akim Demaille <akim@epita.fr>
7247
7248 * src/conflicts.c (print_reductions): Formatting changes.
7249
7250 2001-12-17 Akim Demaille <akim@epita.fr>
7251
7252 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
7253 (flush_reduce): New.
7254 (resolve_sr_conflict): Adjust.
7255
7256 2001-12-17 Akim Demaille <akim@epita.fr>
7257
7258 * src/output.c (output_obstack): Be static and rename as...
7259 (format_obstack): this, to avoid any confusion with files.c's
7260 output_obstack.
7261 * src/reader.h (muscle_obstack): Move to...
7262 * src/output.h: here, since it's defined in output.c.
7263
7264 2001-12-17 Akim Demaille <akim@epita.fr>
7265
7266 * src/output.c (action_row, save_column, default_goto)
7267 (sort_actions, matching_state, pack_vector): Better variable
7268 locality.
7269
7270 2001-12-17 Akim Demaille <akim@epita.fr>
7271
7272 * src/output.c: Various formatting changes.
7273
7274 2001-12-17 Akim Demaille <akim@epita.fr>
7275
7276 * src/files.c (output_files): Free the output_obstack.
7277 * src/main.c (main): Call print and print_graph conditionally.
7278 * src/print.c (print): Work unconditionally.
7279 * src/print_graph.c (print_graph): Work unconditionally.
7280 * src/conflicts.c (log_resolution): Output only if verbose_flag.
7281
7282 2001-12-16 Marc Autret <autret_m@epita.fr>
7283
7284 * src/output.c (actions_output): Fix. When we use %no-lines,
7285 there is one less line per action.
7286
7287 2001-12-16 Marc Autret <autret_m@epita.fr>
7288
7289 * src/bison.simple: Remove a useless #line directive.
7290 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
7291 * src/output.c (get_lines_number): New.
7292 (output_parser): Adjust, now takes care about the lines of a
7293 output muscles.
7294 Fix line numbering.
7295 (actions_output): Computes the number of lines taken by actions.
7296 (output_master_parser): Insert new skeleton which is the name of
7297 the output parser file name.
7298
7299 2001-12-15 Marc Autret <autret_m@epita.fr>
7300
7301 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
7302
7303 2001-12-15 Marc Autret <autret_m@epita.fr>
7304
7305 * src/output.c (output_gram): Keep track of the hairy one.
7306
7307 2001-12-15 Akim Demaille <akim@epita.fr>
7308
7309 Make `make distcheck' work.
7310
7311 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
7312 system.h which uses libgettext.h.
7313
7314 2001-12-15 Akim Demaille <akim@epita.fr>
7315
7316 * src/nullable.c (set_nullable): Useless rules must be skipped,
7317 otherwise, since we range over their symbols, we might look at a
7318 nonterminal which no longer ``exists'', i.e., it is not counted in
7319 `nvars', hence we overflow our arrays.
7320
7321 2001-12-15 Akim Demaille <akim@epita.fr>
7322
7323 The header can also be produced directly, without any obstack!
7324 Yahoo!
7325
7326 * src/files.c, src/files.h (defines_obstack): Remove.
7327 (compute_header_macro): Global.
7328 (defines_obstack_save): Remove.
7329 * src/reader.c (parse_union_decl): No longer output to
7330 defines_obstack: its content can be found in the `stype' muscle
7331 anyway.
7332 (output_token_translations): Merge into...
7333 (symbols_output): this.
7334 Rename as...
7335 (symbols_save): this.
7336 (reader): Adjust.
7337 * src/output.c (header_output): New.
7338 (output): Call it.
7339
7340 2001-12-15 Akim Demaille <akim@epita.fr>
7341
7342 * src/reader.c (parse_union_decl): Instead of handling two obstack
7343 simultaneously, use one to define the `stype' muscle, and use the
7344 value of the latter to fill defines_obstack.
7345 (copy_comment): Remove.
7346 (copy_comment2): Work for a single obstack.
7347 Rename as...
7348 (copy_comment): this.
7349
7350 2001-12-15 Akim Demaille <akim@epita.fr>
7351
7352 * src/lex.c, src/lex.h (xgetc): No longer static.
7353 * src/reader.c (parse_union_decl): Revamp.
7354
7355 2001-12-15 Akim Demaille <akim@epita.fr>
7356
7357 Still making progress in separating Bison into (i) input, (ii)
7358 process, (iii) output: now we can directly output the parser file
7359 without using table_obstack at all.
7360
7361 * src/files.c, src/files.h (table_obstack): Bye bye.
7362 (parser_file_name): New.
7363 * src/files.c (compute_output_file_names): Compute it.
7364 * src/output.c (actions_output, output_parser)
7365 (output_master_parser): To a file instead of an obstack.
7366
7367 2001-12-15 Akim Demaille <akim@epita.fr>
7368
7369 Attach actions to rules, instead of pre-outputting them to
7370 actions_obstack.
7371
7372 * src/gram.h (rule_t): action and action_line are new members.
7373 * src/reader.c (symbol_list): Likewise.
7374 (copy_action): Save the actions within the rule.
7375 (packgram): Save them in rule_table.
7376 * src/output.c (actions_output): New.
7377 (output_parser): Use it on `%%actions'.
7378 (output_rule_data): Don't free rule_table.
7379 (output): Do it.
7380 (prepare): Don't save the `action' muscle.
7381 * src/bison.simple: s/%%action/%%actions/.
7382
7383 2001-12-15 Akim Demaille <akim@epita.fr>
7384
7385 * src/reader.c (copy_action): When --yacc, don't append a `;'
7386 to the user action: let it fail if lacking.
7387 Suggested by Arnold Robbins and Tom Tromey.
7388
7389 2001-12-14 Akim Demaille <akim@epita.fr>
7390
7391 * src/lex.c (literalchar): Simply return the char you decoded, non
7392 longer mess around with obstacks and int pointers.
7393 Adjust all callers.
7394
7395 2001-12-14 Akim Demaille <akim@epita.fr>
7396
7397 * src/lex.c (literalchar): Don't escape the special characters,
7398 just decode them, and keep them as char (before, eol was output as
7399 the 2 char string `\n' etc.).
7400 * src/output.c (output_rule_data): Use quotearg to output the
7401 token strings.
7402
7403 2001-12-13 Paul Eggert <eggert@twinsun.com>
7404
7405 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
7406 Do not infringe on the global user namespace when using C++.
7407 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
7408 All uses of `fprintf' and `stderr' changed.
7409
7410 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
7411
7412 2001-12-13 Akim Demaille <akim@epita.fr>
7413
7414 The computation of nullable is broken: it doesn't handle empty
7415 RHS's properly.
7416
7417 * tests/torture.at (GNU AWK Grammar): New.
7418 * tests/sets.at (Nullable): New.
7419 * src/nullable.c (set_nullable): Instead of blindly looping over
7420 `ritems', loop over the rules, and then over their rhs's.
7421
7422 Work around Autotest bugs.
7423
7424 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
7425 frame, because Autotest understand lines starting with a `+' as
7426 traces from the shell. Then, they are not processed properly.
7427 Admittedly an Autotest bug, but we don't have time to wait for
7428 Autotest to catch up.
7429 * tests/regression.at (Broken Closure): Adjust to the new table
7430 frames.
7431 Move to...
7432 * tests/sets.at: here.
7433
7434 2001-12-13 Akim Demaille <akim@epita.fr>
7435
7436 * src/closure.c (closure): Use nrules instead of playing tricks
7437 with BITS_PER_WORD.
7438
7439 2001-12-13 Akim Demaille <akim@epita.fr>
7440
7441 * src/print.c (print_actions): Output the handling of `$' as the
7442 traces do: shifting the token EOF. Before EOF was treated as a
7443 nonterminal.
7444 * tests/regression.at: Adjust some tests.
7445 * src/print_graph.c (print_core): Complete the set of items via
7446 closure. The next-to-final and final states are still unsatisfying,
7447 but that's to be addressed elsewhere.
7448 No longer output the rule numbers, but do output the state number.
7449 A single loop for the shifts + gotos is enough, but picked a
7450 distinct color for each.
7451 (print_graph): Initialize and finalize closure.
7452
7453 2001-12-13 Akim Demaille <akim@epita.fr>
7454
7455 * src/reader.c (readgram): Remove dead code, an strip useless
7456 braces.
7457 (get_type): Remove, unused.
7458
7459 2001-12-12 Akim Demaille <akim@epita.fr>
7460
7461 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
7462 on that of lib/error.c.
7463
7464 2001-12-12 Akim Demaille <akim@epita.fr>
7465
7466 Some hosts don't like `/' in includes.
7467
7468 * src/system.h: Include libgettext.h without qualifying the path.
7469 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
7470 $(top_srcdir).
7471
7472 2001-12-11 Marc Autret <autret_m@epita.fr>
7473
7474 * src/output.c (output_parser): Remove useless muscle.
7475
7476 2001-12-11 Marc Autret <autret_m@epita.fr>
7477
7478 * src/bison.simple: Remove #line just before %%epilogue. It
7479 is now handled in ...
7480 * src/reader.c (read_additionnal_code): Add the output of a
7481 #line for the epilogue.
7482
7483 2001-12-10 Marc Autret <autret_m@epita.fr>
7484
7485 * src/reader.c (copy_definition): Re-use CPP-outed code which
7486 replace precedent remove.
7487 * src/bison.simple: Remove #line before %%prologue because
7488 %%input-line is wrong at this time.
7489
7490 2001-12-10 Marc Autret <autret_m@epita.fr>
7491
7492 * src/reader.c (symbols_output): Clean up.
7493 * src/output.c (output_gram, output): Clean up.
7494
7495 2001-12-10 Akim Demaille <akim@epita.fr>
7496
7497 * src/lalr.c (initialize_lookaheads): New. Extracted from...
7498 * src/LR0.c (set_state_table): here.
7499 * src/lalr.c (lalr): Call it.
7500
7501 2001-12-10 Akim Demaille <akim@epita.fr>
7502
7503 * src/state.h (shifts): Remove the `number' member: shifts are
7504 attached to state, hence no longer need to be labelled with a
7505 state number.
7506
7507 2001-12-10 Akim Demaille <akim@epita.fr>
7508
7509 Now that states have a complete set of members, the linked list of
7510 shifts is useless: just fill directly the state's shifts member.
7511
7512 * src/state.h (shifts): Remove the `next' member.
7513 * src/LR0.c (first_state, last_state): Remove.
7514 Adjust the callers.
7515 (augment_automaton): Don't look for the shifts that must be added
7516 a shift on EOF: it is those of the state we looked for! But now,
7517 since shifts are attached, it is no longer needed to looking
7518 merely by its id: its number.
7519
7520 2001-12-10 Akim Demaille <akim@epita.fr>
7521
7522 * src/LR0.c (augment_automaton): Better variable locality.
7523 Remove an impossible branch: if there is a state corresponding to
7524 the start symbol being shifted, then there is shift for the start
7525 symbol from the initial state.
7526
7527 2001-12-10 Akim Demaille <akim@epita.fr>
7528
7529 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
7530 only when appropriate: when insert_start_shifting_state' is not
7531 invoked.
7532 * tests/regression.at (Rule Line Numbers): Adjust.
7533
7534 2001-12-10 Akim Demaille <akim@epita.fr>
7535
7536 * src/LR0.c (augment_automaton): Now that all states have shifts,
7537 merge the two cases addition shifts to the initial state.
7538
7539 2001-12-10 Akim Demaille <akim@epita.fr>
7540
7541 * src/lalr.c (set_state_table): Move to...
7542 * src/LR0.c: here.
7543 * src/lalr.c (lalr): Don't call it...
7544 * src/LR0.c (generate_states): do it.
7545 * src/LR0.h (first_state): Remove, only the table is used.
7546
7547 2001-12-10 Akim Demaille <akim@epita.fr>
7548
7549 * src/LR0.h (first_shift, first_reduction): Remove.
7550 * src/lalr.c: Don't use first_shift: find shifts through the
7551 states.
7552
7553 2001-12-10 Akim Demaille <akim@epita.fr>
7554
7555 * src/LR0.c: Attach shifts to states as soon as they are
7556 computed.
7557 * src/lalr.c (set_state_table): Instead of assigning shifts to
7558 state, just assert that the mapping was properly done.
7559
7560 2001-12-10 Akim Demaille <akim@epita.fr>
7561
7562 * src/LR0.c (insert_start_shift): Rename as...
7563 (insert_start_shifting_state): this.
7564 (insert_eof_shifting_state, insert_accepting_state): New.
7565 (augment_automaton): Adjust.
7566 Better locality of the variables.
7567 When looking if the start_symbol is shifted from the initial
7568 state, using `while (... symbol != start_symbol ...)' sounds
7569 better than `while (... symbol < start_symbol ...)': If fail
7570 to see how the order between symbols could be relevant!
7571
7572 2001-12-10 Akim Demaille <akim@epita.fr>
7573
7574 * src/getargs.h: Don't declare `spec_name_prefix' and
7575 `spec_file_prefix', declared by src/files.h.
7576 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
7577 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
7578 * src/output.c (prepare): Adjust.
7579 * src/reader.c (symbols_output): Likewise.
7580 * src/vmsgetargs.c: Vaguely adjust, but who cares?
7581
7582 2001-12-10 Akim Demaille <akim@epita.fr>
7583
7584 * src/muscle_tab.c (muscle_init): NULL is a better default than
7585 `"0"'.
7586
7587 2001-12-10 Akim Demaille <akim@epita.fr>
7588
7589 * src/reader.c (reader): Calling symbols_output once is enough.
7590
7591 2001-12-10 Akim Demaille <akim@epita.fr>
7592
7593 Now that states have a complete set of members, the linked list of
7594 reductions is useless: just fill directly the state's reductions
7595 member.
7596
7597 * src/state.h (struct reductions): Remove member `number' and
7598 `next'.
7599 * src/LR0.c (first_reduction, last_reduction): Remove.
7600 (save_reductions): Don't link the new reductions, store them in
7601 this_state.
7602 * src/lalr.c (set_state_table): No need to attach reductions to
7603 states, it's already done.
7604 * src/output.c (output_actions): No longer free the shifts, then
7605 the reductions, then the states: free all the states and their
7606 members.
7607
7608 2001-12-10 Akim Demaille <akim@epita.fr>
7609
7610 * src/options.c (OPTN, DRTV, BOTH): New.
7611 (option_table): Use them.
7612
7613 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
7614 the job of system.h.
7615 * src/options.c: Don't include stdio.h and xalloc.h for the same
7616 reasons.
7617
7618 2001-12-10 Akim Demaille <akim@epita.fr>
7619
7620 * src/output.c (output, prepare): Make sure the values of the
7621 muscles `action' and `prologue' are 0-terminated.
7622
7623 2001-12-10 Akim Demaille <akim@epita.fr>
7624
7625 Clean up GCC warnings.
7626
7627 * src/reader.c (copy_action): `buf' is not used.
7628 (parse_skel_decl): Be static.
7629 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
7630 * src/options.h (create_long_option_table): Have a real prototype.
7631 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
7632 (hash_delete_at): Return const void *.
7633 Adjust casts to preserve the const.
7634
7635 2001-12-10 Akim Demaille <akim@epita.fr>
7636
7637 * configure.in: Require 2.52g.
7638 M4 is not needed, but AUTOM4TE is.
7639 * m4/m4.m4: Remove.
7640 * tests/Makefile.am: Adjust.
7641
7642 2001-12-10 Akim Demaille <akim@epita.fr>
7643
7644 One structure for states is enough, even though theoretically
7645 there are LR(0) states and LALR(1) states.
7646
7647 * src/lalr.h (state_t): Remove.
7648 (state_table): Be state_t **, not state_t *.
7649 * src/state.h (core, CORE_ALLOC): Rename as...
7650 (state_t, STATE_ALLOC): this.
7651 Add the LALR(1) members: shifts, reductions, errs.
7652 * src/LR0.c (state_table): Rename as...
7653 (state_hash): this, to avoid name clashes with the global
7654 `state_table'.
7655 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
7656 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
7657
7658 2001-12-10 Akim Demaille <akim@epita.fr>
7659
7660 Bison dumps core on bash.y.
7661 Reported by Pascal Bart.
7662
7663 * src/warshall.c (bitmatrix_print): New.
7664 (TC): Use it.
7665 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
7666 j must be the outer loop.
7667 * tests/regression.at (Broken Closure): New.
7668
7669 2001-12-05 Akim Demaille <akim@epita.fr>
7670
7671 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
7672 its argument.
7673 Reported by Peter Hamorsky.
7674
7675 2001-12-05 Akim Demaille <akim@epita.fr>
7676
7677 * src/conflicts.c (err_table): Remove.
7678 (resolve_sr_conflict): Adjust.
7679 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
7680 Rename as...
7681 (state_t.reductions, state_t.shifts): this.
7682
7683 2001-12-05 Akim Demaille <akim@epita.fr>
7684
7685 * src/reduce.c (reduce_grammar_tables): No longer disable the
7686 removal of useless rules via CPP but via `if (0)', so that the
7687 compiler still check the code is valid.
7688 For instance, it should have noticed `rline' no longer exists: use
7689 the `line' member of rule_t.
7690 * src/gram.c (dummy, rline): Remove, unused.
7691
7692 2001-12-05 Akim Demaille <akim@epita.fr>
7693
7694 * src/output.c (pack_vector): Use assert, not berror.
7695 * src/main.c (berror): Remove, unused.
7696
7697 2001-12-05 Akim Demaille <akim@epita.fr>
7698
7699 New experimental feature: if --verbose --trace output all the
7700 items of a state, not only its kernel.
7701
7702 * src/print.c (print_core): If `trace_flag', then invoke closure
7703 before outputting the items of the state (print_core is no longer
7704 a correct name them).
7705 (print_results): Invoke new_closure/free_closure if needed.
7706
7707 2001-12-05 Akim Demaille <akim@epita.fr>
7708
7709 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
7710 * src/closure.c, src/closure.h (itemsetsize): Rename as...
7711 (nitemset): for consistency with the rest of the project.
7712
7713 2001-12-05 Akim Demaille <akim@epita.fr>
7714
7715 * src/closure.c (print_closure): Improve.
7716 (closure): Use it for printing input and output.
7717
7718 2001-12-05 Akim Demaille <akim@epita.fr>
7719
7720 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
7721 indexed by nonterminals.
7722
7723 2001-12-05 Akim Demaille <akim@epita.fr>
7724
7725 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
7726 what it was!).
7727 * src/warshall.h: Remove accidental duplication of the content.
7728
7729 2001-12-05 Akim Demaille <akim@epita.fr>
7730
7731 * src/closure.c (set_fderives): De-obfuscate.
7732
7733 2001-12-05 Akim Demaille <akim@epita.fr>
7734
7735 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
7736
7737 2001-12-05 Akim Demaille <akim@epita.fr>
7738
7739 * src/closure.c (set_firsts): De-obfuscate.
7740
7741 2001-12-05 Akim Demaille <akim@epita.fr>
7742
7743 * src/output.c (action_row): De-obfuscate
7744 using the good o' techniques: arrays not pointers, variable
7745 locality, BITISSET, RESETBIT etc.
7746
7747 2001-12-05 Akim Demaille <akim@epita.fr>
7748
7749 Pessimize the code to simplify it: from now on, all the states
7750 have a valid SHIFTS, which NSHIFTS is possibly 0.
7751
7752 * src/LR0.c (shifts_new): Be global and move to..
7753 * src/state.c, src/state.h: here.
7754 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
7755 * src/print_graph: Adjust.
7756
7757 2001-12-05 Akim Demaille <akim@epita.fr>
7758
7759 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
7760 * src/conflicts.c: Use it.
7761 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
7762 incorrectly ``simplified''.
7763
7764 2001-12-05 Akim Demaille <akim@epita.fr>
7765
7766 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
7767 using the good o' techniques: arrays not pointers, variable
7768 locality, BITISSET, RESETBIT etc.
7769
7770 2001-12-05 Akim Demaille <akim@epita.fr>
7771
7772 * src/state.h (SHIFT_SYMBOL): New.
7773 * src/conflicts.c: Use it to deobfuscate.
7774
7775 2001-12-05 Akim Demaille <akim@epita.fr>
7776
7777 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
7778 (print_reductions): De-obfuscate using the good o' techniques:
7779 arrays not pointers, variable locality, BITISSET.
7780
7781 2001-12-05 Akim Demaille <akim@epita.fr>
7782
7783 * src/conflicts.c (print_reductions): Arrays, not pointers.
7784 Use BITISSET.
7785
7786 2001-12-05 Akim Demaille <akim@epita.fr>
7787
7788 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7789
7790 2001-12-05 Akim Demaille <akim@epita.fr>
7791
7792 * src/conflicts.c (print_reductions): Improve variable locality.
7793
7794 2001-12-05 Akim Demaille <akim@epita.fr>
7795
7796 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7797
7798 2001-12-05 Akim Demaille <akim@epita.fr>
7799
7800 * src/conflicts.c (print_reductions): Improve variable locality.
7801
7802 2001-12-05 Akim Demaille <akim@epita.fr>
7803
7804 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
7805 * src/lalr.c: Use them.
7806
7807 2001-12-05 Akim Demaille <akim@epita.fr>
7808
7809 * src/LR0.c (augment_automaton): Formatting changes.
7810 Better variable locality.
7811
7812 2001-12-05 Akim Demaille <akim@epita.fr>
7813
7814 * src/lalr.c (matrix_print): New.
7815 (transpose): Use it.
7816 Use arrays instead of pointers.
7817
7818 2001-12-05 Akim Demaille <akim@epita.fr>
7819
7820 * src/lalr.c (maxrhs): Move to...
7821 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
7822 * src/lalr.c (build_relations): Adjust.
7823
7824 2001-12-05 Akim Demaille <akim@epita.fr>
7825
7826 * src/lalr.c (transpose): Free the memory allocated to the
7827 argument, as it is replaced by the results by the unique caller.
7828 (build_relations): Merely invoke transpose: it handles the memory
7829 deallocation.
7830 Improve variable locality.
7831 Avoid variables used as mere abbreviations.
7832 (compute_lookaheads): Use arrays instead of pointers.
7833
7834 2001-12-05 Akim Demaille <akim@epita.fr>
7835
7836 * src/lalr.c (initialize_F): Improve variable locality.
7837 Avoid variables used as mere abbreviations.
7838
7839 2001-12-05 Akim Demaille <akim@epita.fr>
7840
7841 * src/derives.c (print_derives): Display the ruleno.
7842 * src/lalr.c (initialize_F, transpose): Better variable locality
7843 to improve readability.
7844 Avoid variables used as mere abbreviations.
7845
7846 2001-12-05 Akim Demaille <akim@epita.fr>
7847
7848 * src/lalr.c (traverse): Use arrays instead of pointers.
7849
7850 2001-12-05 Akim Demaille <akim@epita.fr>
7851
7852 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
7853 the handling of squeue.
7854 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7855
7856 2001-12-05 Akim Demaille <akim@epita.fr>
7857
7858 Because useless nonterminals are now kept alive (instead of being
7859 `destroyed'), we now sometimes examine them, and store information
7860 related to them. Hence we need to know their number, and adjust
7861 memory allocations.
7862
7863 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7864 static.
7865 * src/LR0.c (allocate_itemsets): The memory allocated to
7866 `symbol_count' was used for two different purpose: once to count
7867 the number of occurrences of each symbol, and later reassigned to
7868 `shift_symbol', containing the symbol that can be shifted from a
7869 given state.
7870 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7871 only, and...
7872 (new_itemsets): Allocate `shift_symbol' here.
7873 (allocate_itemsets): symbol_count includes useless nonterminals.
7874 Make room for them.
7875 (free_storage): Use `free', not `XFREE', for pointers that cannot
7876 be null.
7877
7878 2001-12-05 Akim Demaille <akim@epita.fr>
7879
7880 * src/nullable.c (set_nullable): Deobfuscate the handling of
7881 ritem.
7882 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7883
7884 2001-12-05 Akim Demaille <akim@epita.fr>
7885
7886 * src/gram.c, src/gram.h (ritem_print): New.
7887 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7888 (This useless function was defined only to work around VMS linkers
7889 that can't handle compilation units with variables only).
7890 * src/reduce.c (dump_grammar): Use it to trace the construction of
7891 ritem.
7892
7893 2001-12-04 Paul Eggert <eggert@twinsun.com>
7894
7895 * src/bison.simple (union yyalloc): Change member names
7896 to be the same as the stack names.
7897 (yyparse): yyptr is now union yyalloc *, not char *.
7898 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7899 and may generate better code on some machines.
7900 (yystpcpy): Use prototype if __STDC__ is defined, not just
7901 if __cplusplus is defined.
7902
7903 2001-11-30 Akim Demaille <akim@epita.fr>
7904
7905 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7906 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7907 Gettext doesn't compile cleanly, and dies with -Werror.
7908 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7909 Include WARNING_CFLAGS here.
7910 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7911 before being defined.
7912
7913 2001-11-27 Paul Eggert <eggert@twinsun.com>
7914
7915 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7916 First arg is int, not unsigned.
7917 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7918 (SIZE_MAX, UINT_MAX): New macros.
7919 (quotearg_n_options): Abort if N is negative.
7920 Avoid overflow check on hosts where size_t is 64 bits and int
7921 is 32 bits, as overflow is impossible there.
7922 Fix off-by-one typo that caused unnecessary reallocation.
7923
7924 2001-11-29 Paul Eggert <eggert@twinsun.com>
7925
7926 Name space cleanup in generated parser.
7927
7928 * doc/bison.texinfo (Bison Parser): Discuss system headers
7929 and their effect on the user name space.
7930
7931 * src/bison.simple:
7932 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7933 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7934 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7935
7936 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7937 on user names when possible.
7938
7939 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7940 Simplify test for whather <alloca.h> exists.
7941
7942 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7943
7944 (<stdio.h>): Include if YYDEBUG.
7945
7946 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7947 ! defined (yyoverflow) && ! defined (yymemcpy).
7948
7949 (yymemcpy, yyparse): Rename local variables as needed so that
7950 they all begin with 'yy'.
7951
7952 (yystrlen, yystpcpy): New functions.
7953
7954 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7955 All uses changed.
7956
7957 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7958 instead of relying on string.h functions. Use YYSTACK_ALLOC
7959 and YYSTACK_FREE instead of malloc and free.
7960
7961 2001-11-30 Akim Demaille <akim@epita.fr>
7962
7963 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7964 before their first uses.
7965 (YYBISON, YYPURE): Move to the top of the output.
7966
7967 2001-11-30 Akim Demaille <akim@epita.fr>
7968
7969 * tests/reduce.at (Useless Nonterminals): Fix.
7970
7971 2001-11-30 Akim Demaille <akim@epita.fr>
7972
7973 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7974 if body instead of `;' to pacify GCC's warnings.
7975
7976 2001-11-30 Akim Demaille <akim@epita.fr>
7977
7978 Instead of mapping the LHS of unused rules to -1, keep the LHS
7979 valid, but flag the rules as invalid.
7980
7981 * src/gram.h (rule_t): `useful' is a new member.
7982 * src/print.c (print_grammar): Adjust.
7983 * src/derives.c (set_derives): Likewise.
7984 * src/reader.c (packgram, reduce_output): Likewise.
7985 * src/reduce.c (reduce_grammar_tables): Likewise.
7986 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7987
7988 2001-11-30 Akim Demaille <akim@epita.fr>
7989
7990 * src/reduce.c (reduce_output): Formatting changes.
7991 * src/print.c (print_results, print_grammar): Likewise.
7992 * tests/regression.at (Rule Line Numbers)
7993 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7994
7995 2001-11-30 Akim Demaille <akim@epita.fr>
7996
7997 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7998 useless nonterminals, move them at the end of the symbol arrays.
7999 (reduce_output): Adjust.
8000 * tests/reduce.at (Useless Nonterminals): Adjust.
8001
8002 2001-11-30 Akim Demaille <akim@epita.fr>
8003
8004 * src/reduce.c: Various comment/formatting changes.
8005 (nonterminals_reduce): New, extracted from...
8006 (reduce_grammar_tables): here.
8007 (reduce_grammar): Call nonterminals_reduce.
8008
8009 2001-11-29 Paul Eggert <eggert@twinsun.com>
8010
8011 * src/bison.simple (YYSTACK_REALLOC): Remove.
8012 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
8013 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
8014 New macros.
8015 (union yyalloc): New type.
8016 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
8017 an arbitrary restriction on hosts where size_t is wider than int.
8018
8019 (yyparse): Don't dump core if alloca or malloc fails; instead, report
8020 a parser stack overflow. Allocate just one block of memory for all
8021 three stacks, instead of allocating three blocks; this typically is
8022 faster and reduces fragmentation.
8023
8024 Do not limit the number of items in the stack to a value that fits
8025 in 'int', as this is an arbitrary limit on hosts with 64-bit
8026 size_t and 32-bit int.
8027
8028 2001-11-29 Marc Autret <autret_m@epita.fr>
8029
8030 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
8031 of defining YYERROR_VERBOSE.
8032 [AT_DATA]: $4 is now out of C declarations in the prologue.
8033
8034 2001-11-28 Marc Autret <autret_m@epita.fr>
8035
8036 * src/reader.c (parse_dquoted_param): New.
8037 (parse_skel_decl): Use it.
8038 * src/lex.h: Add its prototype.
8039 * src/lex.c (literalchar): Become not static.
8040
8041 2001-11-28 Marc Autret <autret_m@epita.fr>
8042
8043 * src/output.h: And put its extern declaration here.
8044 * src/output.c (error_verbose): Define here.
8045 (prepare): Echo name modification.
8046 * src/getargs.h: Clean its extern declaration.
8047 * src/getargs.c (error_verbose_flag): Remove.
8048 (getargs): Remove case 'e'.
8049 * src/options.c (option_table): 'error-verbose' is now seen as simple
8050 percent option.
8051 Include output.h.
8052
8053 * src/reader.c (read_declarations): Remove case tok_include.
8054 (parse_include_decl): Remove.
8055 * src/lex.h (token_t): Remove tok_include.
8056 * src/options.c (option_table): 'include' is now a simple command line
8057 option.
8058
8059 2001-11-28 Marc Autret <autret_m@epita.fr>
8060
8061 * src/bison.simple: Adjust muscle names.
8062 * src/muscle_tab.c (muscle_init): Also rename the muscles.
8063 * src/output.c (prepare): s/_/-/ for the muscles names.
8064 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
8065
8066 2001-11-28 Marc Autret <autret_m@epita.fr>
8067
8068 * src/bison.simple: Fix debug.
8069 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
8070
8071 2001-11-28 Akim Demaille <akim@epita.fr>
8072
8073 * src/LR0.c (shifts_new): New.
8074 (save_shifts, insert_start_shift, augment_automaton): Use it.
8075
8076 2001-11-28 Akim Demaille <akim@epita.fr>
8077
8078 * src/closure.c (closure): `b' and `ruleno' denote the same value:
8079 keep ruleno only.
8080
8081 2001-11-28 Akim Demaille <akim@epita.fr>
8082
8083 * src/closure.c (closure): Instead of looping over word in array
8084 then bits in words, loop over bits in array.
8085
8086 2001-11-28 Akim Demaille <akim@epita.fr>
8087
8088 * src/closure.c (closure): No longer optimize the special case
8089 where all the bits of `ruleset[r]' are set to 0, to make the code
8090 clearer.
8091
8092 2001-11-28 Akim Demaille <akim@epita.fr>
8093
8094 * src/closure.c (closure): `r' and `c' are new variables, used to
8095 de-obfuscate accesses to RULESET and CORE.
8096
8097 2001-11-28 Akim Demaille <akim@epita.fr>
8098
8099 * src/reduce.c (reduce_print): Use ngettext.
8100 (dump_grammar): Improve the trace accuracy.
8101
8102 2001-11-28 Akim Demaille <akim@epita.fr>
8103
8104 * src/reduce.c (dump_grammar): Don't translate trace messages.
8105
8106 2001-11-28 Akim Demaille <akim@epita.fr>
8107
8108 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
8109 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
8110 as all tags are free'ed afterwards.
8111 From Enrico Scholz.
8112
8113 2001-11-27 Paul Eggert <eggert@twinsun.com>
8114
8115 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
8116 use alloca when we didn't want to, and vice versa.
8117
8118 2001-11-27 Marc Autret <autret_m@epita.fr>
8119
8120 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
8121 initialization.
8122 * src/output.c (prepare): Remove its update.
8123
8124 2001-11-27 Marc Autret <autret_m@epita.fr>
8125
8126 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
8127 Use %error-verbose.
8128
8129 2001-11-27 Marc Autret <autret_m@epita.fr>
8130
8131 * src/bison.simple: Remove YYERROR_VERBOSE using.
8132 Use %%error_verbose.
8133 (yyparse): Likewise.
8134 * src/output.c (prepare): Give its final value.
8135 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
8136 * src/getargs.h: Add its extern declaration.
8137 * src/getargs.c (error_verbose_flag): New int.
8138 (getargs): Update to catch new case.
8139 * src/options.c (option_table): 'error-verbose' is a new option.
8140 (shortopts): Update.
8141
8142 2001-11-27 Akim Demaille <akim@epita.fr>
8143
8144 * src/system.h: Use intl/libgettext.h.
8145 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
8146
8147 2001-11-27 Akim Demaille <akim@epita.fr>
8148
8149 * tests/torture.at (Exploding the Stack Size with Malloc):
8150 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
8151
8152 2001-11-27 Akim Demaille <akim@epita.fr>
8153
8154 * src/files.c: Include error.h.
8155 Reported by Hans Aberg.
8156
8157 2001-11-26 Marc Autret <autret_m@epita.fr>
8158
8159 * src/reader.c (parse_include_decl): New, not yet implemented.
8160 (read_declarations): Add case tok_include.
8161 * src/getargs.h (include): Add its extern definition.
8162 * src/getargs.c (include): New const char *.
8163 (getargs): Add case '-I'.
8164 * src/options.c (option_table): Add include as command line and
8165 percent option.
8166 * src/lex.h (token_t): Add tok_include.
8167
8168 2001-11-26 Akim Demaille <akim@epita.fr>
8169
8170 * src/reader.c (readgram): Make sure rules for mid-rule actions
8171 have a lineno equal to that of their host rule.
8172 Reported by Hans Aberg.
8173 * tests/regression.at (Rule Line Numbers): New.
8174
8175 2001-11-26 Akim Demaille <akim@epita.fr>
8176
8177 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
8178 size_ts.
8179
8180 2001-11-26 Akim Demaille <akim@epita.fr>
8181
8182 * src/complain.c, src/complain.h (error): Remove, provided by
8183 lib/error.[ch].
8184
8185 2001-11-26 Akim Demaille <akim@epita.fr>
8186
8187 * src/reader.c (read_declarations): Don't abort on tok_illegal,
8188 issue an error message.
8189 * tests/regression.at (Invalid %directive): New.
8190 Reported by Hans Aberg.
8191
8192 2001-11-26 Akim Demaille <akim@epita.fr>
8193
8194 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
8195 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8196
8197 2001-11-26 Akim Demaille <akim@epita.fr>
8198
8199 * src/conflicts.c (conflicts_print): Don't complain at all when
8200 there are no reduce/reduce conflicts, and as many shift/reduce
8201 conflicts as expected.
8202 * tests/regression.at (%expect right): Adjust.
8203
8204 2001-11-23 Akim Demaille <akim@epita.fr>
8205
8206 * lib/alloca.c: Update, from fileutils.
8207
8208 2001-11-23 Akim Demaille <akim@epita.fr>
8209
8210 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
8211
8212 2001-11-23 Akim Demaille <akim@epita.fr>
8213
8214 * src/system.h: Include alloca.h.
8215 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
8216
8217 2001-11-23 Akim Demaille <akim@epita.fr>
8218
8219 * src/print_graph.c (print_actions): Remove `rule', unused.
8220 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
8221 pacify GCC's signed < unsigned warnings.
8222 * src/closure.c (itemsetsize): Likewise.
8223 * src/reader.c (symbol_list_new): Static.
8224
8225 2001-11-23 Akim Demaille <akim@epita.fr>
8226
8227 Attaching lineno to buckets is stupid, since only one copy of each
8228 symbol is kept, only the line of the first occurrence is kept too.
8229
8230 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
8231 * src/reader.c (rline_allocated): Remove, unused.
8232 (symbol_list): Have a `line' member.
8233 (symbol_list_new): New.
8234 (readgram): Use it.
8235 * src/print.c (print_grammar): Output the rule line numbers.
8236 * tests/regression.at (Solved SR Conflicts)
8237 (Unresolved SR Conflicts): Adjust.
8238 Reported by Hans Aberg.
8239
8240 2001-11-22 Marc Autret <autret_m@epita.fr>
8241
8242 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
8243
8244 2001-11-22 Marc Autret <autret_m@epita.fr>
8245
8246 * src/muscle_tab.c (muscle_init): Remove initialization of
8247 skeleton muscle.
8248 * src/output.c (output_master_parser): Do it here.
8249
8250 2001-11-20 Akim Demaille <akim@epita.fr>
8251
8252 * po/sv.po: New.
8253 * configure.in (ALL_LINGUAS): Adjust.
8254 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
8255 longer contains strings to translate.
8256
8257 2001-11-19 Akim Demaille <akim@epita.fr>
8258
8259 * src/conflicts.c (conflicts_print): Add a missing \n.
8260
8261 2001-11-19 Akim Demaille <akim@epita.fr>
8262
8263 * src/nullable.c (nullable_print): New.
8264 (set_nullable): Call it when tracing.
8265 Better locality of variables.
8266
8267 2001-11-19 Akim Demaille <akim@epita.fr>
8268
8269 * src/print.c (print_actions): Better locality of variables.
8270
8271 2001-11-19 Akim Demaille <akim@epita.fr>
8272
8273 * src/derives.c (print_derives): Fix and enrich.
8274 * src/closure.c (print_fderives): Likewise.
8275
8276 2001-11-19 Akim Demaille <akim@epita.fr>
8277
8278 * src/closure.c (itemsetend): Remove, replaced with...
8279 (itemsetsize): new.
8280
8281 2001-11-19 Akim Demaille <akim@epita.fr>
8282
8283 * src/LR0.c (kernel_end): Remove, replaced with...
8284 (kernel_size): new.
8285
8286 2001-11-19 Akim Demaille <akim@epita.fr>
8287
8288 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
8289 to clarify.
8290
8291 2001-11-19 Akim Demaille <akim@epita.fr>
8292
8293 * src/closure.c (closure): Use arrays instead of pointers to clarify.
8294
8295 2001-11-19 Akim Demaille <akim@epita.fr>
8296
8297 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
8298 trace messages.
8299 * src/LR0.c: Likewise.
8300 (allocate_itemsets): Use arrays instead of pointers to clarify.
8301
8302 2001-11-19 Akim Demaille <akim@epita.fr>
8303
8304 * src/getargs.c (statistics_flag): Replace with...
8305 (trace_flag): New.
8306 (longopts): Accept --trace instead of --statistics.
8307 * src/getargs.h, src/options.c: Adjust.
8308 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
8309 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
8310
8311 2001-11-19 Akim Demaille <akim@epita.fr>
8312
8313 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
8314 pointers to clarify the code.
8315 (save_reductions, save_shifts): Factor common parts of alternatives.
8316
8317 2001-11-19 Akim Demaille <akim@epita.fr>
8318
8319 * src/LR0.c (new_state, get_state): Complete TRACE code.
8320 * src/closure.c: Include `reader.h' to get `tags', needed by the
8321 trace code.
8322 Rename the conditional DEBUG as TRACE.
8323 Output consistently TRACEs to stderr, not stdout.
8324 * src/derives.c: Likewise.
8325 * src/reduce.c: (inaccessable_symbols): Using if is better style
8326 than goto.
8327 Use `#if TRACE' instead of `#if 0' for tracing code.
8328
8329 2001-11-19 Akim Demaille <akim@epita.fr>
8330
8331 * src/system.h (LIST_FREE, shortcpy): New.
8332 * src/LR0.c: Use them.
8333 * src/output.c (free_itemsets, free_reductions, free_shifts):
8334 Remove, replaced by LIST_FREE.
8335
8336 2001-11-19 Akim Demaille <akim@epita.fr>
8337
8338 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8339 (REDUCTIONS_ALLOC): New.
8340 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8341 allocation.
8342
8343 2001-11-19 Akim Demaille <akim@epita.fr>
8344
8345 * src/LR0.c (new_state): Complete trace code.
8346 * src/nullable.c (set_nullable): Don't translate traces.
8347
8348 2001-11-19 Akim Demaille <akim@epita.fr>
8349
8350 * src/print_graph.c (print_core): Better locality of variables.
8351 * src/print.c (print_core): Likewise.
8352
8353 2001-11-19 Akim Demaille <akim@epita.fr>
8354
8355 * src/vcg.c: You do the output, so you are responsible of the
8356 handling of VCG syntax, in particular: use quotearg.
8357 * src/print_graph.c: Don't.
8358 (print_actions): Don't output the actions as part of the nodes,
8359 since that's the job of the edges.
8360 (print_state): Don't output by hand: fill the node description,
8361 and ask for its output.
8362
8363 2001-11-19 Akim Demaille <akim@epita.fr>
8364
8365 * src/bison.simple (yyparse): When verbosely reporting an error,
8366 no longer put additional quotes around token names.
8367 * tests/calc.at: Adjust.
8368
8369 2001-11-19 Akim Demaille <akim@epita.fr>
8370
8371 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8372 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8373 * src/output.c: Adjust.
8374
8375 2001-11-19 Akim Demaille <akim@epita.fr>
8376
8377 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8378 (rule_t): this.
8379 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8380
8381 2001-11-19 Akim Demaille <akim@epita.fr>
8382
8383 * src/gram.h (rule_t): New.
8384 (rule_table): New.
8385 (rrhs, rlhs): Remove, part of state_t.
8386 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8387 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8388 * src/reader.c, src/reduce.c: Adjust.
8389
8390 2001-11-19 Akim Demaille <akim@epita.fr>
8391
8392 * src/reader.c (symbols_output): New, extracted from...
8393 (packsymbols): Here.
8394 (reader): Call it.
8395
8396 2001-11-19 Akim Demaille <akim@epita.fr>
8397
8398 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8399 (maxrhs): this new function.
8400
8401 2001-11-19 Akim Demaille <akim@epita.fr>
8402
8403 * src/lalr.c (F): New macro to access the variable F.
8404 Adjust.
8405
8406 2001-11-19 Akim Demaille <akim@epita.fr>
8407
8408 * src/lalr.h (LA): New macro to access the variable LA.
8409 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8410 * src/lalr.c: Adjust.
8411
8412 2001-11-19 Akim Demaille <akim@epita.fr>
8413
8414 * src/lalr.c (initialize_LA): Only initialize LA. Let...
8415 (set_state_table): handle the `lookaheads' members.
8416
8417 2001-11-19 Akim Demaille <akim@epita.fr>
8418
8419 * src/lalr.h (lookaheads): Removed array, whose contents is now
8420 a member of...
8421 (state_t): this structure.
8422 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8423 Adjust.
8424
8425 2001-11-19 Akim Demaille <akim@epita.fr>
8426
8427 * src/lalr.h (consistent): Removed array, whose contents is now
8428 a member of...
8429 (state_t): this structure.
8430 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8431 Adjust.
8432
8433 2001-11-19 Akim Demaille <akim@epita.fr>
8434
8435 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
8436 contents are now members of...
8437 (state_t): this structure.
8438 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8439 Adjust.
8440
8441 2001-11-19 Akim Demaille <akim@epita.fr>
8442
8443 * src/lalr.h (state_t): New.
8444 (state_table): Be a state_t * instead of a core **.
8445 (accessing_symbol): Remove, part of state_t.
8446 * src/lalr.c: Adjust.
8447 (set_accessing_symbol): Merge into...
8448 (set_state_table): this.
8449 * src/print_graph.c, src/conflicts.c: Adjust.
8450
8451 2001-11-14 Akim Demaille <akim@epita.fr>
8452
8453 * tests/calc.at, tests/output.at, tests/regression.at,
8454 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
8455 now the tests are run in private dirs, therefore AC_CLEANUP and
8456 family can be simplified to 0-ary.
8457 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
8458 use abs. path to find config.h.
8459 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
8460 stderr, there can be way too much random noise.
8461 Instead pass -Werror to GCC and rely on the exit status.
8462 Reported by Wolfram Wagner.
8463
8464 2001-11-14 Akim Demaille <akim@epita.fr>
8465
8466 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
8467 defined only if yyoverflow is defined, to avoid `warning: unused
8468 variable `yyvs1''.
8469 Reported by The Test Suite.
8470
8471 2001-11-14 Akim Demaille <akim@epita.fr>
8472
8473 * src/print.c: Include reduce.h.
8474 Reported by Hans Aberg.
8475
8476 2001-11-14 Akim Demaille <akim@epita.fr>
8477
8478 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
8479 Revert a previous patch: these are really const.
8480 * src/conflicts.c (conflict_report): Additional useless pair of
8481 braces to pacify GCC's warnings for `if () if () {} else {}'.
8482 * src/lex.c (parse_percent_token): Replace equal_offset with
8483 arg_offset.
8484 arg is const.
8485 Be sure to strdup `arg' when used, since there is no reason for
8486 token_buffer not to change.
8487
8488 2001-11-14 Akim Demaille <akim@epita.fr>
8489
8490 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
8491 definition.
8492 * src/main.c (main): Use them.
8493 Suggested by Hans Aberg.
8494
8495 2001-11-12 Akim Demaille <akim@epita.fr>
8496
8497 * src/system.h (ngettext): Now that we use ngettext, be sure to
8498 provide a default definition when NLS are not used.
8499
8500 2001-11-12 Akim Demaille <akim@epita.fr>
8501
8502 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
8503 Use @kbd to denote user input.
8504 (Language and Grammar): ANSIfy the example.
8505 Adjust its layout for info/notinfo.
8506 (Location Tracking Calc): Output error messages to stderr.
8507 Output locations in a more GNUtically correct way.
8508 Fix a couple of Englishos.
8509 Adjust @group/@end group pairs.
8510
8511 2001-11-12 Akim Demaille <akim@epita.fr>
8512
8513 %expect was not functioning at all.
8514
8515 * src/conflicts.c (expected_conflicts): Set to -1.
8516 (conflict_report): Use ngettext.
8517 (conflicts_print): Check %expect and make its violation an error.
8518 * doc/bison.texinfo (Expect Decl): Adjust.
8519 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
8520 * tests/regression.at (%expect not enough, %expect right)
8521 (%expect too much): New.
8522
8523 2001-11-12 Akim Demaille <akim@epita.fr>
8524
8525 * tests/regression.at (Conflicts): Rename as...
8526 (Unresolved SR Conflicts): this.
8527 (Solved SR Conflicts): New.
8528
8529 2001-11-12 Akim Demaille <akim@epita.fr>
8530
8531 * src/reduce.c (print_results): Rename as...
8532 (reduce_output): This.
8533 Output to OUT, passed as argument, instead of output_obstack.
8534 (dump_grammar): Likewise.
8535 (reduce_free): New.
8536 Also free V1.
8537 (reduce_grammar): No longer call reduce_output, since...
8538 * src/print.c (print_results): do it.
8539 * src/main.c (main): Call reduce_free;
8540
8541 2001-11-12 Akim Demaille <akim@epita.fr>
8542
8543 * src/conflicts.c (print_reductions): Accept OUT as argument.
8544 Output to it, not to output_obstack.
8545 * src/print.c (print_actions): Adjust.
8546
8547 2001-11-12 Akim Demaille <akim@epita.fr>
8548
8549 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
8550 the result instead of using...
8551 (src_total, rrc_total, src_count, rrc_count): Remove.
8552 (any_conflicts): Remove.
8553 (print_conflicts): Split into...
8554 (conflicts_print, conflicts_output): New.
8555 * src/conflicts.h: Adjust.
8556 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
8557 * src/print.c (print_grammar): Issue `\n' between two rules.
8558 * tests/regression.at (Conflicts): New.
8559 Reported by Tom Lane.
8560
8561 2001-11-12 Akim Demaille <akim@epita.fr>
8562
8563 * tests/regression.at (Invalid input): Remove, duplicate with
8564 ``Invalid input: 1''.
8565
8566 2001-11-12 Akim Demaille <akim@epita.fr>
8567
8568 * tests/torture.at (AT_DATA_STACK_TORTURE)
8569 (Exploding the Stack Size with Alloca)
8570 (Exploding the Stack Size with Malloc): New.
8571
8572 2001-11-12 Akim Demaille <akim@epita.fr>
8573
8574 * src/bison.simple (YYSTACK_REALLOC): New.
8575 (yyparse) [!yyoverflow]: Use it and free the old stack.
8576 Reported by Per Allansson.
8577
8578 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
8579
8580 * src/bison.simple: Define type yystype instead of YYSTYPE, and
8581 define CPP macro, which substitute YYSTYPE by yystype.
8582 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
8583 with yyltype/YYLTYPE. This allows inclusion of the generated
8584 header within the parser if the compiler, such as GGC, accepts
8585 multiple equivalent #defines.
8586 From Akim.
8587
8588 2001-11-05 Akim Demaille <akim@epita.fr>
8589
8590 * src/reader.c (symbols_output): New, extracted from...
8591 (packsymbols): here.
8592 (reader): Adjust.
8593
8594 2001-11-05 Akim Demaille <akim@epita.fr>
8595
8596 * src/lex.c (parse_percent_token): s/quotearg/quote/.
8597
8598 2001-11-05 Akim Demaille <akim@epita.fr>
8599
8600 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
8601 pattern.
8602
8603 2001-11-05 Akim Demaille <akim@epita.fr>
8604
8605 * src/options.h (struct option_table_struct): set_flags is void*.
8606 * src/options.c (longopts): Support `--output' and `%output'.
8607 (usage): Adjust.
8608 * src/lex.h (tok_setopt): Remove, replaced with...
8609 (tok_intopt, tok_stropt): these new guys.
8610 * src/lex.c (getopt.h): Not needed.
8611 (token_buffer, unlexed_token_buffer): Not const.
8612 (percent_table): Promote `-' over `_' in directive names.
8613 Active `%name-prefix', `file-prefix', and `output'.
8614 (parse_percent_token): Accept possible arguments to directives.
8615 Promote `-' over `_' in directive names.
8616
8617 2001-11-04 Akim Demaille <akim@epita.fr>
8618
8619 * doc/bison.texinfo (Decl Summary): Split the list into
8620 `directives for grammars' and `directives for bison'.
8621 Sort'em.
8622 Add description of `%name-prefix', `file-prefix', and `output'.
8623 Promote `-' over `_' in directive names.
8624 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
8625 Simplify the description of `--name-prefix'.
8626 Promote `-' over `_' in directive names.
8627 Promote `--output' over `--output-file'.
8628 Fix the description of `--defines'.
8629 * tests/output.at: Exercise %file-prefix and %output.
8630
8631 2001-11-02 Akim Demaille <akim@epita.fr>
8632
8633 * doc/refcard.tex: Update.
8634
8635 2001-11-02 Akim Demaille <akim@epita.fr>
8636
8637 * src/symtab.h (SUNDEF): New.
8638 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
8639 stand for `uninitialized', instead of 0.
8640 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
8641 * src/lex.c (lex): Adjust.
8642
8643 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
8644 Number it 0.
8645 Let yylex return it instead of a plain 0.
8646 Reported by Dick Streefland.
8647
8648 2001-11-02 Akim Demaille <akim@epita.fr>
8649
8650 * tests/regression.at (Mixing %token styles): New test.
8651
8652 2001-11-02 Akim Demaille <akim@epita.fr>
8653
8654 * src/reader.c (parse_thong_decl): Formatting changes.
8655 (token_translations_init): New, extracted from...
8656 (packsymbols): Here.
8657 Adjust.
8658
8659 2001-11-01 Akim Demaille <akim@epita.fr>
8660
8661 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
8662 Check that `9foo.y' produces correct cpp guards.
8663 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
8664 guards.
8665 Reported by Wwp.
8666
8667 2001-11-01 Akim Demaille <akim@epita.fr>
8668
8669 * tests/regression.at (Invalid input: 2): New.
8670 * src/lex.c (unlexed_token_buffer): New.
8671 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
8672 too.
8673 Reported by Wwp.
8674
8675 2001-11-01 Akim Demaille <akim@epita.fr>
8676
8677 * tests/calc.at: Catch up with 1.30.
8678 * configure.in: Bump to 1.49a.
8679 Adjust to newer Autotest.
8680
8681 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
8682
8683 * src/conflicts.c: Move global variables rrc_total and src_total ...
8684 (print_conflicts): here.
8685 * src/output.c (output): Free global variable user_toknums.
8686 * src/lex.c (token_obstack): Become static.
8687
8688 2001-10-18 Akim Demaille <akim@epita.fr>
8689
8690 * tests/atlocal.in (GCC): Add.
8691 * tests/calc.at: s/m4_match/m4_bmatch/.
8692 s/m4_patsubst/m4_bpatsubst/.
8693 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
8694 * configure.in: AC_SUBST(GCC).
8695
8696 2001-10-14 Marc Autret <autret_m@epita.fr>
8697
8698 * src/options.c (create_long_option_table): Fix.
8699
8700 2001-10-10 Akim Demaille <akim@epita.fr>
8701
8702 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
8703
8704 2001-10-04 Akim Demaille <akim@epita.fr>
8705
8706 * src/reader.c (parse_union_decl): Push the caracters in
8707 union_obstack, not attrs_obstack.
8708
8709 2001-10-04 Akim Demaille <akim@epita.fr>
8710
8711 Merge in the branch 1.29.
8712
8713 * src/reader.c (packsymbols): Use a temporary obstack for
8714 `%%tokendef', since output_stack is already used elsewhere.
8715
8716 2001-10-02 Akim Demaille <akim@epita.fr>
8717
8718 Bump 1.29d.
8719
8720 2001-10-02 Akim Demaille <akim@epita.fr>
8721
8722 Version 1.29c.
8723
8724 2001-10-02 Akim Demaille <akim@epita.fr>
8725
8726 * tests/regression.at (Invalid CPP headers): New.
8727 From Alexander Belopolsky.
8728 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
8729
8730 2001-10-02 Akim Demaille <akim@epita.fr>
8731
8732 * tests/regression.at (Invalid input): New.
8733 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
8734 Reported by Shura.
8735
8736 2001-10-02 Akim Demaille <akim@epita.fr>
8737
8738 * tests/calc.at: Now that --debug works, the tests must be adjusted.
8739
8740 2001-10-02 Akim Demaille <akim@epita.fr>
8741
8742 * src/output.c (output_parser): Assert `skeleton'.
8743 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
8744 systems.
8745 From Shura.
8746
8747 2001-10-01 Marc Autret <autret_m@epita.fr>
8748
8749 * src/lex.h: Echo modifications.
8750 * src/lex.c (unlex): Parameter is now token_t.
8751 From Hans Aberg.
8752
8753 2001-10-01 Marc Autret <autret_m@epita.fr>
8754
8755 * src/main.c: Include lex.h.
8756 From Hans Aberg.
8757
8758 2001-09-29 Akim Demaille <akim@epita.fr>
8759
8760 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
8761
8762 2001-09-28 Akim Demaille <akim@epita.fr>
8763
8764 * tests/testsuite.at: Update to newer Autotest.
8765 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
8766
8767 2001-09-27 Akim Demaille <akim@epita.fr>
8768
8769 Position independent wrapper.
8770
8771 * tests/bison: Remove.
8772 * tests/bison.in: New.
8773 * configure.in: Adjust.
8774
8775 2001-09-27 Paul Eggert <eggert@twinsun.com>
8776
8777 Port quotearg fixes from tar 1.13.24.
8778
8779 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
8780 tm to be declared.
8781 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
8782 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
8783
8784 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
8785 * m4/mbrtowc.m4: New file.
8786 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
8787 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
8788
8789 2001-09-27 Akim Demaille <akim@epita.fr>
8790
8791 Bump to 1.29c.
8792
8793 2001-09-27 Akim Demaille <akim@epita.fr>
8794
8795 Version 1.29b.
8796
8797 2001-09-25 Akim Demaille <akim@epita.fr>
8798
8799 * src/system.h: Include `xalloc.h'.
8800 Remove it from the C files.
8801 * src/files.c (output_files): Free the obstacks.
8802 * src/lex.c (init_lex): Rename as...
8803 (lex_init): this.
8804 (lex_free): New.
8805 * src/main.c (main): Use it.
8806
8807 2001-09-24 Marc Autret <autret_m@epita.fr>
8808
8809 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
8810 to output informations in fout (FILE*).
8811 (open_graph, close_graph): Likewise.
8812 (output_graph, output_edge, output_node): Likewise.
8813 * src/vcg.h: Update function prototypes.
8814 * src/print_graph.c (print_graph): Open output graph file.
8815 (print_actions): Adjust.
8816 * src/files.h: Remove extern declaration.
8817 * src/files.c: Remove graph_obstack declaration.
8818 (open_files): Remove graph_obstack initialization.
8819 (output_files): Remove graph_obstack saving.
8820
8821 2001-09-24 Marc Autret <autret_m@epita.fr>
8822
8823 * src/files.c (compute_output_file_names): Fix.
8824
8825 2001-09-24 Marc Autret <autret_m@epita.fr>,
8826 Akim Demaille <akim@epita.fr>
8827
8828 * src/reader.c (reader): Remove call to free_symtab ().
8829 * src/main.c (main): Call it here.
8830 Include symtab.h.
8831 * src/conflicts.c (initialize_conflicts): Rename as...
8832 (solve_conflicts): this.
8833 * src/print.c (print_core, print_actions, print_state)
8834 (print_grammar): Dump to a file instead a `output_obstack'.
8835 (print_results): Dump `output_obstack', and then proceed with the
8836 FILE *.
8837 * src/files.c (compute_output_file_names, close_files): New.
8838 (output_files): Adjust.
8839 * src/main.c (main): Adjust.
8840
8841 2001-09-23 Marc Autret <autret_m@epita.fr>
8842
8843 * src/files.c (compute_header_macro): Computes header macro name
8844 from spec_defines_file when given.
8845
8846 2001-09-23 Marc Autret <autret_m@epita.fr>
8847
8848 * src/files.c (output_files): Add default extensions.
8849
8850 2001-09-22 Akim Demaille <akim@epita.fr>
8851
8852 * src/conflicts.c (finalize_conflicts): Rename as...
8853 (free_conflicts): this.
8854
8855 2001-09-22 Akim Demaille <akim@epita.fr>
8856
8857 * src/gram.c (gram_free): Rename back as...
8858 (dummy): this.
8859 (output_token_translations): Free `token_translations'.
8860 * src/symtab.c (free_symtab): Free the tag field.
8861
8862 2001-09-22 Akim Demaille <akim@epita.fr>
8863
8864 Remove `translations' as it is always set to true.
8865
8866 * src/gram.h: Adjust.
8867 * src/reader.c (packsymbols, parse_token_decl): Adjust
8868 * src/print.c (print_grammar): Adjust.
8869 * src/output.c (output_token_translations): Adjust.
8870 * src/lex.c (lex): Adjust.
8871 * src/gram.c: Be sure the set pointers to NULL.
8872 (dummy): Rename as...
8873 (gram_free): this.
8874
8875 2001-09-22 Akim Demaille <akim@epita.fr>
8876
8877 * configure.in: Invoke AM_LIB_DMALLOC.
8878 * src/system.h: Use dmalloc.
8879 * src/LR0.c: Be sure to have pointers initialized to NULL.
8880 (allocate_itemsets): Allocate kernel_items only if needed.
8881
8882 2001-09-22 Akim Demaille <akim@epita.fr>
8883
8884 * configure.in: Bump to 1.29b.
8885 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8886 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8887 need xmalloc.c in calc.y.
8888 From Pascal Bart.
8889
8890 2001-09-21 Akim Demaille <akim@epita.fr>
8891
8892 Version 1.29a.
8893 * Makefile.maint, config/config.guess, config/config.sub,
8894 * config/missing: Update from masters.
8895 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8896 upon package.m4.
8897 * configure.in (ALL_LINGUAS): Add `tr'.
8898
8899 2001-09-21 Akim Demaille <akim@epita.fr>
8900
8901 * tests/Makefile.am (package.m4): Move to...
8902 ($(srcdir)/$(TESTSUITE)): here.
8903
8904 2001-09-20 Akim Demaille <akim@epita.fr>
8905
8906 * src/complain.c: No longer try to be standalone: use system.h.
8907 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8908 * src/complain.h: Likewise.
8909 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8910 Remove the unused variable `n'.
8911 From Albert Chin-A-Young.
8912
8913 2001-09-18 Marc Autret <autret_m@epita.fr>
8914
8915 * doc/bison.1: Update.
8916 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8917 descriptions.
8918 (Option Cross Key): Update.
8919 Add --graph.
8920
8921 2001-09-18 Marc Autret <autret_m@epita.fr>
8922
8923 * tests/regression.at: New test (comment in %union).
8924
8925 2001-09-18 Marc Autret <autret_m@epita.fr>
8926
8927 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8928 do that.
8929 Reported by Keith Browne.
8930
8931 2001-09-18 Marc Autret <autret_m@epita.fr>
8932
8933 * tests/output.at: Add tests for --defines and --graph.
8934
8935 2001-09-18 Marc Autret <autret_m@epita.fr>
8936
8937 * tests/output.at: Removes tests of %{header,src}_extension features.
8938
8939 2001-09-18 Akim Demaille <akim@epita.fr>
8940
8941 * tests/Makefile.am (package.m4): New.
8942 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8943 (_AT_CHECK_CALC_ERROR): Likewise.
8944 Factor the `, ' part of verbose error messages.
8945
8946 2001-09-18 Marc Autret <autret_m@epita.fr>
8947
8948 * src/getargs.c (longopts): Declare --defines and --graph as options
8949 with optional arguments.
8950 * src/files.h: Add extern declarations.
8951 * src/files.c (spec_graph_file, spec_defines_file): New.
8952 (output_files): Update.
8953 Remove CPP-outed code.
8954
8955 2001-09-18 Marc Autret <autret_m@epita.fr>
8956
8957 Turn off %{source,header}_extension feature.
8958
8959 * src/files.c (compute_exts_from_gf): Update.
8960 (compute_exts_from_src): Update.
8961 (output_files): CPP-out useless code.
8962 * src/files.h: Remove {header,source}_extension extern declarations.
8963 * src/reader.c (parse_dquoted_param): CPP-out.
8964 (parse_header_extension_decl): Remove.
8965 (parse_source_extension_decl): Remove.
8966 (read_declarations): Remove cases tok_{hdrext,srcext}.
8967 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8968 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8969
8970 2001-09-10 Akim Demaille <akim@epita.fr>
8971
8972 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8973 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8974 (AT_CHECK_OUTPUT): this.
8975 Merely check ls' exit status, its output is useless.
8976
8977 2001-09-10 Akim Demaille <akim@epita.fr>
8978
8979 * tests/calc.at: Use m4_match.
8980 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8981
8982 2001-09-10 Marc Autret <autret_m@epita.fr>,
8983 Akim Demaille <akim@epita.fr>
8984
8985 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8986 enum color_e.
8987 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8988 to `normal'.
8989 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8990 * src/lex.h: Adjust prototype.
8991 (token_t): Add `tok_undef'.
8992 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8993 (parse_percent_token): Now returns token_t.
8994 Add default statement in switch.
8995 (lex): Separate `c' as an input variable, from the token_t result
8996 part.
8997 (unlexed): Is a token_t.
8998
8999 2001-09-10 Akim Demaille <akim@epita.fr>
9000
9001 * configure.in: Bump to 1.29a.
9002
9003 2001-09-07 Akim Demaille <akim@epita.fr>
9004
9005 Version 1.29.
9006
9007 2001-08-30 Akim Demaille <akim@epita.fr>
9008
9009 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
9010 * m4/atconfig.m4: Remove.
9011 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
9012 * tests/bison: New.
9013 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
9014 m4_if, m4_patsubst, and m4_regexp.
9015 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
9016 `input' file instead of echo.
9017
9018 2001-08-29 Akim Demaille <akim@epita.fr>
9019
9020 Bump to 1.28e.
9021
9022 2001-08-29 Akim Demaille <akim@epita.fr>
9023
9024 Version 1.28d.
9025
9026 2001-08-29 Paul Eggert <eggert@twinsun.com>
9027
9028 * src/bison.simple (yyparse): Don't take the address of an
9029 item before the start of an array, as that doesn't conform to
9030 the C Standard.
9031
9032 2001-08-29 Robert Anisko <anisko_r@epita.fr>
9033
9034 * doc/bison.texinfo (Location Tracking Calc): New node.
9035
9036 2001-08-29 Paul Eggert <eggert@twinsun.com>
9037
9038 * src/output.c (output): Do not define const, as this now
9039 causes more problems than it cures.
9040
9041 2001-08-29 Akim Demaille <akim@epita.fr>
9042
9043 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
9044 the nodes.
9045 Be sure to tag the `detailmenu'.
9046
9047 2001-08-29 Akim Demaille <akim@epita.fr>
9048
9049 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
9050 download in a tmp dir.
9051
9052 2001-08-28 Marc Autret <autret_m@epita.fr>
9053
9054 * config/depcomp: New file.
9055
9056 2001-08-28 Marc Autret <autret_m@epita.fr>
9057
9058 * doc/bison.1 (mandoc): Adjust.
9059 From Juan Manuel Guerrero.
9060
9061 2001-08-28 Marc Autret <autret_m@epita.fr>
9062
9063 * src/print_graph.c (print_state): Fix.
9064
9065 2001-08-27 Marc Autret <autret_m@epita.fr>
9066
9067 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
9068 char * members.
9069 Echo modifications to the functions prototypes.
9070 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
9071
9072 2001-08-27 Marc Autret <autret_m@epita.fr>
9073
9074 * src/vcg.c: Include `xalloc.h'.
9075 (add_colorentry): New.
9076 (add_classname): New.
9077 (add_infoname): New.
9078 * src/vcg.h: Add new prototypes.
9079
9080 2001-08-27 Akim Demaille <akim@epita.fr>
9081
9082 * Makefile.maint: Sync. again with CVS Autoconf.
9083
9084 2001-08-27 Akim Demaille <akim@epita.fr>
9085
9086 * Makefile.maint: Formatting changes.
9087 (po-update, cvs-update, update): New targets.
9088 (AMTAR): Remove.
9089
9090 2001-08-27 Akim Demaille <akim@epita.fr>
9091
9092 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9093 * Makefile.maint: Sync. with CVS Autoconf.
9094
9095 2001-08-27 Marc Autret <autret_m@epita.fr>
9096
9097 * src/vcg.h (struct infoname_s): New.
9098 (struct colorentry_s): New.
9099 (graph_s): New fields {vertical,horizontal}_order in structure.
9100 Add `infoname' field.
9101 Add `colorentry' field;
9102 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
9103 (G_HORIZONTAL_ORDER): New.
9104 (G_INFONAME): New.
9105 (G_COLORENTRY): New.
9106 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
9107 Add output of `infoname'.
9108 Add output of `colorentry'.
9109
9110 2001-08-27 Marc Autret <autret_m@epita.fr>
9111
9112 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
9113 This one shadowed a global parameter.
9114
9115 2001-08-24 Marc Autret <autret_m@epita.fr>
9116
9117 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
9118 instead of `unsigned'.
9119 (print_state): Do not call obstack_object_size () in obstack_grow ()
9120 to avoid macro variables shadowing.
9121
9122 2001-08-23 Marc Autret <autret_m@epita.fr>
9123
9124 * src/lex.c (percent_table): Typo: s/naem/name/.
9125 Add graph option.
9126 Normalize new options declarations.
9127
9128 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
9129
9130 * tests/suite.at: Exercise %header_extension and %source_extension.
9131
9132 2001-08-16 Marc Autret <autret_m@epita.fr>
9133
9134 * src/reader.c (parse_dquoted_param): New.
9135 (parse_header_extension_decl): Use it.
9136 (parse_source_extension_decl): Likewise.
9137
9138 2001-08-16 Marc Autret <autret_m@epita.fr>
9139
9140 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
9141 (get_xxxx_str): Use assert () instead of complain ().
9142 Remove return invokations in default cases.
9143 (get_decision_str): Modify default behaviour. Remove second argument.
9144 Echo modifications on calls.
9145 (output_graph): Fix.
9146
9147 2001-08-16 Marc Autret <autret_m@epita.fr>
9148
9149 * src/getargs.c (usage): Update with ``-g, --graph''.
9150
9151 2001-08-16 Marc Autret <autret_m@epita.fr>
9152
9153 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
9154 (Option Cross Key): Likewise.
9155 * doc/bison.1: Update.
9156
9157 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
9158
9159 * src/output.c (output_master_parser): Don't finish action_obstack.
9160 (output_parser): Don't care about the muscle action, here.
9161 (prepare): Copy the action_obstack in the action muscle.
9162 (output): Free action_obstack.
9163
9164 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9165
9166 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
9167 will contain `%union' declaration.
9168 (parse_union_decl): Delete #line directive output.
9169 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
9170 informations about %union.
9171 (parse_union_decl): Copy the union_obstack in the muscle stype.
9172 * src/bison.simple: Add new #line directive.
9173 Add typdef %%stype YYSTYPE.
9174
9175 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9176
9177 * src/bison.simple: Add new `#line' directive.
9178
9179 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
9180
9181 * src/bison.simple: New `#line' directive.
9182 * src/output.c (output_parser): Support new dynamic muscle input_line.
9183
9184 2001-09-22 Marc Autret <autret_m@epita.fr>
9185
9186 * src/output.c (output_master_parser): New.
9187 (output_parser): Be more re-entrant.
9188
9189 2001-09-21 Marc Autret <autret_m@epita.fr>
9190
9191 * src/reader.c (copy_definition, parse_union_decl): Update and use
9192 `linef' muscle.
9193 (copy_action): Likewise.
9194 Use obstack_1grow ().
9195 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
9196
9197 2001-09-21 Marc Autret <autret_m@epita.fr>
9198
9199 * src/options.c (option_table): Adjust.
9200 * src/lex.c (parse_percent_token): Fix.
9201
9202 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9203
9204 * src/options.c (symtab.h): Include it, need by lex.h.
9205
9206 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9207
9208 * src/lex.c (parse_percent_token): Change type of variable `tx', which
9209 is now an option_table_struct*.
9210 (option_strcmp): New function option_strcmp.
9211 (parse_percent_token): Call option_strcmp.
9212 * src/getargs.c (xalloc.h, options.h): Include it.
9213 (getargs): Call create_long_option_table.
9214 (getargs): Free longopts at the end of the function.
9215 (shortopts): Move in options.c.
9216 * src/options.c (create_long_option_table): New function. Convert
9217 information from option_table to option structure.
9218 * src/reader.c (options.h): Include it.
9219
9220 * src/Makefile.am: Adjust.
9221 * src/options.c (option_table): Create from longopts and percent_table.
9222 * src/getargs.c (longopts): Delete.
9223 * src/lex.c (struct percent_table_struct): Delete.
9224 (percent_table): Delete.
9225 (options.h): Include it.
9226 * src/options.c: Create.
9227 * src/options.h: Create.
9228 Declare enum opt_access_e.
9229 Define struct option_table_struct.
9230
9231 2001-09-20 Marc Autret <autret_m@epita.fr>
9232
9233 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
9234 sections of Bison.
9235
9236 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
9237
9238 * src/bison.simple: s/%%filename/%%skeleton.
9239 * src/muscle_tab.c (getargs.h): Include it.
9240 (muscle_init): Insert new muscle skeleton.
9241
9242 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
9243
9244 * src/output.c (output_parser): Delete unused variable actions_dumped.
9245
9246 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
9247
9248 * src/output.c (output): Delete call to reader_output_yylsp.
9249 * src/reader.c (reader): Likewise.
9250 * src/reader.h: Delete declaration of reader_output_yylsp.
9251
9252 2001-09-02 Marc Autret <autret_m@epita.fr>
9253
9254 * src/reader.c: Include muscle_tab.h.
9255 (parse_union_decl): Update.
9256 (parse_macro_decl): Rename parse_muscle_decl.
9257 Update to use renamed functions and variable.
9258 (read_declarations, copy_action, read_additionnal_code, : Updated
9259 with correct variables and functions names.
9260 (packsymbols, reader): Likewise.
9261
9262 * src/reader.h (muscle_obstack): Extern declaration update.
9263
9264 * src/output.c: Include muscle_tab.h
9265 In all functions using macro_insert, change by using muscle_insert ().
9266 (macro_obstack): Rename muscle_obstack.
9267 Echo modifications in the whole file.
9268 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
9269 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
9270 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
9271
9272 * src/muscle_tab.h: Update double inclusion macros.
9273 (macro_entry_s): Rename muscle_entry_s.
9274 Update prototypes.
9275
9276 * src/muscle_tab.c: Include muscle_tab.h.
9277 Rename macro_tabble to muscle_table.
9278 (mhash1, mhash2, mcmp): Use muscle_entry.
9279 (macro_init): Rename muscle_init. Update.
9280 (macro_insert): Rename muscle_insert. Update.
9281 (macro_find): Rename muscle_find. Update.
9282
9283 * src/main.c: Include muscle_tab.h.
9284 (main): Call muscle_init ().
9285 * src/Makefile.am (bison_SOURCES): Echo modifications.
9286
9287 2001-09-02 Marc Autret <autret_m@epita.fr>
9288
9289 Now the files macro_tab.[ch] are named muscle_tab.[ch].
9290
9291 * src/muscle_tab.c, src/muscle_tab.h: Add files.
9292
9293 2001-09-02 Marc Autret <autret_m@epita.fr>
9294
9295 * src/macrotab.c, src/macrotab.h: Remove.
9296
9297 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
9298
9299 * src/reader.c (copy_guard): Use muscle to specify the `#line'
9300 filename.
9301
9302 2001-09-01 Marc Autret <autret_m@epita.fr>
9303
9304 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
9305 to an explicit value to activate the feature. We do it here.
9306
9307 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9308
9309 * src/output.c (prepare): Delete the `filename' muscule insertion.
9310 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
9311 (parse_union_decl): Likewise.
9312 * src/macrotab.c (macro_init): Initialize filename by infile.
9313
9314 2001-08-31 Marc Autret <autret_m@epita.fr>
9315
9316 * src/bison.simple (YYLSP_NEEDED): New definition.
9317 * src/output.c (prepare): Add macro insertion of `locations_flag'
9318
9319 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9320
9321 * src/output.c (prepare): Delete insertion of previous muscles,
9322 and insert the `prefix' muscles.
9323 * src/macrotab.c (macro_init): Likewise.
9324 (macro_init): Initialization prefix directive by `yy'.
9325 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
9326 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9327 yylval, yydebug, yyerror, yynerrs and yyparse.
9328 New directive `#define' to substitute yydebug, ... with option
9329 name_prefix.
9330
9331 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9332
9333 * src/main.c (main): Standardize.
9334 * src/output.c (output_table_data, output_parser): Likewise.
9335 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9336
9337 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9338
9339 * src/reader.c (read_additionnal_code): Rename %%user_code to
9340 %%epilogue.
9341 * src/output.c (output): Rename %%declarations to %%prologue.
9342 * src/bison.simple: Echo modifications.
9343
9344 2001-08-31 Marc Autret <autret_m@epita.fr>
9345
9346 * src/reader.c (readgram): CleanUp.
9347 (output_token_defines): Likewise.
9348 (packsymbols): Likewise.
9349 (reader): Likewise.
9350 * src/output.c (output): CPP-out useless code.
9351
9352 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9353
9354 * src/reader.c (reader): Delete obsolete call to function
9355 output_trailers and output_headers.
9356 * src/output.h: Remove obsolete functions prototypes of output_headers
9357 and output_trailers.
9358
9359 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
9360
9361 * src/main.c: Include macrotab.h.
9362 * src/macrotab.h (macro_entry_s): Constify fields.
9363 Adjust functions prototypes.
9364 * src/macrotab.c (macro_insert): Constify key and value.
9365 (macro_find): Constify key.
9366 (macro_insert): Include 'xalloc.h'
9367 (macro_insert): Use XMALLOC.
9368 (macro_find): Constify return value.
9369 * src/output.c (output_table_data): Rename table to table_data.
9370 (output_parser): Constify macro_key, macro_value.
9371
9372 2001-08-30 Marc Autret <autret_m@epita.fr>
9373
9374 * src/reader.c (parse_skel_decl): New.
9375 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
9376 * src/lex.h (token_t): New token `tok_skel'.
9377 * src/lex.c (percent_table): Add skeleton option entry.
9378 Standardize.
9379
9380 2001-08-29 Marc Autret <autret_m@epita.fr>
9381
9382 * src/bison.simple: Add %%user_code directive at the end.
9383 * src/reader.c (read_additionnal_code): New.
9384 (reader): Use it.
9385 * src/output.c (output_program): Remove.
9386 (output): Update.
9387
9388 2001-08-28 Marc Autret <autret_m@epita.fr>
9389
9390 * src/output.c (output_actions): Clean up.
9391 (output_gram): CPP-out useless code.
9392 * src/reader.c (reader): Clean up, CPP-out useless code.
9393
9394 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
9395
9396 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
9397 directive.
9398 * src/bison.simple: Add `%%definitions'.
9399
9400 2001-08-28 Marc Autret <autret_m@epita.fr>
9401
9402 * config/depcomp: New file.
9403
9404 2001-08-27 Paul Eggert <eggert@twinsun.com>
9405
9406 * src/bison.simple (yyparse): Don't take the address of an
9407 item before the start of an array, as that doesn't conform to
9408 the C Standard.
9409
9410 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9411
9412 * src/output.c (output): Remove the initialization of the macro
9413 obstack. It was done too late here.
9414
9415 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
9416 completely wrong.
9417 (reader): Initialize the macro obstack here, since we need it to grow
9418 '%define' directives.
9419
9420 * src/reader.h: Declare the macro obstack as extern.
9421
9422 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9423
9424 * src/output.c (output_parser): Fix. Store single '%' characters in
9425 the output obstack instead of throwing them away.
9426
9427 2001-08-27 Akim Demaille <akim@epita.fr>
9428
9429 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9430
9431 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9432
9433 * lib/Makefile.am: Adjust.
9434
9435 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9436
9437 * src/bison.simple: Update and add '%%' directives.
9438
9439 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9440
9441 * src/reader.c (reader): Remove calls to 'output_headers' and
9442 'output_trailers'. Remove some C output.
9443 (readgram): Disable a piece of code that was writing a default
9444 definition for 'YYSTYPE'.
9445 (reader_output_yylsp): Remove.
9446 (packsymbols): Output token defintions to a macro.
9447 (copy_definition): Disable C output.
9448
9449 * src/reader.c (parse_macro_decl): New function used to parse macro
9450 declarations.
9451 (copy_string2): Put the body of copy_string into this new function.
9452 Add a parameter to let the caller choose whether he wants to copy the
9453 string delimiters or not.
9454 (copy_string): Be a simple call to copy_string2 with the last argument
9455 bound to true.
9456 (read_declarations): Add case for macro definition.
9457 (copy_identifier): New.
9458 (parse_macro_decl): Read macro identifiers using copy_identifier
9459 rather than lex.
9460
9461 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9462
9463 * src/output.c (prepare): Add prefixed names.
9464 (output_parser): Output semantic actions.
9465 (output_parser): Fix bug on '%%line' directives.
9466
9467 * src/output.c (output_headers): Remove. The C code printed by this
9468 function should now be in the skeletons.
9469 (output_trailers): Remove.
9470 (output): Disable call to 'reader_output_yylsp'.
9471 (output_rule_data): Do not output tables to the table obstack.
9472
9473 * src/output.c: Remove some C dedicated output.
9474 Improve the use of macro and output obstacks.
9475 (output_defines): Remove.
9476
9477 * src/output.c (output_token_translations): Associate 'translate'
9478 table with a macro. No output to the table obstack.
9479 (output_gram): Same for 'rhs' and 'prhs'.
9480 (output_stos): Same for 'stos'.
9481 (output_rule_data): Same for 'r1' and 'r2'.
9482 (token_actions): Same for 'defact'.
9483 (goto_actions): Same for 'defgoto'.
9484 (output_base): Same for 'pact' and 'pgoto'.
9485 (output_table): Same for 'table'.
9486 (output_check): Same for 'check'.
9487
9488 * src/output.c (output_table_data): New function.
9489 (output_short_table): Remove.
9490 (output_short_or_char_table): Remove.
9491
9492 * src/output.c (output_parser): Replace most of the skeleton copy code
9493 with something new. Skeletons are now processed character by character
9494 rather than line by line, and Bison looks for '%%' macros. This is the
9495 first step in making Bison's output process (a lot) more flexible.
9496 (output_parser): Use the macro table.
9497
9498 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9499
9500 * src/main.c (main): Initialize the macro table.
9501
9502 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9503
9504 * src/lex.c (percent_table): Add tok_define.
9505 * src/lex.h: Add tok_define.
9506
9507 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9508
9509 * src/macrotab.c: New file.
9510 * src/macrotab.h: New file.
9511 * src/Makefile.am: Update.
9512
9513 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9514
9515 * lib/hash.c: New file.
9516 * lib/hash.h: New file.
9517 * lib/Makefile.am: Update.
9518
9519 2001-08-15 Akim Demaille <akim@epita.fr>
9520
9521 Version 1.28c.
9522
9523 2001-08-15 Marc Autret <autret_m@epita.fr>
9524
9525 * src/reader.c (readgram): Indent output macro YYSTYPE.
9526 (packsymbols): Likewise.
9527 (output_token_defines): Likewise.
9528 * src/files.c: Standardize.
9529 (compute_header_macro): New.
9530 (defines_obstack_save): New. Use compute_header_macro.
9531 (output_files): Update. Use defines_obstack_save.
9532
9533 2001-08-15 Akim Demaille <akim@epita.fr>
9534
9535 * doc/bison.texinfo (Table of Symbols): Document
9536 YYSTACK_USE_ALLOCA.
9537
9538 2001-08-15 Akim Demaille <akim@epita.fr>
9539
9540 * missing: Update from CVS Automake.
9541 * config/config.guess, config/config.sub, config/texinfo.tex:
9542 Update from gnu.org.
9543
9544 2001-08-15 Akim Demaille <akim@epita.fr>
9545
9546 * Makefile.maint: Sync with CVS Autoconf.
9547
9548 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
9549
9550 * doc/bison.texinfo: Include GNU Free Documentation License from
9551 `fdl.texi'.
9552 * doc/fdl.texi: Add to package.
9553
9554 2001-08-14 Marc Autret <autret_m@epita.fr>
9555
9556 Turn on %{source,header}_extension features.
9557
9558 * src/lex.c (percent_table): Un-CPP out header_extension and
9559 source_extension.
9560 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
9561 (compute_exts_from_src): Remove conditions. It restores priorities
9562 between options.
9563
9564 2001-08-14 Marc Autret <autret_m@epita.fr>
9565
9566 * src/files.c (compute_base_names): Add extensions computing when
9567 `--file-prefix' used.
9568 Standardize function calls.
9569
9570 2001-08-13 Marc Autret <autret_m@epita.fr>
9571
9572 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
9573 defining it (defined but null disables alloca).
9574
9575 2001-08-13 Marc Autret <autret_m@epita.fr>
9576
9577 * src/bison.simple (_yy_memcpy): CPP reformat.
9578
9579 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
9580
9581 * tests/atconfig.in (CPPFLAGS): Fix.
9582
9583 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
9584
9585 * doc/bison.texinfo: Include GNU General Public License from
9586 `gpl.texi'.
9587 * doc/gpl.texi: Add to package.
9588
9589 2001-08-10 Marc Autret <autret_m@epita.fr>
9590
9591 * src/print_graph.h: Fix.
9592 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
9593
9594 2001-08-10 Akim Demaille <akim@epita.fr>
9595
9596 * src/system.h: Provide default declarations for stpcpy, strndup,
9597 and strnlen.
9598
9599 2001-08-10 Robert Anisko <anisko_r@epita.fr>
9600
9601 * doc/bison.texinfo (Locations): Update @$ stuff.
9602
9603 2001-08-09 Robert Anisko <anisko_r@epita.fr>
9604
9605 * src/bison.simple (YYLLOC_DEFAULT): Update.
9606 (yyparse): Adjust.
9607
9608 2001-08-08 Marc Autret <autret_m@epita.fr>
9609
9610 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
9611 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
9612 Reported by Fabrice Bauzac.
9613
9614 2001-08-08 Marc Autret <autret_m@epita.fr>
9615
9616 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
9617 * src/vcg.c (output_node): Fix.
9618 * src/vcg.h: Cleanup.
9619 * src/print_graph.c: Add comments.
9620 (node_output_size): New global variable. Simplify the formatting of
9621 the VCG graph output.
9622 (print_actions): Unused code is now used. It notifies the final state
9623 and no action states in the VCG graph. It also give the reduce actions.
9624 The `shift and goto' edges are red and the `go to state' edges are
9625 blue.
9626 Get the current node name and node_obstack by argument.
9627 (node_obstack): New variable.
9628 (print_state): Manage node_obstack.
9629 (print_core): Use node_obstack given by argument.
9630 A node is not only computed here but in print_actions also.
9631 (print_graph): CPP out useless code instead of commenting it.
9632
9633 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
9634
9635 * tests/atconfig.in (CPPFLAGS): Fix.
9636
9637 2001-08-07 Akim Demaille <akim@epita.fr>
9638
9639 * src/print_graph.c (quote): New.
9640 (print_core): Use it.
9641
9642 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
9643
9644 * src/vcg.c (complain.h): Include it.
9645 Unepitaize `return' invocations.
9646 [NDEBUG] (main): Remove.
9647 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
9648 * src/files.c (open_files): Initialize graph_obstack.
9649 * src/print_graph.c (print_actions): CPP out useless code.
9650 (print_core): Don't output the last `\n' in labels.
9651 Use `quote'.
9652 * src/files.c (output_files): Output the VCG file.
9653 * src/main.c (main): Invoke print_graph ();
9654
9655 2001-08-06 Marc Autret <autret_m@epita.fr>
9656
9657 Automaton VCG graph output.
9658 Using option ``-g'' or long option ``--graph'', you can generate
9659 a gram_filename.vcg file containing a VCG description of the LALR (1)
9660 automaton of your grammar.
9661
9662 * src/main.c: Call to print_graph() function.
9663 * src/getargs.h: Update.
9664 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
9665 (graph_flag): New flag.
9666 (longopts): Update.
9667 (getargs): Add case `g'.
9668 * src/files.c (graph_obstack): New obstack struct.
9669 (open_files): Initialize new obstack.
9670 (output_files): Saves graph_obstack if required.
9671 * src/files.h (graph_obstack): New extern declaration.
9672 * src/Makefile.am: Add new source files.
9673
9674 2001-08-06 Marc Autret <autret_m@epita.fr>
9675
9676 * src/print_graph.c, src/print_graph.h (graph): New.
9677 * src/vcg.h: New file.
9678 * src/vcg.c: New file, VCG graph handling.
9679
9680 2001-08-06 Marc Autret <autret_m@epita.fr>
9681
9682 Add of %source_extension and %header_extension which specify
9683 the source or/and the header output file extension.
9684
9685 * src/files.c (compute_base_names): Remove initialisation of
9686 src_extension and header_extension.
9687 (compute_exts_from_gf): Update.
9688 (compute_exts_from_src): Update.
9689 (output_files): Update.
9690 * src/reader.c (parse_header_extension_decl): New.
9691 (parse_source_extension_decl): New.
9692 (read_declarations): New case statements for the new tokens.
9693 * src/lex.c (percent_table): Add entries for %source_extension
9694 and %header_extension.
9695 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
9696
9697 2001-08-06 Marc Autret <autret_m@epita.fr>
9698
9699 * configure.in: Bump to 1.28c.
9700 * doc/bison.texinfo: Texinfo thingies.
9701
9702 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
9703
9704 * tests/atconfig.in (CPPFLAGS): Add.
9705 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
9706
9707 2001-08-03 Akim Demaille <akim@epita.fr>
9708
9709 Version 1.28b.
9710
9711 2001-08-03 Akim Demaille <akim@epita.fr>
9712
9713 * tests/Makefile.am (check-local): Ship testsuite.
9714 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
9715 Include `string.h'.
9716
9717 2001-08-03 Akim Demaille <akim@epita.fr>
9718
9719 * configure.in: Try using -Wformat when compiling.
9720
9721 2001-08-03 Akim Demaille <akim@epita.fr>
9722
9723 * configure.in: Bump to 1.28b.
9724
9725 2001-08-03 Akim Demaille <akim@epita.fr>
9726
9727 * src/complain.c: Adjust strerror_r portability issues.
9728
9729 2001-08-03 Akim Demaille <akim@epita.fr>
9730
9731 Version 1.28a.
9732
9733 2001-08-03 Akim Demaille <akim@epita.fr>
9734
9735 * src/getargs.c, src/getarg.h (skeleton)): Constify.
9736 * src/lex.c (literalchar): Avoid name clashes on `buf'.
9737 * src/getargs.c: Include complain.h.
9738 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
9739 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
9740
9741 2001-08-03 Akim Demaille <akim@epita.fr>
9742
9743 * src/reader.c (readgram): Display hidden chars in error messages.
9744
9745 2001-08-03 Akim Demaille <akim@epita.fr>
9746
9747 Update to gettext 0.10.39.
9748
9749 2001-08-03 Akim Demaille <akim@epita.fr>
9750
9751 * lib/strspn.c: New.
9752
9753 2001-08-01 Marc Autret <autret_m@epita.fr>
9754
9755 * doc/bison.texinfo: Update.
9756 * doc/bison.1 (mandoc): Update.
9757 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
9758 * src/files.c: Support output files extensions computing.
9759 (src_extension): New static variable.
9760 (header_extension): New static variable.
9761 (tr): New function.
9762 (get_extension_index): New function, gets the index of an extension
9763 filename in a string.
9764 (compute_exts_from_gf): New function, computes extensions from the
9765 grammar file extension.
9766 (compute_exts_from_src): New functions, computes extensions from the
9767 C source file extension, file given by ``-o'' option.
9768 (compute_base_names): Update.
9769 (output_files): Update.
9770
9771 2001-08-01 Robert Anisko <anisko_r@epita.fr>
9772
9773 * doc/bison.texi: Document @$.
9774 (Locations): New section.
9775
9776 2001-07-18 Akim Demaille <akim@epita.fr>
9777
9778 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
9779 * config/prev-version.txt, config/move-if-change: New.
9780 * Makefile.am: Adjust.
9781
9782 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
9783
9784 * src/bison.simple (yyparse): Suppress warning `comparaison
9785 between signed and unsigned'.
9786
9787 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
9788
9789 * src/getargs.h (raw_flag): Remove.
9790 * src/getargs.c: Die on `-r'/`--raw'.
9791 * src/lex.c (parse_percent_token): Die on `%raw'.
9792 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
9793 * tests/calc.at: Suppress test with option `--raw'.
9794
9795 2001-07-14 Akim Demaille <akim@epita.fr>
9796
9797 * config/: New.
9798 * configure.in: Require Autoconf 2.50.
9799 Update to gettext 0.10.38.
9800
9801 2001-03-16 Akim Demaille <akim@epita.fr>
9802
9803 * doc/bison.texinfo: ANSIfy the examples.
9804
9805 2001-03-16 Akim Demaille <akim@epita.fr>
9806
9807 * getargs.c (skeleton): New variable.
9808 (longopts): --skeleton is a new option.
9809 (shortopts, getargs): -S is a new option.
9810 * getargs.h: Declare skeleton.
9811 * output.c (output_parser): Use it.
9812
9813 2001-03-16 Akim Demaille <akim@epita.fr>
9814
9815 * m4/strerror_r.m4: New.
9816 * m4/error.m4: Run AC_FUNC_STRERROR_R.
9817 * lib/error.h, lib/error.c: Update.
9818
9819 2001-03-16 Akim Demaille <akim@epita.fr>
9820
9821 * src/getargs.c (longopts): Clean up.
9822
9823 2001-02-21 Akim Demaille <akim@epita.fr>
9824
9825 * src/reader.c (gensym): `gensym_count' is your own.
9826 Use a static buf to create the symbol name, as token_buffer is no
9827 longer a buffer.
9828
9829 2001-02-08 Akim Demaille <akim@epita.fr>
9830
9831 * src/conflicts.c (conflict_report): Be sure not to append to res
9832 between two calls, which could happen if both first sprintf were
9833 skipped, but not the first cp += strlen.
9834
9835 2001-02-08 Akim Demaille <akim@epita.fr>
9836
9837 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
9838 New, from fileutils 4.0.37.
9839 * configure.in: Require Autoconf 2.49c. I took some time before
9840 making this decision. This is the only way out for portability
9841 issues in Bison, it would mean way too much duplicate effort to
9842 import in Bison features implemented in 2.49c since 2.13.
9843 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
9844
9845 2001-02-02 Akim Demaille <akim@epita.fr>
9846
9847 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
9848 * lib/xalloc.h, lib/xmalloc.c: Update.
9849
9850 2001-01-19 Akim Demaille <akim@epita.fr>
9851
9852 Get rid of the ad hoc handling of token_buffer in the scanner: use
9853 the obstacks.
9854
9855 * src/lex.c (token_obstack): New.
9856 (init_lex): Initialize it. No longer call...
9857 (grow_token_buffer): this. Remove it.
9858 Adjust all the places which used it to use the obstack.
9859
9860 2001-01-19 Akim Demaille <akim@epita.fr>
9861
9862 * src/lex.h: Rename all the tokens:
9863 s/\bENDFILE\b/tok_eof/g;
9864 s/\bIDENTIFIER\b/tok_identifier/g;
9865 etc.
9866 Let them be enums, not #define, to ease debugging.
9867 Adjust all the code.
9868
9869 2001-01-18 Akim Demaille <akim@epita.fr>
9870
9871 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9872 * src/lex.c (maxtoken, grow_token_buffer): Static.
9873
9874 2001-01-18 Akim Demaille <akim@epita.fr>
9875
9876 Since we now use obstacks, more % directives can be enabled.
9877
9878 * src/lex.c (percent_table): Also accept `%yacc',
9879 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9880 `%debug'.
9881 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9882 instead of returning a token.
9883 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9884 * src/reader.c (read_declarations): Adjust.
9885 * src/files.c (open_files): Don't call `compute_base_names', don't
9886 compute `attrsfile' since they depend upon data which might be
9887 *in* the input file now.
9888 (output_files): Do it here.
9889 * src/output.c (output_headers): Document the fact that this patch
9890 introduces a guaranteed SEGV for semantic parsers.
9891 * doc/bison.texinfo: Document them.
9892 * tests/suite.at: Exercise these %options.
9893
9894 2000-12-20 Akim Demaille <akim@epita.fr>
9895
9896 Also handle the output file (--verbose) with obstacks.
9897
9898 * files.c (foutput): Remove.
9899 (output_obstack): New.
9900 Adjust all dependencies.
9901 * src/conflicts.c: Return a string.
9902 * src/system.h (obstack_grow_string): Rename as...
9903 (obstack_sgrow): this. Be ready to work with non literals.
9904 (obstack_fgrow4): New.
9905
9906 2000-12-20 Akim Demaille <akim@epita.fr>
9907
9908 * src/files.c (open_files): Fix the computation of short_base_name
9909 in the case of `-o foo.tab.c'.
9910
9911 2000-12-20 Akim Demaille <akim@epita.fr>
9912
9913 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9914 (copy_dollar): Now that everything uses obstacks, get rid of the
9915 FILE * parameters.
9916
9917 2000-12-20 Akim Demaille <akim@epita.fr>
9918
9919 * src/files.c (open_files): Actually the `.output' file is based
9920 on the short_base_name, not base_name.
9921 * tests/suite.at (Checking output file names): Adjust.
9922
9923 2000-12-20 Akim Demaille <akim@epita.fr>
9924
9925 * src/bison.s1: Remove, we now use directly...
9926 * src/bison.simple: this.
9927 * src/Makefile.am: Use pkgdata instead of data.
9928
9929 2000-12-20 Akim Demaille <akim@epita.fr>
9930
9931 * src/files.c (guard_obstack): New.
9932 (open_files): Initialize it.
9933 (output_files): Dump it...
9934 * src/files.h: Export it.
9935 * src/reader.c (copy_guard): Use it.
9936
9937 2000-12-19 Akim Demaille <akim@epita.fr>
9938
9939 * src/files.c (outfile, defsfile, actfile): Removed as global
9940 vars.
9941 (open_files): Don't compute them.
9942 (output_files): Adjust.
9943 (base_name, short_base_name): Be global.
9944 Adjust dependencies.
9945
9946 2000-12-19 Akim Demaille <akim@epita.fr>
9947
9948 * src/files.c (strsuffix): New.
9949 (stringappend): Be just like strcat but allocate.
9950 (base_names): Eve out from open_files.
9951 Try to simplify the rather hairy computation of base_name and
9952 short_base_name.
9953 (open_files): Use it.
9954 * tests/suite.at (Checking output file names): New test.
9955
9956 2000-12-19 Akim Demaille <akim@epita.fr>
9957
9958 * src/system.h (obstack_grow_literal_string): Rename as...
9959 (obstack_grow_string): this.
9960 * src/output.c (output_parser): Recognize `%% actions' instead of
9961 `$'.
9962 * src/bison.s1: s/$/%% actions/.
9963 * src/bison.hairy: Likewise.
9964
9965 2000-12-19 Akim Demaille <akim@epita.fr>
9966
9967 * src/output.c (output_parser): Compute the `#line' lines when
9968 there are.
9969 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9970 Suggested by Hans Aberg.
9971
9972 2000-12-19 Akim Demaille <akim@epita.fr>
9973
9974 Let the handling of the skeleton files be local to the procedures
9975 that use it.
9976
9977 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9978 longer static.
9979 (fparser, open_extra_files): Remove.
9980 (open_files, output_files): Don't take care of fparser.
9981 * src/files.h: Adjust.
9982 * src/output.c (output_parser): Open and close the file to the
9983 skeleton.
9984 * src/reader.c (read_declarations): When %semantic_parser, open
9985 fguard.
9986
9987 2000-12-19 Akim Demaille <akim@epita.fr>
9988
9989 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9990 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9991
9992 2000-12-19 Akim Demaille <akim@epita.fr>
9993
9994 * src/files.c (open_files): Yipee! We no longer need all the code
9995 looking for `/tmp' since we have no tmp file.
9996
9997 2000-12-19 Akim Demaille <akim@epita.fr>
9998
9999 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
10000 New macros.
10001 * src/files.c (open_files): Less dependency on MSDOS etc.
10002
10003 2000-12-14 Akim Demaille <akim@epita.fr>
10004
10005 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
10006 Provide a default definition.
10007 Use it when executing the default @ action.
10008 * src/reader.c (reader_output_yylsp): No longer include
10009 `timestamp' and `text' in the default YYLTYPE.
10010
10011 2000-12-12 Akim Demaille <akim@epita.fr>
10012
10013 * src/reader.c (copy_definition, parse_union_decl, copy_action)
10014 (copy_guard): Quote the file names.
10015 Reported by Laurent Mascherpa.
10016
10017 2000-12-12 Akim Demaille <akim@epita.fr>
10018
10019 * src/output.c (output_headers, output_program, output): Be sure
10020 to escape special characters when outputting filenames.
10021 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
10022 (output_headers): Don't depend on them, Use ACTSTR.
10023
10024 2000-11-17 Akim Demaille <akim@epita.fr>
10025
10026 * lib/obstack.h: Formatting changes.
10027 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
10028 prevents type checking.
10029 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
10030 cast the value to (void *): assigning a `foo *' to a `void *'
10031 variable is valid.
10032 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
10033 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
10034 append characters.
10035
10036 2000-11-17 Akim Demaille <akim@epita.fr>
10037
10038 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
10039 as...
10040 (suite.m4, regression.m4, calc.m4): these.
10041 * tests/atgeneral.m4: Update from CVS Autoconf.
10042
10043 2000-11-17 Akim Demaille <akim@epita.fr>
10044
10045 * tests/regression.m4 (%union and --defines): New test,
10046 demonstrating a current bug in the obstack implementation.
10047
10048 2000-11-17 Akim Demaille <akim@epita.fr>
10049
10050 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
10051 macros.
10052 Use them to declare the variables which are global or local to
10053 `yyparse'.
10054
10055 2000-11-17 Akim Demaille <akim@epita.fr>
10056
10057 * acconfig.h: Remove, no longer used.
10058
10059 2000-11-07 Akim Demaille <akim@epita.fr>
10060
10061 * src: s/Copyright (C)/Copyright/g.
10062
10063 2000-11-07 Akim Demaille <akim@epita.fr>
10064
10065 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
10066 defining.
10067 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
10068
10069 2000-11-07 Akim Demaille <akim@epita.fr>
10070
10071 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
10072 Merge in a single CPP if/else.
10073
10074 2000-11-07 Akim Demaille <akim@epita.fr>
10075
10076 * src/output.c (output): Remove useless variables.
10077 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
10078 argument `data' for consistency with the prototypes.
10079 Qualify it `const'.
10080 (obstack_copy, obstack_copy0): Rename the second argument as
10081 `address' for consistency. Qualify it `const'.
10082 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
10083 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
10084 `const' their input argument (`data' or `address').
10085 Adjust the corresponding macros to include `const' in casts.
10086
10087 2000-11-03 Akim Demaille <akim@epita.fr>
10088
10089 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
10090 s/PFILE1/BISON_HAIRY/.
10091 Adjust dependencies.
10092
10093 2000-11-03 Akim Demaille <akim@epita.fr>
10094
10095 For some reason, this was not applied.
10096
10097 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10098 `unlink': it's no longer used.
10099
10100 2000-11-03 Akim Demaille <akim@epita.fr>
10101
10102 * src/files.c (skeleton_find): New function, eved out of...
10103 (open_files, open_extra_files): here.
10104
10105 2000-11-03 Akim Demaille <akim@epita.fr>
10106
10107 Don't use `atexit'.
10108
10109 * src/files.c (obstack_save): New function.
10110 (done): Rename as...
10111 (output_files): this.
10112 Use `obstack_save'.
10113 * src/main.c (main): Don't use `atexit' to register `done', since
10114 it no longer has to remove tmp files, just call `output_files'
10115 when there are no errors.
10116
10117 2000-11-02 Akim Demaille <akim@epita.fr>
10118
10119 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10120 `unlink': it's no longer used.
10121 * src/files.h: Formatting changes.
10122
10123 2000-11-02 Akim Demaille <akim@epita.fr>
10124
10125 Remove the last uses of mktemp and unlink/delete.
10126
10127 * src/files.c (fdefines, ftable): Removed.
10128 (defines_ostack, table_obstack): New.
10129 Adjust dependencies of the former into uses of the latter.
10130 * src/output.c (output_short_or_char_table, output_short_table):
10131 Convert to using obstacks.
10132 * src/reader.c (copy_comment2): Accept one FILE * and two
10133 obstacks.
10134 (output_token_defines, reader_output_yylsp): Use obstacks.
10135 * src/system.h (obstack_fgrow3): New.
10136
10137 2000-11-01 Akim Demaille <akim@epita.fr>
10138
10139 Change each use of `fattrs' into a use of `attrs_obstack'.
10140
10141 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
10142 * src/files.c (fattrs): Remove.
10143 (attrs_obstack): New.
10144 Adjust all dependencies.
10145 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
10146
10147 2000-11-01 Akim Demaille <akim@epita.fr>
10148
10149 Introduce obstacks.
10150 Change each use of `faction' into a use of `action_obstack'.
10151
10152 * lib/obstack.h, lib/obstack.c: New files.
10153 * src/files.c (faction): Remove.
10154 (action_obstack): New.
10155 Adjust all dependencies.
10156
10157 2000-10-20 Akim Demaille <akim@epita.fr>
10158
10159 * lib/quote.h (PARAMS): New macro. Use it.
10160
10161 2000-10-16 Akim Demaille <akim@epita.fr>
10162
10163 * src/output.c (output_short_or_char_table): New function.
10164 (output_short_table, output_token_translations): Use it.
10165 (goto_actions): Use output_short_table.
10166
10167 2000-10-16 Akim Demaille <akim@epita.fr>
10168
10169 * src/symtab.c (bucket_new): New function.
10170 (getsym): Use it.
10171
10172 * src/output.c (output_short_table): New argument to display the
10173 comment associated with the table.
10174 Adjust dependencies.
10175 (output_gram): Use it.
10176 (output_rule_data): Nicer output layout for YYTNAME.
10177
10178 2000-10-16 Akim Demaille <akim@epita.fr>
10179
10180 * src/lex.c (read_typename): New function.
10181 (lex): Use it.
10182 * src/reader.c (copy_dollar): Likewise.
10183
10184 2000-10-16 Akim Demaille <akim@epita.fr>
10185
10186 * src/reader.c (copy_comment2): Expect the input stream to be on
10187 the `/' which is suspected to open a comment, instead of being
10188 called after `//' or `/*' was read.
10189 (copy_comment, copy_definition, parse_union_decl, copy_action)
10190 (copy_guard): Adjust.
10191
10192 2000-10-16 Akim Demaille <akim@epita.fr>
10193
10194 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
10195 `read_signed_integer'.
10196
10197 2000-10-16 Akim Demaille <akim@epita.fr>
10198
10199 * src/reader.c (copy_dollar): New function.
10200 (copy_guard, copy_action): Use it.
10201
10202 2000-10-16 Akim Demaille <akim@epita.fr>
10203
10204 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
10205 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
10206 New files, from Fileutils 4.0.27.
10207 * src/main.c (printable_version): Remove.
10208 * src/lex.c, src/reader.c: Use `quote'.
10209
10210 2000-10-04 Akim Demaille <akim@epita.fr>
10211
10212 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
10213
10214 2000-10-04 Akim Demaille <akim@epita.fr>
10215
10216 * doc/bison.texinfo: Various typos spotted by Neil Booth.
10217
10218 2000-10-04 Akim Demaille <akim@epita.fr>
10219
10220 When a literal string is used to define two different tokens,
10221 `bison -v' segfaults.
10222 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
10223
10224 * tests/regression.m4: New file.
10225 Include the core of the sample provided by Piotr Gackiewicz.
10226 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
10227 properly.
10228
10229 2000-10-04 Akim Demaille <akim@epita.fr>
10230
10231 * src/reader.c (parse_expect_decl): Keep `count' within the size
10232 of `buffer'.
10233 From Neil Booth.
10234
10235 2000-10-02 Paul Eggert <eggert@twinsun.com>
10236
10237 * bison.s1 (yyparse): Assign the default value
10238 unconditionally, to avoid a GCC warning and make the parser a
10239 tad smaller.
10240
10241 2000-10-02 Akim Demaille <akim@epita.fr>
10242
10243 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
10244 options.
10245
10246 2000-10-02 Akim Demaille <akim@epita.fr>
10247
10248 * src/derives.c, src/print.c, src/reduce.c: To ease the
10249 translation, move some `\n' out of the translated strings.
10250
10251 2000-10-02 Akim Demaille <akim@epita.fr>
10252
10253 The location tracking mechanism is precious for parse error
10254 messages. Nevertheless, it is enabled only when `@n' is used in
10255 the grammar, which is a different issue (you can use it in error
10256 message, but not in the grammar per se). Therefore, there should
10257 be another means to enable it.
10258
10259 * src/getargs.c (getargs): Support `--locations'.
10260 (usage): Report it.
10261 * src/getargs.h (locationsflag): Export it.
10262 * src/lex.c (percent_table): Support `%locations'.
10263 * src/reader.c (yylsp_needed): Remove this variable, now replaced
10264 with `locationsflag'.
10265 * doc/bison.texinfo: Document `--locations' and `%locations'.
10266 Sort the options.
10267 * tests/calc.m4: Test it.
10268
10269 For regularity of the names, replace each
10270 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
10271 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
10272 In addition replace each `flag' with `_flag'.
10273
10274 2000-10-02 Akim Demaille <akim@epita.fr>
10275
10276 Also test parse error messages, including with YYERROR_VERBOSE.
10277
10278 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
10279 associative).
10280 Use it to check the computations.
10281 Use it to check `nonassoc' is honored.
10282 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
10283 `--yyerror-verbose'.
10284 (_AT_CHECK_CALC): Adjust to this option.
10285 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
10286
10287 2000-10-02 Akim Demaille <akim@epita.fr>
10288
10289 Test also `--verbose', `--defines' and `--name-prefix'. Testing
10290 the latter demonstrates a flaw in the handling of non debugging
10291 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
10292 was used in order to simplify:
10293
10294 #if YYDEBUG
10295 if (yydebug)
10296 {
10297 ...
10298 }
10299 #endif
10300
10301 into
10302
10303 if (yydebug)
10304 {
10305 ...
10306 }
10307
10308 unfortunately this leads to a CPP conflict when
10309 `--name-prefix=foo' is used since it produces `#define yydebug
10310 foodebug'.
10311
10312 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
10313 (YYDPRINTF): New macro.
10314 Spread its use.
10315 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10316 the bison options.
10317 Also test `--verbose', `--defines' and `--name-prefix'.
10318
10319 2000-10-02 Akim Demaille <akim@epita.fr>
10320
10321 Improve the readability of the produced parsers.
10322
10323 * src/bison.s1: Formatting changes.
10324 Improve the comment related to the `$' mark.
10325 (yydefault): Don't fall through to `yyresume': `goto' there.
10326 * src/output.c (output_parser): When the `$' is met, skip the end
10327 of its line.
10328 New variable, `number_of_dollar_signs', to check there's exactly
10329 one `$' in the parser skeleton.
10330
10331 2000-10-02 Akim Demaille <akim@epita.fr>
10332
10333 * lib/xstrdup.c: New file, from the fileutils.
10334 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10335 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10336 instead of strlen + xmalloc + strcpy.
10337 * src/symtab.c (copys): Remove, use xstrdup instead.
10338
10339 2000-10-02 Akim Demaille <akim@epita.fr>
10340
10341 * src/gram.h (associativity): New enum type which replaces the
10342 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10343 `right_assoc', `left_assoc' and `non_assoc'.
10344 Adjust all dependencies.
10345 * src/reader.c: Formatting changes.
10346 (LTYPESTR): Don't define it, use it as a literal in
10347 `reader_output_yylsp'.
10348 * src/symtab.h (symbol_class): New enum type which replaces the
10349 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10350 `sunknown', `stoken and `snterm'.
10351
10352 2000-10-02 Akim Demaille <akim@epita.fr>
10353
10354 * src/getargs.c (fixed_outfiles): Rename as...
10355 (yaccflag): for consistency and accuracy.
10356 Adjust dependencies.
10357
10358 2000-10-02 Akim Demaille <akim@epita.fr>
10359
10360 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10361 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10362 difficult and introduced a lot of core dump. It turns out that
10363 Bison used an implementation of `xmalloc' based on `calloc', and
10364 at various places it does depend upon the initialization to 0. I
10365 have not tried to isolate the pertinent places, and all the former
10366 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10367 someone should address this issue.
10368
10369 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10370 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10371 files.
10372 Adjust dependencies.
10373 * src/warshall.h: New file.
10374 Propagate.
10375
10376 2000-10-02 Akim Demaille <akim@epita.fr>
10377
10378 Various anti-`extern in *.c' changes.
10379
10380 * src/system.h: Include `assert.h'.
10381
10382 2000-10-02 Akim Demaille <akim@epita.fr>
10383
10384 * src/state.h (nstates, final_state, first_state, first_shift)
10385 (first_reduction): Move their exportation from here...
10386 * src/LR0.h: to here.
10387 Adjust dependencies.
10388 * src/getargs.c (statisticsflag): New variable.
10389 Add support for `--statistics'.
10390 Adjust dependencies.
10391
10392 Remove a lot of now useless `extern' statements in most files.
10393
10394 2000-10-02 Akim Demaille <akim@epita.fr>
10395
10396 * src/LR0.h: New file.
10397 Propagate its use.
10398
10399 2000-10-02 Akim Demaille <akim@epita.fr>
10400
10401 * src/print.h: New file.
10402 Propagate its use.
10403 * src/print.c: Formatting and ordering changes.
10404 (verbose, terse): Replace with...
10405 (print_results): this new function.
10406 Adjust dependencies.
10407
10408 2000-10-02 Akim Demaille <akim@epita.fr>
10409
10410 * src/conflicts.c (conflict_report): New function.
10411 (conflict_log, verbose_conflict_log): Replace with...
10412 (print_conflicts): this function.
10413 Adjust dependencies.
10414 * src/conflicts.h: New file.
10415 Propagate its inclusion.
10416
10417 2000-10-02 Akim Demaille <akim@epita.fr>
10418
10419 * src/nullable.h: New file.
10420 Propagate its inclusion.
10421 * src/nullable.c: Formatting changes.
10422
10423 2000-10-02 Akim Demaille <akim@epita.fr>
10424
10425 * src/reduce.h: New file.
10426 Propagate its inclusion.
10427 * src/reduce.c: Topological sort and other formatting changes.
10428 (bool, TRUE, FALSE): Move their definition to...
10429 * src/system.h: here.
10430
10431 2000-10-02 Akim Demaille <akim@epita.fr>
10432
10433 * src/files.c: Formatting changes.
10434 (tryopen, tryclose, openfiles): Rename as...
10435 (xfopen, xfclose, open_files): this.
10436 (stringappend): static.
10437 * src/files.h: Complete the list of exported symbols.
10438 Propagate its use.
10439
10440 2000-10-02 Akim Demaille <akim@epita.fr>
10441
10442 * src/reader.h: New file.
10443 Propagate its use instead of tedious list of `extern' and
10444 prototypes.
10445 * src/reader.c: Formatting changes, topological sort,
10446 s/register//.
10447
10448 2000-10-02 Akim Demaille <akim@epita.fr>
10449
10450 * src/lex.h: Prototype `lex.c' exported functions.
10451 * src/reader.c: Adjust.
10452 * src/lex.c: Formatting changes.
10453 (safegetc): Rename as...
10454 (xgetc): this.
10455
10456 2000-10-02 Akim Demaille <akim@epita.fr>
10457
10458 * src/lalr.h: New file.
10459 Propagate its inclusion instead of prototypes and `extern'.
10460 * src/lalr.c: Formatting changes, topological sorting etc.
10461
10462 2000-10-02 Akim Demaille <akim@epita.fr>
10463
10464 * src/output.c (token_actions): Introduce a temporary array,
10465 YYDEFACT, that makes it possible for this function to use
10466 output_short_table.
10467
10468 2000-10-02 Akim Demaille <akim@epita.fr>
10469
10470 `user_toknums' is output as a `short[]' in `output.c', while it is
10471 defined as a `int[]' in `reader.c'. For consistency with the
10472 other output tables, `user_toknums' is now defined as a table of
10473 shorts.
10474
10475 * src/reader.c (user_toknums): Be a short table instead of an int
10476 table.
10477 Adjust dependencies.
10478
10479 Factor the short table outputs.
10480
10481 * src/output.c (output_short_table): New function.
10482 * src/output.c (output_gram, output_stos, output_rule_data)
10483 (output_base, output_table, output_check): Use it.
10484
10485 2000-10-02 Akim Demaille <akim@epita.fr>
10486
10487 * src/output.c (output): Topological sort of the functions, in
10488 order to get rid of the `static' prototypes.
10489 No longer use `register'.
10490 * src/output.h: New file.
10491 Propagate its inclusion in files explicitly prototyping functions
10492 from output.c.
10493
10494 2000-09-21 Akim Demaille <akim@epita.fr>
10495
10496 * src/atgeneral.m4: Update from Autoconf.
10497
10498 2000-09-21 Akim Demaille <akim@epita.fr>
10499
10500 * src/closure.h: New file.
10501 * src/closure.c: Formatting changes, topological sort over the
10502 functions, use of closure.h.
10503 (initialize_closure, finalize_closure): Rename as...
10504 (new_closure, free_closure): these. Adjust dependencies.
10505 * src/LR0.c: Formatting changes, topological sort, use of
10506 cloture.h.
10507 (initialize_states): Rename as...
10508 (new_states): this.
10509 * src/Makefile.am (noinst_HEADERS): Adjust.
10510
10511 2000-09-20 Akim Demaille <akim@epita.fr>
10512
10513 * src/acconfig.h: Don't protect config.h against multiple
10514 inclusion.
10515 Don't define PARAMS.
10516 * src/system.h: Define PARAMS.
10517 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
10518 purpose of config.h. system.h must not try to fix wrong
10519 definitions in config.h.
10520
10521 2000-09-20 Akim Demaille <akim@epita.fr>
10522
10523 * src/derives.h: New file.
10524 * src/main.c, src/derives.h: Use it.
10525 Formatting changes.
10526 * src/Makefile.am (noinst_HEADERS): Adjust.
10527
10528 2000-09-20 Akim Demaille <akim@epita.fr>
10529
10530 * tests/atgeneral.m4: Update from Autoconf.
10531 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
10532 (AT_CHECK_CALC): New macros.
10533 Use these macros to test bison with options `', `--raw',
10534 `--debug', `--yacc', `--yacc --debug'.
10535
10536 2000-09-19 Akim Demaille <akim@epita.fr>
10537
10538 * src/output.c: Formatting changes.
10539 * src/machine.h: Remove, leaving its contents in...
10540 * src/system.h: here.
10541 Include stdio.h.
10542 Adjust all dependencies on stdio.h and machine.h.
10543 * src/getargs.h: New file.
10544 Let all `extern' declarations about getargs.c be replaced with
10545 inclusion of `getargs.h'.
10546 * src/Makefile.am (noinst_HEADERS): Adjust.
10547
10548 * tests/calc.m4 (yyin): Be initialized in main, not on the global
10549 scope.
10550 (yyerror): Returns void, not int.
10551 * doc/bison.texinfo: Formatting changes.
10552
10553 2000-09-19 Akim Demaille <akim@epita.fr>
10554
10555 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
10556 portable.
10557
10558 2000-09-18 Akim Demaille <akim@epita.fr>
10559
10560 * configure.in: Append WARNING_CFLAGS to CFLAGS.
10561 * src/Makefile.am (INCLUDES): Don't.
10562 Be ready to fetch headers in lib/.
10563
10564 2000-09-18 Akim Demaille <akim@epita.fr>
10565
10566 * doc/bison.texinfo: Update the copyright.
10567 ANSIfy and GNUify the examples.
10568 Remove the old menu.
10569
10570 2000-09-18 Akim Demaille <akim@epita.fr>
10571
10572 First set of tests: use the `calc' example from the documentation.
10573
10574 * src/bison.s1 (yyparse): Condition the code using `yytname' which
10575 is defined only when YYDEBUG is.
10576 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
10577 * src/files.c (tryopen, tryclose): Formatting changes.
10578 Move to the top and be static.
10579 * src/reader.c (read_signed_integer): Likewise.
10580 * tests/calc.m4: New file.
10581 * Makefile.am, suite.m4: Adjust.
10582 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
10583
10584 2000-09-18 Akim Demaille <akim@epita.fr>
10585
10586 Add support for an Autotest test suite for Bison.
10587
10588 * m4/m4.m4, m4/atconfig.m4: New files.
10589 * m4/Makefile.am (EXTRA_DIST): Adjust.
10590 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
10591 files.
10592 * src/getargs.c: Display a more standard --version message.
10593 * src/reader.c (reader): Formatting changes.
10594 No longer depend upon VERSION_STRING.
10595 * configure.in: No longer use `dnl'.
10596 Set up the test suite and the new directory `tests/.
10597 (VERSION_STRING): Remove.
10598
10599 2000-04-14 Akim Demaille <akim@epita.fr>
10600
10601 * src/reader.c (copy_comment2): New function, same as former
10602 `copy_comment', but outputs into two FILE *.
10603 (copy_comment): Use it.
10604 (parse_union_decl): Use it.
10605 (get_type, parse_start_decl): Use the same `invalid' message.
10606 (parse_start_decl, parse_union_decl): Use the same `multiple'
10607 message.
10608 (parse_union_decl, copy_guard, copy_action): Use the same
10609 `unmatched' message.
10610 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
10611
10612 2000-03-31 Akim Demaille <akim@epita.fr>
10613
10614 * src/files.c (tryopen, tryclose): Move to the top.
10615 Be static.
10616
10617 2000-03-31 Akim Demaille <akim@epita.fr>
10618
10619 * src/main.c (main): Don't call `done', exit does it.
10620
10621 2000-03-31 Akim Demaille <akim@epita.fr>
10622
10623 * allocate.c: s/return (foo)/return foo/.
10624 * lalr.c: Likewise.
10625 * LR0.c: Likewise.
10626 * output.c: Likewise.
10627 * reader.c: Likewise.
10628 * symtab.c: Likewise.
10629 * vmsgetargs.c: Likewise.
10630
10631 2000-03-31 Akim Demaille <akim@epita.fr>
10632
10633 Clean up the error reporting functions.
10634
10635 * src/report.c: New file.
10636 * src/report.h: Likewise.
10637 * src/Makefile.am: Adjust.
10638 * m4/error.m4: New file.
10639 * m4/Makefile.am: Adjust.
10640 * configure.in (jm_PREREQ_ERROR): Call it.
10641 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
10642 Remove.
10643 (fatal, fatals): Remove. All callers use complain.c::fatal.
10644 (warn, warni, warns, warnss, warnss): Remove. All callers use
10645 complain.c::complain.
10646 (toomany): Remove, use fatal instead.
10647 * src/files.c (done): No argument, use complain_message_count.
10648 * src/main.c (main): Register `done' to `atexit'.
10649
10650 * src/getargs.c (usage): More `fputs', less `fprintf'.
10651
10652 2000-03-28 Akim Demaille <akim@epita.fr>
10653
10654 * lib/: New directory.
10655 * Makefile.am (SUBDIRS): Adjust.
10656 * configure.in: Adjust.
10657 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
10658 useless.
10659 * src/alloca.c: Moved to lib/.
10660 * src/getopt.c: Likewise.
10661 * src/getopt1.c: Likewise.
10662 * src/getopt.h: Likewise.
10663 * src/ansi2knr.c: Likewise.
10664 * src/ansi2knr.1: Likewise.
10665 * src/Makefile.am: Adjust.
10666 * lib/Makefile.am: New file.
10667
10668 2000-03-28 Akim Demaille <akim@epita.fr>
10669
10670 * src/getargs.c (usage): Refresh the help message.
10671
10672 2000-03-17 Akim Demaille <akim@epita.fr>
10673
10674 * src/getopt1.c: Updated from textutils 2.0e
10675 * src/getopt.c: Likewise.
10676 * src/getopt.h: Likewise.
10677
10678 2000-03-17 Akim Demaille <akim@epita.fr>
10679
10680 * src/Makefile.am (bison.simple): Fix the awk program: quote only
10681 the file name, not the whole `#line LINE FILE'.
10682
10683 2000-03-17 Akim Demaille <akim@epita.fr>
10684
10685 On syntax errors, report the token on which we choked.
10686
10687 * src/bison.s1 (yyparse): In the label yyerrlab, when
10688 YYERROR_VERBOSE, add yychar in msg.
10689
10690 2000-03-17 Akim Demaille <akim@epita.fr>
10691
10692 * src/reader.c (copy_at): New function.
10693 (copy_guard): Use it.
10694 (copy_action): Use it.
10695
10696 2000-03-17 Akim Demaille <akim@epita.fr>
10697
10698 Be kind to translators, save some useless translations.
10699
10700 * src/main.c (banner): New function.
10701 (fatal_banner): Use it.
10702 (warn_banner): Use it.
10703
10704 2000-03-17 Akim Demaille <akim@epita.fr>
10705
10706 * src/reader.c (copy_definition): Use copy_string and
10707 copy_comment. Removed now unused `match', `ended',
10708 `cplus_comment'.
10709 (copy_comment, copy_string): Moved, to be visible from
10710 copy_definition.
10711
10712 2000-03-17 Akim Demaille <akim@epita.fr>
10713
10714 * src/reader.c (copy_string): Declare `static inline'. No
10715 problems with inline, since it is checked by configure.
10716 (copy_comment): Likewise.
10717
10718 2000-03-17 Akim Demaille <akim@epita.fr>
10719
10720 * src/reader.c (packsymbols): Formatting changes.
10721
10722 2000-03-17 Akim Demaille <akim@epita.fr>
10723
10724 * src/reader.c (copy_comment): New function, factored out from:
10725 (copy_action): Use it. Removed now unused `match', `ended',
10726 `cplus_comment'.
10727 (copy_guard): Likewise.
10728
10729 2000-03-17 Akim Demaille <akim@epita.fr>
10730
10731 * src/reader.c (copy_string): New function, factored out from:
10732 (copy_action): Use it.
10733 (copy_guard): Likewise.
10734
10735 2000-03-17 Akim Demaille <akim@epita.fr>
10736
10737 Change the handling of @s so that they behave exactly like $s.
10738 There is now a pseudo variable @$ (readble and writable), location
10739 of the lhs of the rule (by default ranging from the location of
10740 the first symbol of the rhs, to the location of the last symbol,
10741 or, if the rhs is empty, YYLLOC).
10742
10743 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
10744 yyval.
10745 (yyparse): When providing a default semantic action, provide a
10746 default location action.
10747 (after the $): No longer change `*YYLSP', just stack YYLOC the
10748 same way you stack YYVAL.
10749 * src/reader.c (read_declarations): Use warns.
10750 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
10751 (copy_action, case '@'): Likewise.
10752 Use a standard error message, to save useless work from
10753 translators.
10754
10755 2000-03-17 Akim Demaille <akim@epita.fr>
10756
10757 * src/bison.s1: Formatting and cosmetics changes.
10758 * src/reader.c: Likewise.
10759 Update the Copyright notice.
10760
10761 2000-03-17 Akim Demaille <akim@epita.fr>
10762
10763 * src/bison.s1 (#line): All set to `#line' only, since the
10764 Makefile now handles them.
10765
10766 2000-03-16 Akim Demaille <akim@epita.fr>
10767
10768 * src/output.c (output_rule_data): Output the documentation of
10769 some of the tables.
10770 (Copyright notice): Update.
10771 Formatting changes.
10772
10773 2000-03-16 Akim Demaille <akim@epita.fr>
10774
10775 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
10776 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
10777 One `#if YYDEBUG' remains, since it uses variables which are
10778 defined only if `YYDEBUG != 0'.
10779
10780 2000-03-16 Akim Demaille <akim@epita.fr>
10781
10782 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
10783 and related variables so that the similarities are highlighted.
10784
10785 2000-03-16 Akim Demaille <akim@epita.fr>
10786
10787 * src/bison.s1: Properly indent CPP directives.
10788
10789 2000-03-16 Akim Demaille <akim@epita.fr>
10790
10791 * src/bison.s1: Properly indent the `alloca' CPP section.
10792
10793 2000-03-16 Akim Demaille <akim@epita.fr>
10794
10795 Do not hard code values of directories in `configure.in'.
10796 Update the `configure' tool chain.
10797
10798 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
10799 src/makefile.am.
10800 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
10801 (AC_OUTPUT): Add m4/Makefile.
10802 Bump to bison 1.28a, 1.29 has never been released.
10803 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
10804 handled via src/Makefile.am.
10805 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
10806 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
10807 autoheader.
10808 * Makefile.am (SUBDIRS): Add m4.
10809 (ACLOCAL_AM_FLAGS): New variable.
10810 (AUTOMAKE_OPTIONS): Add check-news.
10811 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
10812 the proper line number and file name.
10813 (DEFS): Propagate the location of bison library files and of the
10814 locale files.
10815 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
10816 builddir.
10817 * acinclude.m4: Remove, replaced by the directory m4.
10818 * m4/Makefile.am (EXTRA_DIST): New variable.
10819 * m4/gettext.m4: New file, from the fileutils.
10820 * m4/lcmessage.m4: Likewise
10821 * m4/progtest.m4: Likewise.
10822 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
10823
10824 2000-03-10 Akim Demaille <akim@epita.fr>
10825
10826 * src/closure.c:
10827 Formatting changes of various comments.
10828 Respect the GNU coding standards at various places.
10829 Don't use `_()' when no translation is needed.
10830
10831 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10832
10833 * src/files.c:
10834 OS/2 honors TMPDIR environment variable.
10835
10836 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10837
10838 * doc/bison.texinfo: Tweaked spelling and grammar.
10839 Updated ISBN.
10840 Removed reference to price of printed copy.
10841 Mention BISON_SIMPLE and BISON_HAIRY.
10842
10843 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10844
10845 * configure.in, NEWS:
10846 Bison 1.29 released.
10847
10848 1999-10-27 Jesse Thilo <jthilo@gnu.org>
10849
10850 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
10851 Added reference card.
10852
10853 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10854
10855 * po/ru.po: Added Russian translation.
10856
10857 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10858
10859 * configure.in: Added Russian translation.
10860
10861 1999-07-06 Jesse Thilo <jthilo@gnu.org>
10862
10863 * configure.in, NEWS, README:
10864 Released version 1.28.
10865
10866 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10867
10868 * src/system.h:
10869 Squashed redefinition warning on some systems.
10870
10871 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10872 Have configure build version string instead of relying on ANSI string
10873 concatentation.
10874
10875 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10876
10877 * po/POTFILES.in: Got rid of version.c.
10878
10879 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10880
10881 * acconfig.h, configure.in:
10882 Have configure build version string instead of relying on ANSI string
10883 concatentation.
10884
10885 1999-06-08 Jesse Thilo <jthilo@gnu.org>
10886
10887 * doc/bison.1:
10888 Dropped mention of `+' for long-named options.
10889
10890 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10891
10892 * src/files.c: Added <unistd.h> for unlink().
10893
10894 * src/Makefile.am, src/system.h:
10895 I18n fixes.
10896
10897 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10898
10899 * README: Added a FAQ list.
10900
10901 * configure.in, acconfig.h:
10902 I18n fixes.
10903
10904 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10905
10906 * doc/FAQ, doc/Makefile.am:
10907 Added a FAQ list.
10908
10909 1999-05-19 Jesse Thilo <jthilo@gnu.org>
10910
10911 * src/alloc.h, src/symtab.h, src/version.c:
10912 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10913
10914 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10915
10916 * src/.cvsignore, src/Makefile.am:
10917 Reorganized: sources in `src', documentation in `doc'.
10918
10919 * src/lex.c (literalchar):
10920 fixed the code for escaping double quotes (thanks
10921 Jonathan Czisny.)
10922
10923 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10924
10925 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10926 Adjusted paths to reflect directory reorganization.
10927
10928 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10929
10930 * doc/.cvsignore, doc/Makefile.am:
10931 Reorganized: sources in `src', documentation in `doc'.
10932
10933 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10934
10935 * configure.in:
10936 Updated AC_INIT file to reflect directory reorganization.
10937
10938 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10939 Reorganized: sources in `src', documentation in `doc'.
10940
10941 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10942
10943 * src/allocate.c:
10944 Don't declare calloc() and realloc() if not necessary.
10945
10946 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10947
10948 * configure.in, acconfig.h, acinclude.m4:
10949 Don't declare calloc() and realloc() if not necessary.
10950
10951 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10952
10953 * po/.cvsignore: Added i18n support.
10954
10955 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10956
10957 * acconfig.h, configure.in, Makefile.am:
10958 Added i18n support.
10959
10960 1999-03-22 Jesse Thilo <jthilo@gnu.org>
10961
10962 * src/bison.s1: Fixed #line numbers.
10963
10964 1999-03-15 Jesse Thilo <jthilo@gnu.org>
10965
10966 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10967 Added PO files from Translation Project.
10968
10969 1999-03-03 Jesse Thilo <jthilo@gnu.org>
10970
10971 * Makefile.am:
10972 Added support for non-ANSI compilers (ansi2knr).
10973
10974 1999-02-16 Jesse Thilo <jthilo@gnu.org>
10975
10976 * configure.in: Bumped version number to 1.27.
10977
10978 * Makefile.am:
10979 Added `bison.simple' to list of files removed by `make distclean'.
10980
10981 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10982
10983 * src/files.c, src/files.h:
10984 Defined locations of parser files in config.h instead of Makefile.
10985
10986 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10987
10988 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10989 Defined locations of parser files in config.h instead of Makefile.
10990
10991 1999-02-09 Jesse Thilo <jthilo@gnu.org>
10992
10993 * Makefile.am:
10994 Removed inappropriate use of $< macro.
10995
10996 1999-02-05 Jesse Thilo <jthilo@gnu.org>
10997
10998 * po/Makefile.in.in, po/POTFILES.in:
10999 Add `po' directory skeleton.
11000
11001 1999-01-27 Jesse Thilo <jthilo@gnu.org>
11002
11003 * README: Document help-bison list.
11004
11005 * configure.in: Add check for mkstemp().
11006
11007 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11008
11009 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
11010 Hush a few compiler warnings.
11011
11012 * src/files.c:
11013 Add tryclose(), which verifies that fclose was successful.
11014 Hush a couple of compiler warnings.
11015
11016 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11017
11018 * Makefile.am, OChangeLog:
11019 ChangeLog is now automatically generated. Include the old version as
11020 OChangeLog.
11021
11022 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11023
11024 * 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:
11025 Update FSF address.
11026
11027 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11028
11029 * doc/bison.texinfo: Fix formatting glitch.
11030
11031 * doc/bison.texinfo: Update FSF address.
11032
11033 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11034
11035 * acconfig.h: Update FSF address.
11036
11037 1999-01-08 Jesse Thilo <jthilo@gnu.org>
11038
11039 * src/system.h:
11040 Don't define PACKAGE here, since config.h defines it.
11041
11042 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11043
11044 * src/reader.c: Update copyright date.
11045
11046 * src/main.c:
11047 Ditch sprintf to statically-sized buffers in fatal/warn functions in
11048 favor of output directly to stderr (avoids buffer overruns).
11049
11050 * src/reader.c: Some checks for premature EOF.
11051
11052 * 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:
11053 Use prototypes if the compiler understands them.
11054
11055 * src/files.c: Honor TMPDIR on Unix hosts.
11056 Use prototypes if the compiler understands them.
11057
11058 * src/reader.c:
11059 Fix a couple of buffer overrun bugs.
11060 Use prototypes if the compiler understands them.
11061
11062 * src/system.h: Include unistd.h and ctype.h.
11063 Use #ifdef instead of #if for NLS symbols.
11064
11065 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11066
11067 * doc/bison.texinfo:
11068 Delete comment "consider using @set for edition number, etc..." since
11069 we now are doing so.
11070
11071 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11072
11073 * configure.in:
11074 Use prototypes if the compiler understands them.
11075
11076 * NEWS: Document 1.26 highlights.
11077
11078 * Makefile.am: Require Automake 1.3 or later.
11079
11080 * acconfig.h:
11081 Use prototypes if the compiler understands them.
11082
11083 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11084
11085 * src/version.c:
11086 Use VERSION symbol from automake for version number.
11087
11088 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11089
11090 * acconfig.h, configure.in, version.cin:
11091 Use VERSION symbol from automake for version number.
11092
11093 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11094
11095 * Makefile.am:
11096 Distribute original version of simple parser (bison.s1), not built
11097 version (bison.simple).
11098
11099 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11100
11101 * doc/bison.texinfo: Add info dir entry.
11102
11103 * doc/bison.texinfo:
11104 Let automake put version number into documentation.
11105
11106 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11107
11108 * src/bison.cld, src/build.com, src/vmshlp.mar:
11109 Add non-RCS files from /gd/gnu/bison.
11110
11111 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11112
11113 * doc/bison.1:
11114 Document the BISON_HAIRY and BISON_SIMPLE variables.
11115
11116 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11117
11118 * src/version.c: Build version.c automatically.
11119
11120 * src/reader.c:
11121 Fix token numbering (used to start at 258, not 257).
11122
11123 * src/system.h: Include config.h.
11124
11125 * src/getargs.c: Update bug report address.
11126
11127 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
11128 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
11129
11130 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11131
11132 * Makefile.am:
11133 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11134
11135 * configure.in, version.cin:
11136 Build version.c automatically.
11137
11138 * AUTHORS: Add AUTHORS file.
11139
11140 * README: Update bug report address.
11141
11142 * bison.simple:
11143 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11144
11145 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
11146 Add automake stuff.
11147
11148 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11149
11150 * doc/bison.texinfo: Clean up some formatting.
11151
11152 1998-05-05 Richard Stallman <rms@gnu.org>
11153
11154 * doc/bison.texinfo:
11155 Explain better why to make a pure parser.
11156
11157 1998-01-05 Richard Stallman <rms@gnu.org>
11158
11159 * src/files.c (openfiles):
11160 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
11161 find a temporary directory, if possible. Do not unlink files while
11162 they are open.
11163
11164 1997-08-25 Richard Stallman <rms@gnu.org>
11165
11166 * src/reader.c (stack_offset;):
11167 Change some warni to warns.
11168
11169 * src/lex.c (literalchar): Use warns, not warni.
11170
11171 1997-06-28 Richard Stallman <rms@gnu.org>
11172
11173 * src/bison.s1: Add a Bison version comment.
11174
11175 * src/main.c (fatal, warn, berror):
11176 Use program_name.
11177
11178 1997-06-28 Richard Stallman <rms@gnu.org>
11179
11180 * Makefile.in (bison_version): New variable.
11181 (dist): Use that variable.
11182 (bison.s1): Substitute the Bison version into bison.simple.
11183
11184 * bison.simple: Add a Bison version comment.
11185
11186 1997-06-18 Richard Stallman <rms@gnu.org>
11187
11188 * src/main.c (fatal, warn, berror):
11189 Make error messages standard.
11190 (toomany): Improve error message text.
11191
11192 * 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:
11193 new.h renamed to alloc.h.
11194
11195 1997-06-18 Richard Stallman <rms@gnu.org>
11196
11197 * Makefile.in: new.h renamed to alloc.h.
11198
11199 1997-05-24 Richard Stallman <rms@gnu.org>
11200
11201 * src/lex.c (literalchar):
11202 Fix the code for escaping \, " and '.
11203
11204 (lex): Avoid trouble when there are many chars
11205 to discard in a char literal with just several chars in it.
11206
11207 1997-05-17 Richard Stallman <rms@gnu.org>
11208
11209 * src/bison.s1:
11210 Use malloc, if using alloca is troublesome.
11211 (YYSTACK_USE_ALLOCA): New flag macro.
11212 Define it for some systems and compilers.
11213 (YYSTACK_ALLOC): New macro.
11214 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11215 If it was malloc'd, free it.
11216
11217 1997-05-17 Richard Stallman <rms@gnu.org>
11218
11219 * bison.simple:
11220 Use malloc, if using alloca is troublesome.
11221 (YYSTACK_USE_ALLOCA): New flag macro.
11222 Define it for some systems and compilers.
11223 (YYSTACK_ALLOC): New macro.
11224 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11225 If it was malloc'd, free it.
11226
11227 1997-04-23 Richard Stallman <rms@gnu.org>
11228
11229 * src/bison.s1:
11230 (alloca) [__hpux]: Always define as __builtin_alloca.
11231
11232 1997-04-23 Richard Stallman <rms@gnu.org>
11233
11234 * bison.simple:
11235 (alloca) [__hpux]: Always define as __builtin_alloca.
11236
11237 1997-04-22 Richard Stallman <rms@gnu.org>
11238
11239 * src/bison.s1:
11240 [__hpux]: Include alloca.h (right for HPUX 10)
11241 instead of declaring alloca (right for HPUX 9).
11242
11243 * src/bison.s1 (__yy_memcpy):
11244 Declare arg `count' as unsigned int.
11245 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11246
11247 1997-04-22 Richard Stallman <rms@gnu.org>
11248
11249 * bison.simple:
11250 [__hpux]: Include alloca.h (right for HPUX 10)
11251 instead of declaring alloca (right for HPUX 9).
11252
11253 * bison.simple (__yy_memcpy):
11254 Declare arg `count' as unsigned int.
11255 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11256
11257 1997-01-03 Richard Stallman <rms@gnu.org>
11258
11259 * src/allocate.c: [__STDC__ or _MSC_VER]:
11260 Declare calloc and realloc to return void *.
11261
11262 1997-01-02 Richard Stallman <rms@gnu.org>
11263
11264 * src/system.h:
11265 [_MSC_VER]: Include stdlib.h and process.h.
11266 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
11267
11268 * src/main.c (main): Return FAILURE as a value.
11269 (printable_version): Declare arg as int, not char.
11270
11271 1997-01-02 Richard Stallman <rms@gnu.org>
11272
11273 * Makefile.in (dist):
11274 Explicitly check for symlinks, and copy them.
11275
11276 1996-12-19 Richard Stallman <rms@gnu.org>
11277
11278 * src/files.c:
11279 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
11280
11281 1996-12-18 Paul Eggert <eggert@gnu.org>
11282
11283 * src/bison.s1 (yyparse):
11284 If __GNUC__ and YYPARSE_PARAM are both defined,
11285 declare yyparse to have a void * argument.
11286
11287 1996-12-18 Paul Eggert <eggert@gnu.org>
11288
11289 * bison.simple (yyparse):
11290 If __GNUC__ and YYPARSE_PARAM are both defined,
11291 declare yyparse to have a void * argument.
11292
11293 1996-12-17 Richard Stallman <rms@gnu.org>
11294
11295 * src/reduce.c (nbits): Add some casts.
11296
11297 1996-08-12 Richard Stallman <rms@gnu.org>
11298
11299 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
11300
11301 1996-08-12 Richard Stallman <rms@gnu.org>
11302
11303 * bison.simple: Test _MSDOS as well as _MSDOS_.
11304
11305 1996-07-31 Richard Stallman <rms@gnu.org>
11306
11307 * src/bison.s1:
11308 [__sun && __i386]: Include alloca.h.
11309
11310 1996-07-31 Richard Stallman <rms@gnu.org>
11311
11312 * bison.simple:
11313 [__sun && __i386]: Include alloca.h.
11314
11315 1996-07-30 Richard Stallman <rms@gnu.org>
11316
11317 * src/bison.s1: Comment change.
11318
11319 * src/bison.s1: Test _MSDOS_, not MSDOS.
11320
11321 1996-07-30 Richard Stallman <rms@gnu.org>
11322
11323 * bison.simple: Comment change.
11324
11325 * bison.simple: Test _MSDOS_, not MSDOS.
11326
11327 1996-06-01 Richard Stallman <rms@gnu.org>
11328
11329 * 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:
11330 Insert `_' macro around many string constants.
11331
11332 * src/main.c:
11333 Insert `_' macro around many string constants.
11334
11335 (main): Call setlocale, bindtextdomain and textdomain.
11336
11337 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11338 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11339 [ENABLE_NLS]: Include libintl.h.
11340 [ENABLE_NLS] (gettext): Define.
11341 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11342 (N_, PACKAGE, LOCALEDIR): New macros.
11343
11344 1996-06-01 Richard Stallman <rms@gnu.org>
11345
11346 * POTFILES.in: New file.
11347
11348 * Makefile.in (allocate.o):
11349 Define target explicitly.
11350
11351 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11352 (LDFLAGS): Set to @LDFLAGS@.
11353 (configure): Run autoconf only if preceding `cd' succeeds.
11354 (bison.s1): Redirect output to temporary file then move the
11355 temporary to the target, rather than redirecting directly to bison.s1.
11356 (clean): Remove config.status and config.log.
11357 (distclean): Don't remove config.status here.
11358
11359 1996-05-12 Richard Stallman <rms@gnu.org>
11360
11361 * src/bison.s1:
11362 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11363
11364 1996-05-12 Richard Stallman <rms@gnu.org>
11365
11366 * bison.simple:
11367 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11368
11369 1996-05-11 Richard Stallman <rms@gnu.org>
11370
11371 * src/bison.s1 (__yy_memcpy):
11372 Really reorder the args, as was supposedly done on Feb 14 1995.
11373 (yyparse): Calls changed accordingly.
11374
11375 1996-05-11 Richard Stallman <rms@gnu.org>
11376
11377 * Makefile.in (dist): Don't use $(srcdir).
11378
11379 * bison.simple (__yy_memcpy):
11380 Really reorder the args, as was supposedly done on Feb 14 1995.
11381 (yyparse): Calls changed accordingly.
11382
11383 1996-01-27 Richard Stallman <rms@gnu.org>
11384
11385 * src/output.c (output_rule_data):
11386 Test YYERROR_VERBOSE in the conditional
11387 around the definition of ttyname.
11388
11389 1995-12-29 Richard Stallman <rms@gnu.org>
11390
11391 * src/bison.s1:
11392 Fix line numbers in #line commands.
11393
11394 1995-12-29 Richard Stallman <rms@gnu.org>
11395
11396 * bison.simple:
11397 Fix line numbers in #line commands.
11398
11399 1995-12-27 Richard Stallman <rms@gnu.org>
11400
11401 * src/bison.s1 (YYPARSE_PARAM_DECL):
11402 In C++, make it always null.
11403 (YYPARSE_PARAM_ARG): New macro.
11404 (yyparse): Use YYPARSE_PARAM_ARG.
11405
11406 1995-12-27 Richard Stallman <rms@gnu.org>
11407
11408 * bison.simple (YYPARSE_PARAM_DECL):
11409 In C++, make it always null.
11410 (YYPARSE_PARAM_ARG): New macro.
11411 (yyparse): Use YYPARSE_PARAM_ARG.
11412
11413 1995-11-29 Richard Stallman <rms@gnu.org>
11414
11415 * doc/bison.texinfo:
11416 Describe literal string tokens, %raw, %no_lines, %token_table.
11417
11418 1995-11-29 Daniel Hagerty <hag@gnu.org>
11419
11420 * doc/bison.texinfo: Fixed update date
11421
11422 1995-10-16 Richard Stallman <rms@gnu.org>
11423
11424 * src/version.c: Version 1.25.
11425
11426 1995-10-16 Richard Stallman <rms@gnu.org>
11427
11428 * NEWS: *** empty log message ***
11429
11430 1995-10-16 Richard Stallman <rms@gnu.org>
11431
11432 * doc/bison.1, doc/bison.rnh:
11433 Add new options.
11434
11435 1995-10-15 Richard Stallman <rms@gnu.org>
11436
11437 * src/vmsgetargs.c, src/getargs.c:
11438 Added -n, -k, and -raw switches.
11439 (noparserflag, toknumflag, rawtoknumflag): New variables.
11440
11441 * src/symtab.h (SALIAS):
11442 New #define for adding aliases to %token.
11443 (struct bucket): Added `alias' field.
11444
11445 * src/reduce.c (reduce_grammar):
11446 Revise error message.
11447 (print_notices): Remove final `.' from error message.
11448
11449 * src/reader.c (reader_output_yylsp):
11450 New function.
11451 (readgram): Use `#if 0' around code that accepted %command
11452 inside grammar rules: The documentation doesn't allow it,
11453 and it will fail since the %command processors scan for the next %.
11454 (parse_token_decl): Extended the %token
11455 declaration to allow a multi-character symbol as an alias.
11456 (parse_thong_decl): New function.
11457 (read_declarations): Added %thong declarations.
11458 (read_declarations): Handle NOOP to deal with allowing
11459 % declarations as another means to specify the flags.
11460 (readgram): Allow %prec prior to semantics embedded in a rule.
11461 (skip_to_char, read_declarations, copy_definition)
11462 (parse_token_decl, parse_start_decl, parse_type_decl)
11463 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
11464 (get_type_name, copy_guard, copy_action, readgram)
11465 (get_type, packsymbols): Revised most error messages.
11466 Changed `fatal' to `warnxxx' to avoid aborting for error.
11467 Revised and use multiple warnxxx functions to avoid using VARARGS1.
11468 (read_declarations): Improve the error message for
11469 an invalid character. Do not abort.
11470 (read_declarations, copy_guard, copy_action): Use
11471 printable_version to avoid unprintable characters in printed output.
11472 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
11473 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
11474 Allow the type of a non-terminal can be given
11475 more than once, as long as all specifications give the same type.
11476
11477 * src/output.c:
11478 (output_headers, output_trailers, output, output_gram)
11479 (output_rule_data): Implement noparserflag variable.
11480 Implement toknumflag variable.
11481 (output): Call reader_output_yylsp to output LTYPESTR.
11482
11483 * src/main.c (main):
11484 If reader sees an error, don't process the grammar.
11485 (fatals): Updated to not use VARARGS1.
11486 (printable_version, int_to_string, warn, warni, warns, warnss)
11487 (warnsss): New error reporting functions. Avoid abort for error.
11488
11489 * src/lex.h:
11490 Added THONG and NOOP for alias processing.
11491 Added SETOPT for the new code that allows setting options with %flags.
11492
11493 * src/lex.c:
11494 Include getopt.h. Add some extern decls.
11495 (safegetc): New function to deal with EOF gracefully.
11496 (literalchar); new function to deal with reading \ escapes.
11497 (lex): Use literalchar.
11498 (lex): Implemented "..." tokens.
11499 (literalchar, lex, parse_percent_token): Made tokenbuffer
11500 always contain the token. This includes growing the token
11501 buffer while reading an integer.
11502 (parse_percent_token): Replaced if-else statement with percent_table.
11503 (parse_percent_token): Added % declarations as another
11504 way to specify the flags -n, -l, and -r. Also added hooks for
11505 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
11506 major changes to files.c.
11507 (lex) Retain in the incoming stream a character following
11508 an incorrect '/'.
11509 (skip_white_space, lex): Revised most error messages
11510 and changed fatal to warn to avoid aborting.
11511 (percent_table): Added %thong declarations.
11512
11513 * src/gram.h: Comment changes.
11514
11515 * src/files.c (openfiles, open_extra_files, done):
11516 Add faction flag
11517 and actfile file. Handle noparserflag. Both for -n switch.
11518
11519 * src/conflicts.c (resolve_sr_conflict):
11520 Remove use of alloca.
11521
11522 1995-06-01 Jim Meyering <meyering@gnu.org>
11523
11524 * doc/bison.texinfo: *** empty log message ***
11525
11526 1995-05-06 Richard Stallman <rms@gnu.org>
11527
11528 * src/bison.s1: Comment change.
11529
11530 1995-05-06 Richard Stallman <rms@gnu.org>
11531
11532 * bison.simple: Comment change.
11533
11534 1995-05-03 Richard Stallman <rms@gnu.org>
11535
11536 * src/version.c: Version now 1.24.
11537
11538 * src/bison.s1: Change distribution terms.
11539
11540 * src/version.c: Version now 1.23.
11541
11542 1995-05-03 Richard Stallman <rms@gnu.org>
11543
11544 * doc/bison.texinfo:
11545 Rewrite "Conditions for Using Bison".
11546 Update version to 1.24.
11547
11548 1995-05-03 Richard Stallman <rms@gnu.org>
11549
11550 * bison.simple: Change distribution terms.
11551
11552 1995-02-23 Richard Stallman <rms@gnu.org>
11553
11554 * src/files.c: Test __VMS_POSIX as well as VMS.
11555
11556 1995-02-14 Jim Meyering <meyering@gnu.org>
11557
11558 * src/bison.s1 (__yy_memcpy):
11559 Renamed from __yy_bcopy to avoid
11560 confusion. Reverse FROM and TO arguments to be consistent with
11561 those of memcpy.
11562
11563 1995-02-14 Jim Meyering <meyering@gnu.org>
11564
11565 * bison.simple (__yy_memcpy):
11566 Renamed from __yy_bcopy to avoid
11567 confusion. Reverse FROM and TO arguments to be consistent with
11568 those of memcpy.
11569
11570 1994-11-10 David J. MacKenzie <djm@gnu.org>
11571
11572 * NEWS: reformat
11573
11574 * NEWS: New file.
11575
11576 * Makefile.in (DISTFILES): Include NEWS.
11577
11578 * Makefile.in (DISTFILES):
11579 Include install-sh, not install.sh.
11580
11581 * configure.in: Update to Autoconf v2 macro names.
11582
11583 1994-10-05 David J. MacKenzie <djm@gnu.org>
11584
11585 * Makefile.in: fix typo
11586
11587 * Makefile.in (prefix, exec_prefix):
11588 Let configure set them.
11589
11590 1994-09-28 David J. MacKenzie <djm@gnu.org>
11591
11592 * Makefile.in: Set datadir to $(prefix)/share.
11593
11594 1994-09-15 Richard Stallman <rms@gnu.org>
11595
11596 * src/bison.s1:
11597 Update copyright notice and GPL version.
11598
11599 1994-09-15 Richard Stallman <rms@gnu.org>
11600
11601 * bison.simple:
11602 Update copyright notice and GPL version.
11603
11604 1994-07-12 Richard Stallman <rms@gnu.org>
11605
11606 * src/reduce.c, src/reader.c:
11607 entered into RCS
11608
11609 1994-05-05 David J. MacKenzie <djm@gnu.org>
11610
11611 * Makefile.in: entered into RCS
11612
11613 1994-03-26 Richard Stallman <rms@gnu.org>
11614
11615 * src/bison.s1: entered into RCS
11616
11617 1994-03-26 Richard Stallman <rms@gnu.org>
11618
11619 * bison.simple: entered into RCS
11620
11621 1994-03-25 Richard Stallman <rms@gnu.org>
11622
11623 * src/main.c: entered into RCS
11624
11625 1994-03-24 Richard Stallman <rms@gnu.org>
11626
11627 * src/conflicts.c: entered into RCS
11628
11629 1994-01-02 Richard Stallman <rms@gnu.org>
11630
11631 * Makefile.in: *** empty log message ***
11632
11633 1993-11-21 Richard Stallman <rms@gnu.org>
11634
11635 * src/bison.s1: *** empty log message ***
11636
11637 1993-11-21 Richard Stallman <rms@gnu.org>
11638
11639 * doc/bison.texinfo: entered into RCS
11640
11641 * doc/bison.texinfo: *** empty log message ***
11642
11643 1993-11-21 Richard Stallman <rms@gnu.org>
11644
11645 * bison.simple: *** empty log message ***
11646
11647 1993-10-25 David J. MacKenzie <djm@gnu.org>
11648
11649 * doc/bison.texinfo: *** empty log message ***
11650
11651 1993-10-19 Richard Stallman <rms@gnu.org>
11652
11653 * src/bison.s1: *** empty log message ***
11654
11655 1993-10-19 Richard Stallman <rms@gnu.org>
11656
11657 * bison.simple: *** empty log message ***
11658
11659 1993-10-14 Richard Stallman <rms@gnu.org>
11660
11661 * src/bison.s1: *** empty log message ***
11662
11663 1993-10-14 Richard Stallman <rms@gnu.org>
11664
11665 * bison.simple: *** empty log message ***
11666
11667 1993-09-14 David J. MacKenzie <djm@gnu.org>
11668
11669 * doc/bison.texinfo: *** empty log message ***
11670
11671 1993-09-13 Noah Friedman <friedman@gnu.org>
11672
11673 * Makefile.in: *** empty log message ***
11674
11675 1993-09-10 Richard Stallman <rms@gnu.org>
11676
11677 * src/conflicts.c: *** empty log message ***
11678
11679 * src/system.h: entered into RCS
11680
11681 1993-09-10 Richard Stallman <rms@gnu.org>
11682
11683 * doc/bison.1: entered into RCS
11684
11685 1993-09-06 Noah Friedman <friedman@gnu.org>
11686
11687 * src/version.c: entered into RCS
11688
11689 1993-09-06 Noah Friedman <friedman@gnu.org>
11690
11691 * Makefile.in: *** empty log message ***
11692
11693 1993-07-30 David J. MacKenzie <djm@gnu.org>
11694
11695 * Makefile.in: *** empty log message ***
11696
11697 1993-07-24 Richard Stallman <rms@gnu.org>
11698
11699 * src/bison.s1: *** empty log message ***
11700
11701 1993-07-24 Richard Stallman <rms@gnu.org>
11702
11703 * bison.simple: *** empty log message ***
11704
11705 1993-07-08 David J. MacKenzie <djm@gnu.org>
11706
11707 * Makefile.in: *** empty log message ***
11708
11709 1993-07-04 Richard Stallman <rms@gnu.org>
11710
11711 * src/bison.s1: *** empty log message ***
11712
11713 1993-07-04 Richard Stallman <rms@gnu.org>
11714
11715 * bison.simple: *** empty log message ***
11716
11717 1993-06-26 David J. MacKenzie <djm@gnu.org>
11718
11719 * src/getargs.c: entered into RCS
11720
11721 1993-06-26 David J. MacKenzie <djm@gnu.org>
11722
11723 * doc/bison.texinfo: *** empty log message ***
11724
11725 * doc/bison.1: New file.
11726
11727 1993-06-25 Richard Stallman <rms@gnu.org>
11728
11729 * src/getargs.c: New file.
11730
11731 1993-06-16 Richard Stallman <rms@gnu.org>
11732
11733 * src/bison.s1: *** empty log message ***
11734
11735 1993-06-16 Richard Stallman <rms@gnu.org>
11736
11737 * bison.simple: *** empty log message ***
11738
11739 1993-06-03 Richard Stallman <rms@gnu.org>
11740
11741 * src/bison.s1: New file.
11742
11743 1993-06-03 Richard Stallman <rms@gnu.org>
11744
11745 * doc/bison.texinfo: *** empty log message ***
11746
11747 1993-06-03 Richard Stallman <rms@gnu.org>
11748
11749 * bison.simple: New file.
11750
11751 1993-05-19 Richard Stallman <rms@gnu.org>
11752
11753 * doc/bison.texinfo: New file.
11754
11755 1993-05-07 Noah Friedman <friedman@gnu.org>
11756
11757 * Makefile.in: *** empty log message ***
11758
11759 1993-04-28 Noah Friedman <friedman@gnu.org>
11760
11761 * src/reader.c: *** empty log message ***
11762
11763 1993-04-23 Noah Friedman <friedman@gnu.org>
11764
11765 * src/alloc.h: entered into RCS
11766
11767 1993-04-20 David J. MacKenzie <djm@gnu.org>
11768
11769 * src/version.c: *** empty log message ***
11770
11771 * src/files.c, src/allocate.c:
11772 entered into RCS
11773
11774 * src/reader.c: *** empty log message ***
11775
11776 * src/lex.c: entered into RCS
11777
11778 * src/conflicts.c: New file.
11779
11780 * src/symtab.c: entered into RCS
11781
11782 * src/alloc.h: New file.
11783
11784 * src/LR0.c: entered into RCS
11785
11786 1993-04-18 Noah Friedman <friedman@gnu.org>
11787
11788 * src/reader.c: New file.
11789
11790 * src/version.c: *** empty log message ***
11791
11792 1993-04-18 Noah Friedman <friedman@gnu.org>
11793
11794 * Makefile.in: *** empty log message ***
11795
11796 1993-04-17 Noah Friedman <friedman@gnu.org>
11797
11798 * Makefile.in: *** empty log message ***
11799
11800 1993-04-15 Richard Stallman <rms@gnu.org>
11801
11802 * src/main.c, src/files.c:
11803 New file.
11804
11805 1993-04-15 Noah Friedman <friedman@gnu.org>
11806
11807 * configure.in: entered into RCS
11808
11809 * configure.in: *** empty log message ***
11810
11811 * configure.in: New file.
11812
11813 1993-04-14 Richard Stallman <rms@gnu.org>
11814
11815 * Makefile.in: New file.
11816
11817 1993-04-13 Richard Stallman <rms@gnu.org>
11818
11819 * src/version.c: New file.
11820
11821 1993-03-25 Richard Stallman <rms@gnu.org>
11822
11823 * src/output.c: entered into RCS
11824
11825 1992-09-25 Richard Stallman <rms@gnu.org>
11826
11827 * configure.bat: entered into RCS
11828
11829 1992-06-22 Richard Stallman <rms@gnu.org>
11830
11831 * src/vmsgetargs.c: entered into RCS
11832
11833 1992-06-22 Richard Stallman <rms@gnu.org>
11834
11835 * doc/bison.rnh: entered into RCS
11836
11837 1992-04-20 David J. MacKenzie <djm@gnu.org>
11838
11839 * README: entered into RCS
11840
11841 1992-01-22 Richard Stallman <rms@gnu.org>
11842
11843 * src/machine.h: entered into RCS
11844
11845 1991-12-21 Richard Stallman <rms@gnu.org>
11846
11847 * src/lalr.c, src/closure.c:
11848 entered into RCS
11849
11850 1991-12-20 Richard Stallman <rms@gnu.org>
11851
11852 * src/state.h: entered into RCS
11853
11854 1991-12-18 Richard Stallman <rms@gnu.org>
11855
11856 * src/print.c, src/nullable.c, src/derives.c:
11857 entered into RCS
11858
11859 1991-11-03 David J. MacKenzie <djm@gnu.org>
11860
11861 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11862 entered into RCS
11863
11864 1988-09-09 Richard Stallman <rms@gnu.org>
11865
11866 * src/bison.hairy: entered into RCS
11867
11868 1987-12-16 Richard Stallman <rms@gnu.org>
11869
11870 * REFERENCES: entered into RCS
11871
11872 -----
11873
11874 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
11875 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
11876
11877 This file is part of Bison, the GNU Compiler Compiler.
11878
11879 Bison is free software; you can redistribute it and/or modify
11880 it under the terms of the GNU General Public License as published by
11881 the Free Software Foundation; either version 2, or (at your option)
11882 any later version.
11883
11884 Bison is distributed in the hope that it will be useful,
11885 but WITHOUT ANY WARRANTY; without even the implied warranty of
11886 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11887 GNU General Public License for more details.
11888
11889 You should have received a copy of the GNU General Public License
11890 along with Bison; see the file COPYING. If not, write to
11891 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11892 Boston, MA 02111-1307, USA.