]> git.saurik.com Git - bison.git/blame - ChangeLog
Remove more K&R C support.
[bison.git] / ChangeLog
CommitLineData
4f16766c
PE
12004-04-13 Jim Meyering <jim@meyering.net>
2
3 * src/conflicts.c (conflicts_print): Correct format string typo:
4 use `%%' to produce literal `%'. (trivial change)
5
779e7ceb
PE
62004-03-30 Paul Eggert <eggert@twinsun.com>
7
8 * src/getargs.c (version): Update copyright year to 2004.
9
10 * data/c.m4 (b4_int_type): Use 'short int' rather than
11 'short', and similarly for 'long', 'unsigned', etc.
12 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
13 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
14 yy_yypstack, yydumpstack): Likewise.
15 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
16 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
17 Likewise.
18 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
19 yy_stack_print, yyparse): Likewise.
20 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
21 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
22 * lib/bitset.c (bitset_print): Likewise.
23 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
24 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
25 * lib/bitsetv.c (bitsetv_dump): Likewise.
26 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
27 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
28 Likewise.
29 * src/LR0.c (allocate_itemsets): Likewise.
30 * src/gram.h (rule_number, rule): Likewise.
31 * src/lalr.h (goto_number): Likewise.
32 * src/nullable.c (nullable_compute): Likewise.
33 * src/output.c (prepare_rules): Likewise.
34 * src/relation.c (relation_print, relation_digraph): Likewise.
35 * src/relation.h (relation_node): Likewise.
36 * src/state.h (state_number, transitions, errs, reductions,
37 struct state): Likewise.
38 * src/symtab.h (symbol_number, struct symbol): Likewise.
39 * src/tables.c (vector_number, tally, action_number,
40 default_goto, goto_actions): Likewise.
41 * tests/existing.at (GNU Cim Grammar): Likewise.
42 * tests/regression.at (Web2c Actions): Likewise.
43
44 * src/output.c (muscle_insert_short_int_table): Renamed from
45 muscle_insert_short_table. All uses changed.
46
d6328241
PH
472004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
48
49 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
50 (declaration): Replace expected_conflicts with expected_sr_conflicts.
51 Add %expect-rr rule.
4f16766c 52
d6328241
PH
53 * src/scan-gram.l: Recognize %expect-rr.
54
4f16766c 55 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 56 expected_conflicts.
4f16766c 57 (expected_rr_conflicts): Declare.
d6328241
PH
58
59 * src/conflicts.c (expected_sr_conflicts): Rename from
60 expected_conflicts.
61 (expected_rr_conflicts): Define.
62 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
63 for GLR parsers.
64 Use expected_sr_conflicts in place of expected_conflicts.
65 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 66
d6328241 67 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 68
1452af69
PE
692004-03-08 Paul Eggert <eggert@gnu.org>
70
71 Add support for hex token numbers. Suggested by Odd Arild Olsen in
72 <http://mail.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
73
74 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
75 in lalr1.cc.
76 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
77 * src/scan-gram.l (scan_integer): New function.
78 ({int}): Use it.
79 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
80 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
81 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
82 Say "long int", not "long", for uniformity with GNU style.
83
006d217d
PE
842004-02-25 Paul Eggert <eggert@twinsun.com>
85
86 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
87 compilers. This fixes a problem with Intel's C++ compiler being
88 chatty, reported by Guido Trentalancia in
89 <http://mail.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
90
c2729758
ADL
912004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
92
93 Support %destructor and merge error locations in lalr1.cc.
94
95 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
96 (Parser::stos_): Define unconditionally.
97 (Parser::destruct_): New method. Generate its body with
98 b4_yydestruct_generate.
99 (Parser::error_start_): New attribute.
100 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
101 token which are discarded.
102 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
103 error_start_ when erroneous token are discarded.
104 (Parser::parse) <yyerrlab1>: Compute the location of the error
105 token so that it covers all the discarded tokens.
106 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
107 it can be called with `%skeleton "lalr1.cc"', and do that.
108
dd0e0635
PE
1092004-02-02 Paul Eggert <eggert@twinsun.com>
110
111 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
112 $(top_srcdir)/lib and ../lib. This fixes a bug reported
113 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
114 There's no need to mention top_builddir since Automake does that
115 for us.
116 (INCLUDES): Remove, as Automake says it's obsolescent.
117 Contents migrated into AM_CPPFLAGS as described above.
118 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
119
1202004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
121
122 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
123 (yyreportSyntaxError): Handle case where lookahead token is
124 YYEMPTY.
125
be16239b
PH
1262004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
127
128 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
129 resulting parsers are compilable with C++.
130
5fa90832
PE
1312003-12-23 Paul Eggert <eggert@twinsun.com>
132
133 * config/depcomp, config/install-sh: Sync with Automake 1.8.
134 * src/output.c (output_skeleton): Rename local var.
135 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
136 Bison tokens, as this runs afoul of the 2003-10-07 change that
137 disallowed NUL bytes in character constants or string literals.
138
139 * tests/local.at: Require Autoconf 2.59's Autotest.
140 * tests/testsuite.at: Don't include local.at, since we now assume
141 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
142 including it.
143 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
144 multiple inclusion warnings.
dd0e0635 145
b165c324
AD
1462003-12-02 Akim Demaille <akim@epita.fr>
147
148 * doc/bison.texinfo (How Can I Reset the Parser): More about start
149 conditions.
150 From Bruno Haible.
151
26e06a21
ADL
1522003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
153
154 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
155
92ac3705
PE
1562003-10-07 Paul Eggert <eggert@twinsun.com>
157
6a5ecb38
PE
158 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
159 if testsuite doesn't exist.
160
92ac3705
PE
161 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
162 literals, unfortunately.
163 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
164 Complain about NUL bytes in character constants or string literals.
165
91d2c560
PE
1662003-10-05 Paul Eggert <eggert@twinsun.com>
167
168 * NEWS: Don't document %no-default-prec, as it's still
169 too experimental.
170 * doc/bison.texinfo: Document %no-default-prec only if
171 the defaultprec flag is set. Normally it's not.
172
0cc3da3a
PE
1732003-10-04 Paul Eggert <eggert@twinsun.com>
174
175 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
176 non-modifiable lvalue, instead of a modifiable one.
177 * doc/bison.texinfo (Actions): Document that $$ can
178 be assigned to. Do not claim that $$ and $N are
179 array element references: user code should not rely on this.
180
22fccf95
PE
1812003-10-01 Paul Eggert <eggert@twinsun.com>
182
183 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
184 (grammar_declaration): Use it.
185 * src/scan-gram.l: New token %no-default-prec.
186 * tests/conflicts.at: Revamp tests to use %no-default-prec.
187 * NEWS, doc/bison.texinfo: Document the above.
188
fc8f2965
AD
1892003-10-01 Akim Demaille <akim@epita.fr>
190
191 VCG no longer supports long_straight_phase.
192
193 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
194 * src/print_graph.c (print_graph): Adjust.
195
39a06c25
PE
1962003-09-30 Frank Heckenbach <frank@g-n-u.de>
197 and Paul Eggert <eggert@twinsun.com>
198
199 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
200 Table of Symbols): Document %default-prec.
201 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
202 (grammar_declaration): Set default_prec on %default-prec.
203 * src/scan-gram.l (%default-prec): New token.
204 * src/reader.h (default_prec): New flag.
205 * src/reader.c: Likewise.
206 (packgram): Handle it.
207 * tests/conflicts.at (%default-prec without %prec,
208 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 209
39a06c25
PE
2102003-09-30 Paul Eggert <eggert@twinsun.com>
211
212 * tests/testsuite.at: Include local.at, not input.at, fixing
213 a typo in the 2003-08-25 patch.
214
62b6aef9
AD
2152003-08-27 Akim Demaille <akim@epita.fr>
216
217 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
218 GCC warnings.
219
89e1cc61
AD
2202003-08-26 Akim Demaille <akim@epita.fr>
221
222 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
223 "<\#" to avoid magic from Gnus when posting parts of this script.
224
a08460b0
AD
2252003-08-26 Akim Demaille <akim@epita.fr>
226
227 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
228 (Parser::parse): here.
229 Adjust: nerrs and errstatus is now replaced by...
230 (Parser::nerrs_, Parser::errstatus_): New.
231
603f1cfd
AD
2322003-08-25 Akim Demaille <akim@epita.fr>
233
234 * config/announce-gen, Makefile.cfg: New.
235 * Makefile.am: Adjust.
236 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
237 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
238
cd3684cf
AD
2392003-08-25 Akim Demaille <akim@epita.fr>
240
241 When reducing initial empty rules, Bison parser read an initial
242 location that is not defined. This results in garbage, and that
243 affects Bison's own parser. Therefore we need (i) to extend Bison
244 to support a means to initialize this location, and (ii) to use
245 this CVS Bison to fix CVS Bison's parser.
246
247 * src/reader.h, reader.c (epilogue_augment): Remove, replace
248 with...
249 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
250 * src/parse-gram.y: Adjust.
251 (%initial-action): New.
252 (%error-verbose): Since we require CVS Bison, there is no reason
253 not to use it.
254 * src/scan-gram.l: Adjust.
255 * src/Makefile.am (YACC): New, to make sure we use our own parser.
256 * data/yacc.c (yyparse): Use b4_initial_action.
257
4e03e201
AD
2582003-08-25 Akim Demaille <akim@epita.fr>
259
260 * doc/bison.texinfo: Don't promote stdout for error messages.
261
8c182d05
AD
2622003-08-25 Akim Demaille <akim@epita.fr>
263
264 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
265 From Alexandre Duret-Lutz.
266
6a60c4cf
PE
2672003-08-25 Akim Demaille <akim@epita.fr>
268
269 Version 1.875c.
270
25f66e1a
AD
2712003-08-25 Akim Demaille <akim@epita.fr>
272
273 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
274 Use them.
275
5348bfbe
AD
2762003-08-25 Akim Demaille <akim@epita.fr>
277
278 * data/lalr1.cc (Parser::reduce_print_): New.
279 Use it.
280
47301314
AD
2812003-08-25 Akim Demaille <akim@epita.fr>
282
283 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
284 error recovery loops. This patch is based on
285 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
286 Also, augment the similarity between lalr1.cc and yacc.c.
287 Note: the locations of error recovery rules are not correct yet.
288
289 * data/lalr1.cc: Comment changes to augment the similarity between
290 lalr1.cc and yacc.c.
291 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
292 (yyerrlab1): Remove, but where it used to be (now the bottom part of
293 yyerrlab), when hitting EOF, pop the whole stack here instead of
294 merely falling thru the default error handling mechanism.
295 (yyerrorlab): New label, with the old contents of YYERROR,
296 plus the following change: pop the stack of rhs corresponding
297 to the production that invoked YYERROR. That is how Yacc
298 behaves (required by POSIX).
299 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
300 fail.
301
1f7a61ff
AD
3022003-08-25 Akim Demaille <akim@epita.fr>
303
304 Tune local.at so that people can "autom4te -l autotest calc.at -o
305 calc" for instance, to extract a sub test suite.
306
307 * tests/testsuite.at: Move the initialization, Autotest version
308 requirement, and AT_TESTED invocation into...
309 * tests/local.at: here.
310 * tests/testsuite.at: Include it for compatibility with Autoconf
311 2.57.
312 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
313 be ignore.
314
327b5b56
PE
3152003-08-04 Paul Eggert <eggert@twinsun.com>
316
317 Rework code slightly to avoid gcc -Wtraditional warnings.
318 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
319 The returned value is now stored in *YY0. All callers changed.
320 * src/output.c (merge_output): Adjust to the above change.
321
0051e3ed
PE
3222003-07-26 Paul Eggert <eggert@twinsun.com>
323
324 * data/glr.c (YYASSERT): New macro.
325 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
326 yyresolveStates, yyprocessOneStack):
327 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
328 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 329
137437c6
PE
3302003-07-25 Paul Eggert <eggert@twinsun.com>
331
5b620e06
PE
332 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
333 for portability to K&R C (after ansi2knr, presumably). See
334 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
335 by Frank Heckenbach, though I have omitted the structure-initialization
336 part of his glr-knr.diff patch since I recall that the Portable
337 C Compiler didn't require that change.
338
137437c6
PE
339 Let the user specify how to allocate and free memory.
340 Derived from a suggestion by Frank Heckenbach in
341 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
342 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
343 All uses of free, malloc, realloc changed to use these macros,
344 and unnecessary casts removed.
345 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
346
ddb85ca5
PE
3472003-07-06 Matthias Mann <MatthiasMann@gmx.de>
348
349 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
350 use s.empty() rather than s == "" to test for empty string; see
351 <http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
352 (trivial change)
353
39910e09
AD
3542003-06-25 Akim Demaille <akim@epita.fr>
355
356 * config/depcomp, config/install-sh: Update from masters.
357
0ae99356
PE
3582003-06-20 Paul Eggert <eggert@twinsun.com>
359
360 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
361 and return properly parenthesized result.
362 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
363 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
364 Remove unnecessary parentheses from uses.
365 * doc/bison.texinfo (Location Default Action): Describe the
366 conventions for parentheses.
367
cd05d13c
PE
3682003-06-19 Paul Eggert <eggert@twinsun.com>
369
81fd08ca
PE
370 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
371 yyreportTree): Do not assume that size_t is the same width as int,
372 when printing sizes. Print sizes using an unsigned format.
373 Problem reported by Frank Heckenbach in
374 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 375
cd05d13c
PE
376 Port to Forte Developer 7 C compiler.
377 * data/glr.c (struct YYLTYPE): If locations are not being used,
378 declare a single dummy member, as empty structs do not conform
379 to the C standard.
380 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
381 the Forte Developer 7 C compiler complains that end-of-loop
382 code is not reached.
383
4dcf140b
PE
3842003-06-17 Paul Eggert <eggert@twinsun.com>
385
386 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
387 avoid warnings from picky compilers about redefinition of PARAMS.
388
8dd76bee
PE
3892003-06-17 Paul Eggert <eggert@twinsun.com>
390
391 Version 1.875b.
392
393 * NEWS: Document 1.875b.
394
395 * lib/bbitset.h: Do not include config.h; that's the includer's job.
396 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
397 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
398 Don't use 'index' in comments, as it's a builtin fn on some hosts.
399 * lib/bitset_stats.c: Include gettext.h unconditionally, as
400 per recent gettext manual's suggestion.
401 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
402 Use prototypes, not old-style definitions.
403 * lib/lbitset.c (lbitset_unused_clear): Likewise.
404 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
405 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
406 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
407 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
408 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
409 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
410 vbitset_or_and_cmp, vbitset_copy): Likewise.
411
412 * lib/libiberty.h: Do not include config.h; that's the includer's job.
413 Do not include <stdlib.h>.
414 (PARAMS): Define unconditionally for C89.
415 (ATTRIBUTE_NORETURN): Remove.
416 (ATTRIBUTE_UNUSED): Define unconditionally.
417
418 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
419 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
420 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
421 * lib/vbitset.c, lib/vbitset.h: New files.
422 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
423 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
424 from libbitset.
425
426 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
427 `How Can I Reset @code{yyparse}', since texinfo does not allow
428 arbitrary @ in node names.
429
430 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
431 shouldn't be needed according to the gettext 0.12.1 documentation
432 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 433 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 434 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 435 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 436
8dd76bee
PE
437 * lib/.cvsignore: Add stdbool.h.
438 * m4/.cvsignore: Add nls.m4, po.m4.
439
440 Upgrade to CVS gnulib.
441 * stdbool_.h: File renamed from stdbool.h.in.
442 * configure.ac (AM_STDBOOL_H): Invoke this instead of
443 AC_HEADER_STDBOOL.
444 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
445 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
446 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
447 (MOSTLYCLEANFILES): New var.
448 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
449 (stdbool.h): New rule.
450 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
451 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
452 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
453 m4/quote.m4: Upgrade to today's gnulib.
454
455 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
456 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
457 the tests right now.
458 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
459 yyerror are declared before use; C99 requires this.
460
25005f6a
PH
4612003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
462
463 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
464 first.
465 (yyrecoverSyntaxError): Correct the logic for setting and testing
466 yyerrState.
467 Correct comment on handling EOF.
468 Allow states with only a default reduction, rather than failing
8dd76bee 469 (I can't quite reconstruct why these were not allowed before).
25005f6a 470
137437c6 471 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 472 buffer overruns, corrupting state.
8dd76bee
PE
473
474 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
475 definition.
476 * src/reader.h (max_left_semantic_context): New variable declaration.
477 * src/scan-gram.l (max_left_semantic_context): Define.
478 (handle_action_dollar): Update max_left_semantic_context.
479 * data/glr.c (YYMAXLEFT): New definition.
480 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
481 (yyresolveAction): Ditto.
482
483 Fixes to problems with location handling in GLR parsers reported by
484 Frank Heckenbach (2003/06/05).
485
486 * data/glr.c (YYLTYPE): Make trivial if locations not used.
487 (YYRHSLOC): Add parentheses, and define only if locations used.
488 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
489 locations not used.
490 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
491 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 492
25005f6a
PH
493 * tests/cxx-type.at: Exercise location information; update tests
494 to differentiate output with and without locations.
8dd76bee 495 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
496 because default YYLTYPE not yet defined.
497 Change semantic actions to compute strings, rather than printing
498 them directly (to test proper passing of semantics values). Change
499 output to prefix notation and update test data and expected results.
500 (yylex): Track locations.
501 (stmtMerge): Return value rather than printing, and include arguments
502 in value.
8dd76bee 503
711f40b7
PE
5042003-06-03 Paul Eggert <eggert@twinsun.com>
505
506 Avoid warnings generated by GCC 2.95.4 when Bison is
507 configured with --enable-gcc-warnings.
508 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
509 yy::]b4_parser_class_name[::translate_,
510 yy::Stack::operator[] (unsigned),
511 yy::Stack::operator[] (unsigned) const,
512 yy::Slice::operator[] (unsigned),
513 yy::Slice::operator[] (unsigned) const):
514 Rename local vars to avoid warnings.
515 * tests/glr-regression.at (Improper handling of embedded actions
516 and $-N in GLR parsers): Remove unused local variable from yylex.
517 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
518 (void) as arg when not pure, since we now assume C89 when building
519 Bison. Pacify GCC by using parameter.
520
ac695f7d
PE
5212003-06-02 Paul Eggert <eggert@twinsun.com>
522
523 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
524 yy::Location::lines, yy::Location::columns): Rename arguments
525 to avoid shadowing; this removes a warning generated by GCC 3.3.
526
26ec81e0
PE
5272003-06-01 Paul Eggert <eggert@twinsun.com>
528
529 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
530 to g++, as GCC 3.3 complains if you do it.
531 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
532 everything that WARNING_CFLAGS has, except omit warnings
533 not suitable for C++.
534 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
535 * tests/atlocal.in (CXXFLAGS): New var.
536 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
537
538 Fix a GLR parser bug I reported in February; see
539 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
540 The problem was that GLR parsers did not conform to the C standard,
541 because actions like { $1 = $2 + $3; } expanded to expressions
542 that invoked YYFILL in separate subexpressions, and YYFILL assigned
543 to a local variable. The C standard says that expressions
544 like (var = f ()) + (var = f ()) have undefined behavior.
545 Another problem was that GCC sometimes issues warnings that
546 yyfill and its parameters are unused.
547
548 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
549 as possibly unused.
550 (yyfill): New function.
551 (YYFILL): Use it.
552 (yyuserAction): Change type of yynormal to bool, so that it matches
553 the new yyfill signature. Mark it as possibly unused.
554
555
556 Follow up on a bug I reported in February, where a Bison-generated
557 parser can loop. Provide a test case and a fix for yacc.c. I
558 don't have a fix for lalr1.cc or for glr.c, unfortunately.
559 The original bug report is in:
560 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
561
562 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
563 macro's size was becoming unwieldy.
564 (yyerrlab): Do not discard an empty lookahead symbol, as this
565 might destroy garbage.
566 (yyerrorlab): New label, with the old contents of YYERROR,
567 plus the following change: pop the stack of rhs corresponding
568 to the production that invoked YYERROR. That is how Yacc
569 behaves, and POSIX requires this behavior.
570 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
571 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
572 Define 'alarm' to do nothing if unistd.h is not available.
573 Add a new rule "exp: '-' error;" to test the above change to
574 data/yacc.c. Use 'alarm' to abort any test taking longer than
575 10 seconds, as it's probably looping.
576 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
577 Also, the new yacc.c generates two fewer diagnostics for an
578 existing test.
579
d0829076
PE
5802003-05-24 Paul Eggert <eggert@twinsun.com>
581
c6ae27df
PE
582 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
583 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
584 This fixes a problem reported by John Bowman when the Compaq/HP
585 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
586 -ansi -Wall -gall).
587 * data/yacc.c (union yyalloc): Likewise.
588 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 589
d0829076
PE
590 Switch from 'int' to 'bool' where that makes sense.
591
592 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
593 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
594 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
595 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
596 Return or accept bool, not int. All callers changed.
597 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
598 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
599 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
600 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
601 bitset_or_and_cmp_): Likewise.
602 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
603 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
604 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
605 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
606 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
607 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
608 bitset_stats_or_and_cmp): Likewise.
609 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
610 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
611 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
612 ebitset_xor_cmp): Likewise.
613 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
614 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
615 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
616 lbitset_xor_cmp): Likewise.
617 * lib/bbitset.h: Include <stdbool.h>.
618 (struct bitset_vtable): The following members now return bool, not
619 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
620 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
621 or_and_cmp).
622 * src/conflicts.c (count_rr_conflicts): Likewise.
623 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
624 All uses changed.
625 * lib/ebitset.c (ebitset_obstack_init): Likewise.
626 * lib/lbitset.c (lbitset_obstack_init): Likewise.
627 * src/getargs.c (debug_flag, defines_flag, locations_flag,
628 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
629 graph_flag): Likewise.
630 * src/getargs.h (debug_flag, defines_flag, locations_flag,
631 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
632 graph_flag): Likewise.
633 * src/output.c (error_verbose): Likewise.
634 * src/output.h (error_verbose): Likewise.
635 * src/reader.c (start_flag, typed): Likewise.
636 * src/reader.h (typed): Likewise.
637 * src/getargs.c (LOCATIONS_OPTION): New constant.
638 (long_options, getargs): Use it.
639 * src/lalr.c (build_relations): Use bool, not int.
640 * src/nullable.c (nullable_compute): Likewise.
641 * src/print.c (print_reductions): Likewise.
642 * src/tables.c (action_row, pack_vector): Likewise.
643 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
644 * src/output.c (prepare): Use it.
645 * src/output.c (token_definitions_output,
646 symbol_destructors_output, symbol_destructors_output): Use string,
647 not boolean integer, to keep track of whether to output separator.
648 * src/print_graph.c (print_core): Likewise.
649 * src/state.c (state_rule_lookaheads_print): Likewise.
650
651 * config/install-sh: Sync from automake 1.7.5.
652
6b2584b7
PE
6532003-05-14 Paul Eggert <eggert@twinsun.com>
654
655 * src/parse-gram.y (rules_or_grammar_declaration): Require a
656 semicolon after a grammar declaration, in the interest of possible
657 future changes to the Bison input language.
658 Do not allow a stray semicolon at the start of the grammar.
659 (rhses.1): Allow one or more semicolons after any rule, including
660 just before "|" as required by POSIX.
661 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
662 grammar.
663
caf37a36
ADL
6642003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
665
666 %parse-param support for lalr1.cc.
667
668 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
669 b4_cc_constructor_calls, b4_cc_constructor_call,
670 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
671 definitions.
672 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
673 parse-param arguments.
674 (yy::b4_parser_class_name): Declare instance variables to
675 hold parse-param arguments.
676 * tests/calc.at: s/value/semantic_value/ because value clashes
677 with a member of yy::b4_parser_class_name. Adjust C++ code
678 to handle %parse-param. Enable %parse-param test in C++.
679
3ab37077
PE
6802003-05-12 Paul Eggert <eggert@twinsun.com>
681
682 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
683 English a bit. Fix fclose typo. Change "const char" to "char
684 const", and use ANSI C rather than K&R for "main". Suggest
685 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
686 and suggest yy_switch_to_buffer.
687
6882003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
689
690 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
691 C89. This avoids a diagnostic on compilers that define __STDC__
692 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
693 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
694
e743727f
PE
6952003-05-03 Paul Eggert <eggert@twinsun.com>
696
697 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
698 Do not overrun array bounds.
699 This should fix a bug reported today by Olatunji Oluwabukunmi in
700 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
701
916708d5
AD
7022003-04-29 Akim Demaille <akim@epita.fr>
703
704 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
705 * src/getargs.c, src/getargs.h: here, as bool, not int.
706 (nondeterministic_parser): New.
707 * src/parse-gram.y, src/scan-gram.l: Support
708 %nondeterministic-parser.
709 * src/output.c (prepare): Use nondeterministic_parser instead
710 of glr_parser where appropriate.
711 * src/tables.c (conflict_row, action_row, save_row)
712 (token_actions, token_actions, pack_vector): Ditto.
713
a06ea4aa
AD
7142003-04-29 Akim Demaille <akim@epita.fr>
715
716 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
717
211074ca
AD
7182003-04-29 Akim Demaille <akim@epita.fr>
719
720 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
721 with %pure-parser and %locations to exercise the patch from Yakov
722 Markovitch below.
723
6175ffe3
PE
7242003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
725
726 * data/yacc.c: (b4_lex_param): Corrected for the case where
727 %lex-param is provided and %pure-parser isn't.
728
b1e95857
PE
7292003-04-27 Paul Eggert <eggert@twinsun.com>
730
731 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
732 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
733 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
734 if it is not defined.
735 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
736
acda9df6
PE
7372003-04-26 Paul Eggert <eggert@twinsun.com>
738
3470c57b
PE
739 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
740 Declare to be of type suitable for the ninf value itself, not of
741 type suitable for the corresponding table, since the latter might
742 be unsigned but the ninf value might be negative. This fixes a
743 bug reported by Alexandre Duret-Lutz in
744 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
745
acda9df6
PE
746 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
747 invokes it. We shouldn't invoke it twice because it will attempt
748 to put error.o in the archive twice. This fixes a glitch reported
749 by Martin Mokrejs in
750 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
751
b5250f26
PE
7522003-04-21 Paul Eggert <eggert@twinsun.com>
753
754 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
755 to gnulib.
756
089ac0f1
PE
7572003-04-21 Yakov Markovitch <Markovitch@iso.ru>
758
759 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
760 Fix obvious typo that results in uncompilable GLR parsers
761 when both %pure-parser and %locations are used. (trivial change)
762
5ededac6
PE
7632003-04-17 Paul Eggert <eggert@twinsun.com>
764
1b8f2fff
PE
765 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
766 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
767 Do not insert the expected token via unput, as this runs afoul
768 of a POSIX-compatibility bug in flex 2.5.31.
769 All uses changed to BEGIN the parent state,
770 since we no longer insert the expected token via unput.
771 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
772 that is no longer emitted after the above change.
773
5ededac6
PE
774 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
775 the first one. This change is from Paul Hilfinger, and it fixes
776 regression reported by Werner Lemberg in
777 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
778
779 (resolve_sr_conflict): Don't invoke state_errs_set
780 unless one or more tokens have been explicitly made errors.
781 Otherwise, the above change causes Bison to abort.
782
783 * tests/existing.at (GNU pic Grammar): New test case, taken from
784 Lemberg's email.
785
b8be9132
AD
7862003-03-31 Akim Demaille <akim@epita.fr>
787
788 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
789
d423d460
AD
7902003-03-31 Akim Demaille <akim@epita.fr>
791
792 * src/output.c (prepare_symbols): Avoid trailing spaces in the
793 output.
794
c7e441b4
AD
7952003-03-31 Akim Demaille <akim@epita.fr>
796
797 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
798 From Paul Hilfinger.
799
231897ad
AD
8002003-03-29 Akim Demaille <akim@epita.fr>
801
802 * m4/error.m4: Do not put under dynamic conditions some code which
803 expansion is under static control.
804
5b066063
AD
8052003-03-29 Akim Demaille <akim@epita.fr>
806
807 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
808
22a74fec
AD
8092003-03-29 Akim Demaille <akim@epita.fr>
810
811 * doc/bison.texinfo (Strings are Destroyed): New.
812
0eee27e7
PE
8132003-03-13 Paul Eggert <eggert@twinsun.com>
814
815 * .cvsignore: Add configure.lineno.
816 * src/.cvsignore: Add yacc.
817 * tests/.cvsignore: Add testsuite.log.
818 * doc/fdl.texi: Sync with latest FSF version.
819
f61aad93
PE
8202003-03-12 Paul Eggert <eggert@twinsun.com>
821
537636c7
PE
822 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
823 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
824 cursor, instead of leaving it undefined. This fixes a bug
825 reported by Tim Van Holder in
826 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
827 * tests/input.at (Torturing the Scanner): Test the scanner on
828 an empty input file, which was Tim Van Holder's test case.
829
830 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
831 <sys/resource.h> can be included, include sys/time.h and
832 sys/times.h first, if available. This works around the SunOS
833 4.1.4 porting bug reported by Bruce Becker in
834 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
835
836 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
837 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
838 AC_HEADER_SYS_WAIT.
839
f61aad93
PE
840 Merge changes from gnulib. This was prompted because the CVS
841 snapshot didn't build on Solaris 7 due to strnlen problems.
842
843 These changes need to be merged back into gnulib:
844 * lib/hash.c: Include <stdbool.h> unconditionally.
845 * m4/onceonly.m4 (m4_quote): New macro.
846 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
847 Quote AC_FOREACH variable-expansions properly.
848 The 2003-01-03 obstack.h change also needs merging.
849 {end of changes requiring merging}
5b066063 850
f61aad93
PE
851 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
852 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
853 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
854 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
855 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
856 New files, imported from gnulib.
857 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
858 above.
859
860 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
861 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
862 gnulib sources.
863
864 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
865 Add.
866 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
867 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
868 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
869 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
870 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
871 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
872 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
873 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
874 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
875 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
876 (jm_PREREQ_ARGMATCH): Remove.
877 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
878 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
879
880 * src/system.h: Include <stdbool.h> unconditionally.
881
882 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
883 assuming at least C89 in the bitset code for some time now.
884
d2ffe116
AD
8852003-03-03 Akim Demaille <akim@epita.fr>
886
887 * ro.po: New.
888
052826fd
AD
8892003-03-02 Akim Demaille <akim@epita.fr>
890
891 * doc/bison.texinfo (Table of Symbols): Reactivate the
892 documentation for %lex-param, and %parse-param.
893
c4749565
AD
8942003-03-02 Akim Demaille <akim@epita.fr>
895
896 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
897 generate verbose error messages.
898 Use the number of tokens as an upper bound in yytname, as it
899 cannot be a non terminal.
900
d5286af1
AD
9012003-03-02 Akim Demaille <akim@epita.fr>
902
903 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
904 message.
905
22e304a6
AD
9062003-03-02 Akim Demaille <akim@epita.fr>
907
22e304a6
AD
908 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
909 Use them to exercise yycheck overrun.
910 Based on Andrew Suffield's grammar.
911
67a25fed
AD
9122003-03-02 Akim Demaille <akim@epita.fr>
913
914 Create tests/local.at for Bison generic testing macros.
915
916 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
917 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
918 This new file.
919 * tests/calc.at (AT_CHECK_CALC): Adjust.
920 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
921 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
922 * tests/local.at: here.
923 (AT_COMPILE_CXX): Tags the tests using it as c++.
924 Ignore the test if CXX is not functional.
925
9c2b381f
PE
9262003-03-01 Paul Eggert <eggert@twinsun.com>
927
928 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
929 not loc->end, since loc->end might contain garbage and this leads
930 to undefined behavior on some platforms.
931 (id_loc, token_start): Use (IF_LINTed) initial values that do not
932 depend on *loc, so that the reader doesn't give the the false
933 impression that *loc is initialized.
934 (<INITIAL>"%%"): Do not bother setting code_start, since its value
935 does not survive the return.
936
0433ba88
AD
9372003-03-01 Akim Demaille <akim@epita.fr>
938
939 * src/scan-gram.l (code_start): Always initialize it when entering
940 into yylex, as SC_EPILOGUE is activated *before* the corresponding
941 yylex invocation. An alternative would be making it static, but
942 then it starts with the second %%'s beginning, instead of its end.
943
b305ea69
PE
9442003-02-28 Paul Eggert <eggert@twinsun.com>
945
946 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
947 around a UnixWare 7.1.1 porting bug reported by John Hughes in
948 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
949
c3d25e01
PE
9502003-02-26 Paul Eggert <eggert@twinsun.com>
951
952 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
953 Remove Sequent/Pyramid discussion (nobody uses them any more).
954 Merge VMS and MS-DOS discussion; these ports may well be dead
955 but let's keep mentioning them for now. Put <> around email
956 addresses. Add copyright notice.
957
c267ffbc
PE
9582003-02-24 Paul Eggert <eggert@twinsun.com>
959
960 * data/glr.c (yy_reduce_print): yylineno -> yylno,
961 to avoid collision with flex use of yylineno.
962 Problem reported by Bruce Lilly in
963 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
964 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
965 * data/yacc.c (yy_reduce_print): Likewise.
966
967 * config/depcomp: Sync with Automake 1.7.3.
968
f939fc12
AD
9692003-02-21 Akim Demaille <akim@epita.fr>
970
971 * data/lalr1.cc: Use temporary variables instead of casts to
972 change integer types.
973 Suggested by Paul Eggert.
974
95923bd6
AD
9752003-02-21 Akim Demaille <akim@epita.fr>
976
977 * doc/bison.texinfo: Use "location" consistently to refer to @n,
978 to avoid confusions with lalr1.cc's notion of Position.
979 Suggested by Paul Eggert.
980
2cdc240e
AD
9812003-02-20 Akim Demaille <akim@epita.fr>
982
983 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
984 before initial_columns.
985 (location.hh): Use consistent variable names when defining the
986 operator<<.
987 Use "last" so that we subtract from Positions, not from unsigned.
988
5d003116
AD
9892003-02-20 Akim Demaille <akim@epita.fr>
990
991 * data/lalr1.cc (position.hh): New subfile, including the extended
992 and Doxygen'ed documentation of class Position.
993 (location.hh): Use it.
994 Document a` la Doxygen.
ba1ecc07 995 With the help of Benoit Perrot.
5d003116 996
d02b25f9
AD
9972003-02-20 Akim Demaille <akim@epita.fr>
998
999 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
1000 AT_YACC_IF.
1001 Redefine AT_YYERROR_SEES_LOC_IF using it.
1002 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
1003 not defined.
1004 Don't use the location in yy::Parser::error_ and
1005 yy::Parser::print_ when not %locations.
1006 Activate more lalr1.cc tests.
1007
0d1c3a04
AD
10082003-02-19 Akim Demaille <akim@epita.fr>
1009
1010 * data/lalr1.cc: When displaying a line number, be sure to make it
1011 an int.
1012
60a777aa
AD
10132003-02-19 Akim Demaille <akim@epita.fr>
1014
1015 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
1016 Remove, useless.
1017 (YYABORT, YYACCEPT, YYERROR): New.
1018 * tests/calc.at: Renable the lalr1.cc test.
1019
0b86fc41
AD
10202003-02-19 Akim Demaille <akim@epita.fr>
1021
1022 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
1023 error recovery, mixing with/without pops and discarding of the
1024 lookahead.
1025 Exercise YYERROR.
1026 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
1027
da99a5dc
PE
10282003-02-17 Paul Eggert <eggert@twinsun.com>
1029
1030 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
1031 * tests/testsuite.at (AT_COMPILE): Use them.
1032 This fixes the testsuite problem reported by Robert Lentz in
1033 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
1034
93b8c255
PE
10352003-02-12 Paul Eggert <eggert@twinsun.com>
1036
1037 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
1038 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
1039 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
1040 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
1041 Check for malloc failure, for consistency with yacc.c.
1042 (yytname_size): Remove, for consistency with yacc.c.
1043
1044 The bug still remains in data/lalr1.cc, as I didn't have time
1045 to fix it there.
1046
7548fed2
AD
10472003-02-06 Akim Demaille <akim@epita.fr>
1048
1049 * configure.ac (GXX): Rename as...
1050 (CXX): this, to keep the original Autoconf semantics.
1051 Require 2.57.
1052 * data/lalr1.cc: Fix b4_copyright invocations.
1053 If YYDEBUG is not defined, don't depend upon name_ being defined.
1054 (location.hh): Include string and iostream.
1055 (Position::filename): New member.
1056 (Position::Position ()): New.
1057 (operator<< (Position)): New.
1058 (operator- (Position, int)): New.
1059 (Location::first, Location::last): Rename as...
1060 (Location::begin, Location::end): these, to mock the conventional
1061 iterator names.
1062 (operator<< (Location)): New.
1063 * tests/atlocal.in (CXX): New.
1064 * tests/testsuite.at (AT_COMPILE_CXX): New.
1065 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
1066 locations in a more synthetic way.
1067 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
1068 lalr1.cc is used.
1069 Adjust the C locations to match those from Emacs: first column is
1070 column 0.
1071 Change all the expected results.
1072 Conform to the GCS: simplify the locations when applicable.
1073 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
1074 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
1075 these CPP macros with the m4 macros new defined by...
1076 (AT_CHECK_PUSHDEFS): this, i.e.:
1077 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 1078 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
1079 New macros.
1080 (AT_CHECK_POPDEFS): Undefine them.
1081 (AT_CHECK_CALC_LALR1_CC): New.
1082 Use it for the first lalr1.cc test.
1083
43a176ef
AD
10842003-02-04 Akim Demaille <akim@epita.fr>
1085
1086 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
1087 Location as is defined.
1088
fc049e9c
AD
10892003-02-04 Akim Demaille <akim@epita.fr>
1090
1091 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
1092 name_ being defined.
1093
a737b216
PE
10942003-02-03 Paul Eggert <eggert@twinsun.com>
1095
1096 * src/gram.h (start_symbol): Remove unused decl.
1097
1098 Use more-consistent naming conventions for local vars.
1099
1100 * src/derives.c (derives_compute): Change type of local var from
1101 int to rule_number.
1102 * src/gram.c (grammar_rules_partial_print): Likewise.
1103 * src/print.c (print_core): Likewise.
1104 * src/reduce.c (reduce_grammar_tables): Likewise.
1105
1106 * src/gram.c (grammar_dump): Change name of item_number *
1107 local var from r to rp.
1108 * src/nullable.c (nullable_compute): Likewise.
1109
1110 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
1111
1112 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
1113 for symbol or symbol_number var.
1114 * src/reader.c (grammar_start_symbol_set): Likewise.
1115 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
1116 Likewise.
1117 * src/state.c (transitions_to): Likewise.
1118 * src/state.h: Likewise.
1119 * src/tables.c (symbol_number_to_vector_number): Likewise.
1120
1121 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
1122 char * var.
1123
1124 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
1125 var.
1126
1127 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
1128 var.
1129
1130 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
1131 Use str, not s, for char * var. Use ch, not c, for character var.
1132 Use size for size var.
1133
1134 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
1135 char * var.
1136 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
1137 uniqstr var.
1138 * src/uniqstr.h: Likewise.
1139
1140 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1141 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1142 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
1143 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
1144 param to have same name as that of enum, so that we don't use
1145 "s" to stand for a non-state.
1146
68e93ad5
AD
11472003-02-02 Akim Demaille <akim@epita.fr>
1148
1149 * src/scan-skel.l: Scan more than one inert character per yylex
1150 invocation.
1151
92898986
PE
11522003-02-01 Paul Eggert <eggert@twinsun.com>
1153
1154 Version 1.875a.
1155
1d9d5d71
PE
1156 * po/LINGUAS: Add ms.
1157
0435d061
AD
11582003-01-30 Akim Demaille <akim@epita.fr>
1159
1160 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
1161
6029a57f
PH
11622003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1163
1164 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
1165 of $1.
0435d061
AD
1166
1167 Changes in response to error report by S. Eken: GLR mode does not
6029a57f
PH
1168 handle negative $ indices or $ indices in embedded rules correctly.
1169 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 1170
6029a57f
PH
1171 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
1172 (b4_rhs_location): Ditto.
0435d061 1173 (yyfill): New function to copy from stack tree into array
6029a57f 1174 incrementally.
0435d061
AD
1175 (yyuserAction): Modify to allow incremental move of semantic values
1176 to rhs array when in GLR mode.
1177 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
1178 as needed.
1179 Remove dummy use of yystack, as there is now a guaranteed use.
1180 (yydoAction): Modify to allow incremental move of semantic values
1181 to rhs array when in GLR mode.
1182 (yyresolveAction): Ditto.
1183 (yyglrShiftDefer): Update comment.
0435d061 1184 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
1185 (yyglrReduce): Ditto.
1186 (yydoAction): Ditto
0435d061 1187
6029a57f
PH
1188 * tests/glr-regr1.at: Rename to ...
1189 * tests/glr-regression.at: Add new regression test for the problems
1190 described above (adapted from S. Eken).
1191 Update copyright notice.
1192 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
1193 * tests/Makefile.am: Ditto.
1194
6cee6297
PE
11952003-01-28 Paul Eggert <eggert@twinsun.com>
1196
1197 * data/lalr1.cc: Do not use @output_header_name@ unless
1198 b4_defines_flag is set. This fixes two bugs reported by
1199 Tim Van Holder in
1200 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
1201 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
1202
b2a836b5
PE
12032003-01-21 Paul Eggert <eggert@twinsun.com>
1204
1205 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
1206 we don't need to worry about yyerrlab1 being reported as an
1207 "unused label" by non-GCC C compilers. The downside is that if
1208 locations are used then a couple of statements are duplicated each
1209 time YYERROR is invoked, but the upside is that the warnings
1210 should vanish.
1211 (yyerrlab1): Move code to YERROR.
1212 (yyerrlab2): Remove. Change uses back to yyerrlab1.
1213 This reverts some of the 2002-12-27 change.
1214
4196b931
PE
12152003-01-17 Paul Eggert <eggert@twinsun.com>
1216
1217 * src/output.c (symbol_printers_output): Fix typo that led
1218 to core dump. Problem reported by Antonio Rus in
1219 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
1220
3ae831b4
AD
12212003-01-13 Akim Demaille <akim@epita.fr>,
1222 Quoc Peyrot <chojin@lrde.epita.fr>,
1223 Robert Anisko <anisko_r@lrde.epita.fr>
1224
1225 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
1226 when the stacks contain one element, as the loop would otherwise
1227 free the last state, and then use the top state (the one we just
1228 popped). This means that the initial elements will not be freed
1229 explicitly, as is the case in yacc.c; it is not a problem, as
1230 these elements have fake values.
1231
e3aa65c5
PE
12322003-01-11 Paul Eggert <eggert@twinsun.com>
1233
1234 * NEWS: %expect-violations are now just warnings, reverting
1235 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
1236 bootstrapping problem reported by Matthias Klose; see
1237 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
1238 * src/conflicts.c (conflicts_print): Likewise.
1239 * tests/conflicts.at (%expect not enough, %expect too much,
1240 %expect with reduce conflicts): Likewise.
1241 * doc/bison.texinfo (Expect Decl): Document this. Also mention
1242 that the warning is enabled if the number of conflicts changes
1243 (not necessarily increases).
1244
1245 * src/getargs.c (version): Update copyright year.
1246
f0057011
AD
12472003-01-09 Akim Demaille <akim@epita.fr>
1248
1249 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
1250
1ee6d2a0
PE
12512003-01-08 Paul Eggert <eggert@twinsun.com>
1252
1253 * Makefile.maint (WGETFLAGS):
1254 New macro, containing "-C off" to disable proxy caches.
1255 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
1256 (rel-check): Use $(WGET) instead of wget.
1257
d4fd77c4
PE
12582003-01-06 Paul Eggert <eggert@twinsun.com>
1259
1260 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
1261 the GLR paper of Scott, Johnstone and Hussain.
1262
464c6927
PE
12632003-01-04 Paul Eggert <eggert@twinsun.com>
1264
d600ee67
PE
1265 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
1266 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
1267 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
1268 (EXTRA_LIBRARIES): New var, for liby.a.
1269 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
1270 (EXTRA_SCRIPTS): New var, for yacc.
1271
464c6927
PE
1272 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
1273 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
1274 Problem reported by Nelson H. F. Beebe.
1275
12762003-01-03 Paul Eggert <eggert@twinsun.com>
1277
1278 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
1279 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1280 when compiling Bison 1.875's `bitset bset = obstack_alloc
1281 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
1282
1283 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
1284 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
1285 grow to a huge size with typical invocation.
d600ee67 1286
464c6927
PE
1287 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
1288 Use the pattern recommended by Autoconf 2.57, except also protect
1289 against double-definition.
1290 * src/system.h: Likewise.
1291 Portability issues reported by Nelson H. F. Beebe.
d600ee67 1292
464c6927
PE
1293 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
1294 All uses changed. Provide a definition in both C and C++.
1295 (yytrue, yyfalse): Define even if defined (__cplusplus).
1296
1297 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
1298 Reported by Nelson H. F. Beebe.
d600ee67 1299
464c6927
PE
1300 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
1301
0f42c7d5
PE
13022003-01-02 Paul Eggert <eggert@twinsun.com>
1303
1304 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
1305 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
1306 Bug reported by Nelson H. F. Beebe.
1307
dc546b0f
PE
13082003-01-01 Paul Eggert <eggert@twinsun.com>
1309
1310 * Version 1.875.
1311
2c09b6a7
PE
13122002-12-30 Paul Eggert <eggert@twinsun.com>
1313
1314 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
1315 Moved here from...
1316 (<INITIAL>","): Here. This causes stray "," to be treated
1317 more uniformly.
1318
dc546b0f 1319 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
1320 last brace in braced code when not in Yacc mode, for compatibility
1321 with Bison 1.35. This resurrects the 2001-12-15 patch to
1322 src/reader.c.
1323
1324 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
1325 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
1326
535c0f63
PE
13272002-12-28 Paul Eggert <eggert@twinsun.com>
1328
1329 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
1330 that of SYM's type. This fixes Debian bug 168069, reported by
1331 Thomas Olsson.
d600ee67 1332
963fcc17
PE
13332002-12-28 Paul Eggert <eggert@twinsun.com>
1334
1335 Version 1.75f.
1336
1337 Switch back to the Yacc style of conflict reports, undoing some
1338 of the 2002-07-30 change.
1339 * doc/bison.texinfo (Understanding): Use Yacc style for
1340 conflict reports. Also, use new way of locating rules.
1341 * src/conflicts.c (conflict_report):
1342 Renamed from conflict_report_yacc, removing the old
1343 'conflict_report'. Translate the entire conflict report at once,
1344 so that we don't assume that "," has the same interpretation in
1345 all languages.
1346 (conflicts_output): Use Yacc-style conflict report for each state,
1347 instead of our more-complicated style.
1348 (conflicts_print): Use Yacc-style conflict report, except print
1349 the input file name when not emulating Yacc.
1350 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
1351 Conflicted Reduction, %expect not enough, %expect too much,
1352 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
1353 * tests/existing.at (GNU Cim Grammar): Likewise.
1354 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
1355
1356 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
1357 fatal): Don't invoke fflush; it's not needed and it might even be
1358 harmful for stdout, as stdout might not be open.
1359 * src/reduce.c (reduce_print): Likewise.
1360
b1efe548
PE
13612002-12-27 Paul Eggert <eggert@twinsun.com>
1362
1363 Fix a bug where error locations were not being recorded correctly.
1364 This problem was originally reported by Paul Hilfinger in
e3aa65c5 1365 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
1366
1367 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1368 top of the location stack's error locations.
1369 (yyerrlab): Set it. When discarding a token, push its location
1370 onto yylerrsp so that we don't lose track of the error's end.
1371 (yyerrlab1): Now is only the target of YYERROR, so that we can
1372 properly record the location of the action that failed. For GCC
1373 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1374 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1375 (yyerrlab2): New label, which yyerrlab now falls through to.
1376 Compute the error's location by applying YYLLOC_DEFAULT to
1377 the locations of all the symbols that went into the error.
1378 * doc/bison.texinfo (Location Default Action): Mention that
1379 YYLLOC_DEFAULT is also invoked for syntax errors.
1380 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1381 Error locations include the locations of all the tokens that were
1382 discarded, not just the last token.
d600ee67 1383
983c5c2c
PE
13842002-12-26 Paul Eggert <eggert@twinsun.com>
1385
b1efe548
PE
1386 * src/files.c: Include quote.h.
1387 (compute_output_file_names): Warn if we detect conflicting
1388 outputs to the same file. This should catch the misunderstanding
1389 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1390
1391 * src/conflicts.c (conflicts_print): If the user specifies
1392 "%expect N", report an error if there are any reduce/reduce
1393 conflicts. This is what the manual says should happen.
1394 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1395 * tests/conflicts.at (%expect with reduce conflicts): New test.
1396
983c5c2c
PE
1397 Don't use m4_include on relative file names, as it doesn't work as
1398 desired if there happens to be a file with that name under ".".
d600ee67 1399
983c5c2c
PE
1400 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1401 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1402 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1403 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1404 * src/output.c (output_skeleton): Use full path names when
1405 specifying a file to include; don't rely on include path, as
1406 it's unreliable when the working file contains a file with
1407 that name.
d600ee67 1408
983c5c2c
PE
14092002-12-25 Paul Eggert <eggert@twinsun.com>
1410
1411 Remove obsolete references to bison.simple and bison.hairy.
1412 Problem mentioned by Aubin Mahe in
e3aa65c5 1413 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
1414 * data/glr.c: Comment fix.
1415 * doc/bison.1: Remove references. Also, mention "yacc".
1416
1417 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1418 with -g option.
1419
1420 * src/parse-gram.y (declaration): Use enum "report_states" rather
1421 than its numeric value 1.
1422
1423 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1424 opening a new one. This fixes Debian bug 165349, reported by
1425 Bruce Stephens.
1426
23f2d9dc
PE
14272002-12-24 Paul Eggert <eggert@twinsun.com>
1428
1429 Version 1.75e.
1430
1431 * Makefile.maint (cvs-update): Don't assume that the shell
1432 supports $(...), as Solaris sh doesn't.
1433
1434 * src/parse-gram.y (lloc_default): Remove test for empty
1435 nonterminals at the end, since it didn't change the result.
1436
14372002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
1438
1439 If the user does not define YYSTYPE as a macro, Bison now declares it
1440 using typedef instead of defining it as a macro. POSIX requires this.
1441 For consistency, YYLTYPE is also declared instead of defined.
1442
1443 %union directives can now have a tag before the `{', e.g., the
1444 directive `%union foo {...}' now generates the C code
1445 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1446 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1447 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1448 instead of `yyltype'.
1449
1450 `yystype' and `yyltype' are now obsolescent macros instead of being
1451 typedefs or tags; they are no longer documented and will be
1452 withdrawn in a future release.
1453
1454 * data/glr.c (b4_location_type): Remove.
1455 (YYSTYPE): Renamed from yystype.
1456 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
1457 (struct YYLTYPE): Renamed from struct yyltype.
1458 (YYLTYPE): Renamed from yyltype.
1459 (yyltype, yystype): New (and obsolescent) macros,
1460 for backward compatibility.
1461 * data/yacc.c: Likewise.
1462
1463 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
1464 does not specify a union tag. This is for compatibility with
1465 Solaris 9 yacc.
1466
1467 * src/parse-gram.y (add_param): 2nd arg is now char * not char
1468 const *, since it is now modified by stripping surrounding { }.
1469 (current_braced_code): Remove.
1470 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
1471 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
1472 trailing " {...}". Now of type <chars>.
1473 (grammar_declaration): Adjust to bundled tokens.
1474 (code_content): Remove; stripping is now done by add_param.
1475 (print_token_value): Print contents of bundled tokens.
1476 (token_name): New function.
1477
1478 * src/reader.h (braced_code, current_braced_code): Remove.
1479 (token_name): New decl.
1480
1481 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
1482 token_type, not braced_code code_kind. All uses changed.
1483 (SC_PRE_CODE): New state, for scanning after a keyword that
1484 has (or usually has) an immediately-following braced code.
1485 (token_type): New local var, to keep track of which token type
1486 to return when scanning braced code.
1487 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 1488 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
1489 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
1490 instead of returning a token type immediately.
1491 (<INITIAL>"{"): Set token type.
1492 (<SC_BRACED_CODE>"}"): Use it.
1493 (handle_action_dollar, handle_action_at): Now returns bool
1494 indicating success. Fail if ! current_rule; this prevents a core dump.
1495 (handle_symbol_code_dollar, handle_symbol_code_at):
1496 Remove; merge body into caller.
1497 (handle_dollar, handle_at): Complain in invalid contexts.
1498
1499 * NEWS, doc/bison.texinfo: Document the above.
1500 * NEWS: Fix years and program names in copyright notice.
1501
879ca4f8
PE
15022002-12-17 Paul Eggert <eggert@twinsun.com>
1503
1504 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
1505 Reporting, Table of Symbols): Omit mentions of %lex-param and
1506 %parse-param from the documentation for now.
1507
1c5fe69d
PE
15082002-12-15 Paul Eggert <eggert@twinsun.com>
1509
1510 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
1511 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
1512 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
1513 disagreed with the Bison documentation. Bug
1514 reported by Andrew Walrond.
d600ee67 1515
1c5fe69d
PE
1516 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
1517 as the caller now does that.
1518 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
1519 (YYEMPTY): Parenthesize right hand side, since others use it.
1520 (yyparse): Don't assume that our generated code is the only code
1521 that sets yychar.
1522
d1de5372
PE
15232002-12-13 Paul Eggert <eggert@twinsun.com>
1524
1525 Version 1.75d.
1526
1527 POSIX requires a "yacc" command.
1528 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
1529 (MOSTLYCLEANFILES): Add yacc.
1530 (yacc): New rule.
1c5fe69d 1531 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
1532 as an alias for bison y.
1533
1534 * po/LINGUAS: Add da.
d600ee67 1535
d1de5372
PE
1536 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
1537 problem with latest <getopt.h>.
1538 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
1539
1540 * doc/fdl.texi: Upgrade to 1.2.
1541 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
1542 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
1543 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
1544 gnulib.
1545 * config/install-sh: Sync with autotools.
1546
1547 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
e3aa65c5 1548 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
1549 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
1550 locations are requested.
1551 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
1552 locations are requested.
1553
d0f3fe23
PE
15542002-12-12 Paul Eggert <eggert@twinsun.com>
1555
1556 Remove unportable casts and storage allocation tricks.
1557 While we're at it, remove almost all casts, since they
1558 usually aren't needed and are a sign of trouble.
1559
1560 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
1561
1562 * src/derives.c (derives_compute): Do not subtract NTOKENS from
1563 the pointer DSET returned by malloc; this isn't portable.
1564 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
1565 Similarly for DERIVES.
1566 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
1567 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
1568 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
1569
1570 * src/derives.c (derives_compute): Do not bother invoking
1571 int_of_rule_number, since rule numbers are integers.
1572
1573 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
1574 rather than XMALLOC (char, N).
1575
1576 * src/files.c (filename_split): Rewrite to avoid cast.
1577
1578 * src/gram.h (symbol_number_as_item_number,
1579 item_number_as_symbol_number, rule_number_as_item_number,
1580 item_number_as_rule_number):
1581 Now inline functions rather than macros, to avoid casts.
1582 * src/state.h (state_number_as_int): Likewise.
1583 * src/tables.c (state_number_to_vector_number,
1584 symbol_number_to_vector_number): Likewise.
1585
1586 * src/gram.h (int_of_rule_number): Remove; no longer used.
1587
1588 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
1589 since the resulting storage is always stored into.
1590
1591 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
1592 where it's needed.
1593
1594 * src/muscle_tab.c (muscle_m4_output):
1595 Now inline. Return bool, not int.
1596 * src/state.c (state_compare): Likewise.
1597 * src/symtab.c (symbol_check_defined,
1598 symbol_check_alias_consistency, symbol_pack, symbol_translation,
1599 hash_compare_symbol, hash_symbol):
1600 Likewise.
1601 * src/uniqstr.c (uniqstr_print): Likewise.
1602 * src/muscle_tab.c (muscle_m4_output_processor):
1603 New function, to avoid casts.
1604 * src/state.c (state_comparator, stage_hasher): Likewise.
1605 * src/symtab.c (symbol_check_defined_processor,
1606 symbol_check_alias_consistency_processor, symbol_pack_processor,
1607 symbol_translation_processor, hash_symbol_comparator,
1608 hash_symbol_hasher): Likewise.
1609 * src/uniqstr.c (uniqstr_print_processor): Likewise.
1610 * src/muscle_tab.c (muscles_m4_output):
1611 Use new functions instead of casting old functions unportably.
1612 * src/state.c (state_hash_new): Likewise.
1613 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
1614 symbols_token_translations_init):
1615 Likewise.
1616 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
1617
1618 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
1619 var instead of casting to long, to avoid casts.
1620 (prepare_states): Use MALLOC rather than alloca, so that we don't
1621 have to worry about alloca.
1622 * src/state.c (state_hash_lookup): Likewise.
1623
1624 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
1625 local var instead of casting to unsigned char, to avoid casts.
1626
1627 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
1628 STATE_ALLOC): Remove.
1629 (transitions_new, errs_new, reductions_new, state_new): Use malloc
1630 rather than calloc, and use offsetof to avoid allocating slightly
1631 too much storage.
1632 (state_new): Initialize all members.
1633
1634 * src/state.c (state_hash): Use unsigned accumulator, not signed.
1635
1636 * src/symtab.c (symbol_free): Remove; unused.
1637 (symbol_get): Remove cast in lhs of assignment.
1638 (symbols_do): Now static. Accept generic arguments, not
1639 hashing-related ones.
1640
1641 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
1642 (symbol_processor): Remove.
1643 (symbols_do): Remove decl; now static.
1644
1645 * src/system.h (alloca): Remove; decl no longer needed.
1646 (<stddef.h>): Include, for offsetof.
1647 (<inttypes.>, <stdint.h>): Include if available.
1648 (uintptr_t): New type, if system lacks it.
1649 (CALLOC, MALLOC, REALLOC): New macros.
1650 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
1651 new macros.
1652
1653 * src/tables.c (table_size): Now int, to pacify GCC.
1654 (table_grow, table_ninf_remap): Use signed table size.
1655 (save_row): Don't bother initializing locals when not needed.
1656 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
1657 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
1658
1659 * src/vcg.h: Correct misspellings.
1660
1661 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
1662
1663
1664 * src/getargs.c (getargs): Don't assume EOF == -1.
1665
26b4a969
PE
16662002-12-09 Paul Eggert <eggert@twinsun.com>
1667
1668 Change identifier spellings to avoid collisions with names
1669 that are reserved by POSIX.
1670
1671 Don't use names ending in _t, since POSIX reserves them.
1672 For consistency, remove _e and _s endings -- they're weren't
1673 needed to remove ambiguity. All uses changed.
1674 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
1675 turn was just renamed from struniq_t.
1676 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
1677 which in turn was just renamed from struniq_processor_t.
1678 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
1679 in turn was renamed from hash_compare_struniq_t.
1680 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
1681 (state_list): Renamed from state_list_t.
1682 * src/assoc.h (assoc): Renamed from assoc_t.
1683 * src/conflicts.c (enum conflict_resolution): Renamed from
1684 enum conflict_resolution_e.
1685 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
1686 (rule_list): Renamed from rule_list_t.
1687 * src/getargs.h (enum trace): Renamed from enum trace_e.
1688 (enum report): Renamed from enum report_e.
1689 * src/gram.h (item_number): Renamed from item_number_t.
1690 (rule_number): Renamed from rule_number_t.
1691 (struct rule_s): Remove the "rule_s" part; not used.
1692 (rule): Renamed from rule_t.
1693 (rule_filter): Renamed from rule_filter_t.
1694 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
1695 (goto_list): Renamed from goto_list_t.
1696 * src/lalr.h (goto_number): Renamed from goto_number_t.
1697 * src/location.h (location): Renamed from location_t.
1698 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
1699 and moved here from:
1700 * src/muscle_tab.h (muscle_entry_t): here.
1701 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
1702 (rule_list): Renamed from rule_list_t.
1703 * src/print_graph.c (static_graph): Renamed from graph.
1704 * src/reader.h (braced_code): Renamed from braced_code_t.
1705 Remove brace_code_e tag.
1706 * src/relation.h (relation_node): Renamed from relation_node_t.
1707 (relation_nodes): Renamed from relation_nodes_t.
1708 (relation): Renamed from relation_t.
1709 * src/state.h (state_number): Renamed from state_number_t.
1710 (struct state): Renamed from struct state_s.
1711 (state): Renamed from state_t.
1712 (transitions): Renamed from transitions_t. Unused (and
1713 misspelled) transtion_s tag removed.
1714 (errs): Renamed from errs_t. Unused errs_s tag removed.
1715 (reductions): Renamed from reductions_t. Unused tag
1716 reductions_s removed.
1717 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
1718 (struct symbol_list): Renamed from struct symbol_list_s.
1719 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
1720 (struct symbol): Renamed from struct symbol_s.
1721 (symbol): Renamed from symbol_t.
1722 * src/tables.c (vector_number): Renamed from vector_number_t.
1723 (action_number): Renamed from action_t.
1724 * src/tables.h (base_number): Renamed from base_t.
1725 * src/vcg.h (enum color): Renamed from enum color_e.
1726 (enum textmode): Renamed from enum textmode_e.
1727 (enum shape): Renamed from enum shape_e.
1728 (struct colorentry): Renamed from struct colorentry_s.
1729 (struct classname): Renamed from struct classname_s.
1730 (struct infoname): Renamed from struct infoname_s.
1731 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
1732 (enum decision): Renamed from enum decision_e.
1733 (enum orientation): Renamed from enum orientation_e.
1734 (enum alignment): Renamed from enum alignment_e.
1735 (enum arrow_mode): Renamed from enum arrow_mode_e.
1736 (enum crossing_type): Renamed from enum crossing_type_e.
1737 (enum view): Renamed from enum view_e.
1738 (struct node): Renamed from struct node_s.
1739 (node): Renamed from node_t.
1740 (enum linestyle): Renamed from enum linestyle_e.
1741 (enum arrowstyle): Renamed from enum arrowstyle_e.
1742 (struct edge): Renamed from struct edge.
1743 (edge): Renamed from edge_t.
1744 (struct graph): Renamed from struct graph_s.
1745 (graph): Renamed from graph_t.
1746 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
1747 Rename value_t -> value.
1748 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
1749 value_t_as_yystype -> value_as_yystype.
1750
1751 Don't include <errno.h> in the mainstream code, since it
1752 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
1753 * lib/get-errno.c, lib/get-errno.h: New files.
1754 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
1755 get-errno.c.
1756 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
1757 * src/output.c (output_skeleton): Likewise.
1758 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
1759 instead of errno.
1760 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
1761 Likewise.
1762 (handle_action_dollar, handle_action_at): Likewise.
1763 * src/system.h: Do not include <errno.h>.
1764 (TAB_EXT): Renamed from EXT_TAB.
1765 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
1766
1767 Avoid str[a-z]*, since <string.h> reserves that name space.
1768 Change all instances of "struniq" in names to "uniqstr", and
1769 likewise for "STRUNIQ" and "UNIQSTR".
1770 * src/uniqstr.c: Renamed from src/struniq.c.
1771 * src/uniqstr.h: Renamed from src/struniq.h.
1772 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
1773 * src/files.c (strsuffix): Remove; unused.
1774 (concat2): Renamed from stringappend. Now static.
1775 * src/files.h (strsuffix, stringappend): Remove; unused.
1776 * src/parse-gram.y (<chars>): Renamed from <string>.
1777 (<uniqstr>): Renamed from <struniq>.
1778 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
1779 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
1780 (struct graph_s.expand): Renamed from struct graph_s.stretch.
1781 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
1782 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
1783 (N_EXPAND): Renamed from N_STRETCH.
1784
1785 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
1786 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
1787 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
1788 Remove; unused.
1789 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
1790 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
1791 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
1792 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
1793 (BASE_MAXIMUM): Renamed from BASE_MAX.
1794 (BASE_MINIMUM): Renamed from BASE_MIN.
1795 (ACTION_MAX): Remove; unused.
1796 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
1797 Unnecessary casts removed from above defines.
1798
1799
1800 Fix misspelling in names.
1801 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
1802 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
1803 G_NODE_ALIGNEMENT.
1804
1805
1806 * lib/timevar.c (timevar_report): Renamed from time_report,
1807 for consistency with other names.
1808 * lib/timevar.h (timevar_report): New decl.
1809 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
1810
1811
1812 Sort include-file uses.
1813
1814 Reorder all include files under src to be in the order "system.h".
1815 then the ../lib include files in angle brackets (alphabetized),
1816 then the . include files in double-quotes (alphabetized). Fix
1817 dependency breakages encountered in this process, as follows:
1818 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
1819 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
1820 * src/state.h: Include "symtab.h".
1821
996b1c7e
PE
18222002-12-08 Paul Eggert <eggert@twinsun.com>
1823
1824 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
1825 since this causes problems when __file__ contains character
1826 sequences like "@" that are treated specially by src/scan-skel.l.
1827 Instead, just use the file's basename. This fixes the bug
1828 reported by Martin Mokrejs in
e3aa65c5 1829 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 1830
e19c4e5d
PE
18312002-12-06 Paul Eggert <eggert@twinsun.com>
1832
1833 Add support for rules that do not have trailing semicolons, as
1834 POSIX requires. Improve the quality of locations in Bison
1835 diagnostics.
26b4a969 1836
e19c4e5d
PE
1837 * src/location.c: Include <quotearg.h>.
1838 (empty_location): Now const.
1839 (location_print): New function. Follow the recommendation of the
1840 GNU Coding Standards for locations that span file boundaries.
1841 * src/location.h: Do not include <quotearg.h>; no longer needed.
1842 (boundary): New type.
1843 (location_t): Use it. This allows locations to span file boundaries.
1844 All member uses changed: file -> start.file or end.file (as needed),
1845 first_line -> start.line, first_column -> start.column,
1846 last_line -> end.line, last_column -> end.column.
1847 (equal_boundaries): New function.
1848 (LOCATION_RESET, LOCATION_STEP): Remove.
1849 (LOCATION_PRINT): Remove. All callers changed to use location_print.
1850 (empty_location): Now const.
1851 (location_print): New decl.
1852 * src/parse-gram.y (lloc_default): New function, which handles
1853 empty locations more accurately.
1854 (YYLLOC_DEFAULT): Use it.
1855 (%token COLON): Remove.
1856 (%token ID_COLON): New token.
26b4a969 1857 (rules): Use it.
e19c4e5d
PE
1858 (declarations, rules): Remove trailing semicolon.
1859 (declaration, rules_or_grammar_declaration):
1860 Allow empty (";") declaration.
1861 (symbol_def): Remove empty actions; no longer needed.
1862 (rules_or_grammar_declaration): Remove trailing semicolon.
1863 (semi_colon.opt): Remove.
1864 * src/reader.h: Include location.h.
1865 (scanner_cursor): New decl.
1866 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
1867 rolling our own.
1868 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
1869 of *loc.
1870 (STEP): Remove. No longer needed, now that adjust_location does
1871 the work. All uses removed.
1872 (scanner_cursor): New var.
1873 (adjust_location): Renamed from extend_location. It now sets
1874 *loc and adjusts the scanner cursor. All uses changed.
1875 Don't bother testing for CR.
1876 (handle_syncline): Remove location arg; now updates scanner cursor.
1877 All callers changed.
1878 (unexpected_end_of_file): Now accepts start boundary of token or
1879 comment, not location. All callers changed. Update scanner cursor,
1880 not the location.
1881 (SC_AFTER_IDENTIFIER): New state.
1882 (context_state): Renamed from c_context. All uses changed.
1883 (id_loc, code_start, token_start): New local vars.
1884 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
1885 processing of Yacc white space and equivalents here.
1886 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
1887 instead of returning ID immediately, since we need to search for
1888 a subsequent colon.
1889 (<INITIAL>"'", "\""): Save token_start.
1890 (<INITIAL>"%{", "{", "%%"): Save code_start.
1891 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
1892 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
1893 BEGIN context_state at end, not INITIAL.
1894 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
1895 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
1896 Return correct token start.
1897 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
1898 the start of a character, string or multiline comment is found.
1899 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
1900 Reduction): Adjust reported locations to match the more-precise
1901 results now expected.
1902 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
1903 * tests/reduce.at (Useless Rules, Reduced Automaton,
1904 Underivable Rules): Likewise.
1905 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1906 or "|"' now that so many other tokens are allowed by the new grammar.
1907
1908 * src/complain.h (current_file): Remove duplicate decl;
1909 current_file is now owned by files.h.
1910 * src/complain.c, src/scan-gram.l: Include files.h.
1911
19122002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 1913
e19c4e5d
PE
1914 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1915 promotes to int; it might be unsigned int.
1916 * data/yacc.c (yy_reduce_print): Likewise.
1917
1918 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1919 be #defined in the prologue, not in the Bison declarations.
1920 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 1921
b64755e3
PE
19222002-12-02 Paul Eggert <eggert@twinsun.com>
1923
1924 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1925 * lib/strtoul.c: New file, from gnulib.
1926 This fixes a porting bug reported by Peter Klein in
e3aa65c5 1927 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 1928
6e746484
PE
19292002-11-30 Paul Eggert <eggert@twinsun.com>
1930
b64755e3
PE
1931 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1932 and put only a forward declaration in the prologue. This is for
1933 consistency with the other scanner helper functions.
1934
6ba55592
PE
1935 Type clashes now generate warnings, not errors, since it
1936 appears that POSIX may allow some grammars with type clashes.
1937 * src/reader.c (grammar_current_rule_check): Warn about
1938 type clashes instead of complaining.
1939 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1940
6e746484
PE
1941 Add Yacc library, since POSIX requires it.
1942 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1943 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1944 * lib/main.c, lib/yyerror.c: New files.
1945
1946 gram_error can be static; it need not be extern.
1947 * src/reader.h (gram_error): Remove decl.
1948 * src/parse-gram.y (gram_error): Now static. Add static decl.
1949 (print_token_value): Omit parameter names from forward decl,
1950 for consistency.
1951
88510f9c
PE
19522002-11-29 Paul Eggert <eggert@twinsun.com>
1953
6e746484
PE
1954 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1955 be declared before being used. E.g., one should typically
1956 declare them in the prologue. Use GNU coding style in examples.
1957 Put "const" consistently after the type it modifies. Mention
1958 that C99 supports "inline". Mention that yyerror traditionally
1959 returns "int".
1960
88510f9c
PE
1961 %parse-param and %lex-param now take just one argument, the
1962 declaration; the argument name is deduced from the declaration.
1963
1964 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1965 Reporting, Table of Symbols): Document this.
1966 * src/parse-gram.y (add_param): New function.
1967 (COMMA): Remove.
1968 (declaration): Implement new rule for %parse-param and %lex-param.
1969 * src/scan-gram.l: "," now elicits a warning, rather than being
1970 a token; this is more compatible with byacc.
1971 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1972
bb92250c
PE
19732002-11-27 Paul Eggert <eggert@twinsun.com>
1974
1975 Rename identifiers to avoid real and potential collisions.
1976
1977 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1978 to avoid collision with lex macro described by Bruce Lilly in
e3aa65c5 1979 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
1980 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1981 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1982 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1983 All uses changed.
1984 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1985 The name "yycontrol" violates the name space rules, and this stuff
1986 wasn't being used anyway.
1987 (input): Remove action; this stuff wasn't being used.
1988 (gram_error): Rename local variable yylloc -> loc.
1989 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1990 (YY_DECL): Don't use "yy" at start of local variables.
1991 All uses changed, e.g., yylloc -> loc.
1992 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1993 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1994 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1995 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1996
1997 * src/parse-gram.y (gram_error): loc is now const *.
1998 * src/reader.h (gram_error): Likewise.
1999
3af4feb2
PE
20002002-11-24 Paul Eggert <eggert@twinsun.com>
2001
2002 Version 1.75c.
2003
2004 * tests/actions.at (Actions after errors): Use an output format
2005 more similar to that of the Printers and Destructors test.
2006 Test the position of the ';' token too.
2007 (Printers and Destructors): Likewise.
2008 (Printers and Destructors: %glr-parser): Remove for now, to avoid
2009 unnecessarily alarming people when the test fails.
2010
2011 * data/yacc.c (yyerrlab1): Move this label down, so that the
2012 parser does not discard the lookahead token if the user code
2013 invokes YYERROR. This change is required for POSIX conformance.
2014
2015 * lib/error.c: Sync with gnulib.
2016
20172002-11-22 Paul Eggert <eggert@twinsun.com>
2018
2019 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
2020 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
2021 * lib/xmalloc.c: Likewise.
26b4a969 2022
58004308
PE
20232002-11-20 Paul Eggert <eggert@twinsun.com>
2024
2025 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
2026
20272002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 2028
58004308
PE
2029 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
2030 should use `if (! x) abort ();' rather than `assert (x);', and
2031 anyway it's one less thing to worry about configuring.
2032
2033 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
2034 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
2035 and replace all instances of assert with abort.
2036 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2037 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
2038
2039 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
2040 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
2041 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
2042 hash_find_entry, hash_rehash, hash_insert): Likewise.
2043 * src/conflicts.c (resolve_sr_conflict): Likewise.
2044 * src/lalr.c (set_goto_map, map_goto): Likewise.
2045 * src/nullable.c (nullable_compute): Likewise.
2046 * src/output.c (prepare_rules, token_definitions_output): Likewise.
2047 * src/reader.c (packgram, reader): Likewise.
2048 * src/state.c (state_new, state_free, state_transitions_set,
2049 state_reduction_find): Likewise.
2050 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
2051 symbol_pack): Likewise.
2052 * src/tables.c (conflict_row, pack_vector): Likewise.
2053 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
2054 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
2055 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
2056 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
2057
2058 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
2059 (ARGMATCH_CONSTRAINT): New macro.
2060 (ARGMATCH_ASSERT): Use it.
2061
2062 * src/system.h (verify): New macro.
2063 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
2064 rather than assert.
2065 * src/tables.c (tables_generate): Likewise.
2066
2067 * src/struniq.c (struniq_assert): Now returns void, and aborts
2068 if the assertion is false.
2069 (struniq_assert_p): Remove.
2070 * src/struniq.h: Likewise.
2071
76ae8198
PE
20722002-11-18 Paul Eggert <eggert@twinsun.com>
2073
2074 * data/glr.c (yygetLRActions): Replace `yyindex' with
2075 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
2076 This fixes the regression with Sun ONE Studio 7 cc that I reported in
e3aa65c5 2077 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 2078
d3c4e709
AD
20792002-11-18 Akim Demaille <akim@epita.fr>
2080
2081 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
2082 space.
2083 From Tim Van Holder.
2084
8d8a7238
PE
20852002-11-17 Paul Eggert <eggert@twinsun.com>
2086
2087 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
2088 to "SyntaxError" for consistency with my 2002-11-15 change.
2089
2090 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
2091 not define to {}, since this breaks the common use of `YYDPRINTF
2092 ((...));' if a single statement is desired (e.g. before `else').
2093 Work around GCC warnings by surrounding corresponding calls with
2094 {} if needed.
2095 (yyhasResolvedValue): Remove unused function.
2096 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
2097 loop body.
2098 (yyreportSyntaxError): Renamed from yyreportParseError.
2099 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
2100 All uses changed.
2101 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
2102 extern when possible. Remove unused initializations.
2103
b0937b22
AD
21042002-11-16 Akim Demaille <akim@epita.fr>
2105
2106 Augment the similarity between GLR and LALR traces.
2107
2108 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
2109 (YY_REDUCE_PRINT): New.
2110 (yyparse): Use them.
2111 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
2112 YYDPRINT here.
2113 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
2114 state reached after the reduction/recovery, since...
2115 (yyparse, yyprocessOneStack): Report the state we are entering in.
2116
c5e3e510
AD
21172002-11-16 Akim Demaille <akim@epita.fr>
2118
2119 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
2120 Add support for --trace=skeleton.
2121 * src/scan-skel.l: %option debug.
2122 Scan strings of non-@ or \n instead of character by character.
2123 (scan_skel): Handle trace_skeleton.
2124 (QPUTS): New.
2125 (@output_parser_name@, @output_header_name@): ``Restore'' their
2126 support (used to be M4 macros).
2127 * data/yacc.c: Quote larger chunks, a la glr.c.
2128 * data/lalr1.cc: Likewise.
2129 The header guards are no longer available, so use some other
2130 string than `YYLSP_NEEDED'.
2131
4c6cc1db
AD
21322002-11-16 Akim Demaille <akim@epita.fr>
2133
2134 Make the ``Printers and Destructors'' test more verbose, taking
2135 `yacc.c''s behavior as (possibly wrong) reference.
2136
2137 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
2138 instead of fprint on stdout.
2139 Set and report the last_line of the symbols.
2140 Consistently display values and locations.
2141
6d9e8019
PE
21422002-11-16 Paul Eggert <eggert@twinsun.com>
2143
2144 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
2145
6e649e65
PE
21462002-11-15 Paul Eggert <eggert@twinsun.com>
2147
b25d88f6
PE
2148 * tests/actions.at (Actions after errors): New test case.
2149
6e649e65
PE
2150 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
2151 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
2152 tests/action.at, tests/calc.at, tests/conflicts.at,
2153 tests/cxx-type.at, tests/regression.at:
2154 "parse error" -> "syntax error" for POSIX compatibility.
2155 "parsing stack overflow..." -> "parser stack overflow" so
2156 that code matches Bison documentation.
2157
0f39aab9
AD
21582002-11-15 Akim Demaille <akim@epita.fr>
2159
2160 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
2161 take two BRACED_CODE, not two string_content.
2162 Free the scanner's obstack when we are done.
2163 (code_content): New.
2164 * tests/calc.at: Adjust.
2165 * doc/bison.texinfo: Adjust.
2166 Also, make sure to include the `,' for these declarations.
2167
761c1926
AD
21682002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
2169
2170 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
2171 definition; avoids potential autoreconf problems.
2172
b0f98b10
AD
21732002-11-15 Akim Demaille <akim@epita.fr>
2174
2175 Always check the value returned by yyparse.
2176
2177 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
2178 returned by yyparse.
2179 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
2180 Adjust calls.
2181 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
2182 returned by yyparse.
2183
970785f1
PH
21842002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2185
2186 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
2187 on input.at test.
2188
8fcc7db1
PE
21892002-11-14 Paul Eggert <eggert@twinsun.com>
2190
7ec1b48e
PE
2191 * src/output.c (output_skeleton): Call xfopen instead of
2192 duplicating xfopen's body.
2193
cfff7583 2194 Fix bugs reported by Nelson H. F. Beebe in
e3aa65c5 2195 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 2196
8fcc7db1
PE
2197 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
2198 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
2199 Group compiler. Instead, use "$CC -E bar.c". Include the .h
2200 file twice in the grammar, as an extra check.
2201
2202 * tests/input.at (Torturing the Scanner): Surround the
2203 backslash-newline tests with "#if 0", to make it less likely that
2204 we'll run into compiler bugs. Bring back solitary \ inside
2205 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 2206 test backslash-newline in C character constant.
8fcc7db1 2207
4e8d992c
AD
22082002-11-14 Akim Demaille <akim@epita.fr>
2209
2210 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
2211 status of the compiler.
f32b346d 2212 Calling `exit 1' is no longer needed.
4e8d992c
AD
2213 Reported by Nelson H. F. Beebe.
2214
9501dc6e
AD
22152002-11-14 Akim Demaille <akim@epita.fr>
2216
2217 * tests/atlocal.in (CPPFLAGS): We have config.h.
2218 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
2219 New.
2220 * tests/actions.at, tests/calc.at, tests/conflicts.at,
2221 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
2222 * tests/regression.at, tests/torture.at: Use them for all the
2223 grammars that are to be compiled.
2224 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
2225 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
2226 * doc/bison.texinfo (GLR Parsers): Document `inline'.
2227
18b519c0
AD
22282002-11-14 Akim Demaille <akim@epita.fr>
2229
2230 * doc/bison.texinfo: Various formatting changes (alignments in
2231 samples, additional @group/@end group, GCS in samples.
2232 Use @deffn instead of simple @table to define the directives,
2233 macros, variables etc.
2234
9a86cdb9
PE
22352002-11-13 Paul Eggert <eggert@twinsun.com>
2236
daa33def 2237 Fix some bugs reported by Albert Chin-A-Young in
e3aa65c5 2238 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 2239
daa33def 2240 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 2241 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
2242 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
2243 * tests/headers.at (export YYLTYPE): Likewise.
2244
2245 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 2246 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 2247
9a86cdb9
PE
2248 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
2249 comments, since they're not portable. Use GNU coding style.
2250
9c1e26bd
AD
22512002-11-13 Akim Demaille <akim@epita.fr>
2252
2253 * data/yacc.c: Leave bigger chunks of quoted text.
2254 (YYDSYMPRINTF): New.
2255 Use it to report symbol activities.
2256 * data/glr.c (YYDSYMPRINTF): New.
2257 Use it.
2258
87f721cc
PE
22592002-11-12 Paul Eggert <eggert@twinsun.com>
2260
2261 Version 1.75b.
2262
2263 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
2264 (yyglrReduce): Return yyok, not 0.
2265 This should avoid the enumerated-type warnings reported
464c6927 2266 by Nelson H. F. Beebe in
e3aa65c5 2267 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
2268
2269 * lib/bbitset.h (BITSET_INLINE): Remove.
2270 * lib/bitset.h [! BITSET_INLINE]: Remove.
2271 (bitset_set, bitset_reset, bitset_test): Rename local vars
2272 to avoid shadowing warnings by GCC.
2273
2274 * data/glr.c (inline): Remove #define. It's the user's
2275 responsibility to #define it away, just like 'const'.
464c6927 2276 This fixes one of the bugs reported by Nelson H. F. Beebe in
e3aa65c5 2277 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 2278
87f721cc
PE
2279 * Makefile.maint (po-check): Scan .l and .y files instead of the
2280 .c and the .h files that they generate. This fixes the bug
2281 reported by Tim Van Holder in:
e3aa65c5 2282 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
2283 Look for N_ as well as for _. Try to avoid matching #define for
2284 N_ and _.
2285 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
2286 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
2287 * src/scan-gram.l: Revamp regular expressions so that " and '
2288 do not confuse xgettext.
2289
2290 * src/struniq.h (struniq_new): Do not declare the return type
2291 to be 'const'; this violates the C standard.
2292 * src/struniq.c (struniq_new): Likewise.
2293
be14ade5
AD
22942002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
2295
2296 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
2297 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
2298 linker.
2299
05291fbc
AD
23002002-11-12 Akim Demaille <akim@epita.fr>
2301
2302 * Makefile.maint: Sync with Autoconf:
2303 (local_updates): New.
2304
1f5fd52e
AD
23052002-11-12 Akim Demaille <akim@epita.fr>
2306
2307 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
2308
283f1e64
AD
23092002-11-12 Akim Demaille <akim@epita.fr>
2310
2311 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
2312 locations.
2313
886b69d1
AD
23142002-11-12 Akim Demaille <akim@epita.fr>
2315
2316 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
2317 not yyvalue.
2318
3df37415
AD
23192002-11-12 Akim Demaille <akim@epita.fr>
2320
2321 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
2322 Use it to test the GLR parser.
2323
7bd6c77e
AD
23242002-11-12 Akim Demaille <akim@epita.fr>
2325
2326 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
2327 defines it.
2328 * data/glr.c (yystos): New.
2329 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
2330 (YYDSYMPRINT): New.
2331 (yyval): Don't define it, it is handled via M4.
2332 (yyrecoverParseError): Free verbosely the discarded symbols.
2333 * data/yacc.c (yysymprint): Remove, rather...
2334 (b4_yysymprint_generate): invoke.
2335 * data/c.m4 (b4_yysymprint_generate): New.
2336 Accept pointers as arguments, as opposed to the version from
2337 yacc.c.
2338 (b4_yydestruct_generate): Likewise.
2339 * tests/cations.at (Printers and Destructors): Use Bison directives
2340 instead of CPP macros.
2341 Don't rely on internal details.
2342
b0400cc6
AD
23432002-11-12 Akim Demaille <akim@epita.fr>
2344
2345 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
2346 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
2347 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
2348 it against YYEMPTY and so forth), work on yytoken (i.e., set
2349 it to YYEMPTY etc.).
2350 (yydestruct): Replace with a b4_yydestruct_generate invocation.
2351 (b4_symbol_actions): Remove.
2352 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
2353 for 0, end-of-input.
2354
72f889cc
AD
23552002-11-12 Akim Demaille <akim@epita.fr>
2356
2357 * doc/bison.texinfo (Destructor Decl): New.
2358
b1ae9233
AD
23592002-11-12 Akim Demaille <akim@epita.fr>
2360
2361 * src/tables.c (tables_generate): Use free for pointers that
2362 cannot be NULL, not XFREE.
2363 (pack_vector): Use assert, not fatal, for bound violations.
2364 * src/state.c (state_new): Likewise.
2365 * src/reader.c (reader): Likewise.
2366 * src/lalr.c (set_goto_map): Likewise.
72f889cc 2367 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
2368 the file name.
2369
7ec2d4cd
AD
23702002-11-12 Akim Demaille <akim@epita.fr>
2371
2372 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2373 Restore.
2374 * src/scan-gram.l (last_string): Is global to the file, not to
2375 yylex.
2376 * src/parse-gram.y (input): Don't append the epilogue here,
2377 (epilogue.opt): do it here, and free the scanner's obstack.
2378 * src/reader.c (epilogue_set): Rename as...
2379 (epilogue_augment): this.
2380 * data/c.m4 (b4_epilogue): Defaults to empty.
2381
573a6cd3
AD
23822002-11-12 Akim Demaille <akim@epita.fr>
2383
2384 * src/getargs.c (long_options): Remove duplicates.
2385 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2386 Remove.
2387 * doc/bison.rnh: Remove.
2388 * doc/bison.texinfo (VMS Invocation): Remove.
2389
95612cfa
AD
23902002-11-12 Akim Demaille <akim@epita.fr>
2391
2392 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2393 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2394
2395 Use struniq for symbols.
2396
2397 * src/symtab.h (symbol_t): The tag member is a struniq.
2398 (symbol_type_set): Adjust.
2399 * src/symtab.c (symbol_new): Takes a struniq.
2400 (symbol_free): Don't free the tag member.
2401 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2402 (hash_compare_symbol, hash_symbol): these.
2403 Use the fact that tags as struniqs.
2404 (symbol_get): Use struniq_new.
2405 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2406 Returns a strniq.
2407 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2408 and type members are struniqs.
2409 * src/reader.c (get_merge_function)
2410 (grammar_current_rule_merge_set): Adjust.
2411 (TYPE, current_type): Are struniq.
2412
2413 Use struniq for file names.
2414
2415 * src/files.h, src/files.c (infile): Split into...
2416 (grammar_file, current_file): these.
2417 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2418 * src/reduce.c (reduce_print): Likewise.
2419 * src/getargs.c (getargs): Likewise.
2420 * src/complain.h, src/complain.c: Likewise.
2421 * src/main.c (main): Call struniqs_new early enough to use it for
2422 file names.
2423 Don't free the input file name.
2424
3e6656f9
AD
24252002-11-12 Akim Demaille <akim@epita.fr>
2426
2427 * src/symtab.c (symbol_free): Remove dead deactivated code:
2428 type_name are properly removed.
2429 Don't use XFREE to free items that cannot be NULL.
2430 * src/struniq.h, src/struniq.c: New.
2431 * src/main.c (main): Initialize/free struniqs.
2432 * src/parse-gram.y (%union): Add astruniq member.
2433 (yyprint): Adjust.
2434 * src/scan-gram.l (<{tag}>): Return a struniq.
2435 Free the obstack bit that used to store it.
2436 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2437
7672019c
PE
24382002-11-11 Paul Eggert <eggert@twinsun.com>
2439
2440 Revamp to fix many (but not all) of the C- and M4-related quoting
2441 problems. Among other things, this fixes the Bison bug reported
2442 by Jan Hubicka when processing the Bash grammar; see:
e3aa65c5 2443 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
2444
2445 Use new @ escapes consistently. Represent brackets with @{ and @}
2446 rather than @<:@ and @:>@, since this works a bit better with dumb
2447 editors like vi. Represent @ with @@, since @ is now consistently
2448 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2449 __ofile__, to avoid unexpected expansions. Similarly, use @output
2450 rather than #output.
2451
2452 * data/c.m4 (b4_copyright): Omit file name from comment, since
2453 the file name could contain "*/".
2454 (b4_synclines_flag): Don't quote the 2nd argument; it should already
2455 be quoted. All uses changed.
2456
2457 * data/glr.c: Use new @ escapes consistently.
2458 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
2459 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
2460 Remove, since they couldn't handle arbitrary characters in file
2461 names.
2462 * data/lalr1.cc: Likewise.
2463 * data/yacc.c: Likewise.
2464
2465 * src/files.c (output_infix): Remove; all uses removed.
2466 * src/files.h: Likewise.
2467
2468 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
2469 mishandled funny characters in file names, and anyway it isn't
2470 needed any more.
2471 * data/yacc.c: Likewise.
2472 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
2473
2474 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
2475 * data/yacc.c: Likewise.
2476
2477 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
2478 strings now.
2479 (muscle_init): Quote filename as a C string.
2480 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
2481 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
2482 * src/output.c (escaped_file_name_output): New function.
2483 (prepare_symbols): Quote tokens for M4.
2484 (prepare): Don't insert output_infix, output_prefix,
2485 output_parser_name, output_header_name; this is now down by scan-skel.
2486 Insert skeleton as a C string.
2487
2488 * src/output.c (user_actions_output, symbol_destructors_output,
2489 symbol_printers_output): Quote filenames for C and M4.
2490 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2491
2492 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
2493 escapes other than \\ and \'; this simplifies the code.
2494 (<SC_STRING>): Likewise, for \\ and \".
2495 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
2496 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
2497 Use new escapes @{ and @} for [ and ].
2498
2499 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
2500 them with auto vars.
2501 Switch to new escape scheme, where @ is the escape character uniformly.
2502 Abort if a stray escape character is found. Avoid unbounded input
2503 buffer when parsing non-escaped text.
2504
2505 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
2506 __oline__, #output, $@, and @{ do not have unintended meanings.
2507
acea4f3b
PE
25082002-11-09 Paul Eggert <eggert@twinsun.com>
2509
2510 Fix the test failure due to GCC warnings described in
e3aa65c5 2511 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
2512 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
2513 evaluate to 0 if it's impossible for NINF to be in the respective
2514 table.
2515 (yygetLRActions, yyrecoverParseError): Use them.
2516
2517 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
2518 counted in the token inserted at end of file. Now takes
2519 location_t *, not location_t, so that the location can be
2520 adjusted. All uses changed.
2521
2522 * tests/regression.at (Invalid inputs): Adjust wording in
2523 diagnostic to match the new behavior.
2524
2525 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
2526 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
2527 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
2528 abort ();'. This reduces the runtime of the "Many lookaheads"
2529 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
2530 GCC 3.2.
2531
20ef1ad5
PE
25322002-11-07 Paul Eggert <eggert@twinsun.com>
2533
2534 * src/parse-gram.y (CHARACTER): Remove unused token.
2535 All uses removed.
2536
2537 * src/scan-gram.l: Remove stack option. We no longer use the
2538 stack, since the stack was never deeper than 1; instead, use the
2539 new auto var c_context to record the stacked value.
2540
2541 Remove nounput option. At an unexpected end of file, we now unput
2542 the minimal input necessary to end cleanly; this simplifies the
2543 code.
2544
2545 Avoid unbounded token sizes where this is easy.
2546
2547 (unexpected_end_of_file): New function.
2548 Use it to systematize the error message on unexpected EOF.
2549 (last-string): Now auto, not static.
2550 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
2551 (scanner_last_string_free): Remove; not used.
2552 (percent_percent_count): Move decl to just before use.
2553 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
2554 not the (never otherwised-used) CHARACTER.
2555
93724f13
AD
25562002-11-07 Akim Demaille <akim@epita.fr>
2557
2558 Let yyerror always receive the msg as last argument, so that
2559 yyerror can be variadic.
2560
2561 * data/yacc.c (b4_yyerror_args): New.
2562 Use it when calling yyerror.
2563 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
2564 Use it when calling yyerror.
2565 * doc/bison.texinfo (Error Reporting): Adjust.
2566 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
2567 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
2568
6e40b4eb
AD
25692002-11-06 Akim Demaille <akim@epita.fr>
2570
2571 #line should have quoted strings.
2572 Ideally, this should be done by m4_quotearg.
2573
2574 * src/scan-skel.l: Include quotearg.h.
2575 Quote __ofile__.
2576 * src/output.c (symbol_printers_output)
2577 (symbol_destructors_output): Quote the file name.
2578
2dfbfc12
AD
25792002-11-06 Akim Demaille <akim@epita.fr>
2580
2581 * tests/regression.at (Invalid inputs): Adjust to the recent
2582 messages.
2583
437c2d80
AD
25842002-11-06 Akim Demaille <akim@epita.fr>
2585
2586 Restore --no-lines.
2587 Reported by Jim Kent.
2588
2589 * data/c.m4 (b4_syncline): New.
2590 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
2591 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
2592 * src/output.c (user_actions_output): Likewise.
2593 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 2594 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 2595
900c5db5
AD
25962002-11-06 Akim Demaille <akim@epita.fr>
2597
2598 * src/main.c (main): Free `infile'.
2599 * src/scan-gram.l (handle_syncline): New.
2600 Recognize `#line'.
2601 * src/output.c (user_actions_output, symbol_destructors_output)
2602 (symbol_printers_output): Use the location's file name, not
2603 infile.
2604 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2605
e183b123 26062002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 2607
e183b123 2608 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 2609 either has GLR conflict entries.
e183b123 2610
193eb6b7
PE
26112002-11-05 Paul Eggert <eggert@twinsun.com>
2612
e183b123
PE
2613 * src/scan-gram.l: Use more accurate diagnostics, e.g.
2614 "integer out of range" rather than "invalid value".
2615 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
2616 accordingly.
2617
193eb6b7
PE
2618 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
2619 Also, remove one static variable in the scanner.
2620
2621 * src/scan-gram.l (braces_level): Now auto, not static.
2622 Initialize to zero if the compiler is being picky.
2623 (INITIAL): Clear braces_level instead of incrementing it.
2624 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
2625 as POSIX 1003.1-2001 requires.
2626 * src/system.h (IF_LINT): New macro, taken from coreutils.
2627 * configure.ac: Define "lint" if --enable-gcc-warnings.
2628
29c01725
AD
26292002-11-05 Akim Demaille <akim@epita.fr>
2630
2631 * src/scan-gram.l: When it starts with `%', complain about the
2632 whole directive, not just that `invalid character: %'.
2633
8aeac3ca
AD
26342002-11-04 Akim Demaille <akim@epita.fr>
2635
2636 * Makefile.maint: Update from Autoconf.
2637 (update, cvs-update, po-update, do-po-update): New.
2638
793a58bb
AD
26392002-11-04 Akim Demaille <akim@epita.fr>
2640
2641 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
2642 and yyerror.
2643 Have yyerror `use' its arguments.
2644 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
2645 returns true when location & yacc & pure & parse-param.
2646 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
2647
c4d720cd
AD
26482002-11-04 Akim Demaille <akim@epita.fr>
2649
2650 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
2651 clashes.
2652 * src/scan-gram.l: Use [\'] instead of ['] to pacify
2653 font-lock-mode.
2654 Use complain_at.
2655 Use quote, not quote_n since LOCATION_PRINT no longer uses the
2656 slot 0.
2657
613a0dc5
PE
26582002-11-03 Paul Eggert <eggert@twinsun.com>
2659
2660 * src/reader.c (get_merge_function, grammar_current_rule_check):
2661 Use consistent diagnostics for reporting type name clashes.
2662 Quote the types with <>, for consistency with Yacc.
2663 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
2664
2a8d363a
AD
26652002-11-03 Akim Demaille <akim@epita.fr>
2666
2667 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
2668 New.
2669 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
2670 (b4_parse_param): Remove.
2671 Use b4_identification.
2672 Propagate b4_pure_args where needed to pass them to yyerror.
2673 * data/glr.m4 (b4_parse_param): Remove.
2674 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
2675 (b4_lpure_formals): New.
2676 Use b4_identification.
2677 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
2678 b4_user_formals and b4_user_args.
2679 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
2680 (yyreportAmbiguity): When using a pure parser, also need
2681 the location, and the parse-params.
2682 Adjust callers.
2683 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
2684 When using a pure parser, also need the parse-params.
2685 Adjust callers.
2686 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
2687 (%pure-parser + %parse-param) LALR and GLR parsers.
2688 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
2689 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
2690 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
2691 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
2692 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
2693 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
2694 * doc/bison.texinfo: Untabify the whole file.
2695 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
2696 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
2697 (Error Reporting): Adjust to these new directives.
2698 Document %error-verbose, deprecate YYERROR_VERBOSE.
2699
9e32add8
AD
27002002-11-03 Akim Demaille <akim@epita.fr>
2701
2702 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
2703 AT_CHECK_CALC_GLR invocations to use % directives, instead of
2704 command line options.
2705 * tests/cxx-type.at: Formatting changes.
2706
b02d90a5
PE
27072002-11-03 Paul Eggert <eggert@twinsun.com>
2708
2709 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
2710 to count columns correctly, and to check for invalid inputs.
9e32add8 2711
b02d90a5
PE
2712 Use mbsnwidth to count columns correctly. Account for tabs, too.
2713 Include mbswidth.h.
2714 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
2715 (extend_location): New function.
2716 (YY_LINES): Remove.
2717
2718 Handle CRLF in C code rather than in Lex code.
2719 (YY_INPUT): New macro.
2720 (no_cr_read): New function.
2721
2722 Scan UCNs, even though we don't fully handle them yet.
2723 (convert_ucn_to_byte): New function.
2724
2725 Handle backslash-newline correctly in C code.
2726 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
2727 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
2728 all uses changed.
2729 (tag, splice): New EREs. Do not allow NUL or newline in tags.
2730 Use {splice} wherever C allows backslash-newline.
2731 YY_STEP after space, newline, vertical-tab.
2732 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 2733
b02d90a5
PE
2734 (letter, id): Don't assume ASCII; e.g., spell out a-z.
2735
2736 ({int}, handle_action_dollar, handle_action_at): Check for integer
2737 overflow.
9e32add8 2738
b02d90a5
PE
2739 (YY_STEP): Omit trailing semicolon, so that it's more like C.
2740
2741 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
2742 as well as \000. Check for UCHAR_MAX, not 255.
2743 Allow \x with an arbitrary positive number of digits, as in C.
2744 Check for overflow here.
2745 Allow \? and UCNs, for compatibility with C.
2746
2747 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
2748 with quote slot used by complain_at.
2749
2750 * tests/input.at: Add tests for backslash-newline, m4 quotes
2751 in symbols, long literals, and funny escapes in strings.
2752
2753 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
2754 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
2755 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
2756 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
2757 * m4/mbswidth.m4: New file, from GNU coreutils.
2758
2759 * doc/bison.texinfo (Grammar Outline): Document // comments.
2760 (Symbols): Document that trigraphs have no special meaning in Bison,
2761 nor is backslash-newline allowed.
2762 (Actions): Document that trigraphs have no special meaning.
2763
2764 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
2765 no longer used.
2766
27672002-11-02 Paul Eggert <eggert@twinsun.com>
2768
2769 * src/reader.c: Don't include quote.h; not needed.
2770 (get_merge_function): Reword warning to be consistent with
2771 type clash diagnostic in grammar_current_rule_check.
2772
2773 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
2774 bug in trigraph handling.
2775
2776 * src/output.c (prepare_symbols): When printing token names,
2777 escape "[" as "@<:@" and likewise for "]".
2778
2779 * src/system.h (errno): Remove declaration, as we are now
2780 assuming C89 or better, and C89 guarantees errno.
2781
762b212b
PE
27822002-10-30 Paul Eggert <eggert@twinsun.com>
2783
2784 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
2785 Check for close failures.
2786 * src/files.h (xfclose): Return void, not int, since it always
2787 returned zero.
2788 * src/files.c (xfclose): Likewise. Report I/O error if ferror
2789 indicates one.
2790 * src/output.c (output_skeleton): Use xfclose rather than fclose
2791 and ferror. xfclose now checks ferror.
2792
2793 * data/glr.c (YYLEFTMOST_STATE): Remove.
2794 (yyreportTree): Use a stack-based leftmost state. This avoids
2795 our continuing battles with bogus warnings about initializers.
2796
56100c60
AD
27972002-10-30 Akim Demaille <akim@epita.fr>
2798
2799 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
2800 #if.
2801
51b4a04c
PH
28022002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2803
2804 * tests/glr-regr1.at: New test for reported regressions.
2805 * tests/testsuite.at: Add glr-regr1.at test.
2806 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 2807
bf1ebda2
PE
28082002-10-24 Paul Eggert <eggert@twinsun.com>
2809
5c16c6b1
PE
2810 Version 1.75a.
2811
bf1ebda2
PE
2812 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
2813 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
2814 we use malloc. Don't assume 'A' through 'Z' are contiguous.
2815 Don't assume strdup exists; POSIX says its an XSI extension.
2816 Check for buffer overflow on input.
2817
b526ee61
AD
28182002-10-24 Akim Demaille <akim@epita.fr>
2819
2820 * src/output.c (output_skeleton): Don't disable M4sugar comments
2821 too soon: it results in comments being expanded.
2822 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
2823 first output.
2824
f1886bb2
AD
28252002-10-24 Akim Demaille <akim@epita.fr>
2826
2827 * data/yacc.c (m4_int_type): New.
2828 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
2829 char' as only yacc.c wants K&R portability.
2830 * data/glr.c (yysigned_char): Remove.
2831 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
2832 Reported by Quoc Peyrot.
2833
c5576256
PE
28342002-10-23 Paul Eggert <eggert@twinsun.com>
2835
2836 * src/main.c (main): With --trace=time, report times even if a
2837 non-fatal error occurs. Formerly, the times were reported in some
2838 such cases but not in others.
2839 * src/reader.c (reader): Just return if a complaint has been issued,
2840 instead of exiting, so that 'main' can report times.
2841
27b0ffea
AD
28422002-10-22 Akim Demaille <akim@epita.fr>
2843
2844 * src/system.h: Include sys/types.
2845 Reported by Bert Deknuydt.
2846
223a7883
PE
28472002-10-23 Paul Eggert <eggert@twinsun.com>
2848
2849 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
2850 Suggested by Art Haas.
2851
28522002-10-22 Paul Eggert <eggert@twinsun.com>
2853
2854 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
2855 decl; not needed any more.
2856 * src/main.c (main): Use return to exit, undoing yesterday's change.
2857 The last OS that we could find where this wouldn't work is
2858 SunOS 3.5, and that's too old to worry about now.
2859
2860 * data/glr.c (struct yyltype): Define members even when not
2861 doing locations. This is more consistent with yacc.c, and it
2862 works around the following bug reports:
e3aa65c5
PE
2863 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
2864 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 2865
223a7883
PE
2866 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
2867 @acronym consistently. Standardize on "Yacc" instead of "YACC",
2868 "Algol" instead of "ALGOL". Give a bit more history about BNF.
2869
8b76775a
AD
28702002-10-22 Akim Demaille <akim@epita.fr>
2871
2872 * data/README: New.
2873
6db10d14
PE
28742002-10-21 Paul Eggert <eggert@twinsun.com>
2875
2876 Be consistent about 'bool'; the old code used an enum in one
2877 module and an int in another, and this violates the C standard.
2878 * m4/stdbool.m4: New file, from coreutils 4.5.3.
2879 * configure.ac (AC_HEADER_STDBOOL): Add.
2880 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
2881 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
2882 * src/symtab.c (hash_compare_symbol_t): Likewise.
2883 * src/system.h (bool, false, true): Use a definition consistent
2884 with ../lib/hash.c. All uses changed.
2885
2886 * src/complain.c (warning_issued): Renamed from warn_message_count,
2887 so that we needn't worry about integer overflow (!).
2888 Now of type bool. All uses changed.
2889 (complaint_issued): Renamed from complain_message_count; likewise.
2890
2891 * src/main.c (main): Use exit to exit with failure.
27b0ffea 2892
6db10d14
PE
2893 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
2894 rather than 1 and 0.
2895 * src/main.c (main): Likewise.
2896 * src/getargs.c (getargs): Likewise.
2897 * src/reader.c (reader): Likewise.
2898
2899 * src/getarg.c (getargs): Remove duplicate code for
2900 "Try `bison --help'".
2901
2902 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
2903 What was that "2" for?
2904
2905 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2906 * src/getargs.c (usage): Likewise.
2907
2908 * src/getargs.c (getargs): When there are too few operands, report
2909 the last one. When there are too many, report the first extra
2910 one. This is how diffutils does it.
2911
92a060fd
PE
29122002-10-20 Paul Eggert <eggert@twinsun.com>
2913
2914 Remove K&R vestiges.
2915 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2916 * src/complain.c (VA_START): Remove. Assume prototypes.
2917 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2918 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2919 fatal): Assume prototypes.
2920 * src/complain.h: Assume prototypes.
2921 * src/system.h (PARAMS): Remove.
2922 Include <limits.h> unconditionally, since it's guaranteeed even
2923 for a freestanding C89 compiler.
2924 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2925 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 2926
e7cb57c0
AD
29272002-10-20 Akim Demaille <akim@epita.fr>
2928
2929 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2930 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2931 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2932 (yyresolveStates, yyresolveAction, yyresolveStack)
2933 (yyprocessOneStack): Use them.
2934 (yy_reduce_print): New.
2935 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2936
0245f82d
AD
29372002-10-20 Akim Demaille <akim@epita.fr>
2938
2939 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2940 arguments and output `void'.
2941 (b4_c_function): Rename as...
2942 (b4_c_function_def): this.
2943 (b4_c_function_decl, b4_c_ansi_function_def)
2944 (b4_c_ansi_function_decl): New.
2945 Change the interpretation of the arguments: before `int, foo', now
2946 `int foo, foo'.
2947 * data/yacc.c (yyparse): Prototype and define thanks to these.
2948 Adjust b4_c_function_def uses.
2949 * data/glr.c (yyparse): Likewise, but ANSI only.
2950
39912f52
AD
29512002-10-20 Akim Demaille <akim@epita.fr>
2952
2953 * src/output.c (prepare): Move the definition of `tokens_number',
2954 `nterms_number', `undef_token_number', `user_token_number_max'
2955 to...
2956 (prepare_tokens): Here.
2957 (prepare_tokens): Rename as...
2958 (prepare_symbols): this.
2959 (prepare): Move the definition of `rules_number' to...
2960 (prepare_rules): here.
2961 (prepare): Move the definition of `last', `final_state_number',
2962 `states_number' to...
2963 (prepare_states): here.
2964 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2965
20c1e2ad
AD
29662002-10-20 Akim Demaille <akim@epita.fr>
2967
2968 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2969
21964f43
AD
29702002-10-20 Akim Demaille <akim@epita.fr>
2971
2972 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2973 * data/c.m4: here.
2974
66d30cd4
AD
29752002-10-20 Akim Demaille <akim@epita.fr>
2976
2977 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2978 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2979 `pair'.
2980 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2981 `name' to...
2982 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2983 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2984 These.
2985
95f2c9fe
PE
29862002-10-19 Paul Eggert <eggert@twinsun.com>
2987
2988 Do not create a temporary file, as that involves security and
2989 cleanup headaches. Instead, use a pair of pipes.
2990 Derived from a suggestion by Florian Krohm.
2991 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2992 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2993 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2994 (BISON_PREREQ_SUBPIPE): Add.
2995 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2996 Add subpipe.h, subpipe.c.
2997 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2998 * po/POTFILES.in: Add lib/subpipe.c.
2999 * src/output.c: Include "subpipe.h".
3000 (m4_invoke): Remove decl.
3001 (scan_skel): New decl.
3002 (output_skeleton): Use pipe rather than temporary file for m4 input.
3003 Check that m4sugar.m4 is readable, to avoid deadlock.
3004 Check for pipe I/O error.
3005 * src/scan-skel.l (readpipe): Remove decl.
3006 (scan_skel): New function, to be used in place of m4_invoke.
3007 Read from stream rather than file.
66d30cd4 3008
95f2c9fe
PE
3009 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
3010 float, as this generates a warning on Solaris 8 + GCC 3.2 with
3011 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
3012 this generates a more-accurate value anyway.
3013
3014 * lib/timevar.c (timervar_accumulate): Rename locals to
3015 avoid confusion with similarly-named more-global.
3016 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
3017
3018 * src/output.c (prepare): Use xstrdup to convert char const *
3019 to char *, to avoid GCC warning.
3020
c19988b7
AD
30212002-10-19 Akim Demaille <akim@epita.fr>
3022
3023 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
3024 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
3025 Use them to have `calc.y' ready for %pure-parser.
3026 * data/yacc.c (YYLEX): Pass a yylex return type to
3027 b4_c_function_call.
3028
ae7453f2
AD
30292002-10-19 Akim Demaille <akim@epita.fr>
3030
3031 Prototype support of %lex-param and %parse-param.
3032
3033 * src/parse-gram.y: Add the definition of the %lex-param and
3034 %parse-param tokens, plus their rules.
3035 Drop the `_' version of %glr-parser.
3036 Add the "," token.
3037 * src/scan-gram.l (INITIAL): Scan them.
3038 * src/muscle_tab.c: Comment changes.
3039 (muscle_insert, muscle_find): Rename `pair' as `probe'.
3040 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
3041 (muscle_entry_s): The `value' member is no longer const.
3042 Adjust all dependencies.
3043 * src/muscle_tab.c (muscle_init): Adjust: use
3044 MUSCLE_INSERT_STRING.
3045 Initialize the obstack earlier.
3046 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
3047 (muscle_pair_list_grow): New.
3048 * data/c.m4 (b4_c_function_call, b4_c_args): New.
3049 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
3050 * tests/calc.at: Use %locations, not --locations.
3051 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
3052
0e575721
AD
30532002-10-19 Akim Demaille <akim@epita.fr>
3054
3055 * src/getargs.c (usage): Take status as argument and exit
3056 accordingly.
3057 Report the traditional `Try ... --help' message when status != 0.
3058 (usage, version): Don't take a FILE * as arg, it is pointless.
3059 (getargs): When there is an incorrect number of arguments, make it
3060 an error, and report it GNUlically thanks to `usage ()'.
3061
724ce7f5
PE
30622002-10-18 Paul Eggert <eggert@twinsun.com>
3063
3a781eb2
PE
3064 * data/glr.c (yyreportParseError): Don't assume that sprintf
3065 yields the length of the printed string, as this is not true
3066 on SunOS 4.1.4. Reported by Peter Klein.
3067
724ce7f5
PE
3068 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
3069 * tests/conflicts.at (%nonassoc and eof): Likewise.
3070 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
3071
473d0a75
AD
30722002-10-17 Akim Demaille <akim@epita.fr>
3073
3074 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
3075 * src/getargs.c (trace_types, trace_args): Adjust.
3076 * src/reader.c (grammar_current_rule_prec_set)
3077 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
3078 Standardize error messages.
3079 And s/@prec/%prec/!
3080 (reader): Use trace_flag to enable scanner/parser debugging,
3081 instead of an adhoc scheme.
3082 * src/scan-gram.l: Remove trailing debugging code.
3083
e76d2469
PE
30842002-10-16 Paul Eggert <eggert@twinsun.com>
3085
93e2236a
PE
3086 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
3087 MUSCLE_TAB_H.
3088
e76d2469
PE
3089 * NEWS: Officially drop support for building Bison with K&R C,
3090 since it didn't work anyway and it's not worth worrying about.
3091 * Makefile.maint (wget_files): Remove ansi2knr.c.
3092 (ansi2knr.c-url_prefix): Remove.
3093 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
3094 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3095 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3096
5bd1c419
PE
30972002-10-15 Paul Eggert <eggert@twinsun.com>
3098
3099 Stop using the "enum_" trick for K&R-style function definitions;
3100 it confused me, and I was the author! Instead, assume that people
3101 who want to use K&R C compilers (when using these modules in GCC,
3102 perhaps?) will run ansi2knr.
3103
3104 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
3105 All uses of "enum_" changed to "enum ".
3106 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3107 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 3108
5bd1c419
PE
3109 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
3110 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
3111 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
3112 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
3113 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
3114 abitset_not, abitset_ones, abitset_or, abitset_or_and,
3115 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
3116 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
3117 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
3118 Use function prototypes; this removes the need for declaring
3119 static functions simply to provide their prototypes.
3120 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
3121 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
3122 bitset_count_, bitset_create, bitset_dump, bitset_first,
3123 bitset_free, bitset_init, bitset_last, bitset_next,
3124 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
3125 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
3126 bitset_print, bitset_release_memory, bitset_toggle_,
3127 bitset_type_choose, bitset_type_get, bitset_type_name_get,
3128 debug_bitset): Likewise.
3129 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
3130 * lib/bitset_stats.c (bitset_log_histogram_print,
3131 bitset_percent_histogram_print, bitset_stats_and,
3132 bitset_stats_and_cmp, bitset_stats_and_or,
3133 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
3134 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
3135 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
3136 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
3137 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
3138 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
3139 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
3140 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
3141 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
3142 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
3143 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
3144 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
3145 bitset_stats_zero): Likewise.
3146 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3147 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3148 bitsetv_dump, debug_bitsetv): Likewise.
3149 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
3150 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
3151 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
3152 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
3153 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
3154 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
3155 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
3156 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
3157 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
3158 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
3159 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
3160 Likewise.
3161 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
3162 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
3163 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
3164 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
3165 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
3166 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
3167 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
3168 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
3169 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
3170 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
3171 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 3172
ae26e1f0
AD
31732002-10-14 Akim Demaille <akim@epita.fr>
3174
3175 Version 1.75.
3176
d43baf71
AD
31772002-10-14 Akim Demaille <akim@epita.fr>
3178
3179 * tests/Makefile.am (maintainer-check-posix): New.
3180
7ebc83e3
AD
31812002-10-14 Akim Demaille <akim@epita.fr>
3182
3183 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
3184 member.
3185
05846dae
AD
31862002-10-14 Akim Demaille <akim@epita.fr>
3187
3188 * src/tables.c (table_ninf_remap): base -> tab.
3189 Reported by Matt Rosing.
3190
1318e37d
PE
31912002-10-14 Paul Eggert <eggert@twinsun.com>
3192
447fbb17
PE
3193 * tests/action.at, tests/calc.at, tests/conflicts.at,
3194 tests/cxx-type.at, tests/headers.at, tests/input.at,
3195 tests/regression.at, tests/synclines.at, tests/torture.at:
3196 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
3197 so that the tests still work even if POSIXLY_CORRECT is set.
3198 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 3199
1318e37d
PE
3200 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
3201 for portability to K&R hosts. Fix typo: signed char is guaranteed
3202 only to 127, not to 128.
3203 * data/glr.c (yysigned_char): New type.
3204 * data/yacc.c (yysigned_char): Likewise.
3205 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
3206
cc0f0794
PE
32072002-10-13 Paul Eggert <eggert@twinsun.com>
3208
5038f418
PE
3209 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
3210 true due to limited range of data type" warning from GCC.
3211
cc0f0794
PE
3212 * data/c.m4 (b4_token_defines): Protect against double-inclusion
3213 by wrapping enum yytokentype's definition inside #ifndef
3214 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
3215
6fed0802
AD
32162002-10-13 Akim Demaille <akim@epita.fr>
3217
3218 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
3219 Un yy- yyrhs to avoid the name clash with the global YYRHS.
3220
32f0598d
AD
32212002-10-13 Akim Demaille <akim@epita.fr>
3222
3223 * Makefile.maint: Update from Autoconf 2.54.
3224 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
3225
7ea9a33f
AD
32262002-10-13 Akim Demaille <akim@epita.fr>
3227
3228 * src/print.c (print_state): Separate the list of solved conflicts
3229 from the other items.
3230 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
3231
ea99527d
AD
32322002-10-13 Akim Demaille <akim@epita.fr>
3233
3234 Let nondeterministic skeletons be usable with deterministic
3235 tables.
3236
3237 With the patch, GAWK compiled by GCC without -O2 passes its test
3238 suite using a GLR parser driven by LALR tables. It fails with -O2
3239 because `struct stat' gives two different answers on my machine:
3240 88 (definition of an auto var) and later 96 (memset on this var).
3241 Hence the stack is badly corrumpted. The headers inclusion is to
3242 blame: if I move the awk.h inclusion before GLR's system header
3243 inclusion, the two struct stat have the same size.
3244
3245 * src/tables.c (pack_table): Always create conflict_table.
3246 (token_actions): Always create conflict_list.
3247 * data/glr.c (YYFLAG): Remove, unused.
3248
f377f69f
AD
32492002-10-13 Akim Demaille <akim@epita.fr>
3250
3251 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
3252 (O0FLAGS): New.
3253 (VALGRIND, GXX): New.
3254 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
3255 * tests/bison.in: Run $PREBISON a pre-command.
3256 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
3257 (maintainer-check-g++): New.
3258 * Makefile.am (maintainer-check): New.
3259
2a1fe6ed
AD
32602002-10-13 Akim Demaille <akim@epita.fr>
3261
3262 * data/glr.c: Formatting changes.
3263 Tweak some trace messages to match yacc.c's.
3264
f50adbbd
AD
32652002-10-13 Akim Demaille <akim@epita.fr>
3266
3267 GLR parsers sometimes raise parse errors instead of performing the
3268 default reduction.
3269 Reported by Charles-Henry de Boysson.
3270
3271 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
3272 check the length of the traces when %glr.
3273 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
3274 GLR's traces.
3275 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
3276 Test GLR parsers.
3277 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
3278 (yyltype): Remove the yy prefix from the member names.
3279 (yytable): Complete its comment.
3280 (yygetLRActions): Map error action number from YYTABLE from
3281 YYTABLE_NINF to 0.
3282 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
3283 (which was a bug: it should have been YYTABEL_NINF, and yet it was
3284 not satisfying as we could compare an YYACTION computed from
3285 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
3286 only value for error actions.
3287 (yyreportParseError): In verbose parse error messages, don't issue
3288 `error' in the list of expected tokens.
3289 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
3290 next action to perform to match glr.c's decoding.
3291 (yytable): Complete its comment.
3292
bcbad5b9
PE
32932002-10-13 Paul Eggert <eggert@twinsun.com>
3294
3295 Fix problem reported by Henrik Grubbstroem in
e3aa65c5 3296 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
3297 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
3298 because the Bison parser reads the second action before reducing
3299 the first one.
3300 * src/scan-gram.l (rule_length): New static var.
3301 Use it to keep track of the rule length in the scanner, since
3302 we can't expect the parser to be in lock-step sync with the scanner.
3303 (handle_action_dollar, handle_action_at): Use this var.
3304 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 3305
14904b89
PE
33062002-10-12 Paul Eggert <eggert@twinsun.com>
3307
1fe611e5
PE
3308 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
3309 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
3310 Include <sys/time.h> when checking for clock_t and struct tms.
3311 Use same include order as source.
3312 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
e3aa65c5 3313 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 3314
1fe611e5
PE
3315 * lib/timevar.c: Update copyright date and clarify comments.
3316 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 3317
1fe611e5
PE
3318 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
3319 GCC version as of today, then merge Bison's changes.
3320 Change "GCC" to "Bison" in copyright notice. timevar.def's
3321 author is Akim, so change that too.
3322
98194095
PE
3323 * src/reader.c (grammar_current_rule_check):
3324 Don't worry about the default action if $$ is untyped.
3325 Prevents bogus warnings reported by Jim Gifford in
e3aa65c5 3326 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 3327
14904b89
PE
3328 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
3329 * data/glr.c, data/lalr1.cc, data/yacc.c:
3330 Output token definitions before the first part of user declarations.
3331 Fixes compatibility problem reported by Jim Gifford for kbd in
e3aa65c5 3332 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 3333
ff6dca18
PE
33342002-10-11 Paul Eggert <eggert@twinsun.com>
3335
3336 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
3337 (yyparse): here. This undoes some of the 2002-07-25 change.
3338 Compatibility problem reported by Ralf S. Engelschall with
3339 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
3340
eb714592
AD
33412002-10-11 Akim Demaille <akim@epita.fr>
3342
3343 * tests/regression.at Characters Escapes): New.
3344 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
3345 characters.
3346 Reported by Jan Nieuwenhuizen.
3347
b7195100
AD
33482002-10-11 Akim Demaille <akim@epita.fr>
3349
3350 * po/id.po: New.
3351
f28a0f2d
PE
33522002-10-10 Paul Eggert <eggert@twinsun.com>
3353
3354 Portability fixes for bitsets; this also avoids several GCC
3355 warnings.
3356
3357 * lib/abitset.c: Include <stddef.h>, for offsetof.
3358 * lib/lbitset.c: Likewise.
3359
3360 * lib/abitset.c (abitset_bytes): Return a size that is aligned
3361 properly for vectors of objects. Do not assume that adding a
3362 header size to a multiple of a word size yields a value that is
3363 properly aligned for the whole union.
3364 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3365
3366 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3367 unique names for structures.
3368 * lib/ebitset.c (ebitset_bytes): Likewise.
3369 * lib/lbitset.c (lbitset_bytes): Likewise.
3370
3371 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3372 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3373 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3374 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3375 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3376 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3377 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3378 to improve the type-checking that GCC can do.
3379 * lib/bitset.c (bitset_op4_cmp): Likewise.
3380 * lib/bitset_stats.c (bitset_stats_count,
3381 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3382 bitset_stats_copy, bitset_stats_disjoint_p,
3383 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3384 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3385 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3386 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3387 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3388 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3389 bitset_stats_or_and_cmp): Likewise.
3390 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3391 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3392 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3393 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3394
3395 * lib/abitset.h: Include bitset.h, not bbitset.h.
3396 * lib/ebitset.h: Likewise.
3397 * lib/lbitset.h: Likewise.
3398
3399 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3400 All instances of parameters of type enum bitset_opts are now of
3401 type enum_bitset_opts, to conform to the C Standard, and similarly
3402 for enum_bitset_type.
3403 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3404 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3405
3406 Do not use "struct bitset_struct" to mean different things in
3407 different modules. Not only is this confusing, it violates
3408 the C Standard, which requires that structure types in different
3409 modules must be compatible if one is to be passed to the other.
3410 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3411 All instances of "struct bitset_struct *" replaced with "bitset".
3412 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3413 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3414 struct lbitset_struct, struct bitset_stats_struct): New types.
3415 All uses of struct bitset_struct changed to union bitset_union,
3416 etc.
3417 * lib/abitset.c (struct abitset_struct, abitset,
3418 struct bitset_struct): Remove.
3419 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3420 struct bitset_struct): Remove.
3421 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3422 bitset_struct): Remove.
3423 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3424 Likewise.
3425
3426 Do not call a function of type T using a call that assumes the
3427 function is of a different type U. Standard C requires that a
3428 function must be called with a type that is compatible with its
3429 definition.
3430 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3431 New decls.
3432 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3433 New functions.
3434 * lib/ebitset.c (PFV): Remove.
3435 * lib/lbitset.c (PFV): Likewise.
3436 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3437 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3438 decls.
3439 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3440 (ebitset_vtable): Use them.
3441 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3442 lbitset_xor): New functions.
3443 (lbitset_vtable): Use them.
3444
3445 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3446 Declare.
3447
3448 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3449 GCC warning.
3450 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
3451 Use offsetof, for simplicity.
3452
6fbe4984
PE
34532002-10-06 Paul Eggert <eggert@twinsun.com>
3454
3455 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
3456 the same width as int. This reapplies a hunk of the 2002-08-12 patch
e3aa65c5 3457 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
3458 which was inadvertently undone by the 2002-09-30 patch.
3459 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
3460 the same width as int.
3461
420f93c8
PE
34622002-10-04 Paul Eggert <eggert@twinsun.com>
3463
3464 Version 1.50.
3465
3466 * configure.ac (AC_INIT), NEWS: Increment version number.
3467
3468 * doc/bison.texinfo: Minor spelling, grammar, and white space
3469 fixes.
3470 (Symbols): Mention that any negative value returned from yylex
3471 signifies end-of-input. Warn about negative chars. Mention
3472 the portable Standard C character set.
3473
3474 The GNU coding standard says CFLAGS and YFLAGS are reserved
3475 for the installer to set.
3476 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
3477 * src/Makefile.am (AM_CFLAGS): Likewise.
3478 (AM_YFLAGS): Renamed from YFLAGS.
3479
3480 Fix some MAX and MIN problems.
3481 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
3482 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
3483 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
3484 * src/reader.c (reader): Use it.
3485
3486 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
3487 POSIX 1003.1-2001 has removed fgrep.
3488
34892002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3490
3491 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
3492 interpreted as signed.
3493 * lib/ebitset.c (ebitset_list): Fix bug.
3494
ff68026d
PE
34952002-10-01 Paul Eggert <eggert@twinsun.com>
3496
3497 More fixes for 64-bit hosts and large bitsets.
3498
3499 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
3500 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
3501 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
3502 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
3503 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
3504 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
3505 bitset_count_): Likewise.
3506 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
3507 bitset_first, bitset_last): Likewise.
3508 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
3509 bitset_stats_list_reverse, bitset_stats_size,
3510 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
3511 Likewise.
3512 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3513 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3514 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3515 bitsetv_reflexive_transitive_closure): Likewise.
3516 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
3517 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
3518 Likewise.
3519 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
3520 Likewise.
420f93c8 3521
ff68026d
PE
3522 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
3523 Use size_t, not unsigned int, to count bytes.
3524 * lib/abitset.h (abitset_bytes): Likewise.
3525 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
3526 Likewise.
3527 * lib/bitset.h (bitset_bytes): Likewise.
3528 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
3529 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
3530 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3531 * lib/ebitset.c (ebitset_bytes): Likewise.
3532 * lib/ebitset.h (ebitset_bytes): Likewise.
3533 * lib/lbitset.c (lbitset_bytes): Likewise.
3534 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 3535
ff68026d
PE
3536 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
3537 abitset_subset_p, abitset_disjoint_p, abitset_and,
3538 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
3539 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
3540 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
3541 abitset_or_and, abitset_or_and_cmp):
3542 Use bitset_windex instead of unsigned int.
3543 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3544 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
3545 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
3546 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
3547 Likewise.
3548 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 3549
ff68026d
PE
3550 * lib/bitset.c (bitset_print):
3551 Use proper printf formats for widths of integer types.
3552 * lib/bitset_stats.c (bitset_percent_histogram_print,
3553 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
3554 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3555 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3556 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 3557
ff68026d
PE
3558 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
3559 BITSET_SIZE_MAX): New macros.
3560 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
3561 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
3562 to BITSET_WINDEX_MAX.
3563
3564 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
3565 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
3566 since we now return the bitset_bindex type (not int).
3567
3568 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
3569 when computing sizes.
3570 * lib/ebitset.c (ebitset_elts_grow): Likewise.
3571
3572 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
3573 and avoid cast to unsigned.
3574
6aa452a6
AD
35752002-09-30 Akim Demaille <akim@epita.fr>
3576
3577 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3578 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
3579 Updates from Michael Hayes.
3580
927f7817
AD
35812002-09-30 Art Haas <ahaas@neosoft.com>
3582
3583 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
3584 invocations.
3585 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
3586 defined.
3587
9738f41e
AD
35882002-09-27 Akim Demaille <akim@epita.fr>
3589
3590 Version 1.49c.
3591
a5c75d7f
AD
35922002-09-27 Akim Demaille <akim@epita.fr>
3593
3594 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
3595 (Because of AC_LIBSOURCE).
3596
8280e179
AD
35972002-09-27 Akim Demaille <akim@epita.fr>
3598
3599 Playing with Autoscan.
3600
3601 * configure.ac: Remove the old LIBOBJ tweaks.
3602 (AC_REPLACE_FUNCS): Add strrchr and strtol.
3603 * lib/strrchr.c: New.
3604 * lib/strtol.c: New, from the Coreutils 4.5.1.
3605
ae64af35
AD
36062002-09-27 Akim Demaille <akim@epita.fr>
3607
3608 Playing with Autoscan.
3609
3610 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
3611 * lib/Makefile.am (libbison_a_SOURCES): No longer include
3612 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
3613 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
3614 Coreutils 4.5.1.
3615
d1a1114f
AD
36162002-09-24 Akim Demaille <akim@epita.fr>
3617
3618 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
3619 (Frequently Asked Questions, Parser Stack Overflow): New.
3620
b906441c
AD
36212002-09-13 Akim Demaille <akim@epita.fr>
3622
3623 Playing with autoscan.
3624
3625 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
3626 * src/files.c (skeleton_find): Remove, unused.
3627 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
3628 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
3629
bd701811
AD
36302002-09-13 Akim Demaille <akim@epita.fr>
3631
3632 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
3633 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
3634
e0a13e7b
AD
36352002-09-13 Akim Demaille <akim@epita.fr>
3636
3637 * configure.ac: Require 2.54.
3638 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
3639 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
3640 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
3641 Remove, provided by Autoconf macros.
3642
c97011bf
AD
36432002-09-12 Akim Demaille <akim@epita.fr>
3644
3645 * m4/prereq.m4: Update, from Coreutils 4.5.1.
3646
d862b1be
AD
36472002-09-12 Akim Demaille <akim@epita.fr>
3648
3649 * m4/prereq.m4: Update, from Fileutils 4.1.5.
3650 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
3651 Reported by Martin Mokrejs.
3652
3d38c03a
AD
36532002-09-10 Akim Demaille <akim@epita.fr>
3654
3655 * src/parse-gram.y: Associate a human readable string to each
3656 token type.
3657 * tests/regression.at (Invalid inputs): Adjust.
3658
b6347355
AD
36592002-09-10 Gary V. Vaughan <gary@gnu.org>
3660
3661 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
3662 with an Autoconf-2.5x style configure.ac.
3663
09ba4ab2
PE
36642002-09-06 Paul Eggert <eggert@twinsun.com>
3665
3666 * doc/bison.texinfo (Conditions): Make explicit that the GPL
3667 exception applies only to yacc.c. This is a modification of a
3668 patch originally suggested by Akim Demaille.
3669
21846f69
AD
36702002-09-06 Akim Demaille <akim@epita.fr>
3671
09ba4ab2
PE
3672 * data/c.m4 (b4_copyright): Move the GPL exception comment from
3673 here to...
3674 * data/yacc.c: here.
3675
21846f69
AD
3676 * data/lalr1.cc (struct yyltype): Don't define it, since we use
3677 LocationType.
3678 (b4_ltype): Default to yy::Location from location.hh.
3679
c0ad8bf3
AD
36802002-09-04 Jim Meyering <jim@meyering.net>
3681
3682 * data/yacc.c: Guard the declaration of yytoknum also with
3683 `#ifdef YYPRINT', so it is declared only when used.
3684
3a93251e
AD
36852002-09-04 Akim Demaille <akim@epita.fr>
3686
3687 * configure.in: Rename as...
3688 * configure.ac: this.
3689 Bump to 1.49c.
3690
427c0dda
AD
36912002-09-04 Akim Demaille <akim@epita.fr>
3692
3693 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
3694 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
3695 translate maintainer only messages.
3696
6a254321
PE
36972002-08-12 Paul Eggert <eggert@twinsun.com>
3698
645e30d1
PE
3699 Version 1.49b.
3700
6a254321
PE
3701 * Makefile.am (SUBDIRS): Remove intl.
3702 (DISTCLEANFILES): Remove.
3703 * NEWS: Mention that GNU M4 is now required. Clarify what is
3704 meant by "larger grammars". Mention the pt_BR translation.
3705 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
3706 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
3707 Bump version from 0.11.2 to 0.11.5.
3708 (BISON_PREREQ_STAGE): Remove.
3709 (AM_GNU_GETTEXT): Use external gettext.
3710 (AC_OUTPUT): Remove intl/Makefile.
3711
3712 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
3713
3714 * data/glr.c: Include string.h, for strlen.
3715 (yyreportParseError): Use size_t for yysize.
3716 (yy_yypstack): No longer nested inside yypstates, as nested
3717 functions are not portable. Do not assume size_t is the
3718 same width as int.
3719 (yypstates): Do not assume that ptrdiff_t is the same width
3720 as int, and similarly for yyposn and YYINDEX.
3721
3722 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
3723
3724 * lib/Makefile.am (INCLUDES): Do not include from the intl
3725 directory, which has been removed.
3726 * src/Makefile.am (INCLUDES): Likewise.
3727
3728 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
3729 (bitsets_sources, additional_bitsets_sources, timevars_sources):
3730 New vars.
3731
3732 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
3733 * tests/Makefile.am (EXTRA_DIST): Likewise.
3734
3735 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
3736 Do not assume that bitset_windex is the same width as unsigned.
3737
3738 * lib/abitset.c (abitset_unused_clear): Do not assume that
3739 bitset_word is the same width as int.
3740 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
3741 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
3742 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
3743 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
3744 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
3745
3746 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
3747 portability to one's complement hosts!).
3748 * lib/ebitset.c (ebitset_op1): Likewise.
3749 * lib/lbitset.c (lbitset_op1): Likewise.
3750
3751 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
3752 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3753 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
3754 Sync with fileutils.
3755 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
3756 lib/gettext.h: Sync with diffutils.
3757
3758 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
3759 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
3760
3761 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
3762 PROTOTYPES to check for prototypes, and "defined __STDC__" to
3763 check for void *.
3764
3765 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
3766 size_t; the old version tried to do this but casted improperly.
3767 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
3768 (bitset_test): Now returns int, not unsigned long.
3769
3770 * lib/bitset_stats.c: Include "gettext.h".
3771 (_): New macro.
3772 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
3773 name locals "index", as it generates unnecessary warnings on some
3774 hosts that have an "index" function.
3775
3776 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
3777 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
3778 they need translation.
3779 * src/LR0.c (state_list_append, new_itemsets, get_state,
3780 append_states, generate_states): Likewise.
3781 * src/assoc.c (assoc_to_string): Likewise.
3782 * src/closure.c (print_closure, set_firsts, closure): Likewise.
3783 * src/gram.c (grammar_dump): Likewise.
3784 * src/injections.c (injections_compute): Likewise.
3785 * src/lalr.c (lookaheads_print): Likewise.
3786 * src/relation.c (relation_transpose): Likewise.
3787 * src/scan-gram.l: Likewise.
3788 * src/tables.c (table_grow, pack_vector): Likewise.
3789
3790 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
3791 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
3792 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
3793 * m4/mbstate_t.m4: Sync with fileutils.
3794 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
3795
3796 * po/LINGUAS: Add pt_BR.
3797 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
3798 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
3799 lib/timevar.c.
3800 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
3801 manual recommends.
3802 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
3803
3804 * src/complain.c (strerror_r): Remove decl; not needed.
3805 (strerror): Use same pattern as ../lib/error.c.
3806
3807 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
3808
3809 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
3810
3811 * src/main.c (main): Cast result of bindtextdomain and textdomain
3812 to void, to avoid a GCC warning when --disable-nls is in effect.
3813
3814 * src/scan-gram.l: Use strings rather than escapes when possible,
3815 to minimize the number of warnings from xgettext.
3816 (handle_action_dollar, handle_action_at): Don't use isdigit,
3817 as it mishandles negative chars and it may not work as expected
3818 outside the C locale.
3819
3820 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
3821 this is a GCC extension and is not portable to other compilers.
3822
3823 * src/system.h (alloca): Use same pattern as ../lib/error.c.
3824 Do not include <ctype.h>; no longer needed.
3825 Do not include <malloc.h>; no longer needed (and generates
3826 warnings on OpenBSD 3.0).
3827
3828 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
3829 it's not portable.
3830
3831 * tests/regression.at: Do not use 'cc -c input.c -o input';
3832 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
3833
3834 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
3835 exit status as failure, not just exit status 1. Sun C exits
3836 with status 2 sometimes.
3837
3838 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
3839 Use it for the two large tests.
3840
c8f002c7
AD
38412002-08-02 Akim Demaille <akim@epita.fr>
3842
3843 * src/conflicts.c (conflicts_output): Don't output rules never
3844 reduced here, since anyway that computation doesn't work.
3845 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
3846 (rule_useless_p, rule_never_reduced_p): New.
3847 (grammar_rules_partial_print): Use a filter instead of a range.
3848 Display the title only if needed.
3849 (grammar_rules_print): Adjust.
3850 (grammar_rules_never_reduced_report): New.
3851 * src/tables.c (action_row): Move the computation of rules never
3852 reduced to...
3853 (token_actions): here.
3854 * src/main.c (main): Make the parser before making the report, so
3855 that rules never reduced are computed.
3856 Call grammar_rules_never_reduced_report.
3857 * src/print.c (print_results): Report rules never reduced.
3858 * tests/conflicts.at, tests/reduce.at: Adjust.
3859
cd08e51e
AD
38602002-08-01 Akim Demaille <akim@epita.fr>
3861
3862 Instead of attaching lookaheads and duplicating the rules being
3863 reduced by a state, attach the lookaheads to the reductions.
3864
3865 * src/state.h (state_t): Remove the `lookaheads',
3866 `lookaheads_rule' member.
3867 (reductions_t): Add a `lookaheads' member.
3868 Use a regular array for the `rules'.
3869 * src/state.c (reductions_new): Initialize the lookaheads member
3870 to 0.
3871 (state_rule_lookaheads_print): Adjust.
3872 * src/state.h, src/state.c (state_reductions_find): New.
3873 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
3874 (count_rr_conflicts): Adjust.
3875 * src/lalr.c (LArule): Remove.
3876 (add_lookback_edge): Adjust.
3877 (state_lookaheads_count): New.
3878 (states_lookaheads_initialize): Merge into...
3879 (initialize_LA): this.
3880 (lalr_free): Adjust.
3881 * src/main.c (main): Don't free nullable and derives too early: it
3882 is used by --verbose.
3883 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
3884
bb0027a9
AD
38852002-08-01 Akim Demaille <akim@epita.fr>
3886
3887 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
3888 `rule_number_t**'.
3889 (set_derives, free_derives): Rename as...
3890 (derives_compute, derives_free): this.
3891 Adjust all dependencies.
3892 * src/nullable.c (set_nullable, free_nullable): Rename as...
3893 (nullable_compute, nullable_free): these.
3894 (rule_list_t): Store rule_t *, not rule_number_t.
3895 * src/state.c (state_rule_lookaheads_print): Directly compare rule
3896 pointers, instead of their numbers.
3897 * src/main.c (main): Call nullable_free, and derives_free earlier,
3898 as they were lo longer used.
3899
3325ddc4
AD
39002002-08-01 Akim Demaille <akim@epita.fr>
3901
3902 * lib/timevar.c (get_time): Include children time.
3903 * src/lalr.h (LA, LArule): Don't export them: used with the
3904 state_t.
3905 * src/lalr.c (LA, LArule): Static.
3906 * src/lalr.h, src/lalr.c (lalr_free): New.
3907 * src/main.c (main): Call it.
3908 * src/tables.c (pack_vector): Check whether loc is >= to the
3909 table_size, not >.
3910 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3911 (tables_generate): do it, since that's also it which allocates
3912 them.
3913 Don't free LA and LArule, main does.
3914
c6f1a33c
AD
39152002-07-31 Akim Demaille <akim@epita.fr>
3916
3917 Separate parser tables computation and output.
3918
3919 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3920 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3921 (yydefgoto, yydefact, high): Move to...
3922 * src/tables.h, src/tables.c: here.
3923 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3924 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3925 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3926 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3927 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3928 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3929 (action_row, save_row, token_actions, save_column, default_goto)
3930 (goto_actions, sort_actions, matching_state, pack_vector)
3931 (table_ninf_remap, pack_table, prepare_actions): Move to...
3932 * src/tables.c: here.
3933 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3934 * src/output.c (token_actions, output_base, output_conflicts)
3935 (output_check): Merge into...
3936 (prepare_actions): this.
3937 (actions_output): Rename as...
3938 (user_actions_output): this.
3939 * src/main.c (main): Call tables_generate and tables_free.
3940
1509d42f
AD
39412002-07-31 Akim Demaille <akim@epita.fr>
3942
3943 Steal GCC's --time-report support.
3944
3945 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3946 stolen/adjusted from GCC.
3947 * m4/stage.m4: Remove time related checks.
3948 * m4/timevar.m4: New.
3949 * configure.in: Adjust.
3950 * src/system.h: Adjust to using timevar.h.
3951 * src/getargs.h, src/getargs.c: Support trace_time for
3952 --trace=time.
3953 * src/main.c (stage): Remove.
3954 (main): Replace `stage' invocations with timevar calls.
3955 * src/output.c: Insert pertinent timevar calls.
3956
273a74fa
AD
39572002-07-31 Akim Demaille <akim@epita.fr>
3958
3959 Let --trace have arguments.
3960
3961 * src/getargs.h (enum trace_e): New.
3962 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3963 (long_options, short_options): --trace/-T takes an optional
3964 argument.
3965 Change all the uses of trace_flag to reflect the new flags.
3966 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3967
3968 Strengthen `stage' portability.
3969
3970 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3971 * configure.in: Use it.
3972 Don't check for malloc.h and sys/times.h.
3973 * src/system.h: Include them when appropriate.
3974 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3975 times and struct tms are available.
3976
217598da
AD
39772002-07-30 Akim Demaille <akim@epita.fr>
3978
3979 In verbose parse error message, don't report `error' as an
3980 expected token.
3981 * tests/actions.at (Printers and Destructors): Adjust.
3982 * tests/calc.at (Calculator $1): Adjust.
3983 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3984 error message, do not report the parser accepts the error token in
3985 that state.
3986
52489d44
AD
39872002-07-30 Akim Demaille <akim@epita.fr>
3988
3989 Normalize conflict related messages.
3990
3991 * src/complain.h, src/complain.c (warn, complain): New.
3992 * src/conflicts.c (conflicts_print): Use them.
3993 (conflict_report_yacc): New, extracted from...
3994 (conflicts_print): here.
3995 * tests/conflicts.at, tests/existing.at: Adjust.
3996
e8832397
AD
39972002-07-30 Akim Demaille <akim@epita.fr>
3998
3999 Report rules which are never reduced by the parser: those hidden
4000 by conflicts.
4001
4002 * src/LR0.c (save_reductions): Don't make the final state too
4003 different: save its reduction (accept) instead of having a state
4004 without any action (no shift or goto, no reduce).
4005 Note: the final state is now a ``regular'' state, i.e., the
4006 parsers now contain `reduce 0' as default reduction.
4007 Nevertheless, since they decide to `accept' when yystate =
4008 final_state, they still will not reduce rule 0.
4009 * src/print.c (print_actions, print_reduction): Adjust.
4010 * src/output.c (action_row): Track reduced rules.
4011 (token_actions): Report rules never reduced.
4012 * tests/conflicts.at, tests/regression.at: Adjust.
4013
caf23d24
AD
40142002-07-30 Akim Demaille <akim@epita.fr>
4015
4016 `stage' was accidently included in a previous patch.
4017 Initiate its autoconfiscation.
4018
4019 * configure.in: Look for malloc.h and sys/times.h.
4020 * src/main.c (stage): Adjust.
4021 Report only when trace_flag.
4022
640748ee
AD
40232002-07-29 Akim Demaille <akim@epita.fr>
4024
4025 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
4026 state_number_t.
4027 (errs_t): symbol_t*, not symbol_number_t.
4028 (reductions_t): rule_t*, not rule_number_t.
4029 (FOR_EACH_SHIFT): New.
4030 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
4031 * src/print.c, src/print_graph.c: Adjust.
4032
88bce5a2
AD
40332002-07-29 Akim Demaille <akim@epita.fr>
4034
4035 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
4036
4037 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
4038 (endtoken, accept): these.
4039 * src/reader.c (reader): Set endtoken's default tag to "$end".
4040 Set undeftoken's tag to "$undefined" instead of "$undefined.".
4041 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
4042 Adjust.
4043
1bfb97db
AD
40442002-07-29 Akim Demaille <akim@epita.fr>
4045
4046 * src/reduce.c (reduce_grammar): When the language is empty,
4047 complain about the start symbol, not the axiom.
4048 Use its location.
4049 * tests/reduce.at (Empty Language): New.
4050
fc5734fe
AD
40512002-07-26 Akim Demaille <akim@epita.fr>
4052
4053 * src/reader.h, src/reader.c (gram_error): ... can't get
4054 yycontrol without making too strong assumptions on the parser
4055 itself.
4056 * src/output.c (prepare_tokens): Use the real 0th value of
4057 token_translations instead of `0'.
4058 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
4059 visible here.
4060 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
4061 for the time being: %locations ought to provide it to yyerror.
4062
3650b4b8
AD
40632002-07-25 Akim Demaille <akim@epita.fr>
4064
4065 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
4066 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
4067 * tests/regression.at (Web2c Actions): Adjust.
4068
4b3d3a8e
AD
40692002-07-25 Akim Demaille <akim@epita.fr>
4070
4071 Stop storing rules from 1 to nrules + 1.
4072
4073 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
4074 * src/nullable.c, src/output.c, src/print.c, src/reader.c
4075 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
4076 Iterate from 0 to nrules.
4077 Use rule_number_as_item_number and item_number_as_rule_number.
4078 Adjust to `derive' now containing possibly 0.
4079 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
4080 Handle the `- 1' part in rule numbers from/to item numbers.
4081 * src/conflicts.c (log_resolution): Fix the message which reversed
4082 shift and reduce.
4083 * src/output.c (action_row): Initialize default_rule to -1.
4084 (token_actions): Adjust.
4085 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
4086 expected output.
4087 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
4088
4a2a22f4
AD
40892002-07-25 Akim Demaille <akim@epita.fr>
4090
4091 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
4092 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
4093 (b4_c_knr_arg_decl): New.
4094 * data/yacc.c: Use it to define yysymprint, yydestruct, and
4095 yyreport_parse_error.
4096
b8df3223
AD
40972002-07-25 Akim Demaille <akim@epita.fr>
4098
4099 * data/yacc.c (yyreport_parse_error): New, extracted from...
4100 (yyparse): here.
4101 (yydestruct, yysymprint): Move above yyparse.
4102 Be K&R compliant.
4103
a762e609
AD
41042002-07-25 Akim Demaille <akim@epita.fr>
4105
4106 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
4107 replace...
4108 (b4_sint_type, b4_uint_type): these.
4109 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
4110 * tests/regression.at (Web2c Actions): Adjust.
4111
12b0043a
AD
41122002-07-25 Akim Demaille <akim@epita.fr>
4113
4114 * src/gram.h (TIEM_NUMBER_MAX): New.
4115 (item_number_of_rule_number, rule_number_of_item_number): Rename
4116 as...
4117 (rule_number_as_item_number, item_number_as_rule_number): these.
4118 Adjust dependencies.
4119 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4120 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4121 (symbol_number_to_vector_number): New.
4122 (order): Of vector_number_t* type.
4123 (base_t, BASE_MAX, BASE_MIN): New.
4124 (froms, tos, width, pos, check): Of base_t type.
4125 (action_number_t, ACTION_MIN, ACTION_MAX): New.
4126 (actrow): Of action_number_t type.
4127 (conflrow): Of unsigned int type.
4128 (table_ninf, base_ninf): New.
4129 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
4130 (muscle_insert_int_table, muscle_insert_base_table)
4131 (muscle_insert_rule_number_table): New.
4132 (prepare_tokens): Output `toknum' as int_table.
4133 (action_row): Returns a rule_number_t.
4134 Use ACTION_MIN, not SHRT_MIN.
4135 (token_actions): yydefact is rule_number_t*.
4136 (table_ninf_remap): New.
4137 (pack_table): Use it for `base' and `table'.
4138 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
4139 replaced with...
4140 (YYPACT_NINF, YYTABLE_NINF): these.
4141 (yypact, yytable): Compute their types instead of hard-coded
4142 `short'.
4143 * tests/regression.at (Web2c Actions): Adjust.
4144
5dde258a
AD
41452002-07-19 Akim Demaille <akim@epita.fr>
4146
4147 * src/scan-gram.l (id): Can start with an underscore.
4148
a945ec39
AD
41492002-07-16 Akim Demaille <akim@epita.fr>
4150
4151 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
4152 Adjust all former `associativity' dependencies.
4153 * src/symtab.c (symbol_new): Default associativity is `undef', not
4154 `right'.
4155 (symbol_check_alias_consistence): Adjust.
4156
fae437e8
AD
41572002-07-09 Akim Demaille <akim@epita.fr>
4158
4159 * doc/bison.texinfo: Properly set the ``header'' part.
4160 Use @dircategory ``GNU programming tools'' as per Texinfo's
4161 documentation.
4162 Use @copying.
4163
1a715ef2
AD
41642002-07-09 Akim Demaille <akim@epita.fr>
4165
4166 * lib/quotearg.h: Protect against multiple inclusions.
4167 * src/location.h (location_t): Add a `file' member.
4168 (LOCATION_RESET, LOCATION_PRINT): Adjust.
4169 * src/complain.c (warn_at, complain_at, fatal_at): Drop
4170 `error_one_per_line' support.
4171
a5d50994
AD
41722002-07-09 Akim Demaille <akim@epita.fr>
4173
4174 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
4175 * src/reader.c (lineno): Remove.
4176 Adjust all dependencies.
4177 (get_merge_function): Take a location and use complain_at.
4178 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
4179 * tests/regression.at (Invalid inputs, Mixing %token styles):
4180 Adjust.
4181
b275314e
AD
41822002-07-09 Akim Demaille <akim@epita.fr>
4183
4184 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
4185 recovery rule, and forbid extensions when --yacc.
4186 (gram_error): Use complain_at.
4187 * src/reader.c (reader): Exit if there were parse errors.
4188
865b9df1
AD
41892002-07-09 Akim Demaille <akim@epita.fr>
4190
4191 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
4192 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
4193 Reported by R Blake <blakers@mac.com>.
4194
c76e14da
AD
41952002-07-09 Akim Demaille <akim@epita.fr>
4196
4197 * data/yacc.c: Output the copyright notive in the header.
4198
7db2ed2d
AD
41992002-07-03 Akim Demaille <akim@epita.fr>
4200
4201 * src/output.c (froms, tos): Are state_number_t.
4202 (save_column): sp, sp1, and sp2 are state_number_t.
4203 (prepare): Rename `final' as `final_state_number', `nnts' as
4204 `nterms_number', `nrules' as `rules_number', `nstates' as
4205 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
4206 unused.
4207 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
4208 * data/lalr1.cc (nsym_): Remove, unused.
4209
e68e0410
AD
42102002-07-03 Akim Demaille <akim@epita.fr>
4211
4212 * src/lalr.h, src/lalr.c (goto_number_t): New.
4213 * src/lalr.c (goto_list_t): New.
4214 Propagate them.
4215 * src/nullable.c (rule_list_t): New.
4216 Propagate.
4217 * src/types.h: Remove.
4218
e1a4f3a4
AD
42192002-07-03 Akim Demaille <akim@epita.fr>
4220
4221 * src/closure.c (print_fderives): Use rule_rhs_print.
4222 * src/derives.c (print_derives): Use rule_rhs_print.
4223 (rule_list_t): New, replaces `shorts'.
4224 (set_derives): Add comments.
4225 * tests/sets.at (Nullable, Firsts): Adjust.
4226
536545f3
AD
42272002-07-03 Akim Demaille <akim@epita.fr>
4228
4229 * src/output.c (prepare_actions): Free `tally' and `width'.
4230 (prepare_actions): Allocate and free `order'.
4231 * src/symtab.c (symbols_free): Free `symbols'.
4232 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
4233 * src/output.c (m4_invoke): Move to...
4234 * src/scan-skel.l: here.
4235 (<<EOF>>): Close yyout, and free its name.
4236
8b752b00
AD
42372002-07-03 Akim Demaille <akim@epita.fr>
4238
4239 Fix some memory leaks, and fix a bug: state 0 was examined twice.
4240
4241 * src/LR0.c (new_state): Merge into...
4242 (state_list_append): this.
4243 (new_states): Merge into...
4244 (generate_states): here.
4245 (set_states): Don't ensure a proper `errs' state member here, do it...
4246 * src/conflicts.c (conflicts_solve): here.
4247 * src/state.h, src/state.c: Comment changes.
4248 (state_t): Rename member `shifts' as `transitions'.
4249 Adjust all dependencies.
4250 (errs_new): For consistency, also take the values as argument.
4251 (errs_dup): Remove.
4252 (state_errs_set): New.
4253 (state_reductions_set, state_transitions_set): Assert that no
4254 previous value was assigned.
4255 (state_free): New.
4256 (states_free): Use it.
4257 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
4258 temporary storage: use `errs' and `nerrs' as elsewhere.
4259 (set_conflicts): Allocate and free this `errs'.
4260
613f5e1a
AD
42612002-07-02 Akim Demaille <akim@epita.fr>
4262
4263 * lib/libiberty.h: New.
4264 * lib: Update the bitset implementation from upstream.
4265 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
4266 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
4267 * src/main.c: Adjust bitset stats calls.
4268
26e0cadc
PE
42692002-07-01 Paul Eggert <eggert@twinsun.com>
4270
4271 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
4272 char, so that negative chars don't collide with $.
4273
1154cced
AD
42742002-06-30 Akim Demaille <akim@epita.fr>
4275
4276 Have the GLR tests be `warning' checked, and fix the warnings.
4277
4278 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
4279 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
4280 (yyremoveDeletes): `yyi' and `yyj' are size_t.
4281 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
4282 (yyaddDeferredAction): static.
4283 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
4284 (yyreportParseError): yyprefix is const.
4285 yytokenp is used only when verbose.
4286 (yy__GNUC__): Replace with __GNUC__.
4287 (yypdumpstack): yyi is size_t.
4288 (yypreference): Un-yy local variables and arguments, to avoid
4289 clashes with `yyr1'. Anyway, we are not in the user name space.
4290 (yytname_size): be an int, as is compared with ints.
4291 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
4292 Use them.
4293 * tests/cxx-gram.at: Use quotation to protect $1.
4294 Use AT_COMPILE to enable warnings hunts.
4295 Prototype yylex and yyerror.
4296 `Use' argc.
4297 Include `string.h', not `strings.h'.
4298 Produce and prototype stmtMerge only when used.
4299 yylex takes a location.
4300
97650f4e
AD
43012002-06-30 Akim Demaille <akim@epita.fr>
4302
4303 We spend a lot of time in quotearg, in particular when --verbose.
4304
4305 * src/symtab.c (symbol_get): Store a quoted version of the key.
4306 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
4307 Adjust all callers.
4308
d2576365
AD
43092002-06-30 Akim Demaille <akim@epita.fr>
4310
4311 * src/state.h (reductions_t): Rename member `nreds' as num.
4312 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
4313 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
4314
ccaf65bc
AD
43152002-06-30 Akim Demaille <akim@epita.fr>
4316
4317 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
4318 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
4319 (shifts_to): Rename as...
4320 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
4321 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
4322 (TRANSITION_IS_DISABLED, transitions_to): these.
4323
87675353
AD
43242002-06-30 Akim Demaille <akim@epita.fr>
4325
4326 * src/print.c (print_shifts, print_gotos): Merge into...
4327 (print_transitions): this.
4328 (print_transitions, print_errs, print_reductions): Align the
4329 lookaheads columns.
4330 (print_core, print_transitions, print_errs, print_state,
4331 print_grammar): Output empty lines separator before, not after.
4332 (state_default_rule_compute): Rename as...
4333 (state_default_rule): this.
4334 * tests/conflicts.at (Defaulted Conflicted Reduction),
4335 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
4336 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
4337
ce4ccb4b
AD
43382002-06-30 Akim Demaille <akim@epita.fr>
4339
4340 Display items as we display rules.
4341
4342 * src/gram.h, src/gram.c (rule_lhs_print): New.
4343 * src/gram.c (grammar_rules_partial_print): Use it.
4344 * src/print.c (print_core): Likewise.
4345 * tests/conflicts.at (Defaulted Conflicted Reduction),
4346 (Unresolved SR Conflicts): Adjust.
4347 (Unresolved SR Conflicts): Adjust and rename as...
4348 (Resolved SR Conflicts): this, as was meant.
4349 * tests/regression.at (Web2c Report): Adjust.
4350
bc933ef1
AD
43512002-06-30 Akim Demaille <akim@epita.fr>
4352
4353 * src/print.c (state_default_rule_compute): New, extracted from...
4354 (print_reductions): here.
4355 Pessimize, but clarify the code.
4356 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
4357
53d4308d
AD
43582002-06-30 Akim Demaille <akim@epita.fr>
4359
4360 * src/output.c (action_row): Let default_rule be always a rule
4361 number.
4362
574fb2d5
AD
43632002-06-30 Akim Demaille <akim@epita.fr>
4364
4365 * src/closure.c (print_firsts, print_fderives, closure):
4366 Use BITSET_EXECUTE.
4367 * src/lalr.c (lookaheads_print): Likewise.
4368 * src/state.c (state_rule_lookaheads_print): Likewise.
4369 * src/print_graph.c (print_core): Likewise.
4370 * src/print.c (print_reductions): Likewise.
4371 * src/output.c (action_row): Likewise.
4372 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4373
05811fd7
AD
43742002-06-30 Akim Demaille <akim@epita.fr>
4375
4376 * src/print_graph.c: Use report_flag.
4377
0e4d5753
AD
43782002-06-30 Akim Demaille <akim@epita.fr>
4379
4380 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4381 to...
4382 * src/relation.h, src/relation.c (traverse, relation_digraph)
4383 (relation_print, relation_transpose): New.
4384
24c7d800
AD
43852002-06-30 Akim Demaille <akim@epita.fr>
4386
4387 * src/state.h, src/state.c (shifts_to): New.
4388 * src/lalr.c (build_relations): Use it.
4389
9222837b
AD
43902002-06-30 Akim Demaille <akim@epita.fr>
4391
4392 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4393 (item_number_of_rule_number, rule_number_of_item_number): New.
4394 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4395 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4396 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4397 Propagate their use.
4398 Much remains to be done, in particular wrt `shorts' from types.h.
4399
260008e5
AD
44002002-06-30 Akim Demaille <akim@epita.fr>
4401
4402 * src/symtab.c (symbol_new): Initialize the `printer' member.
4403
8a731ca8
AD
44042002-06-30 Akim Demaille <akim@epita.fr>
4405
4406 * src/LR0.c (save_reductions): Remove, replaced by...
4407 * src/state.h, src/state.c (state_reductions_set): New.
4408 (reductions, errs): Rename as...
4409 (reductions_t, errs_t): these.
4410 Adjust all dependencies.
4411
32e1e0a4
AD
44122002-06-30 Akim Demaille <akim@epita.fr>
4413
4414 * src/LR0.c (state_list_t, state_list_append): New.
4415 (first_state, last_state): Now symbol_list_t.
4416 (this_state): Remove.
4417 (new_itemsets, append_states, save_reductions): Take a state_t as
4418 argument.
4419 (set_states, generate_states): Adjust.
4420 (save_shifts): Remove, replaced by...
4421 * src/state.h, src/state.c (state_shifts_set): New.
4422 (shifts): Rename as...
4423 (shifts_t): this.
4424 Adjust all dependencies.
4425 * src/state.h (state_t): Remove the `next' member.
4426
e5fb6710
AD
44272002-06-30 Akim Demaille <akim@epita.fr>
4428
4429 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4430 escaped in slot 0.
4431
c7ca99d4
AD
44322002-06-30 Akim Demaille <akim@epita.fr>
4433
4434 Use hash.h for the state hash table.
4435
4436 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4437 (allocate_storage): Use state_hash_new.
4438 (free_storage): Use state_hash_free.
4439 (new_state, get_state): Adjust.
4440 * src/lalr.h, src/lalr.c (states): Move to...
4441 * src/states.h (state_t): Remove the `link' member, no longer
4442 used.
4443 * src/states.h, src/states.c: here.
4444 (state_hash_new, state_hash_free, state_hash_lookup)
4445 (state_hash_insert, states_free): New.
4446 * src/states.c (state_table, state_compare, state_hash): New.
4447 * src/output.c (output_actions): Do not free states now, since we
4448 still need to know the final_state number in `prepare', called
4449 afterwards. Do it...
4450 * src/main.c (main): here: call states_free after `output'.
4451
df0e7316
AD
44522002-06-30 Akim Demaille <akim@epita.fr>
4453
4454 * src/state.h, src/state.c (state_new): New, extracted from...
4455 * src/LR0.c (new_state): here.
4456 * src/state.h (STATE_ALLOC): Move to...
4457 * src/state.c: here.
4458 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
4459 * src/state.h, src/state.c: here.
4460
39f41916
AD
44612002-06-30 Akim Demaille <akim@epita.fr>
4462
4463 * src/reader.c (gensym): Rename as...
4464 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
4465 (getsym): Rename as...
4466 (symbol_get): this.
4467
d57650a5
AD
44682002-06-30 Akim Demaille <akim@epita.fr>
4469
4470 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
4471 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
4472 * src/output.c, src/print.c, src/print_graph.c: Propagate.
4473 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
4474
5a08f1ce
AD
44752002-06-30 Akim Demaille <akim@epita.fr>
4476
4477 Make the test suite pass with warnings checked.
4478
4479 * tests/actions.at (Printers and Destructors): Improve.
4480 Avoid unsigned vs. signed issues.
4481 * tests/calc.at: Don't exercise the scanner here, do it...
4482 * tests/input.at (Torturing the Scanner): here.
4483
720623af
PH
44842002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4485
88e7e941 4486 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
4487 reorganize first lines parallel to yacc.c.
4488
fb8135fa
AD
44892002-06-28 Akim Demaille <akim@epita.fr>
4490
4491 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
4492 (b4_token_enum, b4_token_defines): New, factored from...
4493 * data/lalr1.cc, data/yacc.c, glr.c: here.
4494
41442480
AD
44952002-06-28 Akim Demaille <akim@epita.fr>
4496
4497 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
4498 unused variables.
4499 * src/output.c (merger_output): static.
4500
e0e5bf84
AD
45012002-06-28 Akim Demaille <akim@epita.fr>
4502
4503 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
4504 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
4505 pacify GCC.
4506 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 4507
676385e2
PH
45082002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4509
4510 Accumulated changelog for new GLR parsing features.
4511
6a254321 4512 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
4513 conflicts_total_count.
4514 * src/conflicts.h: Ditto.
4515 * src/output.c (token_actions): Use the new name.
4516 (output_conflicts): Change conflp => conflict_list_heads, and
4517 confl => conflict_list for better readability.
4518 * data/glr.c: Use the new names.
4519 * NEWS: Add self to GLR announcement.
e0e5bf84 4520
676385e2
PH
4521 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
4522
4523 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
4524 Akim Demaille.
4525
4526 * data/bison.glr: Change name to glr.c
4527 * data/glr.c: Renamed from bison.glr.
4528 * data/Makefile.am: Add glr.c
e0e5bf84
AD
4529
4530 * src/getargs.c:
4531
676385e2
PH
4532 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
4533 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 4534
676385e2
PH
4535 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4536
4537 * data/bison.glr: Be sure to restore the
4538 current #line when returning to the skeleton contents after having
4539 exposed the input file's #line.
4540
4541 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4542
4543 * data/bison.glr: Bring up to date with changes to bison.simple.
4544
4545 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4546
4547 * data/bison.glr: Correct definitions that use b4_prefix.
4548 Various reformatting.
4549 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
4550 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
4551 yytokenp argument; now part of stack.
4552 (yychar): Define to behave as documented.
4553 (yyclearin): Ditto.
e0e5bf84 4554
676385e2
PH
4555 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4556
4557 * src/reader.h: Add declaration for free_merger_functions.
4558
4559 * src/reader.c (merge_functions): New variable.
4560 (get_merge_function): New function.
4561 (free_merger_functions): New function.
4562 (readgram): Check for %prec that is not followed by a symbol.
4563 Handle %dprec and %merge declarations.
4564 (packgram): Initialize dprec and merger fields in rules array.
4565
4566 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
4567 conflict_list_cnt, conflict_list_free): New variables.
4568 (table_grow): Also grow conflict_table.
e0e5bf84 4569 (prepare_rules): Output dprec and merger tables.
676385e2 4570 (conflict_row): New function.
e0e5bf84 4571 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
4572 default reduction in conflicted states for GLR parser so that there
4573 are spaces for the conflict lists.
4574 (save_row): Also save conflict information.
4575 (token_actions): Allocate conflict list.
4576 (merger_output): New function.
4577 (pack_vector): Pack conflict table, too.
4578 (output_conflicts): New function to output yyconflp and yyconfl.
4579 (output_check): Allocate conflict_tos.
4580 (output_actions): Output conflict tables, also.
4581 (output_skeleton): Output b4_mergers definition.
4582 (prepare): Output b4_max_rhs_length definition.
4583 Use 'bison.glr' as default skeleton for GLR parsers.
4584
4585 * src/gram.c (glr_parser): New flag.
4586 (grammar_free): Call free_merger_functions.
4587
4588 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
4589 all pairs of conflicting reductions, rather than just all tokens
4590 causing conflicts. Needed to size conflict tables.
e0e5bf84 4591 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
4592 interface.
4593 (conflicts_print): Ditto.
4594 (count_total_conflicts): New function.
4595
4596 * src/reader.h (merger_list): New type.
4597 (merge_functions): New variable.
4598
4599 * src/lex.h (tok_dprec, tok_merge): New token types.
4600
4601 * src/gram.h (rule_s): Add dprec and merger fields.
4602 (glr_parser): New flag.
4603
4604 * src/conflicts.h (count_total_conflicts): New function.
4605
4606 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
4607
4608 * doc/bison.texinfo (Generalized LR Parsing): New section.
4609 (GLR Parsers): New section.
4610 (Language and Grammar): Mention GLR parsing.
4611 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
4612 Correct typo ("tge" -> "the").
4613
4614 * data/bison.glr: New skeleton for GLR parsing.
4615
4616 * tests/cxx-gram.at: New tests for GLR parsing.
4617
4618 * tests/testsuite.at: Include cxx-gram.at.
4619
4620 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 4621
676385e2
PH
4622 * src/parse-gram.y:
4623
4624 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
4625
4626 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 4627
b5480d74 46282002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
4629
4630 * src/options.h, src/options.c: Remove.
4631 * src/getargs.c (short_options, long_options): New.
4632
60491a94
AD
46332002-06-27 Akim Demaille <akim@epita.fr>
4634
4635 * data/bison.simple, data/bison.c++: Rename as...
4636 * data/yacc.c, data/lalr1.cc: these.
4637 * doc/bison.texinfo (Environment Variables): Remove.
4638
9be0c25b
AD
46392002-06-25 Raja R Harinath <harinath@cs.umn.edu>
4640
4641 * src/getargs.c (report_argmatch): Initialize strtok().
4642
1ae72863
AD
46432002-06-20 Akim Demaille <akim@epita.fr>
4644
4645 * data/bison.simple (b4_symbol_actions): New, replaces...
4646 (b4_symbol_destructor, b4_symbol_printer): these.
4647 (yysymprint): Be sure to call YYPRINT only for tokens, and using
4648 user token numbers.
4649
87542d29
AD
46502002-06-20 Akim Demaille <akim@epita.fr>
4651
4652 * data/bison.simple (yydestructor): Rename as...
4653 (yydestruct): this.
4654
1a31ed21
AD
46552002-06-20 Akim Demaille <akim@epita.fr>
4656
4657 * src/symtab.h, src/symtab.c (symbol_type_set)
4658 (symbol_destructor_set, symbol_precedence_set): The location is
4659 the last argument.
4660 Adjust all callers.
4661
e776192e
AD
46622002-06-20 Akim Demaille <akim@epita.fr>
4663
4664 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
4665 internals.
4666 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
4667 Takes a location.
4668 * src/symtab.h, src/symtab.c (symbol_class_set)
4669 (symbol_user_token_number_set): Likewise.
4670 Adjust all callers.
4671 Promote complain_at.
4672 * tests/input.at (Type Clashes): Adjust.
4673
5c1180b3
AD
46742002-06-20 Akim Demaille <akim@epita.fr>
4675
4676 * data/bison.simple (YYLEX): Fix the declaration when
4677 %pure-parser.
4678
e3170060
AD
46792002-06-20 Akim Demaille <akim@epita.fr>
4680
4681 * data/bison.simple (yysymprint): Don't print the token number,
4682 just its name.
4683 * tests/actions.at (Destructors): Rename as...
4684 (Printers and Destructors): this.
4685 Also exercise %printer.
4686
253862fd
AD
46872002-06-20 Akim Demaille <akim@epita.fr>
4688
4689 * data/bison.simple (YYDSYMPRINT): New.
4690 Use it to remove many of the #if YYDEBUG/if (yydebug).
4691
366eea36
AD
46922002-06-20 Akim Demaille <akim@epita.fr>
4693
4694 * src/symtab.h, src/symtab.c (symbol_t): printer and
4695 printer_location are new members.
4696 (symbol_printer_set): New.
4697 * src/parse-gram.y (PERCENT_PRINTER): New token.
4698 Handle its associated rule.
4699 * src/scan-gram.l: Adjust.
4700 (handle_destructor_at, handle_destructor_dollar): Rename as...
4701 (handle_symbol_code_at, handle_symbol_code_dollar): these.
4702 * src/output.c (symbol_printers_output): New.
4703 (output_skeleton): Call it.
4704 * data/bison.simple (yysymprint): New. Cannot be named yyprint
4705 since there are already many grammar files with a user `yyprint'.
4706 Replace the calls to YYPRINT to calls to yysymprint.
4707 * tests/calc.at: Adjust.
4708 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
4709 taking advantage of parser very internal details (stack size!).
4710
4f25ebb0
AD
47112002-06-20 Akim Demaille <akim@epita.fr>
4712
4713 * src/scan-gram.l: Complete the scanner with the missing patterns
4714 to pacify Flex.
4715 Use `quote' and `symbol_tag_get' where appropriate.
4716
93b68a0e
AD
47172002-06-19 Akim Demaille <akim@epita.fr>
4718
4719 * tests/actions.at (Destructors): Augment to test locations.
4720 * data/bison.simple (yydestructor): Pass it the current location
4721 if locations are enabled.
4722 Prototype only when __STDC__ or C++.
4723 Change the argument names to move into the yy name space: there is
4724 user code here.
4725
58612f1d
AD
47262002-06-19 Akim Demaille <akim@epita.fr>
4727
74310291
AD
4728 * data/bison.simple (b4_pure_if): New.
4729 Use it instead of #ifdef YYPURE.
4730
47312002-06-19 Akim Demaille <akim@epita.fr>
4732
4733 * data/bison.simple (b4_location_if): New.
58612f1d
AD
4734 Use it instead of #ifdef YYLSP_NEEDED.
4735
f25bfb75
AD
47362002-06-19 Akim Demaille <akim@epita.fr>
4737
4738 Prepare @$ in %destructor, but currently don't bind it in the
4739 skeleton, as %location use is not cleaned up yet.
4740
4741 * src/scan-gram.l (handle_dollar, handle_destructor_at)
4742 (handle_action_at): New.
4743 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
4744 a braced_code_t and a location as additional arguments.
4745 (handle_destructor_dollar): Instead of requiring `b4_eval', just
4746 unquote one when outputting `b4_dollar_dollar'.
4747 Adjust callers.
4748 * data/bison.simple (b4_eval): Remove.
4749 (b4_symbol_destructor): Adjust.
4750 * tests/input.at (Invalid @n): Adjust.
4751
c732d2c6
AD
47522002-06-19 Zack Weinberg <zack@codesourcery.com>
4753
4754 * doc/bison.texinfo: Document ability to have multiple
4755 prologue sections.
4756
8c165d89
AD
47572002-06-18 Akim Demaille <akim@epita.fr>
4758
4759 * src/files.c (compute_base_names): When computing the output file
4760 names from the input file name, strip the directory part.
4761
ca98bf57
AD
47622002-06-18 Akim Demaille <akim@epita.fr>
4763
4764 * data/bison.simple.new: Comment changes.
4765 Reported by Andreas Schwab.
4766
0bfb02ff
AD
47672002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
4768
4769 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
4770 there are no `label `yyoverflowlab' defined but not used' warnings
4771 when yyoverflow is defined.
4772
24c0aad7
AD
47732002-06-18 Akim Demaille <akim@epita.fr>
4774
4775 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
4776 new member.
4777 (symbol_destructor_set): Adjust.
4778 * src/output.c (symbol_destructors_output): Output the destructor
4779 locations.
4780 Output the symbol name.
4781 * data/bison.simple (b4_symbol_destructor): Adjust.
4782
5719c109
AD
47832002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
4784 and Akim Demaille <akim@epita.fr>
4785
4786 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
4787 what's left on the stack when the error recovery hits EOF.
4788 * tests/actions.at (Destructors): Complete to exercise this case.
4789
9280d3ef
AD
47902002-06-17 Akim Demaille <akim@epita.fr>
4791
4792 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
4793 arguments is really empty, not only equal to `[]'.
4794 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
4795 member.
4796 (symbol_destructor_set): New.
4797 * src/output.c (symbol_destructors_output): New.
4798 * src/reader.h (brace_code_t, current_braced_code): New.
4799 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
4800 (handle_dollar): Rename as...
4801 (handle_action_dollar): this.
4802 (handle_destructor_dollar): New.
4803 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
4804 (grammar_declaration): Use it.
4805 * data/bison.simple (yystos): Is always defined.
4806 (yydestructor): New.
4807 * tests/actions.at (Destructors): New.
4808 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
4809
dafdc66f
AD
48102002-06-17 Akim Demaille <akim@epita.fr>
4811
4812 * src/symlist.h, src/symlist.c (symbol_list_length): New.
4813 * src/scan-gram.l (handle_dollar, handle_at): Compute the
4814 rule_length only when needed.
4815 * src/output.c (actions_output, token_definitions_output): Output
4816 the full M4 block.
4817 * src/symtab.c: Don't access directly to the symbol tag, use
4818 symbol_tag_get.
4819 * src/parse-gram.y: Use symbol_list_free.
4820
56c47203
AD
48212002-06-17 Akim Demaille <akim@epita.fr>
4822
4823 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
4824 (symbol_list_prepend, get_type_name): Move to...
4825 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
4826 (symbol_list_prepend, symbol_list_n_type_name_get): here.
4827 Adjust all callers.
4828 (symbol_list_free): New.
4829 * src/scan-gram.l (handle_dollar): Takes a location.
4830 * tests/input.at (Invalid $n): Adjust.
4831
1e0bab92
AD
48322002-06-17 Akim Demaille <akim@epita.fr>
4833
4834 * src/reader.h, src/reader.c (symbol_list_new): Export it.
4835 (symbol_list_prepend): New.
4836 * src/parse-gram.y (%union): `list' is a new member.
4837 (symbols.1): New, replaces...
4838 (terms_to_prec.1, nterms_to_type.1): these.
4839 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
4840 Take a location as additional argument.
4841 Adjust all callers.
4842
04e60654
AD
48432002-06-15 Akim Demaille <akim@epita.fr>
4844
4845 * src/parse-gram.y: Move %token in the declaration section so that
4846 we don't depend upon CVS Bison.
4847
10e5b8bd
AD
48482002-06-15 Akim Demaille <akim@epita.fr>
4849
4850 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
4851 * src/print.c (print_core): Use it.
4852
9801d40c
AD
48532002-06-15 Akim Demaille <akim@epita.fr>
4854
4855 * src/conflicts.c (log_resolution): Accept the rule involved in
4856 the sr conflicts instead of the lookahead number that points to
4857 that rule.
4858 (flush_reduce): Accept the current lookahead vector as argument,
4859 instead of the index in LA.
4860 (resolve_sr_conflict): Accept the current number of lookahead
4861 bitset to consider for the STATE, instead of the index in LA.
4862 (set_conflicts): Adjust.
4863 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
4864
c0263492
AD
48652002-06-15 Akim Demaille <akim@epita.fr>
4866
4867 * src/state.h (state_t): Replace the `lookaheadsp' member, a
4868 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
4869 Adjust all dependencies.
4870 * src/lalr.c (initialize_lookaheads): Split into...
4871 (states_lookaheads_count, states_lookaheads_initialize): these.
4872 (lalr): Adjust.
4873
9757c359
AD
48742002-06-15 Akim Demaille <akim@epita.fr>
4875
4876 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
4877 out of...
4878 (grammar_rules_print): here.
4879 * src/reduce.c (reduce_output): Use it.
4880 * tests/reduce.at (Useless Rules, Reduced Automaton)
4881 (Underivable Rules): Adjust.
4882
6b98e4b5
AD
48832002-06-15 Akim Demaille <akim@epita.fr>
4884
4885 Copy BYacc's nice way to report the grammar.
4886
4887 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
4888 New.
4889 Don't print the rules' location, it is confusing and useless.
4890 (rule_print): Use grammar_rhs_print.
4891 * src/print.c (print_grammar): Use grammar_rules_print.
4892
6b98e4b5
AD
48932002-06-15 Akim Demaille <akim@epita.fr>
4894
4895 Complete and rationalize `useless thing' warnings.
4896
4897 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
4898 (symbol_tag_print): New.
4899 Use them everywhere in place of accessing directly the tag member.
4900 * src/gram.h, src/gram.c (rule_print): New.
4901 Use it where a rule used to be printed `by hand'.
4902 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
4903 (reduce_grammar_tables): Report the useless rules.
4904 (reduce_print): Useless things are a warning, not an error.
4905 Report it as such.
4906 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4907 (Reduced Automaton, Underivable Rules): Adjust.
4908 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4909 * tests/conflicts.at (Unresolved SR Conflicts)
4910 (Solved SR Conflicts): Adjust.
4911
ee000ba4
AD
49122002-06-15 Akim Demaille <akim@epita.fr>
4913
4914 Let symbols have a location.
4915
4916 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4917 (getsym): Adjust.
4918 Adjust all callers.
4919 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4920 Use location_t, not int.
4921 * src/symtab.c (symbol_check_defined): Take advantage of the
4922 location.
4923 * tests/regression.at (Invalid inputs): Adjust.
4924
8efe435c
AD
49252002-06-15 Akim Demaille <akim@epita.fr>
4926
4927 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4928 (input): Don't try to initialize yylloc here, do it in the
4929 scanner.
4930 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4931 * src/gram.h (rule_t): Change line and action_line into location
4932 and action_location, of location_t type.
4933 Adjust all dependencies.
4934 * src/location.h, src/location.c (empty_location): New.
4935 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4936 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4937 (grammar_current_rule_symbol_append)
4938 (grammar_current_rule_action_append): Expect a location as argument.
4939 * src/reader.c (grammar_midrule_action): Adjust to attach an
4940 action's location as dummy symbol location.
4941 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4942 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4943 the line numbers.
4944
1921f1d7
AD
49452002-06-14 Akim Demaille <akim@epita.fr>
4946
4947 Grammar declarations may be found in the grammar section.
4948
4949 * src/parse-gram.y (rules_or_grammar_declaration): New.
4950 (declarations): Each declaration may end with a semicolon, not
4951 just...
4952 (grammar_declaration): `"%union"'.
4953 (grammar): Branch to rules_or_grammar_declaration.
4954
4515534c
AD
49552002-06-14 Akim Demaille <akim@epita.fr>
4956
4957 * src/main.c (main): Invoke scanner_free.
4958
f958596b
AD
49592002-06-14 Akim Demaille <akim@epita.fr>
4960
4961 * src/output.c (m4_invoke): Extracted from...
4962 (output_skeleton): here.
4963 Free tempfile.
4964
2c569025
AD
49652002-06-14 Akim Demaille <akim@epita.fr>
4966
4967 * src/parse-gram.y (directives, directive, gram)
4968 (grammar_directives, precedence_directives, precedence_directive):
4969 Rename as...
4970 (declarations, declaration, grammar, grammar_declaration)
4971 (precedence_declaration, precedence_declarator): these.
4972 (symbol_declaration): New.
4973
592e8d4d
AD
49742002-06-14 Akim Demaille <akim@epita.fr>
4975
4976 * src/files.c (action_obstack): Remove, unused.
4977 (output_obstack): Remove it, and all its dependencies, as it is no
4978 longer needed.
4979 * src/reader.c (epilogue_set): Build the epilogue in the
4980 muscle_obstack.
4981 * src/output.h, src/output.c (muscle_obstack): Move to...
4982 * src/muscle_tab.h, src/muscle_tab.h: here.
4983 (muscle_init): Initialize muscle_obstack.
4984 (muscle_free): New.
4985 * src/main.c (main): Call it.
4986
0c15323d
AD
49872002-06-14 Akim Demaille <akim@epita.fr>
4988
4989 * src/location.h: New, extracted from...
4990 * src/reader.h: here.
4991 * src/Makefile.am (noinst_HEADERS): Merge into
4992 (bison_SOURCES): this.
4993 Add location.h.
4994 * src/parse-gram.y: Use location_t instead of Bison's.
4995 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4996 Use location_t instead of ints.
4997
e96c9728
AD
49982002-06-14 Akim Demaille <akim@epita.fr>
4999
5000 * data/bison.simple, data/bison.c++: Be sure to restore the
5001 current #line when returning to the skeleton contents after having
5002 exposed the input file's #line.
5003
75d1fe16
AD
50042002-06-12 Akim Demaille <akim@epita.fr>
5005
5006 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
5007 eager.
5008 * tests/actions.at (Exotic Dollars): New.
5009
6c35d22c
AD
50102002-06-12 Akim Demaille <akim@epita.fr>
5011
5012 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
5013 ['"/] too eagerly.
5014 * tests/input.at (Torturing the Scanner): New.
5015
1d6412ad
AD
50162002-06-11 Akim Demaille <akim@epita.fr>
5017
5018 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
5019 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
5020 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
5021 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
5022 * src/reader.c (reader): Use it.
5023
4cdb01db
AD
50242002-06-11 Akim Demaille <akim@epita.fr>
5025
5026 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
5027 Adjust all callers.
5028 (scanner_last_string_free): New.
5029
44995b2e
AD
50302002-06-11 Akim Demaille <akim@epita.fr>
5031
5032 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
5033 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
5034 (last_string, YY_OBS_FREE): New.
5035 Use them when returning an ID.
5036
e9955c83
AD
50372002-06-11 Akim Demaille <akim@epita.fr>
5038
5039 Have Bison grammars parsed by a Bison grammar.
5040
5041 * src/reader.c, src/reader.h (prologue_augment): New.
5042 * src/reader.c (copy_definition): Remove.
5043
5044 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
5045 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
5046 (grammar_current_rule_prec_set, grammar_current_rule_check)
5047 (grammar_current_rule_symbol_append)
5048 (grammar_current_rule_action_append): Export.
5049 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
5050 (symbol_list_action_append): Remove.
5051 Hook the routines from reader.
5052 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
5053 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
5054
5055 * src/reader.c (read_declarations): Remove, unused.
5056
5057 * src/parse-gram.y: Handle the epilogue.
5058 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
5059 (grammar_start_symbol_set): this.
5060 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
5061 * src/reader.c (readgram): Remove, unused.
5062 (reader): Adjust to insert eoftoken and axiom where appropriate.
5063
5064 * src/reader.c (copy_dollar): Replace with...
5065 * src/scan-gram.h (handle_dollar): this.
5066 * src/parse-gram.y: Remove `%thong'.
5067
5068 * src/reader.c (copy_at): Replace with...
5069 * src/scan-gram.h (handle_at): this.
5070
5071 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
5072 New.
5073
5074 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
5075 time being.
5076
5077 * src/reader.h, src/reader.c (grammar_rule_end): New.
5078
5079 * src/parse.y (current_type, current_class): New.
5080 Implement `%nterm', `%token' support.
5081 Merge `%term' into `%token'.
5082 (string_as_id): New.
5083 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
5084 type name.
5085
5086 * src/parse-gram.y: Be sure to handle properly the beginning of
5087 rules.
5088
5089 * src/parse-gram.y: Handle %type.
5090 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
5091
5092 * src/parse-gram.y: More directives support.
5093 * src/options.c: No longer handle source directives.
5094
5095 * src/parse-gram.y: Fix %output.
5096
5097 * src/parse-gram.y: Handle %union.
5098 Use the prologue locations.
5099 * src/reader.c (parse_union_decl): Remove.
5100
5101 * src/reader.h, src/reader.c (epilogue_set): New.
5102 * src/parse-gram.y: Use it.
5103
5104 * data/bison.simple, data/bison.c++: b4_stype is now either not
5105 defined, then default to int, or to the contents of %union,
5106 without `union' itself.
5107 Adjust.
5108 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
5109
5110 * src/output.c (actions_output): Don't output braces, as they are
5111 already handled by the scanner.
5112
5113 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
5114 characters to themselves.
5115
5116 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
5117 that the epilogue has a proper #line.
5118
5119 * src/parse-gram.y: Handle precedence/associativity.
5120
5121 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
5122 a terminal.
5123 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
5124 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
5125 at all to define terminals that cannot be emitted.
5126
5127 * src/scan-gram.l: Escape M4 characters.
5128
5129 * src/scan-gram.l: Working properly with escapes in user
5130 strings/characters.
5131
5132 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
5133 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
5134 grammar.
5135 Use more modest sizes, as for the time being the parser does not
5136 release memory, and therefore the process swallows a huge amount
5137 of memory.
5138
5139 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
5140 stricter %token grammar.
5141
5142 * src/symtab.h (associativity): Add `undef_assoc'.
5143 (symbol_precedence_set): Do nothing when passed an undef_assoc.
5144 * src/symtab.c (symbol_check_alias_consistence): Adjust.
5145
5146 * tests/regression.at (Invalid %directive): Remove, as it is now
5147 meaningless.
5148 (Invalid inputs): Adjust to the new error messages.
5149 (Token definitions): The new grammar doesn't allow too many
5150 eccentricities.
5151
5152 * src/lex.h, src/lex.c: Remove.
5153 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
5154 (copy_character, copy_string2, copy_string, copy_identifier)
5155 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
5156 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
5157 (parse_action): Remove.
5158 * po/POTFILES.in: Adjust.
5159
2e047461
AD
51602002-06-11 Akim Demaille <akim@epita.fr>
5161
cd05d13c 5162 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
5163 rule's action member: return the action as a string.
5164 Don't require `rule_length' as an argument: compute it.
5165 (grammar_current_rule_symbol_append)
5166 (grammar_current_rule_action_append): New, eved out from
5167 (readgram): here.
5168 Remove `action_flag', `rulelength', unused now.
5169
9af3fbce
AD
51702002-06-11 Akim Demaille <akim@epita.fr>
5171
5172 * src/reader.c (grammar_current_rule_prec_set).
5173 (grammar_current_rule_check): New, eved out from...
5174 (readgram): here.
5175 Remove `xaction', `first_rhs': useless.
5176 * tests/input.at (Type clashes): New.
5177 * tests/existing.at (GNU Cim Grammar): Adjust.
5178
1485e106
AD
51792002-06-11 Akim Demaille <akim@epita.fr>
5180
5181 * src/reader.c (grammar_midrule_action): New, Eved out from
5182 (readgram): here.
5183
da4160c3
AD
51842002-06-11 Akim Demaille <akim@epita.fr>
5185
5186 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
5187 New.
5188 (readgram): Use them as replacement of inlined code, crule and
5189 crule1.
5190
f6d0f937
AD
51912002-06-11 Akim Demaille <akim@epita.fr>
5192
5193 * src/reader.c (grammar_end, grammar_symbol_append): New.
5194 (readgram): Use them.
5195 Make the use of `p' as local as possible.
5196
69078d4b
AD
51972002-06-10 Akim Demaille <akim@epita.fr>
5198
5199 GCJ's parser requires the tokens to be defined before the prologue.
5200
5201 * data/bison.simple: Output the token definition before the user's
5202 prologue.
5203 * tests/regression.at (Braces parsing, Duplicate string)
5204 (Mixing %token styles): Check the output from bison.
5205 (Early token definitions): New.
5206
5e424082
AD
52072002-06-10 Akim Demaille <akim@epita.fr>
5208
5209 * src/symtab.c (symbol_user_token_number_set): Don't complain when
5210 assigning twice the same user number to a token, so that we can
5211 use it in...
5212 * src/lex.c (lex): here.
5213 Also use `symbol_class_set' instead of hand written code.
5214 * src/reader.c (parse_assoc_decl): Likewise.
5215
44536b35
AD
52162002-06-10 Akim Demaille <akim@epita.fr>
5217
5218 * src/symtab.c, src/symtab.c (symbol_class_set)
5219 (symbol_user_token_number_set): New.
5220 * src/reader.c (parse_token_decl): Use them.
5221 Use a switch instead of ifs.
5222 Use a single argument.
5223
8b9f2372
AD
52242002-06-10 Akim Demaille <akim@epita.fr>
5225
5226 Remove `%thong' support as it is undocumented, unused, duplicates
5227 `%token's job, and creates useless e-mail traffic with people who
5228 want to know what it is, why it is undocumented, unused, and
5229 duplicates `%token's job.
5230
5231 * src/reader.c (parse_thong_decl): Remove.
5232 * src/options.c (option_table): Remove "thong".
5233 * src/lex.h (tok_thong): Remove.
5234
3ae2b51f
AD
52352002-06-10 Akim Demaille <akim@epita.fr>
5236
5237 * src/symtab.c, src/symtab.c (symbol_type_set)
5238 (symbol_precedence_set): New.
5239 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
5240 (value_components_used): Remove, unused.
5241
2f1afb73
AD
52422002-06-09 Akim Demaille <akim@epita.fr>
5243
5244 Move symbols handling code out of the reader.
5245
5246 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
5247 (axiom): Move to...
5248 * src/symtab.h, src/symtab.c: here.
5249
5250 * src/gram.c (start_symbol): Remove: use startsymbol->number.
5251 * src/reader.c (startval): Rename as...
5252 * src/symtab.h, src/symtab.c (startsymbol): this.
5253 * src/reader.c: Adjust.
5254
5255 * src/reader.c (symbol_check_defined, symbol_make_alias)
5256 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5257 (token_translations_init)
5258 Move to...
5259 * src/symtab.c: here.
5260 * src/reader.c (packsymbols): Move to...
5261 * src/symtab.h, src/symtab.c (symbols_pack): here.
5262 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
5263 argument.
5264
e9bca3ad
AD
52652002-06-03 Akim Demaille <akim@epita.fr>
5266
5267 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
5268 then statements.
5269
86eff183
AD
52702002-06-03 Akim Demaille <akim@epita.fr>
5271
5272 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
5273 structs with non literals.
5274 * src/scan-skel.l: never-interactive.
5275 * src/conflicts.c (enum conflict_resolution_e): No trailing
5276 comma.
5277 * src/getargs.c (usage): Split long literal strings.
5278 Reported by Hans Aberg.
5279
717be197
AD
52802002-05-28 Akim Demaille <akim@epita.fr>
5281
5282 * data/bison.c++: Use C++ ostreams.
5283 (cdebug_): New member.
5284
670ddffd
AD
52852002-05-28 Akim Demaille <akim@epita.fr>
5286
5287 * src/output.c (output_skeleton): Be sure to allocate enough room
5288 for `/' _and_ for `\0' in full_skeleton.
5289
769b430f
AD
52902002-05-28 Akim Demaille <akim@epita.fr>
5291
5292 * data/bison.c++: Catch up with bison.simple:
5293 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5294 and Paul Eggert <eggert@twinsun.com>: `error' handing.
5295 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
5296 and popping traces.
5297
7067cb36
PH
52982002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5299
5300 * src/output.c (output_skeleton): Put an explicit path in front of
5301 the skeleton file name, rather than relying on the -I directory,
5302 to partially alleviate effects of having a skeleton file lying around
5303 in the current directory.
769b430f 5304
4a713ec2
PH
53052002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5306
769b430f 5307 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
5308 obstack_printf should be obstack_fgrow1.
5309
b408954b
AD
53102002-05-26 Akim Demaille <akim@epita.fr>
5311
5312 * src/state.h (state_t): `solved_conflicts' is a new member.
5313 * src/LR0.c (new_state): Set it to 0.
5314 * src/conflicts.h, src/conflicts.c (print_conflicts)
5315 (free_conflicts, solve_conflicts): Rename as...
5316 (conflicts_print, conflicts_free, conflicts_solve): these.
5317 Adjust callers.
5318 * src/conflicts.c (enum conflict_resolution_e)
5319 (solved_conflicts_obstack): New, used by...
5320 (log_resolution): this.
5321 Adjust to attach the conflict resolution to each state.
5322 Complete the description with the precedence/associativity
5323 information.
5324 (resolve_sr_conflict): Adjust.
5325 * src/print.c (print_state): Output its solved_conflicts.
5326 * tests/conflicts.at (Unresolved SR Conflicts)
5327 (Solved SR Conflicts): Exercise --report=all.
5328
a49aecd5
AD
53292002-05-26 Akim Demaille <akim@epita.fr>
5330
5331 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5332 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5333 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
5334 (token_number_t, item_number_as_token_number)
5335 (token_number_as_item_number, muscle_insert_token_number_table):
5336 Rename as...
5337 (symbol_number_t, item_number_as_symbol_number)
5338 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
5339 these, since it is more appropriate.
5340
5504898e
AD
53412002-05-26 Akim Demaille <akim@epita.fr>
5342
5343 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
5344 `Error:' lines.
5345 * data/bison.simple (yystos) [YYDEBUG]: New.
5346 (yyparse) [YYDEBUG]: Display the symbols which are popped during
5347 error recovery.
5348 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
5349
ec3bc396
AD
53502002-05-25 Akim Demaille <akim@epita.fr>
5351
5352 * doc/bison.texinfo (Debugging): Split into...
5353 (Tracing): this new section, its former contents, and...
5354 (Understanding): this new section.
5355 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
5356 by...
5357 (report_flag): this.
5358 Adjust all dependencies.
5359 (report_args, report_types, report_argmatch): New.
5360 (usage, getargs): Report/support -r, --report.
5361 * src/options.h
5362 (struct option_table_struct): Rename as..,
5363 (struct option_table_s): this.
5364 Rename the `set_flag' member to `flag' to match with getopt_long's
5365 struct.
5366 * src/options.c (option_table): Split verbose into an entry for
5367 %verbose, and another for --verbose.
5368 Support --report/-r, so remove -r from the obsolete --raw.
5369 * src/print.c: Attach full item sets and lookaheads reports to
5370 report_flag instead of trace_flag.
5371 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5372
78df8250
PE
53732002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5374 and Paul Eggert <eggert@twinsun.com>
769b430f 5375
78df8250
PE
5376 * data/bison.simple (yyparse): Correct error handling to conform to
5377 POSIX and yacc. Specifically, after syntax error is discovered,
5378 do not reduce further before shifting the error token.
5379 Clean up the code a bit by removing the labels yyerrdefault,
5380 yyerrhandle, yyerrpop.
5381 * NEWS: Document the above.
5382
c0c9ea05
PH
53832002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5384
5385 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5386 type; it isn't always big enough, since it doesn't necessarily
5387 include non-terminals.
769b430f 5388 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
5389 the latter can be removed.
5390 (yy_token_number_type): Remove, only one use.
5391 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5392 don't use TokenNumberType as element type.
769b430f 5393
c0c9ea05
PH
5394 * tests/regression.at: Modify expected output to agree with change
5395 to yyr1 and yytranslate.
769b430f 5396
6390a83f
FK
53972002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5398
5399 * src/reader.c (parse_action): Use copy_character instead of
5400 obstack_1grow.
5401
db7c8e9a
AD
54022002-05-13 Akim Demaille <akim@epita.fr>
5403
5404 * tests/regression.at (Token definitions): Prototype yylex and
5405 yyerror.
5406
fcc61800
PH
54072002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5408
158c687b 5409 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
5410 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5411 32-bit arithmetic.
5412 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5413
5683e9b2
AD
54142002-05-07 Akim Demaille <akim@epita.fr>
5415
5416 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5417 avoid GCC warnings.
5418
0c2d3f4c
AD
54192002-05-07 Akim Demaille <akim@epita.fr>
5420
5421 Kill GCC warnings.
5422
5423 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5424 over the RHS of each rule.
5425 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5426 * src/state.h (state_t): Member `nitems' is unsigned short.
5427 * src/LR0.c (get_state): Adjust.
5428 * src/reader.c (packgram): Likewise.
5429 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5430 `Type'.
5431 (muscle_insert_int_table): Remove, unused.
5432 (prepare_rules): Remove `max'.
5433
1565b720
AD
54342002-05-06 Akim Demaille <akim@epita.fr>
5435
5436 * src/closure.c (print_firsts): Display of the symbol tags.
5437 (bitmatrix_print): Move to...
5438 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5439 here.
5440 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5441
cfaee611
AD
54422002-05-06 Akim Demaille <akim@epita.fr>
5443
5444 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5445 hash_do_for_each.
5446
458be8e0
AD
54472002-05-06 Akim Demaille <akim@epita.fr>
5448
5449 * src/LR0.c (new_state, get_state): Instead of using the global
5450 `kernel_size' and `kernel_base', have two new arguments:
5451 `core_size' and `core'.
5452 Adjust callers.
5453
a900a624
AD
54542002-05-06 Akim Demaille <akim@epita.fr>
5455
5456 * src/reader.c (packgram): No longer end `ritem' with a 0
5457 sentinel: it is not used.
5458
d4e7d3a1
AD
54592002-05-05 Akim Demaille <akim@epita.fr>
5460
5461 New experimental feature: display the lookaheads in the report and
5462 graph.
5463
5464 * src/print (print_core): When --trace-flag, display the rules
5465 lookaheads.
5466 * src/print_graph.c (print_core): Likewise.
5467 Swap the arguments.
5468 Adjust caller.
5469
39ceb25b
AD
54702002-05-05 Akim Demaille <akim@epita.fr>
5471
5472 * tests/torture.at (Many lookaheads): New test.
5473
5372019f
AD
54742002-05-05 Akim Demaille <akim@epita.fr>
5475
5476 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
5477 (GENERATE_MUSCLE_INSERT_TABLE): this.
5478 (output_int_table, output_unsigned_int_table, output_short_table)
5479 (output_token_number_table, output_item_number_table): Replace with...
5480 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
5481 (muscle_insert_short_table, muscle_insert_token_number_table)
5482 (muscle_insert_item_number_table): these.
5483 Adjust all callers.
5484 (prepare_tokens): Don't free `translations', since...
5485 * src/reader.h, src/reader.c (grammar_free): do it.
5486 Move to...
5487 * src/gram.h, src/gram.c (grammar_free): here.
5488 * data/bison.simple, data/bison.c++: b4_token_number_max is now
5489 b4_translate_max.
5490
5df5f6d5
AD
54912002-05-05 Akim Demaille <akim@epita.fr>
5492
5493 * src/output.c (output_unsigned_int_table): New.
5494 (prepare_rules): `i' is unsigned.
5495 `prhs', `rline', `r2' are unsigned int.
5496 Rename muscle `rhs_number_max' as `rhs_max'.
5497 Output muscles `prhs_max', `rline_max', and `r2_max'.
5498 Free rline and r1.
5499 * data/bison.simple, data/bison.c++: Adjust to use these muscles
5500 to compute types instead of constant types.
5501 * tests/regression.at (Web2c Actions): Adjust.
5502
b87f8b21
AD
55032002-05-04 Akim Demaille <akim@epita.fr>
5504
5505 * src/symtab.h (SALIAS, SUNDEF): Rename as...
5506 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
5507 Adjust dependencies.
5508 * src/output.c (token_definitions_output): Be sure not to output a
5509 `#define 'a'' when fed with `%token 'a' "a"'.
5510 * tests/regression.at (Token definitions): New.
5511
8bb936e4
PE
55122002-05-03 Paul Eggert <eggert@twinsun.com>
5513
5514 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
5515 for K&R C.
5516
55172002-05-03 gettextize <bug-gnu-gettext@gnu.org>
5518
5519 * Makefile.am (SUBDIRS): Remove intl.
5520 (EXTRA_DIST): Add config/config.rpath.
5521
53c71a12
AD
55222002-05-03 Akim Demaille <akim@epita.fr>
5523
5524 * data/bison.simple (m4_if): Don't output empty enums.
5525 And actually, output valid enum definitions :(.
5526
289dd0cf
AD
55272002-05-03 Akim Demaille <akim@epita.fr>
5528
5529 * configure.bat: Remove, completely obsolete.
5530 * Makefile.am (EXTRA_DIST): Adjust.
5531 Don't distribute config.rpath...
5532 * config/Makefile.am (EXTRA_DIST): Do it.
5533
db85e524
AD
55342002-05-03 Akim Demaille <akim@epita.fr>
5535
5536 * configure.in (GETTEXT_VERSION): New.
5537 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
5538
83ccf991
AD
55392002-05-03 Akim Demaille <akim@epita.fr>
5540
5541 * data/bison.simple (b4_token_enum): New.
5542 (b4_token_defines): Use it to output tokens both as #define and
5543 enums.
5544 Suggested by Paul Eggert.
5545 * src/output.c (token_definitions_output): Don't output spurious
5546 white spaces.
5547
1f418995
AD
55482002-05-03 Akim Demaille <akim@epita.fr>
5549
5550 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5551
45119f04
RA
55522002-05-02 Robert Anisko <robert@lrde.epita.fr>
5553
5554 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
5555 Update the stack class, give a try to deque as the default container.
5556
b2d52318
AD
55572002-05-02 Akim Demaille <akim@epita.fr>
5558
5559 * data/bison.simple (yyparse): Do not implement @$ = @1.
5560 (YYLLOC_DEFAULT): Adjust to do it.
5561 * doc/bison.texinfo (Location Default Action): Fix.
5562
3a8b4109
AD
55632002-05-02 Akim Demaille <akim@epita.fr>
5564
5565 * src/reader.c (parse_braces): Merge into...
5566 (parse_action): this.
5567
84614e13
AD
55682002-05-02 Akim Demaille <akim@epita.fr>
5569
5570 * configure.in (ALL_LINGUAS): Remove.
5571 * po/LINGUAS, hr.po: New.
5572
fdbcd8e2
AD
55732002-05-02 Akim Demaille <akim@epita.fr>
5574
5575 Remove the so called hairy (semantic) parsers.
5576
5577 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
5578 * src/gram.h, src/gram.c (semantic_parser): Remove.
5579 (rule_t): Remove the guard and guard_line members.
5580 * src/lex.h (token_t): remove tok_guard.
5581 * src/options.c (option_table): Remove %guard and %semantic_parser
5582 support.
5583 * src/output.c, src/output.h (guards_output): Remove.
5584 (prepare): Adjust.
5585 (token_definitions_output): Don't output the `T'
5586 tokens (???).
5587 (output_skeleton): Don't output the guards.
5588 * src/files.c, src/files.c (attrsfile): Remove.
5589 * src/reader.c (symbol_list): Remove the guard and guard_line
5590 members.
5591 Adjust dependencies.
5592 (parse_guard): Remove.
5593 * data/bison.hairy: Remove.
5594 * doc/bison.texinfo (Environment Variables): Remove occurrences of
5595 BISON_HAIRY.
5596
82b6cb3f
AD
55972002-05-02 Akim Demaille <akim@epita.fr>
5598
5599 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
5600 (parse_guard): Rename the formal argument `stack_offset' as
5601 `rule_length', which is more readable.
5602 Adjust callers.
5603 (copy_at, copy_dollar): Instead of outputting the hard coded
5604 values of $$, $n and so forth, output invocation to b4_lhs_value,
5605 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
5606 Note: this patch partially drops `semantic-parser' support: it
5607 always does `rule_length - n', where semantic parsers ought to
5608 always use `-n'.
82b6cb3f
AD
5609 * data/bison.simple, data/bison.c++ (b4_lhs_value)
5610 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
5611
6cbfbcc5
AD
56122002-05-02 Akim Demaille <akim@epita.fr>
5613
5614 * configure.in (AC_INIT): Bump to 1.49b.
5615 (AM_INIT_AUTOMAKE): Short invocation.
5616
b8548114
AD
56172002-05-02 Akim Demaille <akim@epita.fr>
5618
5619 Version 1.49a.
5620
c20cd1fa
AD
56212002-05-01 Akim Demaille <akim@epita.fr>
5622
5623 * src/skeleton.h: Remove.
5624
8a9566d4
AD
56252002-05-01 Akim Demaille <akim@epita.fr>
5626
5627 * src/skeleton.h: Fix the #endif.
5628 Reported by Magnus Fromreide.
5629
8c6d399a
PE
56302002-04-26 Paul Eggert <eggert@twinsun.com>
5631
5632 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
5633 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 5634 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 5635
2b7ed18a
RA
56362002-04-25 Robert Anisko <robert@lrde.epita.fr>
5637
5638 * src/scan-skel.l: Postprocess quadrigraphs.
5639
5640 * src/reader.c (copy_character): New function, used to output
5641 single characters while replacing `[' and `]' with quadrigraphs, to
5642 avoid troubles with M4 quotes.
5643 (copy_comment): Output characters with copy_character.
5644 (read_additionnal_code): Likewise.
5645 (copy_string2): Likewise.
5646 (copy_definition): Likewise.
5647
5648 * tests/calc.at: Exercise M4 quoting.
5649
34a89c50
AD
56502002-04-25 Akim Demaille <akim@epita.fr>
5651
5652 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
5653 between `!' and the command.
5654 Reported by Paul Eggert.
5655
0dd1580a
RA
56562002-04-24 Robert Anisko <robert@lrde.epita.fr>
5657
5658 * tests/calc.at: Exercise prologue splitting.
5659
5660 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
5661 `b4_post_prologue' instead of `b4_prologue'.
5662
5663 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
5664 muscles.
5665 (output): Free pre_prologue_obstack and post_prologue_obstack.
5666 * src/files.h, src/files.c (attrs_obstack): Remove.
5667 (pre_prologue_obstack, post_prologue_obstack): New.
5668 * src/reader.c (copy_definition): Add a parameter to specify the
5669 obstack to fill, instead of using attrs_obstack unconditionally.
5670 (read_declarations): Pass pre_prologue_obstack to copy_definition if
5671 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
5672
83c1796f
PE
56732002-04-23 Paul Eggert <eggert@twinsun.com>
5674
5675 * data/bison.simple: Remove unnecessary commentary and white
5676 space differences from 1_29-branch.
5677 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
5678
5679 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
5680 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
5681 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
5682 constructors or destructors.
5683
5684 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
5685
1207eeac
AD
56862002-04-23 Akim Demaille <akim@epita.fr>
5687
5688 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
5689 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
5690 location with columns.
5691 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
5692 All reported by Paul Eggert.
5693
78ab8f67
AD
56942002-04-22 Akim Demaille <akim@epita.fr>
5695
5696 * src/reduce.c (dump_grammar): Move to...
5697 * src/gram.h, src/gram.c (grammar_dump): here.
5698 Be sure to separate long item numbers.
5699 Don't read the members of a rule's prec if its nil.
5700
133c20e2
AD
57012002-04-22 Akim Demaille <akim@epita.fr>
5702
5703 * src/output.c (table_size, table_grow): New.
5704 (MAXTABLE): Remove, replace uses with table_size.
5705 (pack_vector): Instead of dying when the table is too big, grow it.
5706
9515e8a7
AD
57072002-04-22 Akim Demaille <akim@epita.fr>
5708
5709 * data/bison.simple (yyr1): Its type is that of a token number.
5710 * data/bison.c++ (r1_): Likewise.
5711 * tests/regression.at (Web2c Actions): Adjust.
5712
23c5a174
AD
57132002-04-22 Akim Demaille <akim@epita.fr>
5714
5715 * src/reader.c (token_translations_init): 256 is now the default
5716 value for the error token, i.e., it will be assigned another
5717 number if the user assigned 256 to one of her tokens.
5718 (reader): Don't force 256 to error.
5719 * doc/bison.texinfo (Symbols): Adjust.
5720 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
5721 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
5722 etc. instead of 10, 20, 30 (which was used to `jump' over error
5723 (256) and undefined (2)).
5724
5fbb0954
AD
57252002-04-22 Akim Demaille <akim@epita.fr>
5726
5727 Propagate more token_number_t.
5728
5729 * src/gram.h (token_number_as_item_number)
5730 (item_number_as_token_number): New.
5731 * src/output.c (GENERATE_OUTPUT_TABLE): New.
5732 Use it to create output_item_number_table and
5733 output_token_number_table.
5734 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5735 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
5736 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
5737 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
5738
4f940944
AD
57392002-04-22 Akim Demaille <akim@epita.fr>
5740
5741 * src/output.h, src/output.c (get_lines_number): Remove.
5742
3ded9a63
AD
57432002-04-19 Akim Demaille <akim@epita.fr>
5744
5745 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
5746 as Lex/Flex'.
5747 (Debugging): More details about enabling the debugging features.
5748 (Table of Symbols): Describe $$, $n, @$, and @n.
5749 Suggested by Tim Josling.
5750
e0c471a9
AD
57512002-04-19 Akim Demaille <akim@epita.fr>
5752
5753 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
5754
fecc10cd
AD
57552002-04-10 Akim Demaille <akim@epita.fr>
5756
5757 * src/system.h: Rely on HAVE_LIMITS_H.
5758 Suggested by Paul Eggert.
5759
51dec47b
AD
57602002-04-09 Akim Demaille <akim@epita.fr>
5761
5762 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
5763 full stderr, and strip it according to the bison options, instead
5764 of composing the error message from different bits.
5765 This makes it easier to check for several error messages.
5766 Adjust all the invocations.
5767 Add an invocation exercising the error token.
5768 Add an invocation demonstrating a stupid error message.
5769 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
5770 Adjust the tests.
5771 Error message are for stderr, not stdout.
5772
007a50a4
AD
57732002-04-09 Akim Demaille <akim@epita.fr>
5774
5775 * src/gram.h, src/gram.c (error_token_number): Remove, use
5776 errtoken->number.
5777 * src/reader.c (reader): Don't specify the user token number (2)
5778 for $undefined, as it uselessly prevents using it.
5779 * src/gram.h (token_number_t): Move to...
5780 * src/symtab.h: here.
5781 (state_t.number): Is a token_number_t.
5782 * src/print.c, src/reader.c: Use undeftoken->number instead of
5783 hard coded 2.
5784 (Even though this 2 is not the same as above: the number of the
5785 undeftoken remains being 2, it is its user token number which
5786 might not be 2).
5787 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
5788 `user_token_number_max'.
5789 Output `undef_token_number'.
5790 * data/bison.simple, data/bison.c++: Use them.
5791 Be sure to map invalid yylex return values to
5792 `undef_token_number'. This saves us from gratuitous SEGV.
5793
5794 * tests/conflicts.at (Solved SR Conflicts)
5795 (Unresolved SR Conflicts): Adjust.
5796 * tests/regression.at (Web2c Actions): Adjust.
5797
06446ccf
AD
57982002-04-08 Akim Demaille <akim@epita.fr>
5799
5800 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
5801 Adding #line.
5802 Remove the duplicate `typedefs'.
5803 (RhsNumberType): Fix the declaration and various other typos.
5804 Use __ofile__.
5805 * data/bison.simple: Use __ofile__.
5806 * src/scan-skel.l: Handle __ofile__.
5807
62a3e4f0
AD
58082002-04-08 Akim Demaille <akim@epita.fr>
5809
5810 * src/gram.h (item_number_t): New, the type of item numbers in
5811 RITEM. Note that it must be able to code symbol numbers as
5812 positive number, and the negation of rule numbers as negative
5813 numbers.
5814 Adjust all dependencies (pretty many).
5815 * src/reduce.c (rule): Remove this `short *' pointer: use
5816 item_number_t.
5817 * src/system.h (MINSHORT, MAXSHORT): Remove.
5818 Include `limits.h'.
5819 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
5820 (shortcpy): Remove.
5821 (MAXTABLE): Move to...
5822 * src/output.c (MAXTABLE): here.
5823 (prepare_rules): Use output_int_table to output rhs.
5824 * data/bison.simple, data/bison.c++: Adjust.
5825 * tests/torture.at (Big triangle): Move the limit from 254 to
5826 500.
5827 * tests/regression.at (Web2c Actions): Ajust.
5828
5829 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
5830 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
5831 passes, but produces negative #line number, once fixed, GCC is
5832 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
5833 C), it passes.
5834 * src/state.h (state_h): Code input lines on ints, not shorts.
5835
bb88b0fc
AD
58362002-04-08 Akim Demaille <akim@epita.fr>
5837
5838 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
5839 and then the grammar.
5840
9a636f47
AD
58412002-04-08 Akim Demaille <akim@epita.fr>
5842
5843 * src/system.h: No longer using strndup.
5844
680e8701
AD
58452002-04-07 Akim Demaille <akim@epita.fr>
5846
5847 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
5848 * src/output.c (output_table_data): Return the longest number.
5849 (prepare_tokens): Output `token_number_max').
5850 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
5851 New.
5852 Use them to define yy_token_number_type/TokenNumberType.
5853 Use this type for yytranslate.
5854 * tests/torture.at (Big triangle): Push the limit from 124 to
5855 253.
5856 * tests/regression.at (Web2c Actions): Adjust.
5857
817e9f41
AD
58582002-04-07 Akim Demaille <akim@epita.fr>
5859
5860 * tests/torture.at (Big triangle): New.
5861 (GNU AWK Grammar, GNU Cim Grammar): Move to...
5862 * tests/existing.at: here.
5863
5123689b
AD
58642002-04-07 Akim Demaille <akim@epita.fr>
5865
5866 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
5867 nritems.
5868 Adjust dependencies.
5869
f3849179
AD
58702002-04-07 Akim Demaille <akim@epita.fr>
5871
5872 * src/reader.c: Normalize increments to prefix form.
5873
bd02036a
AD
58742002-04-07 Akim Demaille <akim@epita.fr>
5875
5876 * src/reader.c, symtab.c: Remove debugging code.
5877
db8837cb
AD
58782002-04-07 Akim Demaille <akim@epita.fr>
5879
5880 Rename all the `bucket's as `symbol_t'.
5881
5882 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
5883 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
5884 * src/symtab.c, src/symtab.h (bucket): Rename as...
5885 (symbol_t): this.
5886 (symbol_list_new, bucket_check_defined, bucket_make_alias)
5887 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
5888 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5889 (buckets_new, buckets_free, buckets_do): Rename as...
5890 (symbol_list_new, symbol_check_defined, symbol_make_alias)
5891 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5892 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
5893 (symbols_new, symbols_free, symbols_do): these.
5894
72a23c97
AD
58952002-04-07 Akim Demaille <akim@epita.fr>
5896
5897 Use lib/hash for the symbol table.
5898
5899 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
5900 EOF.
5901 * src/lex.c (lex): Set the `number' member of new terminals.
5902 * src/reader.c (bucket_check_defined, bucket_make_alias)
5903 (bucket_check_alias_consistence, bucket_translation): New.
5904 (reader, grammar_free, readgram, token_translations_init)
5905 (packsymbols): Adjust.
5906 (reader): Number the predefined tokens.
5907 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5908 for predefined tokens.
5909 * src/symtab.h (bucket): Remove all the hash table related
5910 members.
5911 * src/symtab.c (symtab): Replace by...
5912 (bucket_table): this.
5913 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5914 (buckets_new, buckets_do): New.
5915
280a38c3
AD
59162002-04-07 Akim Demaille <akim@epita.fr>
5917
5918 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5919 (start_symbol, max_user_token_number, semantic_parser)
5920 (error_token_number): Initialize.
5921 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5922 Initialize.
5923 (reader): Don't.
5924 (errtoken, eoftoken, undeftoken, axiom): Extern.
5925
03b31c0c
AD
59262002-04-07 Akim Demaille <akim@epita.fr>
5927
5928 * src/gram.h (rule_s): prec and precsym are now pointers
5929 to the bucket giving the priority/associativity.
5930 Member `associativity' removed: useless.
5931 * src/reduce.c, src/conflicts.c: Adjust.
5932
8b3df748
AD
59332002-04-07 Akim Demaille <akim@epita.fr>
5934
5935 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5936 Properly escape the symbols' TAG when outputting them.
5937
e601aa1d
AD
59382002-04-07 Akim Demaille <akim@epita.fr>
5939
5940 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5941
b0299a2e
AD
59422002-04-07 Akim Demaille <akim@epita.fr>
5943
5944 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5945 (LArule): this, which is an array to rule_t*.
5946 * src/print.c, src/conflicts.c: Adjust.
5947
d7e1f00c
AD
59482002-04-07 Akim Demaille <akim@epita.fr>
5949
5950 * src/gram.h (rule_t): Rename `number' as `user_number'.
5951 `number' is a new member.
5952 Adjust dependencies.
5953 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5954
cc9305dd
AD
59552002-04-07 Akim Demaille <akim@epita.fr>
5956
5957 As a result of the previous patch, it is no longer needed
5958 to reorder ritem itself.
5959
5960 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5961
b0940840
AD
59622002-04-07 Akim Demaille <akim@epita.fr>
5963
5964 Be sure never to walk through RITEMS, but use only data related to
5965 the rules themselves. RITEMS should be banished.
5966
5967 * src/output.c (output_token_translations): Rename as...
5968 (prepare_tokens): this.
5969 In addition to `translate', prepare the muscles `tname' and
5970 `toknum', which were handled by...
5971 (output_rule_data): this.
5972 Remove, and move the remainder of its outputs into...
5973 (prepare_rules): this new routines, which also merges content from
5974 (output_gram): this.
5975 (prepare_rules): Be sure never to walk through RITEMS.
5976 (output_stos): Rename as...
5977 (prepare_stos): this.
5978 (output): Always invoke prepare_states, after all, just don't use it
5979 in the output if you don't need it.
5980
643a5994
AD
59812002-04-07 Akim Demaille <akim@epita.fr>
5982
5983 * src/LR0.c (new_state): Display `nstates' as the name of the
5984 newly created state.
5985 Adjust to initialize first_state and last_state if needed.
5986 Be sure to distinguish the initial from the final state.
5987 (new_states): Create the itemset of the initial state, and use
5988 new_state.
5989 * src/closure.c (closure): Now that the initial state has its
5990 items properly set, there is no need for a special case when
5991 creating `ruleset'.
5992
5993 As a result, now the rule 0, reducing to $axiom, is visible in the
5994 outputs. Adjust the test suite.
5995
5996 * tests/conflicts.at (Solved SR Conflicts)
5997 (Unresolved SR Conflicts): Adjust.
5998 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5999 * tests/conflicts.at (S/R in initial): New.
6000
b4c4ccc2
AD
60012002-04-07 Akim Demaille <akim@epita.fr>
6002
6003 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
6004 the RHS of the rules.
6005 * src/output.c (output_gram): Likewise.
6006
bba97eb2
AD
60072002-04-07 Akim Demaille <akim@epita.fr>
6008
6009 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
6010 bucket.
6011 Adjust all dependencies.
6012 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
6013 `number' of the buckets too.
6014 * src/gram.h: Include `symtab.h'.
6015 (associativity): Move to...
6016 * src/symtab.h: here.
6017 No longer include `gram.h'.
6018
c3b407f4
AD
60192002-04-07 Akim Demaille <akim@epita.fr>
6020
6021 * src/gram.h, src/gram.c (rules_rhs_length): New.
6022 (ritem_longest_rhs): Use it.
6023 * src/gram.h (rule_t): `number' is a new member.
6024 * src/reader.c (packgram): Set it.
6025 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
6026 the end of `rules', and count them out of `nrules'.
6027 (reduce_output, dump_grammar): Adjust.
6028 * src/print.c (print_grammar): It is no longer needed to check for
6029 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
6030 * tests/reduce.at (Reduced Automaton): New test.
6031
11652ab3
AD
60322002-04-07 Akim Demaille <akim@epita.fr>
6033
6034 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
6035 lacking `+ 1' to nrules, Bison reported as useless a token if it
6036 was used solely to set the precedence of the last rule...
6037
26b23c1a
AD
60382002-04-07 Akim Demaille <akim@epita.fr>
6039
6040 * data/bison.c++, data/bison.simple: Don't output the current file
6041 name in #line, to avoid useless diffs between two identical
6042 outputs under different names.
6043
18bcecb0
AD
60442002-04-07 Akim Demaille <akim@epita.fr>
6045
6046 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
6047 Normalize loops to using `< nrules + 1', not `<= nrules'.
6048
fa770c86
AD
60492002-04-07 Akim Demaille <akim@epita.fr>
6050
6051 * TODO: Update.
6052
d9b739c3
AD
60532002-04-07 Akim Demaille <akim@epita.fr>
6054
6055 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
6056 bucket.value as bucket.number.
6057
99013900
AD
60582002-04-07 Akim Demaille <akim@epita.fr>
6059
6060 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
6061 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
6062 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
6063 RHS, instead of being an index in RITEMS.
6064
e966383b
PE
60652002-04-04 Paul Eggert <eggert@twinsun.com>
6066
6067 * doc/bison.texinfo: Update copyright date.
6068 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
6069 (Symbols): Warn about running Bison in one character set,
6070 but compiling and/or running in an incompatible one.
6071 Warn about character code 256, too.
6072
60732002-04-03 Paul Eggert <eggert@twinsun.com>
6074
6075 * src/bison.data (YYSTACK_ALLOC): Depend on whether
6076 YYERROR_VERBOSE is nonzero, not whether it is defined.
6077
6078 Merge changes from bison-1_29-branch.
c307773e 6079
8d6c48b9
PE
60802002-03-20 Paul Eggert <eggert@twinsun.com>
6081
6082 Merge fixes from Debian bison_1.34-1.diff.
6083
6084 * configure.in (AC_PREREQ): 2.53.
6085
e53c6322
AD
60862002-03-20 Akim Demaille <akim@epita.fr>
6087
6088 * src/conflicts.c (log_resolution): Argument `resolution' is const.
6089
9ffbeca7
PE
60902002-03-19 Paul Eggert <eggert@twinsun.com>
6091
21db0b2a
PE
6092 * src/bison.simple (YYCOPY): New macro.
6093 (YYSTACK_RELOCATE): Use it.
6094 Remove Type arg; no longer needed. All callers changed.
6095 (yymemcpy): Remove; no longer needed.
6096
9ffbeca7
PE
6097 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
6098 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6099
642cb8f8
AD
61002002-03-19 Akim Demaille <akim@epita.fr>
6101
6102 Test and fix the #line outputs.
6103
6104 * tests/atlocal.at (GCC): New.
6105 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
6106 (Prologue synch line, ,%union synch line, Postprologue synch line)
6107 (Action synch line, Epilogue synch line): New tests.
6108 * src/reader.c (parse_union_decl): Define the muscle stype_line.
6109 * data/bison.simple, data/bison.c++: Use it.
6110
3c31a486
AD
61112002-03-19 Akim Demaille <akim@epita.fr>
6112
6113 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
6114 (Solved SR Conflicts, %expect not enough, %expect right)
6115 (%expect too much): Move to...
6116 * tests/conflicts.at: this new file.
6117
0d8bed56
AD
61182002-03-19 Akim Demaille <akim@epita.fr>
6119
6120 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6121 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
6122 that we can move to enums for instance.
6123 * src/output.c (token_definitions_output): Output a list of
6124 `token-name, token-number' instead of the #define.
6125 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
6126
9208d17f
AD
61272002-03-14 Akim Demaille <akim@epita.fr>
6128
6129 Use Gettext 0.11.1.
6130
af27eacb
RA
61312002-03-09 Robert Anisko <robert@lrde.epita.fr>
6132
6133 * data/bison.c++: Make the user able to add members to the generated
6134 parser by subclassing.
6135
9101a310
RA
61362002-03-05 Robert Anisko <robert@lrde.epita.fr>
6137
6138 * src/reader.c (read_additionnal_code): `c' should be an integer, not
6139 a character.
6140 Reported by Nicolas Tisserand and Nicolas Burrus.
6141
fff9bf0b
RA
61422002-03-04 Robert Anisko <robert@lrde.epita.fr>
6143
6144 * src/reader.c: Warn about lacking semi-colons, do not complain.
6145
64dba31e
RA
61462002-03-04 Robert Anisko <robert@lrde.epita.fr>
6147
6148 * data/bison.c++: Remove a debug line.
6149
374f5a14
RA
61502002-03-04 Robert Anisko <robert@lrde.epita.fr>
6151
6152 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
6153 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
6154 provide a default implementation.
6155
bfcf1f3a
AD
61562002-03-04 Akim Demaille <akim@epita.fr>
6157
6158 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
6159 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
6160 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
6161 * tests/semantic.at (Parsing Guards): Similarly.
6162 * src/reader.at (readgram): Complain if the last rule is not ended
6163 with a semi-colon.
6164
65ccf9fc
AD
61652002-03-04 Akim Demaille <akim@epita.fr>
6166
6167 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
6168 * src/closure.c: here.
6169 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
6170 RTC.
6171 * src/warshall.h, src/warshall.c: Remove.
6172 * tests/sets.at (Broken Closure): Adjust.
6173
d0039cbc
AD
61742002-03-04 Akim Demaille <akim@epita.fr>
6175
6176 * src/output.c (output_skeleton): tempdir is const.
6177 bytes_read is unused.
6178
345cea78
AD
61792002-03-04 Akim Demaille <akim@epita.fr>
6180
6181 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6182 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
6183 Update.
6184 From Michael Hayes.
6185
564801f7
AD
61862002-03-04 Akim Demaille <akim@epita.fr>
6187
6188 * src/closure.c (closure): `r' is unused.
6189
e5352bc7
AD
61902002-03-04 Akim Demaille <akim@epita.fr>
6191
6192 * tests/sets.at (Broken Closure): Add the ending `;'.
6193 * src/reader.at (readgram): Complain if a rule is not ended with a
6194 semi-colon.
6195
914feea9
AD
61962002-03-04 Akim Demaille <akim@epita.fr>
6197
6198 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
6199 (count_sr_conflicts): Use bitset_count.
6200 * src/reduce.c (inaccessable_symbols): Ditto.
6201 (bits_size): Remove.
6202 * src/warshall.h, src/warshall.c: Convert to bitsetv.
6203
f0250de6
AD
62042002-03-04 Akim Demaille <akim@epita.fr>
6205
6206 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
6207 * src/reduce.c: Remove the `bitset_zero's following the
6208 `bitset_create's, as now it is performed by the latter.
6209
ef017502
AD
62102002-03-04 Akim Demaille <akim@epita.fr>
6211
6212 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
6213 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
6214 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
6215 latest sources from Michael.
6216
76514394
AD
62172002-03-04 Akim Demaille <akim@epita.fr>
6218
6219 * src/output.c (output): Don't free the grammar.
6220 * src/reader.c (grammar_free): New.
6221 * src/main.c (main): Call it and don't free symtab here.
6222
55024580
AD
62232002-03-04 Akim Demaille <akim@epita.fr>
6224
6225 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
6226 before returning.
6227 Reported by Benoit Perrot.
6228
f9abaa2c
AD
62292002-03-04 Akim Demaille <akim@epita.fr>
6230
6231 Use bitset operations when possible, not loops over bits.
6232
6233 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
6234 bitset_or.
6235 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
6236 * src/reduce.c (useless_nonterminals): Formatting changes.
6237 * src/warshall.c (TC): Use bitset_or.
6238
0e721e75
AD
62392002-03-04 Akim Demaille <akim@epita.fr>
6240
6241 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
6242 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
6243 Ditto.
6244
0fb1ffb1
AD
62452002-03-04 Akim Demaille <akim@epita.fr>
6246
6247 * src/lalr.c (F): Now a bitset*.
6248 Adjust all dependencies.
6249
b86796bf
AD
62502002-03-04 Akim Demaille <akim@epita.fr>
6251
6252 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
6253 Adjust all dependencies.
6254
602bbf31
AD
62552002-03-04 Akim Demaille <akim@epita.fr>
6256
6257 * src/L0.c, src/LR0.h (nstates): Be size_t.
6258 Adjust comparisons (signed vs unsigned).
6259 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
6260 bitset*.
6261 Adjust all dependencies.
6262
d8a0245c
AD
62632002-03-04 Akim Demaille <akim@epita.fr>
6264
6265 * src/closure.c (firsts): Now, also a bitset.
6266 Adjust all dependencies.
6267 (varsetsize): Remove, now unused.
6268 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
6269
34ba9743
AD
62702002-03-04 Akim Demaille <akim@epita.fr>
6271
6272 * src/print.c: Convert to use bitset.h, not hand coded iterations
6273 over ints.
6274
ed86e78c
AD
62752002-03-04 Akim Demaille <akim@epita.fr>
6276
6277 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
6278
dfdb1797
AD
62792002-03-04 Akim Demaille <akim@epita.fr>
6280
6281 * src/closure.c (ruleset): Be a bitset.
6282 (rulesetsize): Remove.
6283
7086e707
AD
62842002-03-04 Akim Demaille <akim@epita.fr>
6285
6286 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6287 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
6288 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
6289 * src/closure.c (fderives): Be an array of bitsets.
6290
98254360
RA
62912002-02-28 Robert Anisko <robert@lrde.epita.fr>
6292
6293 * data/bison.c++: Merge the two generated headers. Insert a copyright
6294 notice in each output file.
6295
a75c057f
AD
62962002-02-28 Akim Demaille <akim@epita.fr>
6297
6298 * data/bison.c++: Copy the prologue of bison.simple to fetch
6299 useful M4 definitions, such as b4_header_guard.
6300
06b00abc
AD
63012002-02-25 Akim Demaille <akim@epita.fr>
6302
6303 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
6304 translator friendly scheme for the bgr
6305 copyright notice.
06b00abc 6306
70e7d534
AD
63072002-02-25 Akim Demaille <akim@epita.fr>
6308
6309 * src/output.c (header_output): Remove, now handled completely via
6310 M4.
6311
abe017f6
AD
63122002-02-25 Akim Demaille <akim@epita.fr>
6313
6314 * m4/m4.m4: New, from CVS Autoconf.
6315 * configure.in: Invoke it.
6316 * src/output.c (output_skeleton): Use its result instead of the
6317 hard coded name.
6318
381fb12e
AD
63192002-02-25 Akim Demaille <akim@epita.fr>
6320
6321 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
6322 Fileutils 4.1.5.
6323 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
6324 * src/output.c (output_skeleton): Use mkstemp to create a real
6325 temporary file.
6326 Move the filling of `skeleton' and its muscle to...
6327 (prepare): here.
6328 (output): Move the definition of the prologue muscle to...
6329 (prepare): here.
6330 * src/system.h (DEFAULT_TMPDIR): New.
6331
6f38107f
PE
63322002-02-14 Paul Eggert <eggert@twinsun.com>
6333
6334 Remove the support for C++ namespace cleanliness; it was
6335 causing more problems than it was curing, since it didn't work
6336 properly on some nonstandard C++ compilers. This can wait
6337 for a proper C++ parser.
6338
6339 * NEWS: Document this.
6340 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
6341 of C++, as it's treated like C now.
6342 * src/bison.simple (YYSTD): Remove.
6343 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
6344 Treat C++ just like Standard C instead of trying to support
6345 namespace cleanliness.
6346
80cce3da
AD
63472002-02-14 Akim Demaille <akim@epita.fr>
6348
6349 * tests/regression.at (else): Adjust to Andreas' change.
6350
842e8679
AD
63512002-02-14 Akim Demaille <akim@epita.fr>
6352
6353 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
6354
4bda3f10
AD
63552002-02-13 Andreas Schwab <schwab@suse.de>
6356
6357 * src/output.c (output_rule_data): Don't output NULL, it might
6358 not be defined yet.
6359
4162fa07 63602002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 6361
4162fa07
RA
6362 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6363 (Copyright notice): Update.
b418ecd8 6364
bd16a5dc
AD
63652002-02-11 Akim Demaille <akim@epita.fr>
6366
6367 * tests/regression.at (%nonassoc and eof): Don't include
6368 nonportable headers.
6369
8d69a1a3
RA
63702002-02-08 Robert Anisko <robert@lrde.epita.fr>
6371
6372 * data/bison.c++: Correct error recovery. Make the user able to
6373 initialize the starting location.
6374
9b2d0677
AD
63752002-02-07 Akim Demaille <akim@epita.fr>
6376
6377 * tests/input.at: New.
6378
69e2658b
RA
63792002-02-07 Robert Anisko <robert@lrde.epita.fr>
6380
6381 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 6382 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
6383 directives around tables only needed for debugging.
6384
4aacc3a7
RA
63852002-02-07 Robert Anisko <robert@lrde.epita.fr>
6386
6387 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6388 C++ parsers.
6389 (yy::b4_name::parse): Use print_.
6390
762a801e
RA
63912002-02-07 Robert Anisko <robert@lrde.epita.fr>
6392
6393 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6394
4bb2bc3f
RA
63952002-02-07 Robert Anisko <robert@lrde.epita.fr>
6396
6397 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6398 C++ parsers.
6399 (yy::b4_name::parse): Build verbose error messages, and use error_.
6400
6b45a3ca
RA
64012002-02-06 Robert Anisko <robert@lrde.epita.fr>
6402
6403 * data/bison.c++: Fix m4 quoting in comments.
6404
50997c6e
RA
64052002-02-06 Robert Anisko <robert@lrde.epita.fr>
6406
6407 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6408 not expanded by m4.
6409
3f3eed27
AD
64102002-02-05 Akim Demaille <akim@epita.fr>
6411
6412 * data/bison.c++: Adjust to the M4 back end.
6413 More is certainly needed.
6414
be2a1a68
AD
64152002-02-05 Akim Demaille <akim@epita.fr>
6416
6417 Give a try to M4 as a back end.
6418
6419 * lib/readpipe.c: New, from wdiff.
6420 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6421 BISON_HAIRY.
6422 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6423 specific values. Now it is m4 that performs the lookup.
6424 * src/parse-skel.y: Remove.
6425 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6426 * src/output.c (actions_output, guards_output)
6427 (token_definitions_output): No longer keeps track of the output
6428 line number, hence remove the second argument.
6429 (guards_output): Check against the guard member of a rule, not the
6430 action member.
6431 Adjust callers.
6432 (output_skeleton): Don't look for the skeleton location, let m4 do
6433 that.
6434 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6435 file will be used.
6436 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6437 (prepare): Given that for the time being changesyntax is not
6438 usable in M4, rename the muscles using `-' to `_'.
6439 Define `defines_flag', `output_parser_name' and `output_header_name'.
6440 * src/output.h (actions_output, guards_output)
6441 (token_definitions_output): Adjust prototypes.
6442 * src/scan-skel.l: Instead of scanning the skeletons, it now
6443 processes the output of m4: `__oline__' and `#output'.
6444 * data/bison.simple: Adjust to be used by M4(sugar).
6445 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6446 to date.
6447 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6448 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6449 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6450 shamelessly stolen from CVS Autoconf.
6451
beda758b
AD
64522002-02-05 Akim Demaille <akim@epita.fr>
6453
6454 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
6455 * configure.in: Check for the declarations of free and malloc.
6456 * src/muscle_tab.c: Adjust.
6457
5ece6d43
AD
64582002-02-05 Akim Demaille <akim@epita.fr>
6459
6460 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
6461 which have no values.
6462
5bb18f9a
AD
64632002-02-05 Akim Demaille <akim@epita.fr>
6464
6465 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
6466 * data/: here.
6467
894dd62e
PE
64682002-01-29 Paul Eggert <eggert@twinsun.com>
6469
6470 * src/bison.simple (YYSIZE_T): Do not define merely because
6471 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
6472 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6473
82841af7
AD
64742002-01-27 Akim Demaille <akim@epita.fr>
6475
6476 Fix `%nonassoc and eof'.
6477
6478 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
6479 which were not properly copied! Replace
6480 memcpy (res->errs, src->errs, src->nerrs);
6481 with
6482 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
6483 !!!
6484 * tests/regression.at (%nonassoc and eof): Adjust to newest
6485 Autotest: `.' is not in the PATH.
6486
318b76e9
AD
64872002-01-27 Akim Demaille <akim@epita.fr>
6488
6489 * tests/sets.at (AT_EXTRACT_SETS): New.
6490 (Nullable): Use it.
6491 (Firsts): New.
6492
30d2f3d5
AD
64932002-01-26 Akim Demaille <akim@epita.fr>
6494
6495 * tests/actions.at, tests/calc.at, tests/headers.at,
6496 * tests/torture.at: Adjust to the newest Autotest which no longer
6497 forces `.' in the PATH.
6498
30f8c395
AD
64992002-01-25 Akim Demaille <akim@epita.fr>
6500
6501 * tests/regression.at (%nonassoc and eof): New.
6502 Suggested by Robert Anisko.
6503
29ae55f1
AD
65042002-01-24 Akim Demaille <akim@epita.fr>
6505
6506 Bison dumps core when trying to complain about broken input files.
6507 Reported by Cris van Pelt.
6508
6509 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
6510 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
6511 into...
6512 (Invalid inputs): Strengthen: exercise parse_percent_token.
6513
2b548aa6
RA
65142002-01-24 Robert Anisko <robert.anisko@epita.fr>
6515
6516 * src/Makefile.am: Add bison.c++.
6517 * src/bison.c++: New skeleton.
6518
bb0146c2
AD
65192002-01-21 Paolo Bonzini <bonzini@gnu.org>
6520
6521 * po/it.po: New.
6522
bec30531
AD
65232002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6524
6525 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
6526
fc6edc45
MA
65272002-01-20 Marc Autret <marc@gnu.org>
6528
6529 * src/files.c (compute_output_file_names): Fix
6530
5e5d5415
MA
65312002-01-20 Marc Autret <marc@gnu.org>
6532
6533 * tests/output.at: New test.
6534 * src/files.c (compute_base_names): Don't map extensions when
6535 the YACC flag is set, use defaults.
6536 Reported by Evgeny Stambulchik.
6537
44ea3fbd
MA
65382002-01-20 Marc Autret <marc@gnu.org>
6539
bb0146c2 6540 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
6541 compilers as well (i.e. the vendor C compiler).
6542 Suggested by Albert Chin-A-Young.
6543
338963d1
TVH
65442002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
6545
6546 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
6547 canonical definition.
6548 * src/system.h: Use the canonical definition for PARAMS (avoids
6549 a conflict with the macro from lib/hash.h).
6550
c57b2479
AD
65512002-01-11 Akim Demaille <akim@epita.fr>
6552
6553 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 6554 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 6555
b85810ae
AD
65562002-01-09 Akim Demaille <akim@epita.fr>
6557
6558 * src/files.c, src/files.h (output_infix): New.
6559 (tab_extension): Remove.
6560 (compute_base_names): Compute the former, drop the latter.
6561 * src/output.c (prepare): Insert the muscles `output-infix', and
6562 `output-suffix'.
6563 * src/parse-skel.y (string, string.1): New.
6564 (section.header): Use it.
6565 (section.yacc): Remove.
6566 (prefix): Remove too.
6567 * src/scan-skel.l: Adjust.
6568 * src/bison.simple, src/bison.hairy: Adjust.
6569
cae60122
AD
65702002-01-09 Akim Demaille <akim@epita.fr>
6571
6572 * configure.in (WERROR_CFLAGS): Compute it.
6573 * src/Makefile.am (CFLAGS): Pass it.
6574 * tests/atlocal.in (CFLAGS): Idem.
6575 * src/files.c: Fix a few warnings.
6576 (get_extension_index): Remove, unused.
6577
ae404801
AD
65782002-01-08 Akim Demaille <akim@epita.fr>
6579
6580 * src/getargs.c (AS_FILE_NAME): New.
6581 (getargs): Use it to convert DOSish file names.
6582 * src/files.c (base_name): Rename as full_base_name to avoid
6583 clashes with `base_name ()'.
6584 (filename_split): New.
6585 (compute_base_names): N-th rewrite, using filename_split.
6586
22312b71
AD
65872002-01-08 Akim Demaille <akim@epita.fr>
6588
6589 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
6590 New, stolen from the Fileutils 4.1.
6591 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6592 * configure.in: Check for the presence of memrchr, and of its
6593 prototype.
6594
a67cef01
TVH
65952002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
6596
6597 * lib/hash.h (__P): Added definition for this macro.
6598 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
6599 BUILT_SOURCES, to ensure they are generated first.
6600 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
6601 %error-verbose to allow bootstrapping with bison 1.30x.
6602
2b25d624
AD
66032002-01-06 Akim Demaille <akim@epita.fr>
6604
6605 * src/reader.c (parse_braces): Don't fetch the next char, the
6606 convention is to fetch on entry.
6607 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
6608 'switch' without a following semicolon.
6609 * tests/regression.at (braces parsing): New.
6610
3460813b
AD
66112002-01-06 Akim Demaille <akim@epita.fr>
6612
6613 Bison is dead wrong in its RR conflict reports.
6614
6615 * tests/torture.at (GNU Cim Grammar): New.
6616 * src/conflicts.c (count_rr_conflicts): Fix.
6617
73784c64
AD
66182002-01-06 Akim Demaille <akim@epita.fr>
6619
6620 Creating package.m4 from configure.ac causes too many problems.
6621
6622 * tests/Makefile.am (package.m4): Create it by hand,
6623 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
6624
25d81090
AD
66252002-01-06 Akim Demaille <akim@epita.fr>
6626
6627 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
6628 skeleton.h.
6629
a9b8959e
PE
66302002-01-04 Paul Eggert <eggert@twinsun.com>
6631
6632 * doc/bison.texinfo (Debugging):
6633 Remove YYSTDERR; it's no longer defined or used.
6634 Also, s/cstdio.h/cstdio/.
6635
25d81090
AD
66362002-01-03 Akim Demaille <akim@epita.fr>
6637
6638 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
6639
1109455c
AD
66402002-01-03 Akim Demaille <akim@epita.fr>
6641
6642 * src/parse-skel.y (process_skeleton): Don't bind the parser's
6643 tracing code to --trace, wait for a better --trace option, with
6644 args.
6645
7ea5e977
AD
66462002-01-03 Akim Demaille <akim@epita.fr>
6647
6648 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
6649 The ISO C++ standard is extremely clear about it: stderr is
6650 considered a macro, not a regular symbol (see table 94 `Header
6651 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
6652 Therefore std:: does not apply to it. It still does with fprintf.
6653 Also, s/cstdio.h/cstdio/.
6654
fab5b110
AD
66552002-01-03 Akim Demaille <akim@epita.fr>
6656
6657 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
6658 for non system headers.
6659
aed7fd9b
AD
66602002-01-02 Akim Demaille <akim@epita.fr>
6661
6662 Equip the skeleton chain with location tracking, runtime trace,
6663 pure parser and scanner.
6664
6665 * src/parse-skel.y: Request a pure parser, locations, and prefix
6666 renaming.
6667 (%union): Having several members with the same type does not help
6668 type mismatches, simplify.
6669 (YYPRINT, yyprint): New.
6670 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
6671 (skel_error): this.
6672 Handle locations.
6673 * src/scan-skel.l: Adjust to these changes.
6674 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
6675 (LOCATION_PRINT, skel_control_t): New.
6676
24fad99e
AD
66772001-12-30 Akim Demaille <akim@epita.fr>
6678
6679 * src/parse-skel.y: Get rid of the shift/reduce conflict:
6680 replace `gb' with BLANKS.
6681 * src/scan-skel.l: Adjust.
6682
a4b36db4
AD
66832001-12-30 Akim Demaille <akim@epita.fr>
6684
6685 * src/system.h: We don't need nor want bcopy.
6686 Throw away MS-DOS crap: we don't need getpid.
6687 * configure.in: We don't need strndup. It was even causing
6688 problems: because Flex includes the headers *before* us,
6689 _GNU_SOURCE is not defined by config.h, and therefore strndup was
6690 not visible.
6691 * lib/xstrndup.c: New.
6692 * src/scan-skel.l: Use it.
6693 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
6694 * src/parse-skel.y: Use %directives instead of #defines.
6695
1239777d
AD
66962001-12-30 Akim Demaille <akim@epita.fr>
6697
6698 * src/skeleton.h: New.
6699 * src/output.c (output_parser, output_master_parser): Remove, dead
6700 code.
6701 * src/output.h (get_lines_number, actions_output, guards_output)
6702 (token_definitions_output): Prototype them.
6703 * src/parse-skel.y: Add the license notice.
6704 Include output.h and skeleton.h.
6705 (process_skeleton): Returns void, and takes a single parameter.
6706 * src/scan-skel.l: Add the license notice.
6707 Include skeleton.h.
6708 Don't use %option yylineno: it seems that then Flex imagines
6709 REJECT has been used, and therefore it won't reallocate its
6710 buffers (which makes no other sense to me than a bug). It results
6711 in warnings for `unused: yy_flex_realloc'.
6712
9b3add5b
RA
67132001-12-30 Robert Anisko <robert.anisko@epita.fr>
6714
6715 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6716 (MUSCLE_INSERT_PREFIX): ...to there.
6717 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6718 (MUSCLE_INSERT_PREFIX): Move from here...
6719
6720 * src/bison.hairy: Add a section directive. Put braces around muscle
6721 names. This parser skeleton is still broken, but Bison should not
6722 choke on a bad muscle 'syntax'.
6723 * src/bison.simple: Add a section directive. Put braces around muscle
6724 names.
6725
6726 * src/files.h (strsuffix, stringappend): Add declarations.
6727 (tab_extension): Add declaration.
6728 (short_base_name): Add declaration.
6729
6730 * src/files.c (strsuffix, stringappend): No longer static. These
6731 functions are used in the skeleton parser.
6732 (tab_extension): New.
6733 (compute_base_names): Use the computations done in this function
fab5b110 6734 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
6735 names.
6736 (short_base_name): No longer static.
6737
6738 * src/output.c (output_skeleton): New.
6739 (output): Disable call to output_master_parser, and give a try to
6740 a new skeleton handling system.
6741 (guards_output, actions_output): No longer static.
6742 (token_definitions_output, get_lines_number): No longer static.
6743
6744 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
6745
fab5b110 6746 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
6747 parse-skel.y.
6748
6749 * src/parse-skel.y: New file.
6750 * src/scan-skel.l: New file.
6751
b5b61c61
AD
67522001-12-29 Akim Demaille <akim@epita.fr>
6753
6754 %name-prefix is broken.
6755
6756 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
6757 Adjust all dependencies.
6758 * tests/headers.at (export YYLTYPE): Strengthen this test: use
6759 %name-prefix.
6760
6761 Renaming yylval but not yylloc is not consistent. Now we do.
6762
6763 * src/bison.simple: Prefix yylloc if used.
6764 * doc/bison.texinfo (Decl Summary): Document that.
6765
8c9a50be
AD
67662001-12-29 Akim Demaille <akim@epita.fr>
6767
6768 * doc/bison.texinfo: Promote `%long-directive' over
6769 `%long_directive'.
6770 Remove all references to fixed-output-files, yacc is enough.
6771
d99361e6
AD
67722001-12-29 Akim Demaille <akim@epita.fr>
6773
6774 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
6775 user prologue. These are defaults.
6776 * tests/actions.at (Mid-rule actions): Make sure the user can
6777 define YYDEBUG and YYERROR_VERBOSE.
6778
b9cecb91
AD
67792001-12-29 Akim Demaille <akim@epita.fr>
6780
6781 * src/output.c (header_output): Don't forget to export YYLTYPE and
6782 yylloc.
6783 * tests/headers.at (export YYLTYPE): New, make sure it does.
6784 * tests/regression.at (%union and --defines, Invalid CPP headers):
6785 Move to...
6786 * tests/headers.at: here.
6787
aea13e97
AD
67882001-12-29 Akim Demaille <akim@epita.fr>
6789
6790 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
6791
931394cb
AD
67922001-12-29 Akim Demaille <akim@epita.fr>
6793
6794 * tests/actions.at (Mid-rule actions): Output on a single line
6795 instead of several.
6796
704a47c4
AD
67972001-12-29 Akim Demaille <akim@epita.fr>
6798
6799 * doc/bison.texinfo: Formatting changes.
6800
091e20bb
AD
68012001-12-29 Akim Demaille <akim@epita.fr>
6802
6803 Don't store the token defs in a muscle, just be ready to output it
6804 on command. Now possible via `symbols'. Fixes a memory leak.
6805
6806 * src/output.c (token_definitions_output): New.
6807 (output_parser, header_output): Use it.
6808 * src/reader.c (symbols_save): Remove.
6809
cce71710
AD
68102001-12-29 Akim Demaille <akim@epita.fr>
6811
6812 * src/bison.simple: Do not provide a default for YYSTYPE and
6813 YYLTYPE before the user's prologue. Otherwise it's hardly... a
6814 default.
6815
82c035a8
AD
68162001-12-29 Akim Demaille <akim@epita.fr>
6817
6818 Mid-rule actions are simply... ignored!
6819
6820 * src/reader.c (readgram): Be sure to attach mid-rule actions to
6821 the empty-rule associated to the dummy symbol, not to the host
6822 rule.
6823 * tests/actions.at (Mid-rule actions): New.
6824
8419d367
AD
68252001-12-29 Akim Demaille <akim@epita.fr>
6826
6827 Memory leak.
6828
6829 * src/reader.c (reader): Free grammar.
6830
375d5806
AD
68312001-12-29 Akim Demaille <akim@epita.fr>
6832
6833 Memory leak.
6834
6835 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
6836 since it allocates it for each state, although only one is needed.
6837 (allocate_storage): Do it here.
6838
f51cb8ff
AD
68392001-12-29 Akim Demaille <akim@epita.fr>
6840
6841 * src/options.h, src/options.c (create_long_option_table): Rename
6842 as...
6843 (long_option_table_new): this, with a clearer prototype.
6844 (percent_table): Remove, unused,
6845 * src/getargs.c (getargs): Adjust.
6846
29e88316
AD
68472001-12-29 Akim Demaille <akim@epita.fr>
6848
6849 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
6850 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
6851 as states.
6852
b9f71f19
AD
68532001-12-29 Akim Demaille <akim@epita.fr>
6854
6855 * src/lalr.c (build_relations): Rename `states' as `states1'.
6856 Sorry, I don't understand exactly what it is, no better name...
6857
1a2b5d37
AD
68582001-12-29 Akim Demaille <akim@epita.fr>
6859
6860 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
6861 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
6862 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
6863 as rules.
6864
1cca533e
AD
68652001-12-29 Akim Demaille <akim@epita.fr>
6866
6867 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
6868 ago.
6869
c03ae966
AD
68702001-12-29 Akim Demaille <akim@epita.fr>
6871
6872 * src/reader.c, src/reader.h (user_toknums): Remove.
6873 Adjust all users to use symbols[i]->user_token_number.
6874
5a670b1e
AD
68752001-12-29 Akim Demaille <akim@epita.fr>
6876
6877 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
6878 Adjust all users to use symbols[i]->prec or ->assoc.
6879
ad949da9
AD
68802001-12-29 Akim Demaille <akim@epita.fr>
6881
6882 * src/reader.c, src/reader.h (tags): Remove.
6883 Adjust all users to use symbols[i]->tag.
6884
0e78e603
AD
68852001-12-29 Akim Demaille <akim@epita.fr>
6886
6887 * src/gram.h, src/gram.c (symbols): New, similar to state_table
6888 and rule_table.
6889 * src/reader.c (packsymbols): Fill this table.
6890 Drop sprec.
6891 * src/conflicts.c (resolve_sr_conflict): Adjust.
6892 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
6893 single table.
6894 Use symbols[i]->tag instead of tags[i].
6895
213e640e
AD
68962001-12-29 Akim Demaille <akim@epita.fr>
6897
6898 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
6899 In addition, put a comment in there, to replace...
6900 * tests/regression.at (%union and C comments): Remove.
6901
e7b8bef1
AD
69022001-12-29 Akim Demaille <akim@epita.fr>
6903
6904 * tests/regression.at (Web2c Actions): Blindly move the actual
6905 output as expected output. The contents *seem* right to me, but I
6906 can't pretend reading perfectly parser tables... Nonetheless, all
6907 the other tests pass correctly, the table look OK, even though the
6908 presence of `$axiom' is to be noted: AFAICS it is useless (but
6909 harmless).
6910
b68e7744
AD
69112001-12-29 Akim Demaille <akim@epita.fr>
6912
6913 * src/reader.c (readgram): Don't add the rule 0 if there were no
6914 rules read. In other words, add it _after_ having performed
6915 grammar sanity checks.
6916 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6917
78d5bae9
AD
69182001-12-29 Akim Demaille <akim@epita.fr>
6919
6920 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6921 visible, and some states have now a different number.
6922
ff442794
AD
69232001-12-29 Akim Demaille <akim@epita.fr>
6924
6925 * src/reader.c (readgram): Bind the initial rule's lineno to that
6926 of the first rule.
6927 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6928 (Solved SR Conflicts): Adjust rule 0's line number.
6929
610ab194
AD
69302001-12-29 Akim Demaille <akim@epita.fr>
6931
6932 Fix the `GAWK Grammar' failure.
6933
6934 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6935 the reductions of the first state which was mistakenly confused
6936 with the final state because precisely final_state was initialized
6937 to 0.
6938 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6939 now noticed by Bison.
6940 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6941 have a reduction on $default.
6942
29d29c8f
AD
69432001-12-29 Akim Demaille <akim@epita.fr>
6944
6945 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6946 rule line numbers.
6947 * src/closure.c (print_closure): Likewise.
6948 * src/derives.c (print_derives): Likewise.
6949 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6950 now.
6951
7c6b64d0
AD
69522001-12-29 Akim Demaille <akim@epita.fr>
6953
6954 * src/lalr.c (lookaheads_print): New.
6955 (lalr): Call it when --trace-flag.
6956 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6957 are dumped.
6958
3d4daee3
AD
69592001-12-29 Akim Demaille <akim@epita.fr>
6960
6961 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6962 when walking through ritem, even via rule->rhs.
6963 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6964 (useful_production, useless_nonterminals): Likewise.
6965 (reduce_grammar_tables): Likewise, plus update nritems.
6966 * src/nullable.c (set_nullable): Likewise.
6967 * src/lalr.c (build_relations): Likewise.
6968 * tests/sets.at (Nullable): Adjust.
6969 Fortunately, now, the $axiom is no longer nullable.
6970
9e7f6bbd
AD
69712001-12-29 Akim Demaille <akim@epita.fr>
6972
6973 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6974 the 0-sentinel.
6975 * src/gram.c (ritem_longest_rhs): Likewise.
6976 * src/reduce.c (nonterminals_reduce): Likewise.
6977 * src/print_graph.c (print_graph): Likewise.
6978 * src/output.c (output_rule_data): Likewise.
6979 * src/nullable.c (set_nullable): Likewise.
6980
255ef638
AD
69812001-12-29 Akim Demaille <akim@epita.fr>
6982
6983 * src/output.c: Comment changes.
6984
0d8a7363
AD
69852001-12-27 Paul Eggert <eggert@twinsun.com>
6986
6987 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6988 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6989 Sparc, as they were causing more porting problems than the
6990 (minor) performance improvement was worth.
6991
6992 Also, catch up with 1.31's YYSTD.
6993
3db472b9
AD
69942001-12-27 Akim Demaille <akim@epita.fr>
6995
6996 * src/output.c (output_gram): Rely on nritems, not the
6997 0-sentinel. See below.
6998 Use -1 as separator, not 0.
6999 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
7000 Rely on -1 as separator in yyrhs, instead of 0.
7001 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
7002 twice `Now at end of input', therefore there are two lines less to
7003 expect.
7004
b365aa05
AD
70052001-12-27 Akim Demaille <akim@epita.fr>
7006
7007 * tests/regression.at (Unresolved SR Conflicts):
7008 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
7009 below.
7010
30171f79
AD
70112001-12-27 Akim Demaille <akim@epita.fr>
7012
7013 * src/LR0.c (new_state): Recognize the final state by the fact it
7014 is reached by eoftoken.
7015 (insert_start_shifting_state, insert_eof_shifting_state)
7016 (insert_accepting_state, augment_automaton): Remove, since now
7017 these states are automatically computed from the initial state.
7018 (generate_states): Adjust.
7019 * src/print.c: When reporting a rule number to the user, substract
7020 1, so that the axiom rule is rule 0, and the first user rule is 1.
7021 * src/reduce.c: Likewise.
7022 * src/print_graph.c (print_core): For the time being, just as for
7023 the report, depend upon --trace-flags to dump the full set of
7024 items.
7025 * src/reader.c (readgram): Once the grammar read, insert the rule
7026 0: `$axiom: START-SYMBOL $'.
7027 * tests/set.at: Adjust: rule 0 is now displayed, and since the
7028 number of the states has changed (the final state is no longer
7029 necessarily the last), catch up.
7030
75142d45
AD
70312001-12-27 Akim Demaille <akim@epita.fr>
7032
7033 Try to make the use of the eoftoken valid. Given that its value
7034 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
7035 is used instead of > 0 where appropriate, (ii), depend upon nritems
7036 instead of the 0-sentinel.
7037
7038 * src/gram.h, src/gram.c (nritems): New.
7039 Expected to be duplication of nitems, but for the time being...
7040 * src/reader.c (packgram): Assert nritems and nitems are equal.
7041 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
7042 * src/closure.c (print_closure, print_fderives): Likewise.
7043 * src/gram.c (ritem_print): Likewise.
7044 * src/print.c (print_core, print_grammar): Likewise.
7045 * src/print_graph.c: Likewise.
7046
b7c49edf
AD
70472001-12-27 Akim Demaille <akim@epita.fr>
7048
7049 * src/main.c (main): If there are complains after grammar
7050 reductions, then output the report anyway if requested, then die.
7051 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
7052 * src/reader.c (eoftoken): New.
7053 (parse_token_decl): If the token being defined has value `0', it
7054 is the eoftoken.
7055 (packsymbols): No longer hack `tags' to insert `$' by hand.
7056 Be sure to preserve the value of the eoftoken.
7057 (reader): Make sure eoftoken is defined.
7058 Initialize nsyms to 0: now eoftoken is created just like the others.
7059 * src/print.c (print_grammar): Don't special case the eof token.
7060 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
7061 lie anyway, albeit pleasant.
7062 * tests/calc.at: Exercise error messages with eoftoken.
7063 Change the grammar so that empty input is invalid.
7064 Adjust expectations.
7065 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
7066
ec2da99f
AD
70672001-12-27 Akim Demaille <akim@epita.fr>
7068
7069 * configure.in: Check the protos of strchr ans strspn.
7070 Replace strchr if needed.
7071 * src/system.h: Provide the protos of strchr, strspn and memchr if
7072 missing.
7073 * lib/strchr.c: New.
7074 * src/reader.c (symbols_save): Use strchr.
7075
8adfa272
AD
70762001-12-27 Akim Demaille <akim@epita.fr>
7077
7078 * src/print.c, src/print_graph.c (escape): New.
7079 Use it to quote the TAGS outputs.
7080 * src/print_graph.c (print_state): Now errors are in red, and
7081 reductions in green.
7082 Prefer high to wide: output the state number on a line of its own.
7083
80dac38c
AD
70842001-12-27 Akim Demaille <akim@epita.fr>
7085
7086 * src/state.h, src/state.c (reductions_new): New.
7087 * src/LR0.c (set_state_table): Let all the states have a
7088 `reductions', even if reduced to 0.
7089 (save_reductions): Adjust.
7090 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
7091 * src/print.c (print_reductions, print_actions): Adjust.
7092 * src/output.c (action_row): Adjust.
7093
2cec70b9
AD
70942001-12-27 Akim Demaille <akim@epita.fr>
7095
7096 * src/state.h, src/state.c (errs_new, errs_dup): New.
7097 * src/LR0.c (set_state_table): Let all the states have an errs,
7098 even if reduced to 0.
7099 * src/print.c (print_errs, print_reductions): Adjust.
7100 * src/output.c (output_actions, action_row): Adjust.
7101 * src/conflicts.c (resolve_sr_conflict): Adjust.
7102
13ca549a
AD
71032001-12-27 Akim Demaille <akim@epita.fr>
7104
7105 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
7106
5092aba5
AD
71072001-12-27 Akim Demaille <akim@epita.fr>
7108
7109 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
7110 * src/print.c: here.
7111 (lookaheadset, shiftset): New, used as additional storage by
7112 print_reductions.
7113 (print_results): Adjust.
7114 (print_shifts, print_gotos, print_errs): New, extracted from...
7115 (print_actions): here.
7116 * src/print_graph.c (print_actions): Remove dead code.
7117
11e2beca
AD
71182001-12-27 Akim Demaille <akim@epita.fr>
7119
7120 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
7121 `$n' and `@n'.
7122
dac3c910
AD
71232001-12-27 Akim Demaille <akim@epita.fr>
7124
7125 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
7126 (build_relations): Adjust.
7127
d0b0fefa
AD
71282001-12-27 Akim Demaille <akim@epita.fr>
7129
7130 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
7131 duplication.
7132
adc8c848
AD
71332001-12-27 Akim Demaille <akim@epita.fr>
7134
7135 * src/reader.c (packgram): Catch nitems overflows.
7136
14d293ac
AD
71372001-12-27 Akim Demaille <akim@epita.fr>
7138
7139 * src/files.c, src/files.h (guard_obstack): Remove.
7140 * src/output.c (output): Adjust.
7141 * src/reader.c (parse_braces): New, factoring...
7142 (copy_action, copy_guard): these two which are renamed as...
7143 (parse_action, parse_guard): these.
7144 As a voluntary consequence, using braces around guards is now
7145 mandatory.
7146
f499b062
AD
71472001-12-27 Akim Demaille <akim@epita.fr>
7148
7149 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
7150 * src/reader.c (symbol_list): `guard' and `guard_line' are new
7151 members.
7152 (symbol_list_new): Adjust.
7153 (copy_action): action_line is the first line, not the last.
7154 (copy_guard): Just as for actions, store the `action' only, not
7155 the switch/case/break flesh.
7156 Don't parse the user action that might follow the guard, let...
7157 (readgram): do it, i.e., now, there can be an action after a
7158 guard.
7159 In other words the guard is just explicitly optional.
7160 (packgram): Adjust.
7161 * src/output.c (guards_output): New.
7162 (output_parser): Call it when needed.
7163 (output): Also free the guard and attrs obstacks.
7164 * src/files.c, src/files.h (obstack_save): Remove.
7165 (output_files): Remove.
7166 As a result, if one needs the former `.act' file, using an
7167 appropriate skeleton which requires actions and guards is now
7168 required.
7169 * src/main.c (main): Adjust.
7170 * tests/semantic.at: New.
7171 * tests/regression.at: Use `input.y' as input file name.
7172 Avoid 8+3 problems by requiring input.c when the test needs the
7173 parser.
7174
d945f5cd
AD
71752001-12-27 Akim Demaille <akim@epita.fr>
7176
7177 * src/reader.c (symbol_list_new): Be sure to initialize all the
7178 fields.
7179
d200e455
AD
71802001-12-27 Akim Demaille <akim@epita.fr>
7181
7182 All the hacks using a final pseudo state are now useless.
7183
7184 * src/LR0.c (set_state_table): state_table holds exactly nstates.
7185 * src/lalr.c (nLA): New.
7186 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
7187 instead of lookaheadsp from the pseudo state (nstate + 1).
7188
f9507c28
AD
71892001-12-27 Akim Demaille <akim@epita.fr>
7190
7191 * src/output.c (action_row, token_actions): Use a state_t instead
7192 of a integer, and nlookaheads instead of the following state's
7193 lookaheadsp.
7194
065fbd27
AD
71952001-12-27 Akim Demaille <akim@epita.fr>
7196
7197 * src/conflicts.c (log_resolution, flush_shift)
7198 (resolve_sr_conflict, set_conflicts, solve_conflicts)
7199 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
7200 (conflicts_print, print_reductions): Use a state_t instead of an
7201 integer when referring to a state.
7202 As much as possible, depend upon nlookaheads, instead of the
7203 `lookaheadsp' member of the following state (since lookaheads of
7204 successive states are successive, the difference between state n + 1
7205 and n served as the number of lookaheads for state n).
7206 * src/lalr.c (add_lookback_edge): Likewise.
7207 * src/print.c (print_core, print_actions, print_state)
7208 (print_results): Likewise.
7209 * src/print_graph.c (print_core, print_actions, print_state)
7210 (print_graph): Likewise.
7211 * src/conflicts.h: Adjust.
7212
1b177bd7
AD
72132001-12-27 Akim Demaille <akim@epita.fr>
7214
7215 * src/bison.hairy: Formatting/comment changes.
7216 ANSIfy.
7217 Remove `register' indications.
7218 Add plenty of `static'.
7219
7742ddeb
AD
72202001-12-27 Akim Demaille <akim@epita.fr>
7221
7222 * src/output.c (prepare): Drop the muscle `ntbase' which
7223 duplicates ntokens.
7224 * src/bison.simple: Formatting/comment changes.
7225 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
7226 is an undocumented synonym.
7227
1fa14068
AD
72282001-12-22 Akim Demaille <akim@epita.fr>
7229
7230 * src/output.c (output_table_data): Change the prototype to use
7231 `int' for array ranges: some invocations do pass an int, not a
7232 short.
7233 Reported by Wayne Green.
7234
b9752825
AD
72352001-12-22 Akim Demaille <akim@epita.fr>
7236
7237 Some actions of web2c.y are improperly triggered.
7238 Reported by Mike Castle.
7239
7240 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
7241 * tests/regression.at (Web2c): Rename as...
7242 (Web2c Report): this.
7243 (Web2c Actions): New.
7244
776209d6
AD
72452001-12-22 Akim Demaille <akim@epita.fr>
7246
7247 Reductions in web2c.y are improperly reported.
7248 Reported by Mike Castle.
7249
7250 * src/conflicts.c (print_reductions): Fix.
7251 * tests/regression.at (Web2c): New.
7252
275fc3ad
AD
72532001-12-18 Akim Demaille <akim@epita.fr>
7254
7255 Some host fail on `assert (!"foo")', which expands to
7256 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
7257 Reported by Nelson Beebee.
7258
7259 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
7260 `#define it_succeeded 0' and `assert (it_succeeded)'.
7261
897668ee
MA
72622001-12-17 Marc Autret <autret_m@epita.fr>
7263
7264 * src/bison.simple: Don't hard code the skeleton line and filename.
7265 * src/output.c (output_parser): Rename 'line' as 'output_line'.
7266 New line counter 'skeleton_line' (skeleton-line muscle).
7267
ab3399e0
PE
72682001-12-17 Paul Eggert <eggert@twinsun.com>
7269
7270 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
7271 YYDEBUG must be defined to a nonzero value.
7272
7273 * src/bison.simple (yytname): Do not assume that the user defines
7274 YYDEBUG to a properly parenthesized expression.
7275
3877f72b
AD
72762001-12-17 Akim Demaille <akim@epita.fr>
7277
7278 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
7279 nlookaheads is a new member.
7280 Adjust all users.
7281 * src/lalr.h (nlookaheads): Remove this orphan declaration.
7282 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
7283 state.
776209d6 7284
331dbc1b
AD
72852001-12-17 Akim Demaille <akim@epita.fr>
7286
7287 * src/files.h, src/files.c (open_files, close_files): Remove.
7288 * src/main.c (main): Don't open/close files, nor invoke lex_free,
7289 let...
7290 * src/reader.c (reader): Do it.
776209d6 7291
be750e4c
AD
72922001-12-17 Akim Demaille <akim@epita.fr>
7293
7294 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 7295
709ae8c6
AD
72962001-12-17 Akim Demaille <akim@epita.fr>
7297
7298 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
7299 (flush_reduce): New.
7300 (resolve_sr_conflict): Adjust.
776209d6 7301
f87685c3
AD
73022001-12-17 Akim Demaille <akim@epita.fr>
7303
7304 * src/output.c (output_obstack): Be static and rename as...
7305 (format_obstack): this, to avoid any confusion with files.c's
7306 output_obstack.
7307 * src/reader.h (muscle_obstack): Move to...
7308 * src/output.h: here, since it's defined in output.c.
7309
837491d8
AD
73102001-12-17 Akim Demaille <akim@epita.fr>
7311
7312 * src/output.c (action_row, save_column, default_goto)
7313 (sort_actions, matching_state, pack_vector): Better variable
7314 locality.
7315
796d61fb
AD
73162001-12-17 Akim Demaille <akim@epita.fr>
7317
7318 * src/output.c: Various formatting changes.
776209d6 7319
64d15509
AD
73202001-12-17 Akim Demaille <akim@epita.fr>
7321
7322 * src/files.c (output_files): Free the output_obstack.
7323 * src/main.c (main): Call print and print_graph conditionally.
7324 * src/print.c (print): Work unconditionally.
7325 * src/print_graph.c (print_graph): Work unconditionally.
7326 * src/conflicts.c (log_resolution): Output only if verbose_flag.
7327
fbc8ecb7
MA
73282001-12-16 Marc Autret <autret_m@epita.fr>
7329
7330 * src/output.c (actions_output): Fix. When we use %no-lines,
7331 there is one less line per action.
7332
f0440388
MA
73332001-12-16 Marc Autret <autret_m@epita.fr>
7334
7335 * src/bison.simple: Remove a useless #line directive.
7336 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
7337 * src/output.c (get_lines_number): New.
776209d6 7338 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
7339 output muscles.
7340 Fix line numbering.
7341 (actions_output): Computes the number of lines taken by actions.
7342 (output_master_parser): Insert new skeleton which is the name of
7343 the output parser file name.
7344
a79986b8
MA
73452001-12-15 Marc Autret <autret_m@epita.fr>
7346
7347 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
7348
4ec8e00f
MA
73492001-12-15 Marc Autret <autret_m@epita.fr>
7350
7351 * src/output.c (output_gram): Keep track of the hairy one.
7352
1a4648ff
AD
73532001-12-15 Akim Demaille <akim@epita.fr>
7354
7355 Make `make distcheck' work.
7356
7357 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
7358 system.h which uses libgettext.h.
7359
9c2c67e6
AD
73602001-12-15 Akim Demaille <akim@epita.fr>
7361
7362 * src/nullable.c (set_nullable): Useless rules must be skipped,
7363 otherwise, since we range over their symbols, we might look at a
7364 nonterminal which no longer ``exists'', i.e., it is not counted in
7365 `nvars', hence we overflow our arrays.
7366
93ede233
AD
73672001-12-15 Akim Demaille <akim@epita.fr>
7368
7369 The header can also be produced directly, without any obstack!
7370 Yahoo!
7371
7372 * src/files.c, src/files.h (defines_obstack): Remove.
7373 (compute_header_macro): Global.
7374 (defines_obstack_save): Remove.
7375 * src/reader.c (parse_union_decl): No longer output to
7376 defines_obstack: its content can be found in the `stype' muscle
7377 anyway.
7378 (output_token_translations): Merge into...
7379 (symbols_output): this.
7380 Rename as...
7381 (symbols_save): this.
7382 (reader): Adjust.
7383 * src/output.c (header_output): New.
7384 (output): Call it.
7385
2666f928
AD
73862001-12-15 Akim Demaille <akim@epita.fr>
7387
7388 * src/reader.c (parse_union_decl): Instead of handling two obstack
7389 simultaneously, use one to define the `stype' muscle, and use the
7390 value of the latter to fill defines_obstack.
7391 (copy_comment): Remove.
7392 (copy_comment2): Work for a single obstack.
7393 Rename as...
7394 (copy_comment): this.
7395
428046f8
AD
73962001-12-15 Akim Demaille <akim@epita.fr>
7397
7398 * src/lex.c, src/lex.h (xgetc): No longer static.
7399 * src/reader.c (parse_union_decl): Revamp.
7400
ea52d706
AD
74012001-12-15 Akim Demaille <akim@epita.fr>
7402
7403 Still making progress in separating Bison into (i) input, (ii)
7404 process, (iii) output: now we can directly output the parser file
7405 without using table_obstack at all.
7406
7407 * src/files.c, src/files.h (table_obstack): Bye bye.
7408 (parser_file_name): New.
7409 * src/files.c (compute_output_file_names): Compute it.
7410 * src/output.c (actions_output, output_parser)
7411 (output_master_parser): To a file instead of an obstack.
7412
3f96f4dc
AD
74132001-12-15 Akim Demaille <akim@epita.fr>
7414
7415 Attach actions to rules, instead of pre-outputting them to
7416 actions_obstack.
7417
7418 * src/gram.h (rule_t): action and action_line are new members.
7419 * src/reader.c (symbol_list): Likewise.
7420 (copy_action): Save the actions within the rule.
7421 (packgram): Save them in rule_table.
7422 * src/output.c (actions_output): New.
7423 (output_parser): Use it on `%%actions'.
7424 (output_rule_data): Don't free rule_table.
7425 (output): Do it.
7426 (prepare): Don't save the `action' muscle.
7427 * src/bison.simple: s/%%action/%%actions/.
7428
51576fb3
AD
74292001-12-15 Akim Demaille <akim@epita.fr>
7430
7431 * src/reader.c (copy_action): When --yacc, don't append a `;'
7432 to the user action: let it fail if lacking.
dee049eb 7433 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 7434
2648a72d
AD
74352001-12-14 Akim Demaille <akim@epita.fr>
7436
7437 * src/lex.c (literalchar): Simply return the char you decoded, non
7438 longer mess around with obstacks and int pointers.
7439 Adjust all callers.
7440
92790e5b
AD
74412001-12-14 Akim Demaille <akim@epita.fr>
7442
7443 * src/lex.c (literalchar): Don't escape the special characters,
7444 just decode them, and keep them as char (before, eol was output as
7445 the 2 char string `\n' etc.).
7446 * src/output.c (output_rule_data): Use quotearg to output the
7447 token strings.
7448
927c1557
PE
74492001-12-13 Paul Eggert <eggert@twinsun.com>
7450
7451 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
7452 Do not infringe on the global user namespace when using C++.
7453 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
7454 All uses of `fprintf' and `stderr' changed.
7455
7456 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
7457
ed8e1f68
AD
74582001-12-13 Akim Demaille <akim@epita.fr>
7459
7460 The computation of nullable is broken: it doesn't handle empty
7461 RHS's properly.
7462
7463 * tests/torture.at (GNU AWK Grammar): New.
7464 * tests/sets.at (Nullable): New.
7465 * src/nullable.c (set_nullable): Instead of blindly looping over
7466 `ritems', loop over the rules, and then over their rhs's.
7467
7468 Work around Autotest bugs.
7469
7470 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
7471 frame, because Autotest understand lines starting with a `+' as
7472 traces from the shell. Then, they are not processed properly.
7473 Admittedly an Autotest bug, but we don't have time to wait for
7474 Autotest to catch up.
7475 * tests/regression.at (Broken Closure): Adjust to the new table
7476 frames.
7477 Move to...
7478 * tests/sets.at: here.
7479
cb581495
AD
74802001-12-13 Akim Demaille <akim@epita.fr>
7481
7482 * src/closure.c (closure): Use nrules instead of playing tricks
7483 with BITS_PER_WORD.
7484
2e729273
AD
74852001-12-13 Akim Demaille <akim@epita.fr>
7486
7487 * src/print.c (print_actions): Output the handling of `$' as the
7488 traces do: shifting the token EOF. Before EOF was treated as a
7489 nonterminal.
7490 * tests/regression.at: Adjust some tests.
7491 * src/print_graph.c (print_core): Complete the set of items via
7492 closure. The next-to-final and final states are still unsatisfying,
7493 but that's to be addressed elsewhere.
7494 No longer output the rule numbers, but do output the state number.
7495 A single loop for the shifts + gotos is enough, but picked a
7496 distinct color for each.
7497 (print_graph): Initialize and finalize closure.
7498
107f7dfb
AD
74992001-12-13 Akim Demaille <akim@epita.fr>
7500
7501 * src/reader.c (readgram): Remove dead code, an strip useless
7502 braces.
7503 (get_type): Remove, unused.
7504
9b53a24f
AD
75052001-12-12 Akim Demaille <akim@epita.fr>
7506
7507 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
7508 on that of lib/error.c.
7509
dbfb6dcd
AD
75102001-12-12 Akim Demaille <akim@epita.fr>
7511
7512 Some hosts don't like `/' in includes.
7513
7514 * src/system.h: Include libgettext.h without qualifying the path.
7515 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
7516 $(top_srcdir).
7517
c25fb648
MA
75182001-12-11 Marc Autret <autret_m@epita.fr>
7519
7520 * src/output.c (output_parser): Remove useless muscle.
7521
710ddc4f
MA
75222001-12-11 Marc Autret <autret_m@epita.fr>
7523
7524 * src/bison.simple: Remove #line just before %%epilogue. It
7525 is now handled in ...
7526 * src/reader.c (read_additionnal_code): Add the output of a
7527 #line for the epilogue.
7528
e83d80b8
MA
75292001-12-10 Marc Autret <autret_m@epita.fr>
7530
927c1557 7531 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
7532 replace precedent remove.
7533 * src/bison.simple: Remove #line before %%prologue because
7534 %%input-line is wrong at this time.
7535
971d5158
MA
75362001-12-10 Marc Autret <autret_m@epita.fr>
7537
7538 * src/reader.c (symbols_output): Clean up.
927c1557 7539 * src/output.c (output_gram, output): Clean up.
971d5158 7540
5edafffd
AD
75412001-12-10 Akim Demaille <akim@epita.fr>
7542
7543 * src/lalr.c (initialize_lookaheads): New. Extracted from...
7544 * src/LR0.c (set_state_table): here.
7545 * src/lalr.c (lalr): Call it.
7546
0279f8e9
AD
75472001-12-10 Akim Demaille <akim@epita.fr>
7548
7549 * src/state.h (shifts): Remove the `number' member: shifts are
7550 attached to state, hence no longer need to be labelled with a
7551 state number.
7552
190c4f5f
AD
75532001-12-10 Akim Demaille <akim@epita.fr>
7554
7555 Now that states have a complete set of members, the linked list of
7556 shifts is useless: just fill directly the state's shifts member.
7557
7558 * src/state.h (shifts): Remove the `next' member.
7559 * src/LR0.c (first_state, last_state): Remove.
7560 Adjust the callers.
7561 (augment_automaton): Don't look for the shifts that must be added
7562 a shift on EOF: it is those of the state we looked for! But now,
7563 since shifts are attached, it is no longer needed to looking
7564 merely by its id: its number.
7565
2a73b93d
AD
75662001-12-10 Akim Demaille <akim@epita.fr>
7567
7568 * src/LR0.c (augment_automaton): Better variable locality.
7569 Remove an impossible branch: if there is a state corresponding to
7570 the start symbol being shifted, then there is shift for the start
7571 symbol from the initial state.
7572
74392f6a
AD
75732001-12-10 Akim Demaille <akim@epita.fr>
7574
7575 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
7576 only when appropriate: when insert_start_shifting_state' is not
7577 invoked.
7578 * tests/regression.at (Rule Line Numbers): Adjust.
7579
37c82725
AD
75802001-12-10 Akim Demaille <akim@epita.fr>
7581
7582 * src/LR0.c (augment_automaton): Now that all states have shifts,
7583 merge the two cases addition shifts to the initial state.
7584
6a164e0c
AD
75852001-12-10 Akim Demaille <akim@epita.fr>
7586
7587 * src/lalr.c (set_state_table): Move to...
7588 * src/LR0.c: here.
7589 * src/lalr.c (lalr): Don't call it...
7590 * src/LR0.c (generate_states): do it.
7591 * src/LR0.h (first_state): Remove, only the table is used.
7592
7215de24
AD
75932001-12-10 Akim Demaille <akim@epita.fr>
7594
7595 * src/LR0.h (first_shift, first_reduction): Remove.
7596 * src/lalr.c: Don't use first_shift: find shifts through the
7597 states.
7598
80e25d4d
AD
75992001-12-10 Akim Demaille <akim@epita.fr>
7600
7601 * src/LR0.c: Attach shifts to states as soon as they are
7602 computed.
7603 * src/lalr.c (set_state_table): Instead of assigning shifts to
7604 state, just assert that the mapping was properly done.
7605
0ab3728b
AD
76062001-12-10 Akim Demaille <akim@epita.fr>
7607
7608 * src/LR0.c (insert_start_shift): Rename as...
7609 (insert_start_shifting_state): this.
7610 (insert_eof_shifting_state, insert_accepting_state): New.
7611 (augment_automaton): Adjust.
7612 Better locality of the variables.
7613 When looking if the start_symbol is shifted from the initial
7614 state, using `while (... symbol != start_symbol ...)' sounds
7615 better than `while (... symbol < start_symbol ...)': If fail
7616 to see how the order between symbols could be relevant!
7617
78af9bbc
AD
76182001-12-10 Akim Demaille <akim@epita.fr>
7619
7620 * src/getargs.h: Don't declare `spec_name_prefix' and
7621 `spec_file_prefix', declared by src/files.h.
7622 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
7623 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
7624 * src/output.c (prepare): Adjust.
7625 * src/reader.c (symbols_output): Likewise.
7626 * src/vmsgetargs.c: Vaguely adjust, but who cares?
7627
bdef2a41
AD
76282001-12-10 Akim Demaille <akim@epita.fr>
7629
7630 * src/muscle_tab.c (muscle_init): NULL is a better default than
7631 `"0"'.
7632
3735969c
AD
76332001-12-10 Akim Demaille <akim@epita.fr>
7634
7635 * src/reader.c (reader): Calling symbols_output once is enough.
7636
49701457
AD
76372001-12-10 Akim Demaille <akim@epita.fr>
7638
7639 Now that states have a complete set of members, the linked list of
7640 reductions is useless: just fill directly the state's reductions
7641 member.
7642
7643 * src/state.h (struct reductions): Remove member `number' and
7644 `next'.
7645 * src/LR0.c (first_reduction, last_reduction): Remove.
7646 (save_reductions): Don't link the new reductions, store them in
7647 this_state.
7648 * src/lalr.c (set_state_table): No need to attach reductions to
7649 states, it's already done.
7650 * src/output.c (output_actions): No longer free the shifts, then
7651 the reductions, then the states: free all the states and their
7652 members.
7653
0edad749
AD
76542001-12-10 Akim Demaille <akim@epita.fr>
7655
7656 * src/options.c (OPTN, DRTV, BOTH): New.
7657 (option_table): Use them.
7658
0edad749
AD
7659 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
7660 the job of system.h.
7661 * src/options.c: Don't include stdio.h and xalloc.h for the same
7662 reasons.
7663
5449dd0f
AD
76642001-12-10 Akim Demaille <akim@epita.fr>
7665
7666 * src/output.c (output, prepare): Make sure the values of the
7667 muscles `action' and `prologue' are 0-terminated.
7668
a870c567
AD
76692001-12-10 Akim Demaille <akim@epita.fr>
7670
7671 Clean up GCC warnings.
7672
7673 * src/reader.c (copy_action): `buf' is not used.
7674 (parse_skel_decl): Be static.
7675 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
7676 * src/options.h (create_long_option_table): Have a real prototype.
7677 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
7678 (hash_delete_at): Return const void *.
7679 Adjust casts to preserve the const.
7680
80df8768
AD
76812001-12-10 Akim Demaille <akim@epita.fr>
7682
7683 * configure.in: Require 2.52g.
7684 M4 is not needed, but AUTOM4TE is.
7685 * m4/m4.m4: Remove.
7686 * tests/Makefile.am: Adjust.
7687
f693ad14
AD
76882001-12-10 Akim Demaille <akim@epita.fr>
7689
7690 One structure for states is enough, even though theoretically
7691 there are LR(0) states and LALR(1) states.
7692
7693 * src/lalr.h (state_t): Remove.
7694 (state_table): Be state_t **, not state_t *.
7695 * src/state.h (core, CORE_ALLOC): Rename as...
7696 (state_t, STATE_ALLOC): this.
7697 Add the LALR(1) members: shifts, reductions, errs.
7698 * src/LR0.c (state_table): Rename as...
7699 (state_hash): this, to avoid name clashes with the global
7700 `state_table'.
7701 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
7702 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
7703
74ffbcb6
AD
77042001-12-10 Akim Demaille <akim@epita.fr>
7705
7706 Bison dumps core on bash.y.
7707 Reported by Pascal Bart.
7708
7709 * src/warshall.c (bitmatrix_print): New.
7710 (TC): Use it.
7711 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
7712 j must be the outer loop.
7713 * tests/regression.at (Broken Closure): New.
7714
07708e19
AD
77152001-12-05 Akim Demaille <akim@epita.fr>
7716
7717 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
7718 its argument.
ba1ecc07 7719 Reported by Peter Hamorsky.
07708e19 7720
92b16366
AD
77212001-12-05 Akim Demaille <akim@epita.fr>
7722
7723 * src/conflicts.c (err_table): Remove.
7724 (resolve_sr_conflict): Adjust.
7725 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
7726 Rename as...
7727 (state_t.reductions, state_t.shifts): this.
7728
076ab033
AD
77292001-12-05 Akim Demaille <akim@epita.fr>
7730
7731 * src/reduce.c (reduce_grammar_tables): No longer disable the
7732 removal of useless rules via CPP but via `if (0)', so that the
7733 compiler still check the code is valid.
7734 For instance, it should have noticed `rline' no longer exists: use
7735 the `line' member of rule_t.
7736 * src/gram.c (dummy, rline): Remove, unused.
7737
3843c413
AD
77382001-12-05 Akim Demaille <akim@epita.fr>
7739
7740 * src/output.c (pack_vector): Use assert, not berror.
7741 * src/main.c (berror): Remove, unused.
7742
43168960
AD
77432001-12-05 Akim Demaille <akim@epita.fr>
7744
7745 New experimental feature: if --verbose --trace output all the
7746 items of a state, not only its kernel.
7747
7748 * src/print.c (print_core): If `trace_flag', then invoke closure
7749 before outputting the items of the state (print_core is no longer
7750 a correct name them).
7751 (print_results): Invoke new_closure/free_closure if needed.
7752
b2872512
AD
77532001-12-05 Akim Demaille <akim@epita.fr>
7754
7755 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
7756 * src/closure.c, src/closure.h (itemsetsize): Rename as...
7757 (nitemset): for consistency with the rest of the project.
7758
23cbcc6c
AD
77592001-12-05 Akim Demaille <akim@epita.fr>
7760
7761 * src/closure.c (print_closure): Improve.
7762 (closure): Use it for printing input and output.
7763
03ec521c
AD
77642001-12-05 Akim Demaille <akim@epita.fr>
7765
7766 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
7767 indexed by nonterminals.
7768
3a7456dd
AD
77692001-12-05 Akim Demaille <akim@epita.fr>
7770
7771 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
7772 what it was!).
7773 * src/warshall.h: Remove accidental duplication of the content.
7774
1cbcf2e7
AD
77752001-12-05 Akim Demaille <akim@epita.fr>
7776
7777 * src/closure.c (set_fderives): De-obfuscate.
7778
84182270
AD
77792001-12-05 Akim Demaille <akim@epita.fr>
7780
7781 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
7782
3f6f053c
AD
77832001-12-05 Akim Demaille <akim@epita.fr>
7784
7785 * src/closure.c (set_firsts): De-obfuscate.
7786
7a5350ba
AD
77872001-12-05 Akim Demaille <akim@epita.fr>
7788
7789 * src/output.c (action_row): De-obfuscate
7790 using the good o' techniques: arrays not pointers, variable
7791 locality, BITISSET, RESETBIT etc.
7792
d954473d
AD
77932001-12-05 Akim Demaille <akim@epita.fr>
7794
7795 Pessimize the code to simplify it: from now on, all the states
7796 have a valid SHIFTS, which NSHIFTS is possibly 0.
7797
7798 * src/LR0.c (shifts_new): Be global and move to..
7799 * src/state.c, src/state.h: here.
7800 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
7801 * src/print_graph: Adjust.
7802
9839bbe5
AD
78032001-12-05 Akim Demaille <akim@epita.fr>
7804
7805 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
7806 * src/conflicts.c: Use it.
7807 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
7808 incorrectly ``simplified''.
7809
9f136c07
AD
78102001-12-05 Akim Demaille <akim@epita.fr>
7811
7812 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
7813 using the good o' techniques: arrays not pointers, variable
7814 locality, BITISSET, RESETBIT etc.
7815
b608206e
AD
78162001-12-05 Akim Demaille <akim@epita.fr>
7817
7818 * src/state.h (SHIFT_SYMBOL): New.
7819 * src/conflicts.c: Use it to deobfuscate.
7820
52afa962
AD
78212001-12-05 Akim Demaille <akim@epita.fr>
7822
7823 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
7824 (print_reductions): De-obfuscate using the good o' techniques:
7825 arrays not pointers, variable locality, BITISSET.
7826
e74dc321
AD
78272001-12-05 Akim Demaille <akim@epita.fr>
7828
7829 * src/conflicts.c (print_reductions): Arrays, not pointers.
7830 Use BITISSET.
7831
768fca83
AD
78322001-12-05 Akim Demaille <akim@epita.fr>
7833
7834 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7835
a17e599f
AD
78362001-12-05 Akim Demaille <akim@epita.fr>
7837
7838 * src/conflicts.c (print_reductions): Improve variable locality.
7839
a04bc341
AD
78402001-12-05 Akim Demaille <akim@epita.fr>
7841
7842 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7843
c8ea038e
AD
78442001-12-05 Akim Demaille <akim@epita.fr>
7845
7846 * src/conflicts.c (print_reductions): Improve variable locality.
7847
aa2aab3c
AD
78482001-12-05 Akim Demaille <akim@epita.fr>
7849
7850 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
7851 * src/lalr.c: Use them.
7852
b178c8cc
AD
78532001-12-05 Akim Demaille <akim@epita.fr>
7854
7855 * src/LR0.c (augment_automaton): Formatting changes.
7856 Better variable locality.
7857
f67d13aa
AD
78582001-12-05 Akim Demaille <akim@epita.fr>
7859
7860 * src/lalr.c (matrix_print): New.
7861 (transpose): Use it.
7862 Use arrays instead of pointers.
7863
c2713865
AD
78642001-12-05 Akim Demaille <akim@epita.fr>
7865
7866 * src/lalr.c (maxrhs): Move to...
7867 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
7868 * src/lalr.c (build_relations): Adjust.
7869
9887c18a
AD
78702001-12-05 Akim Demaille <akim@epita.fr>
7871
7872 * src/lalr.c (transpose): Free the memory allocated to the
7873 argument, as it is replaced by the results by the unique caller.
7874 (build_relations): Merely invoke transpose: it handles the memory
7875 deallocation.
7876 Improve variable locality.
7877 Avoid variables used as mere abbreviations.
7878 (compute_lookaheads): Use arrays instead of pointers.
7879
4d4f699c
AD
78802001-12-05 Akim Demaille <akim@epita.fr>
7881
7882 * src/lalr.c (initialize_F): Improve variable locality.
7883 Avoid variables used as mere abbreviations.
7884
80a69750
AD
78852001-12-05 Akim Demaille <akim@epita.fr>
7886
7887 * src/derives.c (print_derives): Display the ruleno.
7888 * src/lalr.c (initialize_F, transpose): Better variable locality
7889 to improve readability.
7890 Avoid variables used as mere abbreviations.
7891
fe961097
AD
78922001-12-05 Akim Demaille <akim@epita.fr>
7893
7894 * src/lalr.c (traverse): Use arrays instead of pointers.
7895
e3e4e814
AD
78962001-12-05 Akim Demaille <akim@epita.fr>
7897
7898 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
7899 the handling of squeue.
7900 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7901
630e182b
AD
79022001-12-05 Akim Demaille <akim@epita.fr>
7903
7904 Because useless nonterminals are now kept alive (instead of being
7905 `destroyed'), we now sometimes examine them, and store information
7906 related to them. Hence we need to know their number, and adjust
7907 memory allocations.
7908
7909 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7910 static.
7911 * src/LR0.c (allocate_itemsets): The memory allocated to
7912 `symbol_count' was used for two different purpose: once to count
7913 the number of occurrences of each symbol, and later reassigned to
7914 `shift_symbol', containing the symbol that can be shifted from a
7915 given state.
7916 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7917 only, and...
7918 (new_itemsets): Allocate `shift_symbol' here.
7919 (allocate_itemsets): symbol_count includes useless nonterminals.
7920 Make room for them.
7921 (free_storage): Use `free', not `XFREE', for pointers that cannot
7922 be null.
7923
81b51460
AD
79242001-12-05 Akim Demaille <akim@epita.fr>
7925
7926 * src/nullable.c (set_nullable): Deobfuscate the handling of
7927 ritem.
7928 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7929
3067fbef
AD
79302001-12-05 Akim Demaille <akim@epita.fr>
7931
7932 * src/gram.c, src/gram.h (ritem_print): New.
7933 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7934 (This useless function was defined only to work around VMS linkers
7935 that can't handle compilation units with variables only).
7936 * src/reduce.c (dump_grammar): Use it to trace the construction of
7937 ritem.
7938
c2bea5f9
PE
79392001-12-04 Paul Eggert <eggert@twinsun.com>
7940
7d27c823
PE
7941 * src/bison.simple (union yyalloc): Change member names
7942 to be the same as the stack names.
7943 (yyparse): yyptr is now union yyalloc *, not char *.
7944 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7945 and may generate better code on some machines.
c2bea5f9
PE
7946 (yystpcpy): Use prototype if __STDC__ is defined, not just
7947 if __cplusplus is defined.
35687a9d 7948
2c8a9dfa
AD
79492001-11-30 Akim Demaille <akim@epita.fr>
7950
7951 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7952 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7953 Gettext doesn't compile cleanly, and dies with -Werror.
7954 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7955 Include WARNING_CFLAGS here.
7956 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7957 before being defined.
7958
f4e421e6
AD
79592001-11-27 Paul Eggert <eggert@twinsun.com>
7960
7961 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7962 First arg is int, not unsigned.
7963 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7964 (SIZE_MAX, UINT_MAX): New macros.
7965 (quotearg_n_options): Abort if N is negative.
7966 Avoid overflow check on hosts where size_t is 64 bits and int
7967 is 32 bits, as overflow is impossible there.
7968 Fix off-by-one typo that caused unnecessary reallocation.
7969
7093d0f5
AD
79702001-11-29 Paul Eggert <eggert@twinsun.com>
7971
7972 Name space cleanup in generated parser.
7973
7974 * doc/bison.texinfo (Bison Parser): Discuss system headers
7975 and their effect on the user name space.
7976
7977 * src/bison.simple:
7978 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7979 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7980 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7981
7982 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7983 on user names when possible.
7984
7985 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7986 Simplify test for whather <alloca.h> exists.
7987
7988 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7989
7990 (<stdio.h>): Include if YYDEBUG.
7991
7992 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7993 ! defined (yyoverflow) && ! defined (yymemcpy).
7994
7995 (yymemcpy, yyparse): Rename local variables as needed so that
7996 they all begin with 'yy'.
7997
7998 (yystrlen, yystpcpy): New functions.
7999
8000 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
8001 All uses changed.
8002
8003 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
8004 instead of relying on string.h functions. Use YYSTACK_ALLOC
8005 and YYSTACK_FREE instead of malloc and free.
8006
fd51e5ff
AD
80072001-11-30 Akim Demaille <akim@epita.fr>
8008
8009 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
8010 before their first uses.
8011 (YYBISON, YYPURE): Move to the top of the output.
8012
7d13ff5f
AD
80132001-11-30 Akim Demaille <akim@epita.fr>
8014
8015 * tests/reduce.at (Useless Nonterminals): Fix.
8016
892a3995
AD
80172001-11-30 Akim Demaille <akim@epita.fr>
8018
8019 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
8020 if body instead of `;' to pacify GCC's warnings.
8021
68f1e3ed
AD
80222001-11-30 Akim Demaille <akim@epita.fr>
8023
8024 Instead of mapping the LHS of unused rules to -1, keep the LHS
8025 valid, but flag the rules as invalid.
8026
8027 * src/gram.h (rule_t): `useful' is a new member.
8028 * src/print.c (print_grammar): Adjust.
8029 * src/derives.c (set_derives): Likewise.
8030 * src/reader.c (packgram, reduce_output): Likewise.
8031 * src/reduce.c (reduce_grammar_tables): Likewise.
8032 * tests/reduce.at (Underivable Rules, Useless Rules): New.
8033
d2d1b42b
AD
80342001-11-30 Akim Demaille <akim@epita.fr>
8035
8036 * src/reduce.c (reduce_output): Formatting changes.
8037 * src/print.c (print_results, print_grammar): Likewise.
8038 * tests/regression.at (Rule Line Numbers)
8039 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
8040
760b53a8
AD
80412001-11-30 Akim Demaille <akim@epita.fr>
8042
8043 * src/reduce.c (nonterminals_reduce): Instead of throwing away
8044 useless nonterminals, move them at the end of the symbol arrays.
8045 (reduce_output): Adjust.
8046 * tests/reduce.at (Useless Nonterminals): Adjust.
8047
00238958
AD
80482001-11-30 Akim Demaille <akim@epita.fr>
8049
8050 * src/reduce.c: Various comment/formatting changes.
8051 (nonterminals_reduce): New, extracted from...
8052 (reduce_grammar_tables): here.
8053 (reduce_grammar): Call nonterminals_reduce.
8054
396452de
PE
80552001-11-29 Paul Eggert <eggert@twinsun.com>
8056
8057 * src/bison.simple (YYSTACK_REALLOC): Remove.
8058 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
8059 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
8060 New macros.
8061 (union yyalloc): New type.
8062 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
8063 an arbitrary restriction on hosts where size_t is wider than int.
8064
8065 (yyparse): Don't dump core if alloca or malloc fails; instead, report
8066 a parser stack overflow. Allocate just one block of memory for all
8067 three stacks, instead of allocating three blocks; this typically is
8068 faster and reduces fragmentation.
8069
8070 Do not limit the number of items in the stack to a value that fits
8071 in 'int', as this is an arbitrary limit on hosts with 64-bit
8072 size_t and 32-bit int.
8073
147e184c
MA
80742001-11-29 Marc Autret <autret_m@epita.fr>
8075
8076 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
8077 of defining YYERROR_VERBOSE.
8078 [AT_DATA]: $4 is now out of C declarations in the prologue.
8079
426cf563
MA
80802001-11-28 Marc Autret <autret_m@epita.fr>
8081
8082 * src/reader.c (parse_dquoted_param): New.
8083 (parse_skel_decl): Use it.
8084 * src/lex.h: Add its prototype.
8085 * src/lex.c (literalchar): Become not static.
8086
c7925b99
MA
80872001-11-28 Marc Autret <autret_m@epita.fr>
8088
8089 * src/output.h: And put its extern declaration here.
8090 * src/output.c (error_verbose): Define here.
8091 (prepare): Echo name modification.
8092 * src/getargs.h: Clean its extern declaration.
8093 * src/getargs.c (error_verbose_flag): Remove.
8094 (getargs): Remove case 'e'.
8095 * src/options.c (option_table): 'error-verbose' is now seen as simple
8096 percent option.
8097 Include output.h.
8098
8099 * src/reader.c (read_declarations): Remove case tok_include.
8100 (parse_include_decl): Remove.
8101 * src/lex.h (token_t): Remove tok_include.
8102 * src/options.c (option_table): 'include' is now a simple command line
8103 option.
8104
5b5d1929
MA
81052001-11-28 Marc Autret <autret_m@epita.fr>
8106
8107 * src/bison.simple: Adjust muscle names.
8108 * src/muscle_tab.c (muscle_init): Also rename the muscles.
8109 * src/output.c (prepare): s/_/-/ for the muscles names.
8110 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
8111
8850be4b
MA
81122001-11-28 Marc Autret <autret_m@epita.fr>
8113
8114 * src/bison.simple: Fix debug.
8115 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
8116
4a38e613
AD
81172001-11-28 Akim Demaille <akim@epita.fr>
8118
8119 * src/LR0.c (shifts_new): New.
8120 (save_shifts, insert_start_shift, augment_automaton): Use it.
8121
4b35e1c1
AD
81222001-11-28 Akim Demaille <akim@epita.fr>
8123
8124 * src/closure.c (closure): `b' and `ruleno' denote the same value:
8125 keep ruleno only.
8126
d2b04478
AD
81272001-11-28 Akim Demaille <akim@epita.fr>
8128
8129 * src/closure.c (closure): Instead of looping over word in array
8130 then bits in words, loop over bits in array.
8131
2c4c30aa
AD
81322001-11-28 Akim Demaille <akim@epita.fr>
8133
8134 * src/closure.c (closure): No longer optimize the special case
8135 where all the bits of `ruleset[r]' are set to 0, to make the code
8136 clearer.
8137
576890b7
AD
81382001-11-28 Akim Demaille <akim@epita.fr>
8139
8140 * src/closure.c (closure): `r' and `c' are new variables, used to
8141 de-obfuscate accesses to RULESET and CORE.
8142
cb487d7d
AD
81432001-11-28 Akim Demaille <akim@epita.fr>
8144
8145 * src/reduce.c (reduce_print): Use ngettext.
8146 (dump_grammar): Improve the trace accuracy.
8147
6013d43f
AD
81482001-11-28 Akim Demaille <akim@epita.fr>
8149
8150 * src/reduce.c (dump_grammar): Don't translate trace messages.
8151
cb4956ee
AD
81522001-11-28 Akim Demaille <akim@epita.fr>
8153
8154 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
8155 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
8156 as all tags are free'ed afterwards.
8157 From Enrico Scholz.
8158
648185ab
PE
81592001-11-27 Paul Eggert <eggert@twinsun.com>
8160
8161 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
8162 use alloca when we didn't want to, and vice versa.
8163
68254a03
MA
81642001-11-27 Marc Autret <autret_m@epita.fr>
8165
9113b58f
AD
8166 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
8167 initialization.
68254a03
MA
8168 * src/output.c (prepare): Remove its update.
8169
04d843a2
MA
81702001-11-27 Marc Autret <autret_m@epita.fr>
8171
8172 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
8173 Use %error-verbose.
8174
d2079671 81752001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
8176
8177 * src/bison.simple: Remove YYERROR_VERBOSE using.
8178 Use %%error_verbose.
8179 (yyparse): Likewise.
8180 * src/output.c (prepare): Give its final value.
8181 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
8182 * src/getargs.h: Add its extern declaration.
8183 * src/getargs.c (error_verbose_flag): New int.
8184 (getargs): Update to catch new case.
8185 * src/options.c (option_table): 'error-verbose' is a new option.
8186 (shortopts): Update.
8187
e0327bc8
AD
81882001-11-27 Akim Demaille <akim@epita.fr>
8189
8190 * src/system.h: Use intl/libgettext.h.
8191 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
8192
000f1a3c
AD
81932001-11-27 Akim Demaille <akim@epita.fr>
8194
8195 * tests/torture.at (Exploding the Stack Size with Malloc):
8196 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
8197
26cfe0be
AD
81982001-11-27 Akim Demaille <akim@epita.fr>
8199
8200 * src/files.c: Include error.h.
8201 Reported by Hans Aberg.
8202
f6bd5427
MA
82032001-11-26 Marc Autret <autret_m@epita.fr>
8204
d2079671 8205 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
8206 (read_declarations): Add case tok_include.
8207 * src/getargs.h (include): Add its extern definition.
8208 * src/getargs.c (include): New const char *.
8209 (getargs): Add case '-I'.
8210 * src/options.c (option_table): Add include as command line and
8211 percent option.
8212 * src/lex.h (token_t): Add tok_include.
8213
2ca209c1
AD
82142001-11-26 Akim Demaille <akim@epita.fr>
8215
8216 * src/reader.c (readgram): Make sure rules for mid-rule actions
8217 have a lineno equal to that of their host rule.
8218 Reported by Hans Aberg.
8219 * tests/regression.at (Rule Line Numbers): New.
8220
0e41b407
AD
82212001-11-26 Akim Demaille <akim@epita.fr>
8222
8223 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
8224 size_ts.
8225
82262001-11-26 Akim Demaille <akim@epita.fr>
8227
8228 * src/complain.c, src/complain.h (error): Remove, provided by
8229 lib/error.[ch].
8230
e0c40012
AD
82312001-11-26 Akim Demaille <akim@epita.fr>
8232
8233 * src/reader.c (read_declarations): Don't abort on tok_illegal,
8234 issue an error message.
8235 * tests/regression.at (Invalid %directive): New.
8236 Reported by Hans Aberg.
8237
5e147124
AD
82382001-11-26 Akim Demaille <akim@epita.fr>
8239
8240 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
8241 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8242
a034c8b8
AD
82432001-11-26 Akim Demaille <akim@epita.fr>
8244
8245 * src/conflicts.c (conflicts_print): Don't complain at all when
8246 there are no reduce/reduce conflicts, and as many shift/reduce
8247 conflicts as expected.
8248 * tests/regression.at (%expect right): Adjust.
8249
c64a20f3
AD
82502001-11-23 Akim Demaille <akim@epita.fr>
8251
8252 * lib/alloca.c: Update, from fileutils.
8253
5b0d29bb
AD
82542001-11-23 Akim Demaille <akim@epita.fr>
8255
8256 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
8257
722c4bfe
AD
82582001-11-23 Akim Demaille <akim@epita.fr>
8259
8260 * src/system.h: Include alloca.h.
8261 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
8262
6255b435
AD
82632001-11-23 Akim Demaille <akim@epita.fr>
8264
8265 * src/print_graph.c (print_actions): Remove `rule', unused.
8266 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
8267 pacify GCC's signed < unsigned warnings.
8268 * src/closure.c (itemsetsize): Likewise.
8269 * src/reader.c (symbol_list_new): Static.
8270
b29b2ed5
AD
82712001-11-23 Akim Demaille <akim@epita.fr>
8272
8273 Attaching lineno to buckets is stupid, since only one copy of each
8274 symbol is kept, only the line of the first occurrence is kept too.
8275
8276 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
8277 * src/reader.c (rline_allocated): Remove, unused.
8278 (symbol_list): Have a `line' member.
8279 (symbol_list_new): New.
8280 (readgram): Use it.
8281 * src/print.c (print_grammar): Output the rule line numbers.
8282 * tests/regression.at (Solved SR Conflicts)
8283 (Unresolved SR Conflicts): Adjust.
8284 Reported by Hans Aberg.
8285
a81b1d4a
MA
82862001-11-22 Marc Autret <autret_m@epita.fr>
8287
8288 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
8289
c1ecb3c1
MA
82902001-11-22 Marc Autret <autret_m@epita.fr>
8291
8292 * src/muscle_tab.c (muscle_init): Remove initialization of
8293 skeleton muscle.
8294 * src/output.c (output_master_parser): Do it here.
8295
fbe01355
AD
82962001-11-20 Akim Demaille <akim@epita.fr>
8297
8298 * po/sv.po: New.
8299 * configure.in (ALL_LINGUAS): Adjust.
8300 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
8301 longer contains strings to translate.
8302
81e895c0
AD
83032001-11-19 Akim Demaille <akim@epita.fr>
8304
8305 * src/conflicts.c (conflicts_print): Add a missing \n.
8306
6bb1878b
AD
83072001-11-19 Akim Demaille <akim@epita.fr>
8308
8309 * src/nullable.c (nullable_print): New.
8310 (set_nullable): Call it when tracing.
8311 Better locality of variables.
8312
d9ec2d07
AD
83132001-11-19 Akim Demaille <akim@epita.fr>
8314
8315 * src/print.c (print_actions): Better locality of variables.
8316
720e5c1b
AD
83172001-11-19 Akim Demaille <akim@epita.fr>
8318
8319 * src/derives.c (print_derives): Fix and enrich.
8320 * src/closure.c (print_fderives): Likewise.
8321
fb908786
AD
83222001-11-19 Akim Demaille <akim@epita.fr>
8323
8324 * src/closure.c (itemsetend): Remove, replaced with...
8325 (itemsetsize): new.
8326
125ecb56
AD
83272001-11-19 Akim Demaille <akim@epita.fr>
8328
8329 * src/LR0.c (kernel_end): Remove, replaced with...
8330 (kernel_size): new.
8331
d8cf039f
AD
83322001-11-19 Akim Demaille <akim@epita.fr>
8333
8334 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
8335 to clarify.
8336
7bec0760
AD
83372001-11-19 Akim Demaille <akim@epita.fr>
8338
8339 * src/closure.c (closure): Use arrays instead of pointers to clarify.
8340
c87d4863
AD
83412001-11-19 Akim Demaille <akim@epita.fr>
8342
8343 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
8344 trace messages.
8345 * src/LR0.c: Likewise.
8346 (allocate_itemsets): Use arrays instead of pointers to clarify.
8347
9bfe901c
AD
83482001-11-19 Akim Demaille <akim@epita.fr>
8349
8350 * src/getargs.c (statistics_flag): Replace with...
8351 (trace_flag): New.
8352 (longopts): Accept --trace instead of --statistics.
8353 * src/getargs.h, src/options.c: Adjust.
8354 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
8355 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
8356
97db7bd4
AD
83572001-11-19 Akim Demaille <akim@epita.fr>
8358
cc72668c 8359 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
8360 pointers to clarify the code.
8361 (save_reductions, save_shifts): Factor common parts of alternatives.
8362
2c5f66ed
AD
83632001-11-19 Akim Demaille <akim@epita.fr>
8364
8365 * src/LR0.c (new_state, get_state): Complete TRACE code.
8366 * src/closure.c: Include `reader.h' to get `tags', needed by the
8367 trace code.
8368 Rename the conditional DEBUG as TRACE.
8369 Output consistently TRACEs to stderr, not stdout.
8370 * src/derives.c: Likewise.
8371 * src/reduce.c: (inaccessable_symbols): Using if is better style
8372 than goto.
8373 Use `#if TRACE' instead of `#if 0' for tracing code.
8374
300f275f
AD
83752001-11-19 Akim Demaille <akim@epita.fr>
8376
8377 * src/system.h (LIST_FREE, shortcpy): New.
8378 * src/LR0.c: Use them.
8379 * src/output.c (free_itemsets, free_reductions, free_shifts):
8380 Remove, replaced by LIST_FREE.
8381
f59c437a
AD
83822001-11-19 Akim Demaille <akim@epita.fr>
8383
8384 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8385 (REDUCTIONS_ALLOC): New.
8386 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8387 allocation.
8388
6986fd9e
AD
83892001-11-19 Akim Demaille <akim@epita.fr>
8390
8391 * src/LR0.c (new_state): Complete trace code.
8392 * src/nullable.c (set_nullable): Don't translate traces.
8393
4bc30f78
AD
83942001-11-19 Akim Demaille <akim@epita.fr>
8395
8396 * src/print_graph.c (print_core): Better locality of variables.
8397 * src/print.c (print_core): Likewise.
8398
08a946e0
AD
83992001-11-19 Akim Demaille <akim@epita.fr>
8400
8401 * src/vcg.c: You do the output, so you are responsible of the
8402 handling of VCG syntax, in particular: use quotearg.
8403 * src/print_graph.c: Don't.
8404 (print_actions): Don't output the actions as part of the nodes,
8405 since that's the job of the edges.
8406 (print_state): Don't output by hand: fill the node description,
9bfe901c 8407 and ask for its output.
08a946e0 8408
f0473484
AD
84092001-11-19 Akim Demaille <akim@epita.fr>
8410
cc72668c
AD
8411 * src/bison.simple (yyparse): When verbosely reporting an error,
8412 no longer put additional quotes around token names.
f0473484
AD
8413 * tests/calc.at: Adjust.
8414
e41dc700
AD
84152001-11-19 Akim Demaille <akim@epita.fr>
8416
8417 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8418 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8419 * src/output.c: Adjust.
8420
652a871c
AD
84212001-11-19 Akim Demaille <akim@epita.fr>
8422
8423 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8424 (rule_t): this.
8425 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8426
b2ed6e58
AD
84272001-11-19 Akim Demaille <akim@epita.fr>
8428
8429 * src/gram.h (rule_t): New.
8430 (rule_table): New.
8431 (rrhs, rlhs): Remove, part of state_t.
8432 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8433 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8434 * src/reader.c, src/reduce.c: Adjust.
8435
edad7067
AD
84362001-11-19 Akim Demaille <akim@epita.fr>
8437
8438 * src/reader.c (symbols_output): New, extracted from...
8439 (packsymbols): Here.
8440 (reader): Call it.
8441
3feec034
AD
84422001-11-19 Akim Demaille <akim@epita.fr>
8443
8444 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8445 (maxrhs): this new function.
8446
ddcd5fdf
AD
84472001-11-19 Akim Demaille <akim@epita.fr>
8448
cc72668c 8449 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
8450 Adjust.
8451
bb527fc2
AD
84522001-11-19 Akim Demaille <akim@epita.fr>
8453
cc72668c 8454 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
8455 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8456 * src/lalr.c: Adjust.
8457
a845a697
AD
84582001-11-19 Akim Demaille <akim@epita.fr>
8459
8460 * src/lalr.c (initialize_LA): Only initialize LA. Let...
8461 (set_state_table): handle the `lookaheads' members.
8462
f004bf6a
AD
84632001-11-19 Akim Demaille <akim@epita.fr>
8464
cc72668c
AD
8465 * src/lalr.h (lookaheads): Removed array, whose contents is now
8466 a member of...
f004bf6a
AD
8467 (state_t): this structure.
8468 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8469 Adjust.
8470
de326cc0
AD
84712001-11-19 Akim Demaille <akim@epita.fr>
8472
cc72668c
AD
8473 * src/lalr.h (consistent): Removed array, whose contents is now
8474 a member of...
de326cc0
AD
8475 (state_t): this structure.
8476 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8477 Adjust.
8478
90b4416b
AD
84792001-11-19 Akim Demaille <akim@epita.fr>
8480
cc72668c
AD
8481 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
8482 contents are now members of...
90b4416b
AD
8483 (state_t): this structure.
8484 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8485 Adjust.
8486
9703cc49
AD
84872001-11-19 Akim Demaille <akim@epita.fr>
8488
8489 * src/lalr.h (state_t): New.
8490 (state_table): Be a state_t * instead of a core **.
8491 (accessing_symbol): Remove, part of state_t.
8492 * src/lalr.c: Adjust.
8493 (set_accessing_symbol): Merge into...
8494 (set_state_table): this.
8495 * src/print_graph.c, src/conflicts.c: Adjust.
8496
d803322e
AD
84972001-11-14 Akim Demaille <akim@epita.fr>
8498
8499 * tests/calc.at, tests/output.at, tests/regression.at,
8500 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
8501 now the tests are run in private dirs, therefore AC_CLEANUP and
8502 family can be simplified to 0-ary.
8503 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
8504 use abs. path to find config.h.
8505 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
8506 stderr, there can be way too much random noise.
8507 Instead pass -Werror to GCC and rely on the exit status.
8508 Reported by Wolfram Wagner.
8509
3d76b07d
AD
85102001-11-14 Akim Demaille <akim@epita.fr>
8511
8512 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
8513 defined only if yyoverflow is defined, to avoid `warning: unused
8514 variable `yyvs1''.
8515 Reported by The Test Suite.
8516
09b503c8
AD
85172001-11-14 Akim Demaille <akim@epita.fr>
8518
8519 * src/print.c: Include reduce.h.
8520 Reported by Hans Aberg.
8521
85222001-11-14 Akim Demaille <akim@epita.fr>
8523
8524 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
8525 Revert a previous patch: these are really const.
8526 * src/conflicts.c (conflict_report): Additional useless pair of
8527 braces to pacify GCC's warnings for `if () if () {} else {}'.
8528 * src/lex.c (parse_percent_token): Replace equal_offset with
8529 arg_offset.
8530 arg is const.
8531 Be sure to strdup `arg' when used, since there is no reason for
8532 token_buffer not to change.
8533
0f37a994
AD
85342001-11-14 Akim Demaille <akim@epita.fr>
8535
8536 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
8537 definition.
8538 * src/main.c (main): Use them.
8539 Suggested by Hans Aberg.
8540
d39d93b8
AD
85412001-11-12 Akim Demaille <akim@epita.fr>
8542
8543 * src/system.h (ngettext): Now that we use ngettext, be sure to
8544 provide a default definition when NLS are not used.
8545
9edcd895
AD
85462001-11-12 Akim Demaille <akim@epita.fr>
8547
8548 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
8549 Use @kbd to denote user input.
8550 (Language and Grammar): ANSIfy the example.
8551 Adjust its layout for info/notinfo.
8552 (Location Tracking Calc): Output error messages to stderr.
8553 Output locations in a more GNUtically correct way.
8554 Fix a couple of Englishos.
8555 Adjust @group/@end group pairs.
8556
7da99ede
AD
85572001-11-12 Akim Demaille <akim@epita.fr>
8558
e3aa65c5 8559 %expect was not functioning at all.
7da99ede
AD
8560
8561 * src/conflicts.c (expected_conflicts): Set to -1.
8562 (conflict_report): Use ngettext.
8563 (conflicts_print): Check %expect and make its violation an error.
8564 * doc/bison.texinfo (Expect Decl): Adjust.
8565 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
8566 * tests/regression.at (%expect not enough, %expect right)
8567 (%expect too much): New.
8568
ba9dda1a
AD
85692001-11-12 Akim Demaille <akim@epita.fr>
8570
8571 * tests/regression.at (Conflicts): Rename as...
8572 (Unresolved SR Conflicts): this.
8573 (Solved SR Conflicts): New.
8574
337c5bd1
AD
85752001-11-12 Akim Demaille <akim@epita.fr>
8576
8577 * src/reduce.c (print_results): Rename as...
8578 (reduce_output): This.
8579 Output to OUT, passed as argument, instead of output_obstack.
8580 (dump_grammar): Likewise.
8581 (reduce_free): New.
8582 Also free V1.
8583 (reduce_grammar): No longer call reduce_output, since...
8584 * src/print.c (print_results): do it.
8585 * src/main.c (main): Call reduce_free;
8586
c73a41af
AD
85872001-11-12 Akim Demaille <akim@epita.fr>
8588
8589 * src/conflicts.c (print_reductions): Accept OUT as argument.
8590 Output to it, not to output_obstack.
8591 * src/print.c (print_actions): Adjust.
8592
0df87bb6
AD
85932001-11-12 Akim Demaille <akim@epita.fr>
8594
8595 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
8596 the result instead of using...
8597 (src_total, rrc_total, src_count, rrc_count): Remove.
8598 (any_conflicts): Remove.
8599 (print_conflicts): Split into...
8600 (conflicts_print, conflicts_output): New.
8601 * src/conflicts.h: Adjust.
8602 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 8603 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
8604 * tests/regression.at (Conflicts): New.
8605 Reported by Tom Lane.
8606
e4d3d4de
AD
86072001-11-12 Akim Demaille <akim@epita.fr>
8608
8609 * tests/regression.at (Invalid input): Remove, duplicate with
8610 ``Invalid input: 1''.
8611
6d7d248e
AD
86122001-11-12 Akim Demaille <akim@epita.fr>
8613
8614 * tests/torture.at (AT_DATA_STACK_TORTURE)
8615 (Exploding the Stack Size with Alloca)
8616 (Exploding the Stack Size with Malloc): New.
8617
e9e4c321
AD
86182001-11-12 Akim Demaille <akim@epita.fr>
8619
8620 * src/bison.simple (YYSTACK_REALLOC): New.
8621 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 8622 Reported by Per Allansson.
e9e4c321 8623
5f7e0832
AD
86242001-11-12 Pascal Bart <pascal.bart@epita.fr>
8625
8626 * src/bison.simple: Define type yystype instead of YYSTYPE, and
8627 define CPP macro, which substitute YYSTYPE by yystype.
8628 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
8629 with yyltype/YYLTYPE. This allows inclusion of the generated
8630 header within the parser if the compiler, such as GGC, accepts
8631 multiple equivalent #defines.
8632 From Akim.
8633
e3f1699f
AD
86342001-11-05 Akim Demaille <akim@epita.fr>
8635
8636 * src/reader.c (symbols_output): New, extracted from...
8637 (packsymbols): here.
8638 (reader): Adjust.
8639
65be0866
AD
86402001-11-05 Akim Demaille <akim@epita.fr>
8641
8642 * src/lex.c (parse_percent_token): s/quotearg/quote/.
8643
e4d910bf
AD
86442001-11-05 Akim Demaille <akim@epita.fr>
8645
8646 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
8647 pattern.
8648
951366c1
AD
86492001-11-05 Akim Demaille <akim@epita.fr>
8650
8651 * src/options.h (struct option_table_struct): set_flags is void*.
8652 * src/options.c (longopts): Support `--output' and `%output'.
8653 (usage): Adjust.
8654 * src/lex.h (tok_setopt): Remove, replaced with...
8655 (tok_intopt, tok_stropt): these new guys.
8656 * src/lex.c (getopt.h): Not needed.
8657 (token_buffer, unlexed_token_buffer): Not const.
8658 (percent_table): Promote `-' over `_' in directive names.
8659 Active `%name-prefix', `file-prefix', and `output'.
8660 (parse_percent_token): Accept possible arguments to directives.
8661 Promote `-' over `_' in directive names.
8662
d8988b2f
AD
86632001-11-04 Akim Demaille <akim@epita.fr>
8664
8665 * doc/bison.texinfo (Decl Summary): Split the list into
8666 `directives for grammars' and `directives for bison'.
8667 Sort'em.
8668 Add description of `%name-prefix', `file-prefix', and `output'.
8669 Promote `-' over `_' in directive names.
8670 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
8671 Simplify the description of `--name-prefix'.
8672 Promote `-' over `_' in directive names.
8673 Promote `--output' over `--output-file'.
8674 Fix the description of `--defines'.
8675 * tests/output.at: Exercise %file-prefix and %output.
8676
6468d18e
AD
86772001-11-02 Akim Demaille <akim@epita.fr>
8678
8679 * doc/refcard.tex: Update.
8680
6b7e85b9
AD
86812001-11-02 Akim Demaille <akim@epita.fr>
8682
8683 * src/symtab.h (SUNDEF): New.
8684 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
8685 stand for `uninitialized', instead of 0.
8686 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
8687 * src/lex.c (lex): Adjust.
8688
8689 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
8690 Number it 0.
8691 Let yylex return it instead of a plain 0.
8692 Reported by Dick Streefland.
8693
cd5aafcf
AD
86942001-11-02 Akim Demaille <akim@epita.fr>
8695
8696 * tests/regression.at (Mixing %token styles): New test.
8697
037ca2f1
AD
86982001-11-02 Akim Demaille <akim@epita.fr>
8699
8700 * src/reader.c (parse_thong_decl): Formatting changes.
8701 (token_translations_init): New, extracted from...
8702 (packsymbols): Here.
8703 Adjust.
8704
270a173c
AD
87052001-11-01 Akim Demaille <akim@epita.fr>
8706
8707 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
8708 Check that `9foo.y' produces correct cpp guards.
8709 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
8710 guards.
8711 Reported by Wwp.
8712
561f9a30
AD
87132001-11-01 Akim Demaille <akim@epita.fr>
8714
8715 * tests/regression.at (Invalid input: 2): New.
8716 * src/lex.c (unlexed_token_buffer): New.
8717 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
8718 too.
8719 Reported by Wwp.
8720
f987e9d2
AD
87212001-11-01 Akim Demaille <akim@epita.fr>
8722
8723 * tests/calc.at: Catch up with 1.30.
8724 * configure.in: Bump to 1.49a.
8725 Adjust to newer Autotest.
8726
0846f581
PB
87272001-10-19 Pascal Bart <pascal.bart@epita.fr>
8728
8729 * src/conflicts.c: Move global variables rrc_total and src_total ...
8730 (print_conflicts): here.
8731 * src/output.c (output): Free global variable user_toknums.
8732 * src/lex.c (token_obstack): Become static.
8733
3c1a79b3
AD
87342001-10-18 Akim Demaille <akim@epita.fr>
8735
8736 * tests/atlocal.in (GCC): Add.
8737 * tests/calc.at: s/m4_match/m4_bmatch/.
8738 s/m4_patsubst/m4_bpatsubst/.
8739 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
8740 * configure.in: AC_SUBST(GCC).
8741
5d52e7d0
MA
87422001-10-14 Marc Autret <autret_m@epita.fr>
8743
8744 * src/options.c (create_long_option_table): Fix.
8745
631aa1d3
AD
87462001-10-10 Akim Demaille <akim@epita.fr>
8747
8748 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
8749
f6ec6d13
AD
87502001-10-04 Akim Demaille <akim@epita.fr>
8751
8752 * src/reader.c (parse_union_decl): Push the caracters in
8753 union_obstack, not attrs_obstack.
8754
342b8b6e
AD
87552001-10-04 Akim Demaille <akim@epita.fr>
8756
8757 Merge in the branch 1.29.
8758
8759 * src/reader.c (packsymbols): Use a temporary obstack for
8760 `%%tokendef', since output_stack is already used elsewhere.
8761
8762 2001-10-02 Akim Demaille <akim@epita.fr>
8763
8764 Bump 1.29d.
8765
8766 2001-10-02 Akim Demaille <akim@epita.fr>
8767
8768 Version 1.29c.
8769
8770 2001-10-02 Akim Demaille <akim@epita.fr>
8771
8772 * tests/regression.at (Invalid CPP headers): New.
8773 From Alexander Belopolsky.
8774 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
8775
8776 2001-10-02 Akim Demaille <akim@epita.fr>
8777
8778 * tests/regression.at (Invalid input): New.
8779 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
8780 Reported by Shura.
8781
8782 2001-10-02 Akim Demaille <akim@epita.fr>
8783
8784 * tests/calc.at: Now that --debug works, the tests must be adjusted.
8785
8786 2001-10-02 Akim Demaille <akim@epita.fr>
8787
8788 * src/output.c (output_parser): Assert `skeleton'.
8789 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
8790 systems.
8791 From Shura.
8792
8793 2001-10-01 Marc Autret <autret_m@epita.fr>
8794
8795 * src/lex.h: Echo modifications.
8796 * src/lex.c (unlex): Parameter is now token_t.
8797 From Hans Aberg.
8798
8799 2001-10-01 Marc Autret <autret_m@epita.fr>
8800
8801 * src/main.c: Include lex.h.
8802 From Hans Aberg.
8803
8804 2001-09-29 Akim Demaille <akim@epita.fr>
8805
8806 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
8807
8808 2001-09-28 Akim Demaille <akim@epita.fr>
8809
8810 * tests/testsuite.at: Update to newer Autotest.
8811 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
8812
8813 2001-09-27 Akim Demaille <akim@epita.fr>
8814
8815 Position independent wrapper.
8816
8817 * tests/bison: Remove.
8818 * tests/bison.in: New.
8819 * configure.in: Adjust.
8820
8821 2001-09-27 Paul Eggert <eggert@twinsun.com>
8822
8823 Port quotearg fixes from tar 1.13.24.
8824
8825 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
8826 tm to be declared.
8827 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
8828 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
8829
8830 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
8831 * m4/mbrtowc.m4: New file.
8832 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
8833 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
8834
8835 2001-09-27 Akim Demaille <akim@epita.fr>
8836
8837 Bump to 1.29c.
8838
8839 2001-09-27 Akim Demaille <akim@epita.fr>
8840
8841 Version 1.29b.
8842
8843 2001-09-25 Akim Demaille <akim@epita.fr>
8844
8845 * src/system.h: Include `xalloc.h'.
8846 Remove it from the C files.
8847 * src/files.c (output_files): Free the obstacks.
8848 * src/lex.c (init_lex): Rename as...
8849 (lex_init): this.
8850 (lex_free): New.
8851 * src/main.c (main): Use it.
8852
8853 2001-09-24 Marc Autret <autret_m@epita.fr>
8854
8855 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
8856 to output informations in fout (FILE*).
8857 (open_graph, close_graph): Likewise.
8858 (output_graph, output_edge, output_node): Likewise.
8859 * src/vcg.h: Update function prototypes.
8860 * src/print_graph.c (print_graph): Open output graph file.
8861 (print_actions): Adjust.
8862 * src/files.h: Remove extern declaration.
8863 * src/files.c: Remove graph_obstack declaration.
8864 (open_files): Remove graph_obstack initialization.
8865 (output_files): Remove graph_obstack saving.
8866
8867 2001-09-24 Marc Autret <autret_m@epita.fr>
8868
8869 * src/files.c (compute_output_file_names): Fix.
8870
8871 2001-09-24 Marc Autret <autret_m@epita.fr>,
8872 Akim Demaille <akim@epita.fr>
8873
8874 * src/reader.c (reader): Remove call to free_symtab ().
8875 * src/main.c (main): Call it here.
8876 Include symtab.h.
8877 * src/conflicts.c (initialize_conflicts): Rename as...
8878 (solve_conflicts): this.
8879 * src/print.c (print_core, print_actions, print_state)
8880 (print_grammar): Dump to a file instead a `output_obstack'.
8881 (print_results): Dump `output_obstack', and then proceed with the
8882 FILE *.
8883 * src/files.c (compute_output_file_names, close_files): New.
8884 (output_files): Adjust.
8885 * src/main.c (main): Adjust.
8886
8887 2001-09-23 Marc Autret <autret_m@epita.fr>
8888
8889 * src/files.c (compute_header_macro): Computes header macro name
8890 from spec_defines_file when given.
8891
8892 2001-09-23 Marc Autret <autret_m@epita.fr>
8893
8894 * src/files.c (output_files): Add default extensions.
8895
8896 2001-09-22 Akim Demaille <akim@epita.fr>
8897
8898 * src/conflicts.c (finalize_conflicts): Rename as...
8899 (free_conflicts): this.
8900
8901 2001-09-22 Akim Demaille <akim@epita.fr>
8902
8903 * src/gram.c (gram_free): Rename back as...
8904 (dummy): this.
8905 (output_token_translations): Free `token_translations'.
8906 * src/symtab.c (free_symtab): Free the tag field.
8907
8908 2001-09-22 Akim Demaille <akim@epita.fr>
8909
8910 Remove `translations' as it is always set to true.
8911
8912 * src/gram.h: Adjust.
8913 * src/reader.c (packsymbols, parse_token_decl): Adjust
8914 * src/print.c (print_grammar): Adjust.
8915 * src/output.c (output_token_translations): Adjust.
8916 * src/lex.c (lex): Adjust.
8917 * src/gram.c: Be sure the set pointers to NULL.
8918 (dummy): Rename as...
8919 (gram_free): this.
8920
8921 2001-09-22 Akim Demaille <akim@epita.fr>
8922
8923 * configure.in: Invoke AM_LIB_DMALLOC.
8924 * src/system.h: Use dmalloc.
8925 * src/LR0.c: Be sure to have pointers initialized to NULL.
8926 (allocate_itemsets): Allocate kernel_items only if needed.
8927
8928 2001-09-22 Akim Demaille <akim@epita.fr>
8929
8930 * configure.in: Bump to 1.29b.
8931 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8932 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8933 need xmalloc.c in calc.y.
8934 From Pascal Bart.
8935
8936 2001-09-21 Akim Demaille <akim@epita.fr>
8937
8938 Version 1.29a.
8939 * Makefile.maint, config/config.guess, config/config.sub,
8940 * config/missing: Update from masters.
8941 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8942 upon package.m4.
8943 * configure.in (ALL_LINGUAS): Add `tr'.
8944
8945 2001-09-21 Akim Demaille <akim@epita.fr>
8946
8947 * tests/Makefile.am (package.m4): Move to...
8948 ($(srcdir)/$(TESTSUITE)): here.
8949
8950 2001-09-20 Akim Demaille <akim@epita.fr>
8951
8952 * src/complain.c: No longer try to be standalone: use system.h.
8953 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8954 * src/complain.h: Likewise.
8955 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8956 Remove the unused variable `n'.
8957 From Albert Chin-A-Young.
8958
8959 2001-09-18 Marc Autret <autret_m@epita.fr>
8960
8961 * doc/bison.1: Update.
8962 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8963 descriptions.
8964 (Option Cross Key): Update.
8965 Add --graph.
8966
8967 2001-09-18 Marc Autret <autret_m@epita.fr>
8968
8969 * tests/regression.at: New test (comment in %union).
8970
8971 2001-09-18 Marc Autret <autret_m@epita.fr>
8972
8973 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8974 do that.
8975 Reported by Keith Browne.
8976
8977 2001-09-18 Marc Autret <autret_m@epita.fr>
8978
8979 * tests/output.at: Add tests for --defines and --graph.
8980
8981 2001-09-18 Marc Autret <autret_m@epita.fr>
8982
8983 * tests/output.at: Removes tests of %{header,src}_extension features.
8984
8985 2001-09-18 Akim Demaille <akim@epita.fr>
8986
8987 * tests/Makefile.am (package.m4): New.
8988 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8989 (_AT_CHECK_CALC_ERROR): Likewise.
8990 Factor the `, ' part of verbose error messages.
8991
8992 2001-09-18 Marc Autret <autret_m@epita.fr>
8993
8994 * src/getargs.c (longopts): Declare --defines and --graph as options
8995 with optional arguments.
8996 * src/files.h: Add extern declarations.
8997 * src/files.c (spec_graph_file, spec_defines_file): New.
8998 (output_files): Update.
8999 Remove CPP-outed code.
9000
9001 2001-09-18 Marc Autret <autret_m@epita.fr>
9002
9003 Turn off %{source,header}_extension feature.
9004
9005 * src/files.c (compute_exts_from_gf): Update.
9006 (compute_exts_from_src): Update.
9007 (output_files): CPP-out useless code.
9008 * src/files.h: Remove {header,source}_extension extern declarations.
9009 * src/reader.c (parse_dquoted_param): CPP-out.
9010 (parse_header_extension_decl): Remove.
9011 (parse_source_extension_decl): Remove.
9012 (read_declarations): Remove cases tok_{hdrext,srcext}.
9013 * src/lex.c (percent_table): Remove {header,source}_extension entries.
9014 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
9015
9016 2001-09-10 Akim Demaille <akim@epita.fr>
9017
9018 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
9019 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
9020 (AT_CHECK_OUTPUT): this.
9021 Merely check ls' exit status, its output is useless.
9022
9023 2001-09-10 Akim Demaille <akim@epita.fr>
9024
9025 * tests/calc.at: Use m4_match.
9026 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
9027
9028 2001-09-10 Marc Autret <autret_m@epita.fr>,
9029 Akim Demaille <akim@epita.fr>
9030
9031 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
9032 enum color_e.
9033 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
9034 to `normal'.
9035 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
9036 * src/lex.h: Adjust prototype.
9037 (token_t): Add `tok_undef'.
9038 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
9039 (parse_percent_token): Now returns token_t.
9040 Add default statement in switch.
9041 (lex): Separate `c' as an input variable, from the token_t result
9042 part.
9043 (unlexed): Is a token_t.
9044
9045 2001-09-10 Akim Demaille <akim@epita.fr>
9046
9047 * configure.in: Bump to 1.29a.
9048
9049 2001-09-07 Akim Demaille <akim@epita.fr>
9050
9051 Version 1.29.
9052
9053 2001-08-30 Akim Demaille <akim@epita.fr>
9054
9055 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
9056 * m4/atconfig.m4: Remove.
9057 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
9058 * tests/bison: New.
9059 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
9060 m4_if, m4_patsubst, and m4_regexp.
9061 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
9062 `input' file instead of echo.
9063
9064 2001-08-29 Akim Demaille <akim@epita.fr>
9065
9066 Bump to 1.28e.
9067
9068 2001-08-29 Akim Demaille <akim@epita.fr>
9069
9070 Version 1.28d.
9071
9072 2001-08-29 Paul Eggert <eggert@twinsun.com>
9073
9074 * src/bison.simple (yyparse): Don't take the address of an
9075 item before the start of an array, as that doesn't conform to
9076 the C Standard.
9077
9078 2001-08-29 Robert Anisko <anisko_r@epita.fr>
9079
9080 * doc/bison.texinfo (Location Tracking Calc): New node.
9081
9082 2001-08-29 Paul Eggert <eggert@twinsun.com>
9083
9084 * src/output.c (output): Do not define const, as this now
9085 causes more problems than it cures.
9086
9087 2001-08-29 Akim Demaille <akim@epita.fr>
9088
9089 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
9090 the nodes.
9091 Be sure to tag the `detailmenu'.
9092
9093 2001-08-29 Akim Demaille <akim@epita.fr>
9094
9095 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
9096 download in a tmp dir.
9097
9098 2001-08-28 Marc Autret <autret_m@epita.fr>
9099
9100 * config/depcomp: New file.
9101
9102 2001-08-28 Marc Autret <autret_m@epita.fr>
9103
9104 * doc/bison.1 (mandoc): Adjust.
9105 From Juan Manuel Guerrero.
9106
9107 2001-08-28 Marc Autret <autret_m@epita.fr>
9108
9109 * src/print_graph.c (print_state): Fix.
9110
9111 2001-08-27 Marc Autret <autret_m@epita.fr>
9112
9113 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
9114 char * members.
9115 Echo modifications to the functions prototypes.
9116 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
9117
9118 2001-08-27 Marc Autret <autret_m@epita.fr>
9119
9120 * src/vcg.c: Include `xalloc.h'.
9121 (add_colorentry): New.
9122 (add_classname): New.
9123 (add_infoname): New.
9124 * src/vcg.h: Add new prototypes.
9125
9126 2001-08-27 Akim Demaille <akim@epita.fr>
9127
9128 * Makefile.maint: Sync. again with CVS Autoconf.
9129
9130 2001-08-27 Akim Demaille <akim@epita.fr>
9131
9132 * Makefile.maint: Formatting changes.
9133 (po-update, cvs-update, update): New targets.
9134 (AMTAR): Remove.
9135
9136 2001-08-27 Akim Demaille <akim@epita.fr>
9137
9138 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9139 * Makefile.maint: Sync. with CVS Autoconf.
9140
9141 2001-08-27 Marc Autret <autret_m@epita.fr>
9142
9143 * src/vcg.h (struct infoname_s): New.
9144 (struct colorentry_s): New.
9145 (graph_s): New fields {vertical,horizontal}_order in structure.
9146 Add `infoname' field.
9147 Add `colorentry' field;
9148 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
9149 (G_HORIZONTAL_ORDER): New.
9150 (G_INFONAME): New.
9151 (G_COLORENTRY): New.
9152 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
9153 Add output of `infoname'.
9154 Add output of `colorentry'.
9155
9156 2001-08-27 Marc Autret <autret_m@epita.fr>
9157
9158 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
9159 This one shadowed a global parameter.
9160
9161 2001-08-24 Marc Autret <autret_m@epita.fr>
9162
9163 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
9164 instead of `unsigned'.
9165 (print_state): Do not call obstack_object_size () in obstack_grow ()
9166 to avoid macro variables shadowing.
9167
9168 2001-08-23 Marc Autret <autret_m@epita.fr>
9169
9170 * src/lex.c (percent_table): Typo: s/naem/name/.
9171 Add graph option.
9172 Normalize new options declarations.
9173
9174 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
9175
9176 * tests/suite.at: Exercise %header_extension and %source_extension.
9177
9178 2001-08-16 Marc Autret <autret_m@epita.fr>
9179
9180 * src/reader.c (parse_dquoted_param): New.
9181 (parse_header_extension_decl): Use it.
9182 (parse_source_extension_decl): Likewise.
9183
9184 2001-08-16 Marc Autret <autret_m@epita.fr>
9185
9186 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
9187 (get_xxxx_str): Use assert () instead of complain ().
9188 Remove return invokations in default cases.
9189 (get_decision_str): Modify default behaviour. Remove second argument.
9190 Echo modifications on calls.
9191 (output_graph): Fix.
9192
9193 2001-08-16 Marc Autret <autret_m@epita.fr>
9194
9195 * src/getargs.c (usage): Update with ``-g, --graph''.
9196
9197 2001-08-16 Marc Autret <autret_m@epita.fr>
9198
9199 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
9200 (Option Cross Key): Likewise.
9201 * doc/bison.1: Update.
9202
1c8c2190
PB
92032001-09-25 Pascal Bart <pascal.bart@epita.fr>
9204
9205 * src/output.c (output_master_parser): Don't finish action_obstack.
9206 (output_parser): Don't care about the muscle action, here.
9207 (prepare): Copy the action_obstack in the action muscle.
9208 (output): Free action_obstack.
9209
180d45ba
PB
92102001-09-23 Pascal Bart <pascal.bart@epita.fr>
9211
9212 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
9213 will contain `%union' declaration.
9214 (parse_union_decl): Delete #line directive output.
9215 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
9216 informations about %union.
9217 (parse_union_decl): Copy the union_obstack in the muscle stype.
9218 * src/bison.simple: Add new #line directive.
9219 Add typdef %%stype YYSTYPE.
9220
c51d1a19
PB
92212001-09-23 Pascal Bart <pascal.bart@epita.fr>
9222
9223 * src/bison.simple: Add new `#line' directive.
9224
6f9344da
PB
92252001-09-22 Pascal Bart <pascal.bart@epita.fr>
9226
9227 * src/bison.simple: New `#line' directive.
9228 * src/output.c (output_parser): Support new dynamic muscle input_line.
9229
652def80
MA
92302001-09-22 Marc Autret <autret_m@epita.fr>
9231
9232 * src/output.c (output_master_parser): New.
9233 (output_parser): Be more re-entrant.
9234
25b222fa
MA
92352001-09-21 Marc Autret <autret_m@epita.fr>
9236
9237 * src/reader.c (copy_definition, parse_union_decl): Update and use
9238 `linef' muscle.
9239 (copy_action): Likewise.
9240 Use obstack_1grow ().
9241 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
9242
6bc35ae5
MA
92432001-09-21 Marc Autret <autret_m@epita.fr>
9244
9245 * src/options.c (option_table): Adjust.
9246 * src/lex.c (parse_percent_token): Fix.
9247
c0629aa1
PB
92482001-09-20 Pascal Bart <pascal.bart@epita.fr>
9249
9250 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 9251
82b6d266
PB
92522001-09-20 Pascal Bart <pascal.bart@epita.fr>
9253
9254 * src/lex.c (parse_percent_token): Change type of variable `tx', which
9255 is now an option_table_struct*.
9256 (option_strcmp): New function option_strcmp.
9257 (parse_percent_token): Call option_strcmp.
9258 * src/getargs.c (xalloc.h, options.h): Include it.
9259 (getargs): Call create_long_option_table.
9260 (getargs): Free longopts at the end of the function.
9261 (shortopts): Move in options.c.
9262 * src/options.c (create_long_option_table): New function. Convert
9263 information from option_table to option structure.
9264 * src/reader.c (options.h): Include it.
9265
9266 * src/Makefile.am: Adjust.
9267 * src/options.c (option_table): Create from longopts and percent_table.
9268 * src/getargs.c (longopts): Delete.
9269 * src/lex.c (struct percent_table_struct): Delete.
9270 (percent_table): Delete.
9271 (options.h): Include it.
9272 * src/options.c: Create.
9273 * src/options.h: Create.
9274 Declare enum opt_access_e.
9275 Define struct option_table_struct.
9276
75f5aaea
MA
92772001-09-20 Marc Autret <autret_m@epita.fr>
9278
9279 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
9280 sections of Bison.
9281
f508cb0a
PB
92822001-09-19 Pascal Bart <pascal.bart@epita.fr>
9283
9284 * src/bison.simple: s/%%filename/%%skeleton.
9285 * src/muscle_tab.c (getargs.h): Include it.
9286 (muscle_init): Insert new muscle skeleton.
9287
13105fc1
PB
92882001-09-18 Pascal Bart <pascal.bart@epita.fr>
9289
9290 * src/output.c (output_parser): Delete unused variable actions_dumped.
9291
b0c4483e
PB
92922001-09-07 Pascal Bart <pascal.bart@epita.fr>
9293
9294 * src/output.c (output): Delete call to reader_output_yylsp.
9295 * src/reader.c (reader): Likewise.
9296 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 9297
11d82f03
MA
92982001-09-02 Marc Autret <autret_m@epita.fr>
9299
9300 * src/reader.c: Include muscle_tab.h.
9301 (parse_union_decl): Update.
9302 (parse_macro_decl): Rename parse_muscle_decl.
9303 Update to use renamed functions and variable.
9304 (read_declarations, copy_action, read_additionnal_code, : Updated
9305 with correct variables and functions names.
9306 (packsymbols, reader): Likewise.
342b8b6e 9307
11d82f03 9308 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 9309
11d82f03
MA
9310 * src/output.c: Include muscle_tab.h
9311 In all functions using macro_insert, change by using muscle_insert ().
9312 (macro_obstack): Rename muscle_obstack.
9313 Echo modifications in the whole file.
9314 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
9315 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
9316 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
9317
9318 * src/muscle_tab.h: Update double inclusion macros.
9319 (macro_entry_s): Rename muscle_entry_s.
9320 Update prototypes.
342b8b6e 9321
11d82f03
MA
9322 * src/muscle_tab.c: Include muscle_tab.h.
9323 Rename macro_tabble to muscle_table.
9324 (mhash1, mhash2, mcmp): Use muscle_entry.
9325 (macro_init): Rename muscle_init. Update.
9326 (macro_insert): Rename muscle_insert. Update.
9327 (macro_find): Rename muscle_find. Update.
9328
9329 * src/main.c: Include muscle_tab.h.
9330 (main): Call muscle_init ().
9331 * src/Makefile.am (bison_SOURCES): Echo modifications.
9332
93a37297
MA
93332001-09-02 Marc Autret <autret_m@epita.fr>
9334
f753cd62 9335 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 9336
f753cd62
MA
9337 * src/muscle_tab.c, src/muscle_tab.h: Add files.
9338
93392001-09-02 Marc Autret <autret_m@epita.fr>
9340
9341 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 9342
682d48cd
PB
93432001-09-01 Pascal Bart <pascal.bart@epita.fr>
9344
342b8b6e 9345 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
9346 filename.
9347
087c8fda
MA
93482001-09-01 Marc Autret <autret_m@epita.fr>
9349
9350 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
9351 to an explicit value to activate the feature. We do it here.
9352
dda680cb
PB
93532001-08-31 Pascal Bart <pascal.bart@epita.fr>
9354
9355 * src/output.c (prepare): Delete the `filename' muscule insertion.
9356 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
9357 (parse_union_decl): Likewise.
9358 * src/macrotab.c (macro_init): Initialize filename by infile.
9359
9e644e64
MA
93602001-08-31 Marc Autret <autret_m@epita.fr>
9361
9362 * src/bison.simple (YYLSP_NEEDED): New definition.
9363 * src/output.c (prepare): Add macro insertion of `locations_flag'
9364
17da6427
PB
93652001-08-31 Pascal Bart <pascal.bart@epita.fr>
9366
9367 * src/output.c (prepare): Delete insertion of previous muscles,
9368 and insert the `prefix' muscles.
9369 * src/macrotab.c (macro_init): Likewise.
9370 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 9371 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
9372 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9373 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 9374 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
9375 name_prefix.
9376
e8cb70b9
PB
93772001-08-31 Pascal Bart <pascal.bart@epita.fr>
9378
9379 * src/main.c (main): Standardize.
9380 * src/output.c (output_table_data, output_parser): Likewise.
9381 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9382
63c2d5de
MA
93832001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9384
342b8b6e 9385 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
9386 %%epilogue.
9387 * src/output.c (output): Rename %%declarations to %%prologue.
9388 * src/bison.simple: Echo modifications.
342b8b6e 9389
d8cb5183
MA
93902001-08-31 Marc Autret <autret_m@epita.fr>
9391
9392 * src/reader.c (readgram): CleanUp.
9393 (output_token_defines): Likewise.
9394 (packsymbols): Likewise.
9395 (reader): Likewise.
9396 * src/output.c (output): CPP-out useless code.
9397
6c686258
PB
93982001-08-31 Pascal Bart <pascal.bart@epita.fr>
9399
342b8b6e 9400 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
9401 output_trailers and output_headers.
9402 * src/output.h: Remove obsolete functions prototypes of output_headers
9403 and output_trailers.
9404
8f451ef7
PB
94052001-08-30 Pascal Bart <pascal.bart@epita.fr>
9406
9407 * src/main.c: Include macrotab.h.
342b8b6e 9408 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
9409 Adjust functions prototypes.
9410 * src/macrotab.c (macro_insert): Constify key and value.
9411 (macro_find): Constify key.
9412 (macro_insert): Include 'xalloc.h'
9413 (macro_insert): Use XMALLOC.
9414 (macro_find): Constify return value.
9415 * src/output.c (output_table_data): Rename table to table_data.
9416 (output_parser): Constify macro_key, macro_value.
9417
997b6fd0 94182001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
9419
9420 * src/reader.c (parse_skel_decl): New.
342b8b6e 9421 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
9422 * src/lex.h (token_t): New token `tok_skel'.
9423 * src/lex.c (percent_table): Add skeleton option entry.
9424 Standardize.
9425
ff48177d
MA
94262001-08-29 Marc Autret <autret_m@epita.fr>
9427
9428 * src/bison.simple: Add %%user_code directive at the end.
9429 * src/reader.c (read_additionnal_code): New.
9430 (reader): Use it.
9431 * src/output.c (output_program): Remove.
9432 (output): Update.
9433
b33160bf
MA
94342001-08-28 Marc Autret <autret_m@epita.fr>
9435
9436 * src/output.c (output_actions): Clean up.
4e5caae2 9437 (output_gram): CPP-out useless code.
b33160bf
MA
9438 * src/reader.c (reader): Clean up, CPP-out useless code.
9439
d1a2daf7
PB
94402001-08-28 Pascal Bart <pascal.bart@epita.fr>
9441
342b8b6e 9442 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 9443 directive.
d1a2daf7
PB
9444 * src/bison.simple: Add `%%definitions'.
9445
2b763dfe
MA
94462001-08-28 Marc Autret <autret_m@epita.fr>
9447
9448 * config/depcomp: New file.
9449
f1a87ef6
PE
94502001-08-27 Paul Eggert <eggert@twinsun.com>
9451
9452 * src/bison.simple (yyparse): Don't take the address of an
9453 item before the start of an array, as that doesn't conform to
9454 the C Standard.
9455
82e236e2
RA
94562001-08-27 Robert Anisko <robert.anisko@epita.fr>
9457
f1a87ef6 9458 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
9459 obstack. It was done too late here.
9460
9461 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
9462 completely wrong.
9463 (reader): Initialize the macro obstack here, since we need it to grow
9464 '%define' directives.
9465
9466 * src/reader.h: Declare the macro obstack as extern.
9467
b0cfa28a
RA
94682001-08-27 Robert Anisko <robert.anisko@epita.fr>
9469
9470 * src/output.c (output_parser): Fix. Store single '%' characters in
9471 the output obstack instead of throwing them away.
9472
6fc74234
AD
94732001-08-27 Akim Demaille <akim@epita.fr>
9474
9475 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9476
9c76d118
RA
94772001-08-25 Robert Anisko <robert.anisko@epita.fr>
9478
9479 * lib/Makefile.am: Adjust.
9480
a8289c62
RA
94812001-08-25 Robert Anisko <robert.anisko@epita.fr>
9482
9483 * src/bison.simple: Update and add '%%' directives.
9484
b6610515
RA
94852001-08-25 Robert Anisko <robert.anisko@epita.fr>
9486
9487 * src/reader.c (reader): Remove calls to 'output_headers' and
9488 'output_trailers'. Remove some C output.
9489 (readgram): Disable a piece of code that was writing a default
9490 definition for 'YYSTYPE'.
9491 (reader_output_yylsp): Remove.
9492 (packsymbols): Output token defintions to a macro.
9493 (copy_definition): Disable C output.
6fc74234 9494
b6610515
RA
9495 * src/reader.c (parse_macro_decl): New function used to parse macro
9496 declarations.
9497 (copy_string2): Put the body of copy_string into this new function.
9498 Add a parameter to let the caller choose whether he wants to copy the
9499 string delimiters or not.
9500 (copy_string): Be a simple call to copy_string2 with the last argument
9501 bound to true.
9502 (read_declarations): Add case for macro definition.
9503 (copy_identifier): New.
6fc74234 9504 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
9505 rather than lex.
9506
26f609ff
RA
95072001-08-25 Robert Anisko <robert.anisko@epita.fr>
9508
9509 * src/output.c (prepare): Add prefixed names.
9510 (output_parser): Output semantic actions.
9511 (output_parser): Fix bug on '%%line' directives.
6fc74234 9512
26f609ff
RA
9513 * src/output.c (output_headers): Remove. The C code printed by this
9514 function should now be in the skeletons.
9515 (output_trailers): Remove.
9516 (output): Disable call to 'reader_output_yylsp'.
9517 (output_rule_data): Do not output tables to the table obstack.
9518
9519 * src/output.c: Remove some C dedicated output.
9520 Improve the use of macro and output obstacks.
9521 (output_defines): Remove.
6fc74234 9522
26f609ff
RA
9523 * src/output.c (output_token_translations): Associate 'translate'
9524 table with a macro. No output to the table obstack.
9525 (output_gram): Same for 'rhs' and 'prhs'.
9526 (output_stos): Same for 'stos'.
9527 (output_rule_data): Same for 'r1' and 'r2'.
9528 (token_actions): Same for 'defact'.
9529 (goto_actions): Same for 'defgoto'.
9530 (output_base): Same for 'pact' and 'pgoto'.
9531 (output_table): Same for 'table'.
9532 (output_check): Same for 'check'.
6fc74234 9533
26f609ff
RA
9534 * src/output.c (output_table_data): New function.
9535 (output_short_table): Remove.
9536 (output_short_or_char_table): Remove.
6fc74234 9537
26f609ff
RA
9538 * src/output.c (output_parser): Replace most of the skeleton copy code
9539 with something new. Skeletons are now processed character by character
9540 rather than line by line, and Bison looks for '%%' macros. This is the
9541 first step in making Bison's output process (a lot) more flexible.
9542 (output_parser): Use the macro table.
9543
6f43b113
RA
95442001-08-25 Robert Anisko <robert.anisko@epita.fr>
9545
9546 * src/main.c (main): Initialize the macro table.
9547
dd3127cf
RA
95482001-08-25 Robert Anisko <robert.anisko@epita.fr>
9549
9550 * src/lex.c (percent_table): Add tok_define.
9551 * src/lex.h: Add tok_define.
9552
aa321494
RA
95532001-08-25 Robert Anisko <robert.anisko@epita.fr>
9554
9555 * src/macrotab.c: New file.
9556 * src/macrotab.h: New file.
9557 * src/Makefile.am: Update.
9558
68bd3b6b
RA
95592001-08-25 Robert Anisko <robert.anisko@epita.fr>
9560
9561 * lib/hash.c: New file.
9562 * lib/hash.h: New file.
9563 * lib/Makefile.am: Update.
9564
45f8dd1e
AD
95652001-08-15 Akim Demaille <akim@epita.fr>
9566
9567 Version 1.28c.
9568
40a64a7a 95692001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
9570
9571 * src/reader.c (readgram): Indent output macro YYSTYPE.
9572 (packsymbols): Likewise.
9573 (output_token_defines): Likewise.
9574 * src/files.c: Standardize.
9575 (compute_header_macro): New.
9576 (defines_obstack_save): New. Use compute_header_macro.
9577 (output_files): Update. Use defines_obstack_save.
9578
f9a8293a
AD
95792001-08-15 Akim Demaille <akim@epita.fr>
9580
9581 * doc/bison.texinfo (Table of Symbols): Document
9582 YYSTACK_USE_ALLOCA.
9583
150ca7a7
AD
95842001-08-15 Akim Demaille <akim@epita.fr>
9585
9586 * missing: Update from CVS Automake.
9587 * config/config.guess, config/config.sub, config/texinfo.tex:
9588 Update from gnu.org.
9589
69b5cec4
AD
95902001-08-15 Akim Demaille <akim@epita.fr>
9591
9592 * Makefile.maint: Sync with CVS Autoconf.
9593
f2b5126e
PB
95942001-08-14 Pascal Bart <pascal.bart@epita.fr>
9595
69b5cec4 9596 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
9597 `fdl.texi'.
9598 * doc/fdl.texi: Add to package.
9599
4ecbf796
MA
96002001-08-14 Marc Autret <autret_m@epita.fr>
9601
9602 Turn on %{source,header}_extension features.
9603
69b5cec4 9604 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
9605 source_extension.
9606 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 9607 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
9608 between options.
9609
95fb5662
MA
96102001-08-14 Marc Autret <autret_m@epita.fr>
9611
9612 * src/files.c (compute_base_names): Add extensions computing when
9613 `--file-prefix' used.
9614 Standardize function calls.
9615
78d09da9
MA
96162001-08-13 Marc Autret <autret_m@epita.fr>
9617
69b5cec4 9618 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
9619 defining it (defined but null disables alloca).
9620
5a009f2c
MA
96212001-08-13 Marc Autret <autret_m@epita.fr>
9622
9623 * src/bison.simple (_yy_memcpy): CPP reformat.
9624
1e41465a
PB
96252001-08-13 Pascal Bart <pascal.bart@epita.fr>
9626
9627 * tests/atconfig.in (CPPFLAGS): Fix.
9628
c67a198d
PB
96292001-08-10 Pascal Bart <pascal.bart@epita.fr>
9630
79282c6c 9631 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
9632 `gpl.texi'.
9633 * doc/gpl.texi: Add to package.
9634
09a6de7e
MA
96352001-08-10 Marc Autret <autret_m@epita.fr>
9636
9637 * src/print_graph.h: Fix.
9638 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
9639
b77b9ee0
AD
96402001-08-10 Akim Demaille <akim@epita.fr>
9641
9642 * src/system.h: Provide default declarations for stpcpy, strndup,
9643 and strnlen.
9644
3e259915
MA
96452001-08-10 Robert Anisko <anisko_r@epita.fr>
9646
9647 * doc/bison.texinfo (Locations): Update @$ stuff.
9648
ca96bc2d
MA
96492001-08-09 Robert Anisko <anisko_r@epita.fr>
9650
9651 * src/bison.simple (YYLLOC_DEFAULT): Update.
9652 (yyparse): Adjust.
9653
fdc6758b
MA
96542001-08-08 Marc Autret <autret_m@epita.fr>
9655
b77b9ee0 9656 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
9657 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
9658 Reported by Fabrice Bauzac.
957d4dbf 9659
600cad3b
MA
96602001-08-08 Marc Autret <autret_m@epita.fr>
9661
9662 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
9663 * src/vcg.c (output_node): Fix.
9664 * src/vcg.h: Cleanup.
9665 * src/print_graph.c: Add comments.
b77b9ee0 9666 (node_output_size): New global variable. Simplify the formatting of
600cad3b 9667 the VCG graph output.
b77b9ee0 9668 (print_actions): Unused code is now used. It notifies the final state
600cad3b 9669 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 9670 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
9671 blue.
9672 Get the current node name and node_obstack by argument.
9673 (node_obstack): New variable.
9674 (print_state): Manage node_obstack.
9675 (print_core): Use node_obstack given by argument.
9676 A node is not only computed here but in print_actions also.
9677 (print_graph): CPP out useless code instead of commenting it.
9678
976e528f
AD
96792001-08-07 Pascal Bart <pascal.bart@epita.fr>
9680
9681 * tests/atconfig.in (CPPFLAGS): Fix.
9682
20e8e5ca
AD
96832001-08-07 Akim Demaille <akim@epita.fr>
9684
9685 * src/print_graph.c (quote): New.
9686 (print_core): Use it.
9687
957d4dbf 96882001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 9689
3e3da797
AD
9690 * src/vcg.c (complain.h): Include it.
9691 Unepitaize `return' invocations.
c4b66126 9692 [NDEBUG] (main): Remove.
79282c6c 9693 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
9694 * src/files.c (open_files): Initialize graph_obstack.
9695 * src/print_graph.c (print_actions): CPP out useless code.
9696 (print_core): Don't output the last `\n' in labels.
9697 Use `quote'.
9698 * src/files.c (output_files): Output the VCG file.
9699 * src/main.c (main): Invoke print_graph ();
3e3da797 9700
957d4dbf 97012001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
9702
9703 Automaton VCG graph output.
9704 Using option ``-g'' or long option ``--graph'', you can generate
9705 a gram_filename.vcg file containing a VCG description of the LALR (1)
9706 automaton of your grammar.
9707
9708 * src/main.c: Call to print_graph() function.
9709 * src/getargs.h: Update.
9710 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
9711 (graph_flag): New flag.
9712 (longopts): Update.
9713 (getargs): Add case `g'.
9714 * src/files.c (graph_obstack): New obstack struct.
9715 (open_files): Initialize new obstack.
9716 (output_files): Saves graph_obstack if required.
9717 * src/files.h (graph_obstack): New extern declaration.
9718 * src/Makefile.am: Add new source files.
9719
927c1557 97202001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
9721
9722 * src/print_graph.c, src/print_graph.h (graph): New.
9723 * src/vcg.h: New file.
9724 * src/vcg.c: New file, VCG graph handling.
9725
7333d403
AD
97262001-08-06 Marc Autret <autret_m@epita.fr>
9727
9728 Add of %source_extension and %header_extension which specify
9729 the source or/and the header output file extension.
9730
9731 * src/files.c (compute_base_names): Remove initialisation of
9732 src_extension and header_extension.
9733 (compute_exts_from_gf): Update.
9734 (compute_exts_from_src): Update.
9735 (output_files): Update.
9736 * src/reader.c (parse_header_extension_decl): New.
9737 (parse_source_extension_decl): New.
9738 (read_declarations): New case statements for the new tokens.
9739 * src/lex.c (percent_table): Add entries for %source_extension
9740 and %header_extension.
9741 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
9742
84163231
AD
97432001-08-06 Marc Autret <autret_m@epita.fr>
9744
9745 * configure.in: Bump to 1.28c.
9746 * doc/bison.texinfo: Texinfo thingies.
9747
8303fc42
AD
97482001-08-04 Pascal Bart <pascal.bart@epita.fr>
9749
9750 * tests/atconfig.in (CPPFLAGS): Add.
9751 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
9752
70a84437
AD
97532001-08-03 Akim Demaille <akim@epita.fr>
9754
9755 Version 1.28b.
9756
2ce10144
AD
97572001-08-03 Akim Demaille <akim@epita.fr>
9758
9759 * tests/Makefile.am (check-local): Ship testsuite.
9760 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
9761 Include `string.h'.
9762
1e3e4bc1
AD
97632001-08-03 Akim Demaille <akim@epita.fr>
9764
9765 * configure.in: Try using -Wformat when compiling.
9766
42b45b7f
AD
97672001-08-03 Akim Demaille <akim@epita.fr>
9768
9769 * configure.in: Bump to 1.28b.
9770
8f13fe33
AD
97712001-08-03 Akim Demaille <akim@epita.fr>
9772
9773 * src/complain.c: Adjust strerror_r portability issues.
9774
b37ba92c
AD
97752001-08-03 Akim Demaille <akim@epita.fr>
9776
9777 Version 1.28a.
9778
b0ce6046
AD
97792001-08-03 Akim Demaille <akim@epita.fr>
9780
9781 * src/getargs.c, src/getarg.h (skeleton)): Constify.
9782 * src/lex.c (literalchar): Avoid name clashes on `buf'.
9783 * src/getargs.c: Include complain.h.
9784 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
9785 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
9786
d01c415b
AD
97872001-08-03 Akim Demaille <akim@epita.fr>
9788
9789 * src/reader.c (readgram): Display hidden chars in error messages.
9790
459dd1a6
AD
97912001-08-03 Akim Demaille <akim@epita.fr>
9792
9793 Update to gettext 0.10.39.
9794
53b74c0c
AD
97952001-08-03 Akim Demaille <akim@epita.fr>
9796
9797 * lib/strspn.c: New.
9798
234a3be3
AD
97992001-08-01 Marc Autret <autret_m@epita.fr>
9800
9801 * doc/bison.texinfo: Update.
9802 * doc/bison.1 (mandoc): Update.
9803 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
9804 * src/files.c: Support output files extensions computing.
9805 (src_extension): New static variable.
9806 (header_extension): New static variable.
9807 (tr): New function.
9808 (get_extension_index): New function, gets the index of an extension
9809 filename in a string.
9810 (compute_exts_from_gf): New function, computes extensions from the
9811 grammar file extension.
9812 (compute_exts_from_src): New functions, computes extensions from the
9813 C source file extension, file given by ``-o'' option.
9814 (compute_base_names): Update.
9815 (output_files): Update.
9816
847bf1f5
AD
98172001-08-01 Robert Anisko <anisko_r@epita.fr>
9818
d995fee7 9819 * doc/bison.texi: Document @$.
847bf1f5
AD
9820 (Locations): New section.
9821
d074a105
AD
98222001-07-18 Akim Demaille <akim@epita.fr>
9823
9824 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
9825 * config/prev-version.txt, config/move-if-change: New.
9826 * Makefile.am: Adjust.
9827
3419715d
AD
98282001-07-08 Pascal Bart <pascal.bart@epita.fr>
9829
9830 * src/bison.simple (yyparse): Suppress warning `comparaison
9831 between signed and unsigned'.
9832
62ab6972
AD
98332001-07-05 Pascal Bart <pascal.bart@epita.fr>
9834
9835 * src/getargs.h (raw_flag): Remove.
9836 * src/getargs.c: Die on `-r'/`--raw'.
9837 * src/lex.c (parse_percent_token): Die on `%raw'.
9838 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
9839 * tests/calc.at: Suppress test with option `--raw'.
9840
1e24cc5b
AD
98412001-07-14 Akim Demaille <akim@epita.fr>
9842
9843 * config/: New.
9844 * configure.in: Require Autoconf 2.50.
9845 Update to gettext 0.10.38.
9846
32dfccf8
AD
98472001-03-16 Akim Demaille <akim@epita.fr>
9848
9849 * doc/bison.texinfo: ANSIfy the examples.
9850
cd5bd6ac
AD
98512001-03-16 Akim Demaille <akim@epita.fr>
9852
9853 * getargs.c (skeleton): New variable.
9854 (longopts): --skeleton is a new option.
9855 (shortopts, getargs): -S is a new option.
9856 * getargs.h: Declare skeleton.
9857 * output.c (output_parser): Use it.
9858
5141b016
AD
98592001-03-16 Akim Demaille <akim@epita.fr>
9860
9861 * m4/strerror_r.m4: New.
9862 * m4/error.m4: Run AC_FUNC_STRERROR_R.
9863 * lib/error.h, lib/error.c: Update.
9864
447992b9
AD
98652001-03-16 Akim Demaille <akim@epita.fr>
9866
9867 * src/getargs.c (longopts): Clean up.
9868
274d42ce
AD
98692001-02-21 Akim Demaille <akim@epita.fr>
9870
9871 * src/reader.c (gensym): `gensym_count' is your own.
9872 Use a static buf to create the symbol name, as token_buffer is no
9873 longer a buffer.
9874
22c821f3
AD
98752001-02-08 Akim Demaille <akim@epita.fr>
9876
9877 * src/conflicts.c (conflict_report): Be sure not to append to res
9878 between two calls, which could happen if both first sprintf were
9879 skipped, but not the first cp += strlen.
9880
18569462
AD
98812001-02-08 Akim Demaille <akim@epita.fr>
9882
9883 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
9884 New, from fileutils 4.0.37.
9885 * configure.in: Require Autoconf 2.49c. I took some time before
9886 making this decision. This is the only way out for portability
9887 issues in Bison, it would mean way too much duplicate effort to
9888 import in Bison features implemented in 2.49c since 2.13.
9889 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
9890
0d8f3c8a
AD
98912001-02-02 Akim Demaille <akim@epita.fr>
9892
9893 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 9894 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 9895
f17bcd1f
AD
98962001-01-19 Akim Demaille <akim@epita.fr>
9897
9898 Get rid of the ad hoc handling of token_buffer in the scanner: use
9899 the obstacks.
9900
9901 * src/lex.c (token_obstack): New.
9902 (init_lex): Initialize it. No longer call...
9903 (grow_token_buffer): this. Remove it.
9904 Adjust all the places which used it to use the obstack.
9905
511e79b3
AD
99062001-01-19 Akim Demaille <akim@epita.fr>
9907
9908 * src/lex.h: Rename all the tokens:
9909 s/\bENDFILE\b/tok_eof/g;
9910 s/\bIDENTIFIER\b/tok_identifier/g;
9911 etc.
9912 Let them be enums, not #define, to ease debugging.
9913 Adjust all the code.
9914
0d6508ef
AD
99152001-01-18 Akim Demaille <akim@epita.fr>
9916
9917 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9918 * src/lex.c (maxtoken, grow_token_buffer): Static.
9919
6deb4447
AD
99202001-01-18 Akim Demaille <akim@epita.fr>
9921
9922 Since we now use obstacks, more % directives can be enabled.
9923
9924 * src/lex.c (percent_table): Also accept `%yacc',
9925 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9926 `%debug'.
9927 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9928 instead of returning a token.
9929 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9930 * src/reader.c (read_declarations): Adjust.
9931 * src/files.c (open_files): Don't call `compute_base_names', don't
9932 compute `attrsfile' since they depend upon data which might be
9933 *in* the input file now.
9934 (output_files): Do it here.
9935 * src/output.c (output_headers): Document the fact that this patch
9936 introduces a guaranteed SEGV for semantic parsers.
9937 * doc/bison.texinfo: Document them.
9938 * tests/suite.at: Exercise these %options.
9939
ff4423cc
AD
99402000-12-20 Akim Demaille <akim@epita.fr>
9941
9942 Also handle the output file (--verbose) with obstacks.
9943
9944 * files.c (foutput): Remove.
9945 (output_obstack): New.
9946 Adjust all dependencies.
9947 * src/conflicts.c: Return a string.
9948 * src/system.h (obstack_grow_string): Rename as...
9949 (obstack_sgrow): this. Be ready to work with non literals.
9950 (obstack_fgrow4): New.
9951
956dba3a
AD
99522000-12-20 Akim Demaille <akim@epita.fr>
9953
9954 * src/files.c (open_files): Fix the computation of short_base_name
9955 in the case of `-o foo.tab.c'.
9956
337bab46
AD
99572000-12-20 Akim Demaille <akim@epita.fr>
9958
9959 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9960 (copy_dollar): Now that everything uses obstacks, get rid of the
9961 FILE * parameters.
9962
5d3214b8
AD
99632000-12-20 Akim Demaille <akim@epita.fr>
9964
9965 * src/files.c (open_files): Actually the `.output' file is based
9966 on the short_base_name, not base_name.
9967 * tests/suite.at (Checking output file names): Adjust.
9968
29092a57
AD
99692000-12-20 Akim Demaille <akim@epita.fr>
9970
9971 * src/bison.s1: Remove, we now use directly...
9972 * src/bison.simple: this.
9973 * src/Makefile.am: Use pkgdata instead of data.
9974
ea5607fd
AD
99752000-12-20 Akim Demaille <akim@epita.fr>
9976
9977 * src/files.c (guard_obstack): New.
9978 (open_files): Initialize it.
9979 (output_files): Dump it...
9980 * src/files.h: Export it.
9981 * src/reader.c (copy_guard): Use it.
9982
27110317
AD
99832000-12-19 Akim Demaille <akim@epita.fr>
9984
9985 * src/files.c (outfile, defsfile, actfile): Removed as global
9986 vars.
9987 (open_files): Don't compute them.
9988 (output_files): Adjust.
9989 (base_name, short_base_name): Be global.
9990 Adjust dependencies.
9991
19c50364
AD
99922000-12-19 Akim Demaille <akim@epita.fr>
9993
9994 * src/files.c (strsuffix): New.
9995 (stringappend): Be just like strcat but allocate.
9996 (base_names): Eve out from open_files.
9997 Try to simplify the rather hairy computation of base_name and
9998 short_base_name.
9999 (open_files): Use it.
10000 * tests/suite.at (Checking output file names): New test.
10001
573c1d9f
AD
100022000-12-19 Akim Demaille <akim@epita.fr>
10003
10004 * src/system.h (obstack_grow_literal_string): Rename as...
10005 (obstack_grow_string): this.
10006 * src/output.c (output_parser): Recognize `%% actions' instead of
10007 `$'.
10008 * src/bison.s1: s/$/%% actions/.
10009 * src/bison.hairy: Likewise.
10010
ef7ddedd
AD
100112000-12-19 Akim Demaille <akim@epita.fr>
10012
10013 * src/output.c (output_parser): Compute the `#line' lines when
10014 there are.
10015 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
10016 Suggested by Hans Aberg.
10017
ff61dabd
AD
100182000-12-19 Akim Demaille <akim@epita.fr>
10019
10020 Let the handling of the skeleton files be local to the procedures
10021 that use it.
10022
10023 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
10024 longer static.
10025 (fparser, open_extra_files): Remove.
10026 (open_files, output_files): Don't take care of fparser.
10027 * src/files.h: Adjust.
10028 * src/output.c (output_parser): Open and close the file to the
10029 skeleton.
10030 * src/reader.c (read_declarations): When %semantic_parser, open
10031 fguard.
10032
55b96341
AD
100332000-12-19 Akim Demaille <akim@epita.fr>
10034
10035 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
10036 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
10037
358c15b7
AD
100382000-12-19 Akim Demaille <akim@epita.fr>
10039
10040 * src/files.c (open_files): Yipee! We no longer need all the code
10041 looking for `/tmp' since we have no tmp file.
10042
7de3329e
AD
100432000-12-19 Akim Demaille <akim@epita.fr>
10044
10045 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
10046 New macros.
10047 * src/files.c (open_files): Less dependency on MSDOS etc.
10048
3abcd459
AD
100492000-12-14 Akim Demaille <akim@epita.fr>
10050
10051 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
10052 Provide a default definition.
10053 Use it when executing the default @ action.
10054 * src/reader.c (reader_output_yylsp): No longer include
10055 `timestamp' and `text' in the default YYLTYPE.
10056
2a91a95e
AD
100572000-12-12 Akim Demaille <akim@epita.fr>
10058
10059 * src/reader.c (copy_definition, parse_union_decl, copy_action)
10060 (copy_guard): Quote the file names.
10061 Reported by Laurent Mascherpa.
10062
14d3eb9b
AD
100632000-12-12 Akim Demaille <akim@epita.fr>
10064
10065 * src/output.c (output_headers, output_program, output): Be sure
10066 to escape special characters when outputting filenames.
10067 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
10068 (output_headers): Don't depend on them, Use ACTSTR.
10069
d7045ec6
AD
100702000-11-17 Akim Demaille <akim@epita.fr>
10071
10072 * lib/obstack.h: Formatting changes.
10073 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
10074 prevents type checking.
10075 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
10076 cast the value to (void *): assigning a `foo *' to a `void *'
10077 variable is valid.
10078 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
10079 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
10080 append characters.
10081
6fd54b73
AD
100822000-11-17 Akim Demaille <akim@epita.fr>
10083
10084 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
10085 as...
10086 (suite.m4, regression.m4, calc.m4): these.
10087 * tests/atgeneral.m4: Update from CVS Autoconf.
10088
4c50eae6
AD
100892000-11-17 Akim Demaille <akim@epita.fr>
10090
10091 * tests/regression.m4 (%union and --defines): New test,
10092 demonstrating a current bug in the obstack implementation.
10093
a35f64ea
AD
100942000-11-17 Akim Demaille <akim@epita.fr>
10095
10096 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
10097 macros.
10098 Use them to declare the variables which are global or local to
10099 `yyparse'.
10100
7de23534
AD
101012000-11-17 Akim Demaille <akim@epita.fr>
10102
10103 * acconfig.h: Remove, no longer used.
10104
aa7815f5
AD
101052000-11-07 Akim Demaille <akim@epita.fr>
10106
10107 * src: s/Copyright (C)/Copyright/g.
10108
5af1f549
AD
101092000-11-07 Akim Demaille <akim@epita.fr>
10110
10111 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
10112 defining.
10113 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
10114
553e2b22
AD
101152000-11-07 Akim Demaille <akim@epita.fr>
10116
10117 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
10118 Merge in a single CPP if/else.
10119
8a4f41d6
AD
101202000-11-07 Akim Demaille <akim@epita.fr>
10121
10122 * src/output.c (output): Remove useless variables.
10123 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
10124 argument `data' for consistency with the prototypes.
10125 Qualify it `const'.
10126 (obstack_copy, obstack_copy0): Rename the second argument as
10127 `address' for consistency. Qualify it `const'.
10128 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
10129 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
10130 `const' their input argument (`data' or `address').
10131 Adjust the corresponding macros to include `const' in casts.
10132
095a3fb5
AD
101332000-11-03 Akim Demaille <akim@epita.fr>
10134
10135 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
10136 s/PFILE1/BISON_HAIRY/.
10137 Adjust dependencies.
10138
d1cdce7c
AD
101392000-11-03 Akim Demaille <akim@epita.fr>
10140
090c5ebf 10141 For some reason, this was not applied.
d1cdce7c
AD
10142
10143 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10144 `unlink': it's no longer used.
10145
9311529b
AD
101462000-11-03 Akim Demaille <akim@epita.fr>
10147
10148 * src/files.c (skeleton_find): New function, eved out of...
10149 (open_files, open_extra_files): here.
10150
d8880f69
AD
101512000-11-03 Akim Demaille <akim@epita.fr>
10152
10153 Don't use `atexit'.
10154
10155 * src/files.c (obstack_save): New function.
10156 (done): Rename as...
10157 (output_files): this.
10158 Use `obstack_save'.
10159 * src/main.c (main): Don't use `atexit' to register `done', since
10160 it no longer has to remove tmp files, just call `output_files'
10161 when there are no errors.
10162
0dbb648e
AD
101632000-11-02 Akim Demaille <akim@epita.fr>
10164
10165 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10166 `unlink': it's no longer used.
10167 * src/files.h: Formatting changes.
10168
896fe5c1
AD
101692000-11-02 Akim Demaille <akim@epita.fr>
10170
10171 Remove the last uses of mktemp and unlink/delete.
10172
10173 * src/files.c (fdefines, ftable): Removed.
10174 (defines_ostack, table_obstack): New.
10175 Adjust dependencies of the former into uses of the latter.
10176 * src/output.c (output_short_or_char_table, output_short_table):
10177 Convert to using obstacks.
10178 * src/reader.c (copy_comment2): Accept one FILE * and two
10179 obstacks.
10180 (output_token_defines, reader_output_yylsp): Use obstacks.
10181 * src/system.h (obstack_fgrow3): New.
10182
dd60faec
AD
101832000-11-01 Akim Demaille <akim@epita.fr>
10184
10185 Change each use of `fattrs' into a use of `attrs_obstack'.
10186
10187 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
10188 * src/files.c (fattrs): Remove.
10189 (attrs_obstack): New.
10190 Adjust all dependencies.
10191 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
10192
8c7ebe49
AD
101932000-11-01 Akim Demaille <akim@epita.fr>
10194
10195 Introduce obstacks.
10196 Change each use of `faction' into a use of `action_obstack'.
10197
10198 * lib/obstack.h, lib/obstack.c: New files.
10199 * src/files.c (faction): Remove.
10200 (action_obstack): New.
10201 Adjust all dependencies.
10202
77aee789
AD
102032000-10-20 Akim Demaille <akim@epita.fr>
10204
10205 * lib/quote.h (PARAMS): New macro. Use it.
10206
43591cec
AD
102072000-10-16 Akim Demaille <akim@epita.fr>
10208
10209 * src/output.c (output_short_or_char_table): New function.
10210 (output_short_table, output_token_translations): Use it.
10211 (goto_actions): Use output_short_table.
10212
1e9798d5
AD
102132000-10-16 Akim Demaille <akim@epita.fr>
10214
10215 * src/symtab.c (bucket_new): New function.
10216 (getsym): Use it.
10217
10218 * src/output.c (output_short_table): New argument to display the
10219 comment associated with the table.
10220 Adjust dependencies.
10221 (output_gram): Use it.
10222 (output_rule_data): Nicer output layout for YYTNAME.
10223
f282676b
AD
102242000-10-16 Akim Demaille <akim@epita.fr>
10225
10226 * src/lex.c (read_typename): New function.
10227 (lex): Use it.
10228 * src/reader.c (copy_dollar): Likewise.
10229
550a72a3
AD
102302000-10-16 Akim Demaille <akim@epita.fr>
10231
10232 * src/reader.c (copy_comment2): Expect the input stream to be on
10233 the `/' which is suspected to open a comment, instead of being
10234 called after `//' or `/*' was read.
10235 (copy_comment, copy_definition, parse_union_decl, copy_action)
10236 (copy_guard): Adjust.
10237
131e2fef
AD
102382000-10-16 Akim Demaille <akim@epita.fr>
10239
10240 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
10241 `read_signed_integer'.
10242
79282c5a
AD
102432000-10-16 Akim Demaille <akim@epita.fr>
10244
10245 * src/reader.c (copy_dollar): New function.
10246 (copy_guard, copy_action): Use it.
10247
ff4a34be
AD
102482000-10-16 Akim Demaille <akim@epita.fr>
10249
10250 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
10251 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
10252 New files, from Fileutils 4.0.27.
10253 * src/main.c (printable_version): Remove.
10254 * src/lex.c, src/reader.c: Use `quote'.
10255
102562000-10-04 Akim Demaille <akim@epita.fr>
10257
10258 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
10259
14ded682
AD
102602000-10-04 Akim Demaille <akim@epita.fr>
10261
10262 * doc/bison.texinfo: Various typos spotted by Neil Booth.
10263
8e03724b
AD
102642000-10-04 Akim Demaille <akim@epita.fr>
10265
10266 When a literal string is used to define two different tokens,
10267 `bison -v' segfaults.
10268 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
10269
10270 * tests/regression.m4: New file.
10271 Include the core of the sample provided by Piotr Gackiewicz.
10272 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
10273 properly.
10274
a9e64249
AD
102752000-10-04 Akim Demaille <akim@epita.fr>
10276
10277 * src/reader.c (parse_expect_decl): Keep `count' within the size
10278 of `buffer'.
10279 From Neil Booth.
10280
da9abf43
AD
102812000-10-02 Paul Eggert <eggert@twinsun.com>
10282
10283 * bison.s1 (yyparse): Assign the default value
10284 unconditionally, to avoid a GCC warning and make the parser a
10285 tad smaller.
10286
c33638bb
AD
102872000-10-02 Akim Demaille <akim@epita.fr>
10288
10289 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
10290 options.
10291
444c570a
AD
102922000-10-02 Akim Demaille <akim@epita.fr>
10293
10294 * src/derives.c, src/print.c, src/reduce.c: To ease the
10295 translation, move some `\n' out of the translated strings.
10296
89cab50d
AD
102972000-10-02 Akim Demaille <akim@epita.fr>
10298
10299 The location tracking mechanism is precious for parse error
10300 messages. Nevertheless, it is enabled only when `@n' is used in
10301 the grammar, which is a different issue (you can use it in error
10302 message, but not in the grammar per se). Therefore, there should
10303 be another means to enable it.
10304
10305 * src/getargs.c (getargs): Support `--locations'.
10306 (usage): Report it.
10307 * src/getargs.h (locationsflag): Export it.
10308 * src/lex.c (percent_table): Support `%locations'.
10309 * src/reader.c (yylsp_needed): Remove this variable, now replaced
10310 with `locationsflag'.
10311 * doc/bison.texinfo: Document `--locations' and `%locations'.
10312 Sort the options.
10313 * tests/calc.m4: Test it.
10314
10315 For regularity of the names, replace each
10316 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
10317 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
10318 In addition replace each `flag' with `_flag'.
10319
d6c2cba0
AD
103202000-10-02 Akim Demaille <akim@epita.fr>
10321
10322 Also test parse error messages, including with YYERROR_VERBOSE.
10323
10324 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
10325 associative).
10326 Use it to check the computations.
10327 Use it to check `nonassoc' is honored.
10328 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
10329 `--yyerror-verbose'.
10330 (_AT_CHECK_CALC): Adjust to this option.
10331 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
10332
5a35a6cb
AD
103332000-10-02 Akim Demaille <akim@epita.fr>
10334
10335 Test also `--verbose', `--defines' and `--name-prefix'. Testing
10336 the latter demonstrates a flaw in the handling of non debugging
10337 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
10338 was used in order to simplify:
10339
10340 #if YYDEBUG
10341 if (yydebug)
10342 {
10343 ...
10344 }
10345 #endif
10346
10347 into
10348
10349 if (yydebug)
10350 {
10351 ...
10352 }
10353
10354 unfortunately this leads to a CPP conflict when
10355 `--name-prefix=foo' is used since it produces `#define yydebug
10356 foodebug'.
10357
10358 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
10359 (YYDPRINTF): New macro.
10360 Spread its use.
10361 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10362 the bison options.
10363 Also test `--verbose', `--defines' and `--name-prefix'.
10364
71da9eea
AD
103652000-10-02 Akim Demaille <akim@epita.fr>
10366
10367 Improve the readability of the produced parsers.
10368
10369 * src/bison.s1: Formatting changes.
10370 Improve the comment related to the `$' mark.
10371 (yydefault): Don't fall through to `yyresume': `goto' there.
10372 * src/output.c (output_parser): When the `$' is met, skip the end
10373 of its line.
10374 New variable, `number_of_dollar_signs', to check there's exactly
10375 one `$' in the parser skeleton.
10376
95e36146
AD
103772000-10-02 Akim Demaille <akim@epita.fr>
10378
10379 * lib/xstrdup.c: New file, from the fileutils.
10380 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10381 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10382 instead of strlen + xmalloc + strcpy.
10383 * src/symtab.c (copys): Remove, use xstrdup instead.
10384
d7020c20
AD
103852000-10-02 Akim Demaille <akim@epita.fr>
10386
10387 * src/gram.h (associativity): New enum type which replaces the
10388 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10389 `right_assoc', `left_assoc' and `non_assoc'.
10390 Adjust all dependencies.
10391 * src/reader.c: Formatting changes.
10392 (LTYPESTR): Don't define it, use it as a literal in
10393 `reader_output_yylsp'.
10394 * src/symtab.h (symbol_class): New enum type which replaces the
10395 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10396 `sunknown', `stoken and `snterm'.
10397
1916f98e
AD
103982000-10-02 Akim Demaille <akim@epita.fr>
10399
10400 * src/getargs.c (fixed_outfiles): Rename as...
10401 (yaccflag): for consistency and accuracy.
10402 Adjust dependencies.
10403
d7913476
AD
104042000-10-02 Akim Demaille <akim@epita.fr>
10405
10406 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10407 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10408 difficult and introduced a lot of core dump. It turns out that
10409 Bison used an implementation of `xmalloc' based on `calloc', and
10410 at various places it does depend upon the initialization to 0. I
10411 have not tried to isolate the pertinent places, and all the former
10412 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10413 someone should address this issue.
10414
10415 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10416 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10417 files.
10418 Adjust dependencies.
10419 * src/warshall.h: New file.
10420 Propagate.
10421
340ef489
AD
104222000-10-02 Akim Demaille <akim@epita.fr>
10423
10424 Various anti-`extern in *.c' changes.
10425
10426 * src/system.h: Include `assert.h'.
10427
b2ca4022
AD
104282000-10-02 Akim Demaille <akim@epita.fr>
10429
10430 * src/state.h (nstates, final_state, first_state, first_shift)
10431 (first_reduction): Move their exportation from here...
10432 * src/LR0.h: to here.
10433 Adjust dependencies.
10434 * src/getargs.c (statisticsflag): New variable.
10435 Add support for `--statistics'.
10436 Adjust dependencies.
10437
10438 Remove a lot of now useless `extern' statements in most files.
10439
403b315b
AD
104402000-10-02 Akim Demaille <akim@epita.fr>
10441
10442 * src/LR0.h: New file.
10443 Propagate its use.
10444
07a58c13
AD
104452000-10-02 Akim Demaille <akim@epita.fr>
10446
10447 * src/print.h: New file.
10448 Propagate its use.
10449 * src/print.c: Formatting and ordering changes.
10450 (verbose, terse): Replace with...
10451 (print_results): this new function.
10452 Adjust dependencies.
10453
0619caf0
AD
104542000-10-02 Akim Demaille <akim@epita.fr>
10455
10456 * src/conflicts.c (conflict_report): New function.
10457 (conflict_log, verbose_conflict_log): Replace with...
10458 (print_conflicts): this function.
10459 Adjust dependencies.
10460 * src/conflicts.h: New file.
10461 Propagate its inclusion.
10462
3519ec76
AD
104632000-10-02 Akim Demaille <akim@epita.fr>
10464
10465 * src/nullable.h: New file.
10466 Propagate its inclusion.
10467 * src/nullable.c: Formatting changes.
10468
015acc48
AD
104692000-10-02 Akim Demaille <akim@epita.fr>
10470
10471 * src/reduce.h: New file.
10472 Propagate its inclusion.
10473 * src/reduce.c: Topological sort and other formatting changes.
10474 (bool, TRUE, FALSE): Move their definition to...
10475 * src/system.h: here.
10476
8963a27b
AD
104772000-10-02 Akim Demaille <akim@epita.fr>
10478
10479 * src/files.c: Formatting changes.
10480 (tryopen, tryclose, openfiles): Rename as...
10481 (xfopen, xfclose, open_files): this.
10482 (stringappend): static.
10483 * src/files.h: Complete the list of exported symbols.
10484 Propagate its use.
10485
a70083a3
AD
104862000-10-02 Akim Demaille <akim@epita.fr>
10487
10488 * src/reader.h: New file.
10489 Propagate its use instead of tedious list of `extern' and
10490 prototypes.
10491 * src/reader.c: Formatting changes, topological sort,
10492 s/register//.
10493
abadc117
AD
104942000-10-02 Akim Demaille <akim@epita.fr>
10495
10496 * src/lex.h: Prototype `lex.c' exported functions.
10497 * src/reader.c: Adjust.
10498 * src/lex.c: Formatting changes.
10499 (safegetc): Rename as...
10500 (xgetc): this.
10501
720d742f
AD
105022000-10-02 Akim Demaille <akim@epita.fr>
10503
10504 * src/lalr.h: New file.
10505 Propagate its inclusion instead of prototypes and `extern'.
10506 * src/lalr.c: Formatting changes, topological sorting etc.
10507
f2acea59
AD
105082000-10-02 Akim Demaille <akim@epita.fr>
10509
10510 * src/output.c (token_actions): Introduce a temporary array,
10511 YYDEFACT, that makes it possible for this function to use
10512 output_short_table.
10513
d019d655
AD
105142000-10-02 Akim Demaille <akim@epita.fr>
10515
10516 `user_toknums' is output as a `short[]' in `output.c', while it is
10517 defined as a `int[]' in `reader.c'. For consistency with the
10518 other output tables, `user_toknums' is now defined as a table of
10519 shorts.
10520
10521 * src/reader.c (user_toknums): Be a short table instead of an int
10522 table.
10523 Adjust dependencies.
10524
10525 Factor the short table outputs.
10526
10527 * src/output.c (output_short_table): New function.
10528 * src/output.c (output_gram, output_stos, output_rule_data)
10529 (output_base, output_table, output_check): Use it.
10530
6c89f1c1
AD
105312000-10-02 Akim Demaille <akim@epita.fr>
10532
10533 * src/output.c (output): Topological sort of the functions, in
10534 order to get rid of the `static' prototypes.
10535 No longer use `register'.
10536 * src/output.h: New file.
10537 Propagate its inclusion in files explicitly prototyping functions
10538 from output.c.
10539
d9efd181
AD
105402000-09-21 Akim Demaille <akim@epita.fr>
10541
10542 * src/atgeneral.m4: Update from Autoconf.
10543
c29240e7 105442000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
10545
10546 * src/closure.h: New file.
10547 * src/closure.c: Formatting changes, topological sort over the
10548 functions, use of closure.h.
10549 (initialize_closure, finalize_closure): Rename as...
10550 (new_closure, free_closure): these. Adjust dependencies.
10551 * src/LR0.c: Formatting changes, topological sort, use of
10552 cloture.h.
10553 (initialize_states): Rename as...
10554 (new_states): this.
10555 * src/Makefile.am (noinst_HEADERS): Adjust.
10556
499daa50
AD
105572000-09-20 Akim Demaille <akim@epita.fr>
10558
10559 * src/acconfig.h: Don't protect config.h against multiple
10560 inclusion.
10561 Don't define PARAMS.
10562 * src/system.h: Define PARAMS.
10563 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
10564 purpose of config.h. system.h must not try to fix wrong
10565 definitions in config.h.
10566
cc84fd5d
AD
105672000-09-20 Akim Demaille <akim@epita.fr>
10568
10569 * src/derives.h: New file.
10570 * src/main.c, src/derives.h: Use it.
10571 Formatting changes.
10572 * src/Makefile.am (noinst_HEADERS): Adjust.
10573
db5b3a89
AD
105742000-09-20 Akim Demaille <akim@epita.fr>
10575
10576 * tests/atgeneral.m4: Update from Autoconf.
10577 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
10578 (AT_CHECK_CALC): New macros.
10579 Use these macros to test bison with options `', `--raw',
10580 `--debug', `--yacc', `--yacc --debug'.
10581
ceed8467
AD
105822000-09-19 Akim Demaille <akim@epita.fr>
10583
10584 * src/output.c: Formatting changes.
10585 * src/machine.h: Remove, leaving its contents in...
10586 * src/system.h: here.
10587 Include stdio.h.
10588 Adjust all dependencies on stdio.h and machine.h.
10589 * src/getargs.h: New file.
10590 Let all `extern' declarations about getargs.c be replaced with
10591 inclusion of `getargs.h'.
10592 * src/Makefile.am (noinst_HEADERS): Adjust.
10593
10594 * tests/calc.m4 (yyin): Be initialized in main, not on the global
10595 scope.
10596 (yyerror): Returns void, not int.
10597 * doc/bison.texinfo: Formatting changes.
10598
05a1d24b
AD
105992000-09-19 Akim Demaille <akim@epita.fr>
10600
10601 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
10602 portable.
10603
cbd25751
AD
106042000-09-18 Akim Demaille <akim@epita.fr>
10605
10606 * configure.in: Append WARNING_CFLAGS to CFLAGS.
10607 * src/Makefile.am (INCLUDES): Don't.
10608 Be ready to fetch headers in lib/.
10609
13863333
AD
106102000-09-18 Akim Demaille <akim@epita.fr>
10611
10612 * doc/bison.texinfo: Update the copyright.
10613 ANSIfy and GNUify the examples.
10614 Remove the old menu.
10615
0d533154
AD
106162000-09-18 Akim Demaille <akim@epita.fr>
10617
10618 First set of tests: use the `calc' example from the documentation.
10619
10620 * src/bison.s1 (yyparse): Condition the code using `yytname' which
10621 is defined only when YYDEBUG is.
10622 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
10623 * src/files.c (tryopen, tryclose): Formatting changes.
10624 Move to the top and be static.
10625 * src/reader.c (read_signed_integer): Likewise.
10626 * tests/calc.m4: New file.
10627 * Makefile.am, suite.m4: Adjust.
10628 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
10629
e79137ac
AD
106302000-09-18 Akim Demaille <akim@epita.fr>
10631
10632 Add support for an Autotest test suite for Bison.
10633
10634 * m4/m4.m4, m4/atconfig.m4: New files.
10635 * m4/Makefile.am (EXTRA_DIST): Adjust.
10636 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
10637 files.
10638 * src/getargs.c: Display a more standard --version message.
10639 * src/reader.c (reader): Formatting changes.
10640 No longer depend upon VERSION_STRING.
10641 * configure.in: No longer use `dnl'.
10642 Set up the test suite and the new directory `tests/.
10643 (VERSION_STRING): Remove.
10644
27821bff
AD
106452000-04-14 Akim Demaille <akim@epita.fr>
10646
10647 * src/reader.c (copy_comment2): New function, same as former
10648 `copy_comment', but outputs into two FILE *.
10649 (copy_comment): Use it.
10650 (parse_union_decl): Use it.
10651 (get_type, parse_start_decl): Use the same `invalid' message.
10652 (parse_start_decl, parse_union_decl): Use the same `multiple'
10653 message.
10654 (parse_union_decl, copy_guard, copy_action): Use the same
10655 `unmatched' message.
10656 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
10657
cfe5fbc0
AD
106582000-03-31 Akim Demaille <akim@epita.fr>
10659
10660 * src/files.c (tryopen, tryclose): Move to the top.
10661 Be static.
10662
cb7db13e
AD
106632000-03-31 Akim Demaille <akim@epita.fr>
10664
10665 * src/main.c (main): Don't call `done', exit does it.
10666
a0f6b076
AD
106672000-03-31 Akim Demaille <akim@epita.fr>
10668
36281465
AD
10669 * allocate.c: s/return (foo)/return foo/.
10670 * lalr.c: Likewise.
10671 * LR0.c: Likewise.
10672 * output.c: Likewise.
10673 * reader.c: Likewise.
10674 * symtab.c: Likewise.
10675 * vmsgetargs.c: Likewise.
10676
106772000-03-31 Akim Demaille <akim@epita.fr>
10678
10679 Clean up the error reporting functions.
a0f6b076
AD
10680
10681 * src/report.c: New file.
10682 * src/report.h: Likewise.
10683 * src/Makefile.am: Adjust.
10684 * m4/error.m4: New file.
10685 * m4/Makefile.am: Adjust.
10686 * configure.in (jm_PREREQ_ERROR): Call it.
10687 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
10688 Remove.
10689 (fatal, fatals): Remove. All callers use complain.c::fatal.
10690 (warn, warni, warns, warnss, warnss): Remove. All callers use
10691 complain.c::complain.
10692 (toomany): Remove, use fatal instead.
10693 * src/files.c (done): No argument, use complain_message_count.
10694 * src/main.c (main): Register `done' to `atexit'.
10695
10696 * src/getargs.c (usage): More `fputs', less `fprintf'.
10697
18539825
AD
106982000-03-28 Akim Demaille <akim@epita.fr>
10699
10700 * lib/: New directory.
10701 * Makefile.am (SUBDIRS): Adjust.
10702 * configure.in: Adjust.
10703 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
10704 useless.
10705 * src/alloca.c: Moved to lib/.
10706 * src/getopt.c: Likewise.
10707 * src/getopt1.c: Likewise.
10708 * src/getopt.h: Likewise.
10709 * src/ansi2knr.c: Likewise.
10710 * src/ansi2knr.1: Likewise.
10711 * src/Makefile.am: Adjust.
10712 * lib/Makefile.am: New file.
10713
9f306f2a
AD
107142000-03-28 Akim Demaille <akim@epita.fr>
10715
10716 * src/getargs.c (usage): Refresh the help message.
10717
0ba347b6
AD
107182000-03-17 Akim Demaille <akim@epita.fr>
10719
10720 * src/getopt1.c: Updated from textutils 2.0e
10721 * src/getopt.c: Likewise.
10722 * src/getopt.h: Likewise.
10723
dbe7f271
AD
107242000-03-17 Akim Demaille <akim@epita.fr>
10725
10726 * src/Makefile.am (bison.simple): Fix the awk program: quote only
10727 the file name, not the whole `#line LINE FILE'.
10728
75bbe78d
AD
107292000-03-17 Akim Demaille <akim@epita.fr>
10730
10731 On syntax errors, report the token on which we choked.
10732
aa5fd0ee
AD
10733 * src/bison.s1 (yyparse): In the label yyerrlab, when
10734 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 10735
7b306f52
AD
107362000-03-17 Akim Demaille <akim@epita.fr>
10737
aa5fd0ee 10738 * src/reader.c (copy_at): New function.
7b306f52
AD
10739 (copy_guard): Use it.
10740 (copy_action): Use it.
10741
e87b5700
AD
107422000-03-17 Akim Demaille <akim@epita.fr>
10743
10744 Be kind to translators, save some useless translations.
10745
aa5fd0ee 10746 * src/main.c (banner): New function.
e87b5700
AD
10747 (fatal_banner): Use it.
10748 (warn_banner): Use it.
10749
ae3c3164
AD
107502000-03-17 Akim Demaille <akim@epita.fr>
10751
aa5fd0ee
AD
10752 * src/reader.c (copy_definition): Use copy_string and
10753 copy_comment. Removed now unused `match', `ended',
10754 `cplus_comment'.
ae3c3164
AD
10755 (copy_comment, copy_string): Moved, to be visible from
10756 copy_definition.
10757
4dc58e7c
AD
107582000-03-17 Akim Demaille <akim@epita.fr>
10759
aa5fd0ee
AD
10760 * src/reader.c (copy_string): Declare `static inline'. No
10761 problems with inline, since it is checked by configure.
4dc58e7c
AD
10762 (copy_comment): Likewise.
10763
0a6384c4
AD
107642000-03-17 Akim Demaille <akim@epita.fr>
10765
aa5fd0ee 10766 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 10767
3cef001a
AD
107682000-03-17 Akim Demaille <akim@epita.fr>
10769
aa5fd0ee 10770 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
10771 (copy_action): Use it. Removed now unused `match', `ended',
10772 `cplus_comment'.
10773 (copy_guard): Likewise.
10774
ca36d2ef
AD
107752000-03-17 Akim Demaille <akim@epita.fr>
10776
aa5fd0ee 10777 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
10778 (copy_action): Use it.
10779 (copy_guard): Likewise.
10780
6666f98f
AD
107812000-03-17 Akim Demaille <akim@epita.fr>
10782
10783 Change the handling of @s so that they behave exactly like $s.
10784 There is now a pseudo variable @$ (readble and writable), location
10785 of the lhs of the rule (by default ranging from the location of
10786 the first symbol of the rhs, to the location of the last symbol,
10787 or, if the rhs is empty, YYLLOC).
10788
10789 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
10790 yyval.
10791 (yyparse): When providing a default semantic action, provide a
10792 default location action.
10793 (after the $): No longer change `*YYLSP', just stack YYLOC the
10794 same way you stack YYVAL.
10795 * src/reader.c (read_declarations): Use warns.
10796 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
10797 (copy_action, case '@'): Likewise.
10798 Use a standard error message, to save useless work from
10799 translators.
10800
41aca2e0
AD
108012000-03-17 Akim Demaille <akim@epita.fr>
10802
aa5fd0ee
AD
10803 * src/bison.s1: Formatting and cosmetics changes.
10804 * src/reader.c: Likewise.
41aca2e0
AD
10805 Update the Copyright notice.
10806
dc08c1d5
AD
108072000-03-17 Akim Demaille <akim@epita.fr>
10808
aa5fd0ee
AD
10809 * src/bison.s1 (#line): All set to `#line' only, since the
10810 Makefile now handles them.
dc08c1d5 10811
9ee3c97b
AD
108122000-03-16 Akim Demaille <akim@epita.fr>
10813
10814 * src/output.c (output_rule_data): Output the documentation of
10815 some of the tables.
10816 (Copyright notice): Update.
10817 Formatting changes.
10818
0de741ca
AD
108192000-03-16 Akim Demaille <akim@epita.fr>
10820
10821 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
10822 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
10823 One `#if YYDEBUG' remains, since it uses variables which are
10824 defined only if `YYDEBUG != 0'.
10825
bb10be54
AD
108262000-03-16 Akim Demaille <akim@epita.fr>
10827
10828 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
10829 and related variables so that the similarities are highlighted.
10830
b07b484a
AD
108312000-03-16 Akim Demaille <akim@epita.fr>
10832
10833 * src/bison.s1: Properly indent CPP directives.
10834
361f60b3
AD
108352000-03-16 Akim Demaille <akim@epita.fr>
10836
10837 * src/bison.s1: Properly indent the `alloca' CPP section.
10838
8c44d3ec
AD
108392000-03-16 Akim Demaille <akim@epita.fr>
10840
10841 Do not hard code values of directories in `configure.in'.
10842 Update the `configure' tool chain.
10843
10844 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
10845 src/makefile.am.
10846 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
10847 (AC_OUTPUT): Add m4/Makefile.
10848 Bump to bison 1.28a, 1.29 has never been released.
10849 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
10850 handled via src/Makefile.am.
10851 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
10852 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
10853 autoheader.
10854 * Makefile.am (SUBDIRS): Add m4.
10855 (ACLOCAL_AM_FLAGS): New variable.
10856 (AUTOMAKE_OPTIONS): Add check-news.
10857 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
10858 the proper line number and file name.
10859 (DEFS): Propagate the location of bison library files and of the
10860 locale files.
10861 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
10862 builddir.
10863 * acinclude.m4: Remove, replaced by the directory m4.
10864 * m4/Makefile.am (EXTRA_DIST): New variable.
10865 * m4/gettext.m4: New file, from the fileutils.
10866 * m4/lcmessage.m4: Likewise
10867 * m4/progtest.m4: Likewise.
10868 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
10869
f95997e7
AD
108702000-03-10 Akim Demaille <akim@epita.fr>
10871
10872 * src/closure.c:
10873 Formatting changes of various comments.
10874 Respect the GNU coding standards at various places.
10875 Don't use `_()' when no translation is needed.
10876
108771999-12-13 Jesse Thilo <jthilo@gnu.org>
10878
10879 * src/files.c:
10880 OS/2 honors TMPDIR environment variable.
10881
108821999-12-13 Jesse Thilo <jthilo@gnu.org>
10883
10884 * doc/bison.texinfo: Tweaked spelling and grammar.
10885 Updated ISBN.
10886 Removed reference to price of printed copy.
10887 Mention BISON_SIMPLE and BISON_HAIRY.
10888
108891999-12-13 Jesse Thilo <jthilo@gnu.org>
10890
10891 * configure.in, NEWS:
10892 Bison 1.29 released.
10893
108941999-10-27 Jesse Thilo <jthilo@gnu.org>
10895
10896 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
10897 Added reference card.
10898
108991999-07-26 Jesse Thilo <jthilo@gnu.org>
10900
10901 * po/ru.po: Added Russian translation.
10902
109031999-07-26 Jesse Thilo <jthilo@gnu.org>
10904
10905 * configure.in: Added Russian translation.
10906
109071999-07-06 Jesse Thilo <jthilo@gnu.org>
10908
10909 * configure.in, NEWS, README:
10910 Released version 1.28.
10911
109121999-06-14 Jesse Thilo <jthilo@gnu.org>
10913
10914 * src/system.h:
10915 Squashed redefinition warning on some systems.
10916
10917 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10918 Have configure build version string instead of relying on ANSI string
10919 concatentation.
10920
109211999-06-14 Jesse Thilo <jthilo@gnu.org>
10922
10923 * po/POTFILES.in: Got rid of version.c.
10924
109251999-06-14 Jesse Thilo <jthilo@gnu.org>
10926
10927 * acconfig.h, configure.in:
10928 Have configure build version string instead of relying on ANSI string
10929 concatentation.
10930
109311999-06-08 Jesse Thilo <jthilo@gnu.org>
10932
10933 * doc/bison.1:
10934 Dropped mention of `+' for long-named options.
10935
109361999-05-30 Jesse Thilo <jthilo@gnu.org>
10937
10938 * src/files.c: Added <unistd.h> for unlink().
10939
10940 * src/Makefile.am, src/system.h:
10941 I18n fixes.
10942
109431999-05-30 Jesse Thilo <jthilo@gnu.org>
10944
10945 * README: Added a FAQ list.
10946
10947 * configure.in, acconfig.h:
10948 I18n fixes.
10949
109501999-05-30 Jesse Thilo <jthilo@gnu.org>
10951
10952 * doc/FAQ, doc/Makefile.am:
10953 Added a FAQ list.
10954
109551999-05-19 Jesse Thilo <jthilo@gnu.org>
10956
10957 * src/alloc.h, src/symtab.h, src/version.c:
10958 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10959
109601999-04-18 Jesse Thilo <jthilo@gnu.org>
10961
10962 * src/.cvsignore, src/Makefile.am:
10963 Reorganized: sources in `src', documentation in `doc'.
10964
10965 * src/lex.c (literalchar):
10966 fixed the code for escaping double quotes (thanks
10967 Jonathan Czisny.)
10968
109691999-04-18 Jesse Thilo <jthilo@gnu.org>
10970
10971 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10972 Adjusted paths to reflect directory reorganization.
10973
109741999-04-18 Jesse Thilo <jthilo@gnu.org>
10975
10976 * doc/.cvsignore, doc/Makefile.am:
10977 Reorganized: sources in `src', documentation in `doc'.
10978
109791999-04-18 Jesse Thilo <jthilo@gnu.org>
10980
10981 * configure.in:
10982 Updated AC_INIT file to reflect directory reorganization.
10983
10984 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10985 Reorganized: sources in `src', documentation in `doc'.
10986
109871999-04-13 Jesse Thilo <jthilo@gnu.org>
10988
10989 * src/allocate.c:
10990 Don't declare calloc() and realloc() if not necessary.
10991
109921999-04-13 Jesse Thilo <jthilo@gnu.org>
10993
10994 * configure.in, acconfig.h, acinclude.m4:
10995 Don't declare calloc() and realloc() if not necessary.
10996
109971999-03-23 Jesse Thilo <jthilo@gnu.org>
10998
10999 * po/.cvsignore: Added i18n support.
11000
110011999-03-23 Jesse Thilo <jthilo@gnu.org>
11002
11003 * acconfig.h, configure.in, Makefile.am:
11004 Added i18n support.
11005
110061999-03-22 Jesse Thilo <jthilo@gnu.org>
11007
11008 * src/bison.s1: Fixed #line numbers.
11009
110101999-03-15 Jesse Thilo <jthilo@gnu.org>
11011
11012 * po/es.po, po/fr.po, po/nl.po, po/de.po:
11013 Added PO files from Translation Project.
11014
110151999-03-03 Jesse Thilo <jthilo@gnu.org>
11016
11017 * Makefile.am:
11018 Added support for non-ANSI compilers (ansi2knr).
11019
110201999-02-16 Jesse Thilo <jthilo@gnu.org>
11021
11022 * configure.in: Bumped version number to 1.27.
11023
11024 * Makefile.am:
11025 Added `bison.simple' to list of files removed by `make distclean'.
11026
110271999-02-12 Jesse Thilo <jthilo@gnu.org>
11028
11029 * src/files.c, src/files.h:
11030 Defined locations of parser files in config.h instead of Makefile.
11031
110321999-02-12 Jesse Thilo <jthilo@gnu.org>
11033
11034 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
11035 Defined locations of parser files in config.h instead of Makefile.
11036
110371999-02-09 Jesse Thilo <jthilo@gnu.org>
11038
11039 * Makefile.am:
11040 Removed inappropriate use of $< macro.
11041
110421999-02-05 Jesse Thilo <jthilo@gnu.org>
11043
11044 * po/Makefile.in.in, po/POTFILES.in:
11045 Add `po' directory skeleton.
11046
110471999-01-27 Jesse Thilo <jthilo@gnu.org>
11048
11049 * README: Document help-bison list.
11050
11051 * configure.in: Add check for mkstemp().
11052
110531999-01-20 Jesse Thilo <jthilo@gnu.org>
11054
11055 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
11056 Hush a few compiler warnings.
11057
11058 * src/files.c:
11059 Add tryclose(), which verifies that fclose was successful.
11060 Hush a couple of compiler warnings.
11061
110621999-01-20 Jesse Thilo <jthilo@gnu.org>
11063
11064 * Makefile.am, OChangeLog:
11065 ChangeLog is now automatically generated. Include the old version as
11066 OChangeLog.
11067
110681999-01-14 Jesse Thilo <jthilo@gnu.org>
11069
11070 * 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:
11071 Update FSF address.
11072
110731999-01-14 Jesse Thilo <jthilo@gnu.org>
11074
11075 * doc/bison.texinfo: Fix formatting glitch.
11076
11077 * doc/bison.texinfo: Update FSF address.
11078
110791999-01-14 Jesse Thilo <jthilo@gnu.org>
11080
11081 * acconfig.h: Update FSF address.
11082
110831999-01-08 Jesse Thilo <jthilo@gnu.org>
11084
11085 * src/system.h:
11086 Don't define PACKAGE here, since config.h defines it.
11087
110881998-12-30 Jesse Thilo <jthilo@gnu.org>
11089
11090 * src/reader.c: Update copyright date.
11091
11092 * src/main.c:
11093 Ditch sprintf to statically-sized buffers in fatal/warn functions in
11094 favor of output directly to stderr (avoids buffer overruns).
11095
11096 * src/reader.c: Some checks for premature EOF.
11097
11098 * 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:
11099 Use prototypes if the compiler understands them.
11100
11101 * src/files.c: Honor TMPDIR on Unix hosts.
11102 Use prototypes if the compiler understands them.
11103
11104 * src/reader.c:
11105 Fix a couple of buffer overrun bugs.
11106 Use prototypes if the compiler understands them.
11107
11108 * src/system.h: Include unistd.h and ctype.h.
11109 Use #ifdef instead of #if for NLS symbols.
11110
111111998-12-30 Jesse Thilo <jthilo@gnu.org>
11112
11113 * doc/bison.texinfo:
11114 Delete comment "consider using @set for edition number, etc..." since
11115 we now are doing so.
11116
111171998-12-30 Jesse Thilo <jthilo@gnu.org>
11118
11119 * configure.in:
11120 Use prototypes if the compiler understands them.
11121
11122 * NEWS: Document 1.26 highlights.
11123
11124 * Makefile.am: Require Automake 1.3 or later.
11125
11126 * acconfig.h:
11127 Use prototypes if the compiler understands them.
11128
111291998-12-29 Jesse Thilo <jthilo@gnu.org>
11130
11131 * src/version.c:
11132 Use VERSION symbol from automake for version number.
11133
111341998-12-29 Jesse Thilo <jthilo@gnu.org>
11135
11136 * acconfig.h, configure.in, version.cin:
11137 Use VERSION symbol from automake for version number.
11138
111391998-11-28 Jesse Thilo <jthilo@gnu.org>
11140
11141 * Makefile.am:
11142 Distribute original version of simple parser (bison.s1), not built
11143 version (bison.simple).
11144
111451998-11-28 Jesse Thilo <jthilo@gnu.org>
11146
11147 * doc/bison.texinfo: Add info dir entry.
11148
11149 * doc/bison.texinfo:
11150 Let automake put version number into documentation.
11151
111521998-11-26 Jesse Thilo <jthilo@gnu.org>
11153
11154 * src/bison.cld, src/build.com, src/vmshlp.mar:
11155 Add non-RCS files from /gd/gnu/bison.
11156
111571998-11-26 Jesse Thilo <jthilo@gnu.org>
11158
11159 * doc/bison.1:
11160 Document the BISON_HAIRY and BISON_SIMPLE variables.
11161
111621998-11-25 Jesse Thilo <jthilo@gnu.org>
11163
11164 * src/version.c: Build version.c automatically.
11165
11166 * src/reader.c:
11167 Fix token numbering (used to start at 258, not 257).
11168
11169 * src/system.h: Include config.h.
11170
11171 * src/getargs.c: Update bug report address.
11172
11173 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
11174 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
11175
111761998-11-25 Jesse Thilo <jthilo@gnu.org>
11177
11178 * Makefile.am:
11179 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11180
11181 * configure.in, version.cin:
11182 Build version.c automatically.
11183
11184 * AUTHORS: Add AUTHORS file.
11185
11186 * README: Update bug report address.
11187
11188 * bison.simple:
11189 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11190
11191 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
11192 Add automake stuff.
11193
111941998-11-25 Jesse Thilo <jthilo@gnu.org>
11195
11196 * doc/bison.texinfo: Clean up some formatting.
11197
111981998-05-05 Richard Stallman <rms@gnu.org>
11199
11200 * doc/bison.texinfo:
11201 Explain better why to make a pure parser.
11202
112031998-01-05 Richard Stallman <rms@gnu.org>
11204
11205 * src/files.c (openfiles):
11206 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
11207 find a temporary directory, if possible. Do not unlink files while
11208 they are open.
11209
112101997-08-25 Richard Stallman <rms@gnu.org>
11211
11212 * src/reader.c (stack_offset;):
11213 Change some warni to warns.
11214
11215 * src/lex.c (literalchar): Use warns, not warni.
11216
112171997-06-28 Richard Stallman <rms@gnu.org>
11218
11219 * src/bison.s1: Add a Bison version comment.
11220
11221 * src/main.c (fatal, warn, berror):
11222 Use program_name.
11223
112241997-06-28 Richard Stallman <rms@gnu.org>
11225
11226 * Makefile.in (bison_version): New variable.
11227 (dist): Use that variable.
11228 (bison.s1): Substitute the Bison version into bison.simple.
11229
11230 * bison.simple: Add a Bison version comment.
11231
112321997-06-18 Richard Stallman <rms@gnu.org>
11233
11234 * src/main.c (fatal, warn, berror):
11235 Make error messages standard.
11236 (toomany): Improve error message text.
11237
11238 * 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:
11239 new.h renamed to alloc.h.
11240
112411997-06-18 Richard Stallman <rms@gnu.org>
11242
11243 * Makefile.in: new.h renamed to alloc.h.
11244
112451997-05-24 Richard Stallman <rms@gnu.org>
11246
11247 * src/lex.c (literalchar):
11248 Fix the code for escaping \, " and '.
11249
11250 (lex): Avoid trouble when there are many chars
11251 to discard in a char literal with just several chars in it.
11252
112531997-05-17 Richard Stallman <rms@gnu.org>
11254
11255 * src/bison.s1:
11256 Use malloc, if using alloca is troublesome.
11257 (YYSTACK_USE_ALLOCA): New flag macro.
11258 Define it for some systems and compilers.
11259 (YYSTACK_ALLOC): New macro.
11260 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11261 If it was malloc'd, free it.
11262
112631997-05-17 Richard Stallman <rms@gnu.org>
11264
11265 * bison.simple:
11266 Use malloc, if using alloca is troublesome.
11267 (YYSTACK_USE_ALLOCA): New flag macro.
11268 Define it for some systems and compilers.
11269 (YYSTACK_ALLOC): New macro.
11270 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11271 If it was malloc'd, free it.
11272
112731997-04-23 Richard Stallman <rms@gnu.org>
11274
11275 * src/bison.s1:
11276 (alloca) [__hpux]: Always define as __builtin_alloca.
11277
112781997-04-23 Richard Stallman <rms@gnu.org>
11279
11280 * bison.simple:
11281 (alloca) [__hpux]: Always define as __builtin_alloca.
11282
112831997-04-22 Richard Stallman <rms@gnu.org>
11284
11285 * src/bison.s1:
11286 [__hpux]: Include alloca.h (right for HPUX 10)
11287 instead of declaring alloca (right for HPUX 9).
11288
11289 * src/bison.s1 (__yy_memcpy):
11290 Declare arg `count' as unsigned int.
11291 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11292
112931997-04-22 Richard Stallman <rms@gnu.org>
11294
11295 * bison.simple:
11296 [__hpux]: Include alloca.h (right for HPUX 10)
11297 instead of declaring alloca (right for HPUX 9).
11298
11299 * bison.simple (__yy_memcpy):
11300 Declare arg `count' as unsigned int.
11301 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11302
113031997-01-03 Richard Stallman <rms@gnu.org>
11304
11305 * src/allocate.c: [__STDC__ or _MSC_VER]:
11306 Declare calloc and realloc to return void *.
11307
113081997-01-02 Richard Stallman <rms@gnu.org>
11309
11310 * src/system.h:
11311 [_MSC_VER]: Include stdlib.h and process.h.
11312 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
11313
11314 * src/main.c (main): Return FAILURE as a value.
11315 (printable_version): Declare arg as int, not char.
11316
113171997-01-02 Richard Stallman <rms@gnu.org>
11318
11319 * Makefile.in (dist):
11320 Explicitly check for symlinks, and copy them.
11321
113221996-12-19 Richard Stallman <rms@gnu.org>
11323
11324 * src/files.c:
11325 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
11326
113271996-12-18 Paul Eggert <eggert@gnu.org>
11328
11329 * src/bison.s1 (yyparse):
11330 If __GNUC__ and YYPARSE_PARAM are both defined,
11331 declare yyparse to have a void * argument.
11332
113331996-12-18 Paul Eggert <eggert@gnu.org>
11334
11335 * bison.simple (yyparse):
11336 If __GNUC__ and YYPARSE_PARAM are both defined,
11337 declare yyparse to have a void * argument.
11338
113391996-12-17 Richard Stallman <rms@gnu.org>
11340
11341 * src/reduce.c (nbits): Add some casts.
11342
113431996-08-12 Richard Stallman <rms@gnu.org>
11344
11345 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
11346
113471996-08-12 Richard Stallman <rms@gnu.org>
11348
11349 * bison.simple: Test _MSDOS as well as _MSDOS_.
11350
113511996-07-31 Richard Stallman <rms@gnu.org>
11352
11353 * src/bison.s1:
11354 [__sun && __i386]: Include alloca.h.
11355
113561996-07-31 Richard Stallman <rms@gnu.org>
11357
11358 * bison.simple:
11359 [__sun && __i386]: Include alloca.h.
11360
113611996-07-30 Richard Stallman <rms@gnu.org>
11362
11363 * src/bison.s1: Comment change.
11364
11365 * src/bison.s1: Test _MSDOS_, not MSDOS.
11366
113671996-07-30 Richard Stallman <rms@gnu.org>
11368
11369 * bison.simple: Comment change.
11370
11371 * bison.simple: Test _MSDOS_, not MSDOS.
11372
113731996-06-01 Richard Stallman <rms@gnu.org>
11374
11375 * 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:
11376 Insert `_' macro around many string constants.
11377
11378 * src/main.c:
11379 Insert `_' macro around many string constants.
11380
11381 (main): Call setlocale, bindtextdomain and textdomain.
11382
11383 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11384 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11385 [ENABLE_NLS]: Include libintl.h.
11386 [ENABLE_NLS] (gettext): Define.
11387 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11388 (N_, PACKAGE, LOCALEDIR): New macros.
11389
113901996-06-01 Richard Stallman <rms@gnu.org>
11391
11392 * POTFILES.in: New file.
11393
11394 * Makefile.in (allocate.o):
11395 Define target explicitly.
11396
11397 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11398 (LDFLAGS): Set to @LDFLAGS@.
11399 (configure): Run autoconf only if preceding `cd' succeeds.
11400 (bison.s1): Redirect output to temporary file then move the
11401 temporary to the target, rather than redirecting directly to bison.s1.
11402 (clean): Remove config.status and config.log.
11403 (distclean): Don't remove config.status here.
11404
114051996-05-12 Richard Stallman <rms@gnu.org>
11406
11407 * src/bison.s1:
11408 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11409
114101996-05-12 Richard Stallman <rms@gnu.org>
11411
11412 * bison.simple:
11413 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11414
114151996-05-11 Richard Stallman <rms@gnu.org>
11416
11417 * src/bison.s1 (__yy_memcpy):
11418 Really reorder the args, as was supposedly done on Feb 14 1995.
11419 (yyparse): Calls changed accordingly.
11420
114211996-05-11 Richard Stallman <rms@gnu.org>
11422
11423 * Makefile.in (dist): Don't use $(srcdir).
11424
11425 * bison.simple (__yy_memcpy):
11426 Really reorder the args, as was supposedly done on Feb 14 1995.
11427 (yyparse): Calls changed accordingly.
11428
114291996-01-27 Richard Stallman <rms@gnu.org>
11430
11431 * src/output.c (output_rule_data):
11432 Test YYERROR_VERBOSE in the conditional
11433 around the definition of ttyname.
11434
114351995-12-29 Richard Stallman <rms@gnu.org>
11436
11437 * src/bison.s1:
11438 Fix line numbers in #line commands.
11439
114401995-12-29 Richard Stallman <rms@gnu.org>
11441
11442 * bison.simple:
11443 Fix line numbers in #line commands.
11444
114451995-12-27 Richard Stallman <rms@gnu.org>
11446
11447 * src/bison.s1 (YYPARSE_PARAM_DECL):
11448 In C++, make it always null.
11449 (YYPARSE_PARAM_ARG): New macro.
11450 (yyparse): Use YYPARSE_PARAM_ARG.
11451
114521995-12-27 Richard Stallman <rms@gnu.org>
11453
11454 * bison.simple (YYPARSE_PARAM_DECL):
11455 In C++, make it always null.
11456 (YYPARSE_PARAM_ARG): New macro.
11457 (yyparse): Use YYPARSE_PARAM_ARG.
11458
114591995-11-29 Richard Stallman <rms@gnu.org>
11460
11461 * doc/bison.texinfo:
11462 Describe literal string tokens, %raw, %no_lines, %token_table.
11463
114641995-11-29 Daniel Hagerty <hag@gnu.org>
11465
11466 * doc/bison.texinfo: Fixed update date
11467
114681995-10-16 Richard Stallman <rms@gnu.org>
11469
11470 * src/version.c: Version 1.25.
11471
114721995-10-16 Richard Stallman <rms@gnu.org>
11473
11474 * NEWS: *** empty log message ***
11475
114761995-10-16 Richard Stallman <rms@gnu.org>
11477
11478 * doc/bison.1, doc/bison.rnh:
11479 Add new options.
11480
114811995-10-15 Richard Stallman <rms@gnu.org>
11482
11483 * src/vmsgetargs.c, src/getargs.c:
11484 Added -n, -k, and -raw switches.
11485 (noparserflag, toknumflag, rawtoknumflag): New variables.
11486
11487 * src/symtab.h (SALIAS):
11488 New #define for adding aliases to %token.
11489 (struct bucket): Added `alias' field.
11490
11491 * src/reduce.c (reduce_grammar):
11492 Revise error message.
11493 (print_notices): Remove final `.' from error message.
11494
11495 * src/reader.c (reader_output_yylsp):
11496 New function.
11497 (readgram): Use `#if 0' around code that accepted %command
11498 inside grammar rules: The documentation doesn't allow it,
11499 and it will fail since the %command processors scan for the next %.
11500 (parse_token_decl): Extended the %token
11501 declaration to allow a multi-character symbol as an alias.
11502 (parse_thong_decl): New function.
11503 (read_declarations): Added %thong declarations.
11504 (read_declarations): Handle NOOP to deal with allowing
11505 % declarations as another means to specify the flags.
11506 (readgram): Allow %prec prior to semantics embedded in a rule.
11507 (skip_to_char, read_declarations, copy_definition)
11508 (parse_token_decl, parse_start_decl, parse_type_decl)
11509 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
11510 (get_type_name, copy_guard, copy_action, readgram)
11511 (get_type, packsymbols): Revised most error messages.
11512 Changed `fatal' to `warnxxx' to avoid aborting for error.
11513 Revised and use multiple warnxxx functions to avoid using VARARGS1.
11514 (read_declarations): Improve the error message for
11515 an invalid character. Do not abort.
11516 (read_declarations, copy_guard, copy_action): Use
11517 printable_version to avoid unprintable characters in printed output.
11518 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
11519 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
11520 Allow the type of a non-terminal can be given
11521 more than once, as long as all specifications give the same type.
11522
11523 * src/output.c:
11524 (output_headers, output_trailers, output, output_gram)
11525 (output_rule_data): Implement noparserflag variable.
11526 Implement toknumflag variable.
11527 (output): Call reader_output_yylsp to output LTYPESTR.
11528
11529 * src/main.c (main):
11530 If reader sees an error, don't process the grammar.
11531 (fatals): Updated to not use VARARGS1.
11532 (printable_version, int_to_string, warn, warni, warns, warnss)
11533 (warnsss): New error reporting functions. Avoid abort for error.
11534
11535 * src/lex.h:
11536 Added THONG and NOOP for alias processing.
11537 Added SETOPT for the new code that allows setting options with %flags.
11538
11539 * src/lex.c:
11540 Include getopt.h. Add some extern decls.
11541 (safegetc): New function to deal with EOF gracefully.
11542 (literalchar); new function to deal with reading \ escapes.
11543 (lex): Use literalchar.
11544 (lex): Implemented "..." tokens.
11545 (literalchar, lex, parse_percent_token): Made tokenbuffer
11546 always contain the token. This includes growing the token
11547 buffer while reading an integer.
11548 (parse_percent_token): Replaced if-else statement with percent_table.
11549 (parse_percent_token): Added % declarations as another
11550 way to specify the flags -n, -l, and -r. Also added hooks for
11551 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
11552 major changes to files.c.
11553 (lex) Retain in the incoming stream a character following
11554 an incorrect '/'.
11555 (skip_white_space, lex): Revised most error messages
11556 and changed fatal to warn to avoid aborting.
11557 (percent_table): Added %thong declarations.
11558
11559 * src/gram.h: Comment changes.
11560
11561 * src/files.c (openfiles, open_extra_files, done):
11562 Add faction flag
11563 and actfile file. Handle noparserflag. Both for -n switch.
11564
11565 * src/conflicts.c (resolve_sr_conflict):
11566 Remove use of alloca.
11567
115681995-06-01 Jim Meyering <meyering@gnu.org>
11569
11570 * doc/bison.texinfo: *** empty log message ***
11571
115721995-05-06 Richard Stallman <rms@gnu.org>
11573
11574 * src/bison.s1: Comment change.
11575
115761995-05-06 Richard Stallman <rms@gnu.org>
11577
11578 * bison.simple: Comment change.
11579
115801995-05-03 Richard Stallman <rms@gnu.org>
11581
11582 * src/version.c: Version now 1.24.
11583
11584 * src/bison.s1: Change distribution terms.
11585
11586 * src/version.c: Version now 1.23.
11587
115881995-05-03 Richard Stallman <rms@gnu.org>
11589
11590 * doc/bison.texinfo:
11591 Rewrite "Conditions for Using Bison".
11592 Update version to 1.24.
11593
115941995-05-03 Richard Stallman <rms@gnu.org>
11595
11596 * bison.simple: Change distribution terms.
11597
115981995-02-23 Richard Stallman <rms@gnu.org>
11599
11600 * src/files.c: Test __VMS_POSIX as well as VMS.
11601
116021995-02-14 Jim Meyering <meyering@gnu.org>
11603
11604 * src/bison.s1 (__yy_memcpy):
11605 Renamed from __yy_bcopy to avoid
11606 confusion. Reverse FROM and TO arguments to be consistent with
11607 those of memcpy.
11608
116091995-02-14 Jim Meyering <meyering@gnu.org>
11610
11611 * bison.simple (__yy_memcpy):
11612 Renamed from __yy_bcopy to avoid
11613 confusion. Reverse FROM and TO arguments to be consistent with
11614 those of memcpy.
11615
116161994-11-10 David J. MacKenzie <djm@gnu.org>
11617
11618 * NEWS: reformat
11619
11620 * NEWS: New file.
11621
11622 * Makefile.in (DISTFILES): Include NEWS.
11623
11624 * Makefile.in (DISTFILES):
11625 Include install-sh, not install.sh.
11626
11627 * configure.in: Update to Autoconf v2 macro names.
11628
116291994-10-05 David J. MacKenzie <djm@gnu.org>
11630
11631 * Makefile.in: fix typo
11632
11633 * Makefile.in (prefix, exec_prefix):
11634 Let configure set them.
11635
116361994-09-28 David J. MacKenzie <djm@gnu.org>
11637
11638 * Makefile.in: Set datadir to $(prefix)/share.
11639
116401994-09-15 Richard Stallman <rms@gnu.org>
11641
11642 * src/bison.s1:
11643 Update copyright notice and GPL version.
11644
116451994-09-15 Richard Stallman <rms@gnu.org>
11646
11647 * bison.simple:
11648 Update copyright notice and GPL version.
11649
116501994-07-12 Richard Stallman <rms@gnu.org>
11651
11652 * src/reduce.c, src/reader.c:
11653 entered into RCS
11654
116551994-05-05 David J. MacKenzie <djm@gnu.org>
11656
11657 * Makefile.in: entered into RCS
11658
116591994-03-26 Richard Stallman <rms@gnu.org>
11660
11661 * src/bison.s1: entered into RCS
11662
116631994-03-26 Richard Stallman <rms@gnu.org>
11664
11665 * bison.simple: entered into RCS
11666
116671994-03-25 Richard Stallman <rms@gnu.org>
11668
11669 * src/main.c: entered into RCS
11670
116711994-03-24 Richard Stallman <rms@gnu.org>
11672
11673 * src/conflicts.c: entered into RCS
11674
116751994-01-02 Richard Stallman <rms@gnu.org>
11676
11677 * Makefile.in: *** empty log message ***
11678
116791993-11-21 Richard Stallman <rms@gnu.org>
11680
11681 * src/bison.s1: *** empty log message ***
11682
116831993-11-21 Richard Stallman <rms@gnu.org>
11684
11685 * doc/bison.texinfo: entered into RCS
11686
11687 * doc/bison.texinfo: *** empty log message ***
11688
116891993-11-21 Richard Stallman <rms@gnu.org>
11690
11691 * bison.simple: *** empty log message ***
11692
116931993-10-25 David J. MacKenzie <djm@gnu.org>
11694
11695 * doc/bison.texinfo: *** empty log message ***
11696
116971993-10-19 Richard Stallman <rms@gnu.org>
11698
11699 * src/bison.s1: *** empty log message ***
11700
117011993-10-19 Richard Stallman <rms@gnu.org>
11702
11703 * bison.simple: *** empty log message ***
11704
117051993-10-14 Richard Stallman <rms@gnu.org>
11706
11707 * src/bison.s1: *** empty log message ***
11708
117091993-10-14 Richard Stallman <rms@gnu.org>
11710
11711 * bison.simple: *** empty log message ***
11712
117131993-09-14 David J. MacKenzie <djm@gnu.org>
11714
11715 * doc/bison.texinfo: *** empty log message ***
11716
117171993-09-13 Noah Friedman <friedman@gnu.org>
11718
11719 * Makefile.in: *** empty log message ***
11720
117211993-09-10 Richard Stallman <rms@gnu.org>
11722
11723 * src/conflicts.c: *** empty log message ***
11724
11725 * src/system.h: entered into RCS
11726
117271993-09-10 Richard Stallman <rms@gnu.org>
11728
11729 * doc/bison.1: entered into RCS
11730
117311993-09-06 Noah Friedman <friedman@gnu.org>
11732
11733 * src/version.c: entered into RCS
11734
117351993-09-06 Noah Friedman <friedman@gnu.org>
11736
11737 * Makefile.in: *** empty log message ***
11738
117391993-07-30 David J. MacKenzie <djm@gnu.org>
11740
11741 * Makefile.in: *** empty log message ***
11742
117431993-07-24 Richard Stallman <rms@gnu.org>
11744
11745 * src/bison.s1: *** empty log message ***
11746
117471993-07-24 Richard Stallman <rms@gnu.org>
11748
11749 * bison.simple: *** empty log message ***
11750
117511993-07-08 David J. MacKenzie <djm@gnu.org>
11752
11753 * Makefile.in: *** empty log message ***
11754
117551993-07-04 Richard Stallman <rms@gnu.org>
11756
11757 * src/bison.s1: *** empty log message ***
11758
117591993-07-04 Richard Stallman <rms@gnu.org>
11760
11761 * bison.simple: *** empty log message ***
11762
117631993-06-26 David J. MacKenzie <djm@gnu.org>
11764
11765 * src/getargs.c: entered into RCS
11766
117671993-06-26 David J. MacKenzie <djm@gnu.org>
11768
11769 * doc/bison.texinfo: *** empty log message ***
11770
11771 * doc/bison.1: New file.
11772
117731993-06-25 Richard Stallman <rms@gnu.org>
11774
11775 * src/getargs.c: New file.
11776
117771993-06-16 Richard Stallman <rms@gnu.org>
11778
11779 * src/bison.s1: *** empty log message ***
11780
117811993-06-16 Richard Stallman <rms@gnu.org>
11782
11783 * bison.simple: *** empty log message ***
11784
117851993-06-03 Richard Stallman <rms@gnu.org>
11786
11787 * src/bison.s1: New file.
11788
117891993-06-03 Richard Stallman <rms@gnu.org>
11790
11791 * doc/bison.texinfo: *** empty log message ***
11792
117931993-06-03 Richard Stallman <rms@gnu.org>
11794
11795 * bison.simple: New file.
11796
117971993-05-19 Richard Stallman <rms@gnu.org>
11798
11799 * doc/bison.texinfo: New file.
11800
118011993-05-07 Noah Friedman <friedman@gnu.org>
11802
11803 * Makefile.in: *** empty log message ***
11804
118051993-04-28 Noah Friedman <friedman@gnu.org>
11806
11807 * src/reader.c: *** empty log message ***
11808
118091993-04-23 Noah Friedman <friedman@gnu.org>
11810
11811 * src/alloc.h: entered into RCS
11812
118131993-04-20 David J. MacKenzie <djm@gnu.org>
11814
11815 * src/version.c: *** empty log message ***
11816
11817 * src/files.c, src/allocate.c:
11818 entered into RCS
11819
11820 * src/reader.c: *** empty log message ***
11821
11822 * src/lex.c: entered into RCS
11823
11824 * src/conflicts.c: New file.
11825
11826 * src/symtab.c: entered into RCS
11827
11828 * src/alloc.h: New file.
11829
11830 * src/LR0.c: entered into RCS
11831
118321993-04-18 Noah Friedman <friedman@gnu.org>
11833
11834 * src/reader.c: New file.
11835
11836 * src/version.c: *** empty log message ***
11837
118381993-04-18 Noah Friedman <friedman@gnu.org>
11839
11840 * Makefile.in: *** empty log message ***
11841
118421993-04-17 Noah Friedman <friedman@gnu.org>
11843
11844 * Makefile.in: *** empty log message ***
11845
118461993-04-15 Richard Stallman <rms@gnu.org>
11847
11848 * src/main.c, src/files.c:
11849 New file.
11850
118511993-04-15 Noah Friedman <friedman@gnu.org>
11852
11853 * configure.in: entered into RCS
11854
11855 * configure.in: *** empty log message ***
11856
11857 * configure.in: New file.
11858
118591993-04-14 Richard Stallman <rms@gnu.org>
11860
11861 * Makefile.in: New file.
11862
118631993-04-13 Richard Stallman <rms@gnu.org>
11864
11865 * src/version.c: New file.
11866
118671993-03-25 Richard Stallman <rms@gnu.org>
11868
11869 * src/output.c: entered into RCS
11870
118711992-09-25 Richard Stallman <rms@gnu.org>
11872
11873 * configure.bat: entered into RCS
11874
118751992-06-22 Richard Stallman <rms@gnu.org>
11876
11877 * src/vmsgetargs.c: entered into RCS
11878
118791992-06-22 Richard Stallman <rms@gnu.org>
11880
11881 * doc/bison.rnh: entered into RCS
11882
118831992-04-20 David J. MacKenzie <djm@gnu.org>
11884
11885 * README: entered into RCS
11886
118871992-01-22 Richard Stallman <rms@gnu.org>
11888
11889 * src/machine.h: entered into RCS
11890
118911991-12-21 Richard Stallman <rms@gnu.org>
11892
11893 * src/lalr.c, src/closure.c:
11894 entered into RCS
11895
118961991-12-20 Richard Stallman <rms@gnu.org>
11897
11898 * src/state.h: entered into RCS
11899
119001991-12-18 Richard Stallman <rms@gnu.org>
11901
11902 * src/print.c, src/nullable.c, src/derives.c:
11903 entered into RCS
11904
119051991-11-03 David J. MacKenzie <djm@gnu.org>
11906
11907 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11908 entered into RCS
11909
119101988-09-09 Richard Stallman <rms@gnu.org>
11911
11912 * src/bison.hairy: entered into RCS
11913
119141987-12-16 Richard Stallman <rms@gnu.org>
11915
11916 * REFERENCES: entered into RCS
dc546b0f 11917
f294a2c2
AD
11918-----
11919
33167b8b 11920Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
dd0e0635 119211998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
f294a2c2 11922
33167b8b 11923This file is part of Bison, the GNU Compiler Compiler.
f294a2c2 11924
33167b8b 11925Bison is free software; you can redistribute it and/or modify
f294a2c2
AD
11926it under the terms of the GNU General Public License as published by
11927the Free Software Foundation; either version 2, or (at your option)
11928any later version.
11929
33167b8b 11930Bison is distributed in the hope that it will be useful,
f294a2c2
AD
11931but WITHOUT ANY WARRANTY; without even the implied warranty of
11932MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11933GNU General Public License for more details.
11934
11935You should have received a copy of the GNU General Public License
33167b8b 11936along with Bison; see the file COPYING. If not, write to
f294a2c2
AD
11937the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11938Boston, MA 02111-1307, USA.