]> git.saurik.com Git - bison.git/blob - ChangeLog
* README: Mention GNU m4 1.4 bugs and Akim's patched version.
[bison.git] / ChangeLog
1 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
2
3 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
4 * README-alpha: Don't tell people not to package this.
5
6 * bootstrap: Don't assume $(...) works; use `...` instead.
7 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8 gettext better.
9
10 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11 put into the -d output file, and mention what to do if YYSTYPE is
12 defined as a macro.
13
14 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
15
16 Undo change made earlier today: it caused autopoint to not bring
17 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
18 autopoint's.
19
20 * bootstrap: Check that gettext version matches what's in
21 configure.ac. Warn users to ignore robots.txt ERROR 404.
22 * bootstrap: Undo today's earlier change (logged below).
23 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
24
25 The gettext version checking is causing more trouble than it's
26 curing; remove it. Problem reported by Paul Hilfinger.
27
28 * bootstrap: Issue a warning that one can expect a message
29 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
30 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
31
32 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
33
34 Ensure that the C++ compiler used for testing actually works on a
35 simple test program; if not, skip the C++-related tests. Problem
36 reported by Vin Shelton in:
37 http://mail.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
38
39 * m4/cxx.m4: New file.
40 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
41 * tests/atlocal.in (BISON_CXX_WORKS): Add.
42 * tests/local.at (AT_COMPILE_CXX): Use it.
43
44 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
45
46 * data/glr.c (yylloc): Output this macro even if locations are not
47 being generated, as the GLR parser needs it even in that case.
48 Problem reported by Troy A. Johnson
49 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
50
51 * configure.ac (AC_INIT): Update to 1.875e.
52
53 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
54
55 * NEWS: Version 1.875d.
56 * configure.ac (AC_INIT): Likewise.
57 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
58
59 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
60 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
61 lalr1.cc runs afoul of the first, and the last two are no longer
62 supported by GCC 3.4.0.
63 * README: Mention GNU m4 1.4 or later; mention m4 patches.
64 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
65
66 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
67
68 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
69 unsigned int, for compatibility with latest gnulib hash module.
70 * src/state.c (state_hash, state_hasher): Likewise.
71 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
72 * src/uniqstr.c (hash_uniqstr): Likewise.
73
74 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
75
76 * NEWS: Unescaped newlines are no longer allowed in char & strings.
77
78 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
79 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
80 character and string literals.
81 (unexpected_end): New function.
82 (unexpected_eof): Use it.
83 (unexpected_newline): New function.
84 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
85 actions.
86
87 * NEWS: Document %expect-rr.
88
89 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
90 Fix typo by replacing $1 with $option.
91 Remove more 'intl'-related files.
92 Don't DEFUN AM_INTL_SUBDIR twice.
93
94 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
95 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
96 strtoul.c.
97 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
98 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
99 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
100 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
101 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
102 * src/.cvsignore: Add *.output.
103
104 * src/parse-gram.y: Put copyright notice inside %{ %} so it
105 gets copied to the output file.
106
107 2004-04-28 Paul Eggert <eggert@twinsun.com>
108
109 Get files from the gnulib and po repositories, instead of relying
110 on them being in our CVS. Upgrade to latest versions of gnulib
111 and Automake.
112
113 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
114 * bootstrap: Bootstrap from gnulib and po repositories.
115 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
116 * README-cvs: Document these changes. Remove version numbers from
117 mentions of build tools, since they change so often. Mention Flex.
118
119 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
120 (gl_USE_SYSTEM_EXTENSIONS): Add.
121 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
122 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
123 does this for us.
124 (AC_ISC_POSIX): Remove; we no longer support this
125 ancient OS, as it gets in the way of latest Autoconf & gnulib.
126 (AC_HEADER_STDC): Remove: we now assume C89 or better.
127 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
128 Do not check for C89 headers, except for locale.h which is used
129 by the Yacc library and must port to K&R hosts.
130 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
131 Do not check for C89 functions, except for setlocale which is
132 used by the Yacc library.
133 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
134 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
135 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
136 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
137 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
138 AM_GNU_GETTEXT): Remove; now done by:
139 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
140 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
141 for us.
142
143 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
144 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
145 Define to empty, as gnulib.mk will do the rest for us.
146 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
147 for us.
148 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
149 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
150
151 * src/files.c: Include gnulib's xstrndup.h.
152
153 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
154 (REALLOC): Use xnrealloc, for likewise.
155 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
156 (strnlen, memrchr): Remove decls; functions no longer used.
157 Include <stpcpy.h>.
158
159 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
160 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
161 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
162 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
163 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
164 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
165 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
166 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
167 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
168 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
169 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
170 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
171 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
172 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
173 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
174 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
175 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
176 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
177 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
178 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
179 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
180 Remove, as these files are now generated automatically
181 by bootstrap or automake.
182
183 * po/ChangeLog: Remove: all but one entry was a duplicate
184 of this file, and I moved that 2000-11-02 entry here.
185
186 * config/.cvsignore: Add Makefile, depcomp, install-sh.
187 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
188 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
189 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
190 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
191 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
192 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
193 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
194 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
195 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
196 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
197 xstrndup.h.
198 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
199 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
200 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
201 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
202 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
203 * src/.cvsignore: Remove *_.c.
204
205
206 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
207 support it. (The latest stable gzip doesn't.)
208
209 2004-04-27 Paul Eggert <eggert@twinsun.com>
210
211 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
212 case, as stos_ is now used by destructors due to the 2004-02-09
213 change.
214
215 Remove more K&R C support.
216 * lib/libiberty.y (PARAMS): Remove. All uses removed.
217 * lib/subpipe.c (errno): Remove decl.
218 Include <stdlib.h> unconditionally.
219 (EXIT_FAILURE): Remove macro.
220 * src/complain.c (vfprintf, strerror): Remove.
221 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
222 unconditionally.
223 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
224 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
225 (strchr, strspn, memchr): Remove decls.
226 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
227 unconditionally. Do not declare perror.
228 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
229 unconditionally.
230
231 * src/complain.c (_): Remove useless defn, as system.h defines this.
232
233 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
234 with latest obstack.h.
235 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
236 to procedure types, as obstack.h now does that for us.
237 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
238
239 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
240 so that this include file can stand alone.
241 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
242 does this now. Include subpipe.h first after config.h, to
243 test whether it can stand alone.
244
245 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
246 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
247 unused declaration.
248
249 * tests/synclines.at (%union synch line): Put a dummy member in
250 the union, because empty unions aren't allowed in C. Caught
251 by GCC 3.4.0.
252
253 2004-04-13 Jim Meyering <jim@meyering.net>
254
255 * src/conflicts.c (conflicts_print): Correct format string typo:
256 use `%%' to produce literal `%'. (trivial change)
257
258 2004-03-30 Paul Eggert <eggert@twinsun.com>
259
260 * src/getargs.c (version): Update copyright year to 2004.
261
262 * data/c.m4 (b4_int_type): Use 'short int' rather than
263 'short', and similarly for 'long', 'unsigned', etc.
264 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
265 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
266 yy_yypstack, yydumpstack): Likewise.
267 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
268 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
269 Likewise.
270 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
271 yy_stack_print, yyparse): Likewise.
272 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
273 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
274 * lib/bitset.c (bitset_print): Likewise.
275 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
276 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
277 * lib/bitsetv.c (bitsetv_dump): Likewise.
278 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
279 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
280 Likewise.
281 * src/LR0.c (allocate_itemsets): Likewise.
282 * src/gram.h (rule_number, rule): Likewise.
283 * src/lalr.h (goto_number): Likewise.
284 * src/nullable.c (nullable_compute): Likewise.
285 * src/output.c (prepare_rules): Likewise.
286 * src/relation.c (relation_print, relation_digraph): Likewise.
287 * src/relation.h (relation_node): Likewise.
288 * src/state.h (state_number, transitions, errs, reductions,
289 struct state): Likewise.
290 * src/symtab.h (symbol_number, struct symbol): Likewise.
291 * src/tables.c (vector_number, tally, action_number,
292 default_goto, goto_actions): Likewise.
293 * tests/existing.at (GNU Cim Grammar): Likewise.
294 * tests/regression.at (Web2c Actions): Likewise.
295
296 * src/output.c (muscle_insert_short_int_table): Renamed from
297 muscle_insert_short_table. All uses changed.
298
299 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
300
301 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
302 (declaration): Replace expected_conflicts with expected_sr_conflicts.
303 Add %expect-rr rule.
304
305 * src/scan-gram.l: Recognize %expect-rr.
306
307 * src/conflicts.h (expected_sr_conflicts): Rename from
308 expected_conflicts.
309 (expected_rr_conflicts): Declare.
310
311 * src/conflicts.c (expected_sr_conflicts): Rename from
312 expected_conflicts.
313 (expected_rr_conflicts): Define.
314 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
315 for GLR parsers.
316 Use expected_sr_conflicts in place of expected_conflicts.
317 Warn if expected_rr_conflicts used in non-GLR parser.
318
319 * doc/bison.texinfo: Add documentation for %expect-rr.
320
321 2004-03-08 Paul Eggert <eggert@gnu.org>
322
323 Add support for hex token numbers. Suggested by Odd Arild Olsen in
324 <http://mail.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
325
326 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
327 in lalr1.cc.
328 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
329 * src/scan-gram.l (scan_integer): New function.
330 ({int}): Use it.
331 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
332 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
333 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
334 Say "long int", not "long", for uniformity with GNU style.
335
336 2004-02-25 Paul Eggert <eggert@twinsun.com>
337
338 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
339 compilers. This fixes a problem with Intel's C++ compiler being
340 chatty, reported by Guido Trentalancia in
341 <http://mail.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
342
343 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
344
345 Support %destructor and merge error locations in lalr1.cc.
346
347 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
348 (Parser::stos_): Define unconditionally.
349 (Parser::destruct_): New method. Generate its body with
350 b4_yydestruct_generate.
351 (Parser::error_start_): New attribute.
352 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
353 token which are discarded.
354 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
355 error_start_ when erroneous token are discarded.
356 (Parser::parse) <yyerrlab1>: Compute the location of the error
357 token so that it covers all the discarded tokens.
358 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
359 it can be called with `%skeleton "lalr1.cc"', and do that.
360
361 2004-02-02 Paul Eggert <eggert@twinsun.com>
362
363 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
364 $(top_srcdir)/lib and ../lib. This fixes a bug reported
365 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
366 There's no need to mention top_builddir since Automake does that
367 for us.
368 (INCLUDES): Remove, as Automake says it's obsolescent.
369 Contents migrated into AM_CPPFLAGS as described above.
370 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
371
372 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
373
374 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
375 (yyreportSyntaxError): Handle case where lookahead token is
376 YYEMPTY.
377
378 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
379
380 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
381 resulting parsers are compilable with C++.
382
383 2003-12-23 Paul Eggert <eggert@twinsun.com>
384
385 * config/depcomp, config/install-sh: Sync with Automake 1.8.
386 * src/output.c (output_skeleton): Rename local var.
387 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
388 Bison tokens, as this runs afoul of the 2003-10-07 change that
389 disallowed NUL bytes in character constants or string literals.
390
391 * tests/local.at: Require Autoconf 2.59's Autotest.
392 * tests/testsuite.at: Don't include local.at, since we now assume
393 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
394 including it.
395 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
396 multiple inclusion warnings.
397
398 2003-12-02 Akim Demaille <akim@epita.fr>
399
400 * doc/bison.texinfo (How Can I Reset the Parser): More about start
401 conditions.
402 From Bruno Haible.
403
404 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
405
406 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
407
408 2003-10-07 Paul Eggert <eggert@twinsun.com>
409
410 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
411 if testsuite doesn't exist.
412
413 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
414 literals, unfortunately.
415 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
416 Complain about NUL bytes in character constants or string literals.
417
418 2003-10-05 Paul Eggert <eggert@twinsun.com>
419
420 * NEWS: Don't document %no-default-prec, as it's still
421 too experimental.
422 * doc/bison.texinfo: Document %no-default-prec only if
423 the defaultprec flag is set. Normally it's not.
424
425 2003-10-04 Paul Eggert <eggert@twinsun.com>
426
427 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
428 non-modifiable lvalue, instead of a modifiable one.
429 * doc/bison.texinfo (Actions): Document that $$ can
430 be assigned to. Do not claim that $$ and $N are
431 array element references: user code should not rely on this.
432
433 2003-10-01 Paul Eggert <eggert@twinsun.com>
434
435 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
436 (grammar_declaration): Use it.
437 * src/scan-gram.l: New token %no-default-prec.
438 * tests/conflicts.at: Revamp tests to use %no-default-prec.
439 * NEWS, doc/bison.texinfo: Document the above.
440
441 2003-10-01 Akim Demaille <akim@epita.fr>
442
443 VCG no longer supports long_straight_phase.
444
445 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
446 * src/print_graph.c (print_graph): Adjust.
447
448 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
449 and Paul Eggert <eggert@twinsun.com>
450
451 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
452 Table of Symbols): Document %default-prec.
453 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
454 (grammar_declaration): Set default_prec on %default-prec.
455 * src/scan-gram.l (%default-prec): New token.
456 * src/reader.h (default_prec): New flag.
457 * src/reader.c: Likewise.
458 (packgram): Handle it.
459 * tests/conflicts.at (%default-prec without %prec,
460 %default-prec with %prec, %default-prec 1): New tests.
461
462 2003-09-30 Paul Eggert <eggert@twinsun.com>
463
464 * tests/testsuite.at: Include local.at, not input.at, fixing
465 a typo in the 2003-08-25 patch.
466
467 2003-08-27 Akim Demaille <akim@epita.fr>
468
469 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
470 GCC warnings.
471
472 2003-08-26 Akim Demaille <akim@epita.fr>
473
474 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
475 "<\#" to avoid magic from Gnus when posting parts of this script.
476
477 2003-08-26 Akim Demaille <akim@epita.fr>
478
479 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
480 (Parser::parse): here.
481 Adjust: nerrs and errstatus is now replaced by...
482 (Parser::nerrs_, Parser::errstatus_): New.
483
484 2003-08-25 Akim Demaille <akim@epita.fr>
485
486 * config/announce-gen, Makefile.cfg: New.
487 * Makefile.am: Adjust.
488 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
489 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
490
491 2003-08-25 Akim Demaille <akim@epita.fr>
492
493 When reducing initial empty rules, Bison parser read an initial
494 location that is not defined. This results in garbage, and that
495 affects Bison's own parser. Therefore we need (i) to extend Bison
496 to support a means to initialize this location, and (ii) to use
497 this CVS Bison to fix CVS Bison's parser.
498
499 * src/reader.h, reader.c (epilogue_augment): Remove, replace
500 with...
501 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
502 * src/parse-gram.y: Adjust.
503 (%initial-action): New.
504 (%error-verbose): Since we require CVS Bison, there is no reason
505 not to use it.
506 * src/scan-gram.l: Adjust.
507 * src/Makefile.am (YACC): New, to make sure we use our own parser.
508 * data/yacc.c (yyparse): Use b4_initial_action.
509
510 2003-08-25 Akim Demaille <akim@epita.fr>
511
512 * doc/bison.texinfo: Don't promote stdout for error messages.
513
514 2003-08-25 Akim Demaille <akim@epita.fr>
515
516 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
517 From Alexandre Duret-Lutz.
518
519 2003-08-25 Akim Demaille <akim@epita.fr>
520
521 Version 1.875c.
522
523 2003-08-25 Akim Demaille <akim@epita.fr>
524
525 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
526 Use them.
527
528 2003-08-25 Akim Demaille <akim@epita.fr>
529
530 * data/lalr1.cc (Parser::reduce_print_): New.
531 Use it.
532
533 2003-08-25 Akim Demaille <akim@epita.fr>
534
535 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
536 error recovery loops. This patch is based on
537 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
538 Also, augment the similarity between lalr1.cc and yacc.c.
539 Note: the locations of error recovery rules are not correct yet.
540
541 * data/lalr1.cc: Comment changes to augment the similarity between
542 lalr1.cc and yacc.c.
543 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
544 (yyerrlab1): Remove, but where it used to be (now the bottom part of
545 yyerrlab), when hitting EOF, pop the whole stack here instead of
546 merely falling thru the default error handling mechanism.
547 (yyerrorlab): New label, with the old contents of YYERROR,
548 plus the following change: pop the stack of rhs corresponding
549 to the production that invoked YYERROR. That is how Yacc
550 behaves (required by POSIX).
551 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
552 fail.
553
554 2003-08-25 Akim Demaille <akim@epita.fr>
555
556 Tune local.at so that people can "autom4te -l autotest calc.at -o
557 calc" for instance, to extract a sub test suite.
558
559 * tests/testsuite.at: Move the initialization, Autotest version
560 requirement, and AT_TESTED invocation into...
561 * tests/local.at: here.
562 * tests/testsuite.at: Include it for compatibility with Autoconf
563 2.57.
564 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
565 be ignore.
566
567 2003-08-04 Paul Eggert <eggert@twinsun.com>
568
569 Rework code slightly to avoid gcc -Wtraditional warnings.
570 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
571 The returned value is now stored in *YY0. All callers changed.
572 * src/output.c (merge_output): Adjust to the above change.
573
574 2003-07-26 Paul Eggert <eggert@twinsun.com>
575
576 * data/glr.c (YYASSERT): New macro.
577 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
578 yyresolveStates, yyprocessOneStack):
579 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
580 Derived from a suggestion by Frank Heckenbach.
581
582 2003-07-25 Paul Eggert <eggert@twinsun.com>
583
584 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
585 for portability to K&R C (after ansi2knr, presumably). See
586 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
587 by Frank Heckenbach, though I have omitted the structure-initialization
588 part of his glr-knr.diff patch since I recall that the Portable
589 C Compiler didn't require that change.
590
591 Let the user specify how to allocate and free memory.
592 Derived from a suggestion by Frank Heckenbach in
593 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
594 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
595 All uses of free, malloc, realloc changed to use these macros,
596 and unnecessary casts removed.
597 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
598
599 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
600
601 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
602 use s.empty() rather than s == "" to test for empty string; see
603 <http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
604 (trivial change)
605
606 2003-06-25 Akim Demaille <akim@epita.fr>
607
608 * config/depcomp, config/install-sh: Update from masters.
609
610 2003-06-20 Paul Eggert <eggert@twinsun.com>
611
612 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
613 and return properly parenthesized result.
614 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
615 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
616 Remove unnecessary parentheses from uses.
617 * doc/bison.texinfo (Location Default Action): Describe the
618 conventions for parentheses.
619
620 2003-06-19 Paul Eggert <eggert@twinsun.com>
621
622 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
623 yyreportTree): Do not assume that size_t is the same width as int,
624 when printing sizes. Print sizes using an unsigned format.
625 Problem reported by Frank Heckenbach in
626 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
627
628 Port to Forte Developer 7 C compiler.
629 * data/glr.c (struct YYLTYPE): If locations are not being used,
630 declare a single dummy member, as empty structs do not conform
631 to the C standard.
632 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
633 the Forte Developer 7 C compiler complains that end-of-loop
634 code is not reached.
635
636 2003-06-17 Paul Eggert <eggert@twinsun.com>
637
638 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
639 avoid warnings from picky compilers about redefinition of PARAMS.
640
641 2003-06-17 Paul Eggert <eggert@twinsun.com>
642
643 Version 1.875b.
644
645 * NEWS: Document 1.875b.
646
647 * lib/bbitset.h: Do not include config.h; that's the includer's job.
648 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
649 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
650 Don't use 'index' in comments, as it's a builtin fn on some hosts.
651 * lib/bitset_stats.c: Include gettext.h unconditionally, as
652 per recent gettext manual's suggestion.
653 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
654 Use prototypes, not old-style definitions.
655 * lib/lbitset.c (lbitset_unused_clear): Likewise.
656 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
657 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
658 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
659 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
660 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
661 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
662 vbitset_or_and_cmp, vbitset_copy): Likewise.
663
664 * lib/libiberty.h: Do not include config.h; that's the includer's job.
665 Do not include <stdlib.h>.
666 (PARAMS): Define unconditionally for C89.
667 (ATTRIBUTE_NORETURN): Remove.
668 (ATTRIBUTE_UNUSED): Define unconditionally.
669
670 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
671 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
672 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
673 * lib/vbitset.c, lib/vbitset.h: New files.
674 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
675 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
676 from libbitset.
677
678 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
679 `How Can I Reset @code{yyparse}', since texinfo does not allow
680 arbitrary @ in node names.
681
682 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
683 shouldn't be needed according to the gettext 0.12.1 documentation
684 but which seem to be needed anyway: codeset.m4 glibc21.m4
685 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
686 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
687 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
688
689 * lib/.cvsignore: Add stdbool.h.
690 * m4/.cvsignore: Add nls.m4, po.m4.
691
692 Upgrade to CVS gnulib.
693 * stdbool_.h: File renamed from stdbool.h.in.
694 * configure.ac (AM_STDBOOL_H): Invoke this instead of
695 AC_HEADER_STDBOOL.
696 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
697 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
698 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
699 (MOSTLYCLEANFILES): New var.
700 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
701 (stdbool.h): New rule.
702 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
703 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
704 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
705 m4/quote.m4: Upgrade to today's gnulib.
706
707 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
708 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
709 the tests right now.
710 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
711 yyerror are declared before use; C99 requires this.
712
713 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
714
715 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
716 first.
717 (yyrecoverSyntaxError): Correct the logic for setting and testing
718 yyerrState.
719 Correct comment on handling EOF.
720 Allow states with only a default reduction, rather than failing
721 (I can't quite reconstruct why these were not allowed before).
722
723 Fixes to avoid problem that $-N rules in GLR parsers can cause
724 buffer overruns, corrupting state.
725
726 * src/output.c (prepare_rules): Output max_left_semantic_context
727 definition.
728 * src/reader.h (max_left_semantic_context): New variable declaration.
729 * src/scan-gram.l (max_left_semantic_context): Define.
730 (handle_action_dollar): Update max_left_semantic_context.
731 * data/glr.c (YYMAXLEFT): New definition.
732 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
733 (yyresolveAction): Ditto.
734
735 Fixes to problems with location handling in GLR parsers reported by
736 Frank Heckenbach (2003/06/05).
737
738 * data/glr.c (YYLTYPE): Make trivial if locations not used.
739 (YYRHSLOC): Add parentheses, and define only if locations used.
740 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
741 locations not used.
742 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
743 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
744
745 * tests/cxx-type.at: Exercise location information; update tests
746 to differentiate output with and without locations.
747 Remove forward declarations of yylex and yyerror---caused errors
748 because default YYLTYPE not yet defined.
749 Change semantic actions to compute strings, rather than printing
750 them directly (to test proper passing of semantics values). Change
751 output to prefix notation and update test data and expected results.
752 (yylex): Track locations.
753 (stmtMerge): Return value rather than printing, and include arguments
754 in value.
755
756 2003-06-03 Paul Eggert <eggert@twinsun.com>
757
758 Avoid warnings generated by GCC 2.95.4 when Bison is
759 configured with --enable-gcc-warnings.
760 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
761 yy::]b4_parser_class_name[::translate_,
762 yy::Stack::operator[] (unsigned),
763 yy::Stack::operator[] (unsigned) const,
764 yy::Slice::operator[] (unsigned),
765 yy::Slice::operator[] (unsigned) const):
766 Rename local vars to avoid warnings.
767 * tests/glr-regression.at (Improper handling of embedded actions
768 and $-N in GLR parsers): Remove unused local variable from yylex.
769 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
770 (void) as arg when not pure, since we now assume C89 when building
771 Bison. Pacify GCC by using parameter.
772
773 2003-06-02 Paul Eggert <eggert@twinsun.com>
774
775 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
776 yy::Location::lines, yy::Location::columns): Rename arguments
777 to avoid shadowing; this removes a warning generated by GCC 3.3.
778
779 2003-06-01 Paul Eggert <eggert@twinsun.com>
780
781 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
782 to g++, as GCC 3.3 complains if you do it.
783 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
784 everything that WARNING_CFLAGS has, except omit warnings
785 not suitable for C++.
786 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
787 * tests/atlocal.in (CXXFLAGS): New var.
788 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
789
790 Fix a GLR parser bug I reported in February; see
791 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
792 The problem was that GLR parsers did not conform to the C standard,
793 because actions like { $1 = $2 + $3; } expanded to expressions
794 that invoked YYFILL in separate subexpressions, and YYFILL assigned
795 to a local variable. The C standard says that expressions
796 like (var = f ()) + (var = f ()) have undefined behavior.
797 Another problem was that GCC sometimes issues warnings that
798 yyfill and its parameters are unused.
799
800 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
801 as possibly unused.
802 (yyfill): New function.
803 (YYFILL): Use it.
804 (yyuserAction): Change type of yynormal to bool, so that it matches
805 the new yyfill signature. Mark it as possibly unused.
806
807
808 Follow up on a bug I reported in February, where a Bison-generated
809 parser can loop. Provide a test case and a fix for yacc.c. I
810 don't have a fix for lalr1.cc or for glr.c, unfortunately.
811 The original bug report is in:
812 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
813
814 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
815 macro's size was becoming unwieldy.
816 (yyerrlab): Do not discard an empty lookahead symbol, as this
817 might destroy garbage.
818 (yyerrorlab): New label, with the old contents of YYERROR,
819 plus the following change: pop the stack of rhs corresponding
820 to the production that invoked YYERROR. That is how Yacc
821 behaves, and POSIX requires this behavior.
822 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
823 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
824 Define 'alarm' to do nothing if unistd.h is not available.
825 Add a new rule "exp: '-' error;" to test the above change to
826 data/yacc.c. Use 'alarm' to abort any test taking longer than
827 10 seconds, as it's probably looping.
828 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
829 Also, the new yacc.c generates two fewer diagnostics for an
830 existing test.
831
832 2003-05-24 Paul Eggert <eggert@twinsun.com>
833
834 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
835 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
836 This fixes a problem reported by John Bowman when the Compaq/HP
837 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
838 -ansi -Wall -gall).
839 * data/yacc.c (union yyalloc): Likewise.
840 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
841
842 Switch from 'int' to 'bool' where that makes sense.
843
844 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
845 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
846 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
847 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
848 Return or accept bool, not int. All callers changed.
849 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
850 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
851 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
852 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
853 bitset_or_and_cmp_): Likewise.
854 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
855 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
856 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
857 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
858 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
859 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
860 bitset_stats_or_and_cmp): Likewise.
861 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
862 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
863 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
864 ebitset_xor_cmp): Likewise.
865 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
866 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
867 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
868 lbitset_xor_cmp): Likewise.
869 * lib/bbitset.h: Include <stdbool.h>.
870 (struct bitset_vtable): The following members now return bool, not
871 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
872 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
873 or_and_cmp).
874 * src/conflicts.c (count_rr_conflicts): Likewise.
875 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
876 All uses changed.
877 * lib/ebitset.c (ebitset_obstack_init): Likewise.
878 * lib/lbitset.c (lbitset_obstack_init): Likewise.
879 * src/getargs.c (debug_flag, defines_flag, locations_flag,
880 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
881 graph_flag): Likewise.
882 * src/getargs.h (debug_flag, defines_flag, locations_flag,
883 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
884 graph_flag): Likewise.
885 * src/output.c (error_verbose): Likewise.
886 * src/output.h (error_verbose): Likewise.
887 * src/reader.c (start_flag, typed): Likewise.
888 * src/reader.h (typed): Likewise.
889 * src/getargs.c (LOCATIONS_OPTION): New constant.
890 (long_options, getargs): Use it.
891 * src/lalr.c (build_relations): Use bool, not int.
892 * src/nullable.c (nullable_compute): Likewise.
893 * src/print.c (print_reductions): Likewise.
894 * src/tables.c (action_row, pack_vector): Likewise.
895 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
896 * src/output.c (prepare): Use it.
897 * src/output.c (token_definitions_output,
898 symbol_destructors_output, symbol_destructors_output): Use string,
899 not boolean integer, to keep track of whether to output separator.
900 * src/print_graph.c (print_core): Likewise.
901 * src/state.c (state_rule_lookaheads_print): Likewise.
902
903 * config/install-sh: Sync from automake 1.7.5.
904
905 2003-05-14 Paul Eggert <eggert@twinsun.com>
906
907 * src/parse-gram.y (rules_or_grammar_declaration): Require a
908 semicolon after a grammar declaration, in the interest of possible
909 future changes to the Bison input language.
910 Do not allow a stray semicolon at the start of the grammar.
911 (rhses.1): Allow one or more semicolons after any rule, including
912 just before "|" as required by POSIX.
913 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
914 grammar.
915
916 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
917
918 %parse-param support for lalr1.cc.
919
920 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
921 b4_cc_constructor_calls, b4_cc_constructor_call,
922 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
923 definitions.
924 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
925 parse-param arguments.
926 (yy::b4_parser_class_name): Declare instance variables to
927 hold parse-param arguments.
928 * tests/calc.at: s/value/semantic_value/ because value clashes
929 with a member of yy::b4_parser_class_name. Adjust C++ code
930 to handle %parse-param. Enable %parse-param test in C++.
931
932 2003-05-12 Paul Eggert <eggert@twinsun.com>
933
934 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
935 English a bit. Fix fclose typo. Change "const char" to "char
936 const", and use ANSI C rather than K&R for "main". Suggest
937 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
938 and suggest yy_switch_to_buffer.
939
940 2003-05-05 Paul Eggert <eggert@twinsun.com>
941
942 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
943 C89. This avoids a diagnostic on compilers that define __STDC__
944 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
945 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
946
947 2003-05-03 Paul Eggert <eggert@twinsun.com>
948
949 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
950 Do not overrun array bounds.
951 This should fix a bug reported today by Olatunji Oluwabukunmi in
952 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
953
954 2003-04-29 Akim Demaille <akim@epita.fr>
955
956 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
957 * src/getargs.c, src/getargs.h: here, as bool, not int.
958 (nondeterministic_parser): New.
959 * src/parse-gram.y, src/scan-gram.l: Support
960 %nondeterministic-parser.
961 * src/output.c (prepare): Use nondeterministic_parser instead
962 of glr_parser where appropriate.
963 * src/tables.c (conflict_row, action_row, save_row)
964 (token_actions, token_actions, pack_vector): Ditto.
965
966 2003-04-29 Akim Demaille <akim@epita.fr>
967
968 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
969
970 2003-04-29 Akim Demaille <akim@epita.fr>
971
972 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
973 with %pure-parser and %locations to exercise the patch from Yakov
974 Markovitch below.
975
976 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
977
978 * data/yacc.c: (b4_lex_param): Corrected for the case where
979 %lex-param is provided and %pure-parser isn't.
980
981 2003-04-27 Paul Eggert <eggert@twinsun.com>
982
983 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
984 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
985 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
986 if it is not defined.
987 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
988
989 2003-04-26 Paul Eggert <eggert@twinsun.com>
990
991 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
992 Declare to be of type suitable for the ninf value itself, not of
993 type suitable for the corresponding table, since the latter might
994 be unsigned but the ninf value might be negative. This fixes a
995 bug reported by Alexandre Duret-Lutz in
996 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
997
998 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
999 invokes it. We shouldn't invoke it twice because it will attempt
1000 to put error.o in the archive twice. This fixes a glitch reported
1001 by Martin Mokrejs in
1002 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
1003
1004 2003-04-21 Paul Eggert <eggert@twinsun.com>
1005
1006 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
1007 to gnulib.
1008
1009 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
1010
1011 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
1012 Fix obvious typo that results in uncompilable GLR parsers
1013 when both %pure-parser and %locations are used. (trivial change)
1014
1015 2003-04-17 Paul Eggert <eggert@twinsun.com>
1016
1017 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
1018 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
1019 Do not insert the expected token via unput, as this runs afoul
1020 of a POSIX-compatibility bug in flex 2.5.31.
1021 All uses changed to BEGIN the parent state,
1022 since we no longer insert the expected token via unput.
1023 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
1024 that is no longer emitted after the above change.
1025
1026 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
1027 the first one. This change is from Paul Hilfinger, and it fixes
1028 regression reported by Werner Lemberg in
1029 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1030
1031 (resolve_sr_conflict): Don't invoke state_errs_set
1032 unless one or more tokens have been explicitly made errors.
1033 Otherwise, the above change causes Bison to abort.
1034
1035 * tests/existing.at (GNU pic Grammar): New test case, taken from
1036 Lemberg's email.
1037
1038 2003-03-31 Akim Demaille <akim@epita.fr>
1039
1040 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
1041
1042 2003-03-31 Akim Demaille <akim@epita.fr>
1043
1044 * src/output.c (prepare_symbols): Avoid trailing spaces in the
1045 output.
1046
1047 2003-03-31 Akim Demaille <akim@epita.fr>
1048
1049 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
1050 From Paul Hilfinger.
1051
1052 2003-03-29 Akim Demaille <akim@epita.fr>
1053
1054 * m4/error.m4: Do not put under dynamic conditions some code which
1055 expansion is under static control.
1056
1057 2003-03-29 Akim Demaille <akim@epita.fr>
1058
1059 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
1060
1061 2003-03-29 Akim Demaille <akim@epita.fr>
1062
1063 * doc/bison.texinfo (Strings are Destroyed): New.
1064
1065 2003-03-13 Paul Eggert <eggert@twinsun.com>
1066
1067 * .cvsignore: Add configure.lineno.
1068 * src/.cvsignore: Add yacc.
1069 * tests/.cvsignore: Add testsuite.log.
1070 * doc/fdl.texi: Sync with latest FSF version.
1071
1072 2003-03-12 Paul Eggert <eggert@twinsun.com>
1073
1074 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
1075 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
1076 cursor, instead of leaving it undefined. This fixes a bug
1077 reported by Tim Van Holder in
1078 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
1079 * tests/input.at (Torturing the Scanner): Test the scanner on
1080 an empty input file, which was Tim Van Holder's test case.
1081
1082 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
1083 <sys/resource.h> can be included, include sys/time.h and
1084 sys/times.h first, if available. This works around the SunOS
1085 4.1.4 porting bug reported by Bruce Becker in
1086 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
1087
1088 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
1089 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
1090 AC_HEADER_SYS_WAIT.
1091
1092 Merge changes from gnulib. This was prompted because the CVS
1093 snapshot didn't build on Solaris 7 due to strnlen problems.
1094
1095 These changes need to be merged back into gnulib:
1096 * lib/hash.c: Include <stdbool.h> unconditionally.
1097 * m4/onceonly.m4 (m4_quote): New macro.
1098 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
1099 Quote AC_FOREACH variable-expansions properly.
1100 The 2003-01-03 obstack.h change also needs merging.
1101 {end of changes requiring merging}
1102
1103 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
1104 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
1105 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
1106 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
1107 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
1108 New files, imported from gnulib.
1109 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
1110 above.
1111
1112 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
1113 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
1114 gnulib sources.
1115
1116 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
1117 Add.
1118 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
1119 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
1120 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
1121 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
1122 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
1123 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
1124 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
1125 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
1126 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
1127 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
1128 (jm_PREREQ_ARGMATCH): Remove.
1129 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
1130 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
1131
1132 * src/system.h: Include <stdbool.h> unconditionally.
1133
1134 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
1135 assuming at least C89 in the bitset code for some time now.
1136
1137 2003-03-03 Akim Demaille <akim@epita.fr>
1138
1139 * ro.po: New.
1140
1141 2003-03-02 Akim Demaille <akim@epita.fr>
1142
1143 * doc/bison.texinfo (Table of Symbols): Reactivate the
1144 documentation for %lex-param, and %parse-param.
1145
1146 2003-03-02 Akim Demaille <akim@epita.fr>
1147
1148 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
1149 generate verbose error messages.
1150 Use the number of tokens as an upper bound in yytname, as it
1151 cannot be a non terminal.
1152
1153 2003-03-02 Akim Demaille <akim@epita.fr>
1154
1155 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
1156 message.
1157
1158 2003-03-02 Akim Demaille <akim@epita.fr>
1159
1160 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
1161 Use them to exercise yycheck overrun.
1162 Based on Andrew Suffield's grammar.
1163
1164 2003-03-02 Akim Demaille <akim@epita.fr>
1165
1166 Create tests/local.at for Bison generic testing macros.
1167
1168 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
1169 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
1170 This new file.
1171 * tests/calc.at (AT_CHECK_CALC): Adjust.
1172 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
1173 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
1174 * tests/local.at: here.
1175 (AT_COMPILE_CXX): Tags the tests using it as c++.
1176 Ignore the test if CXX is not functional.
1177
1178 2003-03-01 Paul Eggert <eggert@twinsun.com>
1179
1180 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
1181 not loc->end, since loc->end might contain garbage and this leads
1182 to undefined behavior on some platforms.
1183 (id_loc, token_start): Use (IF_LINTed) initial values that do not
1184 depend on *loc, so that the reader doesn't give the the false
1185 impression that *loc is initialized.
1186 (<INITIAL>"%%"): Do not bother setting code_start, since its value
1187 does not survive the return.
1188
1189 2003-03-01 Akim Demaille <akim@epita.fr>
1190
1191 * src/scan-gram.l (code_start): Always initialize it when entering
1192 into yylex, as SC_EPILOGUE is activated *before* the corresponding
1193 yylex invocation. An alternative would be making it static, but
1194 then it starts with the second %%'s beginning, instead of its end.
1195
1196 2003-02-28 Paul Eggert <eggert@twinsun.com>
1197
1198 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
1199 around a UnixWare 7.1.1 porting bug reported by John Hughes in
1200 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
1201
1202 2003-02-26 Paul Eggert <eggert@twinsun.com>
1203
1204 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
1205 Remove Sequent/Pyramid discussion (nobody uses them any more).
1206 Merge VMS and MS-DOS discussion; these ports may well be dead
1207 but let's keep mentioning them for now. Put <> around email
1208 addresses. Add copyright notice.
1209
1210 2003-02-24 Paul Eggert <eggert@twinsun.com>
1211
1212 * data/glr.c (yy_reduce_print): yylineno -> yylno,
1213 to avoid collision with flex use of yylineno.
1214 Problem reported by Bruce Lilly in
1215 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
1216 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1217 * data/yacc.c (yy_reduce_print): Likewise.
1218
1219 * config/depcomp: Sync with Automake 1.7.3.
1220
1221 2003-02-21 Akim Demaille <akim@epita.fr>
1222
1223 * data/lalr1.cc: Use temporary variables instead of casts to
1224 change integer types.
1225 Suggested by Paul Eggert.
1226
1227 2003-02-21 Akim Demaille <akim@epita.fr>
1228
1229 * doc/bison.texinfo: Use "location" consistently to refer to @n,
1230 to avoid confusions with lalr1.cc's notion of Position.
1231 Suggested by Paul Eggert.
1232
1233 2003-02-20 Akim Demaille <akim@epita.fr>
1234
1235 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
1236 before initial_columns.
1237 (location.hh): Use consistent variable names when defining the
1238 operator<<.
1239 Use "last" so that we subtract from Positions, not from unsigned.
1240
1241 2003-02-20 Akim Demaille <akim@epita.fr>
1242
1243 * data/lalr1.cc (position.hh): New subfile, including the extended
1244 and Doxygen'ed documentation of class Position.
1245 (location.hh): Use it.
1246 Document a` la Doxygen.
1247 With the help of Benoit Perrot.
1248
1249 2003-02-20 Akim Demaille <akim@epita.fr>
1250
1251 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
1252 AT_YACC_IF.
1253 Redefine AT_YYERROR_SEES_LOC_IF using it.
1254 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
1255 not defined.
1256 Don't use the location in yy::Parser::error_ and
1257 yy::Parser::print_ when not %locations.
1258 Activate more lalr1.cc tests.
1259
1260 2003-02-19 Akim Demaille <akim@epita.fr>
1261
1262 * data/lalr1.cc: When displaying a line number, be sure to make it
1263 an int.
1264
1265 2003-02-19 Akim Demaille <akim@epita.fr>
1266
1267 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
1268 Remove, useless.
1269 (YYABORT, YYACCEPT, YYERROR): New.
1270 * tests/calc.at: Renable the lalr1.cc test.
1271
1272 2003-02-19 Akim Demaille <akim@epita.fr>
1273
1274 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
1275 error recovery, mixing with/without pops and discarding of the
1276 lookahead.
1277 Exercise YYERROR.
1278 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
1279
1280 2003-02-17 Paul Eggert <eggert@twinsun.com>
1281
1282 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
1283 * tests/testsuite.at (AT_COMPILE): Use them.
1284 This fixes the testsuite problem reported by Robert Lentz in
1285 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
1286
1287 2003-02-12 Paul Eggert <eggert@twinsun.com>
1288
1289 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
1290 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
1291 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
1292 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
1293 Check for malloc failure, for consistency with yacc.c.
1294 (yytname_size): Remove, for consistency with yacc.c.
1295
1296 The bug still remains in data/lalr1.cc, as I didn't have time
1297 to fix it there.
1298
1299 2003-02-06 Akim Demaille <akim@epita.fr>
1300
1301 * configure.ac (GXX): Rename as...
1302 (CXX): this, to keep the original Autoconf semantics.
1303 Require 2.57.
1304 * data/lalr1.cc: Fix b4_copyright invocations.
1305 If YYDEBUG is not defined, don't depend upon name_ being defined.
1306 (location.hh): Include string and iostream.
1307 (Position::filename): New member.
1308 (Position::Position ()): New.
1309 (operator<< (Position)): New.
1310 (operator- (Position, int)): New.
1311 (Location::first, Location::last): Rename as...
1312 (Location::begin, Location::end): these, to mock the conventional
1313 iterator names.
1314 (operator<< (Location)): New.
1315 * tests/atlocal.in (CXX): New.
1316 * tests/testsuite.at (AT_COMPILE_CXX): New.
1317 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
1318 locations in a more synthetic way.
1319 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
1320 lalr1.cc is used.
1321 Adjust the C locations to match those from Emacs: first column is
1322 column 0.
1323 Change all the expected results.
1324 Conform to the GCS: simplify the locations when applicable.
1325 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
1326 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
1327 these CPP macros with the m4 macros new defined by...
1328 (AT_CHECK_PUSHDEFS): this, i.e.:
1329 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
1330 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
1331 New macros.
1332 (AT_CHECK_POPDEFS): Undefine them.
1333 (AT_CHECK_CALC_LALR1_CC): New.
1334 Use it for the first lalr1.cc test.
1335
1336 2003-02-04 Akim Demaille <akim@epita.fr>
1337
1338 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
1339 Location as is defined.
1340
1341 2003-02-04 Akim Demaille <akim@epita.fr>
1342
1343 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
1344 name_ being defined.
1345
1346 2003-02-03 Paul Eggert <eggert@twinsun.com>
1347
1348 * src/gram.h (start_symbol): Remove unused decl.
1349
1350 Use more-consistent naming conventions for local vars.
1351
1352 * src/derives.c (derives_compute): Change type of local var from
1353 int to rule_number.
1354 * src/gram.c (grammar_rules_partial_print): Likewise.
1355 * src/print.c (print_core): Likewise.
1356 * src/reduce.c (reduce_grammar_tables): Likewise.
1357
1358 * src/gram.c (grammar_dump): Change name of item_number *
1359 local var from r to rp.
1360 * src/nullable.c (nullable_compute): Likewise.
1361
1362 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
1363
1364 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
1365 for symbol or symbol_number var.
1366 * src/reader.c (grammar_start_symbol_set): Likewise.
1367 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
1368 Likewise.
1369 * src/state.c (transitions_to): Likewise.
1370 * src/state.h: Likewise.
1371 * src/tables.c (symbol_number_to_vector_number): Likewise.
1372
1373 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
1374 char * var.
1375
1376 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
1377 var.
1378
1379 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
1380 var.
1381
1382 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
1383 Use str, not s, for char * var. Use ch, not c, for character var.
1384 Use size for size var.
1385
1386 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
1387 char * var.
1388 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
1389 uniqstr var.
1390 * src/uniqstr.h: Likewise.
1391
1392 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1393 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1394 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
1395 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
1396 param to have same name as that of enum, so that we don't use
1397 "s" to stand for a non-state.
1398
1399 2003-02-02 Akim Demaille <akim@epita.fr>
1400
1401 * src/scan-skel.l: Scan more than one inert character per yylex
1402 invocation.
1403
1404 2003-02-01 Paul Eggert <eggert@twinsun.com>
1405
1406 Version 1.875a.
1407
1408 * po/LINGUAS: Add ms.
1409
1410 2003-01-30 Akim Demaille <akim@epita.fr>
1411
1412 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
1413
1414 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1415
1416 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
1417 of $1.
1418
1419 Changes in response to error report by S. Eken: GLR mode does not
1420 handle negative $ indices or $ indices in embedded rules correctly.
1421 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
1422
1423 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
1424 (b4_rhs_location): Ditto.
1425 (yyfill): New function to copy from stack tree into array
1426 incrementally.
1427 (yyuserAction): Modify to allow incremental move of semantic values
1428 to rhs array when in GLR mode.
1429 Define YYFILL to use in user-defined actions to fill semantic array
1430 as needed.
1431 Remove dummy use of yystack, as there is now a guaranteed use.
1432 (yydoAction): Modify to allow incremental move of semantic values
1433 to rhs array when in GLR mode.
1434 (yyresolveAction): Ditto.
1435 (yyglrShiftDefer): Update comment.
1436 (yyresolveStates): Use X == NULL for pointers, not !X.
1437 (yyglrReduce): Ditto.
1438 (yydoAction): Ditto
1439
1440 * tests/glr-regr1.at: Rename to ...
1441 * tests/glr-regression.at: Add new regression test for the problems
1442 described above (adapted from S. Eken).
1443 Update copyright notice.
1444 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
1445 * tests/Makefile.am: Ditto.
1446
1447 2003-01-28 Paul Eggert <eggert@twinsun.com>
1448
1449 * data/lalr1.cc: Do not use @output_header_name@ unless
1450 b4_defines_flag is set. This fixes two bugs reported by
1451 Tim Van Holder in
1452 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
1453 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
1454
1455 2003-01-21 Paul Eggert <eggert@twinsun.com>
1456
1457 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
1458 we don't need to worry about yyerrlab1 being reported as an
1459 "unused label" by non-GCC C compilers. The downside is that if
1460 locations are used then a couple of statements are duplicated each
1461 time YYERROR is invoked, but the upside is that the warnings
1462 should vanish.
1463 (yyerrlab1): Move code to YERROR.
1464 (yyerrlab2): Remove. Change uses back to yyerrlab1.
1465 This reverts some of the 2002-12-27 change.
1466
1467 2003-01-17 Paul Eggert <eggert@twinsun.com>
1468
1469 * src/output.c (symbol_printers_output): Fix typo that led
1470 to core dump. Problem reported by Antonio Rus in
1471 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
1472
1473 2003-01-13 Akim Demaille <akim@epita.fr>,
1474 Quoc Peyrot <chojin@lrde.epita.fr>,
1475 Robert Anisko <anisko_r@lrde.epita.fr>
1476
1477 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
1478 when the stacks contain one element, as the loop would otherwise
1479 free the last state, and then use the top state (the one we just
1480 popped). This means that the initial elements will not be freed
1481 explicitly, as is the case in yacc.c; it is not a problem, as
1482 these elements have fake values.
1483
1484 2003-01-11 Paul Eggert <eggert@twinsun.com>
1485
1486 * NEWS: %expect-violations are now just warnings, reverting
1487 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
1488 bootstrapping problem reported by Matthias Klose; see
1489 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
1490 * src/conflicts.c (conflicts_print): Likewise.
1491 * tests/conflicts.at (%expect not enough, %expect too much,
1492 %expect with reduce conflicts): Likewise.
1493 * doc/bison.texinfo (Expect Decl): Document this. Also mention
1494 that the warning is enabled if the number of conflicts changes
1495 (not necessarily increases).
1496
1497 * src/getargs.c (version): Update copyright year.
1498
1499 2003-01-09 Akim Demaille <akim@epita.fr>
1500
1501 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
1502
1503 2003-01-08 Paul Eggert <eggert@twinsun.com>
1504
1505 * Makefile.maint (WGETFLAGS):
1506 New macro, containing "-C off" to disable proxy caches.
1507 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
1508 (rel-check): Use $(WGET) instead of wget.
1509
1510 2003-01-06 Paul Eggert <eggert@twinsun.com>
1511
1512 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
1513 the GLR paper of Scott, Johnstone and Hussain.
1514
1515 2003-01-04 Paul Eggert <eggert@twinsun.com>
1516
1517 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
1518 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
1519 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
1520 (EXTRA_LIBRARIES): New var, for liby.a.
1521 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
1522 (EXTRA_SCRIPTS): New var, for yacc.
1523
1524 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
1525 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
1526 Problem reported by Nelson H. F. Beebe.
1527
1528 2003-01-03 Paul Eggert <eggert@twinsun.com>
1529
1530 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
1531 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1532 when compiling Bison 1.875's `bitset bset = obstack_alloc
1533 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
1534
1535 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
1536 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
1537 grow to a huge size with typical invocation.
1538
1539 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
1540 Use the pattern recommended by Autoconf 2.57, except also protect
1541 against double-definition.
1542 * src/system.h: Likewise.
1543 Portability issues reported by Nelson H. F. Beebe.
1544
1545 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
1546 All uses changed. Provide a definition in both C and C++.
1547 (yytrue, yyfalse): Define even if defined (__cplusplus).
1548
1549 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
1550 Reported by Nelson H. F. Beebe.
1551
1552 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
1553
1554 2003-01-02 Paul Eggert <eggert@twinsun.com>
1555
1556 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
1557 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
1558 Bug reported by Nelson H. F. Beebe.
1559
1560 2003-01-01 Paul Eggert <eggert@twinsun.com>
1561
1562 * Version 1.875.
1563
1564 2002-12-30 Paul Eggert <eggert@twinsun.com>
1565
1566 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
1567 Moved here from...
1568 (<INITIAL>","): Here. This causes stray "," to be treated
1569 more uniformly.
1570
1571 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
1572 last brace in braced code when not in Yacc mode, for compatibility
1573 with Bison 1.35. This resurrects the 2001-12-15 patch to
1574 src/reader.c.
1575
1576 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
1577 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
1578
1579 2002-12-28 Paul Eggert <eggert@twinsun.com>
1580
1581 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
1582 that of SYM's type. This fixes Debian bug 168069, reported by
1583 Thomas Olsson.
1584
1585 2002-12-28 Paul Eggert <eggert@twinsun.com>
1586
1587 Version 1.75f.
1588
1589 Switch back to the Yacc style of conflict reports, undoing some
1590 of the 2002-07-30 change.
1591 * doc/bison.texinfo (Understanding): Use Yacc style for
1592 conflict reports. Also, use new way of locating rules.
1593 * src/conflicts.c (conflict_report):
1594 Renamed from conflict_report_yacc, removing the old
1595 'conflict_report'. Translate the entire conflict report at once,
1596 so that we don't assume that "," has the same interpretation in
1597 all languages.
1598 (conflicts_output): Use Yacc-style conflict report for each state,
1599 instead of our more-complicated style.
1600 (conflicts_print): Use Yacc-style conflict report, except print
1601 the input file name when not emulating Yacc.
1602 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
1603 Conflicted Reduction, %expect not enough, %expect too much,
1604 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
1605 * tests/existing.at (GNU Cim Grammar): Likewise.
1606 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
1607
1608 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
1609 fatal): Don't invoke fflush; it's not needed and it might even be
1610 harmful for stdout, as stdout might not be open.
1611 * src/reduce.c (reduce_print): Likewise.
1612
1613 2002-12-27 Paul Eggert <eggert@twinsun.com>
1614
1615 Fix a bug where error locations were not being recorded correctly.
1616 This problem was originally reported by Paul Hilfinger in
1617 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
1618
1619 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1620 top of the location stack's error locations.
1621 (yyerrlab): Set it. When discarding a token, push its location
1622 onto yylerrsp so that we don't lose track of the error's end.
1623 (yyerrlab1): Now is only the target of YYERROR, so that we can
1624 properly record the location of the action that failed. For GCC
1625 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1626 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1627 (yyerrlab2): New label, which yyerrlab now falls through to.
1628 Compute the error's location by applying YYLLOC_DEFAULT to
1629 the locations of all the symbols that went into the error.
1630 * doc/bison.texinfo (Location Default Action): Mention that
1631 YYLLOC_DEFAULT is also invoked for syntax errors.
1632 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1633 Error locations include the locations of all the tokens that were
1634 discarded, not just the last token.
1635
1636 2002-12-26 Paul Eggert <eggert@twinsun.com>
1637
1638 * src/files.c: Include quote.h.
1639 (compute_output_file_names): Warn if we detect conflicting
1640 outputs to the same file. This should catch the misunderstanding
1641 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1642
1643 * src/conflicts.c (conflicts_print): If the user specifies
1644 "%expect N", report an error if there are any reduce/reduce
1645 conflicts. This is what the manual says should happen.
1646 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1647 * tests/conflicts.at (%expect with reduce conflicts): New test.
1648
1649 Don't use m4_include on relative file names, as it doesn't work as
1650 desired if there happens to be a file with that name under ".".
1651
1652 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1653 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1654 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1655 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1656 * src/output.c (output_skeleton): Use full path names when
1657 specifying a file to include; don't rely on include path, as
1658 it's unreliable when the working file contains a file with
1659 that name.
1660
1661 2002-12-25 Paul Eggert <eggert@twinsun.com>
1662
1663 Remove obsolete references to bison.simple and bison.hairy.
1664 Problem mentioned by Aubin Mahe in
1665 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
1666 * data/glr.c: Comment fix.
1667 * doc/bison.1: Remove references. Also, mention "yacc".
1668
1669 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1670 with -g option.
1671
1672 * src/parse-gram.y (declaration): Use enum "report_states" rather
1673 than its numeric value 1.
1674
1675 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1676 opening a new one. This fixes Debian bug 165349, reported by
1677 Bruce Stephens.
1678
1679 2002-12-24 Paul Eggert <eggert@twinsun.com>
1680
1681 Version 1.75e.
1682
1683 * Makefile.maint (cvs-update): Don't assume that the shell
1684 supports $(...), as Solaris sh doesn't.
1685
1686 * src/parse-gram.y (lloc_default): Remove test for empty
1687 nonterminals at the end, since it didn't change the result.
1688
1689 2002-12-24 Paul Eggert <eggert@twinsun.com>
1690
1691 If the user does not define YYSTYPE as a macro, Bison now declares it
1692 using typedef instead of defining it as a macro. POSIX requires this.
1693 For consistency, YYLTYPE is also declared instead of defined.
1694
1695 %union directives can now have a tag before the `{', e.g., the
1696 directive `%union foo {...}' now generates the C code
1697 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1698 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1699 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1700 instead of `yyltype'.
1701
1702 `yystype' and `yyltype' are now obsolescent macros instead of being
1703 typedefs or tags; they are no longer documented and will be
1704 withdrawn in a future release.
1705
1706 * data/glr.c (b4_location_type): Remove.
1707 (YYSTYPE): Renamed from yystype.
1708 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
1709 (struct YYLTYPE): Renamed from struct yyltype.
1710 (YYLTYPE): Renamed from yyltype.
1711 (yyltype, yystype): New (and obsolescent) macros,
1712 for backward compatibility.
1713 * data/yacc.c: Likewise.
1714
1715 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
1716 does not specify a union tag. This is for compatibility with
1717 Solaris 9 yacc.
1718
1719 * src/parse-gram.y (add_param): 2nd arg is now char * not char
1720 const *, since it is now modified by stripping surrounding { }.
1721 (current_braced_code): Remove.
1722 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
1723 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
1724 trailing " {...}". Now of type <chars>.
1725 (grammar_declaration): Adjust to bundled tokens.
1726 (code_content): Remove; stripping is now done by add_param.
1727 (print_token_value): Print contents of bundled tokens.
1728 (token_name): New function.
1729
1730 * src/reader.h (braced_code, current_braced_code): Remove.
1731 (token_name): New decl.
1732
1733 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
1734 token_type, not braced_code code_kind. All uses changed.
1735 (SC_PRE_CODE): New state, for scanning after a keyword that
1736 has (or usually has) an immediately-following braced code.
1737 (token_type): New local var, to keep track of which token type
1738 to return when scanning braced code.
1739 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
1740 <INITIAL>"%parse-param", <INITIAL>"%printer",
1741 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
1742 instead of returning a token type immediately.
1743 (<INITIAL>"{"): Set token type.
1744 (<SC_BRACED_CODE>"}"): Use it.
1745 (handle_action_dollar, handle_action_at): Now returns bool
1746 indicating success. Fail if ! current_rule; this prevents a core dump.
1747 (handle_symbol_code_dollar, handle_symbol_code_at):
1748 Remove; merge body into caller.
1749 (handle_dollar, handle_at): Complain in invalid contexts.
1750
1751 * NEWS, doc/bison.texinfo: Document the above.
1752 * NEWS: Fix years and program names in copyright notice.
1753
1754 2002-12-17 Paul Eggert <eggert@twinsun.com>
1755
1756 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
1757 Reporting, Table of Symbols): Omit mentions of %lex-param and
1758 %parse-param from the documentation for now.
1759
1760 2002-12-15 Paul Eggert <eggert@twinsun.com>
1761
1762 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
1763 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
1764 lookahead symbol, and which sets yychar in parser actions) and it
1765 disagreed with the Bison documentation. Bug
1766 reported by Andrew Walrond.
1767
1768 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
1769 as the caller now does that.
1770 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
1771 (YYEMPTY): Parenthesize right hand side, since others use it.
1772 (yyparse): Don't assume that our generated code is the only code
1773 that sets yychar.
1774
1775 2002-12-13 Paul Eggert <eggert@twinsun.com>
1776
1777 Version 1.75d.
1778
1779 POSIX requires a "yacc" command.
1780 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
1781 (MOSTLYCLEANFILES): Add yacc.
1782 (yacc): New rule.
1783 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
1784 as an alias for bison y.
1785
1786 * po/LINGUAS: Add da.
1787
1788 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
1789 problem with latest <getopt.h>.
1790 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
1791
1792 * doc/fdl.texi: Upgrade to 1.2.
1793 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
1794 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
1795 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
1796 gnulib.
1797 * config/install-sh: Sync with autotools.
1798
1799 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
1800 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1801 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
1802 locations are requested.
1803 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
1804 locations are requested.
1805
1806 2002-12-12 Paul Eggert <eggert@twinsun.com>
1807
1808 Remove unportable casts and storage allocation tricks.
1809 While we're at it, remove almost all casts, since they
1810 usually aren't needed and are a sign of trouble.
1811
1812 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
1813
1814 * src/derives.c (derives_compute): Do not subtract NTOKENS from
1815 the pointer DSET returned by malloc; this isn't portable.
1816 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
1817 Similarly for DERIVES.
1818 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
1819 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
1820 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
1821
1822 * src/derives.c (derives_compute): Do not bother invoking
1823 int_of_rule_number, since rule numbers are integers.
1824
1825 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
1826 rather than XMALLOC (char, N).
1827
1828 * src/files.c (filename_split): Rewrite to avoid cast.
1829
1830 * src/gram.h (symbol_number_as_item_number,
1831 item_number_as_symbol_number, rule_number_as_item_number,
1832 item_number_as_rule_number):
1833 Now inline functions rather than macros, to avoid casts.
1834 * src/state.h (state_number_as_int): Likewise.
1835 * src/tables.c (state_number_to_vector_number,
1836 symbol_number_to_vector_number): Likewise.
1837
1838 * src/gram.h (int_of_rule_number): Remove; no longer used.
1839
1840 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
1841 since the resulting storage is always stored into.
1842
1843 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
1844 where it's needed.
1845
1846 * src/muscle_tab.c (muscle_m4_output):
1847 Now inline. Return bool, not int.
1848 * src/state.c (state_compare): Likewise.
1849 * src/symtab.c (symbol_check_defined,
1850 symbol_check_alias_consistency, symbol_pack, symbol_translation,
1851 hash_compare_symbol, hash_symbol):
1852 Likewise.
1853 * src/uniqstr.c (uniqstr_print): Likewise.
1854 * src/muscle_tab.c (muscle_m4_output_processor):
1855 New function, to avoid casts.
1856 * src/state.c (state_comparator, stage_hasher): Likewise.
1857 * src/symtab.c (symbol_check_defined_processor,
1858 symbol_check_alias_consistency_processor, symbol_pack_processor,
1859 symbol_translation_processor, hash_symbol_comparator,
1860 hash_symbol_hasher): Likewise.
1861 * src/uniqstr.c (uniqstr_print_processor): Likewise.
1862 * src/muscle_tab.c (muscles_m4_output):
1863 Use new functions instead of casting old functions unportably.
1864 * src/state.c (state_hash_new): Likewise.
1865 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
1866 symbols_token_translations_init):
1867 Likewise.
1868 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
1869
1870 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
1871 var instead of casting to long, to avoid casts.
1872 (prepare_states): Use MALLOC rather than alloca, so that we don't
1873 have to worry about alloca.
1874 * src/state.c (state_hash_lookup): Likewise.
1875
1876 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
1877 local var instead of casting to unsigned char, to avoid casts.
1878
1879 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
1880 STATE_ALLOC): Remove.
1881 (transitions_new, errs_new, reductions_new, state_new): Use malloc
1882 rather than calloc, and use offsetof to avoid allocating slightly
1883 too much storage.
1884 (state_new): Initialize all members.
1885
1886 * src/state.c (state_hash): Use unsigned accumulator, not signed.
1887
1888 * src/symtab.c (symbol_free): Remove; unused.
1889 (symbol_get): Remove cast in lhs of assignment.
1890 (symbols_do): Now static. Accept generic arguments, not
1891 hashing-related ones.
1892
1893 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
1894 (symbol_processor): Remove.
1895 (symbols_do): Remove decl; now static.
1896
1897 * src/system.h (alloca): Remove; decl no longer needed.
1898 (<stddef.h>): Include, for offsetof.
1899 (<inttypes.>, <stdint.h>): Include if available.
1900 (uintptr_t): New type, if system lacks it.
1901 (CALLOC, MALLOC, REALLOC): New macros.
1902 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
1903 new macros.
1904
1905 * src/tables.c (table_size): Now int, to pacify GCC.
1906 (table_grow, table_ninf_remap): Use signed table size.
1907 (save_row): Don't bother initializing locals when not needed.
1908 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
1909 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
1910
1911 * src/vcg.h: Correct misspellings.
1912
1913 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
1914
1915
1916 * src/getargs.c (getargs): Don't assume EOF == -1.
1917
1918 2002-12-09 Paul Eggert <eggert@twinsun.com>
1919
1920 Change identifier spellings to avoid collisions with names
1921 that are reserved by POSIX.
1922
1923 Don't use names ending in _t, since POSIX reserves them.
1924 For consistency, remove _e and _s endings -- they're weren't
1925 needed to remove ambiguity. All uses changed.
1926 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
1927 turn was just renamed from struniq_t.
1928 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
1929 which in turn was just renamed from struniq_processor_t.
1930 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
1931 in turn was renamed from hash_compare_struniq_t.
1932 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
1933 (state_list): Renamed from state_list_t.
1934 * src/assoc.h (assoc): Renamed from assoc_t.
1935 * src/conflicts.c (enum conflict_resolution): Renamed from
1936 enum conflict_resolution_e.
1937 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
1938 (rule_list): Renamed from rule_list_t.
1939 * src/getargs.h (enum trace): Renamed from enum trace_e.
1940 (enum report): Renamed from enum report_e.
1941 * src/gram.h (item_number): Renamed from item_number_t.
1942 (rule_number): Renamed from rule_number_t.
1943 (struct rule_s): Remove the "rule_s" part; not used.
1944 (rule): Renamed from rule_t.
1945 (rule_filter): Renamed from rule_filter_t.
1946 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
1947 (goto_list): Renamed from goto_list_t.
1948 * src/lalr.h (goto_number): Renamed from goto_number_t.
1949 * src/location.h (location): Renamed from location_t.
1950 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
1951 and moved here from:
1952 * src/muscle_tab.h (muscle_entry_t): here.
1953 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
1954 (rule_list): Renamed from rule_list_t.
1955 * src/print_graph.c (static_graph): Renamed from graph.
1956 * src/reader.h (braced_code): Renamed from braced_code_t.
1957 Remove brace_code_e tag.
1958 * src/relation.h (relation_node): Renamed from relation_node_t.
1959 (relation_nodes): Renamed from relation_nodes_t.
1960 (relation): Renamed from relation_t.
1961 * src/state.h (state_number): Renamed from state_number_t.
1962 (struct state): Renamed from struct state_s.
1963 (state): Renamed from state_t.
1964 (transitions): Renamed from transitions_t. Unused (and
1965 misspelled) transtion_s tag removed.
1966 (errs): Renamed from errs_t. Unused errs_s tag removed.
1967 (reductions): Renamed from reductions_t. Unused tag
1968 reductions_s removed.
1969 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
1970 (struct symbol_list): Renamed from struct symbol_list_s.
1971 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
1972 (struct symbol): Renamed from struct symbol_s.
1973 (symbol): Renamed from symbol_t.
1974 * src/tables.c (vector_number): Renamed from vector_number_t.
1975 (action_number): Renamed from action_t.
1976 * src/tables.h (base_number): Renamed from base_t.
1977 * src/vcg.h (enum color): Renamed from enum color_e.
1978 (enum textmode): Renamed from enum textmode_e.
1979 (enum shape): Renamed from enum shape_e.
1980 (struct colorentry): Renamed from struct colorentry_s.
1981 (struct classname): Renamed from struct classname_s.
1982 (struct infoname): Renamed from struct infoname_s.
1983 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
1984 (enum decision): Renamed from enum decision_e.
1985 (enum orientation): Renamed from enum orientation_e.
1986 (enum alignment): Renamed from enum alignment_e.
1987 (enum arrow_mode): Renamed from enum arrow_mode_e.
1988 (enum crossing_type): Renamed from enum crossing_type_e.
1989 (enum view): Renamed from enum view_e.
1990 (struct node): Renamed from struct node_s.
1991 (node): Renamed from node_t.
1992 (enum linestyle): Renamed from enum linestyle_e.
1993 (enum arrowstyle): Renamed from enum arrowstyle_e.
1994 (struct edge): Renamed from struct edge.
1995 (edge): Renamed from edge_t.
1996 (struct graph): Renamed from struct graph_s.
1997 (graph): Renamed from graph_t.
1998 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
1999 Rename value_t -> value.
2000 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
2001 value_t_as_yystype -> value_as_yystype.
2002
2003 Don't include <errno.h> in the mainstream code, since it
2004 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
2005 * lib/get-errno.c, lib/get-errno.h: New files.
2006 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
2007 get-errno.c.
2008 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
2009 * src/output.c (output_skeleton): Likewise.
2010 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
2011 instead of errno.
2012 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
2013 Likewise.
2014 (handle_action_dollar, handle_action_at): Likewise.
2015 * src/system.h: Do not include <errno.h>.
2016 (TAB_EXT): Renamed from EXT_TAB.
2017 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
2018
2019 Avoid str[a-z]*, since <string.h> reserves that name space.
2020 Change all instances of "struniq" in names to "uniqstr", and
2021 likewise for "STRUNIQ" and "UNIQSTR".
2022 * src/uniqstr.c: Renamed from src/struniq.c.
2023 * src/uniqstr.h: Renamed from src/struniq.h.
2024 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
2025 * src/files.c (strsuffix): Remove; unused.
2026 (concat2): Renamed from stringappend. Now static.
2027 * src/files.h (strsuffix, stringappend): Remove; unused.
2028 * src/parse-gram.y (<chars>): Renamed from <string>.
2029 (<uniqstr>): Renamed from <struniq>.
2030 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
2031 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
2032 (struct graph_s.expand): Renamed from struct graph_s.stretch.
2033 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
2034 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
2035 (N_EXPAND): Renamed from N_STRETCH.
2036
2037 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
2038 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
2039 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
2040 Remove; unused.
2041 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
2042 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
2043 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
2044 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
2045 (BASE_MAXIMUM): Renamed from BASE_MAX.
2046 (BASE_MINIMUM): Renamed from BASE_MIN.
2047 (ACTION_MAX): Remove; unused.
2048 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
2049 Unnecessary casts removed from above defines.
2050
2051
2052 Fix misspelling in names.
2053 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
2054 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
2055 G_NODE_ALIGNEMENT.
2056
2057
2058 * lib/timevar.c (timevar_report): Renamed from time_report,
2059 for consistency with other names.
2060 * lib/timevar.h (timevar_report): New decl.
2061 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
2062
2063
2064 Sort include-file uses.
2065
2066 Reorder all include files under src to be in the order "system.h".
2067 then the ../lib include files in angle brackets (alphabetized),
2068 then the . include files in double-quotes (alphabetized). Fix
2069 dependency breakages encountered in this process, as follows:
2070 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
2071 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
2072 * src/state.h: Include "symtab.h".
2073
2074 2002-12-08 Paul Eggert <eggert@twinsun.com>
2075
2076 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
2077 since this causes problems when __file__ contains character
2078 sequences like "@" that are treated specially by src/scan-skel.l.
2079 Instead, just use the file's basename. This fixes the bug
2080 reported by Martin Mokrejs in
2081 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
2082
2083 2002-12-06 Paul Eggert <eggert@twinsun.com>
2084
2085 Add support for rules that do not have trailing semicolons, as
2086 POSIX requires. Improve the quality of locations in Bison
2087 diagnostics.
2088
2089 * src/location.c: Include <quotearg.h>.
2090 (empty_location): Now const.
2091 (location_print): New function. Follow the recommendation of the
2092 GNU Coding Standards for locations that span file boundaries.
2093 * src/location.h: Do not include <quotearg.h>; no longer needed.
2094 (boundary): New type.
2095 (location_t): Use it. This allows locations to span file boundaries.
2096 All member uses changed: file -> start.file or end.file (as needed),
2097 first_line -> start.line, first_column -> start.column,
2098 last_line -> end.line, last_column -> end.column.
2099 (equal_boundaries): New function.
2100 (LOCATION_RESET, LOCATION_STEP): Remove.
2101 (LOCATION_PRINT): Remove. All callers changed to use location_print.
2102 (empty_location): Now const.
2103 (location_print): New decl.
2104 * src/parse-gram.y (lloc_default): New function, which handles
2105 empty locations more accurately.
2106 (YYLLOC_DEFAULT): Use it.
2107 (%token COLON): Remove.
2108 (%token ID_COLON): New token.
2109 (rules): Use it.
2110 (declarations, rules): Remove trailing semicolon.
2111 (declaration, rules_or_grammar_declaration):
2112 Allow empty (";") declaration.
2113 (symbol_def): Remove empty actions; no longer needed.
2114 (rules_or_grammar_declaration): Remove trailing semicolon.
2115 (semi_colon.opt): Remove.
2116 * src/reader.h: Include location.h.
2117 (scanner_cursor): New decl.
2118 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
2119 rolling our own.
2120 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
2121 of *loc.
2122 (STEP): Remove. No longer needed, now that adjust_location does
2123 the work. All uses removed.
2124 (scanner_cursor): New var.
2125 (adjust_location): Renamed from extend_location. It now sets
2126 *loc and adjusts the scanner cursor. All uses changed.
2127 Don't bother testing for CR.
2128 (handle_syncline): Remove location arg; now updates scanner cursor.
2129 All callers changed.
2130 (unexpected_end_of_file): Now accepts start boundary of token or
2131 comment, not location. All callers changed. Update scanner cursor,
2132 not the location.
2133 (SC_AFTER_IDENTIFIER): New state.
2134 (context_state): Renamed from c_context. All uses changed.
2135 (id_loc, code_start, token_start): New local vars.
2136 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
2137 processing of Yacc white space and equivalents here.
2138 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
2139 instead of returning ID immediately, since we need to search for
2140 a subsequent colon.
2141 (<INITIAL>"'", "\""): Save token_start.
2142 (<INITIAL>"%{", "{", "%%"): Save code_start.
2143 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
2144 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
2145 BEGIN context_state at end, not INITIAL.
2146 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
2147 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
2148 Return correct token start.
2149 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
2150 the start of a character, string or multiline comment is found.
2151 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
2152 Reduction): Adjust reported locations to match the more-precise
2153 results now expected.
2154 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
2155 * tests/reduce.at (Useless Rules, Reduced Automaton,
2156 Underivable Rules): Likewise.
2157 * tests/regression.at (Invalid inputs): No longer `expecting ";"
2158 or "|"' now that so many other tokens are allowed by the new grammar.
2159
2160 * src/complain.h (current_file): Remove duplicate decl;
2161 current_file is now owned by files.h.
2162 * src/complain.c, src/scan-gram.l: Include files.h.
2163
2164 2002-12-06 Paul Eggert <eggert@twinsun.com>
2165
2166 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
2167 promotes to int; it might be unsigned int.
2168 * data/yacc.c (yy_reduce_print): Likewise.
2169
2170 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
2171 be #defined in the prologue, not in the Bison declarations.
2172 This fixes Debian Bug 102878, reported by Shaul Karl.
2173
2174 2002-12-02 Paul Eggert <eggert@twinsun.com>
2175
2176 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
2177 * lib/strtoul.c: New file, from gnulib.
2178 This fixes a porting bug reported by Peter Klein in
2179 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
2180
2181 2002-11-30 Paul Eggert <eggert@twinsun.com>
2182
2183 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
2184 and put only a forward declaration in the prologue. This is for
2185 consistency with the other scanner helper functions.
2186
2187 Type clashes now generate warnings, not errors, since it
2188 appears that POSIX may allow some grammars with type clashes.
2189 * src/reader.c (grammar_current_rule_check): Warn about
2190 type clashes instead of complaining.
2191 * tests/input.at (Type Clashes): Expect warnings, not complaints.
2192
2193 Add Yacc library, since POSIX requires it.
2194 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
2195 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
2196 * lib/main.c, lib/yyerror.c: New files.
2197
2198 gram_error can be static; it need not be extern.
2199 * src/reader.h (gram_error): Remove decl.
2200 * src/parse-gram.y (gram_error): Now static. Add static decl.
2201 (print_token_value): Omit parameter names from forward decl,
2202 for consistency.
2203
2204 2002-11-29 Paul Eggert <eggert@twinsun.com>
2205
2206 * doc/bison.texinfo: Emphasize that yylex and yyerror must
2207 be declared before being used. E.g., one should typically
2208 declare them in the prologue. Use GNU coding style in examples.
2209 Put "const" consistently after the type it modifies. Mention
2210 that C99 supports "inline". Mention that yyerror traditionally
2211 returns "int".
2212
2213 %parse-param and %lex-param now take just one argument, the
2214 declaration; the argument name is deduced from the declaration.
2215
2216 * doc/bison.texinfo (Parser Function, Pure Calling, Error
2217 Reporting, Table of Symbols): Document this.
2218 * src/parse-gram.y (add_param): New function.
2219 (COMMA): Remove.
2220 (declaration): Implement new rule for %parse-param and %lex-param.
2221 * src/scan-gram.l: "," now elicits a warning, rather than being
2222 a token; this is more compatible with byacc.
2223 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
2224
2225 2002-11-27 Paul Eggert <eggert@twinsun.com>
2226
2227 Rename identifiers to avoid real and potential collisions.
2228
2229 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
2230 to avoid collision with lex macro described by Bruce Lilly in
2231 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
2232 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2233 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
2234 * src/parse-gram.y (print_token_value): Renamed from yyprint.
2235 All uses changed.
2236 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
2237 The name "yycontrol" violates the name space rules, and this stuff
2238 wasn't being used anyway.
2239 (input): Remove action; this stuff wasn't being used.
2240 (gram_error): Rename local variable yylloc -> loc.
2241 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
2242 (YY_DECL): Don't use "yy" at start of local variables.
2243 All uses changed, e.g., yylloc -> loc.
2244 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
2245 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
2246 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
2247 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
2248
2249 * src/parse-gram.y (gram_error): loc is now const *.
2250 * src/reader.h (gram_error): Likewise.
2251
2252 2002-11-24 Paul Eggert <eggert@twinsun.com>
2253
2254 Version 1.75c.
2255
2256 * tests/actions.at (Actions after errors): Use an output format
2257 more similar to that of the Printers and Destructors test.
2258 Test the position of the ';' token too.
2259 (Printers and Destructors): Likewise.
2260 (Printers and Destructors: %glr-parser): Remove for now, to avoid
2261 unnecessarily alarming people when the test fails.
2262
2263 * data/yacc.c (yyerrlab1): Move this label down, so that the
2264 parser does not discard the lookahead token if the user code
2265 invokes YYERROR. This change is required for POSIX conformance.
2266
2267 * lib/error.c: Sync with gnulib.
2268
2269 2002-11-22 Paul Eggert <eggert@twinsun.com>
2270
2271 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
2272 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
2273 * lib/xmalloc.c: Likewise.
2274
2275 2002-11-20 Paul Eggert <eggert@twinsun.com>
2276
2277 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
2278
2279 2002-11-20 Paul Eggert <eggert@twinsun.com>
2280
2281 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
2282 should use `if (! x) abort ();' rather than `assert (x);', and
2283 anyway it's one less thing to worry about configuring.
2284
2285 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
2286 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
2287 and replace all instances of assert with abort.
2288 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2289 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
2290
2291 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
2292 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
2293 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
2294 hash_find_entry, hash_rehash, hash_insert): Likewise.
2295 * src/conflicts.c (resolve_sr_conflict): Likewise.
2296 * src/lalr.c (set_goto_map, map_goto): Likewise.
2297 * src/nullable.c (nullable_compute): Likewise.
2298 * src/output.c (prepare_rules, token_definitions_output): Likewise.
2299 * src/reader.c (packgram, reader): Likewise.
2300 * src/state.c (state_new, state_free, state_transitions_set,
2301 state_reduction_find): Likewise.
2302 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
2303 symbol_pack): Likewise.
2304 * src/tables.c (conflict_row, pack_vector): Likewise.
2305 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
2306 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
2307 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
2308 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
2309
2310 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
2311 (ARGMATCH_CONSTRAINT): New macro.
2312 (ARGMATCH_ASSERT): Use it.
2313
2314 * src/system.h (verify): New macro.
2315 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
2316 rather than assert.
2317 * src/tables.c (tables_generate): Likewise.
2318
2319 * src/struniq.c (struniq_assert): Now returns void, and aborts
2320 if the assertion is false.
2321 (struniq_assert_p): Remove.
2322 * src/struniq.h: Likewise.
2323
2324 2002-11-18 Paul Eggert <eggert@twinsun.com>
2325
2326 * data/glr.c (yygetLRActions): Replace `yyindex' with
2327 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
2328 This fixes the regression with Sun ONE Studio 7 cc that I reported in
2329 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
2330
2331 2002-11-18 Akim Demaille <akim@epita.fr>
2332
2333 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
2334 space.
2335 From Tim Van Holder.
2336
2337 2002-11-17 Paul Eggert <eggert@twinsun.com>
2338
2339 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
2340 to "SyntaxError" for consistency with my 2002-11-15 change.
2341
2342 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
2343 not define to {}, since this breaks the common use of `YYDPRINTF
2344 ((...));' if a single statement is desired (e.g. before `else').
2345 Work around GCC warnings by surrounding corresponding calls with
2346 {} if needed.
2347 (yyhasResolvedValue): Remove unused function.
2348 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
2349 loop body.
2350 (yyreportSyntaxError): Renamed from yyreportParseError.
2351 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
2352 All uses changed.
2353 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
2354 extern when possible. Remove unused initializations.
2355
2356 2002-11-16 Akim Demaille <akim@epita.fr>
2357
2358 Augment the similarity between GLR and LALR traces.
2359
2360 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
2361 (YY_REDUCE_PRINT): New.
2362 (yyparse): Use them.
2363 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
2364 YYDPRINT here.
2365 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
2366 state reached after the reduction/recovery, since...
2367 (yyparse, yyprocessOneStack): Report the state we are entering in.
2368
2369 2002-11-16 Akim Demaille <akim@epita.fr>
2370
2371 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
2372 Add support for --trace=skeleton.
2373 * src/scan-skel.l: %option debug.
2374 Scan strings of non-@ or \n instead of character by character.
2375 (scan_skel): Handle trace_skeleton.
2376 (QPUTS): New.
2377 (@output_parser_name@, @output_header_name@): ``Restore'' their
2378 support (used to be M4 macros).
2379 * data/yacc.c: Quote larger chunks, a la glr.c.
2380 * data/lalr1.cc: Likewise.
2381 The header guards are no longer available, so use some other
2382 string than `YYLSP_NEEDED'.
2383
2384 2002-11-16 Akim Demaille <akim@epita.fr>
2385
2386 Make the ``Printers and Destructors'' test more verbose, taking
2387 `yacc.c''s behavior as (possibly wrong) reference.
2388
2389 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
2390 instead of fprint on stdout.
2391 Set and report the last_line of the symbols.
2392 Consistently display values and locations.
2393
2394 2002-11-16 Paul Eggert <eggert@twinsun.com>
2395
2396 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
2397
2398 2002-11-15 Paul Eggert <eggert@twinsun.com>
2399
2400 * tests/actions.at (Actions after errors): New test case.
2401
2402 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
2403 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
2404 tests/action.at, tests/calc.at, tests/conflicts.at,
2405 tests/cxx-type.at, tests/regression.at:
2406 "parse error" -> "syntax error" for POSIX compatibility.
2407 "parsing stack overflow..." -> "parser stack overflow" so
2408 that code matches Bison documentation.
2409
2410 2002-11-15 Akim Demaille <akim@epita.fr>
2411
2412 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
2413 take two BRACED_CODE, not two string_content.
2414 Free the scanner's obstack when we are done.
2415 (code_content): New.
2416 * tests/calc.at: Adjust.
2417 * doc/bison.texinfo: Adjust.
2418 Also, make sure to include the `,' for these declarations.
2419
2420 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
2421
2422 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
2423 definition; avoids potential autoreconf problems.
2424
2425 2002-11-15 Akim Demaille <akim@epita.fr>
2426
2427 Always check the value returned by yyparse.
2428
2429 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
2430 returned by yyparse.
2431 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
2432 Adjust calls.
2433 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
2434 returned by yyparse.
2435
2436 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2437
2438 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
2439 on input.at test.
2440
2441 2002-11-14 Paul Eggert <eggert@twinsun.com>
2442
2443 * src/output.c (output_skeleton): Call xfopen instead of
2444 duplicating xfopen's body.
2445
2446 Fix bugs reported by Nelson H. F. Beebe in
2447 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
2448
2449 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
2450 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
2451 Group compiler. Instead, use "$CC -E bar.c". Include the .h
2452 file twice in the grammar, as an extra check.
2453
2454 * tests/input.at (Torturing the Scanner): Surround the
2455 backslash-newline tests with "#if 0", to make it less likely that
2456 we'll run into compiler bugs. Bring back solitary \ inside
2457 comment, but add a closing comment to work around HP C bug. Don't
2458 test backslash-newline in C character constant.
2459
2460 2002-11-14 Akim Demaille <akim@epita.fr>
2461
2462 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
2463 status of the compiler.
2464 Calling `exit 1' is no longer needed.
2465 Reported by Nelson H. F. Beebe.
2466
2467 2002-11-14 Akim Demaille <akim@epita.fr>
2468
2469 * tests/atlocal.in (CPPFLAGS): We have config.h.
2470 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
2471 New.
2472 * tests/actions.at, tests/calc.at, tests/conflicts.at,
2473 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
2474 * tests/regression.at, tests/torture.at: Use them for all the
2475 grammars that are to be compiled.
2476 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
2477 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
2478 * doc/bison.texinfo (GLR Parsers): Document `inline'.
2479
2480 2002-11-14 Akim Demaille <akim@epita.fr>
2481
2482 * doc/bison.texinfo: Various formatting changes (alignments in
2483 samples, additional @group/@end group, GCS in samples.
2484 Use @deffn instead of simple @table to define the directives,
2485 macros, variables etc.
2486
2487 2002-11-13 Paul Eggert <eggert@twinsun.com>
2488
2489 Fix some bugs reported by Albert Chin-A-Young in
2490 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
2491
2492 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
2493 -o c"; the HP C compiler chatters during compilation.
2494 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
2495 * tests/headers.at (export YYLTYPE): Likewise.
2496
2497 * tests/input.at (Torturing the Scanner): Remove lines containing
2498 solitary backslashes, as they tickle a bug in the HP C compiler.
2499
2500 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
2501 comments, since they're not portable. Use GNU coding style.
2502
2503 2002-11-13 Akim Demaille <akim@epita.fr>
2504
2505 * data/yacc.c: Leave bigger chunks of quoted text.
2506 (YYDSYMPRINTF): New.
2507 Use it to report symbol activities.
2508 * data/glr.c (YYDSYMPRINTF): New.
2509 Use it.
2510
2511 2002-11-12 Paul Eggert <eggert@twinsun.com>
2512
2513 Version 1.75b.
2514
2515 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
2516 (yyglrReduce): Return yyok, not 0.
2517 This should avoid the enumerated-type warnings reported
2518 by Nelson H. F. Beebe in
2519 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
2520
2521 * lib/bbitset.h (BITSET_INLINE): Remove.
2522 * lib/bitset.h [! BITSET_INLINE]: Remove.
2523 (bitset_set, bitset_reset, bitset_test): Rename local vars
2524 to avoid shadowing warnings by GCC.
2525
2526 * data/glr.c (inline): Remove #define. It's the user's
2527 responsibility to #define it away, just like 'const'.
2528 This fixes one of the bugs reported by Nelson H. F. Beebe in
2529 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
2530
2531 * Makefile.maint (po-check): Scan .l and .y files instead of the
2532 .c and the .h files that they generate. This fixes the bug
2533 reported by Tim Van Holder in:
2534 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
2535 Look for N_ as well as for _. Try to avoid matching #define for
2536 N_ and _.
2537 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
2538 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
2539 * src/scan-gram.l: Revamp regular expressions so that " and '
2540 do not confuse xgettext.
2541
2542 * src/struniq.h (struniq_new): Do not declare the return type
2543 to be 'const'; this violates the C standard.
2544 * src/struniq.c (struniq_new): Likewise.
2545
2546 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
2547
2548 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
2549 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
2550 linker.
2551
2552 2002-11-12 Akim Demaille <akim@epita.fr>
2553
2554 * Makefile.maint: Sync with Autoconf:
2555 (local_updates): New.
2556
2557 2002-11-12 Akim Demaille <akim@epita.fr>
2558
2559 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
2560
2561 2002-11-12 Akim Demaille <akim@epita.fr>
2562
2563 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
2564 locations.
2565
2566 2002-11-12 Akim Demaille <akim@epita.fr>
2567
2568 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
2569 not yyvalue.
2570
2571 2002-11-12 Akim Demaille <akim@epita.fr>
2572
2573 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
2574 Use it to test the GLR parser.
2575
2576 2002-11-12 Akim Demaille <akim@epita.fr>
2577
2578 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
2579 defines it.
2580 * data/glr.c (yystos): New.
2581 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
2582 (YYDSYMPRINT): New.
2583 (yyval): Don't define it, it is handled via M4.
2584 (yyrecoverParseError): Free verbosely the discarded symbols.
2585 * data/yacc.c (yysymprint): Remove, rather...
2586 (b4_yysymprint_generate): invoke.
2587 * data/c.m4 (b4_yysymprint_generate): New.
2588 Accept pointers as arguments, as opposed to the version from
2589 yacc.c.
2590 (b4_yydestruct_generate): Likewise.
2591 * tests/cations.at (Printers and Destructors): Use Bison directives
2592 instead of CPP macros.
2593 Don't rely on internal details.
2594
2595 2002-11-12 Akim Demaille <akim@epita.fr>
2596
2597 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
2598 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
2599 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
2600 it against YYEMPTY and so forth), work on yytoken (i.e., set
2601 it to YYEMPTY etc.).
2602 (yydestruct): Replace with a b4_yydestruct_generate invocation.
2603 (b4_symbol_actions): Remove.
2604 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
2605 for 0, end-of-input.
2606
2607 2002-11-12 Akim Demaille <akim@epita.fr>
2608
2609 * doc/bison.texinfo (Destructor Decl): New.
2610
2611 2002-11-12 Akim Demaille <akim@epita.fr>
2612
2613 * src/tables.c (tables_generate): Use free for pointers that
2614 cannot be NULL, not XFREE.
2615 (pack_vector): Use assert, not fatal, for bound violations.
2616 * src/state.c (state_new): Likewise.
2617 * src/reader.c (reader): Likewise.
2618 * src/lalr.c (set_goto_map): Likewise.
2619 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
2620 the file name.
2621
2622 2002-11-12 Akim Demaille <akim@epita.fr>
2623
2624 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2625 Restore.
2626 * src/scan-gram.l (last_string): Is global to the file, not to
2627 yylex.
2628 * src/parse-gram.y (input): Don't append the epilogue here,
2629 (epilogue.opt): do it here, and free the scanner's obstack.
2630 * src/reader.c (epilogue_set): Rename as...
2631 (epilogue_augment): this.
2632 * data/c.m4 (b4_epilogue): Defaults to empty.
2633
2634 2002-11-12 Akim Demaille <akim@epita.fr>
2635
2636 * src/getargs.c (long_options): Remove duplicates.
2637 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2638 Remove.
2639 * doc/bison.rnh: Remove.
2640 * doc/bison.texinfo (VMS Invocation): Remove.
2641
2642 2002-11-12 Akim Demaille <akim@epita.fr>
2643
2644 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2645 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2646
2647 Use struniq for symbols.
2648
2649 * src/symtab.h (symbol_t): The tag member is a struniq.
2650 (symbol_type_set): Adjust.
2651 * src/symtab.c (symbol_new): Takes a struniq.
2652 (symbol_free): Don't free the tag member.
2653 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2654 (hash_compare_symbol, hash_symbol): these.
2655 Use the fact that tags as struniqs.
2656 (symbol_get): Use struniq_new.
2657 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2658 Returns a strniq.
2659 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2660 and type members are struniqs.
2661 * src/reader.c (get_merge_function)
2662 (grammar_current_rule_merge_set): Adjust.
2663 (TYPE, current_type): Are struniq.
2664
2665 Use struniq for file names.
2666
2667 * src/files.h, src/files.c (infile): Split into...
2668 (grammar_file, current_file): these.
2669 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2670 * src/reduce.c (reduce_print): Likewise.
2671 * src/getargs.c (getargs): Likewise.
2672 * src/complain.h, src/complain.c: Likewise.
2673 * src/main.c (main): Call struniqs_new early enough to use it for
2674 file names.
2675 Don't free the input file name.
2676
2677 2002-11-12 Akim Demaille <akim@epita.fr>
2678
2679 * src/symtab.c (symbol_free): Remove dead deactivated code:
2680 type_name are properly removed.
2681 Don't use XFREE to free items that cannot be NULL.
2682 * src/struniq.h, src/struniq.c: New.
2683 * src/main.c (main): Initialize/free struniqs.
2684 * src/parse-gram.y (%union): Add astruniq member.
2685 (yyprint): Adjust.
2686 * src/scan-gram.l (<{tag}>): Return a struniq.
2687 Free the obstack bit that used to store it.
2688 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2689
2690 2002-11-11 Paul Eggert <eggert@twinsun.com>
2691
2692 Revamp to fix many (but not all) of the C- and M4-related quoting
2693 problems. Among other things, this fixes the Bison bug reported
2694 by Jan Hubicka when processing the Bash grammar; see:
2695 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
2696
2697 Use new @ escapes consistently. Represent brackets with @{ and @}
2698 rather than @<:@ and @:>@, since this works a bit better with dumb
2699 editors like vi. Represent @ with @@, since @ is now consistently
2700 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2701 __ofile__, to avoid unexpected expansions. Similarly, use @output
2702 rather than #output.
2703
2704 * data/c.m4 (b4_copyright): Omit file name from comment, since
2705 the file name could contain "*/".
2706 (b4_synclines_flag): Don't quote the 2nd argument; it should already
2707 be quoted. All uses changed.
2708
2709 * data/glr.c: Use new @ escapes consistently.
2710 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
2711 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
2712 Remove, since they couldn't handle arbitrary characters in file
2713 names.
2714 * data/lalr1.cc: Likewise.
2715 * data/yacc.c: Likewise.
2716
2717 * src/files.c (output_infix): Remove; all uses removed.
2718 * src/files.h: Likewise.
2719
2720 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
2721 mishandled funny characters in file names, and anyway it isn't
2722 needed any more.
2723 * data/yacc.c: Likewise.
2724 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
2725
2726 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
2727 * data/yacc.c: Likewise.
2728
2729 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
2730 strings now.
2731 (muscle_init): Quote filename as a C string.
2732 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
2733 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
2734 * src/output.c (escaped_file_name_output): New function.
2735 (prepare_symbols): Quote tokens for M4.
2736 (prepare): Don't insert output_infix, output_prefix,
2737 output_parser_name, output_header_name; this is now down by scan-skel.
2738 Insert skeleton as a C string.
2739
2740 * src/output.c (user_actions_output, symbol_destructors_output,
2741 symbol_printers_output): Quote filenames for C and M4.
2742 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2743
2744 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
2745 escapes other than \\ and \'; this simplifies the code.
2746 (<SC_STRING>): Likewise, for \\ and \".
2747 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
2748 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
2749 Use new escapes @{ and @} for [ and ].
2750
2751 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
2752 them with auto vars.
2753 Switch to new escape scheme, where @ is the escape character uniformly.
2754 Abort if a stray escape character is found. Avoid unbounded input
2755 buffer when parsing non-escaped text.
2756
2757 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
2758 __oline__, #output, $@, and @{ do not have unintended meanings.
2759
2760 2002-11-09 Paul Eggert <eggert@twinsun.com>
2761
2762 Fix the test failure due to GCC warnings described in
2763 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
2764 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
2765 evaluate to 0 if it's impossible for NINF to be in the respective
2766 table.
2767 (yygetLRActions, yyrecoverParseError): Use them.
2768
2769 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
2770 counted in the token inserted at end of file. Now takes
2771 location_t *, not location_t, so that the location can be
2772 adjusted. All uses changed.
2773
2774 * tests/regression.at (Invalid inputs): Adjust wording in
2775 diagnostic to match the new behavior.
2776
2777 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
2778 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
2779 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
2780 abort ();'. This reduces the runtime of the "Many lookaheads"
2781 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
2782 GCC 3.2.
2783
2784 2002-11-07 Paul Eggert <eggert@twinsun.com>
2785
2786 * src/parse-gram.y (CHARACTER): Remove unused token.
2787 All uses removed.
2788
2789 * src/scan-gram.l: Remove stack option. We no longer use the
2790 stack, since the stack was never deeper than 1; instead, use the
2791 new auto var c_context to record the stacked value.
2792
2793 Remove nounput option. At an unexpected end of file, we now unput
2794 the minimal input necessary to end cleanly; this simplifies the
2795 code.
2796
2797 Avoid unbounded token sizes where this is easy.
2798
2799 (unexpected_end_of_file): New function.
2800 Use it to systematize the error message on unexpected EOF.
2801 (last-string): Now auto, not static.
2802 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
2803 (scanner_last_string_free): Remove; not used.
2804 (percent_percent_count): Move decl to just before use.
2805 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
2806 not the (never otherwised-used) CHARACTER.
2807
2808 2002-11-07 Akim Demaille <akim@epita.fr>
2809
2810 Let yyerror always receive the msg as last argument, so that
2811 yyerror can be variadic.
2812
2813 * data/yacc.c (b4_yyerror_args): New.
2814 Use it when calling yyerror.
2815 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
2816 Use it when calling yyerror.
2817 * doc/bison.texinfo (Error Reporting): Adjust.
2818 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
2819 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
2820
2821 2002-11-06 Akim Demaille <akim@epita.fr>
2822
2823 #line should have quoted strings.
2824 Ideally, this should be done by m4_quotearg.
2825
2826 * src/scan-skel.l: Include quotearg.h.
2827 Quote __ofile__.
2828 * src/output.c (symbol_printers_output)
2829 (symbol_destructors_output): Quote the file name.
2830
2831 2002-11-06 Akim Demaille <akim@epita.fr>
2832
2833 * tests/regression.at (Invalid inputs): Adjust to the recent
2834 messages.
2835
2836 2002-11-06 Akim Demaille <akim@epita.fr>
2837
2838 Restore --no-lines.
2839 Reported by Jim Kent.
2840
2841 * data/c.m4 (b4_syncline): New.
2842 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
2843 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
2844 * src/output.c (user_actions_output): Likewise.
2845 (prepare): Define 'b4_synclines_flag'.
2846 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
2847
2848 2002-11-06 Akim Demaille <akim@epita.fr>
2849
2850 * src/main.c (main): Free `infile'.
2851 * src/scan-gram.l (handle_syncline): New.
2852 Recognize `#line'.
2853 * src/output.c (user_actions_output, symbol_destructors_output)
2854 (symbol_printers_output): Use the location's file name, not
2855 infile.
2856 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2857
2858 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2859
2860 * src/tables.c (matching_state): Don't allow states to match if
2861 either has GLR conflict entries.
2862
2863 2002-11-05 Paul Eggert <eggert@twinsun.com>
2864
2865 * src/scan-gram.l: Use more accurate diagnostics, e.g.
2866 "integer out of range" rather than "invalid value".
2867 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
2868 accordingly.
2869
2870 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
2871 Also, remove one static variable in the scanner.
2872
2873 * src/scan-gram.l (braces_level): Now auto, not static.
2874 Initialize to zero if the compiler is being picky.
2875 (INITIAL): Clear braces_level instead of incrementing it.
2876 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
2877 as POSIX 1003.1-2001 requires.
2878 * src/system.h (IF_LINT): New macro, taken from coreutils.
2879 * configure.ac: Define "lint" if --enable-gcc-warnings.
2880
2881 2002-11-05 Akim Demaille <akim@epita.fr>
2882
2883 * src/scan-gram.l: When it starts with `%', complain about the
2884 whole directive, not just that `invalid character: %'.
2885
2886 2002-11-04 Akim Demaille <akim@epita.fr>
2887
2888 * Makefile.maint: Update from Autoconf.
2889 (update, cvs-update, po-update, do-po-update): New.
2890
2891 2002-11-04 Akim Demaille <akim@epita.fr>
2892
2893 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
2894 and yyerror.
2895 Have yyerror `use' its arguments.
2896 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
2897 returns true when location & yacc & pure & parse-param.
2898 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
2899
2900 2002-11-04 Akim Demaille <akim@epita.fr>
2901
2902 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
2903 clashes.
2904 * src/scan-gram.l: Use [\'] instead of ['] to pacify
2905 font-lock-mode.
2906 Use complain_at.
2907 Use quote, not quote_n since LOCATION_PRINT no longer uses the
2908 slot 0.
2909
2910 2002-11-03 Paul Eggert <eggert@twinsun.com>
2911
2912 * src/reader.c (get_merge_function, grammar_current_rule_check):
2913 Use consistent diagnostics for reporting type name clashes.
2914 Quote the types with <>, for consistency with Yacc.
2915 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
2916
2917 2002-11-03 Akim Demaille <akim@epita.fr>
2918
2919 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
2920 New.
2921 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
2922 (b4_parse_param): Remove.
2923 Use b4_identification.
2924 Propagate b4_pure_args where needed to pass them to yyerror.
2925 * data/glr.m4 (b4_parse_param): Remove.
2926 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
2927 (b4_lpure_formals): New.
2928 Use b4_identification.
2929 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
2930 b4_user_formals and b4_user_args.
2931 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
2932 (yyreportAmbiguity): When using a pure parser, also need
2933 the location, and the parse-params.
2934 Adjust callers.
2935 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
2936 When using a pure parser, also need the parse-params.
2937 Adjust callers.
2938 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
2939 (%pure-parser + %parse-param) LALR and GLR parsers.
2940 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
2941 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
2942 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
2943 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
2944 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
2945 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
2946 * doc/bison.texinfo: Untabify the whole file.
2947 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
2948 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
2949 (Error Reporting): Adjust to these new directives.
2950 Document %error-verbose, deprecate YYERROR_VERBOSE.
2951
2952 2002-11-03 Akim Demaille <akim@epita.fr>
2953
2954 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
2955 AT_CHECK_CALC_GLR invocations to use % directives, instead of
2956 command line options.
2957 * tests/cxx-type.at: Formatting changes.
2958
2959 2002-11-03 Paul Eggert <eggert@twinsun.com>
2960
2961 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
2962 to count columns correctly, and to check for invalid inputs.
2963
2964 Use mbsnwidth to count columns correctly. Account for tabs, too.
2965 Include mbswidth.h.
2966 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
2967 (extend_location): New function.
2968 (YY_LINES): Remove.
2969
2970 Handle CRLF in C code rather than in Lex code.
2971 (YY_INPUT): New macro.
2972 (no_cr_read): New function.
2973
2974 Scan UCNs, even though we don't fully handle them yet.
2975 (convert_ucn_to_byte): New function.
2976
2977 Handle backslash-newline correctly in C code.
2978 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
2979 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
2980 all uses changed.
2981 (tag, splice): New EREs. Do not allow NUL or newline in tags.
2982 Use {splice} wherever C allows backslash-newline.
2983 YY_STEP after space, newline, vertical-tab.
2984 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
2985
2986 (letter, id): Don't assume ASCII; e.g., spell out a-z.
2987
2988 ({int}, handle_action_dollar, handle_action_at): Check for integer
2989 overflow.
2990
2991 (YY_STEP): Omit trailing semicolon, so that it's more like C.
2992
2993 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
2994 as well as \000. Check for UCHAR_MAX, not 255.
2995 Allow \x with an arbitrary positive number of digits, as in C.
2996 Check for overflow here.
2997 Allow \? and UCNs, for compatibility with C.
2998
2999 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
3000 with quote slot used by complain_at.
3001
3002 * tests/input.at: Add tests for backslash-newline, m4 quotes
3003 in symbols, long literals, and funny escapes in strings.
3004
3005 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
3006 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
3007 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
3008 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
3009 * m4/mbswidth.m4: New file, from GNU coreutils.
3010
3011 * doc/bison.texinfo (Grammar Outline): Document // comments.
3012 (Symbols): Document that trigraphs have no special meaning in Bison,
3013 nor is backslash-newline allowed.
3014 (Actions): Document that trigraphs have no special meaning.
3015
3016 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
3017 no longer used.
3018
3019 2002-11-02 Paul Eggert <eggert@twinsun.com>
3020
3021 * src/reader.c: Don't include quote.h; not needed.
3022 (get_merge_function): Reword warning to be consistent with
3023 type clash diagnostic in grammar_current_rule_check.
3024
3025 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
3026 bug in trigraph handling.
3027
3028 * src/output.c (prepare_symbols): When printing token names,
3029 escape "[" as "@<:@" and likewise for "]".
3030
3031 * src/system.h (errno): Remove declaration, as we are now
3032 assuming C89 or better, and C89 guarantees errno.
3033
3034 2002-10-30 Paul Eggert <eggert@twinsun.com>
3035
3036 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
3037 Check for close failures.
3038 * src/files.h (xfclose): Return void, not int, since it always
3039 returned zero.
3040 * src/files.c (xfclose): Likewise. Report I/O error if ferror
3041 indicates one.
3042 * src/output.c (output_skeleton): Use xfclose rather than fclose
3043 and ferror. xfclose now checks ferror.
3044
3045 * data/glr.c (YYLEFTMOST_STATE): Remove.
3046 (yyreportTree): Use a stack-based leftmost state. This avoids
3047 our continuing battles with bogus warnings about initializers.
3048
3049 2002-10-30 Akim Demaille <akim@epita.fr>
3050
3051 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
3052 #if.
3053
3054 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3055
3056 * tests/glr-regr1.at: New test for reported regressions.
3057 * tests/testsuite.at: Add glr-regr1.at test.
3058 * tests/Makefile.am: Add glr-regr1.at test.
3059
3060 2002-10-24 Paul Eggert <eggert@twinsun.com>
3061
3062 Version 1.75a.
3063
3064 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
3065 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
3066 we use malloc. Don't assume 'A' through 'Z' are contiguous.
3067 Don't assume strdup exists; POSIX says its an XSI extension.
3068 Check for buffer overflow on input.
3069
3070 2002-10-24 Akim Demaille <akim@epita.fr>
3071
3072 * src/output.c (output_skeleton): Don't disable M4sugar comments
3073 too soon: it results in comments being expanded.
3074 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
3075 first output.
3076
3077 2002-10-24 Akim Demaille <akim@epita.fr>
3078
3079 * data/yacc.c (m4_int_type): New.
3080 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
3081 char' as only yacc.c wants K&R portability.
3082 * data/glr.c (yysigned_char): Remove.
3083 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
3084 Reported by Quoc Peyrot.
3085
3086 2002-10-23 Paul Eggert <eggert@twinsun.com>
3087
3088 * src/main.c (main): With --trace=time, report times even if a
3089 non-fatal error occurs. Formerly, the times were reported in some
3090 such cases but not in others.
3091 * src/reader.c (reader): Just return if a complaint has been issued,
3092 instead of exiting, so that 'main' can report times.
3093
3094 2002-10-22 Akim Demaille <akim@epita.fr>
3095
3096 * src/system.h: Include sys/types.
3097 Reported by Bert Deknuydt.
3098
3099 2002-10-23 Paul Eggert <eggert@twinsun.com>
3100
3101 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
3102 Suggested by Art Haas.
3103
3104 2002-10-22 Paul Eggert <eggert@twinsun.com>
3105
3106 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
3107 decl; not needed any more.
3108 * src/main.c (main): Use return to exit, undoing yesterday's change.
3109 The last OS that we could find where this wouldn't work is
3110 SunOS 3.5, and that's too old to worry about now.
3111
3112 * data/glr.c (struct yyltype): Define members even when not
3113 doing locations. This is more consistent with yacc.c, and it
3114 works around the following bug reports:
3115 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
3116 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
3117
3118 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
3119 @acronym consistently. Standardize on "Yacc" instead of "YACC",
3120 "Algol" instead of "ALGOL". Give a bit more history about BNF.
3121
3122 2002-10-22 Akim Demaille <akim@epita.fr>
3123
3124 * data/README: New.
3125
3126 2002-10-21 Paul Eggert <eggert@twinsun.com>
3127
3128 Be consistent about 'bool'; the old code used an enum in one
3129 module and an int in another, and this violates the C standard.
3130 * m4/stdbool.m4: New file, from coreutils 4.5.3.
3131 * configure.ac (AC_HEADER_STDBOOL): Add.
3132 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
3133 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
3134 * src/symtab.c (hash_compare_symbol_t): Likewise.
3135 * src/system.h (bool, false, true): Use a definition consistent
3136 with ../lib/hash.c. All uses changed.
3137
3138 * src/complain.c (warning_issued): Renamed from warn_message_count,
3139 so that we needn't worry about integer overflow (!).
3140 Now of type bool. All uses changed.
3141 (complaint_issued): Renamed from complain_message_count; likewise.
3142
3143 * src/main.c (main): Use exit to exit with failure.
3144
3145 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
3146 rather than 1 and 0.
3147 * src/main.c (main): Likewise.
3148 * src/getargs.c (getargs): Likewise.
3149 * src/reader.c (reader): Likewise.
3150
3151 * src/getarg.c (getargs): Remove duplicate code for
3152 "Try `bison --help'".
3153
3154 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
3155 What was that "2" for?
3156
3157 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
3158 * src/getargs.c (usage): Likewise.
3159
3160 * src/getargs.c (getargs): When there are too few operands, report
3161 the last one. When there are too many, report the first extra
3162 one. This is how diffutils does it.
3163
3164 2002-10-20 Paul Eggert <eggert@twinsun.com>
3165
3166 Remove K&R vestiges.
3167 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
3168 * src/complain.c (VA_START): Remove. Assume prototypes.
3169 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
3170 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
3171 fatal): Assume prototypes.
3172 * src/complain.h: Assume prototypes.
3173 * src/system.h (PARAMS): Remove.
3174 Include <limits.h> unconditionally, since it's guaranteeed even
3175 for a freestanding C89 compiler.
3176 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
3177 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
3178
3179 2002-10-20 Akim Demaille <akim@epita.fr>
3180
3181 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
3182 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
3183 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
3184 (yyresolveStates, yyresolveAction, yyresolveStack)
3185 (yyprocessOneStack): Use them.
3186 (yy_reduce_print): New.
3187 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
3188
3189 2002-10-20 Akim Demaille <akim@epita.fr>
3190
3191 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
3192 arguments and output `void'.
3193 (b4_c_function): Rename as...
3194 (b4_c_function_def): this.
3195 (b4_c_function_decl, b4_c_ansi_function_def)
3196 (b4_c_ansi_function_decl): New.
3197 Change the interpretation of the arguments: before `int, foo', now
3198 `int foo, foo'.
3199 * data/yacc.c (yyparse): Prototype and define thanks to these.
3200 Adjust b4_c_function_def uses.
3201 * data/glr.c (yyparse): Likewise, but ANSI only.
3202
3203 2002-10-20 Akim Demaille <akim@epita.fr>
3204
3205 * src/output.c (prepare): Move the definition of `tokens_number',
3206 `nterms_number', `undef_token_number', `user_token_number_max'
3207 to...
3208 (prepare_tokens): Here.
3209 (prepare_tokens): Rename as...
3210 (prepare_symbols): this.
3211 (prepare): Move the definition of `rules_number' to...
3212 (prepare_rules): here.
3213 (prepare): Move the definition of `last', `final_state_number',
3214 `states_number' to...
3215 (prepare_states): here.
3216 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
3217
3218 2002-10-20 Akim Demaille <akim@epita.fr>
3219
3220 * src/tables.h, src/tables.c, src/output.c: Comment changes.
3221
3222 2002-10-20 Akim Demaille <akim@epita.fr>
3223
3224 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
3225 * data/c.m4: here.
3226
3227 2002-10-20 Akim Demaille <akim@epita.fr>
3228
3229 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
3230 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
3231 `pair'.
3232 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
3233 `name' to...
3234 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
3235 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
3236 These.
3237
3238 2002-10-19 Paul Eggert <eggert@twinsun.com>
3239
3240 Do not create a temporary file, as that involves security and
3241 cleanup headaches. Instead, use a pair of pipes.
3242 Derived from a suggestion by Florian Krohm.
3243 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
3244 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
3245 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
3246 (BISON_PREREQ_SUBPIPE): Add.
3247 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
3248 Add subpipe.h, subpipe.c.
3249 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
3250 * po/POTFILES.in: Add lib/subpipe.c.
3251 * src/output.c: Include "subpipe.h".
3252 (m4_invoke): Remove decl.
3253 (scan_skel): New decl.
3254 (output_skeleton): Use pipe rather than temporary file for m4 input.
3255 Check that m4sugar.m4 is readable, to avoid deadlock.
3256 Check for pipe I/O error.
3257 * src/scan-skel.l (readpipe): Remove decl.
3258 (scan_skel): New function, to be used in place of m4_invoke.
3259 Read from stream rather than file.
3260
3261 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
3262 float, as this generates a warning on Solaris 8 + GCC 3.2 with
3263 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
3264 this generates a more-accurate value anyway.
3265
3266 * lib/timevar.c (timervar_accumulate): Rename locals to
3267 avoid confusion with similarly-named more-global.
3268 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
3269
3270 * src/output.c (prepare): Use xstrdup to convert char const *
3271 to char *, to avoid GCC warning.
3272
3273 2002-10-19 Akim Demaille <akim@epita.fr>
3274
3275 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
3276 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
3277 Use them to have `calc.y' ready for %pure-parser.
3278 * data/yacc.c (YYLEX): Pass a yylex return type to
3279 b4_c_function_call.
3280
3281 2002-10-19 Akim Demaille <akim@epita.fr>
3282
3283 Prototype support of %lex-param and %parse-param.
3284
3285 * src/parse-gram.y: Add the definition of the %lex-param and
3286 %parse-param tokens, plus their rules.
3287 Drop the `_' version of %glr-parser.
3288 Add the "," token.
3289 * src/scan-gram.l (INITIAL): Scan them.
3290 * src/muscle_tab.c: Comment changes.
3291 (muscle_insert, muscle_find): Rename `pair' as `probe'.
3292 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
3293 (muscle_entry_s): The `value' member is no longer const.
3294 Adjust all dependencies.
3295 * src/muscle_tab.c (muscle_init): Adjust: use
3296 MUSCLE_INSERT_STRING.
3297 Initialize the obstack earlier.
3298 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
3299 (muscle_pair_list_grow): New.
3300 * data/c.m4 (b4_c_function_call, b4_c_args): New.
3301 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
3302 * tests/calc.at: Use %locations, not --locations.
3303 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
3304
3305 2002-10-19 Akim Demaille <akim@epita.fr>
3306
3307 * src/getargs.c (usage): Take status as argument and exit
3308 accordingly.
3309 Report the traditional `Try ... --help' message when status != 0.
3310 (usage, version): Don't take a FILE * as arg, it is pointless.
3311 (getargs): When there is an incorrect number of arguments, make it
3312 an error, and report it GNUlically thanks to `usage ()'.
3313
3314 2002-10-18 Paul Eggert <eggert@twinsun.com>
3315
3316 * data/glr.c (yyreportParseError): Don't assume that sprintf
3317 yields the length of the printed string, as this is not true
3318 on SunOS 4.1.4. Reported by Peter Klein.
3319
3320 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
3321 * tests/conflicts.at (%nonassoc and eof): Likewise.
3322 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
3323
3324 2002-10-17 Akim Demaille <akim@epita.fr>
3325
3326 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
3327 * src/getargs.c (trace_types, trace_args): Adjust.
3328 * src/reader.c (grammar_current_rule_prec_set)
3329 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
3330 Standardize error messages.
3331 And s/@prec/%prec/!
3332 (reader): Use trace_flag to enable scanner/parser debugging,
3333 instead of an adhoc scheme.
3334 * src/scan-gram.l: Remove trailing debugging code.
3335
3336 2002-10-16 Paul Eggert <eggert@twinsun.com>
3337
3338 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
3339 MUSCLE_TAB_H.
3340
3341 * NEWS: Officially drop support for building Bison with K&R C,
3342 since it didn't work anyway and it's not worth worrying about.
3343 * Makefile.maint (wget_files): Remove ansi2knr.c.
3344 (ansi2knr.c-url_prefix): Remove.
3345 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
3346 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3347 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3348
3349 2002-10-15 Paul Eggert <eggert@twinsun.com>
3350
3351 Stop using the "enum_" trick for K&R-style function definitions;
3352 it confused me, and I was the author! Instead, assume that people
3353 who want to use K&R C compilers (when using these modules in GCC,
3354 perhaps?) will run ansi2knr.
3355
3356 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
3357 All uses of "enum_" changed to "enum ".
3358 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3359 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3360
3361 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
3362 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
3363 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
3364 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
3365 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
3366 abitset_not, abitset_ones, abitset_or, abitset_or_and,
3367 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
3368 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
3369 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
3370 Use function prototypes; this removes the need for declaring
3371 static functions simply to provide their prototypes.
3372 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
3373 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
3374 bitset_count_, bitset_create, bitset_dump, bitset_first,
3375 bitset_free, bitset_init, bitset_last, bitset_next,
3376 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
3377 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
3378 bitset_print, bitset_release_memory, bitset_toggle_,
3379 bitset_type_choose, bitset_type_get, bitset_type_name_get,
3380 debug_bitset): Likewise.
3381 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
3382 * lib/bitset_stats.c (bitset_log_histogram_print,
3383 bitset_percent_histogram_print, bitset_stats_and,
3384 bitset_stats_and_cmp, bitset_stats_and_or,
3385 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
3386 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
3387 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
3388 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
3389 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
3390 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
3391 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
3392 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
3393 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
3394 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
3395 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
3396 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
3397 bitset_stats_zero): Likewise.
3398 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3399 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3400 bitsetv_dump, debug_bitsetv): Likewise.
3401 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
3402 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
3403 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
3404 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
3405 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
3406 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
3407 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
3408 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
3409 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
3410 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
3411 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
3412 Likewise.
3413 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
3414 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
3415 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
3416 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
3417 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
3418 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
3419 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
3420 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
3421 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
3422 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
3423 lbitset_xor_cmp, lbitset_zero): Likewise.
3424
3425 2002-10-14 Akim Demaille <akim@epita.fr>
3426
3427 Version 1.75.
3428
3429 2002-10-14 Akim Demaille <akim@epita.fr>
3430
3431 * tests/Makefile.am (maintainer-check-posix): New.
3432
3433 2002-10-14 Akim Demaille <akim@epita.fr>
3434
3435 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
3436 member.
3437
3438 2002-10-14 Akim Demaille <akim@epita.fr>
3439
3440 * src/tables.c (table_ninf_remap): base -> tab.
3441 Reported by Matt Rosing.
3442
3443 2002-10-14 Paul Eggert <eggert@twinsun.com>
3444
3445 * tests/action.at, tests/calc.at, tests/conflicts.at,
3446 tests/cxx-type.at, tests/headers.at, tests/input.at,
3447 tests/regression.at, tests/synclines.at, tests/torture.at:
3448 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
3449 so that the tests still work even if POSIXLY_CORRECT is set.
3450 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
3451
3452 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
3453 for portability to K&R hosts. Fix typo: signed char is guaranteed
3454 only to 127, not to 128.
3455 * data/glr.c (yysigned_char): New type.
3456 * data/yacc.c (yysigned_char): Likewise.
3457 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
3458
3459 2002-10-13 Paul Eggert <eggert@twinsun.com>
3460
3461 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
3462 true due to limited range of data type" warning from GCC.
3463
3464 * data/c.m4 (b4_token_defines): Protect against double-inclusion
3465 by wrapping enum yytokentype's definition inside #ifndef
3466 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
3467
3468 2002-10-13 Akim Demaille <akim@epita.fr>
3469
3470 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
3471 Un yy- yyrhs to avoid the name clash with the global YYRHS.
3472
3473 2002-10-13 Akim Demaille <akim@epita.fr>
3474
3475 * Makefile.maint: Update from Autoconf 2.54.
3476 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
3477
3478 2002-10-13 Akim Demaille <akim@epita.fr>
3479
3480 * src/print.c (print_state): Separate the list of solved conflicts
3481 from the other items.
3482 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
3483
3484 2002-10-13 Akim Demaille <akim@epita.fr>
3485
3486 Let nondeterministic skeletons be usable with deterministic
3487 tables.
3488
3489 With the patch, GAWK compiled by GCC without -O2 passes its test
3490 suite using a GLR parser driven by LALR tables. It fails with -O2
3491 because `struct stat' gives two different answers on my machine:
3492 88 (definition of an auto var) and later 96 (memset on this var).
3493 Hence the stack is badly corrumpted. The headers inclusion is to
3494 blame: if I move the awk.h inclusion before GLR's system header
3495 inclusion, the two struct stat have the same size.
3496
3497 * src/tables.c (pack_table): Always create conflict_table.
3498 (token_actions): Always create conflict_list.
3499 * data/glr.c (YYFLAG): Remove, unused.
3500
3501 2002-10-13 Akim Demaille <akim@epita.fr>
3502
3503 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
3504 (O0FLAGS): New.
3505 (VALGRIND, GXX): New.
3506 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
3507 * tests/bison.in: Run $PREBISON a pre-command.
3508 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
3509 (maintainer-check-g++): New.
3510 * Makefile.am (maintainer-check): New.
3511
3512 2002-10-13 Akim Demaille <akim@epita.fr>
3513
3514 * data/glr.c: Formatting changes.
3515 Tweak some trace messages to match yacc.c's.
3516
3517 2002-10-13 Akim Demaille <akim@epita.fr>
3518
3519 GLR parsers sometimes raise parse errors instead of performing the
3520 default reduction.
3521 Reported by Charles-Henry de Boysson.
3522
3523 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
3524 check the length of the traces when %glr.
3525 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
3526 GLR's traces.
3527 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
3528 Test GLR parsers.
3529 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
3530 (yyltype): Remove the yy prefix from the member names.
3531 (yytable): Complete its comment.
3532 (yygetLRActions): Map error action number from YYTABLE from
3533 YYTABLE_NINF to 0.
3534 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
3535 (which was a bug: it should have been YYTABEL_NINF, and yet it was
3536 not satisfying as we could compare an YYACTION computed from
3537 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
3538 only value for error actions.
3539 (yyreportParseError): In verbose parse error messages, don't issue
3540 `error' in the list of expected tokens.
3541 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
3542 next action to perform to match glr.c's decoding.
3543 (yytable): Complete its comment.
3544
3545 2002-10-13 Paul Eggert <eggert@twinsun.com>
3546
3547 Fix problem reported by Henrik Grubbstroem in
3548 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
3549 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
3550 because the Bison parser reads the second action before reducing
3551 the first one.
3552 * src/scan-gram.l (rule_length): New static var.
3553 Use it to keep track of the rule length in the scanner, since
3554 we can't expect the parser to be in lock-step sync with the scanner.
3555 (handle_action_dollar, handle_action_at): Use this var.
3556 * tests/actions.at (Exotic Dollars): Test for the problem.
3557
3558 2002-10-12 Paul Eggert <eggert@twinsun.com>
3559
3560 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
3561 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
3562 Include <sys/time.h> when checking for clock_t and struct tms.
3563 Use same include order as source.
3564 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
3565 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
3566
3567 * lib/timevar.c: Update copyright date and clarify comments.
3568 (get_time) [IN_GCC]: Keep the GCC version for reference.
3569
3570 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
3571 GCC version as of today, then merge Bison's changes.
3572 Change "GCC" to "Bison" in copyright notice. timevar.def's
3573 author is Akim, so change that too.
3574
3575 * src/reader.c (grammar_current_rule_check):
3576 Don't worry about the default action if $$ is untyped.
3577 Prevents bogus warnings reported by Jim Gifford in
3578 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
3579
3580 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
3581 * data/glr.c, data/lalr1.cc, data/yacc.c:
3582 Output token definitions before the first part of user declarations.
3583 Fixes compatibility problem reported by Jim Gifford for kbd in
3584 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
3585
3586 2002-10-11 Paul Eggert <eggert@twinsun.com>
3587
3588 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
3589 (yyparse): here. This undoes some of the 2002-07-25 change.
3590 Compatibility problem reported by Ralf S. Engelschall with
3591 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
3592
3593 2002-10-11 Akim Demaille <akim@epita.fr>
3594
3595 * tests/regression.at Characters Escapes): New.
3596 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
3597 characters.
3598 Reported by Jan Nieuwenhuizen.
3599
3600 2002-10-11 Akim Demaille <akim@epita.fr>
3601
3602 * po/id.po: New.
3603
3604 2002-10-10 Paul Eggert <eggert@twinsun.com>
3605
3606 Portability fixes for bitsets; this also avoids several GCC
3607 warnings.
3608
3609 * lib/abitset.c: Include <stddef.h>, for offsetof.
3610 * lib/lbitset.c: Likewise.
3611
3612 * lib/abitset.c (abitset_bytes): Return a size that is aligned
3613 properly for vectors of objects. Do not assume that adding a
3614 header size to a multiple of a word size yields a value that is
3615 properly aligned for the whole union.
3616 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3617
3618 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3619 unique names for structures.
3620 * lib/ebitset.c (ebitset_bytes): Likewise.
3621 * lib/lbitset.c (lbitset_bytes): Likewise.
3622
3623 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3624 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3625 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3626 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3627 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3628 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3629 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3630 to improve the type-checking that GCC can do.
3631 * lib/bitset.c (bitset_op4_cmp): Likewise.
3632 * lib/bitset_stats.c (bitset_stats_count,
3633 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3634 bitset_stats_copy, bitset_stats_disjoint_p,
3635 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3636 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3637 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3638 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3639 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3640 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3641 bitset_stats_or_and_cmp): Likewise.
3642 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3643 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3644 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3645 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3646
3647 * lib/abitset.h: Include bitset.h, not bbitset.h.
3648 * lib/ebitset.h: Likewise.
3649 * lib/lbitset.h: Likewise.
3650
3651 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3652 All instances of parameters of type enum bitset_opts are now of
3653 type enum_bitset_opts, to conform to the C Standard, and similarly
3654 for enum_bitset_type.
3655 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3656 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3657
3658 Do not use "struct bitset_struct" to mean different things in
3659 different modules. Not only is this confusing, it violates
3660 the C Standard, which requires that structure types in different
3661 modules must be compatible if one is to be passed to the other.
3662 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3663 All instances of "struct bitset_struct *" replaced with "bitset".
3664 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3665 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3666 struct lbitset_struct, struct bitset_stats_struct): New types.
3667 All uses of struct bitset_struct changed to union bitset_union,
3668 etc.
3669 * lib/abitset.c (struct abitset_struct, abitset,
3670 struct bitset_struct): Remove.
3671 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3672 struct bitset_struct): Remove.
3673 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3674 bitset_struct): Remove.
3675 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3676 Likewise.
3677
3678 Do not call a function of type T using a call that assumes the
3679 function is of a different type U. Standard C requires that a
3680 function must be called with a type that is compatible with its
3681 definition.
3682 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3683 New decls.
3684 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3685 New functions.
3686 * lib/ebitset.c (PFV): Remove.
3687 * lib/lbitset.c (PFV): Likewise.
3688 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3689 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3690 decls.
3691 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3692 (ebitset_vtable): Use them.
3693 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3694 lbitset_xor): New functions.
3695 (lbitset_vtable): Use them.
3696
3697 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3698 Declare.
3699
3700 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3701 GCC warning.
3702 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
3703 Use offsetof, for simplicity.
3704
3705 2002-10-06 Paul Eggert <eggert@twinsun.com>
3706
3707 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
3708 the same width as int. This reapplies a hunk of the 2002-08-12 patch
3709 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
3710 which was inadvertently undone by the 2002-09-30 patch.
3711 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
3712 the same width as int.
3713
3714 2002-10-04 Paul Eggert <eggert@twinsun.com>
3715
3716 Version 1.50.
3717
3718 * configure.ac (AC_INIT), NEWS: Increment version number.
3719
3720 * doc/bison.texinfo: Minor spelling, grammar, and white space
3721 fixes.
3722 (Symbols): Mention that any negative value returned from yylex
3723 signifies end-of-input. Warn about negative chars. Mention
3724 the portable Standard C character set.
3725
3726 The GNU coding standard says CFLAGS and YFLAGS are reserved
3727 for the installer to set.
3728 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
3729 * src/Makefile.am (AM_CFLAGS): Likewise.
3730 (AM_YFLAGS): Renamed from YFLAGS.
3731
3732 Fix some MAX and MIN problems.
3733 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
3734 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
3735 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
3736 * src/reader.c (reader): Use it.
3737
3738 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
3739 POSIX 1003.1-2001 has removed fgrep.
3740
3741 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3742
3743 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
3744 interpreted as signed.
3745 * lib/ebitset.c (ebitset_list): Fix bug.
3746
3747 2002-10-01 Paul Eggert <eggert@twinsun.com>
3748
3749 More fixes for 64-bit hosts and large bitsets.
3750
3751 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
3752 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
3753 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
3754 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
3755 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
3756 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
3757 bitset_count_): Likewise.
3758 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
3759 bitset_first, bitset_last): Likewise.
3760 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
3761 bitset_stats_list_reverse, bitset_stats_size,
3762 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
3763 Likewise.
3764 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3765 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3766 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3767 bitsetv_reflexive_transitive_closure): Likewise.
3768 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
3769 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
3770 Likewise.
3771 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
3772 Likewise.
3773
3774 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
3775 Use size_t, not unsigned int, to count bytes.
3776 * lib/abitset.h (abitset_bytes): Likewise.
3777 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
3778 Likewise.
3779 * lib/bitset.h (bitset_bytes): Likewise.
3780 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
3781 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
3782 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3783 * lib/ebitset.c (ebitset_bytes): Likewise.
3784 * lib/ebitset.h (ebitset_bytes): Likewise.
3785 * lib/lbitset.c (lbitset_bytes): Likewise.
3786 * lib/lbitset.h (lbitset_bytes): Likewise.
3787
3788 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
3789 abitset_subset_p, abitset_disjoint_p, abitset_and,
3790 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
3791 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
3792 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
3793 abitset_or_and, abitset_or_and_cmp):
3794 Use bitset_windex instead of unsigned int.
3795 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3796 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
3797 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
3798 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
3799 Likewise.
3800 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
3801
3802 * lib/bitset.c (bitset_print):
3803 Use proper printf formats for widths of integer types.
3804 * lib/bitset_stats.c (bitset_percent_histogram_print,
3805 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
3806 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3807 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3808 * lib/lbitset.c (lbitset_bytes): Likewise.
3809
3810 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
3811 BITSET_SIZE_MAX): New macros.
3812 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
3813 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
3814 to BITSET_WINDEX_MAX.
3815
3816 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
3817 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
3818 since we now return the bitset_bindex type (not int).
3819
3820 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
3821 when computing sizes.
3822 * lib/ebitset.c (ebitset_elts_grow): Likewise.
3823
3824 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
3825 and avoid cast to unsigned.
3826
3827 2002-09-30 Akim Demaille <akim@epita.fr>
3828
3829 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3830 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
3831 Updates from Michael Hayes.
3832
3833 2002-09-30 Art Haas <ahaas@neosoft.com>
3834
3835 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
3836 invocations.
3837 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
3838 defined.
3839
3840 2002-09-27 Akim Demaille <akim@epita.fr>
3841
3842 Version 1.49c.
3843
3844 2002-09-27 Akim Demaille <akim@epita.fr>
3845
3846 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
3847 (Because of AC_LIBSOURCE).
3848
3849 2002-09-27 Akim Demaille <akim@epita.fr>
3850
3851 Playing with Autoscan.
3852
3853 * configure.ac: Remove the old LIBOBJ tweaks.
3854 (AC_REPLACE_FUNCS): Add strrchr and strtol.
3855 * lib/strrchr.c: New.
3856 * lib/strtol.c: New, from the Coreutils 4.5.1.
3857
3858 2002-09-27 Akim Demaille <akim@epita.fr>
3859
3860 Playing with Autoscan.
3861
3862 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
3863 * lib/Makefile.am (libbison_a_SOURCES): No longer include
3864 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
3865 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
3866 Coreutils 4.5.1.
3867
3868 2002-09-24 Akim Demaille <akim@epita.fr>
3869
3870 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
3871 (Frequently Asked Questions, Parser Stack Overflow): New.
3872
3873 2002-09-13 Akim Demaille <akim@epita.fr>
3874
3875 Playing with autoscan.
3876
3877 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
3878 * src/files.c (skeleton_find): Remove, unused.
3879 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
3880 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
3881
3882 2002-09-13 Akim Demaille <akim@epita.fr>
3883
3884 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
3885 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
3886
3887 2002-09-13 Akim Demaille <akim@epita.fr>
3888
3889 * configure.ac: Require 2.54.
3890 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
3891 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
3892 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
3893 Remove, provided by Autoconf macros.
3894
3895 2002-09-12 Akim Demaille <akim@epita.fr>
3896
3897 * m4/prereq.m4: Update, from Coreutils 4.5.1.
3898
3899 2002-09-12 Akim Demaille <akim@epita.fr>
3900
3901 * m4/prereq.m4: Update, from Fileutils 4.1.5.
3902 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
3903 Reported by Martin Mokrejs.
3904
3905 2002-09-10 Akim Demaille <akim@epita.fr>
3906
3907 * src/parse-gram.y: Associate a human readable string to each
3908 token type.
3909 * tests/regression.at (Invalid inputs): Adjust.
3910
3911 2002-09-10 Gary V. Vaughan <gary@gnu.org>
3912
3913 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
3914 with an Autoconf-2.5x style configure.ac.
3915
3916 2002-09-06 Paul Eggert <eggert@twinsun.com>
3917
3918 * doc/bison.texinfo (Conditions): Make explicit that the GPL
3919 exception applies only to yacc.c. This is a modification of a
3920 patch originally suggested by Akim Demaille.
3921
3922 2002-09-06 Akim Demaille <akim@epita.fr>
3923
3924 * data/c.m4 (b4_copyright): Move the GPL exception comment from
3925 here to...
3926 * data/yacc.c: here.
3927
3928 * data/lalr1.cc (struct yyltype): Don't define it, since we use
3929 LocationType.
3930 (b4_ltype): Default to yy::Location from location.hh.
3931
3932 2002-09-04 Jim Meyering <jim@meyering.net>
3933
3934 * data/yacc.c: Guard the declaration of yytoknum also with
3935 `#ifdef YYPRINT', so it is declared only when used.
3936
3937 2002-09-04 Akim Demaille <akim@epita.fr>
3938
3939 * configure.in: Rename as...
3940 * configure.ac: this.
3941 Bump to 1.49c.
3942
3943 2002-09-04 Akim Demaille <akim@epita.fr>
3944
3945 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
3946 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
3947 translate maintainer only messages.
3948
3949 2002-08-12 Paul Eggert <eggert@twinsun.com>
3950
3951 Version 1.49b.
3952
3953 * Makefile.am (SUBDIRS): Remove intl.
3954 (DISTCLEANFILES): Remove.
3955 * NEWS: Mention that GNU M4 is now required. Clarify what is
3956 meant by "larger grammars". Mention the pt_BR translation.
3957 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
3958 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
3959 Bump version from 0.11.2 to 0.11.5.
3960 (BISON_PREREQ_STAGE): Remove.
3961 (AM_GNU_GETTEXT): Use external gettext.
3962 (AC_OUTPUT): Remove intl/Makefile.
3963
3964 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
3965
3966 * data/glr.c: Include string.h, for strlen.
3967 (yyreportParseError): Use size_t for yysize.
3968 (yy_yypstack): No longer nested inside yypstates, as nested
3969 functions are not portable. Do not assume size_t is the
3970 same width as int.
3971 (yypstates): Do not assume that ptrdiff_t is the same width
3972 as int, and similarly for yyposn and YYINDEX.
3973
3974 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
3975
3976 * lib/Makefile.am (INCLUDES): Do not include from the intl
3977 directory, which has been removed.
3978 * src/Makefile.am (INCLUDES): Likewise.
3979
3980 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
3981 (bitsets_sources, additional_bitsets_sources, timevars_sources):
3982 New vars.
3983
3984 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
3985 * tests/Makefile.am (EXTRA_DIST): Likewise.
3986
3987 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
3988 Do not assume that bitset_windex is the same width as unsigned.
3989
3990 * lib/abitset.c (abitset_unused_clear): Do not assume that
3991 bitset_word is the same width as int.
3992 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
3993 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
3994 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
3995 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
3996 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
3997
3998 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
3999 portability to one's complement hosts!).
4000 * lib/ebitset.c (ebitset_op1): Likewise.
4001 * lib/lbitset.c (lbitset_op1): Likewise.
4002
4003 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
4004 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4005 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
4006 Sync with fileutils.
4007 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
4008 lib/gettext.h: Sync with diffutils.
4009
4010 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
4011 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
4012
4013 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
4014 PROTOTYPES to check for prototypes, and "defined __STDC__" to
4015 check for void *.
4016
4017 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
4018 size_t; the old version tried to do this but casted improperly.
4019 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
4020 (bitset_test): Now returns int, not unsigned long.
4021
4022 * lib/bitset_stats.c: Include "gettext.h".
4023 (_): New macro.
4024 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
4025 name locals "index", as it generates unnecessary warnings on some
4026 hosts that have an "index" function.
4027
4028 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
4029 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
4030 they need translation.
4031 * src/LR0.c (state_list_append, new_itemsets, get_state,
4032 append_states, generate_states): Likewise.
4033 * src/assoc.c (assoc_to_string): Likewise.
4034 * src/closure.c (print_closure, set_firsts, closure): Likewise.
4035 * src/gram.c (grammar_dump): Likewise.
4036 * src/injections.c (injections_compute): Likewise.
4037 * src/lalr.c (lookaheads_print): Likewise.
4038 * src/relation.c (relation_transpose): Likewise.
4039 * src/scan-gram.l: Likewise.
4040 * src/tables.c (table_grow, pack_vector): Likewise.
4041
4042 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
4043 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
4044 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
4045 * m4/mbstate_t.m4: Sync with fileutils.
4046 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
4047
4048 * po/LINGUAS: Add pt_BR.
4049 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
4050 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
4051 lib/timevar.c.
4052 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
4053 manual recommends.
4054 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
4055
4056 * src/complain.c (strerror_r): Remove decl; not needed.
4057 (strerror): Use same pattern as ../lib/error.c.
4058
4059 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
4060
4061 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
4062
4063 * src/main.c (main): Cast result of bindtextdomain and textdomain
4064 to void, to avoid a GCC warning when --disable-nls is in effect.
4065
4066 * src/scan-gram.l: Use strings rather than escapes when possible,
4067 to minimize the number of warnings from xgettext.
4068 (handle_action_dollar, handle_action_at): Don't use isdigit,
4069 as it mishandles negative chars and it may not work as expected
4070 outside the C locale.
4071
4072 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
4073 this is a GCC extension and is not portable to other compilers.
4074
4075 * src/system.h (alloca): Use same pattern as ../lib/error.c.
4076 Do not include <ctype.h>; no longer needed.
4077 Do not include <malloc.h>; no longer needed (and generates
4078 warnings on OpenBSD 3.0).
4079
4080 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
4081 it's not portable.
4082
4083 * tests/regression.at: Do not use 'cc -c input.c -o input';
4084 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
4085
4086 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
4087 exit status as failure, not just exit status 1. Sun C exits
4088 with status 2 sometimes.
4089
4090 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
4091 Use it for the two large tests.
4092
4093 2002-08-02 Akim Demaille <akim@epita.fr>
4094
4095 * src/conflicts.c (conflicts_output): Don't output rules never
4096 reduced here, since anyway that computation doesn't work.
4097 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
4098 (rule_useless_p, rule_never_reduced_p): New.
4099 (grammar_rules_partial_print): Use a filter instead of a range.
4100 Display the title only if needed.
4101 (grammar_rules_print): Adjust.
4102 (grammar_rules_never_reduced_report): New.
4103 * src/tables.c (action_row): Move the computation of rules never
4104 reduced to...
4105 (token_actions): here.
4106 * src/main.c (main): Make the parser before making the report, so
4107 that rules never reduced are computed.
4108 Call grammar_rules_never_reduced_report.
4109 * src/print.c (print_results): Report rules never reduced.
4110 * tests/conflicts.at, tests/reduce.at: Adjust.
4111
4112 2002-08-01 Akim Demaille <akim@epita.fr>
4113
4114 Instead of attaching lookaheads and duplicating the rules being
4115 reduced by a state, attach the lookaheads to the reductions.
4116
4117 * src/state.h (state_t): Remove the `lookaheads',
4118 `lookaheads_rule' member.
4119 (reductions_t): Add a `lookaheads' member.
4120 Use a regular array for the `rules'.
4121 * src/state.c (reductions_new): Initialize the lookaheads member
4122 to 0.
4123 (state_rule_lookaheads_print): Adjust.
4124 * src/state.h, src/state.c (state_reductions_find): New.
4125 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
4126 (count_rr_conflicts): Adjust.
4127 * src/lalr.c (LArule): Remove.
4128 (add_lookback_edge): Adjust.
4129 (state_lookaheads_count): New.
4130 (states_lookaheads_initialize): Merge into...
4131 (initialize_LA): this.
4132 (lalr_free): Adjust.
4133 * src/main.c (main): Don't free nullable and derives too early: it
4134 is used by --verbose.
4135 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
4136
4137 2002-08-01 Akim Demaille <akim@epita.fr>
4138
4139 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
4140 `rule_number_t**'.
4141 (set_derives, free_derives): Rename as...
4142 (derives_compute, derives_free): this.
4143 Adjust all dependencies.
4144 * src/nullable.c (set_nullable, free_nullable): Rename as...
4145 (nullable_compute, nullable_free): these.
4146 (rule_list_t): Store rule_t *, not rule_number_t.
4147 * src/state.c (state_rule_lookaheads_print): Directly compare rule
4148 pointers, instead of their numbers.
4149 * src/main.c (main): Call nullable_free, and derives_free earlier,
4150 as they were lo longer used.
4151
4152 2002-08-01 Akim Demaille <akim@epita.fr>
4153
4154 * lib/timevar.c (get_time): Include children time.
4155 * src/lalr.h (LA, LArule): Don't export them: used with the
4156 state_t.
4157 * src/lalr.c (LA, LArule): Static.
4158 * src/lalr.h, src/lalr.c (lalr_free): New.
4159 * src/main.c (main): Call it.
4160 * src/tables.c (pack_vector): Check whether loc is >= to the
4161 table_size, not >.
4162 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
4163 (tables_generate): do it, since that's also it which allocates
4164 them.
4165 Don't free LA and LArule, main does.
4166
4167 2002-07-31 Akim Demaille <akim@epita.fr>
4168
4169 Separate parser tables computation and output.
4170
4171 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
4172 (conflict_list, conflict_list_cnt, table, check, table_ninf)
4173 (yydefgoto, yydefact, high): Move to...
4174 * src/tables.h, src/tables.c: here.
4175 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4176 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4177 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
4178 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
4179 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
4180 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
4181 (action_row, save_row, token_actions, save_column, default_goto)
4182 (goto_actions, sort_actions, matching_state, pack_vector)
4183 (table_ninf_remap, pack_table, prepare_actions): Move to...
4184 * src/tables.c: here.
4185 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
4186 * src/output.c (token_actions, output_base, output_conflicts)
4187 (output_check): Merge into...
4188 (prepare_actions): this.
4189 (actions_output): Rename as...
4190 (user_actions_output): this.
4191 * src/main.c (main): Call tables_generate and tables_free.
4192
4193 2002-07-31 Akim Demaille <akim@epita.fr>
4194
4195 Steal GCC's --time-report support.
4196
4197 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
4198 stolen/adjusted from GCC.
4199 * m4/stage.m4: Remove time related checks.
4200 * m4/timevar.m4: New.
4201 * configure.in: Adjust.
4202 * src/system.h: Adjust to using timevar.h.
4203 * src/getargs.h, src/getargs.c: Support trace_time for
4204 --trace=time.
4205 * src/main.c (stage): Remove.
4206 (main): Replace `stage' invocations with timevar calls.
4207 * src/output.c: Insert pertinent timevar calls.
4208
4209 2002-07-31 Akim Demaille <akim@epita.fr>
4210
4211 Let --trace have arguments.
4212
4213 * src/getargs.h (enum trace_e): New.
4214 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
4215 (long_options, short_options): --trace/-T takes an optional
4216 argument.
4217 Change all the uses of trace_flag to reflect the new flags.
4218 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
4219
4220 Strengthen `stage' portability.
4221
4222 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
4223 * configure.in: Use it.
4224 Don't check for malloc.h and sys/times.h.
4225 * src/system.h: Include them when appropriate.
4226 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
4227 times and struct tms are available.
4228
4229 2002-07-30 Akim Demaille <akim@epita.fr>
4230
4231 In verbose parse error message, don't report `error' as an
4232 expected token.
4233 * tests/actions.at (Printers and Destructors): Adjust.
4234 * tests/calc.at (Calculator $1): Adjust.
4235 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
4236 error message, do not report the parser accepts the error token in
4237 that state.
4238
4239 2002-07-30 Akim Demaille <akim@epita.fr>
4240
4241 Normalize conflict related messages.
4242
4243 * src/complain.h, src/complain.c (warn, complain): New.
4244 * src/conflicts.c (conflicts_print): Use them.
4245 (conflict_report_yacc): New, extracted from...
4246 (conflicts_print): here.
4247 * tests/conflicts.at, tests/existing.at: Adjust.
4248
4249 2002-07-30 Akim Demaille <akim@epita.fr>
4250
4251 Report rules which are never reduced by the parser: those hidden
4252 by conflicts.
4253
4254 * src/LR0.c (save_reductions): Don't make the final state too
4255 different: save its reduction (accept) instead of having a state
4256 without any action (no shift or goto, no reduce).
4257 Note: the final state is now a ``regular'' state, i.e., the
4258 parsers now contain `reduce 0' as default reduction.
4259 Nevertheless, since they decide to `accept' when yystate =
4260 final_state, they still will not reduce rule 0.
4261 * src/print.c (print_actions, print_reduction): Adjust.
4262 * src/output.c (action_row): Track reduced rules.
4263 (token_actions): Report rules never reduced.
4264 * tests/conflicts.at, tests/regression.at: Adjust.
4265
4266 2002-07-30 Akim Demaille <akim@epita.fr>
4267
4268 `stage' was accidently included in a previous patch.
4269 Initiate its autoconfiscation.
4270
4271 * configure.in: Look for malloc.h and sys/times.h.
4272 * src/main.c (stage): Adjust.
4273 Report only when trace_flag.
4274
4275 2002-07-29 Akim Demaille <akim@epita.fr>
4276
4277 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
4278 state_number_t.
4279 (errs_t): symbol_t*, not symbol_number_t.
4280 (reductions_t): rule_t*, not rule_number_t.
4281 (FOR_EACH_SHIFT): New.
4282 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
4283 * src/print.c, src/print_graph.c: Adjust.
4284
4285 2002-07-29 Akim Demaille <akim@epita.fr>
4286
4287 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
4288
4289 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
4290 (endtoken, accept): these.
4291 * src/reader.c (reader): Set endtoken's default tag to "$end".
4292 Set undeftoken's tag to "$undefined" instead of "$undefined.".
4293 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
4294 Adjust.
4295
4296 2002-07-29 Akim Demaille <akim@epita.fr>
4297
4298 * src/reduce.c (reduce_grammar): When the language is empty,
4299 complain about the start symbol, not the axiom.
4300 Use its location.
4301 * tests/reduce.at (Empty Language): New.
4302
4303 2002-07-26 Akim Demaille <akim@epita.fr>
4304
4305 * src/reader.h, src/reader.c (gram_error): ... can't get
4306 yycontrol without making too strong assumptions on the parser
4307 itself.
4308 * src/output.c (prepare_tokens): Use the real 0th value of
4309 token_translations instead of `0'.
4310 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
4311 visible here.
4312 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
4313 for the time being: %locations ought to provide it to yyerror.
4314
4315 2002-07-25 Akim Demaille <akim@epita.fr>
4316
4317 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
4318 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
4319 * tests/regression.at (Web2c Actions): Adjust.
4320
4321 2002-07-25 Akim Demaille <akim@epita.fr>
4322
4323 Stop storing rules from 1 to nrules + 1.
4324
4325 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
4326 * src/nullable.c, src/output.c, src/print.c, src/reader.c
4327 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
4328 Iterate from 0 to nrules.
4329 Use rule_number_as_item_number and item_number_as_rule_number.
4330 Adjust to `derive' now containing possibly 0.
4331 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
4332 Handle the `- 1' part in rule numbers from/to item numbers.
4333 * src/conflicts.c (log_resolution): Fix the message which reversed
4334 shift and reduce.
4335 * src/output.c (action_row): Initialize default_rule to -1.
4336 (token_actions): Adjust.
4337 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
4338 expected output.
4339 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
4340
4341 2002-07-25 Akim Demaille <akim@epita.fr>
4342
4343 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
4344 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
4345 (b4_c_knr_arg_decl): New.
4346 * data/yacc.c: Use it to define yysymprint, yydestruct, and
4347 yyreport_parse_error.
4348
4349 2002-07-25 Akim Demaille <akim@epita.fr>
4350
4351 * data/yacc.c (yyreport_parse_error): New, extracted from...
4352 (yyparse): here.
4353 (yydestruct, yysymprint): Move above yyparse.
4354 Be K&R compliant.
4355
4356 2002-07-25 Akim Demaille <akim@epita.fr>
4357
4358 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
4359 replace...
4360 (b4_sint_type, b4_uint_type): these.
4361 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
4362 * tests/regression.at (Web2c Actions): Adjust.
4363
4364 2002-07-25 Akim Demaille <akim@epita.fr>
4365
4366 * src/gram.h (TIEM_NUMBER_MAX): New.
4367 (item_number_of_rule_number, rule_number_of_item_number): Rename
4368 as...
4369 (rule_number_as_item_number, item_number_as_rule_number): these.
4370 Adjust dependencies.
4371 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4372 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4373 (symbol_number_to_vector_number): New.
4374 (order): Of vector_number_t* type.
4375 (base_t, BASE_MAX, BASE_MIN): New.
4376 (froms, tos, width, pos, check): Of base_t type.
4377 (action_number_t, ACTION_MIN, ACTION_MAX): New.
4378 (actrow): Of action_number_t type.
4379 (conflrow): Of unsigned int type.
4380 (table_ninf, base_ninf): New.
4381 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
4382 (muscle_insert_int_table, muscle_insert_base_table)
4383 (muscle_insert_rule_number_table): New.
4384 (prepare_tokens): Output `toknum' as int_table.
4385 (action_row): Returns a rule_number_t.
4386 Use ACTION_MIN, not SHRT_MIN.
4387 (token_actions): yydefact is rule_number_t*.
4388 (table_ninf_remap): New.
4389 (pack_table): Use it for `base' and `table'.
4390 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
4391 replaced with...
4392 (YYPACT_NINF, YYTABLE_NINF): these.
4393 (yypact, yytable): Compute their types instead of hard-coded
4394 `short'.
4395 * tests/regression.at (Web2c Actions): Adjust.
4396
4397 2002-07-19 Akim Demaille <akim@epita.fr>
4398
4399 * src/scan-gram.l (id): Can start with an underscore.
4400
4401 2002-07-16 Akim Demaille <akim@epita.fr>
4402
4403 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
4404 Adjust all former `associativity' dependencies.
4405 * src/symtab.c (symbol_new): Default associativity is `undef', not
4406 `right'.
4407 (symbol_check_alias_consistence): Adjust.
4408
4409 2002-07-09 Akim Demaille <akim@epita.fr>
4410
4411 * doc/bison.texinfo: Properly set the ``header'' part.
4412 Use @dircategory ``GNU programming tools'' as per Texinfo's
4413 documentation.
4414 Use @copying.
4415
4416 2002-07-09 Akim Demaille <akim@epita.fr>
4417
4418 * lib/quotearg.h: Protect against multiple inclusions.
4419 * src/location.h (location_t): Add a `file' member.
4420 (LOCATION_RESET, LOCATION_PRINT): Adjust.
4421 * src/complain.c (warn_at, complain_at, fatal_at): Drop
4422 `error_one_per_line' support.
4423
4424 2002-07-09 Akim Demaille <akim@epita.fr>
4425
4426 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
4427 * src/reader.c (lineno): Remove.
4428 Adjust all dependencies.
4429 (get_merge_function): Take a location and use complain_at.
4430 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
4431 * tests/regression.at (Invalid inputs, Mixing %token styles):
4432 Adjust.
4433
4434 2002-07-09 Akim Demaille <akim@epita.fr>
4435
4436 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
4437 recovery rule, and forbid extensions when --yacc.
4438 (gram_error): Use complain_at.
4439 * src/reader.c (reader): Exit if there were parse errors.
4440
4441 2002-07-09 Akim Demaille <akim@epita.fr>
4442
4443 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
4444 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
4445 Reported by R Blake <blakers@mac.com>.
4446
4447 2002-07-09 Akim Demaille <akim@epita.fr>
4448
4449 * data/yacc.c: Output the copyright notive in the header.
4450
4451 2002-07-03 Akim Demaille <akim@epita.fr>
4452
4453 * src/output.c (froms, tos): Are state_number_t.
4454 (save_column): sp, sp1, and sp2 are state_number_t.
4455 (prepare): Rename `final' as `final_state_number', `nnts' as
4456 `nterms_number', `nrules' as `rules_number', `nstates' as
4457 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
4458 unused.
4459 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
4460 * data/lalr1.cc (nsym_): Remove, unused.
4461
4462 2002-07-03 Akim Demaille <akim@epita.fr>
4463
4464 * src/lalr.h, src/lalr.c (goto_number_t): New.
4465 * src/lalr.c (goto_list_t): New.
4466 Propagate them.
4467 * src/nullable.c (rule_list_t): New.
4468 Propagate.
4469 * src/types.h: Remove.
4470
4471 2002-07-03 Akim Demaille <akim@epita.fr>
4472
4473 * src/closure.c (print_fderives): Use rule_rhs_print.
4474 * src/derives.c (print_derives): Use rule_rhs_print.
4475 (rule_list_t): New, replaces `shorts'.
4476 (set_derives): Add comments.
4477 * tests/sets.at (Nullable, Firsts): Adjust.
4478
4479 2002-07-03 Akim Demaille <akim@epita.fr>
4480
4481 * src/output.c (prepare_actions): Free `tally' and `width'.
4482 (prepare_actions): Allocate and free `order'.
4483 * src/symtab.c (symbols_free): Free `symbols'.
4484 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
4485 * src/output.c (m4_invoke): Move to...
4486 * src/scan-skel.l: here.
4487 (<<EOF>>): Close yyout, and free its name.
4488
4489 2002-07-03 Akim Demaille <akim@epita.fr>
4490
4491 Fix some memory leaks, and fix a bug: state 0 was examined twice.
4492
4493 * src/LR0.c (new_state): Merge into...
4494 (state_list_append): this.
4495 (new_states): Merge into...
4496 (generate_states): here.
4497 (set_states): Don't ensure a proper `errs' state member here, do it...
4498 * src/conflicts.c (conflicts_solve): here.
4499 * src/state.h, src/state.c: Comment changes.
4500 (state_t): Rename member `shifts' as `transitions'.
4501 Adjust all dependencies.
4502 (errs_new): For consistency, also take the values as argument.
4503 (errs_dup): Remove.
4504 (state_errs_set): New.
4505 (state_reductions_set, state_transitions_set): Assert that no
4506 previous value was assigned.
4507 (state_free): New.
4508 (states_free): Use it.
4509 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
4510 temporary storage: use `errs' and `nerrs' as elsewhere.
4511 (set_conflicts): Allocate and free this `errs'.
4512
4513 2002-07-02 Akim Demaille <akim@epita.fr>
4514
4515 * lib/libiberty.h: New.
4516 * lib: Update the bitset implementation from upstream.
4517 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
4518 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
4519 * src/main.c: Adjust bitset stats calls.
4520
4521 2002-07-01 Paul Eggert <eggert@twinsun.com>
4522
4523 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
4524 char, so that negative chars don't collide with $.
4525
4526 2002-06-30 Akim Demaille <akim@epita.fr>
4527
4528 Have the GLR tests be `warning' checked, and fix the warnings.
4529
4530 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
4531 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
4532 (yyremoveDeletes): `yyi' and `yyj' are size_t.
4533 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
4534 (yyaddDeferredAction): static.
4535 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
4536 (yyreportParseError): yyprefix is const.
4537 yytokenp is used only when verbose.
4538 (yy__GNUC__): Replace with __GNUC__.
4539 (yypdumpstack): yyi is size_t.
4540 (yypreference): Un-yy local variables and arguments, to avoid
4541 clashes with `yyr1'. Anyway, we are not in the user name space.
4542 (yytname_size): be an int, as is compared with ints.
4543 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
4544 Use them.
4545 * tests/cxx-gram.at: Use quotation to protect $1.
4546 Use AT_COMPILE to enable warnings hunts.
4547 Prototype yylex and yyerror.
4548 `Use' argc.
4549 Include `string.h', not `strings.h'.
4550 Produce and prototype stmtMerge only when used.
4551 yylex takes a location.
4552
4553 2002-06-30 Akim Demaille <akim@epita.fr>
4554
4555 We spend a lot of time in quotearg, in particular when --verbose.
4556
4557 * src/symtab.c (symbol_get): Store a quoted version of the key.
4558 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
4559 Adjust all callers.
4560
4561 2002-06-30 Akim Demaille <akim@epita.fr>
4562
4563 * src/state.h (reductions_t): Rename member `nreds' as num.
4564 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
4565 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
4566
4567 2002-06-30 Akim Demaille <akim@epita.fr>
4568
4569 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
4570 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
4571 (shifts_to): Rename as...
4572 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
4573 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
4574 (TRANSITION_IS_DISABLED, transitions_to): these.
4575
4576 2002-06-30 Akim Demaille <akim@epita.fr>
4577
4578 * src/print.c (print_shifts, print_gotos): Merge into...
4579 (print_transitions): this.
4580 (print_transitions, print_errs, print_reductions): Align the
4581 lookaheads columns.
4582 (print_core, print_transitions, print_errs, print_state,
4583 print_grammar): Output empty lines separator before, not after.
4584 (state_default_rule_compute): Rename as...
4585 (state_default_rule): this.
4586 * tests/conflicts.at (Defaulted Conflicted Reduction),
4587 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
4588 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
4589
4590 2002-06-30 Akim Demaille <akim@epita.fr>
4591
4592 Display items as we display rules.
4593
4594 * src/gram.h, src/gram.c (rule_lhs_print): New.
4595 * src/gram.c (grammar_rules_partial_print): Use it.
4596 * src/print.c (print_core): Likewise.
4597 * tests/conflicts.at (Defaulted Conflicted Reduction),
4598 (Unresolved SR Conflicts): Adjust.
4599 (Unresolved SR Conflicts): Adjust and rename as...
4600 (Resolved SR Conflicts): this, as was meant.
4601 * tests/regression.at (Web2c Report): Adjust.
4602
4603 2002-06-30 Akim Demaille <akim@epita.fr>
4604
4605 * src/print.c (state_default_rule_compute): New, extracted from...
4606 (print_reductions): here.
4607 Pessimize, but clarify the code.
4608 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
4609
4610 2002-06-30 Akim Demaille <akim@epita.fr>
4611
4612 * src/output.c (action_row): Let default_rule be always a rule
4613 number.
4614
4615 2002-06-30 Akim Demaille <akim@epita.fr>
4616
4617 * src/closure.c (print_firsts, print_fderives, closure):
4618 Use BITSET_EXECUTE.
4619 * src/lalr.c (lookaheads_print): Likewise.
4620 * src/state.c (state_rule_lookaheads_print): Likewise.
4621 * src/print_graph.c (print_core): Likewise.
4622 * src/print.c (print_reductions): Likewise.
4623 * src/output.c (action_row): Likewise.
4624 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4625
4626 2002-06-30 Akim Demaille <akim@epita.fr>
4627
4628 * src/print_graph.c: Use report_flag.
4629
4630 2002-06-30 Akim Demaille <akim@epita.fr>
4631
4632 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4633 to...
4634 * src/relation.h, src/relation.c (traverse, relation_digraph)
4635 (relation_print, relation_transpose): New.
4636
4637 2002-06-30 Akim Demaille <akim@epita.fr>
4638
4639 * src/state.h, src/state.c (shifts_to): New.
4640 * src/lalr.c (build_relations): Use it.
4641
4642 2002-06-30 Akim Demaille <akim@epita.fr>
4643
4644 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4645 (item_number_of_rule_number, rule_number_of_item_number): New.
4646 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4647 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4648 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4649 Propagate their use.
4650 Much remains to be done, in particular wrt `shorts' from types.h.
4651
4652 2002-06-30 Akim Demaille <akim@epita.fr>
4653
4654 * src/symtab.c (symbol_new): Initialize the `printer' member.
4655
4656 2002-06-30 Akim Demaille <akim@epita.fr>
4657
4658 * src/LR0.c (save_reductions): Remove, replaced by...
4659 * src/state.h, src/state.c (state_reductions_set): New.
4660 (reductions, errs): Rename as...
4661 (reductions_t, errs_t): these.
4662 Adjust all dependencies.
4663
4664 2002-06-30 Akim Demaille <akim@epita.fr>
4665
4666 * src/LR0.c (state_list_t, state_list_append): New.
4667 (first_state, last_state): Now symbol_list_t.
4668 (this_state): Remove.
4669 (new_itemsets, append_states, save_reductions): Take a state_t as
4670 argument.
4671 (set_states, generate_states): Adjust.
4672 (save_shifts): Remove, replaced by...
4673 * src/state.h, src/state.c (state_shifts_set): New.
4674 (shifts): Rename as...
4675 (shifts_t): this.
4676 Adjust all dependencies.
4677 * src/state.h (state_t): Remove the `next' member.
4678
4679 2002-06-30 Akim Demaille <akim@epita.fr>
4680
4681 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4682 escaped in slot 0.
4683
4684 2002-06-30 Akim Demaille <akim@epita.fr>
4685
4686 Use hash.h for the state hash table.
4687
4688 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4689 (allocate_storage): Use state_hash_new.
4690 (free_storage): Use state_hash_free.
4691 (new_state, get_state): Adjust.
4692 * src/lalr.h, src/lalr.c (states): Move to...
4693 * src/states.h (state_t): Remove the `link' member, no longer
4694 used.
4695 * src/states.h, src/states.c: here.
4696 (state_hash_new, state_hash_free, state_hash_lookup)
4697 (state_hash_insert, states_free): New.
4698 * src/states.c (state_table, state_compare, state_hash): New.
4699 * src/output.c (output_actions): Do not free states now, since we
4700 still need to know the final_state number in `prepare', called
4701 afterwards. Do it...
4702 * src/main.c (main): here: call states_free after `output'.
4703
4704 2002-06-30 Akim Demaille <akim@epita.fr>
4705
4706 * src/state.h, src/state.c (state_new): New, extracted from...
4707 * src/LR0.c (new_state): here.
4708 * src/state.h (STATE_ALLOC): Move to...
4709 * src/state.c: here.
4710 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
4711 * src/state.h, src/state.c: here.
4712
4713 2002-06-30 Akim Demaille <akim@epita.fr>
4714
4715 * src/reader.c (gensym): Rename as...
4716 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
4717 (getsym): Rename as...
4718 (symbol_get): this.
4719
4720 2002-06-30 Akim Demaille <akim@epita.fr>
4721
4722 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
4723 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
4724 * src/output.c, src/print.c, src/print_graph.c: Propagate.
4725 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
4726
4727 2002-06-30 Akim Demaille <akim@epita.fr>
4728
4729 Make the test suite pass with warnings checked.
4730
4731 * tests/actions.at (Printers and Destructors): Improve.
4732 Avoid unsigned vs. signed issues.
4733 * tests/calc.at: Don't exercise the scanner here, do it...
4734 * tests/input.at (Torturing the Scanner): here.
4735
4736 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4737
4738 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
4739 reorganize first lines parallel to yacc.c.
4740
4741 2002-06-28 Akim Demaille <akim@epita.fr>
4742
4743 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
4744 (b4_token_enum, b4_token_defines): New, factored from...
4745 * data/lalr1.cc, data/yacc.c, glr.c: here.
4746
4747 2002-06-28 Akim Demaille <akim@epita.fr>
4748
4749 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
4750 unused variables.
4751 * src/output.c (merger_output): static.
4752
4753 2002-06-28 Akim Demaille <akim@epita.fr>
4754
4755 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
4756 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
4757 pacify GCC.
4758 * src/output.c (save_row): Initialize all the variables to pacify GCC.
4759
4760 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4761
4762 Accumulated changelog for new GLR parsing features.
4763
4764 * src/conflicts.c (count_total_conflicts): Change name to
4765 conflicts_total_count.
4766 * src/conflicts.h: Ditto.
4767 * src/output.c (token_actions): Use the new name.
4768 (output_conflicts): Change conflp => conflict_list_heads, and
4769 confl => conflict_list for better readability.
4770 * data/glr.c: Use the new names.
4771 * NEWS: Add self to GLR announcement.
4772
4773 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
4774
4775 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
4776 Akim Demaille.
4777
4778 * data/bison.glr: Change name to glr.c
4779 * data/glr.c: Renamed from bison.glr.
4780 * data/Makefile.am: Add glr.c
4781
4782 * src/getargs.c:
4783
4784 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
4785 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
4786
4787 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4788
4789 * data/bison.glr: Be sure to restore the
4790 current #line when returning to the skeleton contents after having
4791 exposed the input file's #line.
4792
4793 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4794
4795 * data/bison.glr: Bring up to date with changes to bison.simple.
4796
4797 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4798
4799 * data/bison.glr: Correct definitions that use b4_prefix.
4800 Various reformatting.
4801 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
4802 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
4803 yytokenp argument; now part of stack.
4804 (yychar): Define to behave as documented.
4805 (yyclearin): Ditto.
4806
4807 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4808
4809 * src/reader.h: Add declaration for free_merger_functions.
4810
4811 * src/reader.c (merge_functions): New variable.
4812 (get_merge_function): New function.
4813 (free_merger_functions): New function.
4814 (readgram): Check for %prec that is not followed by a symbol.
4815 Handle %dprec and %merge declarations.
4816 (packgram): Initialize dprec and merger fields in rules array.
4817
4818 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
4819 conflict_list_cnt, conflict_list_free): New variables.
4820 (table_grow): Also grow conflict_table.
4821 (prepare_rules): Output dprec and merger tables.
4822 (conflict_row): New function.
4823 (action_row): Output conflict lists for GLR parser. Don't use
4824 default reduction in conflicted states for GLR parser so that there
4825 are spaces for the conflict lists.
4826 (save_row): Also save conflict information.
4827 (token_actions): Allocate conflict list.
4828 (merger_output): New function.
4829 (pack_vector): Pack conflict table, too.
4830 (output_conflicts): New function to output yyconflp and yyconfl.
4831 (output_check): Allocate conflict_tos.
4832 (output_actions): Output conflict tables, also.
4833 (output_skeleton): Output b4_mergers definition.
4834 (prepare): Output b4_max_rhs_length definition.
4835 Use 'bison.glr' as default skeleton for GLR parsers.
4836
4837 * src/gram.c (glr_parser): New flag.
4838 (grammar_free): Call free_merger_functions.
4839
4840 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
4841 all pairs of conflicting reductions, rather than just all tokens
4842 causing conflicts. Needed to size conflict tables.
4843 (conflicts_output): Modify call to count_rr_conflicts for new
4844 interface.
4845 (conflicts_print): Ditto.
4846 (count_total_conflicts): New function.
4847
4848 * src/reader.h (merger_list): New type.
4849 (merge_functions): New variable.
4850
4851 * src/lex.h (tok_dprec, tok_merge): New token types.
4852
4853 * src/gram.h (rule_s): Add dprec and merger fields.
4854 (glr_parser): New flag.
4855
4856 * src/conflicts.h (count_total_conflicts): New function.
4857
4858 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
4859
4860 * doc/bison.texinfo (Generalized LR Parsing): New section.
4861 (GLR Parsers): New section.
4862 (Language and Grammar): Mention GLR parsing.
4863 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
4864 Correct typo ("tge" -> "the").
4865
4866 * data/bison.glr: New skeleton for GLR parsing.
4867
4868 * tests/cxx-gram.at: New tests for GLR parsing.
4869
4870 * tests/testsuite.at: Include cxx-gram.at.
4871
4872 * tests/Makefile.am: Add cxx-gram.at.
4873
4874 * src/parse-gram.y:
4875
4876 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
4877
4878 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
4879
4880 2002-06-27 Akim Demaille <akim@epita.fr>
4881
4882 * src/options.h, src/options.c: Remove.
4883 * src/getargs.c (short_options, long_options): New.
4884
4885 2002-06-27 Akim Demaille <akim@epita.fr>
4886
4887 * data/bison.simple, data/bison.c++: Rename as...
4888 * data/yacc.c, data/lalr1.cc: these.
4889 * doc/bison.texinfo (Environment Variables): Remove.
4890
4891 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
4892
4893 * src/getargs.c (report_argmatch): Initialize strtok().
4894
4895 2002-06-20 Akim Demaille <akim@epita.fr>
4896
4897 * data/bison.simple (b4_symbol_actions): New, replaces...
4898 (b4_symbol_destructor, b4_symbol_printer): these.
4899 (yysymprint): Be sure to call YYPRINT only for tokens, and using
4900 user token numbers.
4901
4902 2002-06-20 Akim Demaille <akim@epita.fr>
4903
4904 * data/bison.simple (yydestructor): Rename as...
4905 (yydestruct): this.
4906
4907 2002-06-20 Akim Demaille <akim@epita.fr>
4908
4909 * src/symtab.h, src/symtab.c (symbol_type_set)
4910 (symbol_destructor_set, symbol_precedence_set): The location is
4911 the last argument.
4912 Adjust all callers.
4913
4914 2002-06-20 Akim Demaille <akim@epita.fr>
4915
4916 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
4917 internals.
4918 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
4919 Takes a location.
4920 * src/symtab.h, src/symtab.c (symbol_class_set)
4921 (symbol_user_token_number_set): Likewise.
4922 Adjust all callers.
4923 Promote complain_at.
4924 * tests/input.at (Type Clashes): Adjust.
4925
4926 2002-06-20 Akim Demaille <akim@epita.fr>
4927
4928 * data/bison.simple (YYLEX): Fix the declaration when
4929 %pure-parser.
4930
4931 2002-06-20 Akim Demaille <akim@epita.fr>
4932
4933 * data/bison.simple (yysymprint): Don't print the token number,
4934 just its name.
4935 * tests/actions.at (Destructors): Rename as...
4936 (Printers and Destructors): this.
4937 Also exercise %printer.
4938
4939 2002-06-20 Akim Demaille <akim@epita.fr>
4940
4941 * data/bison.simple (YYDSYMPRINT): New.
4942 Use it to remove many of the #if YYDEBUG/if (yydebug).
4943
4944 2002-06-20 Akim Demaille <akim@epita.fr>
4945
4946 * src/symtab.h, src/symtab.c (symbol_t): printer and
4947 printer_location are new members.
4948 (symbol_printer_set): New.
4949 * src/parse-gram.y (PERCENT_PRINTER): New token.
4950 Handle its associated rule.
4951 * src/scan-gram.l: Adjust.
4952 (handle_destructor_at, handle_destructor_dollar): Rename as...
4953 (handle_symbol_code_at, handle_symbol_code_dollar): these.
4954 * src/output.c (symbol_printers_output): New.
4955 (output_skeleton): Call it.
4956 * data/bison.simple (yysymprint): New. Cannot be named yyprint
4957 since there are already many grammar files with a user `yyprint'.
4958 Replace the calls to YYPRINT to calls to yysymprint.
4959 * tests/calc.at: Adjust.
4960 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
4961 taking advantage of parser very internal details (stack size!).
4962
4963 2002-06-20 Akim Demaille <akim@epita.fr>
4964
4965 * src/scan-gram.l: Complete the scanner with the missing patterns
4966 to pacify Flex.
4967 Use `quote' and `symbol_tag_get' where appropriate.
4968
4969 2002-06-19 Akim Demaille <akim@epita.fr>
4970
4971 * tests/actions.at (Destructors): Augment to test locations.
4972 * data/bison.simple (yydestructor): Pass it the current location
4973 if locations are enabled.
4974 Prototype only when __STDC__ or C++.
4975 Change the argument names to move into the yy name space: there is
4976 user code here.
4977
4978 2002-06-19 Akim Demaille <akim@epita.fr>
4979
4980 * data/bison.simple (b4_pure_if): New.
4981 Use it instead of #ifdef YYPURE.
4982
4983 2002-06-19 Akim Demaille <akim@epita.fr>
4984
4985 * data/bison.simple (b4_location_if): New.
4986 Use it instead of #ifdef YYLSP_NEEDED.
4987
4988 2002-06-19 Akim Demaille <akim@epita.fr>
4989
4990 Prepare @$ in %destructor, but currently don't bind it in the
4991 skeleton, as %location use is not cleaned up yet.
4992
4993 * src/scan-gram.l (handle_dollar, handle_destructor_at)
4994 (handle_action_at): New.
4995 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
4996 a braced_code_t and a location as additional arguments.
4997 (handle_destructor_dollar): Instead of requiring `b4_eval', just
4998 unquote one when outputting `b4_dollar_dollar'.
4999 Adjust callers.
5000 * data/bison.simple (b4_eval): Remove.
5001 (b4_symbol_destructor): Adjust.
5002 * tests/input.at (Invalid @n): Adjust.
5003
5004 2002-06-19 Zack Weinberg <zack@codesourcery.com>
5005
5006 * doc/bison.texinfo: Document ability to have multiple
5007 prologue sections.
5008
5009 2002-06-18 Akim Demaille <akim@epita.fr>
5010
5011 * src/files.c (compute_base_names): When computing the output file
5012 names from the input file name, strip the directory part.
5013
5014 2002-06-18 Akim Demaille <akim@epita.fr>
5015
5016 * data/bison.simple.new: Comment changes.
5017 Reported by Andreas Schwab.
5018
5019 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
5020
5021 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
5022 there are no `label `yyoverflowlab' defined but not used' warnings
5023 when yyoverflow is defined.
5024
5025 2002-06-18 Akim Demaille <akim@epita.fr>
5026
5027 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
5028 new member.
5029 (symbol_destructor_set): Adjust.
5030 * src/output.c (symbol_destructors_output): Output the destructor
5031 locations.
5032 Output the symbol name.
5033 * data/bison.simple (b4_symbol_destructor): Adjust.
5034
5035 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
5036 and Akim Demaille <akim@epita.fr>
5037
5038 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
5039 what's left on the stack when the error recovery hits EOF.
5040 * tests/actions.at (Destructors): Complete to exercise this case.
5041
5042 2002-06-17 Akim Demaille <akim@epita.fr>
5043
5044 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
5045 arguments is really empty, not only equal to `[]'.
5046 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
5047 member.
5048 (symbol_destructor_set): New.
5049 * src/output.c (symbol_destructors_output): New.
5050 * src/reader.h (brace_code_t, current_braced_code): New.
5051 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
5052 (handle_dollar): Rename as...
5053 (handle_action_dollar): this.
5054 (handle_destructor_dollar): New.
5055 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
5056 (grammar_declaration): Use it.
5057 * data/bison.simple (yystos): Is always defined.
5058 (yydestructor): New.
5059 * tests/actions.at (Destructors): New.
5060 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
5061
5062 2002-06-17 Akim Demaille <akim@epita.fr>
5063
5064 * src/symlist.h, src/symlist.c (symbol_list_length): New.
5065 * src/scan-gram.l (handle_dollar, handle_at): Compute the
5066 rule_length only when needed.
5067 * src/output.c (actions_output, token_definitions_output): Output
5068 the full M4 block.
5069 * src/symtab.c: Don't access directly to the symbol tag, use
5070 symbol_tag_get.
5071 * src/parse-gram.y: Use symbol_list_free.
5072
5073 2002-06-17 Akim Demaille <akim@epita.fr>
5074
5075 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
5076 (symbol_list_prepend, get_type_name): Move to...
5077 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
5078 (symbol_list_prepend, symbol_list_n_type_name_get): here.
5079 Adjust all callers.
5080 (symbol_list_free): New.
5081 * src/scan-gram.l (handle_dollar): Takes a location.
5082 * tests/input.at (Invalid $n): Adjust.
5083
5084 2002-06-17 Akim Demaille <akim@epita.fr>
5085
5086 * src/reader.h, src/reader.c (symbol_list_new): Export it.
5087 (symbol_list_prepend): New.
5088 * src/parse-gram.y (%union): `list' is a new member.
5089 (symbols.1): New, replaces...
5090 (terms_to_prec.1, nterms_to_type.1): these.
5091 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
5092 Take a location as additional argument.
5093 Adjust all callers.
5094
5095 2002-06-15 Akim Demaille <akim@epita.fr>
5096
5097 * src/parse-gram.y: Move %token in the declaration section so that
5098 we don't depend upon CVS Bison.
5099
5100 2002-06-15 Akim Demaille <akim@epita.fr>
5101
5102 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
5103 * src/print.c (print_core): Use it.
5104
5105 2002-06-15 Akim Demaille <akim@epita.fr>
5106
5107 * src/conflicts.c (log_resolution): Accept the rule involved in
5108 the sr conflicts instead of the lookahead number that points to
5109 that rule.
5110 (flush_reduce): Accept the current lookahead vector as argument,
5111 instead of the index in LA.
5112 (resolve_sr_conflict): Accept the current number of lookahead
5113 bitset to consider for the STATE, instead of the index in LA.
5114 (set_conflicts): Adjust.
5115 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
5116
5117 2002-06-15 Akim Demaille <akim@epita.fr>
5118
5119 * src/state.h (state_t): Replace the `lookaheadsp' member, a
5120 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
5121 Adjust all dependencies.
5122 * src/lalr.c (initialize_lookaheads): Split into...
5123 (states_lookaheads_count, states_lookaheads_initialize): these.
5124 (lalr): Adjust.
5125
5126 2002-06-15 Akim Demaille <akim@epita.fr>
5127
5128 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
5129 out of...
5130 (grammar_rules_print): here.
5131 * src/reduce.c (reduce_output): Use it.
5132 * tests/reduce.at (Useless Rules, Reduced Automaton)
5133 (Underivable Rules): Adjust.
5134
5135 2002-06-15 Akim Demaille <akim@epita.fr>
5136
5137 Copy BYacc's nice way to report the grammar.
5138
5139 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
5140 New.
5141 Don't print the rules' location, it is confusing and useless.
5142 (rule_print): Use grammar_rhs_print.
5143 * src/print.c (print_grammar): Use grammar_rules_print.
5144
5145 2002-06-15 Akim Demaille <akim@epita.fr>
5146
5147 Complete and rationalize `useless thing' warnings.
5148
5149 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
5150 (symbol_tag_print): New.
5151 Use them everywhere in place of accessing directly the tag member.
5152 * src/gram.h, src/gram.c (rule_print): New.
5153 Use it where a rule used to be printed `by hand'.
5154 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
5155 (reduce_grammar_tables): Report the useless rules.
5156 (reduce_print): Useless things are a warning, not an error.
5157 Report it as such.
5158 * tests/reduce.at (Useless Nonterminals, Useless Rules):
5159 (Reduced Automaton, Underivable Rules): Adjust.
5160 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
5161 * tests/conflicts.at (Unresolved SR Conflicts)
5162 (Solved SR Conflicts): Adjust.
5163
5164 2002-06-15 Akim Demaille <akim@epita.fr>
5165
5166 Let symbols have a location.
5167
5168 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
5169 (getsym): Adjust.
5170 Adjust all callers.
5171 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
5172 Use location_t, not int.
5173 * src/symtab.c (symbol_check_defined): Take advantage of the
5174 location.
5175 * tests/regression.at (Invalid inputs): Adjust.
5176
5177 2002-06-15 Akim Demaille <akim@epita.fr>
5178
5179 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
5180 (input): Don't try to initialize yylloc here, do it in the
5181 scanner.
5182 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
5183 * src/gram.h (rule_t): Change line and action_line into location
5184 and action_location, of location_t type.
5185 Adjust all dependencies.
5186 * src/location.h, src/location.c (empty_location): New.
5187 * src/reader.h, src/reader.c (grammar_start_symbol_set)
5188 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
5189 (grammar_current_rule_symbol_append)
5190 (grammar_current_rule_action_append): Expect a location as argument.
5191 * src/reader.c (grammar_midrule_action): Adjust to attach an
5192 action's location as dummy symbol location.
5193 * src/symtab.h, src/symtab.c (startsymbol_location): New.
5194 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
5195 the line numbers.
5196
5197 2002-06-14 Akim Demaille <akim@epita.fr>
5198
5199 Grammar declarations may be found in the grammar section.
5200
5201 * src/parse-gram.y (rules_or_grammar_declaration): New.
5202 (declarations): Each declaration may end with a semicolon, not
5203 just...
5204 (grammar_declaration): `"%union"'.
5205 (grammar): Branch to rules_or_grammar_declaration.
5206
5207 2002-06-14 Akim Demaille <akim@epita.fr>
5208
5209 * src/main.c (main): Invoke scanner_free.
5210
5211 2002-06-14 Akim Demaille <akim@epita.fr>
5212
5213 * src/output.c (m4_invoke): Extracted from...
5214 (output_skeleton): here.
5215 Free tempfile.
5216
5217 2002-06-14 Akim Demaille <akim@epita.fr>
5218
5219 * src/parse-gram.y (directives, directive, gram)
5220 (grammar_directives, precedence_directives, precedence_directive):
5221 Rename as...
5222 (declarations, declaration, grammar, grammar_declaration)
5223 (precedence_declaration, precedence_declarator): these.
5224 (symbol_declaration): New.
5225
5226 2002-06-14 Akim Demaille <akim@epita.fr>
5227
5228 * src/files.c (action_obstack): Remove, unused.
5229 (output_obstack): Remove it, and all its dependencies, as it is no
5230 longer needed.
5231 * src/reader.c (epilogue_set): Build the epilogue in the
5232 muscle_obstack.
5233 * src/output.h, src/output.c (muscle_obstack): Move to...
5234 * src/muscle_tab.h, src/muscle_tab.h: here.
5235 (muscle_init): Initialize muscle_obstack.
5236 (muscle_free): New.
5237 * src/main.c (main): Call it.
5238
5239 2002-06-14 Akim Demaille <akim@epita.fr>
5240
5241 * src/location.h: New, extracted from...
5242 * src/reader.h: here.
5243 * src/Makefile.am (noinst_HEADERS): Merge into
5244 (bison_SOURCES): this.
5245 Add location.h.
5246 * src/parse-gram.y: Use location_t instead of Bison's.
5247 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
5248 Use location_t instead of ints.
5249
5250 2002-06-14 Akim Demaille <akim@epita.fr>
5251
5252 * data/bison.simple, data/bison.c++: Be sure to restore the
5253 current #line when returning to the skeleton contents after having
5254 exposed the input file's #line.
5255
5256 2002-06-12 Akim Demaille <akim@epita.fr>
5257
5258 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
5259 eager.
5260 * tests/actions.at (Exotic Dollars): New.
5261
5262 2002-06-12 Akim Demaille <akim@epita.fr>
5263
5264 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
5265 ['"/] too eagerly.
5266 * tests/input.at (Torturing the Scanner): New.
5267
5268 2002-06-11 Akim Demaille <akim@epita.fr>
5269
5270 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
5271 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
5272 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
5273 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
5274 * src/reader.c (reader): Use it.
5275
5276 2002-06-11 Akim Demaille <akim@epita.fr>
5277
5278 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
5279 Adjust all callers.
5280 (scanner_last_string_free): New.
5281
5282 2002-06-11 Akim Demaille <akim@epita.fr>
5283
5284 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
5285 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
5286 (last_string, YY_OBS_FREE): New.
5287 Use them when returning an ID.
5288
5289 2002-06-11 Akim Demaille <akim@epita.fr>
5290
5291 Have Bison grammars parsed by a Bison grammar.
5292
5293 * src/reader.c, src/reader.h (prologue_augment): New.
5294 * src/reader.c (copy_definition): Remove.
5295
5296 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
5297 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
5298 (grammar_current_rule_prec_set, grammar_current_rule_check)
5299 (grammar_current_rule_symbol_append)
5300 (grammar_current_rule_action_append): Export.
5301 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
5302 (symbol_list_action_append): Remove.
5303 Hook the routines from reader.
5304 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
5305 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
5306
5307 * src/reader.c (read_declarations): Remove, unused.
5308
5309 * src/parse-gram.y: Handle the epilogue.
5310 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
5311 (grammar_start_symbol_set): this.
5312 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
5313 * src/reader.c (readgram): Remove, unused.
5314 (reader): Adjust to insert eoftoken and axiom where appropriate.
5315
5316 * src/reader.c (copy_dollar): Replace with...
5317 * src/scan-gram.h (handle_dollar): this.
5318 * src/parse-gram.y: Remove `%thong'.
5319
5320 * src/reader.c (copy_at): Replace with...
5321 * src/scan-gram.h (handle_at): this.
5322
5323 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
5324 New.
5325
5326 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
5327 time being.
5328
5329 * src/reader.h, src/reader.c (grammar_rule_end): New.
5330
5331 * src/parse.y (current_type, current_class): New.
5332 Implement `%nterm', `%token' support.
5333 Merge `%term' into `%token'.
5334 (string_as_id): New.
5335 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
5336 type name.
5337
5338 * src/parse-gram.y: Be sure to handle properly the beginning of
5339 rules.
5340
5341 * src/parse-gram.y: Handle %type.
5342 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
5343
5344 * src/parse-gram.y: More directives support.
5345 * src/options.c: No longer handle source directives.
5346
5347 * src/parse-gram.y: Fix %output.
5348
5349 * src/parse-gram.y: Handle %union.
5350 Use the prologue locations.
5351 * src/reader.c (parse_union_decl): Remove.
5352
5353 * src/reader.h, src/reader.c (epilogue_set): New.
5354 * src/parse-gram.y: Use it.
5355
5356 * data/bison.simple, data/bison.c++: b4_stype is now either not
5357 defined, then default to int, or to the contents of %union,
5358 without `union' itself.
5359 Adjust.
5360 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
5361
5362 * src/output.c (actions_output): Don't output braces, as they are
5363 already handled by the scanner.
5364
5365 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
5366 characters to themselves.
5367
5368 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
5369 that the epilogue has a proper #line.
5370
5371 * src/parse-gram.y: Handle precedence/associativity.
5372
5373 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
5374 a terminal.
5375 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
5376 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
5377 at all to define terminals that cannot be emitted.
5378
5379 * src/scan-gram.l: Escape M4 characters.
5380
5381 * src/scan-gram.l: Working properly with escapes in user
5382 strings/characters.
5383
5384 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
5385 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
5386 grammar.
5387 Use more modest sizes, as for the time being the parser does not
5388 release memory, and therefore the process swallows a huge amount
5389 of memory.
5390
5391 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
5392 stricter %token grammar.
5393
5394 * src/symtab.h (associativity): Add `undef_assoc'.
5395 (symbol_precedence_set): Do nothing when passed an undef_assoc.
5396 * src/symtab.c (symbol_check_alias_consistence): Adjust.
5397
5398 * tests/regression.at (Invalid %directive): Remove, as it is now
5399 meaningless.
5400 (Invalid inputs): Adjust to the new error messages.
5401 (Token definitions): The new grammar doesn't allow too many
5402 eccentricities.
5403
5404 * src/lex.h, src/lex.c: Remove.
5405 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
5406 (copy_character, copy_string2, copy_string, copy_identifier)
5407 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
5408 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
5409 (parse_action): Remove.
5410 * po/POTFILES.in: Adjust.
5411
5412 2002-06-11 Akim Demaille <akim@epita.fr>
5413
5414 * src/reader.c (parse_action): Don't store directly into the
5415 rule's action member: return the action as a string.
5416 Don't require `rule_length' as an argument: compute it.
5417 (grammar_current_rule_symbol_append)
5418 (grammar_current_rule_action_append): New, eved out from
5419 (readgram): here.
5420 Remove `action_flag', `rulelength', unused now.
5421
5422 2002-06-11 Akim Demaille <akim@epita.fr>
5423
5424 * src/reader.c (grammar_current_rule_prec_set).
5425 (grammar_current_rule_check): New, eved out from...
5426 (readgram): here.
5427 Remove `xaction', `first_rhs': useless.
5428 * tests/input.at (Type clashes): New.
5429 * tests/existing.at (GNU Cim Grammar): Adjust.
5430
5431 2002-06-11 Akim Demaille <akim@epita.fr>
5432
5433 * src/reader.c (grammar_midrule_action): New, Eved out from
5434 (readgram): here.
5435
5436 2002-06-11 Akim Demaille <akim@epita.fr>
5437
5438 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
5439 New.
5440 (readgram): Use them as replacement of inlined code, crule and
5441 crule1.
5442
5443 2002-06-11 Akim Demaille <akim@epita.fr>
5444
5445 * src/reader.c (grammar_end, grammar_symbol_append): New.
5446 (readgram): Use them.
5447 Make the use of `p' as local as possible.
5448
5449 2002-06-10 Akim Demaille <akim@epita.fr>
5450
5451 GCJ's parser requires the tokens to be defined before the prologue.
5452
5453 * data/bison.simple: Output the token definition before the user's
5454 prologue.
5455 * tests/regression.at (Braces parsing, Duplicate string)
5456 (Mixing %token styles): Check the output from bison.
5457 (Early token definitions): New.
5458
5459 2002-06-10 Akim Demaille <akim@epita.fr>
5460
5461 * src/symtab.c (symbol_user_token_number_set): Don't complain when
5462 assigning twice the same user number to a token, so that we can
5463 use it in...
5464 * src/lex.c (lex): here.
5465 Also use `symbol_class_set' instead of hand written code.
5466 * src/reader.c (parse_assoc_decl): Likewise.
5467
5468 2002-06-10 Akim Demaille <akim@epita.fr>
5469
5470 * src/symtab.c, src/symtab.c (symbol_class_set)
5471 (symbol_user_token_number_set): New.
5472 * src/reader.c (parse_token_decl): Use them.
5473 Use a switch instead of ifs.
5474 Use a single argument.
5475
5476 2002-06-10 Akim Demaille <akim@epita.fr>
5477
5478 Remove `%thong' support as it is undocumented, unused, duplicates
5479 `%token's job, and creates useless e-mail traffic with people who
5480 want to know what it is, why it is undocumented, unused, and
5481 duplicates `%token's job.
5482
5483 * src/reader.c (parse_thong_decl): Remove.
5484 * src/options.c (option_table): Remove "thong".
5485 * src/lex.h (tok_thong): Remove.
5486
5487 2002-06-10 Akim Demaille <akim@epita.fr>
5488
5489 * src/symtab.c, src/symtab.c (symbol_type_set)
5490 (symbol_precedence_set): New.
5491 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
5492 (value_components_used): Remove, unused.
5493
5494 2002-06-09 Akim Demaille <akim@epita.fr>
5495
5496 Move symbols handling code out of the reader.
5497
5498 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
5499 (axiom): Move to...
5500 * src/symtab.h, src/symtab.c: here.
5501
5502 * src/gram.c (start_symbol): Remove: use startsymbol->number.
5503 * src/reader.c (startval): Rename as...
5504 * src/symtab.h, src/symtab.c (startsymbol): this.
5505 * src/reader.c: Adjust.
5506
5507 * src/reader.c (symbol_check_defined, symbol_make_alias)
5508 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5509 (token_translations_init)
5510 Move to...
5511 * src/symtab.c: here.
5512 * src/reader.c (packsymbols): Move to...
5513 * src/symtab.h, src/symtab.c (symbols_pack): here.
5514 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
5515 argument.
5516
5517 2002-06-03 Akim Demaille <akim@epita.fr>
5518
5519 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
5520 then statements.
5521
5522 2002-06-03 Akim Demaille <akim@epita.fr>
5523
5524 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
5525 structs with non literals.
5526 * src/scan-skel.l: never-interactive.
5527 * src/conflicts.c (enum conflict_resolution_e): No trailing
5528 comma.
5529 * src/getargs.c (usage): Split long literal strings.
5530 Reported by Hans Aberg.
5531
5532 2002-05-28 Akim Demaille <akim@epita.fr>
5533
5534 * data/bison.c++: Use C++ ostreams.
5535 (cdebug_): New member.
5536
5537 2002-05-28 Akim Demaille <akim@epita.fr>
5538
5539 * src/output.c (output_skeleton): Be sure to allocate enough room
5540 for `/' _and_ for `\0' in full_skeleton.
5541
5542 2002-05-28 Akim Demaille <akim@epita.fr>
5543
5544 * data/bison.c++: Catch up with bison.simple:
5545 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5546 and Paul Eggert <eggert@twinsun.com>: `error' handing.
5547 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
5548 and popping traces.
5549
5550 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5551
5552 * src/output.c (output_skeleton): Put an explicit path in front of
5553 the skeleton file name, rather than relying on the -I directory,
5554 to partially alleviate effects of having a skeleton file lying around
5555 in the current directory.
5556
5557 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5558
5559 * src/conflicts.c (log_resolution): Correct typo:
5560 obstack_printf should be obstack_fgrow1.
5561
5562 2002-05-26 Akim Demaille <akim@epita.fr>
5563
5564 * src/state.h (state_t): `solved_conflicts' is a new member.
5565 * src/LR0.c (new_state): Set it to 0.
5566 * src/conflicts.h, src/conflicts.c (print_conflicts)
5567 (free_conflicts, solve_conflicts): Rename as...
5568 (conflicts_print, conflicts_free, conflicts_solve): these.
5569 Adjust callers.
5570 * src/conflicts.c (enum conflict_resolution_e)
5571 (solved_conflicts_obstack): New, used by...
5572 (log_resolution): this.
5573 Adjust to attach the conflict resolution to each state.
5574 Complete the description with the precedence/associativity
5575 information.
5576 (resolve_sr_conflict): Adjust.
5577 * src/print.c (print_state): Output its solved_conflicts.
5578 * tests/conflicts.at (Unresolved SR Conflicts)
5579 (Solved SR Conflicts): Exercise --report=all.
5580
5581 2002-05-26 Akim Demaille <akim@epita.fr>
5582
5583 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5584 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5585 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
5586 (token_number_t, item_number_as_token_number)
5587 (token_number_as_item_number, muscle_insert_token_number_table):
5588 Rename as...
5589 (symbol_number_t, item_number_as_symbol_number)
5590 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
5591 these, since it is more appropriate.
5592
5593 2002-05-26 Akim Demaille <akim@epita.fr>
5594
5595 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
5596 `Error:' lines.
5597 * data/bison.simple (yystos) [YYDEBUG]: New.
5598 (yyparse) [YYDEBUG]: Display the symbols which are popped during
5599 error recovery.
5600 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
5601
5602 2002-05-25 Akim Demaille <akim@epita.fr>
5603
5604 * doc/bison.texinfo (Debugging): Split into...
5605 (Tracing): this new section, its former contents, and...
5606 (Understanding): this new section.
5607 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
5608 by...
5609 (report_flag): this.
5610 Adjust all dependencies.
5611 (report_args, report_types, report_argmatch): New.
5612 (usage, getargs): Report/support -r, --report.
5613 * src/options.h
5614 (struct option_table_struct): Rename as..,
5615 (struct option_table_s): this.
5616 Rename the `set_flag' member to `flag' to match with getopt_long's
5617 struct.
5618 * src/options.c (option_table): Split verbose into an entry for
5619 %verbose, and another for --verbose.
5620 Support --report/-r, so remove -r from the obsolete --raw.
5621 * src/print.c: Attach full item sets and lookaheads reports to
5622 report_flag instead of trace_flag.
5623 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5624
5625 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5626 and Paul Eggert <eggert@twinsun.com>
5627
5628 * data/bison.simple (yyparse): Correct error handling to conform to
5629 POSIX and yacc. Specifically, after syntax error is discovered,
5630 do not reduce further before shifting the error token.
5631 Clean up the code a bit by removing the labels yyerrdefault,
5632 yyerrhandle, yyerrpop.
5633 * NEWS: Document the above.
5634
5635 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5636
5637 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5638 type; it isn't always big enough, since it doesn't necessarily
5639 include non-terminals.
5640 (yytranslate): Expand definition of yy_token_number_type, so that
5641 the latter can be removed.
5642 (yy_token_number_type): Remove, only one use.
5643 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5644 don't use TokenNumberType as element type.
5645
5646 * tests/regression.at: Modify expected output to agree with change
5647 to yyr1 and yytranslate.
5648
5649 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5650
5651 * src/reader.c (parse_action): Use copy_character instead of
5652 obstack_1grow.
5653
5654 2002-05-13 Akim Demaille <akim@epita.fr>
5655
5656 * tests/regression.at (Token definitions): Prototype yylex and
5657 yyerror.
5658
5659 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5660
5661 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
5662 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5663 32-bit arithmetic.
5664 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5665
5666 2002-05-07 Akim Demaille <akim@epita.fr>
5667
5668 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5669 avoid GCC warnings.
5670
5671 2002-05-07 Akim Demaille <akim@epita.fr>
5672
5673 Kill GCC warnings.
5674
5675 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5676 over the RHS of each rule.
5677 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5678 * src/state.h (state_t): Member `nitems' is unsigned short.
5679 * src/LR0.c (get_state): Adjust.
5680 * src/reader.c (packgram): Likewise.
5681 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5682 `Type'.
5683 (muscle_insert_int_table): Remove, unused.
5684 (prepare_rules): Remove `max'.
5685
5686 2002-05-06 Akim Demaille <akim@epita.fr>
5687
5688 * src/closure.c (print_firsts): Display of the symbol tags.
5689 (bitmatrix_print): Move to...
5690 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5691 here.
5692 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5693
5694 2002-05-06 Akim Demaille <akim@epita.fr>
5695
5696 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5697 hash_do_for_each.
5698
5699 2002-05-06 Akim Demaille <akim@epita.fr>
5700
5701 * src/LR0.c (new_state, get_state): Instead of using the global
5702 `kernel_size' and `kernel_base', have two new arguments:
5703 `core_size' and `core'.
5704 Adjust callers.
5705
5706 2002-05-06 Akim Demaille <akim@epita.fr>
5707
5708 * src/reader.c (packgram): No longer end `ritem' with a 0
5709 sentinel: it is not used.
5710
5711 2002-05-05 Akim Demaille <akim@epita.fr>
5712
5713 New experimental feature: display the lookaheads in the report and
5714 graph.
5715
5716 * src/print (print_core): When --trace-flag, display the rules
5717 lookaheads.
5718 * src/print_graph.c (print_core): Likewise.
5719 Swap the arguments.
5720 Adjust caller.
5721
5722 2002-05-05 Akim Demaille <akim@epita.fr>
5723
5724 * tests/torture.at (Many lookaheads): New test.
5725
5726 2002-05-05 Akim Demaille <akim@epita.fr>
5727
5728 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
5729 (GENERATE_MUSCLE_INSERT_TABLE): this.
5730 (output_int_table, output_unsigned_int_table, output_short_table)
5731 (output_token_number_table, output_item_number_table): Replace with...
5732 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
5733 (muscle_insert_short_table, muscle_insert_token_number_table)
5734 (muscle_insert_item_number_table): these.
5735 Adjust all callers.
5736 (prepare_tokens): Don't free `translations', since...
5737 * src/reader.h, src/reader.c (grammar_free): do it.
5738 Move to...
5739 * src/gram.h, src/gram.c (grammar_free): here.
5740 * data/bison.simple, data/bison.c++: b4_token_number_max is now
5741 b4_translate_max.
5742
5743 2002-05-05 Akim Demaille <akim@epita.fr>
5744
5745 * src/output.c (output_unsigned_int_table): New.
5746 (prepare_rules): `i' is unsigned.
5747 `prhs', `rline', `r2' are unsigned int.
5748 Rename muscle `rhs_number_max' as `rhs_max'.
5749 Output muscles `prhs_max', `rline_max', and `r2_max'.
5750 Free rline and r1.
5751 * data/bison.simple, data/bison.c++: Adjust to use these muscles
5752 to compute types instead of constant types.
5753 * tests/regression.at (Web2c Actions): Adjust.
5754
5755 2002-05-04 Akim Demaille <akim@epita.fr>
5756
5757 * src/symtab.h (SALIAS, SUNDEF): Rename as...
5758 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
5759 Adjust dependencies.
5760 * src/output.c (token_definitions_output): Be sure not to output a
5761 `#define 'a'' when fed with `%token 'a' "a"'.
5762 * tests/regression.at (Token definitions): New.
5763
5764 2002-05-03 Paul Eggert <eggert@twinsun.com>
5765
5766 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
5767 for K&R C.
5768
5769 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
5770
5771 * Makefile.am (SUBDIRS): Remove intl.
5772 (EXTRA_DIST): Add config/config.rpath.
5773
5774 2002-05-03 Akim Demaille <akim@epita.fr>
5775
5776 * data/bison.simple (m4_if): Don't output empty enums.
5777 And actually, output valid enum definitions :(.
5778
5779 2002-05-03 Akim Demaille <akim@epita.fr>
5780
5781 * configure.bat: Remove, completely obsolete.
5782 * Makefile.am (EXTRA_DIST): Adjust.
5783 Don't distribute config.rpath...
5784 * config/Makefile.am (EXTRA_DIST): Do it.
5785
5786 2002-05-03 Akim Demaille <akim@epita.fr>
5787
5788 * configure.in (GETTEXT_VERSION): New.
5789 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
5790
5791 2002-05-03 Akim Demaille <akim@epita.fr>
5792
5793 * data/bison.simple (b4_token_enum): New.
5794 (b4_token_defines): Use it to output tokens both as #define and
5795 enums.
5796 Suggested by Paul Eggert.
5797 * src/output.c (token_definitions_output): Don't output spurious
5798 white spaces.
5799
5800 2002-05-03 Akim Demaille <akim@epita.fr>
5801
5802 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5803
5804 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
5805
5806 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
5807 Update the stack class, give a try to deque as the default container.
5808
5809 2002-05-02 Akim Demaille <akim@epita.fr>
5810
5811 * data/bison.simple (yyparse): Do not implement @$ = @1.
5812 (YYLLOC_DEFAULT): Adjust to do it.
5813 * doc/bison.texinfo (Location Default Action): Fix.
5814
5815 2002-05-02 Akim Demaille <akim@epita.fr>
5816
5817 * src/reader.c (parse_braces): Merge into...
5818 (parse_action): this.
5819
5820 2002-05-02 Akim Demaille <akim@epita.fr>
5821
5822 * configure.in (ALL_LINGUAS): Remove.
5823 * po/LINGUAS, hr.po: New.
5824
5825 2002-05-02 Akim Demaille <akim@epita.fr>
5826
5827 Remove the so called hairy (semantic) parsers.
5828
5829 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
5830 * src/gram.h, src/gram.c (semantic_parser): Remove.
5831 (rule_t): Remove the guard and guard_line members.
5832 * src/lex.h (token_t): remove tok_guard.
5833 * src/options.c (option_table): Remove %guard and %semantic_parser
5834 support.
5835 * src/output.c, src/output.h (guards_output): Remove.
5836 (prepare): Adjust.
5837 (token_definitions_output): Don't output the `T'
5838 tokens (???).
5839 (output_skeleton): Don't output the guards.
5840 * src/files.c, src/files.c (attrsfile): Remove.
5841 * src/reader.c (symbol_list): Remove the guard and guard_line
5842 members.
5843 Adjust dependencies.
5844 (parse_guard): Remove.
5845 * data/bison.hairy: Remove.
5846 * doc/bison.texinfo (Environment Variables): Remove occurrences of
5847 BISON_HAIRY.
5848
5849 2002-05-02 Akim Demaille <akim@epita.fr>
5850
5851 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
5852 (parse_guard): Rename the formal argument `stack_offset' as
5853 `rule_length', which is more readable.
5854 Adjust callers.
5855 (copy_at, copy_dollar): Instead of outputting the hard coded
5856 values of $$, $n and so forth, output invocation to b4_lhs_value,
5857 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
5858 Note: this patch partially drops `semantic-parser' support: it
5859 always does `rule_length - n', where semantic parsers ought to
5860 always use `-n'.
5861 * data/bison.simple, data/bison.c++ (b4_lhs_value)
5862 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
5863
5864 2002-05-02 Akim Demaille <akim@epita.fr>
5865
5866 * configure.in (AC_INIT): Bump to 1.49b.
5867 (AM_INIT_AUTOMAKE): Short invocation.
5868
5869 2002-05-02 Akim Demaille <akim@epita.fr>
5870
5871 Version 1.49a.
5872
5873 2002-05-01 Akim Demaille <akim@epita.fr>
5874
5875 * src/skeleton.h: Remove.
5876
5877 2002-05-01 Akim Demaille <akim@epita.fr>
5878
5879 * src/skeleton.h: Fix the #endif.
5880 Reported by Magnus Fromreide.
5881
5882 2002-04-26 Paul Eggert <eggert@twinsun.com>
5883
5884 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
5885 Define if we define YYSTYPE and YYLTYPE, respectively.
5886 (YYCOPY): Fix [] quoting problem in the non-GCC case.
5887
5888 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
5889
5890 * src/scan-skel.l: Postprocess quadrigraphs.
5891
5892 * src/reader.c (copy_character): New function, used to output
5893 single characters while replacing `[' and `]' with quadrigraphs, to
5894 avoid troubles with M4 quotes.
5895 (copy_comment): Output characters with copy_character.
5896 (read_additionnal_code): Likewise.
5897 (copy_string2): Likewise.
5898 (copy_definition): Likewise.
5899
5900 * tests/calc.at: Exercise M4 quoting.
5901
5902 2002-04-25 Akim Demaille <akim@epita.fr>
5903
5904 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
5905 between `!' and the command.
5906 Reported by Paul Eggert.
5907
5908 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
5909
5910 * tests/calc.at: Exercise prologue splitting.
5911
5912 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
5913 `b4_post_prologue' instead of `b4_prologue'.
5914
5915 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
5916 muscles.
5917 (output): Free pre_prologue_obstack and post_prologue_obstack.
5918 * src/files.h, src/files.c (attrs_obstack): Remove.
5919 (pre_prologue_obstack, post_prologue_obstack): New.
5920 * src/reader.c (copy_definition): Add a parameter to specify the
5921 obstack to fill, instead of using attrs_obstack unconditionally.
5922 (read_declarations): Pass pre_prologue_obstack to copy_definition if
5923 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
5924
5925 2002-04-23 Paul Eggert <eggert@twinsun.com>
5926
5927 * data/bison.simple: Remove unnecessary commentary and white
5928 space differences from 1_29-branch.
5929 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
5930
5931 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
5932 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
5933 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
5934 constructors or destructors.
5935
5936 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
5937
5938 2002-04-23 Akim Demaille <akim@epita.fr>
5939
5940 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
5941 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
5942 location with columns.
5943 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
5944 All reported by Paul Eggert.
5945
5946 2002-04-22 Akim Demaille <akim@epita.fr>
5947
5948 * src/reduce.c (dump_grammar): Move to...
5949 * src/gram.h, src/gram.c (grammar_dump): here.
5950 Be sure to separate long item numbers.
5951 Don't read the members of a rule's prec if its nil.
5952
5953 2002-04-22 Akim Demaille <akim@epita.fr>
5954
5955 * src/output.c (table_size, table_grow): New.
5956 (MAXTABLE): Remove, replace uses with table_size.
5957 (pack_vector): Instead of dying when the table is too big, grow it.
5958
5959 2002-04-22 Akim Demaille <akim@epita.fr>
5960
5961 * data/bison.simple (yyr1): Its type is that of a token number.
5962 * data/bison.c++ (r1_): Likewise.
5963 * tests/regression.at (Web2c Actions): Adjust.
5964
5965 2002-04-22 Akim Demaille <akim@epita.fr>
5966
5967 * src/reader.c (token_translations_init): 256 is now the default
5968 value for the error token, i.e., it will be assigned another
5969 number if the user assigned 256 to one of her tokens.
5970 (reader): Don't force 256 to error.
5971 * doc/bison.texinfo (Symbols): Adjust.
5972 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
5973 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
5974 etc. instead of 10, 20, 30 (which was used to `jump' over error
5975 (256) and undefined (2)).
5976
5977 2002-04-22 Akim Demaille <akim@epita.fr>
5978
5979 Propagate more token_number_t.
5980
5981 * src/gram.h (token_number_as_item_number)
5982 (item_number_as_token_number): New.
5983 * src/output.c (GENERATE_OUTPUT_TABLE): New.
5984 Use it to create output_item_number_table and
5985 output_token_number_table.
5986 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5987 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
5988 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
5989 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
5990
5991 2002-04-22 Akim Demaille <akim@epita.fr>
5992
5993 * src/output.h, src/output.c (get_lines_number): Remove.
5994
5995 2002-04-19 Akim Demaille <akim@epita.fr>
5996
5997 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
5998 as Lex/Flex'.
5999 (Debugging): More details about enabling the debugging features.
6000 (Table of Symbols): Describe $$, $n, @$, and @n.
6001 Suggested by Tim Josling.
6002
6003 2002-04-19 Akim Demaille <akim@epita.fr>
6004
6005 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
6006
6007 2002-04-10 Akim Demaille <akim@epita.fr>
6008
6009 * src/system.h: Rely on HAVE_LIMITS_H.
6010 Suggested by Paul Eggert.
6011
6012 2002-04-09 Akim Demaille <akim@epita.fr>
6013
6014 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
6015 full stderr, and strip it according to the bison options, instead
6016 of composing the error message from different bits.
6017 This makes it easier to check for several error messages.
6018 Adjust all the invocations.
6019 Add an invocation exercising the error token.
6020 Add an invocation demonstrating a stupid error message.
6021 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
6022 Adjust the tests.
6023 Error message are for stderr, not stdout.
6024
6025 2002-04-09 Akim Demaille <akim@epita.fr>
6026
6027 * src/gram.h, src/gram.c (error_token_number): Remove, use
6028 errtoken->number.
6029 * src/reader.c (reader): Don't specify the user token number (2)
6030 for $undefined, as it uselessly prevents using it.
6031 * src/gram.h (token_number_t): Move to...
6032 * src/symtab.h: here.
6033 (state_t.number): Is a token_number_t.
6034 * src/print.c, src/reader.c: Use undeftoken->number instead of
6035 hard coded 2.
6036 (Even though this 2 is not the same as above: the number of the
6037 undeftoken remains being 2, it is its user token number which
6038 might not be 2).
6039 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
6040 `user_token_number_max'.
6041 Output `undef_token_number'.
6042 * data/bison.simple, data/bison.c++: Use them.
6043 Be sure to map invalid yylex return values to
6044 `undef_token_number'. This saves us from gratuitous SEGV.
6045
6046 * tests/conflicts.at (Solved SR Conflicts)
6047 (Unresolved SR Conflicts): Adjust.
6048 * tests/regression.at (Web2c Actions): Adjust.
6049
6050 2002-04-08 Akim Demaille <akim@epita.fr>
6051
6052 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
6053 Adding #line.
6054 Remove the duplicate `typedefs'.
6055 (RhsNumberType): Fix the declaration and various other typos.
6056 Use __ofile__.
6057 * data/bison.simple: Use __ofile__.
6058 * src/scan-skel.l: Handle __ofile__.
6059
6060 2002-04-08 Akim Demaille <akim@epita.fr>
6061
6062 * src/gram.h (item_number_t): New, the type of item numbers in
6063 RITEM. Note that it must be able to code symbol numbers as
6064 positive number, and the negation of rule numbers as negative
6065 numbers.
6066 Adjust all dependencies (pretty many).
6067 * src/reduce.c (rule): Remove this `short *' pointer: use
6068 item_number_t.
6069 * src/system.h (MINSHORT, MAXSHORT): Remove.
6070 Include `limits.h'.
6071 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
6072 (shortcpy): Remove.
6073 (MAXTABLE): Move to...
6074 * src/output.c (MAXTABLE): here.
6075 (prepare_rules): Use output_int_table to output rhs.
6076 * data/bison.simple, data/bison.c++: Adjust.
6077 * tests/torture.at (Big triangle): Move the limit from 254 to
6078 500.
6079 * tests/regression.at (Web2c Actions): Ajust.
6080
6081 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
6082 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
6083 passes, but produces negative #line number, once fixed, GCC is
6084 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
6085 C), it passes.
6086 * src/state.h (state_h): Code input lines on ints, not shorts.
6087
6088 2002-04-08 Akim Demaille <akim@epita.fr>
6089
6090 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
6091 and then the grammar.
6092
6093 2002-04-08 Akim Demaille <akim@epita.fr>
6094
6095 * src/system.h: No longer using strndup.
6096
6097 2002-04-07 Akim Demaille <akim@epita.fr>
6098
6099 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
6100 * src/output.c (output_table_data): Return the longest number.
6101 (prepare_tokens): Output `token_number_max').
6102 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
6103 New.
6104 Use them to define yy_token_number_type/TokenNumberType.
6105 Use this type for yytranslate.
6106 * tests/torture.at (Big triangle): Push the limit from 124 to
6107 253.
6108 * tests/regression.at (Web2c Actions): Adjust.
6109
6110 2002-04-07 Akim Demaille <akim@epita.fr>
6111
6112 * tests/torture.at (Big triangle): New.
6113 (GNU AWK Grammar, GNU Cim Grammar): Move to...
6114 * tests/existing.at: here.
6115
6116 2002-04-07 Akim Demaille <akim@epita.fr>
6117
6118 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
6119 nritems.
6120 Adjust dependencies.
6121
6122 2002-04-07 Akim Demaille <akim@epita.fr>
6123
6124 * src/reader.c: Normalize increments to prefix form.
6125
6126 2002-04-07 Akim Demaille <akim@epita.fr>
6127
6128 * src/reader.c, symtab.c: Remove debugging code.
6129
6130 2002-04-07 Akim Demaille <akim@epita.fr>
6131
6132 Rename all the `bucket's as `symbol_t'.
6133
6134 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
6135 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
6136 * src/symtab.c, src/symtab.h (bucket): Rename as...
6137 (symbol_t): this.
6138 (symbol_list_new, bucket_check_defined, bucket_make_alias)
6139 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
6140 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6141 (buckets_new, buckets_free, buckets_do): Rename as...
6142 (symbol_list_new, symbol_check_defined, symbol_make_alias)
6143 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
6144 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
6145 (symbols_new, symbols_free, symbols_do): these.
6146
6147 2002-04-07 Akim Demaille <akim@epita.fr>
6148
6149 Use lib/hash for the symbol table.
6150
6151 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
6152 EOF.
6153 * src/lex.c (lex): Set the `number' member of new terminals.
6154 * src/reader.c (bucket_check_defined, bucket_make_alias)
6155 (bucket_check_alias_consistence, bucket_translation): New.
6156 (reader, grammar_free, readgram, token_translations_init)
6157 (packsymbols): Adjust.
6158 (reader): Number the predefined tokens.
6159 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
6160 for predefined tokens.
6161 * src/symtab.h (bucket): Remove all the hash table related
6162 members.
6163 * src/symtab.c (symtab): Replace by...
6164 (bucket_table): this.
6165 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6166 (buckets_new, buckets_do): New.
6167
6168 2002-04-07 Akim Demaille <akim@epita.fr>
6169
6170 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
6171 (start_symbol, max_user_token_number, semantic_parser)
6172 (error_token_number): Initialize.
6173 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
6174 Initialize.
6175 (reader): Don't.
6176 (errtoken, eoftoken, undeftoken, axiom): Extern.
6177
6178 2002-04-07 Akim Demaille <akim@epita.fr>
6179
6180 * src/gram.h (rule_s): prec and precsym are now pointers
6181 to the bucket giving the priority/associativity.
6182 Member `associativity' removed: useless.
6183 * src/reduce.c, src/conflicts.c: Adjust.
6184
6185 2002-04-07 Akim Demaille <akim@epita.fr>
6186
6187 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
6188 Properly escape the symbols' TAG when outputting them.
6189
6190 2002-04-07 Akim Demaille <akim@epita.fr>
6191
6192 * src/lalr.h (LA): Is a bitsetv, not bitset*.
6193
6194 2002-04-07 Akim Demaille <akim@epita.fr>
6195
6196 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
6197 (LArule): this, which is an array to rule_t*.
6198 * src/print.c, src/conflicts.c: Adjust.
6199
6200 2002-04-07 Akim Demaille <akim@epita.fr>
6201
6202 * src/gram.h (rule_t): Rename `number' as `user_number'.
6203 `number' is a new member.
6204 Adjust dependencies.
6205 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
6206
6207 2002-04-07 Akim Demaille <akim@epita.fr>
6208
6209 As a result of the previous patch, it is no longer needed
6210 to reorder ritem itself.
6211
6212 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
6213
6214 2002-04-07 Akim Demaille <akim@epita.fr>
6215
6216 Be sure never to walk through RITEMS, but use only data related to
6217 the rules themselves. RITEMS should be banished.
6218
6219 * src/output.c (output_token_translations): Rename as...
6220 (prepare_tokens): this.
6221 In addition to `translate', prepare the muscles `tname' and
6222 `toknum', which were handled by...
6223 (output_rule_data): this.
6224 Remove, and move the remainder of its outputs into...
6225 (prepare_rules): this new routines, which also merges content from
6226 (output_gram): this.
6227 (prepare_rules): Be sure never to walk through RITEMS.
6228 (output_stos): Rename as...
6229 (prepare_stos): this.
6230 (output): Always invoke prepare_states, after all, just don't use it
6231 in the output if you don't need it.
6232
6233 2002-04-07 Akim Demaille <akim@epita.fr>
6234
6235 * src/LR0.c (new_state): Display `nstates' as the name of the
6236 newly created state.
6237 Adjust to initialize first_state and last_state if needed.
6238 Be sure to distinguish the initial from the final state.
6239 (new_states): Create the itemset of the initial state, and use
6240 new_state.
6241 * src/closure.c (closure): Now that the initial state has its
6242 items properly set, there is no need for a special case when
6243 creating `ruleset'.
6244
6245 As a result, now the rule 0, reducing to $axiom, is visible in the
6246 outputs. Adjust the test suite.
6247
6248 * tests/conflicts.at (Solved SR Conflicts)
6249 (Unresolved SR Conflicts): Adjust.
6250 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
6251 * tests/conflicts.at (S/R in initial): New.
6252
6253 2002-04-07 Akim Demaille <akim@epita.fr>
6254
6255 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
6256 the RHS of the rules.
6257 * src/output.c (output_gram): Likewise.
6258
6259 2002-04-07 Akim Demaille <akim@epita.fr>
6260
6261 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
6262 bucket.
6263 Adjust all dependencies.
6264 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
6265 `number' of the buckets too.
6266 * src/gram.h: Include `symtab.h'.
6267 (associativity): Move to...
6268 * src/symtab.h: here.
6269 No longer include `gram.h'.
6270
6271 2002-04-07 Akim Demaille <akim@epita.fr>
6272
6273 * src/gram.h, src/gram.c (rules_rhs_length): New.
6274 (ritem_longest_rhs): Use it.
6275 * src/gram.h (rule_t): `number' is a new member.
6276 * src/reader.c (packgram): Set it.
6277 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
6278 the end of `rules', and count them out of `nrules'.
6279 (reduce_output, dump_grammar): Adjust.
6280 * src/print.c (print_grammar): It is no longer needed to check for
6281 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
6282 * tests/reduce.at (Reduced Automaton): New test.
6283
6284 2002-04-07 Akim Demaille <akim@epita.fr>
6285
6286 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
6287 lacking `+ 1' to nrules, Bison reported as useless a token if it
6288 was used solely to set the precedence of the last rule...
6289
6290 2002-04-07 Akim Demaille <akim@epita.fr>
6291
6292 * data/bison.c++, data/bison.simple: Don't output the current file
6293 name in #line, to avoid useless diffs between two identical
6294 outputs under different names.
6295
6296 2002-04-07 Akim Demaille <akim@epita.fr>
6297
6298 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
6299 Normalize loops to using `< nrules + 1', not `<= nrules'.
6300
6301 2002-04-07 Akim Demaille <akim@epita.fr>
6302
6303 * TODO: Update.
6304
6305 2002-04-07 Akim Demaille <akim@epita.fr>
6306
6307 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
6308 bucket.value as bucket.number.
6309
6310 2002-04-07 Akim Demaille <akim@epita.fr>
6311
6312 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
6313 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
6314 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
6315 RHS, instead of being an index in RITEMS.
6316
6317 2002-04-04 Paul Eggert <eggert@twinsun.com>
6318
6319 * doc/bison.texinfo: Update copyright date.
6320 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
6321 (Symbols): Warn about running Bison in one character set,
6322 but compiling and/or running in an incompatible one.
6323 Warn about character code 256, too.
6324
6325 2002-04-03 Paul Eggert <eggert@twinsun.com>
6326
6327 * src/bison.data (YYSTACK_ALLOC): Depend on whether
6328 YYERROR_VERBOSE is nonzero, not whether it is defined.
6329
6330 Merge changes from bison-1_29-branch.
6331
6332 2002-03-20 Paul Eggert <eggert@twinsun.com>
6333
6334 Merge fixes from Debian bison_1.34-1.diff.
6335
6336 * configure.in (AC_PREREQ): 2.53.
6337
6338 2002-03-20 Akim Demaille <akim@epita.fr>
6339
6340 * src/conflicts.c (log_resolution): Argument `resolution' is const.
6341
6342 2002-03-19 Paul Eggert <eggert@twinsun.com>
6343
6344 * src/bison.simple (YYCOPY): New macro.
6345 (YYSTACK_RELOCATE): Use it.
6346 Remove Type arg; no longer needed. All callers changed.
6347 (yymemcpy): Remove; no longer needed.
6348
6349 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
6350 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6351
6352 2002-03-19 Akim Demaille <akim@epita.fr>
6353
6354 Test and fix the #line outputs.
6355
6356 * tests/atlocal.at (GCC): New.
6357 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
6358 (Prologue synch line, ,%union synch line, Postprologue synch line)
6359 (Action synch line, Epilogue synch line): New tests.
6360 * src/reader.c (parse_union_decl): Define the muscle stype_line.
6361 * data/bison.simple, data/bison.c++: Use it.
6362
6363 2002-03-19 Akim Demaille <akim@epita.fr>
6364
6365 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
6366 (Solved SR Conflicts, %expect not enough, %expect right)
6367 (%expect too much): Move to...
6368 * tests/conflicts.at: this new file.
6369
6370 2002-03-19 Akim Demaille <akim@epita.fr>
6371
6372 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6373 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
6374 that we can move to enums for instance.
6375 * src/output.c (token_definitions_output): Output a list of
6376 `token-name, token-number' instead of the #define.
6377 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
6378
6379 2002-03-14 Akim Demaille <akim@epita.fr>
6380
6381 Use Gettext 0.11.1.
6382
6383 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
6384
6385 * data/bison.c++: Make the user able to add members to the generated
6386 parser by subclassing.
6387
6388 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
6389
6390 * src/reader.c (read_additionnal_code): `c' should be an integer, not
6391 a character.
6392 Reported by Nicolas Tisserand and Nicolas Burrus.
6393
6394 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6395
6396 * src/reader.c: Warn about lacking semi-colons, do not complain.
6397
6398 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6399
6400 * data/bison.c++: Remove a debug line.
6401
6402 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6403
6404 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
6405 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
6406 provide a default implementation.
6407
6408 2002-03-04 Akim Demaille <akim@epita.fr>
6409
6410 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
6411 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
6412 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
6413 * tests/semantic.at (Parsing Guards): Similarly.
6414 * src/reader.at (readgram): Complain if the last rule is not ended
6415 with a semi-colon.
6416
6417 2002-03-04 Akim Demaille <akim@epita.fr>
6418
6419 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
6420 * src/closure.c: here.
6421 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
6422 RTC.
6423 * src/warshall.h, src/warshall.c: Remove.
6424 * tests/sets.at (Broken Closure): Adjust.
6425
6426 2002-03-04 Akim Demaille <akim@epita.fr>
6427
6428 * src/output.c (output_skeleton): tempdir is const.
6429 bytes_read is unused.
6430
6431 2002-03-04 Akim Demaille <akim@epita.fr>
6432
6433 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6434 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
6435 Update.
6436 From Michael Hayes.
6437
6438 2002-03-04 Akim Demaille <akim@epita.fr>
6439
6440 * src/closure.c (closure): `r' is unused.
6441
6442 2002-03-04 Akim Demaille <akim@epita.fr>
6443
6444 * tests/sets.at (Broken Closure): Add the ending `;'.
6445 * src/reader.at (readgram): Complain if a rule is not ended with a
6446 semi-colon.
6447
6448 2002-03-04 Akim Demaille <akim@epita.fr>
6449
6450 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
6451 (count_sr_conflicts): Use bitset_count.
6452 * src/reduce.c (inaccessable_symbols): Ditto.
6453 (bits_size): Remove.
6454 * src/warshall.h, src/warshall.c: Convert to bitsetv.
6455
6456 2002-03-04 Akim Demaille <akim@epita.fr>
6457
6458 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
6459 * src/reduce.c: Remove the `bitset_zero's following the
6460 `bitset_create's, as now it is performed by the latter.
6461
6462 2002-03-04 Akim Demaille <akim@epita.fr>
6463
6464 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
6465 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
6466 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
6467 latest sources from Michael.
6468
6469 2002-03-04 Akim Demaille <akim@epita.fr>
6470
6471 * src/output.c (output): Don't free the grammar.
6472 * src/reader.c (grammar_free): New.
6473 * src/main.c (main): Call it and don't free symtab here.
6474
6475 2002-03-04 Akim Demaille <akim@epita.fr>
6476
6477 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
6478 before returning.
6479 Reported by Benoit Perrot.
6480
6481 2002-03-04 Akim Demaille <akim@epita.fr>
6482
6483 Use bitset operations when possible, not loops over bits.
6484
6485 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
6486 bitset_or.
6487 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
6488 * src/reduce.c (useless_nonterminals): Formatting changes.
6489 * src/warshall.c (TC): Use bitset_or.
6490
6491 2002-03-04 Akim Demaille <akim@epita.fr>
6492
6493 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
6494 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
6495 Ditto.
6496
6497 2002-03-04 Akim Demaille <akim@epita.fr>
6498
6499 * src/lalr.c (F): Now a bitset*.
6500 Adjust all dependencies.
6501
6502 2002-03-04 Akim Demaille <akim@epita.fr>
6503
6504 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
6505 Adjust all dependencies.
6506
6507 2002-03-04 Akim Demaille <akim@epita.fr>
6508
6509 * src/L0.c, src/LR0.h (nstates): Be size_t.
6510 Adjust comparisons (signed vs unsigned).
6511 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
6512 bitset*.
6513 Adjust all dependencies.
6514
6515 2002-03-04 Akim Demaille <akim@epita.fr>
6516
6517 * src/closure.c (firsts): Now, also a bitset.
6518 Adjust all dependencies.
6519 (varsetsize): Remove, now unused.
6520 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
6521
6522 2002-03-04 Akim Demaille <akim@epita.fr>
6523
6524 * src/print.c: Convert to use bitset.h, not hand coded iterations
6525 over ints.
6526
6527 2002-03-04 Akim Demaille <akim@epita.fr>
6528
6529 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
6530
6531 2002-03-04 Akim Demaille <akim@epita.fr>
6532
6533 * src/closure.c (ruleset): Be a bitset.
6534 (rulesetsize): Remove.
6535
6536 2002-03-04 Akim Demaille <akim@epita.fr>
6537
6538 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6539 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
6540 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
6541 * src/closure.c (fderives): Be an array of bitsets.
6542
6543 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
6544
6545 * data/bison.c++: Merge the two generated headers. Insert a copyright
6546 notice in each output file.
6547
6548 2002-02-28 Akim Demaille <akim@epita.fr>
6549
6550 * data/bison.c++: Copy the prologue of bison.simple to fetch
6551 useful M4 definitions, such as b4_header_guard.
6552
6553 2002-02-25 Akim Demaille <akim@epita.fr>
6554
6555 * src/getargs.c (version): Give the name of the authors, and use a
6556 translator friendly scheme for the bgr
6557 copyright notice.
6558
6559 2002-02-25 Akim Demaille <akim@epita.fr>
6560
6561 * src/output.c (header_output): Remove, now handled completely via
6562 M4.
6563
6564 2002-02-25 Akim Demaille <akim@epita.fr>
6565
6566 * m4/m4.m4: New, from CVS Autoconf.
6567 * configure.in: Invoke it.
6568 * src/output.c (output_skeleton): Use its result instead of the
6569 hard coded name.
6570
6571 2002-02-25 Akim Demaille <akim@epita.fr>
6572
6573 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
6574 Fileutils 4.1.5.
6575 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
6576 * src/output.c (output_skeleton): Use mkstemp to create a real
6577 temporary file.
6578 Move the filling of `skeleton' and its muscle to...
6579 (prepare): here.
6580 (output): Move the definition of the prologue muscle to...
6581 (prepare): here.
6582 * src/system.h (DEFAULT_TMPDIR): New.
6583
6584 2002-02-14 Paul Eggert <eggert@twinsun.com>
6585
6586 Remove the support for C++ namespace cleanliness; it was
6587 causing more problems than it was curing, since it didn't work
6588 properly on some nonstandard C++ compilers. This can wait
6589 for a proper C++ parser.
6590
6591 * NEWS: Document this.
6592 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
6593 of C++, as it's treated like C now.
6594 * src/bison.simple (YYSTD): Remove.
6595 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
6596 Treat C++ just like Standard C instead of trying to support
6597 namespace cleanliness.
6598
6599 2002-02-14 Akim Demaille <akim@epita.fr>
6600
6601 * tests/regression.at (else): Adjust to Andreas' change.
6602
6603 2002-02-14 Akim Demaille <akim@epita.fr>
6604
6605 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
6606
6607 2002-02-13 Andreas Schwab <schwab@suse.de>
6608
6609 * src/output.c (output_rule_data): Don't output NULL, it might
6610 not be defined yet.
6611
6612 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
6613
6614 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6615 (Copyright notice): Update.
6616
6617 2002-02-11 Akim Demaille <akim@epita.fr>
6618
6619 * tests/regression.at (%nonassoc and eof): Don't include
6620 nonportable headers.
6621
6622 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
6623
6624 * data/bison.c++: Correct error recovery. Make the user able to
6625 initialize the starting location.
6626
6627 2002-02-07 Akim Demaille <akim@epita.fr>
6628
6629 * tests/input.at: New.
6630
6631 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6632
6633 * data/bison.c++: Replace some direct m4 expansions by constants. Be
6634 more consistent when naming methods and variables. Put preprocessor
6635 directives around tables only needed for debugging.
6636
6637 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6638
6639 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6640 C++ parsers.
6641 (yy::b4_name::parse): Use print_.
6642
6643 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6644
6645 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6646
6647 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6648
6649 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6650 C++ parsers.
6651 (yy::b4_name::parse): Build verbose error messages, and use error_.
6652
6653 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6654
6655 * data/bison.c++: Fix m4 quoting in comments.
6656
6657 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6658
6659 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6660 not expanded by m4.
6661
6662 2002-02-05 Akim Demaille <akim@epita.fr>
6663
6664 * data/bison.c++: Adjust to the M4 back end.
6665 More is certainly needed.
6666
6667 2002-02-05 Akim Demaille <akim@epita.fr>
6668
6669 Give a try to M4 as a back end.
6670
6671 * lib/readpipe.c: New, from wdiff.
6672 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6673 BISON_HAIRY.
6674 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6675 specific values. Now it is m4 that performs the lookup.
6676 * src/parse-skel.y: Remove.
6677 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6678 * src/output.c (actions_output, guards_output)
6679 (token_definitions_output): No longer keeps track of the output
6680 line number, hence remove the second argument.
6681 (guards_output): Check against the guard member of a rule, not the
6682 action member.
6683 Adjust callers.
6684 (output_skeleton): Don't look for the skeleton location, let m4 do
6685 that.
6686 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6687 file will be used.
6688 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6689 (prepare): Given that for the time being changesyntax is not
6690 usable in M4, rename the muscles using `-' to `_'.
6691 Define `defines_flag', `output_parser_name' and `output_header_name'.
6692 * src/output.h (actions_output, guards_output)
6693 (token_definitions_output): Adjust prototypes.
6694 * src/scan-skel.l: Instead of scanning the skeletons, it now
6695 processes the output of m4: `__oline__' and `#output'.
6696 * data/bison.simple: Adjust to be used by M4(sugar).
6697 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6698 to date.
6699 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6700 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6701 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6702 shamelessly stolen from CVS Autoconf.
6703
6704 2002-02-05 Akim Demaille <akim@epita.fr>
6705
6706 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
6707 * configure.in: Check for the declarations of free and malloc.
6708 * src/muscle_tab.c: Adjust.
6709
6710 2002-02-05 Akim Demaille <akim@epita.fr>
6711
6712 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
6713 which have no values.
6714
6715 2002-02-05 Akim Demaille <akim@epita.fr>
6716
6717 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
6718 * data/: here.
6719
6720 2002-01-29 Paul Eggert <eggert@twinsun.com>
6721
6722 * src/bison.simple (YYSIZE_T): Do not define merely because
6723 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
6724 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6725
6726 2002-01-27 Akim Demaille <akim@epita.fr>
6727
6728 Fix `%nonassoc and eof'.
6729
6730 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
6731 which were not properly copied! Replace
6732 memcpy (res->errs, src->errs, src->nerrs);
6733 with
6734 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
6735 !!!
6736 * tests/regression.at (%nonassoc and eof): Adjust to newest
6737 Autotest: `.' is not in the PATH.
6738
6739 2002-01-27 Akim Demaille <akim@epita.fr>
6740
6741 * tests/sets.at (AT_EXTRACT_SETS): New.
6742 (Nullable): Use it.
6743 (Firsts): New.
6744
6745 2002-01-26 Akim Demaille <akim@epita.fr>
6746
6747 * tests/actions.at, tests/calc.at, tests/headers.at,
6748 * tests/torture.at: Adjust to the newest Autotest which no longer
6749 forces `.' in the PATH.
6750
6751 2002-01-25 Akim Demaille <akim@epita.fr>
6752
6753 * tests/regression.at (%nonassoc and eof): New.
6754 Suggested by Robert Anisko.
6755
6756 2002-01-24 Akim Demaille <akim@epita.fr>
6757
6758 Bison dumps core when trying to complain about broken input files.
6759 Reported by Cris van Pelt.
6760
6761 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
6762 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
6763 into...
6764 (Invalid inputs): Strengthen: exercise parse_percent_token.
6765
6766 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
6767
6768 * src/Makefile.am: Add bison.c++.
6769 * src/bison.c++: New skeleton.
6770
6771 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
6772
6773 * po/it.po: New.
6774
6775 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6776
6777 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
6778
6779 2002-01-20 Marc Autret <marc@gnu.org>
6780
6781 * src/files.c (compute_output_file_names): Fix
6782
6783 2002-01-20 Marc Autret <marc@gnu.org>
6784
6785 * tests/output.at: New test.
6786 * src/files.c (compute_base_names): Don't map extensions when
6787 the YACC flag is set, use defaults.
6788 Reported by Evgeny Stambulchik.
6789
6790 2002-01-20 Marc Autret <marc@gnu.org>
6791
6792 * src/system.h: Need to define __attribute__ away for non-GCC
6793 compilers as well (i.e. the vendor C compiler).
6794 Suggested by Albert Chin-A-Young.
6795
6796 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
6797
6798 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
6799 canonical definition.
6800 * src/system.h: Use the canonical definition for PARAMS (avoids
6801 a conflict with the macro from lib/hash.h).
6802
6803 2002-01-11 Akim Demaille <akim@epita.fr>
6804
6805 * configure.in: Use AC_FUNC_STRNLEN.
6806 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
6807
6808 2002-01-09 Akim Demaille <akim@epita.fr>
6809
6810 * src/files.c, src/files.h (output_infix): New.
6811 (tab_extension): Remove.
6812 (compute_base_names): Compute the former, drop the latter.
6813 * src/output.c (prepare): Insert the muscles `output-infix', and
6814 `output-suffix'.
6815 * src/parse-skel.y (string, string.1): New.
6816 (section.header): Use it.
6817 (section.yacc): Remove.
6818 (prefix): Remove too.
6819 * src/scan-skel.l: Adjust.
6820 * src/bison.simple, src/bison.hairy: Adjust.
6821
6822 2002-01-09 Akim Demaille <akim@epita.fr>
6823
6824 * configure.in (WERROR_CFLAGS): Compute it.
6825 * src/Makefile.am (CFLAGS): Pass it.
6826 * tests/atlocal.in (CFLAGS): Idem.
6827 * src/files.c: Fix a few warnings.
6828 (get_extension_index): Remove, unused.
6829
6830 2002-01-08 Akim Demaille <akim@epita.fr>
6831
6832 * src/getargs.c (AS_FILE_NAME): New.
6833 (getargs): Use it to convert DOSish file names.
6834 * src/files.c (base_name): Rename as full_base_name to avoid
6835 clashes with `base_name ()'.
6836 (filename_split): New.
6837 (compute_base_names): N-th rewrite, using filename_split.
6838
6839 2002-01-08 Akim Demaille <akim@epita.fr>
6840
6841 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
6842 New, stolen from the Fileutils 4.1.
6843 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6844 * configure.in: Check for the presence of memrchr, and of its
6845 prototype.
6846
6847 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
6848
6849 * lib/hash.h (__P): Added definition for this macro.
6850 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
6851 BUILT_SOURCES, to ensure they are generated first.
6852 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
6853 %error-verbose to allow bootstrapping with bison 1.30x.
6854
6855 2002-01-06 Akim Demaille <akim@epita.fr>
6856
6857 * src/reader.c (parse_braces): Don't fetch the next char, the
6858 convention is to fetch on entry.
6859 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
6860 'switch' without a following semicolon.
6861 * tests/regression.at (braces parsing): New.
6862
6863 2002-01-06 Akim Demaille <akim@epita.fr>
6864
6865 Bison is dead wrong in its RR conflict reports.
6866
6867 * tests/torture.at (GNU Cim Grammar): New.
6868 * src/conflicts.c (count_rr_conflicts): Fix.
6869
6870 2002-01-06 Akim Demaille <akim@epita.fr>
6871
6872 Creating package.m4 from configure.ac causes too many problems.
6873
6874 * tests/Makefile.am (package.m4): Create it by hand,
6875 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
6876
6877 2002-01-06 Akim Demaille <akim@epita.fr>
6878
6879 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
6880 skeleton.h.
6881
6882 2002-01-04 Paul Eggert <eggert@twinsun.com>
6883
6884 * doc/bison.texinfo (Debugging):
6885 Remove YYSTDERR; it's no longer defined or used.
6886 Also, s/cstdio.h/cstdio/.
6887
6888 2002-01-03 Akim Demaille <akim@epita.fr>
6889
6890 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
6891
6892 2002-01-03 Akim Demaille <akim@epita.fr>
6893
6894 * src/parse-skel.y (process_skeleton): Don't bind the parser's
6895 tracing code to --trace, wait for a better --trace option, with
6896 args.
6897
6898 2002-01-03 Akim Demaille <akim@epita.fr>
6899
6900 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
6901 The ISO C++ standard is extremely clear about it: stderr is
6902 considered a macro, not a regular symbol (see table 94 `Header
6903 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
6904 Therefore std:: does not apply to it. It still does with fprintf.
6905 Also, s/cstdio.h/cstdio/.
6906
6907 2002-01-03 Akim Demaille <akim@epita.fr>
6908
6909 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
6910 for non system headers.
6911
6912 2002-01-02 Akim Demaille <akim@epita.fr>
6913
6914 Equip the skeleton chain with location tracking, runtime trace,
6915 pure parser and scanner.
6916
6917 * src/parse-skel.y: Request a pure parser, locations, and prefix
6918 renaming.
6919 (%union): Having several members with the same type does not help
6920 type mismatches, simplify.
6921 (YYPRINT, yyprint): New.
6922 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
6923 (skel_error): this.
6924 Handle locations.
6925 * src/scan-skel.l: Adjust to these changes.
6926 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
6927 (LOCATION_PRINT, skel_control_t): New.
6928
6929 2001-12-30 Akim Demaille <akim@epita.fr>
6930
6931 * src/parse-skel.y: Get rid of the shift/reduce conflict:
6932 replace `gb' with BLANKS.
6933 * src/scan-skel.l: Adjust.
6934
6935 2001-12-30 Akim Demaille <akim@epita.fr>
6936
6937 * src/system.h: We don't need nor want bcopy.
6938 Throw away MS-DOS crap: we don't need getpid.
6939 * configure.in: We don't need strndup. It was even causing
6940 problems: because Flex includes the headers *before* us,
6941 _GNU_SOURCE is not defined by config.h, and therefore strndup was
6942 not visible.
6943 * lib/xstrndup.c: New.
6944 * src/scan-skel.l: Use it.
6945 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
6946 * src/parse-skel.y: Use %directives instead of #defines.
6947
6948 2001-12-30 Akim Demaille <akim@epita.fr>
6949
6950 * src/skeleton.h: New.
6951 * src/output.c (output_parser, output_master_parser): Remove, dead
6952 code.
6953 * src/output.h (get_lines_number, actions_output, guards_output)
6954 (token_definitions_output): Prototype them.
6955 * src/parse-skel.y: Add the license notice.
6956 Include output.h and skeleton.h.
6957 (process_skeleton): Returns void, and takes a single parameter.
6958 * src/scan-skel.l: Add the license notice.
6959 Include skeleton.h.
6960 Don't use %option yylineno: it seems that then Flex imagines
6961 REJECT has been used, and therefore it won't reallocate its
6962 buffers (which makes no other sense to me than a bug). It results
6963 in warnings for `unused: yy_flex_realloc'.
6964
6965 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
6966
6967 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6968 (MUSCLE_INSERT_PREFIX): ...to there.
6969 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6970 (MUSCLE_INSERT_PREFIX): Move from here...
6971
6972 * src/bison.hairy: Add a section directive. Put braces around muscle
6973 names. This parser skeleton is still broken, but Bison should not
6974 choke on a bad muscle 'syntax'.
6975 * src/bison.simple: Add a section directive. Put braces around muscle
6976 names.
6977
6978 * src/files.h (strsuffix, stringappend): Add declarations.
6979 (tab_extension): Add declaration.
6980 (short_base_name): Add declaration.
6981
6982 * src/files.c (strsuffix, stringappend): No longer static. These
6983 functions are used in the skeleton parser.
6984 (tab_extension): New.
6985 (compute_base_names): Use the computations done in this function
6986 to guess if the generated parsers should have '.tab' in their
6987 names.
6988 (short_base_name): No longer static.
6989
6990 * src/output.c (output_skeleton): New.
6991 (output): Disable call to output_master_parser, and give a try to
6992 a new skeleton handling system.
6993 (guards_output, actions_output): No longer static.
6994 (token_definitions_output, get_lines_number): No longer static.
6995
6996 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
6997
6998 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
6999 parse-skel.y.
7000
7001 * src/parse-skel.y: New file.
7002 * src/scan-skel.l: New file.
7003
7004 2001-12-29 Akim Demaille <akim@epita.fr>
7005
7006 %name-prefix is broken.
7007
7008 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
7009 Adjust all dependencies.
7010 * tests/headers.at (export YYLTYPE): Strengthen this test: use
7011 %name-prefix.
7012
7013 Renaming yylval but not yylloc is not consistent. Now we do.
7014
7015 * src/bison.simple: Prefix yylloc if used.
7016 * doc/bison.texinfo (Decl Summary): Document that.
7017
7018 2001-12-29 Akim Demaille <akim@epita.fr>
7019
7020 * doc/bison.texinfo: Promote `%long-directive' over
7021 `%long_directive'.
7022 Remove all references to fixed-output-files, yacc is enough.
7023
7024 2001-12-29 Akim Demaille <akim@epita.fr>
7025
7026 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
7027 user prologue. These are defaults.
7028 * tests/actions.at (Mid-rule actions): Make sure the user can
7029 define YYDEBUG and YYERROR_VERBOSE.
7030
7031 2001-12-29 Akim Demaille <akim@epita.fr>
7032
7033 * src/output.c (header_output): Don't forget to export YYLTYPE and
7034 yylloc.
7035 * tests/headers.at (export YYLTYPE): New, make sure it does.
7036 * tests/regression.at (%union and --defines, Invalid CPP headers):
7037 Move to...
7038 * tests/headers.at: here.
7039
7040 2001-12-29 Akim Demaille <akim@epita.fr>
7041
7042 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
7043
7044 2001-12-29 Akim Demaille <akim@epita.fr>
7045
7046 * tests/actions.at (Mid-rule actions): Output on a single line
7047 instead of several.
7048
7049 2001-12-29 Akim Demaille <akim@epita.fr>
7050
7051 * doc/bison.texinfo: Formatting changes.
7052
7053 2001-12-29 Akim Demaille <akim@epita.fr>
7054
7055 Don't store the token defs in a muscle, just be ready to output it
7056 on command. Now possible via `symbols'. Fixes a memory leak.
7057
7058 * src/output.c (token_definitions_output): New.
7059 (output_parser, header_output): Use it.
7060 * src/reader.c (symbols_save): Remove.
7061
7062 2001-12-29 Akim Demaille <akim@epita.fr>
7063
7064 * src/bison.simple: Do not provide a default for YYSTYPE and
7065 YYLTYPE before the user's prologue. Otherwise it's hardly... a
7066 default.
7067
7068 2001-12-29 Akim Demaille <akim@epita.fr>
7069
7070 Mid-rule actions are simply... ignored!
7071
7072 * src/reader.c (readgram): Be sure to attach mid-rule actions to
7073 the empty-rule associated to the dummy symbol, not to the host
7074 rule.
7075 * tests/actions.at (Mid-rule actions): New.
7076
7077 2001-12-29 Akim Demaille <akim@epita.fr>
7078
7079 Memory leak.
7080
7081 * src/reader.c (reader): Free grammar.
7082
7083 2001-12-29 Akim Demaille <akim@epita.fr>
7084
7085 Memory leak.
7086
7087 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
7088 since it allocates it for each state, although only one is needed.
7089 (allocate_storage): Do it here.
7090
7091 2001-12-29 Akim Demaille <akim@epita.fr>
7092
7093 * src/options.h, src/options.c (create_long_option_table): Rename
7094 as...
7095 (long_option_table_new): this, with a clearer prototype.
7096 (percent_table): Remove, unused,
7097 * src/getargs.c (getargs): Adjust.
7098
7099 2001-12-29 Akim Demaille <akim@epita.fr>
7100
7101 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
7102 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
7103 as states.
7104
7105 2001-12-29 Akim Demaille <akim@epita.fr>
7106
7107 * src/lalr.c (build_relations): Rename `states' as `states1'.
7108 Sorry, I don't understand exactly what it is, no better name...
7109
7110 2001-12-29 Akim Demaille <akim@epita.fr>
7111
7112 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
7113 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
7114 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
7115 as rules.
7116
7117 2001-12-29 Akim Demaille <akim@epita.fr>
7118
7119 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
7120 ago.
7121
7122 2001-12-29 Akim Demaille <akim@epita.fr>
7123
7124 * src/reader.c, src/reader.h (user_toknums): Remove.
7125 Adjust all users to use symbols[i]->user_token_number.
7126
7127 2001-12-29 Akim Demaille <akim@epita.fr>
7128
7129 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
7130 Adjust all users to use symbols[i]->prec or ->assoc.
7131
7132 2001-12-29 Akim Demaille <akim@epita.fr>
7133
7134 * src/reader.c, src/reader.h (tags): Remove.
7135 Adjust all users to use symbols[i]->tag.
7136
7137 2001-12-29 Akim Demaille <akim@epita.fr>
7138
7139 * src/gram.h, src/gram.c (symbols): New, similar to state_table
7140 and rule_table.
7141 * src/reader.c (packsymbols): Fill this table.
7142 Drop sprec.
7143 * src/conflicts.c (resolve_sr_conflict): Adjust.
7144 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
7145 single table.
7146 Use symbols[i]->tag instead of tags[i].
7147
7148 2001-12-29 Akim Demaille <akim@epita.fr>
7149
7150 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
7151 In addition, put a comment in there, to replace...
7152 * tests/regression.at (%union and C comments): Remove.
7153
7154 2001-12-29 Akim Demaille <akim@epita.fr>
7155
7156 * tests/regression.at (Web2c Actions): Blindly move the actual
7157 output as expected output. The contents *seem* right to me, but I
7158 can't pretend reading perfectly parser tables... Nonetheless, all
7159 the other tests pass correctly, the table look OK, even though the
7160 presence of `$axiom' is to be noted: AFAICS it is useless (but
7161 harmless).
7162
7163 2001-12-29 Akim Demaille <akim@epita.fr>
7164
7165 * src/reader.c (readgram): Don't add the rule 0 if there were no
7166 rules read. In other words, add it _after_ having performed
7167 grammar sanity checks.
7168 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
7169
7170 2001-12-29 Akim Demaille <akim@epita.fr>
7171
7172 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
7173 visible, and some states have now a different number.
7174
7175 2001-12-29 Akim Demaille <akim@epita.fr>
7176
7177 * src/reader.c (readgram): Bind the initial rule's lineno to that
7178 of the first rule.
7179 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
7180 (Solved SR Conflicts): Adjust rule 0's line number.
7181
7182 2001-12-29 Akim Demaille <akim@epita.fr>
7183
7184 Fix the `GAWK Grammar' failure.
7185
7186 * src/LR0.c (final_state): Initialize to -1 so that we do compute
7187 the reductions of the first state which was mistakenly confused
7188 with the final state because precisely final_state was initialized
7189 to 0.
7190 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
7191 now noticed by Bison.
7192 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
7193 have a reduction on $default.
7194
7195 2001-12-29 Akim Demaille <akim@epita.fr>
7196
7197 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
7198 rule line numbers.
7199 * src/closure.c (print_closure): Likewise.
7200 * src/derives.c (print_derives): Likewise.
7201 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
7202 now.
7203
7204 2001-12-29 Akim Demaille <akim@epita.fr>
7205
7206 * src/lalr.c (lookaheads_print): New.
7207 (lalr): Call it when --trace-flag.
7208 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
7209 are dumped.
7210
7211 2001-12-29 Akim Demaille <akim@epita.fr>
7212
7213 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
7214 when walking through ritem, even via rule->rhs.
7215 * src/reduce.c (dump_grammar, useful_production, reduce_output)
7216 (useful_production, useless_nonterminals): Likewise.
7217 (reduce_grammar_tables): Likewise, plus update nritems.
7218 * src/nullable.c (set_nullable): Likewise.
7219 * src/lalr.c (build_relations): Likewise.
7220 * tests/sets.at (Nullable): Adjust.
7221 Fortunately, now, the $axiom is no longer nullable.
7222
7223 2001-12-29 Akim Demaille <akim@epita.fr>
7224
7225 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
7226 the 0-sentinel.
7227 * src/gram.c (ritem_longest_rhs): Likewise.
7228 * src/reduce.c (nonterminals_reduce): Likewise.
7229 * src/print_graph.c (print_graph): Likewise.
7230 * src/output.c (output_rule_data): Likewise.
7231 * src/nullable.c (set_nullable): Likewise.
7232
7233 2001-12-29 Akim Demaille <akim@epita.fr>
7234
7235 * src/output.c: Comment changes.
7236
7237 2001-12-27 Paul Eggert <eggert@twinsun.com>
7238
7239 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
7240 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
7241 Sparc, as they were causing more porting problems than the
7242 (minor) performance improvement was worth.
7243
7244 Also, catch up with 1.31's YYSTD.
7245
7246 2001-12-27 Akim Demaille <akim@epita.fr>
7247
7248 * src/output.c (output_gram): Rely on nritems, not the
7249 0-sentinel. See below.
7250 Use -1 as separator, not 0.
7251 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
7252 Rely on -1 as separator in yyrhs, instead of 0.
7253 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
7254 twice `Now at end of input', therefore there are two lines less to
7255 expect.
7256
7257 2001-12-27 Akim Demaille <akim@epita.fr>
7258
7259 * tests/regression.at (Unresolved SR Conflicts):
7260 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
7261 below.
7262
7263 2001-12-27 Akim Demaille <akim@epita.fr>
7264
7265 * src/LR0.c (new_state): Recognize the final state by the fact it
7266 is reached by eoftoken.
7267 (insert_start_shifting_state, insert_eof_shifting_state)
7268 (insert_accepting_state, augment_automaton): Remove, since now
7269 these states are automatically computed from the initial state.
7270 (generate_states): Adjust.
7271 * src/print.c: When reporting a rule number to the user, substract
7272 1, so that the axiom rule is rule 0, and the first user rule is 1.
7273 * src/reduce.c: Likewise.
7274 * src/print_graph.c (print_core): For the time being, just as for
7275 the report, depend upon --trace-flags to dump the full set of
7276 items.
7277 * src/reader.c (readgram): Once the grammar read, insert the rule
7278 0: `$axiom: START-SYMBOL $'.
7279 * tests/set.at: Adjust: rule 0 is now displayed, and since the
7280 number of the states has changed (the final state is no longer
7281 necessarily the last), catch up.
7282
7283 2001-12-27 Akim Demaille <akim@epita.fr>
7284
7285 Try to make the use of the eoftoken valid. Given that its value
7286 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
7287 is used instead of > 0 where appropriate, (ii), depend upon nritems
7288 instead of the 0-sentinel.
7289
7290 * src/gram.h, src/gram.c (nritems): New.
7291 Expected to be duplication of nitems, but for the time being...
7292 * src/reader.c (packgram): Assert nritems and nitems are equal.
7293 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
7294 * src/closure.c (print_closure, print_fderives): Likewise.
7295 * src/gram.c (ritem_print): Likewise.
7296 * src/print.c (print_core, print_grammar): Likewise.
7297 * src/print_graph.c: Likewise.
7298
7299 2001-12-27 Akim Demaille <akim@epita.fr>
7300
7301 * src/main.c (main): If there are complains after grammar
7302 reductions, then output the report anyway if requested, then die.
7303 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
7304 * src/reader.c (eoftoken): New.
7305 (parse_token_decl): If the token being defined has value `0', it
7306 is the eoftoken.
7307 (packsymbols): No longer hack `tags' to insert `$' by hand.
7308 Be sure to preserve the value of the eoftoken.
7309 (reader): Make sure eoftoken is defined.
7310 Initialize nsyms to 0: now eoftoken is created just like the others.
7311 * src/print.c (print_grammar): Don't special case the eof token.
7312 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
7313 lie anyway, albeit pleasant.
7314 * tests/calc.at: Exercise error messages with eoftoken.
7315 Change the grammar so that empty input is invalid.
7316 Adjust expectations.
7317 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
7318
7319 2001-12-27 Akim Demaille <akim@epita.fr>
7320
7321 * configure.in: Check the protos of strchr ans strspn.
7322 Replace strchr if needed.
7323 * src/system.h: Provide the protos of strchr, strspn and memchr if
7324 missing.
7325 * lib/strchr.c: New.
7326 * src/reader.c (symbols_save): Use strchr.
7327
7328 2001-12-27 Akim Demaille <akim@epita.fr>
7329
7330 * src/print.c, src/print_graph.c (escape): New.
7331 Use it to quote the TAGS outputs.
7332 * src/print_graph.c (print_state): Now errors are in red, and
7333 reductions in green.
7334 Prefer high to wide: output the state number on a line of its own.
7335
7336 2001-12-27 Akim Demaille <akim@epita.fr>
7337
7338 * src/state.h, src/state.c (reductions_new): New.
7339 * src/LR0.c (set_state_table): Let all the states have a
7340 `reductions', even if reduced to 0.
7341 (save_reductions): Adjust.
7342 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
7343 * src/print.c (print_reductions, print_actions): Adjust.
7344 * src/output.c (action_row): Adjust.
7345
7346 2001-12-27 Akim Demaille <akim@epita.fr>
7347
7348 * src/state.h, src/state.c (errs_new, errs_dup): New.
7349 * src/LR0.c (set_state_table): Let all the states have an errs,
7350 even if reduced to 0.
7351 * src/print.c (print_errs, print_reductions): Adjust.
7352 * src/output.c (output_actions, action_row): Adjust.
7353 * src/conflicts.c (resolve_sr_conflict): Adjust.
7354
7355 2001-12-27 Akim Demaille <akim@epita.fr>
7356
7357 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
7358
7359 2001-12-27 Akim Demaille <akim@epita.fr>
7360
7361 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
7362 * src/print.c: here.
7363 (lookaheadset, shiftset): New, used as additional storage by
7364 print_reductions.
7365 (print_results): Adjust.
7366 (print_shifts, print_gotos, print_errs): New, extracted from...
7367 (print_actions): here.
7368 * src/print_graph.c (print_actions): Remove dead code.
7369
7370 2001-12-27 Akim Demaille <akim@epita.fr>
7371
7372 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
7373 `$n' and `@n'.
7374
7375 2001-12-27 Akim Demaille <akim@epita.fr>
7376
7377 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
7378 (build_relations): Adjust.
7379
7380 2001-12-27 Akim Demaille <akim@epita.fr>
7381
7382 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
7383 duplication.
7384
7385 2001-12-27 Akim Demaille <akim@epita.fr>
7386
7387 * src/reader.c (packgram): Catch nitems overflows.
7388
7389 2001-12-27 Akim Demaille <akim@epita.fr>
7390
7391 * src/files.c, src/files.h (guard_obstack): Remove.
7392 * src/output.c (output): Adjust.
7393 * src/reader.c (parse_braces): New, factoring...
7394 (copy_action, copy_guard): these two which are renamed as...
7395 (parse_action, parse_guard): these.
7396 As a voluntary consequence, using braces around guards is now
7397 mandatory.
7398
7399 2001-12-27 Akim Demaille <akim@epita.fr>
7400
7401 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
7402 * src/reader.c (symbol_list): `guard' and `guard_line' are new
7403 members.
7404 (symbol_list_new): Adjust.
7405 (copy_action): action_line is the first line, not the last.
7406 (copy_guard): Just as for actions, store the `action' only, not
7407 the switch/case/break flesh.
7408 Don't parse the user action that might follow the guard, let...
7409 (readgram): do it, i.e., now, there can be an action after a
7410 guard.
7411 In other words the guard is just explicitly optional.
7412 (packgram): Adjust.
7413 * src/output.c (guards_output): New.
7414 (output_parser): Call it when needed.
7415 (output): Also free the guard and attrs obstacks.
7416 * src/files.c, src/files.h (obstack_save): Remove.
7417 (output_files): Remove.
7418 As a result, if one needs the former `.act' file, using an
7419 appropriate skeleton which requires actions and guards is now
7420 required.
7421 * src/main.c (main): Adjust.
7422 * tests/semantic.at: New.
7423 * tests/regression.at: Use `input.y' as input file name.
7424 Avoid 8+3 problems by requiring input.c when the test needs the
7425 parser.
7426
7427 2001-12-27 Akim Demaille <akim@epita.fr>
7428
7429 * src/reader.c (symbol_list_new): Be sure to initialize all the
7430 fields.
7431
7432 2001-12-27 Akim Demaille <akim@epita.fr>
7433
7434 All the hacks using a final pseudo state are now useless.
7435
7436 * src/LR0.c (set_state_table): state_table holds exactly nstates.
7437 * src/lalr.c (nLA): New.
7438 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
7439 instead of lookaheadsp from the pseudo state (nstate + 1).
7440
7441 2001-12-27 Akim Demaille <akim@epita.fr>
7442
7443 * src/output.c (action_row, token_actions): Use a state_t instead
7444 of a integer, and nlookaheads instead of the following state's
7445 lookaheadsp.
7446
7447 2001-12-27 Akim Demaille <akim@epita.fr>
7448
7449 * src/conflicts.c (log_resolution, flush_shift)
7450 (resolve_sr_conflict, set_conflicts, solve_conflicts)
7451 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
7452 (conflicts_print, print_reductions): Use a state_t instead of an
7453 integer when referring to a state.
7454 As much as possible, depend upon nlookaheads, instead of the
7455 `lookaheadsp' member of the following state (since lookaheads of
7456 successive states are successive, the difference between state n + 1
7457 and n served as the number of lookaheads for state n).
7458 * src/lalr.c (add_lookback_edge): Likewise.
7459 * src/print.c (print_core, print_actions, print_state)
7460 (print_results): Likewise.
7461 * src/print_graph.c (print_core, print_actions, print_state)
7462 (print_graph): Likewise.
7463 * src/conflicts.h: Adjust.
7464
7465 2001-12-27 Akim Demaille <akim@epita.fr>
7466
7467 * src/bison.hairy: Formatting/comment changes.
7468 ANSIfy.
7469 Remove `register' indications.
7470 Add plenty of `static'.
7471
7472 2001-12-27 Akim Demaille <akim@epita.fr>
7473
7474 * src/output.c (prepare): Drop the muscle `ntbase' which
7475 duplicates ntokens.
7476 * src/bison.simple: Formatting/comment changes.
7477 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
7478 is an undocumented synonym.
7479
7480 2001-12-22 Akim Demaille <akim@epita.fr>
7481
7482 * src/output.c (output_table_data): Change the prototype to use
7483 `int' for array ranges: some invocations do pass an int, not a
7484 short.
7485 Reported by Wayne Green.
7486
7487 2001-12-22 Akim Demaille <akim@epita.fr>
7488
7489 Some actions of web2c.y are improperly triggered.
7490 Reported by Mike Castle.
7491
7492 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
7493 * tests/regression.at (Web2c): Rename as...
7494 (Web2c Report): this.
7495 (Web2c Actions): New.
7496
7497 2001-12-22 Akim Demaille <akim@epita.fr>
7498
7499 Reductions in web2c.y are improperly reported.
7500 Reported by Mike Castle.
7501
7502 * src/conflicts.c (print_reductions): Fix.
7503 * tests/regression.at (Web2c): New.
7504
7505 2001-12-18 Akim Demaille <akim@epita.fr>
7506
7507 Some host fail on `assert (!"foo")', which expands to
7508 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
7509 Reported by Nelson Beebee.
7510
7511 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
7512 `#define it_succeeded 0' and `assert (it_succeeded)'.
7513
7514 2001-12-17 Marc Autret <autret_m@epita.fr>
7515
7516 * src/bison.simple: Don't hard code the skeleton line and filename.
7517 * src/output.c (output_parser): Rename 'line' as 'output_line'.
7518 New line counter 'skeleton_line' (skeleton-line muscle).
7519
7520 2001-12-17 Paul Eggert <eggert@twinsun.com>
7521
7522 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
7523 YYDEBUG must be defined to a nonzero value.
7524
7525 * src/bison.simple (yytname): Do not assume that the user defines
7526 YYDEBUG to a properly parenthesized expression.
7527
7528 2001-12-17 Akim Demaille <akim@epita.fr>
7529
7530 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
7531 nlookaheads is a new member.
7532 Adjust all users.
7533 * src/lalr.h (nlookaheads): Remove this orphan declaration.
7534 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
7535 state.
7536
7537 2001-12-17 Akim Demaille <akim@epita.fr>
7538
7539 * src/files.h, src/files.c (open_files, close_files): Remove.
7540 * src/main.c (main): Don't open/close files, nor invoke lex_free,
7541 let...
7542 * src/reader.c (reader): Do it.
7543
7544 2001-12-17 Akim Demaille <akim@epita.fr>
7545
7546 * src/conflicts.c (print_reductions): Formatting changes.
7547
7548 2001-12-17 Akim Demaille <akim@epita.fr>
7549
7550 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
7551 (flush_reduce): New.
7552 (resolve_sr_conflict): Adjust.
7553
7554 2001-12-17 Akim Demaille <akim@epita.fr>
7555
7556 * src/output.c (output_obstack): Be static and rename as...
7557 (format_obstack): this, to avoid any confusion with files.c's
7558 output_obstack.
7559 * src/reader.h (muscle_obstack): Move to...
7560 * src/output.h: here, since it's defined in output.c.
7561
7562 2001-12-17 Akim Demaille <akim@epita.fr>
7563
7564 * src/output.c (action_row, save_column, default_goto)
7565 (sort_actions, matching_state, pack_vector): Better variable
7566 locality.
7567
7568 2001-12-17 Akim Demaille <akim@epita.fr>
7569
7570 * src/output.c: Various formatting changes.
7571
7572 2001-12-17 Akim Demaille <akim@epita.fr>
7573
7574 * src/files.c (output_files): Free the output_obstack.
7575 * src/main.c (main): Call print and print_graph conditionally.
7576 * src/print.c (print): Work unconditionally.
7577 * src/print_graph.c (print_graph): Work unconditionally.
7578 * src/conflicts.c (log_resolution): Output only if verbose_flag.
7579
7580 2001-12-16 Marc Autret <autret_m@epita.fr>
7581
7582 * src/output.c (actions_output): Fix. When we use %no-lines,
7583 there is one less line per action.
7584
7585 2001-12-16 Marc Autret <autret_m@epita.fr>
7586
7587 * src/bison.simple: Remove a useless #line directive.
7588 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
7589 * src/output.c (get_lines_number): New.
7590 (output_parser): Adjust, now takes care about the lines of a
7591 output muscles.
7592 Fix line numbering.
7593 (actions_output): Computes the number of lines taken by actions.
7594 (output_master_parser): Insert new skeleton which is the name of
7595 the output parser file name.
7596
7597 2001-12-15 Marc Autret <autret_m@epita.fr>
7598
7599 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
7600
7601 2001-12-15 Marc Autret <autret_m@epita.fr>
7602
7603 * src/output.c (output_gram): Keep track of the hairy one.
7604
7605 2001-12-15 Akim Demaille <akim@epita.fr>
7606
7607 Make `make distcheck' work.
7608
7609 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
7610 system.h which uses libgettext.h.
7611
7612 2001-12-15 Akim Demaille <akim@epita.fr>
7613
7614 * src/nullable.c (set_nullable): Useless rules must be skipped,
7615 otherwise, since we range over their symbols, we might look at a
7616 nonterminal which no longer ``exists'', i.e., it is not counted in
7617 `nvars', hence we overflow our arrays.
7618
7619 2001-12-15 Akim Demaille <akim@epita.fr>
7620
7621 The header can also be produced directly, without any obstack!
7622 Yahoo!
7623
7624 * src/files.c, src/files.h (defines_obstack): Remove.
7625 (compute_header_macro): Global.
7626 (defines_obstack_save): Remove.
7627 * src/reader.c (parse_union_decl): No longer output to
7628 defines_obstack: its content can be found in the `stype' muscle
7629 anyway.
7630 (output_token_translations): Merge into...
7631 (symbols_output): this.
7632 Rename as...
7633 (symbols_save): this.
7634 (reader): Adjust.
7635 * src/output.c (header_output): New.
7636 (output): Call it.
7637
7638 2001-12-15 Akim Demaille <akim@epita.fr>
7639
7640 * src/reader.c (parse_union_decl): Instead of handling two obstack
7641 simultaneously, use one to define the `stype' muscle, and use the
7642 value of the latter to fill defines_obstack.
7643 (copy_comment): Remove.
7644 (copy_comment2): Work for a single obstack.
7645 Rename as...
7646 (copy_comment): this.
7647
7648 2001-12-15 Akim Demaille <akim@epita.fr>
7649
7650 * src/lex.c, src/lex.h (xgetc): No longer static.
7651 * src/reader.c (parse_union_decl): Revamp.
7652
7653 2001-12-15 Akim Demaille <akim@epita.fr>
7654
7655 Still making progress in separating Bison into (i) input, (ii)
7656 process, (iii) output: now we can directly output the parser file
7657 without using table_obstack at all.
7658
7659 * src/files.c, src/files.h (table_obstack): Bye bye.
7660 (parser_file_name): New.
7661 * src/files.c (compute_output_file_names): Compute it.
7662 * src/output.c (actions_output, output_parser)
7663 (output_master_parser): To a file instead of an obstack.
7664
7665 2001-12-15 Akim Demaille <akim@epita.fr>
7666
7667 Attach actions to rules, instead of pre-outputting them to
7668 actions_obstack.
7669
7670 * src/gram.h (rule_t): action and action_line are new members.
7671 * src/reader.c (symbol_list): Likewise.
7672 (copy_action): Save the actions within the rule.
7673 (packgram): Save them in rule_table.
7674 * src/output.c (actions_output): New.
7675 (output_parser): Use it on `%%actions'.
7676 (output_rule_data): Don't free rule_table.
7677 (output): Do it.
7678 (prepare): Don't save the `action' muscle.
7679 * src/bison.simple: s/%%action/%%actions/.
7680
7681 2001-12-15 Akim Demaille <akim@epita.fr>
7682
7683 * src/reader.c (copy_action): When --yacc, don't append a `;'
7684 to the user action: let it fail if lacking.
7685 Suggested by Arnold Robbins and Tom Tromey.
7686
7687 2001-12-14 Akim Demaille <akim@epita.fr>
7688
7689 * src/lex.c (literalchar): Simply return the char you decoded, non
7690 longer mess around with obstacks and int pointers.
7691 Adjust all callers.
7692
7693 2001-12-14 Akim Demaille <akim@epita.fr>
7694
7695 * src/lex.c (literalchar): Don't escape the special characters,
7696 just decode them, and keep them as char (before, eol was output as
7697 the 2 char string `\n' etc.).
7698 * src/output.c (output_rule_data): Use quotearg to output the
7699 token strings.
7700
7701 2001-12-13 Paul Eggert <eggert@twinsun.com>
7702
7703 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
7704 Do not infringe on the global user namespace when using C++.
7705 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
7706 All uses of `fprintf' and `stderr' changed.
7707
7708 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
7709
7710 2001-12-13 Akim Demaille <akim@epita.fr>
7711
7712 The computation of nullable is broken: it doesn't handle empty
7713 RHS's properly.
7714
7715 * tests/torture.at (GNU AWK Grammar): New.
7716 * tests/sets.at (Nullable): New.
7717 * src/nullable.c (set_nullable): Instead of blindly looping over
7718 `ritems', loop over the rules, and then over their rhs's.
7719
7720 Work around Autotest bugs.
7721
7722 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
7723 frame, because Autotest understand lines starting with a `+' as
7724 traces from the shell. Then, they are not processed properly.
7725 Admittedly an Autotest bug, but we don't have time to wait for
7726 Autotest to catch up.
7727 * tests/regression.at (Broken Closure): Adjust to the new table
7728 frames.
7729 Move to...
7730 * tests/sets.at: here.
7731
7732 2001-12-13 Akim Demaille <akim@epita.fr>
7733
7734 * src/closure.c (closure): Use nrules instead of playing tricks
7735 with BITS_PER_WORD.
7736
7737 2001-12-13 Akim Demaille <akim@epita.fr>
7738
7739 * src/print.c (print_actions): Output the handling of `$' as the
7740 traces do: shifting the token EOF. Before EOF was treated as a
7741 nonterminal.
7742 * tests/regression.at: Adjust some tests.
7743 * src/print_graph.c (print_core): Complete the set of items via
7744 closure. The next-to-final and final states are still unsatisfying,
7745 but that's to be addressed elsewhere.
7746 No longer output the rule numbers, but do output the state number.
7747 A single loop for the shifts + gotos is enough, but picked a
7748 distinct color for each.
7749 (print_graph): Initialize and finalize closure.
7750
7751 2001-12-13 Akim Demaille <akim@epita.fr>
7752
7753 * src/reader.c (readgram): Remove dead code, an strip useless
7754 braces.
7755 (get_type): Remove, unused.
7756
7757 2001-12-12 Akim Demaille <akim@epita.fr>
7758
7759 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
7760 on that of lib/error.c.
7761
7762 2001-12-12 Akim Demaille <akim@epita.fr>
7763
7764 Some hosts don't like `/' in includes.
7765
7766 * src/system.h: Include libgettext.h without qualifying the path.
7767 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
7768 $(top_srcdir).
7769
7770 2001-12-11 Marc Autret <autret_m@epita.fr>
7771
7772 * src/output.c (output_parser): Remove useless muscle.
7773
7774 2001-12-11 Marc Autret <autret_m@epita.fr>
7775
7776 * src/bison.simple: Remove #line just before %%epilogue. It
7777 is now handled in ...
7778 * src/reader.c (read_additionnal_code): Add the output of a
7779 #line for the epilogue.
7780
7781 2001-12-10 Marc Autret <autret_m@epita.fr>
7782
7783 * src/reader.c (copy_definition): Re-use CPP-outed code which
7784 replace precedent remove.
7785 * src/bison.simple: Remove #line before %%prologue because
7786 %%input-line is wrong at this time.
7787
7788 2001-12-10 Marc Autret <autret_m@epita.fr>
7789
7790 * src/reader.c (symbols_output): Clean up.
7791 * src/output.c (output_gram, output): Clean up.
7792
7793 2001-12-10 Akim Demaille <akim@epita.fr>
7794
7795 * src/lalr.c (initialize_lookaheads): New. Extracted from...
7796 * src/LR0.c (set_state_table): here.
7797 * src/lalr.c (lalr): Call it.
7798
7799 2001-12-10 Akim Demaille <akim@epita.fr>
7800
7801 * src/state.h (shifts): Remove the `number' member: shifts are
7802 attached to state, hence no longer need to be labelled with a
7803 state number.
7804
7805 2001-12-10 Akim Demaille <akim@epita.fr>
7806
7807 Now that states have a complete set of members, the linked list of
7808 shifts is useless: just fill directly the state's shifts member.
7809
7810 * src/state.h (shifts): Remove the `next' member.
7811 * src/LR0.c (first_state, last_state): Remove.
7812 Adjust the callers.
7813 (augment_automaton): Don't look for the shifts that must be added
7814 a shift on EOF: it is those of the state we looked for! But now,
7815 since shifts are attached, it is no longer needed to looking
7816 merely by its id: its number.
7817
7818 2001-12-10 Akim Demaille <akim@epita.fr>
7819
7820 * src/LR0.c (augment_automaton): Better variable locality.
7821 Remove an impossible branch: if there is a state corresponding to
7822 the start symbol being shifted, then there is shift for the start
7823 symbol from the initial state.
7824
7825 2001-12-10 Akim Demaille <akim@epita.fr>
7826
7827 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
7828 only when appropriate: when insert_start_shifting_state' is not
7829 invoked.
7830 * tests/regression.at (Rule Line Numbers): Adjust.
7831
7832 2001-12-10 Akim Demaille <akim@epita.fr>
7833
7834 * src/LR0.c (augment_automaton): Now that all states have shifts,
7835 merge the two cases addition shifts to the initial state.
7836
7837 2001-12-10 Akim Demaille <akim@epita.fr>
7838
7839 * src/lalr.c (set_state_table): Move to...
7840 * src/LR0.c: here.
7841 * src/lalr.c (lalr): Don't call it...
7842 * src/LR0.c (generate_states): do it.
7843 * src/LR0.h (first_state): Remove, only the table is used.
7844
7845 2001-12-10 Akim Demaille <akim@epita.fr>
7846
7847 * src/LR0.h (first_shift, first_reduction): Remove.
7848 * src/lalr.c: Don't use first_shift: find shifts through the
7849 states.
7850
7851 2001-12-10 Akim Demaille <akim@epita.fr>
7852
7853 * src/LR0.c: Attach shifts to states as soon as they are
7854 computed.
7855 * src/lalr.c (set_state_table): Instead of assigning shifts to
7856 state, just assert that the mapping was properly done.
7857
7858 2001-12-10 Akim Demaille <akim@epita.fr>
7859
7860 * src/LR0.c (insert_start_shift): Rename as...
7861 (insert_start_shifting_state): this.
7862 (insert_eof_shifting_state, insert_accepting_state): New.
7863 (augment_automaton): Adjust.
7864 Better locality of the variables.
7865 When looking if the start_symbol is shifted from the initial
7866 state, using `while (... symbol != start_symbol ...)' sounds
7867 better than `while (... symbol < start_symbol ...)': If fail
7868 to see how the order between symbols could be relevant!
7869
7870 2001-12-10 Akim Demaille <akim@epita.fr>
7871
7872 * src/getargs.h: Don't declare `spec_name_prefix' and
7873 `spec_file_prefix', declared by src/files.h.
7874 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
7875 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
7876 * src/output.c (prepare): Adjust.
7877 * src/reader.c (symbols_output): Likewise.
7878 * src/vmsgetargs.c: Vaguely adjust, but who cares?
7879
7880 2001-12-10 Akim Demaille <akim@epita.fr>
7881
7882 * src/muscle_tab.c (muscle_init): NULL is a better default than
7883 `"0"'.
7884
7885 2001-12-10 Akim Demaille <akim@epita.fr>
7886
7887 * src/reader.c (reader): Calling symbols_output once is enough.
7888
7889 2001-12-10 Akim Demaille <akim@epita.fr>
7890
7891 Now that states have a complete set of members, the linked list of
7892 reductions is useless: just fill directly the state's reductions
7893 member.
7894
7895 * src/state.h (struct reductions): Remove member `number' and
7896 `next'.
7897 * src/LR0.c (first_reduction, last_reduction): Remove.
7898 (save_reductions): Don't link the new reductions, store them in
7899 this_state.
7900 * src/lalr.c (set_state_table): No need to attach reductions to
7901 states, it's already done.
7902 * src/output.c (output_actions): No longer free the shifts, then
7903 the reductions, then the states: free all the states and their
7904 members.
7905
7906 2001-12-10 Akim Demaille <akim@epita.fr>
7907
7908 * src/options.c (OPTN, DRTV, BOTH): New.
7909 (option_table): Use them.
7910
7911 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
7912 the job of system.h.
7913 * src/options.c: Don't include stdio.h and xalloc.h for the same
7914 reasons.
7915
7916 2001-12-10 Akim Demaille <akim@epita.fr>
7917
7918 * src/output.c (output, prepare): Make sure the values of the
7919 muscles `action' and `prologue' are 0-terminated.
7920
7921 2001-12-10 Akim Demaille <akim@epita.fr>
7922
7923 Clean up GCC warnings.
7924
7925 * src/reader.c (copy_action): `buf' is not used.
7926 (parse_skel_decl): Be static.
7927 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
7928 * src/options.h (create_long_option_table): Have a real prototype.
7929 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
7930 (hash_delete_at): Return const void *.
7931 Adjust casts to preserve the const.
7932
7933 2001-12-10 Akim Demaille <akim@epita.fr>
7934
7935 * configure.in: Require 2.52g.
7936 M4 is not needed, but AUTOM4TE is.
7937 * m4/m4.m4: Remove.
7938 * tests/Makefile.am: Adjust.
7939
7940 2001-12-10 Akim Demaille <akim@epita.fr>
7941
7942 One structure for states is enough, even though theoretically
7943 there are LR(0) states and LALR(1) states.
7944
7945 * src/lalr.h (state_t): Remove.
7946 (state_table): Be state_t **, not state_t *.
7947 * src/state.h (core, CORE_ALLOC): Rename as...
7948 (state_t, STATE_ALLOC): this.
7949 Add the LALR(1) members: shifts, reductions, errs.
7950 * src/LR0.c (state_table): Rename as...
7951 (state_hash): this, to avoid name clashes with the global
7952 `state_table'.
7953 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
7954 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
7955
7956 2001-12-10 Akim Demaille <akim@epita.fr>
7957
7958 Bison dumps core on bash.y.
7959 Reported by Pascal Bart.
7960
7961 * src/warshall.c (bitmatrix_print): New.
7962 (TC): Use it.
7963 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
7964 j must be the outer loop.
7965 * tests/regression.at (Broken Closure): New.
7966
7967 2001-12-05 Akim Demaille <akim@epita.fr>
7968
7969 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
7970 its argument.
7971 Reported by Peter Hamorsky.
7972
7973 2001-12-05 Akim Demaille <akim@epita.fr>
7974
7975 * src/conflicts.c (err_table): Remove.
7976 (resolve_sr_conflict): Adjust.
7977 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
7978 Rename as...
7979 (state_t.reductions, state_t.shifts): this.
7980
7981 2001-12-05 Akim Demaille <akim@epita.fr>
7982
7983 * src/reduce.c (reduce_grammar_tables): No longer disable the
7984 removal of useless rules via CPP but via `if (0)', so that the
7985 compiler still check the code is valid.
7986 For instance, it should have noticed `rline' no longer exists: use
7987 the `line' member of rule_t.
7988 * src/gram.c (dummy, rline): Remove, unused.
7989
7990 2001-12-05 Akim Demaille <akim@epita.fr>
7991
7992 * src/output.c (pack_vector): Use assert, not berror.
7993 * src/main.c (berror): Remove, unused.
7994
7995 2001-12-05 Akim Demaille <akim@epita.fr>
7996
7997 New experimental feature: if --verbose --trace output all the
7998 items of a state, not only its kernel.
7999
8000 * src/print.c (print_core): If `trace_flag', then invoke closure
8001 before outputting the items of the state (print_core is no longer
8002 a correct name them).
8003 (print_results): Invoke new_closure/free_closure if needed.
8004
8005 2001-12-05 Akim Demaille <akim@epita.fr>
8006
8007 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
8008 * src/closure.c, src/closure.h (itemsetsize): Rename as...
8009 (nitemset): for consistency with the rest of the project.
8010
8011 2001-12-05 Akim Demaille <akim@epita.fr>
8012
8013 * src/closure.c (print_closure): Improve.
8014 (closure): Use it for printing input and output.
8015
8016 2001-12-05 Akim Demaille <akim@epita.fr>
8017
8018 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
8019 indexed by nonterminals.
8020
8021 2001-12-05 Akim Demaille <akim@epita.fr>
8022
8023 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
8024 what it was!).
8025 * src/warshall.h: Remove accidental duplication of the content.
8026
8027 2001-12-05 Akim Demaille <akim@epita.fr>
8028
8029 * src/closure.c (set_fderives): De-obfuscate.
8030
8031 2001-12-05 Akim Demaille <akim@epita.fr>
8032
8033 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
8034
8035 2001-12-05 Akim Demaille <akim@epita.fr>
8036
8037 * src/closure.c (set_firsts): De-obfuscate.
8038
8039 2001-12-05 Akim Demaille <akim@epita.fr>
8040
8041 * src/output.c (action_row): De-obfuscate
8042 using the good o' techniques: arrays not pointers, variable
8043 locality, BITISSET, RESETBIT etc.
8044
8045 2001-12-05 Akim Demaille <akim@epita.fr>
8046
8047 Pessimize the code to simplify it: from now on, all the states
8048 have a valid SHIFTS, which NSHIFTS is possibly 0.
8049
8050 * src/LR0.c (shifts_new): Be global and move to..
8051 * src/state.c, src/state.h: here.
8052 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
8053 * src/print_graph: Adjust.
8054
8055 2001-12-05 Akim Demaille <akim@epita.fr>
8056
8057 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
8058 * src/conflicts.c: Use it.
8059 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
8060 incorrectly ``simplified''.
8061
8062 2001-12-05 Akim Demaille <akim@epita.fr>
8063
8064 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
8065 using the good o' techniques: arrays not pointers, variable
8066 locality, BITISSET, RESETBIT etc.
8067
8068 2001-12-05 Akim Demaille <akim@epita.fr>
8069
8070 * src/state.h (SHIFT_SYMBOL): New.
8071 * src/conflicts.c: Use it to deobfuscate.
8072
8073 2001-12-05 Akim Demaille <akim@epita.fr>
8074
8075 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
8076 (print_reductions): De-obfuscate using the good o' techniques:
8077 arrays not pointers, variable locality, BITISSET.
8078
8079 2001-12-05 Akim Demaille <akim@epita.fr>
8080
8081 * src/conflicts.c (print_reductions): Arrays, not pointers.
8082 Use BITISSET.
8083
8084 2001-12-05 Akim Demaille <akim@epita.fr>
8085
8086 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8087
8088 2001-12-05 Akim Demaille <akim@epita.fr>
8089
8090 * src/conflicts.c (print_reductions): Improve variable locality.
8091
8092 2001-12-05 Akim Demaille <akim@epita.fr>
8093
8094 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8095
8096 2001-12-05 Akim Demaille <akim@epita.fr>
8097
8098 * src/conflicts.c (print_reductions): Improve variable locality.
8099
8100 2001-12-05 Akim Demaille <akim@epita.fr>
8101
8102 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
8103 * src/lalr.c: Use them.
8104
8105 2001-12-05 Akim Demaille <akim@epita.fr>
8106
8107 * src/LR0.c (augment_automaton): Formatting changes.
8108 Better variable locality.
8109
8110 2001-12-05 Akim Demaille <akim@epita.fr>
8111
8112 * src/lalr.c (matrix_print): New.
8113 (transpose): Use it.
8114 Use arrays instead of pointers.
8115
8116 2001-12-05 Akim Demaille <akim@epita.fr>
8117
8118 * src/lalr.c (maxrhs): Move to...
8119 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
8120 * src/lalr.c (build_relations): Adjust.
8121
8122 2001-12-05 Akim Demaille <akim@epita.fr>
8123
8124 * src/lalr.c (transpose): Free the memory allocated to the
8125 argument, as it is replaced by the results by the unique caller.
8126 (build_relations): Merely invoke transpose: it handles the memory
8127 deallocation.
8128 Improve variable locality.
8129 Avoid variables used as mere abbreviations.
8130 (compute_lookaheads): Use arrays instead of pointers.
8131
8132 2001-12-05 Akim Demaille <akim@epita.fr>
8133
8134 * src/lalr.c (initialize_F): Improve variable locality.
8135 Avoid variables used as mere abbreviations.
8136
8137 2001-12-05 Akim Demaille <akim@epita.fr>
8138
8139 * src/derives.c (print_derives): Display the ruleno.
8140 * src/lalr.c (initialize_F, transpose): Better variable locality
8141 to improve readability.
8142 Avoid variables used as mere abbreviations.
8143
8144 2001-12-05 Akim Demaille <akim@epita.fr>
8145
8146 * src/lalr.c (traverse): Use arrays instead of pointers.
8147
8148 2001-12-05 Akim Demaille <akim@epita.fr>
8149
8150 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
8151 the handling of squeue.
8152 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8153
8154 2001-12-05 Akim Demaille <akim@epita.fr>
8155
8156 Because useless nonterminals are now kept alive (instead of being
8157 `destroyed'), we now sometimes examine them, and store information
8158 related to them. Hence we need to know their number, and adjust
8159 memory allocations.
8160
8161 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
8162 static.
8163 * src/LR0.c (allocate_itemsets): The memory allocated to
8164 `symbol_count' was used for two different purpose: once to count
8165 the number of occurrences of each symbol, and later reassigned to
8166 `shift_symbol', containing the symbol that can be shifted from a
8167 given state.
8168 Deobfuscate, i.e., allocate, use and free `symbol_count' here
8169 only, and...
8170 (new_itemsets): Allocate `shift_symbol' here.
8171 (allocate_itemsets): symbol_count includes useless nonterminals.
8172 Make room for them.
8173 (free_storage): Use `free', not `XFREE', for pointers that cannot
8174 be null.
8175
8176 2001-12-05 Akim Demaille <akim@epita.fr>
8177
8178 * src/nullable.c (set_nullable): Deobfuscate the handling of
8179 ritem.
8180 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8181
8182 2001-12-05 Akim Demaille <akim@epita.fr>
8183
8184 * src/gram.c, src/gram.h (ritem_print): New.
8185 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
8186 (This useless function was defined only to work around VMS linkers
8187 that can't handle compilation units with variables only).
8188 * src/reduce.c (dump_grammar): Use it to trace the construction of
8189 ritem.
8190
8191 2001-12-04 Paul Eggert <eggert@twinsun.com>
8192
8193 * src/bison.simple (union yyalloc): Change member names
8194 to be the same as the stack names.
8195 (yyparse): yyptr is now union yyalloc *, not char *.
8196 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
8197 and may generate better code on some machines.
8198 (yystpcpy): Use prototype if __STDC__ is defined, not just
8199 if __cplusplus is defined.
8200
8201 2001-11-30 Akim Demaille <akim@epita.fr>
8202
8203 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
8204 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
8205 Gettext doesn't compile cleanly, and dies with -Werror.
8206 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
8207 Include WARNING_CFLAGS here.
8208 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
8209 before being defined.
8210
8211 2001-11-27 Paul Eggert <eggert@twinsun.com>
8212
8213 * lib/quotearg.h (quotearg_n, quotearg_n_style):
8214 First arg is int, not unsigned.
8215 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
8216 (SIZE_MAX, UINT_MAX): New macros.
8217 (quotearg_n_options): Abort if N is negative.
8218 Avoid overflow check on hosts where size_t is 64 bits and int
8219 is 32 bits, as overflow is impossible there.
8220 Fix off-by-one typo that caused unnecessary reallocation.
8221
8222 2001-11-29 Paul Eggert <eggert@twinsun.com>
8223
8224 Name space cleanup in generated parser.
8225
8226 * doc/bison.texinfo (Bison Parser): Discuss system headers
8227 and their effect on the user name space.
8228
8229 * src/bison.simple:
8230 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
8231 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
8232 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
8233
8234 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
8235 on user names when possible.
8236
8237 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
8238 Simplify test for whather <alloca.h> exists.
8239
8240 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
8241
8242 (<stdio.h>): Include if YYDEBUG.
8243
8244 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
8245 ! defined (yyoverflow) && ! defined (yymemcpy).
8246
8247 (yymemcpy, yyparse): Rename local variables as needed so that
8248 they all begin with 'yy'.
8249
8250 (yystrlen, yystpcpy): New functions.
8251
8252 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
8253 All uses changed.
8254
8255 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
8256 instead of relying on string.h functions. Use YYSTACK_ALLOC
8257 and YYSTACK_FREE instead of malloc and free.
8258
8259 2001-11-30 Akim Demaille <akim@epita.fr>
8260
8261 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
8262 before their first uses.
8263 (YYBISON, YYPURE): Move to the top of the output.
8264
8265 2001-11-30 Akim Demaille <akim@epita.fr>
8266
8267 * tests/reduce.at (Useless Nonterminals): Fix.
8268
8269 2001-11-30 Akim Demaille <akim@epita.fr>
8270
8271 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
8272 if body instead of `;' to pacify GCC's warnings.
8273
8274 2001-11-30 Akim Demaille <akim@epita.fr>
8275
8276 Instead of mapping the LHS of unused rules to -1, keep the LHS
8277 valid, but flag the rules as invalid.
8278
8279 * src/gram.h (rule_t): `useful' is a new member.
8280 * src/print.c (print_grammar): Adjust.
8281 * src/derives.c (set_derives): Likewise.
8282 * src/reader.c (packgram, reduce_output): Likewise.
8283 * src/reduce.c (reduce_grammar_tables): Likewise.
8284 * tests/reduce.at (Underivable Rules, Useless Rules): New.
8285
8286 2001-11-30 Akim Demaille <akim@epita.fr>
8287
8288 * src/reduce.c (reduce_output): Formatting changes.
8289 * src/print.c (print_results, print_grammar): Likewise.
8290 * tests/regression.at (Rule Line Numbers)
8291 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
8292
8293 2001-11-30 Akim Demaille <akim@epita.fr>
8294
8295 * src/reduce.c (nonterminals_reduce): Instead of throwing away
8296 useless nonterminals, move them at the end of the symbol arrays.
8297 (reduce_output): Adjust.
8298 * tests/reduce.at (Useless Nonterminals): Adjust.
8299
8300 2001-11-30 Akim Demaille <akim@epita.fr>
8301
8302 * src/reduce.c: Various comment/formatting changes.
8303 (nonterminals_reduce): New, extracted from...
8304 (reduce_grammar_tables): here.
8305 (reduce_grammar): Call nonterminals_reduce.
8306
8307 2001-11-29 Paul Eggert <eggert@twinsun.com>
8308
8309 * src/bison.simple (YYSTACK_REALLOC): Remove.
8310 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
8311 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
8312 New macros.
8313 (union yyalloc): New type.
8314 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
8315 an arbitrary restriction on hosts where size_t is wider than int.
8316
8317 (yyparse): Don't dump core if alloca or malloc fails; instead, report
8318 a parser stack overflow. Allocate just one block of memory for all
8319 three stacks, instead of allocating three blocks; this typically is
8320 faster and reduces fragmentation.
8321
8322 Do not limit the number of items in the stack to a value that fits
8323 in 'int', as this is an arbitrary limit on hosts with 64-bit
8324 size_t and 32-bit int.
8325
8326 2001-11-29 Marc Autret <autret_m@epita.fr>
8327
8328 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
8329 of defining YYERROR_VERBOSE.
8330 [AT_DATA]: $4 is now out of C declarations in the prologue.
8331
8332 2001-11-28 Marc Autret <autret_m@epita.fr>
8333
8334 * src/reader.c (parse_dquoted_param): New.
8335 (parse_skel_decl): Use it.
8336 * src/lex.h: Add its prototype.
8337 * src/lex.c (literalchar): Become not static.
8338
8339 2001-11-28 Marc Autret <autret_m@epita.fr>
8340
8341 * src/output.h: And put its extern declaration here.
8342 * src/output.c (error_verbose): Define here.
8343 (prepare): Echo name modification.
8344 * src/getargs.h: Clean its extern declaration.
8345 * src/getargs.c (error_verbose_flag): Remove.
8346 (getargs): Remove case 'e'.
8347 * src/options.c (option_table): 'error-verbose' is now seen as simple
8348 percent option.
8349 Include output.h.
8350
8351 * src/reader.c (read_declarations): Remove case tok_include.
8352 (parse_include_decl): Remove.
8353 * src/lex.h (token_t): Remove tok_include.
8354 * src/options.c (option_table): 'include' is now a simple command line
8355 option.
8356
8357 2001-11-28 Marc Autret <autret_m@epita.fr>
8358
8359 * src/bison.simple: Adjust muscle names.
8360 * src/muscle_tab.c (muscle_init): Also rename the muscles.
8361 * src/output.c (prepare): s/_/-/ for the muscles names.
8362 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
8363
8364 2001-11-28 Marc Autret <autret_m@epita.fr>
8365
8366 * src/bison.simple: Fix debug.
8367 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
8368
8369 2001-11-28 Akim Demaille <akim@epita.fr>
8370
8371 * src/LR0.c (shifts_new): New.
8372 (save_shifts, insert_start_shift, augment_automaton): Use it.
8373
8374 2001-11-28 Akim Demaille <akim@epita.fr>
8375
8376 * src/closure.c (closure): `b' and `ruleno' denote the same value:
8377 keep ruleno only.
8378
8379 2001-11-28 Akim Demaille <akim@epita.fr>
8380
8381 * src/closure.c (closure): Instead of looping over word in array
8382 then bits in words, loop over bits in array.
8383
8384 2001-11-28 Akim Demaille <akim@epita.fr>
8385
8386 * src/closure.c (closure): No longer optimize the special case
8387 where all the bits of `ruleset[r]' are set to 0, to make the code
8388 clearer.
8389
8390 2001-11-28 Akim Demaille <akim@epita.fr>
8391
8392 * src/closure.c (closure): `r' and `c' are new variables, used to
8393 de-obfuscate accesses to RULESET and CORE.
8394
8395 2001-11-28 Akim Demaille <akim@epita.fr>
8396
8397 * src/reduce.c (reduce_print): Use ngettext.
8398 (dump_grammar): Improve the trace accuracy.
8399
8400 2001-11-28 Akim Demaille <akim@epita.fr>
8401
8402 * src/reduce.c (dump_grammar): Don't translate trace messages.
8403
8404 2001-11-28 Akim Demaille <akim@epita.fr>
8405
8406 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
8407 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
8408 as all tags are free'ed afterwards.
8409 From Enrico Scholz.
8410
8411 2001-11-27 Paul Eggert <eggert@twinsun.com>
8412
8413 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
8414 use alloca when we didn't want to, and vice versa.
8415
8416 2001-11-27 Marc Autret <autret_m@epita.fr>
8417
8418 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
8419 initialization.
8420 * src/output.c (prepare): Remove its update.
8421
8422 2001-11-27 Marc Autret <autret_m@epita.fr>
8423
8424 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
8425 Use %error-verbose.
8426
8427 2001-11-27 Marc Autret <autret_m@epita.fr>
8428
8429 * src/bison.simple: Remove YYERROR_VERBOSE using.
8430 Use %%error_verbose.
8431 (yyparse): Likewise.
8432 * src/output.c (prepare): Give its final value.
8433 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
8434 * src/getargs.h: Add its extern declaration.
8435 * src/getargs.c (error_verbose_flag): New int.
8436 (getargs): Update to catch new case.
8437 * src/options.c (option_table): 'error-verbose' is a new option.
8438 (shortopts): Update.
8439
8440 2001-11-27 Akim Demaille <akim@epita.fr>
8441
8442 * src/system.h: Use intl/libgettext.h.
8443 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
8444
8445 2001-11-27 Akim Demaille <akim@epita.fr>
8446
8447 * tests/torture.at (Exploding the Stack Size with Malloc):
8448 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
8449
8450 2001-11-27 Akim Demaille <akim@epita.fr>
8451
8452 * src/files.c: Include error.h.
8453 Reported by Hans Aberg.
8454
8455 2001-11-26 Marc Autret <autret_m@epita.fr>
8456
8457 * src/reader.c (parse_include_decl): New, not yet implemented.
8458 (read_declarations): Add case tok_include.
8459 * src/getargs.h (include): Add its extern definition.
8460 * src/getargs.c (include): New const char *.
8461 (getargs): Add case '-I'.
8462 * src/options.c (option_table): Add include as command line and
8463 percent option.
8464 * src/lex.h (token_t): Add tok_include.
8465
8466 2001-11-26 Akim Demaille <akim@epita.fr>
8467
8468 * src/reader.c (readgram): Make sure rules for mid-rule actions
8469 have a lineno equal to that of their host rule.
8470 Reported by Hans Aberg.
8471 * tests/regression.at (Rule Line Numbers): New.
8472
8473 2001-11-26 Akim Demaille <akim@epita.fr>
8474
8475 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
8476 size_ts.
8477
8478 2001-11-26 Akim Demaille <akim@epita.fr>
8479
8480 * src/complain.c, src/complain.h (error): Remove, provided by
8481 lib/error.[ch].
8482
8483 2001-11-26 Akim Demaille <akim@epita.fr>
8484
8485 * src/reader.c (read_declarations): Don't abort on tok_illegal,
8486 issue an error message.
8487 * tests/regression.at (Invalid %directive): New.
8488 Reported by Hans Aberg.
8489
8490 2001-11-26 Akim Demaille <akim@epita.fr>
8491
8492 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
8493 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8494
8495 2001-11-26 Akim Demaille <akim@epita.fr>
8496
8497 * src/conflicts.c (conflicts_print): Don't complain at all when
8498 there are no reduce/reduce conflicts, and as many shift/reduce
8499 conflicts as expected.
8500 * tests/regression.at (%expect right): Adjust.
8501
8502 2001-11-23 Akim Demaille <akim@epita.fr>
8503
8504 * lib/alloca.c: Update, from fileutils.
8505
8506 2001-11-23 Akim Demaille <akim@epita.fr>
8507
8508 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
8509
8510 2001-11-23 Akim Demaille <akim@epita.fr>
8511
8512 * src/system.h: Include alloca.h.
8513 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
8514
8515 2001-11-23 Akim Demaille <akim@epita.fr>
8516
8517 * src/print_graph.c (print_actions): Remove `rule', unused.
8518 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
8519 pacify GCC's signed < unsigned warnings.
8520 * src/closure.c (itemsetsize): Likewise.
8521 * src/reader.c (symbol_list_new): Static.
8522
8523 2001-11-23 Akim Demaille <akim@epita.fr>
8524
8525 Attaching lineno to buckets is stupid, since only one copy of each
8526 symbol is kept, only the line of the first occurrence is kept too.
8527
8528 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
8529 * src/reader.c (rline_allocated): Remove, unused.
8530 (symbol_list): Have a `line' member.
8531 (symbol_list_new): New.
8532 (readgram): Use it.
8533 * src/print.c (print_grammar): Output the rule line numbers.
8534 * tests/regression.at (Solved SR Conflicts)
8535 (Unresolved SR Conflicts): Adjust.
8536 Reported by Hans Aberg.
8537
8538 2001-11-22 Marc Autret <autret_m@epita.fr>
8539
8540 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
8541
8542 2001-11-22 Marc Autret <autret_m@epita.fr>
8543
8544 * src/muscle_tab.c (muscle_init): Remove initialization of
8545 skeleton muscle.
8546 * src/output.c (output_master_parser): Do it here.
8547
8548 2001-11-20 Akim Demaille <akim@epita.fr>
8549
8550 * po/sv.po: New.
8551 * configure.in (ALL_LINGUAS): Adjust.
8552 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
8553 longer contains strings to translate.
8554
8555 2001-11-19 Akim Demaille <akim@epita.fr>
8556
8557 * src/conflicts.c (conflicts_print): Add a missing \n.
8558
8559 2001-11-19 Akim Demaille <akim@epita.fr>
8560
8561 * src/nullable.c (nullable_print): New.
8562 (set_nullable): Call it when tracing.
8563 Better locality of variables.
8564
8565 2001-11-19 Akim Demaille <akim@epita.fr>
8566
8567 * src/print.c (print_actions): Better locality of variables.
8568
8569 2001-11-19 Akim Demaille <akim@epita.fr>
8570
8571 * src/derives.c (print_derives): Fix and enrich.
8572 * src/closure.c (print_fderives): Likewise.
8573
8574 2001-11-19 Akim Demaille <akim@epita.fr>
8575
8576 * src/closure.c (itemsetend): Remove, replaced with...
8577 (itemsetsize): new.
8578
8579 2001-11-19 Akim Demaille <akim@epita.fr>
8580
8581 * src/LR0.c (kernel_end): Remove, replaced with...
8582 (kernel_size): new.
8583
8584 2001-11-19 Akim Demaille <akim@epita.fr>
8585
8586 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
8587 to clarify.
8588
8589 2001-11-19 Akim Demaille <akim@epita.fr>
8590
8591 * src/closure.c (closure): Use arrays instead of pointers to clarify.
8592
8593 2001-11-19 Akim Demaille <akim@epita.fr>
8594
8595 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
8596 trace messages.
8597 * src/LR0.c: Likewise.
8598 (allocate_itemsets): Use arrays instead of pointers to clarify.
8599
8600 2001-11-19 Akim Demaille <akim@epita.fr>
8601
8602 * src/getargs.c (statistics_flag): Replace with...
8603 (trace_flag): New.
8604 (longopts): Accept --trace instead of --statistics.
8605 * src/getargs.h, src/options.c: Adjust.
8606 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
8607 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
8608
8609 2001-11-19 Akim Demaille <akim@epita.fr>
8610
8611 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
8612 pointers to clarify the code.
8613 (save_reductions, save_shifts): Factor common parts of alternatives.
8614
8615 2001-11-19 Akim Demaille <akim@epita.fr>
8616
8617 * src/LR0.c (new_state, get_state): Complete TRACE code.
8618 * src/closure.c: Include `reader.h' to get `tags', needed by the
8619 trace code.
8620 Rename the conditional DEBUG as TRACE.
8621 Output consistently TRACEs to stderr, not stdout.
8622 * src/derives.c: Likewise.
8623 * src/reduce.c: (inaccessable_symbols): Using if is better style
8624 than goto.
8625 Use `#if TRACE' instead of `#if 0' for tracing code.
8626
8627 2001-11-19 Akim Demaille <akim@epita.fr>
8628
8629 * src/system.h (LIST_FREE, shortcpy): New.
8630 * src/LR0.c: Use them.
8631 * src/output.c (free_itemsets, free_reductions, free_shifts):
8632 Remove, replaced by LIST_FREE.
8633
8634 2001-11-19 Akim Demaille <akim@epita.fr>
8635
8636 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8637 (REDUCTIONS_ALLOC): New.
8638 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8639 allocation.
8640
8641 2001-11-19 Akim Demaille <akim@epita.fr>
8642
8643 * src/LR0.c (new_state): Complete trace code.
8644 * src/nullable.c (set_nullable): Don't translate traces.
8645
8646 2001-11-19 Akim Demaille <akim@epita.fr>
8647
8648 * src/print_graph.c (print_core): Better locality of variables.
8649 * src/print.c (print_core): Likewise.
8650
8651 2001-11-19 Akim Demaille <akim@epita.fr>
8652
8653 * src/vcg.c: You do the output, so you are responsible of the
8654 handling of VCG syntax, in particular: use quotearg.
8655 * src/print_graph.c: Don't.
8656 (print_actions): Don't output the actions as part of the nodes,
8657 since that's the job of the edges.
8658 (print_state): Don't output by hand: fill the node description,
8659 and ask for its output.
8660
8661 2001-11-19 Akim Demaille <akim@epita.fr>
8662
8663 * src/bison.simple (yyparse): When verbosely reporting an error,
8664 no longer put additional quotes around token names.
8665 * tests/calc.at: Adjust.
8666
8667 2001-11-19 Akim Demaille <akim@epita.fr>
8668
8669 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8670 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8671 * src/output.c: Adjust.
8672
8673 2001-11-19 Akim Demaille <akim@epita.fr>
8674
8675 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8676 (rule_t): this.
8677 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8678
8679 2001-11-19 Akim Demaille <akim@epita.fr>
8680
8681 * src/gram.h (rule_t): New.
8682 (rule_table): New.
8683 (rrhs, rlhs): Remove, part of state_t.
8684 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8685 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8686 * src/reader.c, src/reduce.c: Adjust.
8687
8688 2001-11-19 Akim Demaille <akim@epita.fr>
8689
8690 * src/reader.c (symbols_output): New, extracted from...
8691 (packsymbols): Here.
8692 (reader): Call it.
8693
8694 2001-11-19 Akim Demaille <akim@epita.fr>
8695
8696 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8697 (maxrhs): this new function.
8698
8699 2001-11-19 Akim Demaille <akim@epita.fr>
8700
8701 * src/lalr.c (F): New macro to access the variable F.
8702 Adjust.
8703
8704 2001-11-19 Akim Demaille <akim@epita.fr>
8705
8706 * src/lalr.h (LA): New macro to access the variable LA.
8707 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8708 * src/lalr.c: Adjust.
8709
8710 2001-11-19 Akim Demaille <akim@epita.fr>
8711
8712 * src/lalr.c (initialize_LA): Only initialize LA. Let...
8713 (set_state_table): handle the `lookaheads' members.
8714
8715 2001-11-19 Akim Demaille <akim@epita.fr>
8716
8717 * src/lalr.h (lookaheads): Removed array, whose contents is now
8718 a member of...
8719 (state_t): this structure.
8720 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8721 Adjust.
8722
8723 2001-11-19 Akim Demaille <akim@epita.fr>
8724
8725 * src/lalr.h (consistent): Removed array, whose contents is now
8726 a member of...
8727 (state_t): this structure.
8728 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8729 Adjust.
8730
8731 2001-11-19 Akim Demaille <akim@epita.fr>
8732
8733 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
8734 contents are now members of...
8735 (state_t): this structure.
8736 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8737 Adjust.
8738
8739 2001-11-19 Akim Demaille <akim@epita.fr>
8740
8741 * src/lalr.h (state_t): New.
8742 (state_table): Be a state_t * instead of a core **.
8743 (accessing_symbol): Remove, part of state_t.
8744 * src/lalr.c: Adjust.
8745 (set_accessing_symbol): Merge into...
8746 (set_state_table): this.
8747 * src/print_graph.c, src/conflicts.c: Adjust.
8748
8749 2001-11-14 Akim Demaille <akim@epita.fr>
8750
8751 * tests/calc.at, tests/output.at, tests/regression.at,
8752 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
8753 now the tests are run in private dirs, therefore AC_CLEANUP and
8754 family can be simplified to 0-ary.
8755 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
8756 use abs. path to find config.h.
8757 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
8758 stderr, there can be way too much random noise.
8759 Instead pass -Werror to GCC and rely on the exit status.
8760 Reported by Wolfram Wagner.
8761
8762 2001-11-14 Akim Demaille <akim@epita.fr>
8763
8764 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
8765 defined only if yyoverflow is defined, to avoid `warning: unused
8766 variable `yyvs1''.
8767 Reported by The Test Suite.
8768
8769 2001-11-14 Akim Demaille <akim@epita.fr>
8770
8771 * src/print.c: Include reduce.h.
8772 Reported by Hans Aberg.
8773
8774 2001-11-14 Akim Demaille <akim@epita.fr>
8775
8776 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
8777 Revert a previous patch: these are really const.
8778 * src/conflicts.c (conflict_report): Additional useless pair of
8779 braces to pacify GCC's warnings for `if () if () {} else {}'.
8780 * src/lex.c (parse_percent_token): Replace equal_offset with
8781 arg_offset.
8782 arg is const.
8783 Be sure to strdup `arg' when used, since there is no reason for
8784 token_buffer not to change.
8785
8786 2001-11-14 Akim Demaille <akim@epita.fr>
8787
8788 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
8789 definition.
8790 * src/main.c (main): Use them.
8791 Suggested by Hans Aberg.
8792
8793 2001-11-12 Akim Demaille <akim@epita.fr>
8794
8795 * src/system.h (ngettext): Now that we use ngettext, be sure to
8796 provide a default definition when NLS are not used.
8797
8798 2001-11-12 Akim Demaille <akim@epita.fr>
8799
8800 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
8801 Use @kbd to denote user input.
8802 (Language and Grammar): ANSIfy the example.
8803 Adjust its layout for info/notinfo.
8804 (Location Tracking Calc): Output error messages to stderr.
8805 Output locations in a more GNUtically correct way.
8806 Fix a couple of Englishos.
8807 Adjust @group/@end group pairs.
8808
8809 2001-11-12 Akim Demaille <akim@epita.fr>
8810
8811 %expect was not functioning at all.
8812
8813 * src/conflicts.c (expected_conflicts): Set to -1.
8814 (conflict_report): Use ngettext.
8815 (conflicts_print): Check %expect and make its violation an error.
8816 * doc/bison.texinfo (Expect Decl): Adjust.
8817 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
8818 * tests/regression.at (%expect not enough, %expect right)
8819 (%expect too much): New.
8820
8821 2001-11-12 Akim Demaille <akim@epita.fr>
8822
8823 * tests/regression.at (Conflicts): Rename as...
8824 (Unresolved SR Conflicts): this.
8825 (Solved SR Conflicts): New.
8826
8827 2001-11-12 Akim Demaille <akim@epita.fr>
8828
8829 * src/reduce.c (print_results): Rename as...
8830 (reduce_output): This.
8831 Output to OUT, passed as argument, instead of output_obstack.
8832 (dump_grammar): Likewise.
8833 (reduce_free): New.
8834 Also free V1.
8835 (reduce_grammar): No longer call reduce_output, since...
8836 * src/print.c (print_results): do it.
8837 * src/main.c (main): Call reduce_free;
8838
8839 2001-11-12 Akim Demaille <akim@epita.fr>
8840
8841 * src/conflicts.c (print_reductions): Accept OUT as argument.
8842 Output to it, not to output_obstack.
8843 * src/print.c (print_actions): Adjust.
8844
8845 2001-11-12 Akim Demaille <akim@epita.fr>
8846
8847 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
8848 the result instead of using...
8849 (src_total, rrc_total, src_count, rrc_count): Remove.
8850 (any_conflicts): Remove.
8851 (print_conflicts): Split into...
8852 (conflicts_print, conflicts_output): New.
8853 * src/conflicts.h: Adjust.
8854 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
8855 * src/print.c (print_grammar): Issue `\n' between two rules.
8856 * tests/regression.at (Conflicts): New.
8857 Reported by Tom Lane.
8858
8859 2001-11-12 Akim Demaille <akim@epita.fr>
8860
8861 * tests/regression.at (Invalid input): Remove, duplicate with
8862 ``Invalid input: 1''.
8863
8864 2001-11-12 Akim Demaille <akim@epita.fr>
8865
8866 * tests/torture.at (AT_DATA_STACK_TORTURE)
8867 (Exploding the Stack Size with Alloca)
8868 (Exploding the Stack Size with Malloc): New.
8869
8870 2001-11-12 Akim Demaille <akim@epita.fr>
8871
8872 * src/bison.simple (YYSTACK_REALLOC): New.
8873 (yyparse) [!yyoverflow]: Use it and free the old stack.
8874 Reported by Per Allansson.
8875
8876 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
8877
8878 * src/bison.simple: Define type yystype instead of YYSTYPE, and
8879 define CPP macro, which substitute YYSTYPE by yystype.
8880 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
8881 with yyltype/YYLTYPE. This allows inclusion of the generated
8882 header within the parser if the compiler, such as GGC, accepts
8883 multiple equivalent #defines.
8884 From Akim.
8885
8886 2001-11-05 Akim Demaille <akim@epita.fr>
8887
8888 * src/reader.c (symbols_output): New, extracted from...
8889 (packsymbols): here.
8890 (reader): Adjust.
8891
8892 2001-11-05 Akim Demaille <akim@epita.fr>
8893
8894 * src/lex.c (parse_percent_token): s/quotearg/quote/.
8895
8896 2001-11-05 Akim Demaille <akim@epita.fr>
8897
8898 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
8899 pattern.
8900
8901 2001-11-05 Akim Demaille <akim@epita.fr>
8902
8903 * src/options.h (struct option_table_struct): set_flags is void*.
8904 * src/options.c (longopts): Support `--output' and `%output'.
8905 (usage): Adjust.
8906 * src/lex.h (tok_setopt): Remove, replaced with...
8907 (tok_intopt, tok_stropt): these new guys.
8908 * src/lex.c (getopt.h): Not needed.
8909 (token_buffer, unlexed_token_buffer): Not const.
8910 (percent_table): Promote `-' over `_' in directive names.
8911 Active `%name-prefix', `file-prefix', and `output'.
8912 (parse_percent_token): Accept possible arguments to directives.
8913 Promote `-' over `_' in directive names.
8914
8915 2001-11-04 Akim Demaille <akim@epita.fr>
8916
8917 * doc/bison.texinfo (Decl Summary): Split the list into
8918 `directives for grammars' and `directives for bison'.
8919 Sort'em.
8920 Add description of `%name-prefix', `file-prefix', and `output'.
8921 Promote `-' over `_' in directive names.
8922 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
8923 Simplify the description of `--name-prefix'.
8924 Promote `-' over `_' in directive names.
8925 Promote `--output' over `--output-file'.
8926 Fix the description of `--defines'.
8927 * tests/output.at: Exercise %file-prefix and %output.
8928
8929 2001-11-02 Akim Demaille <akim@epita.fr>
8930
8931 * doc/refcard.tex: Update.
8932
8933 2001-11-02 Akim Demaille <akim@epita.fr>
8934
8935 * src/symtab.h (SUNDEF): New.
8936 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
8937 stand for `uninitialized', instead of 0.
8938 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
8939 * src/lex.c (lex): Adjust.
8940
8941 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
8942 Number it 0.
8943 Let yylex return it instead of a plain 0.
8944 Reported by Dick Streefland.
8945
8946 2001-11-02 Akim Demaille <akim@epita.fr>
8947
8948 * tests/regression.at (Mixing %token styles): New test.
8949
8950 2001-11-02 Akim Demaille <akim@epita.fr>
8951
8952 * src/reader.c (parse_thong_decl): Formatting changes.
8953 (token_translations_init): New, extracted from...
8954 (packsymbols): Here.
8955 Adjust.
8956
8957 2001-11-01 Akim Demaille <akim@epita.fr>
8958
8959 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
8960 Check that `9foo.y' produces correct cpp guards.
8961 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
8962 guards.
8963 Reported by Wwp.
8964
8965 2001-11-01 Akim Demaille <akim@epita.fr>
8966
8967 * tests/regression.at (Invalid input: 2): New.
8968 * src/lex.c (unlexed_token_buffer): New.
8969 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
8970 too.
8971 Reported by Wwp.
8972
8973 2001-11-01 Akim Demaille <akim@epita.fr>
8974
8975 * tests/calc.at: Catch up with 1.30.
8976 * configure.in: Bump to 1.49a.
8977 Adjust to newer Autotest.
8978
8979 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
8980
8981 * src/conflicts.c: Move global variables rrc_total and src_total ...
8982 (print_conflicts): here.
8983 * src/output.c (output): Free global variable user_toknums.
8984 * src/lex.c (token_obstack): Become static.
8985
8986 2001-10-18 Akim Demaille <akim@epita.fr>
8987
8988 * tests/atlocal.in (GCC): Add.
8989 * tests/calc.at: s/m4_match/m4_bmatch/.
8990 s/m4_patsubst/m4_bpatsubst/.
8991 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
8992 * configure.in: AC_SUBST(GCC).
8993
8994 2001-10-14 Marc Autret <autret_m@epita.fr>
8995
8996 * src/options.c (create_long_option_table): Fix.
8997
8998 2001-10-10 Akim Demaille <akim@epita.fr>
8999
9000 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
9001
9002 2001-10-04 Akim Demaille <akim@epita.fr>
9003
9004 * src/reader.c (parse_union_decl): Push the caracters in
9005 union_obstack, not attrs_obstack.
9006
9007 2001-10-04 Akim Demaille <akim@epita.fr>
9008
9009 Merge in the branch 1.29.
9010
9011 * src/reader.c (packsymbols): Use a temporary obstack for
9012 `%%tokendef', since output_stack is already used elsewhere.
9013
9014 2001-10-02 Akim Demaille <akim@epita.fr>
9015
9016 Bump 1.29d.
9017
9018 2001-10-02 Akim Demaille <akim@epita.fr>
9019
9020 Version 1.29c.
9021
9022 2001-10-02 Akim Demaille <akim@epita.fr>
9023
9024 * tests/regression.at (Invalid CPP headers): New.
9025 From Alexander Belopolsky.
9026 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
9027
9028 2001-10-02 Akim Demaille <akim@epita.fr>
9029
9030 * tests/regression.at (Invalid input): New.
9031 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
9032 Reported by Shura.
9033
9034 2001-10-02 Akim Demaille <akim@epita.fr>
9035
9036 * tests/calc.at: Now that --debug works, the tests must be adjusted.
9037
9038 2001-10-02 Akim Demaille <akim@epita.fr>
9039
9040 * src/output.c (output_parser): Assert `skeleton'.
9041 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
9042 systems.
9043 From Shura.
9044
9045 2001-10-01 Marc Autret <autret_m@epita.fr>
9046
9047 * src/lex.h: Echo modifications.
9048 * src/lex.c (unlex): Parameter is now token_t.
9049 From Hans Aberg.
9050
9051 2001-10-01 Marc Autret <autret_m@epita.fr>
9052
9053 * src/main.c: Include lex.h.
9054 From Hans Aberg.
9055
9056 2001-09-29 Akim Demaille <akim@epita.fr>
9057
9058 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
9059
9060 2001-09-28 Akim Demaille <akim@epita.fr>
9061
9062 * tests/testsuite.at: Update to newer Autotest.
9063 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
9064
9065 2001-09-27 Akim Demaille <akim@epita.fr>
9066
9067 Position independent wrapper.
9068
9069 * tests/bison: Remove.
9070 * tests/bison.in: New.
9071 * configure.in: Adjust.
9072
9073 2001-09-27 Paul Eggert <eggert@twinsun.com>
9074
9075 Port quotearg fixes from tar 1.13.24.
9076
9077 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
9078 tm to be declared.
9079 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
9080 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
9081
9082 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
9083 * m4/mbrtowc.m4: New file.
9084 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
9085 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
9086
9087 2001-09-27 Akim Demaille <akim@epita.fr>
9088
9089 Bump to 1.29c.
9090
9091 2001-09-27 Akim Demaille <akim@epita.fr>
9092
9093 Version 1.29b.
9094
9095 2001-09-25 Akim Demaille <akim@epita.fr>
9096
9097 * src/system.h: Include `xalloc.h'.
9098 Remove it from the C files.
9099 * src/files.c (output_files): Free the obstacks.
9100 * src/lex.c (init_lex): Rename as...
9101 (lex_init): this.
9102 (lex_free): New.
9103 * src/main.c (main): Use it.
9104
9105 2001-09-24 Marc Autret <autret_m@epita.fr>
9106
9107 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
9108 to output informations in fout (FILE*).
9109 (open_graph, close_graph): Likewise.
9110 (output_graph, output_edge, output_node): Likewise.
9111 * src/vcg.h: Update function prototypes.
9112 * src/print_graph.c (print_graph): Open output graph file.
9113 (print_actions): Adjust.
9114 * src/files.h: Remove extern declaration.
9115 * src/files.c: Remove graph_obstack declaration.
9116 (open_files): Remove graph_obstack initialization.
9117 (output_files): Remove graph_obstack saving.
9118
9119 2001-09-24 Marc Autret <autret_m@epita.fr>
9120
9121 * src/files.c (compute_output_file_names): Fix.
9122
9123 2001-09-24 Marc Autret <autret_m@epita.fr>,
9124 Akim Demaille <akim@epita.fr>
9125
9126 * src/reader.c (reader): Remove call to free_symtab ().
9127 * src/main.c (main): Call it here.
9128 Include symtab.h.
9129 * src/conflicts.c (initialize_conflicts): Rename as...
9130 (solve_conflicts): this.
9131 * src/print.c (print_core, print_actions, print_state)
9132 (print_grammar): Dump to a file instead a `output_obstack'.
9133 (print_results): Dump `output_obstack', and then proceed with the
9134 FILE *.
9135 * src/files.c (compute_output_file_names, close_files): New.
9136 (output_files): Adjust.
9137 * src/main.c (main): Adjust.
9138
9139 2001-09-23 Marc Autret <autret_m@epita.fr>
9140
9141 * src/files.c (compute_header_macro): Computes header macro name
9142 from spec_defines_file when given.
9143
9144 2001-09-23 Marc Autret <autret_m@epita.fr>
9145
9146 * src/files.c (output_files): Add default extensions.
9147
9148 2001-09-22 Akim Demaille <akim@epita.fr>
9149
9150 * src/conflicts.c (finalize_conflicts): Rename as...
9151 (free_conflicts): this.
9152
9153 2001-09-22 Akim Demaille <akim@epita.fr>
9154
9155 * src/gram.c (gram_free): Rename back as...
9156 (dummy): this.
9157 (output_token_translations): Free `token_translations'.
9158 * src/symtab.c (free_symtab): Free the tag field.
9159
9160 2001-09-22 Akim Demaille <akim@epita.fr>
9161
9162 Remove `translations' as it is always set to true.
9163
9164 * src/gram.h: Adjust.
9165 * src/reader.c (packsymbols, parse_token_decl): Adjust
9166 * src/print.c (print_grammar): Adjust.
9167 * src/output.c (output_token_translations): Adjust.
9168 * src/lex.c (lex): Adjust.
9169 * src/gram.c: Be sure the set pointers to NULL.
9170 (dummy): Rename as...
9171 (gram_free): this.
9172
9173 2001-09-22 Akim Demaille <akim@epita.fr>
9174
9175 * configure.in: Invoke AM_LIB_DMALLOC.
9176 * src/system.h: Use dmalloc.
9177 * src/LR0.c: Be sure to have pointers initialized to NULL.
9178 (allocate_itemsets): Allocate kernel_items only if needed.
9179
9180 2001-09-22 Akim Demaille <akim@epita.fr>
9181
9182 * configure.in: Bump to 1.29b.
9183 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
9184 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
9185 need xmalloc.c in calc.y.
9186 From Pascal Bart.
9187
9188 2001-09-21 Akim Demaille <akim@epita.fr>
9189
9190 Version 1.29a.
9191 * Makefile.maint, config/config.guess, config/config.sub,
9192 * config/missing: Update from masters.
9193 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
9194 upon package.m4.
9195 * configure.in (ALL_LINGUAS): Add `tr'.
9196
9197 2001-09-21 Akim Demaille <akim@epita.fr>
9198
9199 * tests/Makefile.am (package.m4): Move to...
9200 ($(srcdir)/$(TESTSUITE)): here.
9201
9202 2001-09-20 Akim Demaille <akim@epita.fr>
9203
9204 * src/complain.c: No longer try to be standalone: use system.h.
9205 Don't assume __STDC__ is defined to 1. Just test if it is defined.
9206 * src/complain.h: Likewise.
9207 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
9208 Remove the unused variable `n'.
9209 From Albert Chin-A-Young.
9210
9211 2001-09-18 Marc Autret <autret_m@epita.fr>
9212
9213 * doc/bison.1: Update.
9214 * doc/bison.texinfo (Bison Options): Update --defines and --graph
9215 descriptions.
9216 (Option Cross Key): Update.
9217 Add --graph.
9218
9219 2001-09-18 Marc Autret <autret_m@epita.fr>
9220
9221 * tests/regression.at: New test (comment in %union).
9222
9223 2001-09-18 Marc Autret <autret_m@epita.fr>
9224
9225 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
9226 do that.
9227 Reported by Keith Browne.
9228
9229 2001-09-18 Marc Autret <autret_m@epita.fr>
9230
9231 * tests/output.at: Add tests for --defines and --graph.
9232
9233 2001-09-18 Marc Autret <autret_m@epita.fr>
9234
9235 * tests/output.at: Removes tests of %{header,src}_extension features.
9236
9237 2001-09-18 Akim Demaille <akim@epita.fr>
9238
9239 * tests/Makefile.am (package.m4): New.
9240 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
9241 (_AT_CHECK_CALC_ERROR): Likewise.
9242 Factor the `, ' part of verbose error messages.
9243
9244 2001-09-18 Marc Autret <autret_m@epita.fr>
9245
9246 * src/getargs.c (longopts): Declare --defines and --graph as options
9247 with optional arguments.
9248 * src/files.h: Add extern declarations.
9249 * src/files.c (spec_graph_file, spec_defines_file): New.
9250 (output_files): Update.
9251 Remove CPP-outed code.
9252
9253 2001-09-18 Marc Autret <autret_m@epita.fr>
9254
9255 Turn off %{source,header}_extension feature.
9256
9257 * src/files.c (compute_exts_from_gf): Update.
9258 (compute_exts_from_src): Update.
9259 (output_files): CPP-out useless code.
9260 * src/files.h: Remove {header,source}_extension extern declarations.
9261 * src/reader.c (parse_dquoted_param): CPP-out.
9262 (parse_header_extension_decl): Remove.
9263 (parse_source_extension_decl): Remove.
9264 (read_declarations): Remove cases tok_{hdrext,srcext}.
9265 * src/lex.c (percent_table): Remove {header,source}_extension entries.
9266 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
9267
9268 2001-09-10 Akim Demaille <akim@epita.fr>
9269
9270 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
9271 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
9272 (AT_CHECK_OUTPUT): this.
9273 Merely check ls' exit status, its output is useless.
9274
9275 2001-09-10 Akim Demaille <akim@epita.fr>
9276
9277 * tests/calc.at: Use m4_match.
9278 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
9279
9280 2001-09-10 Marc Autret <autret_m@epita.fr>,
9281 Akim Demaille <akim@epita.fr>
9282
9283 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
9284 enum color_e.
9285 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
9286 to `normal'.
9287 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
9288 * src/lex.h: Adjust prototype.
9289 (token_t): Add `tok_undef'.
9290 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
9291 (parse_percent_token): Now returns token_t.
9292 Add default statement in switch.
9293 (lex): Separate `c' as an input variable, from the token_t result
9294 part.
9295 (unlexed): Is a token_t.
9296
9297 2001-09-10 Akim Demaille <akim@epita.fr>
9298
9299 * configure.in: Bump to 1.29a.
9300
9301 2001-09-07 Akim Demaille <akim@epita.fr>
9302
9303 Version 1.29.
9304
9305 2001-08-30 Akim Demaille <akim@epita.fr>
9306
9307 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
9308 * m4/atconfig.m4: Remove.
9309 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
9310 * tests/bison: New.
9311 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
9312 m4_if, m4_patsubst, and m4_regexp.
9313 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
9314 `input' file instead of echo.
9315
9316 2001-08-29 Akim Demaille <akim@epita.fr>
9317
9318 Bump to 1.28e.
9319
9320 2001-08-29 Akim Demaille <akim@epita.fr>
9321
9322 Version 1.28d.
9323
9324 2001-08-29 Paul Eggert <eggert@twinsun.com>
9325
9326 * src/bison.simple (yyparse): Don't take the address of an
9327 item before the start of an array, as that doesn't conform to
9328 the C Standard.
9329
9330 2001-08-29 Robert Anisko <anisko_r@epita.fr>
9331
9332 * doc/bison.texinfo (Location Tracking Calc): New node.
9333
9334 2001-08-29 Paul Eggert <eggert@twinsun.com>
9335
9336 * src/output.c (output): Do not define const, as this now
9337 causes more problems than it cures.
9338
9339 2001-08-29 Akim Demaille <akim@epita.fr>
9340
9341 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
9342 the nodes.
9343 Be sure to tag the `detailmenu'.
9344
9345 2001-08-29 Akim Demaille <akim@epita.fr>
9346
9347 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
9348 download in a tmp dir.
9349
9350 2001-08-28 Marc Autret <autret_m@epita.fr>
9351
9352 * config/depcomp: New file.
9353
9354 2001-08-28 Marc Autret <autret_m@epita.fr>
9355
9356 * doc/bison.1 (mandoc): Adjust.
9357 From Juan Manuel Guerrero.
9358
9359 2001-08-28 Marc Autret <autret_m@epita.fr>
9360
9361 * src/print_graph.c (print_state): Fix.
9362
9363 2001-08-27 Marc Autret <autret_m@epita.fr>
9364
9365 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
9366 char * members.
9367 Echo modifications to the functions prototypes.
9368 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
9369
9370 2001-08-27 Marc Autret <autret_m@epita.fr>
9371
9372 * src/vcg.c: Include `xalloc.h'.
9373 (add_colorentry): New.
9374 (add_classname): New.
9375 (add_infoname): New.
9376 * src/vcg.h: Add new prototypes.
9377
9378 2001-08-27 Akim Demaille <akim@epita.fr>
9379
9380 * Makefile.maint: Sync. again with CVS Autoconf.
9381
9382 2001-08-27 Akim Demaille <akim@epita.fr>
9383
9384 * Makefile.maint: Formatting changes.
9385 (po-update, cvs-update, update): New targets.
9386 (AMTAR): Remove.
9387
9388 2001-08-27 Akim Demaille <akim@epita.fr>
9389
9390 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9391 * Makefile.maint: Sync. with CVS Autoconf.
9392
9393 2001-08-27 Marc Autret <autret_m@epita.fr>
9394
9395 * src/vcg.h (struct infoname_s): New.
9396 (struct colorentry_s): New.
9397 (graph_s): New fields {vertical,horizontal}_order in structure.
9398 Add `infoname' field.
9399 Add `colorentry' field;
9400 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
9401 (G_HORIZONTAL_ORDER): New.
9402 (G_INFONAME): New.
9403 (G_COLORENTRY): New.
9404 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
9405 Add output of `infoname'.
9406 Add output of `colorentry'.
9407
9408 2001-08-27 Marc Autret <autret_m@epita.fr>
9409
9410 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
9411 This one shadowed a global parameter.
9412
9413 2001-08-24 Marc Autret <autret_m@epita.fr>
9414
9415 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
9416 instead of `unsigned'.
9417 (print_state): Do not call obstack_object_size () in obstack_grow ()
9418 to avoid macro variables shadowing.
9419
9420 2001-08-23 Marc Autret <autret_m@epita.fr>
9421
9422 * src/lex.c (percent_table): Typo: s/naem/name/.
9423 Add graph option.
9424 Normalize new options declarations.
9425
9426 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
9427
9428 * tests/suite.at: Exercise %header_extension and %source_extension.
9429
9430 2001-08-16 Marc Autret <autret_m@epita.fr>
9431
9432 * src/reader.c (parse_dquoted_param): New.
9433 (parse_header_extension_decl): Use it.
9434 (parse_source_extension_decl): Likewise.
9435
9436 2001-08-16 Marc Autret <autret_m@epita.fr>
9437
9438 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
9439 (get_xxxx_str): Use assert () instead of complain ().
9440 Remove return invokations in default cases.
9441 (get_decision_str): Modify default behaviour. Remove second argument.
9442 Echo modifications on calls.
9443 (output_graph): Fix.
9444
9445 2001-08-16 Marc Autret <autret_m@epita.fr>
9446
9447 * src/getargs.c (usage): Update with ``-g, --graph''.
9448
9449 2001-08-16 Marc Autret <autret_m@epita.fr>
9450
9451 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
9452 (Option Cross Key): Likewise.
9453 * doc/bison.1: Update.
9454
9455 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
9456
9457 * src/output.c (output_master_parser): Don't finish action_obstack.
9458 (output_parser): Don't care about the muscle action, here.
9459 (prepare): Copy the action_obstack in the action muscle.
9460 (output): Free action_obstack.
9461
9462 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9463
9464 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
9465 will contain `%union' declaration.
9466 (parse_union_decl): Delete #line directive output.
9467 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
9468 informations about %union.
9469 (parse_union_decl): Copy the union_obstack in the muscle stype.
9470 * src/bison.simple: Add new #line directive.
9471 Add typdef %%stype YYSTYPE.
9472
9473 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9474
9475 * src/bison.simple: Add new `#line' directive.
9476
9477 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
9478
9479 * src/bison.simple: New `#line' directive.
9480 * src/output.c (output_parser): Support new dynamic muscle input_line.
9481
9482 2001-09-22 Marc Autret <autret_m@epita.fr>
9483
9484 * src/output.c (output_master_parser): New.
9485 (output_parser): Be more re-entrant.
9486
9487 2001-09-21 Marc Autret <autret_m@epita.fr>
9488
9489 * src/reader.c (copy_definition, parse_union_decl): Update and use
9490 `linef' muscle.
9491 (copy_action): Likewise.
9492 Use obstack_1grow ().
9493 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
9494
9495 2001-09-21 Marc Autret <autret_m@epita.fr>
9496
9497 * src/options.c (option_table): Adjust.
9498 * src/lex.c (parse_percent_token): Fix.
9499
9500 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9501
9502 * src/options.c (symtab.h): Include it, need by lex.h.
9503
9504 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9505
9506 * src/lex.c (parse_percent_token): Change type of variable `tx', which
9507 is now an option_table_struct*.
9508 (option_strcmp): New function option_strcmp.
9509 (parse_percent_token): Call option_strcmp.
9510 * src/getargs.c (xalloc.h, options.h): Include it.
9511 (getargs): Call create_long_option_table.
9512 (getargs): Free longopts at the end of the function.
9513 (shortopts): Move in options.c.
9514 * src/options.c (create_long_option_table): New function. Convert
9515 information from option_table to option structure.
9516 * src/reader.c (options.h): Include it.
9517
9518 * src/Makefile.am: Adjust.
9519 * src/options.c (option_table): Create from longopts and percent_table.
9520 * src/getargs.c (longopts): Delete.
9521 * src/lex.c (struct percent_table_struct): Delete.
9522 (percent_table): Delete.
9523 (options.h): Include it.
9524 * src/options.c: Create.
9525 * src/options.h: Create.
9526 Declare enum opt_access_e.
9527 Define struct option_table_struct.
9528
9529 2001-09-20 Marc Autret <autret_m@epita.fr>
9530
9531 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
9532 sections of Bison.
9533
9534 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
9535
9536 * src/bison.simple: s/%%filename/%%skeleton.
9537 * src/muscle_tab.c (getargs.h): Include it.
9538 (muscle_init): Insert new muscle skeleton.
9539
9540 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
9541
9542 * src/output.c (output_parser): Delete unused variable actions_dumped.
9543
9544 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
9545
9546 * src/output.c (output): Delete call to reader_output_yylsp.
9547 * src/reader.c (reader): Likewise.
9548 * src/reader.h: Delete declaration of reader_output_yylsp.
9549
9550 2001-09-02 Marc Autret <autret_m@epita.fr>
9551
9552 * src/reader.c: Include muscle_tab.h.
9553 (parse_union_decl): Update.
9554 (parse_macro_decl): Rename parse_muscle_decl.
9555 Update to use renamed functions and variable.
9556 (read_declarations, copy_action, read_additionnal_code, : Updated
9557 with correct variables and functions names.
9558 (packsymbols, reader): Likewise.
9559
9560 * src/reader.h (muscle_obstack): Extern declaration update.
9561
9562 * src/output.c: Include muscle_tab.h
9563 In all functions using macro_insert, change by using muscle_insert ().
9564 (macro_obstack): Rename muscle_obstack.
9565 Echo modifications in the whole file.
9566 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
9567 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
9568 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
9569
9570 * src/muscle_tab.h: Update double inclusion macros.
9571 (macro_entry_s): Rename muscle_entry_s.
9572 Update prototypes.
9573
9574 * src/muscle_tab.c: Include muscle_tab.h.
9575 Rename macro_tabble to muscle_table.
9576 (mhash1, mhash2, mcmp): Use muscle_entry.
9577 (macro_init): Rename muscle_init. Update.
9578 (macro_insert): Rename muscle_insert. Update.
9579 (macro_find): Rename muscle_find. Update.
9580
9581 * src/main.c: Include muscle_tab.h.
9582 (main): Call muscle_init ().
9583 * src/Makefile.am (bison_SOURCES): Echo modifications.
9584
9585 2001-09-02 Marc Autret <autret_m@epita.fr>
9586
9587 Now the files macro_tab.[ch] are named muscle_tab.[ch].
9588
9589 * src/muscle_tab.c, src/muscle_tab.h: Add files.
9590
9591 2001-09-02 Marc Autret <autret_m@epita.fr>
9592
9593 * src/macrotab.c, src/macrotab.h: Remove.
9594
9595 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
9596
9597 * src/reader.c (copy_guard): Use muscle to specify the `#line'
9598 filename.
9599
9600 2001-09-01 Marc Autret <autret_m@epita.fr>
9601
9602 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
9603 to an explicit value to activate the feature. We do it here.
9604
9605 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9606
9607 * src/output.c (prepare): Delete the `filename' muscule insertion.
9608 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
9609 (parse_union_decl): Likewise.
9610 * src/macrotab.c (macro_init): Initialize filename by infile.
9611
9612 2001-08-31 Marc Autret <autret_m@epita.fr>
9613
9614 * src/bison.simple (YYLSP_NEEDED): New definition.
9615 * src/output.c (prepare): Add macro insertion of `locations_flag'
9616
9617 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9618
9619 * src/output.c (prepare): Delete insertion of previous muscles,
9620 and insert the `prefix' muscles.
9621 * src/macrotab.c (macro_init): Likewise.
9622 (macro_init): Initialization prefix directive by `yy'.
9623 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
9624 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9625 yylval, yydebug, yyerror, yynerrs and yyparse.
9626 New directive `#define' to substitute yydebug, ... with option
9627 name_prefix.
9628
9629 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9630
9631 * src/main.c (main): Standardize.
9632 * src/output.c (output_table_data, output_parser): Likewise.
9633 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9634
9635 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9636
9637 * src/reader.c (read_additionnal_code): Rename %%user_code to
9638 %%epilogue.
9639 * src/output.c (output): Rename %%declarations to %%prologue.
9640 * src/bison.simple: Echo modifications.
9641
9642 2001-08-31 Marc Autret <autret_m@epita.fr>
9643
9644 * src/reader.c (readgram): CleanUp.
9645 (output_token_defines): Likewise.
9646 (packsymbols): Likewise.
9647 (reader): Likewise.
9648 * src/output.c (output): CPP-out useless code.
9649
9650 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9651
9652 * src/reader.c (reader): Delete obsolete call to function
9653 output_trailers and output_headers.
9654 * src/output.h: Remove obsolete functions prototypes of output_headers
9655 and output_trailers.
9656
9657 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
9658
9659 * src/main.c: Include macrotab.h.
9660 * src/macrotab.h (macro_entry_s): Constify fields.
9661 Adjust functions prototypes.
9662 * src/macrotab.c (macro_insert): Constify key and value.
9663 (macro_find): Constify key.
9664 (macro_insert): Include 'xalloc.h'
9665 (macro_insert): Use XMALLOC.
9666 (macro_find): Constify return value.
9667 * src/output.c (output_table_data): Rename table to table_data.
9668 (output_parser): Constify macro_key, macro_value.
9669
9670 2001-08-30 Marc Autret <autret_m@epita.fr>
9671
9672 * src/reader.c (parse_skel_decl): New.
9673 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
9674 * src/lex.h (token_t): New token `tok_skel'.
9675 * src/lex.c (percent_table): Add skeleton option entry.
9676 Standardize.
9677
9678 2001-08-29 Marc Autret <autret_m@epita.fr>
9679
9680 * src/bison.simple: Add %%user_code directive at the end.
9681 * src/reader.c (read_additionnal_code): New.
9682 (reader): Use it.
9683 * src/output.c (output_program): Remove.
9684 (output): Update.
9685
9686 2001-08-28 Marc Autret <autret_m@epita.fr>
9687
9688 * src/output.c (output_actions): Clean up.
9689 (output_gram): CPP-out useless code.
9690 * src/reader.c (reader): Clean up, CPP-out useless code.
9691
9692 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
9693
9694 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
9695 directive.
9696 * src/bison.simple: Add `%%definitions'.
9697
9698 2001-08-28 Marc Autret <autret_m@epita.fr>
9699
9700 * config/depcomp: New file.
9701
9702 2001-08-27 Paul Eggert <eggert@twinsun.com>
9703
9704 * src/bison.simple (yyparse): Don't take the address of an
9705 item before the start of an array, as that doesn't conform to
9706 the C Standard.
9707
9708 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9709
9710 * src/output.c (output): Remove the initialization of the macro
9711 obstack. It was done too late here.
9712
9713 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
9714 completely wrong.
9715 (reader): Initialize the macro obstack here, since we need it to grow
9716 '%define' directives.
9717
9718 * src/reader.h: Declare the macro obstack as extern.
9719
9720 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9721
9722 * src/output.c (output_parser): Fix. Store single '%' characters in
9723 the output obstack instead of throwing them away.
9724
9725 2001-08-27 Akim Demaille <akim@epita.fr>
9726
9727 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9728
9729 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9730
9731 * lib/Makefile.am: Adjust.
9732
9733 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9734
9735 * src/bison.simple: Update and add '%%' directives.
9736
9737 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9738
9739 * src/reader.c (reader): Remove calls to 'output_headers' and
9740 'output_trailers'. Remove some C output.
9741 (readgram): Disable a piece of code that was writing a default
9742 definition for 'YYSTYPE'.
9743 (reader_output_yylsp): Remove.
9744 (packsymbols): Output token defintions to a macro.
9745 (copy_definition): Disable C output.
9746
9747 * src/reader.c (parse_macro_decl): New function used to parse macro
9748 declarations.
9749 (copy_string2): Put the body of copy_string into this new function.
9750 Add a parameter to let the caller choose whether he wants to copy the
9751 string delimiters or not.
9752 (copy_string): Be a simple call to copy_string2 with the last argument
9753 bound to true.
9754 (read_declarations): Add case for macro definition.
9755 (copy_identifier): New.
9756 (parse_macro_decl): Read macro identifiers using copy_identifier
9757 rather than lex.
9758
9759 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9760
9761 * src/output.c (prepare): Add prefixed names.
9762 (output_parser): Output semantic actions.
9763 (output_parser): Fix bug on '%%line' directives.
9764
9765 * src/output.c (output_headers): Remove. The C code printed by this
9766 function should now be in the skeletons.
9767 (output_trailers): Remove.
9768 (output): Disable call to 'reader_output_yylsp'.
9769 (output_rule_data): Do not output tables to the table obstack.
9770
9771 * src/output.c: Remove some C dedicated output.
9772 Improve the use of macro and output obstacks.
9773 (output_defines): Remove.
9774
9775 * src/output.c (output_token_translations): Associate 'translate'
9776 table with a macro. No output to the table obstack.
9777 (output_gram): Same for 'rhs' and 'prhs'.
9778 (output_stos): Same for 'stos'.
9779 (output_rule_data): Same for 'r1' and 'r2'.
9780 (token_actions): Same for 'defact'.
9781 (goto_actions): Same for 'defgoto'.
9782 (output_base): Same for 'pact' and 'pgoto'.
9783 (output_table): Same for 'table'.
9784 (output_check): Same for 'check'.
9785
9786 * src/output.c (output_table_data): New function.
9787 (output_short_table): Remove.
9788 (output_short_or_char_table): Remove.
9789
9790 * src/output.c (output_parser): Replace most of the skeleton copy code
9791 with something new. Skeletons are now processed character by character
9792 rather than line by line, and Bison looks for '%%' macros. This is the
9793 first step in making Bison's output process (a lot) more flexible.
9794 (output_parser): Use the macro table.
9795
9796 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9797
9798 * src/main.c (main): Initialize the macro table.
9799
9800 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9801
9802 * src/lex.c (percent_table): Add tok_define.
9803 * src/lex.h: Add tok_define.
9804
9805 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9806
9807 * src/macrotab.c: New file.
9808 * src/macrotab.h: New file.
9809 * src/Makefile.am: Update.
9810
9811 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9812
9813 * lib/hash.c: New file.
9814 * lib/hash.h: New file.
9815 * lib/Makefile.am: Update.
9816
9817 2001-08-15 Akim Demaille <akim@epita.fr>
9818
9819 Version 1.28c.
9820
9821 2001-08-15 Marc Autret <autret_m@epita.fr>
9822
9823 * src/reader.c (readgram): Indent output macro YYSTYPE.
9824 (packsymbols): Likewise.
9825 (output_token_defines): Likewise.
9826 * src/files.c: Standardize.
9827 (compute_header_macro): New.
9828 (defines_obstack_save): New. Use compute_header_macro.
9829 (output_files): Update. Use defines_obstack_save.
9830
9831 2001-08-15 Akim Demaille <akim@epita.fr>
9832
9833 * doc/bison.texinfo (Table of Symbols): Document
9834 YYSTACK_USE_ALLOCA.
9835
9836 2001-08-15 Akim Demaille <akim@epita.fr>
9837
9838 * missing: Update from CVS Automake.
9839 * config/config.guess, config/config.sub, config/texinfo.tex:
9840 Update from gnu.org.
9841
9842 2001-08-15 Akim Demaille <akim@epita.fr>
9843
9844 * Makefile.maint: Sync with CVS Autoconf.
9845
9846 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
9847
9848 * doc/bison.texinfo: Include GNU Free Documentation License from
9849 `fdl.texi'.
9850 * doc/fdl.texi: Add to package.
9851
9852 2001-08-14 Marc Autret <autret_m@epita.fr>
9853
9854 Turn on %{source,header}_extension features.
9855
9856 * src/lex.c (percent_table): Un-CPP out header_extension and
9857 source_extension.
9858 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
9859 (compute_exts_from_src): Remove conditions. It restores priorities
9860 between options.
9861
9862 2001-08-14 Marc Autret <autret_m@epita.fr>
9863
9864 * src/files.c (compute_base_names): Add extensions computing when
9865 `--file-prefix' used.
9866 Standardize function calls.
9867
9868 2001-08-13 Marc Autret <autret_m@epita.fr>
9869
9870 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
9871 defining it (defined but null disables alloca).
9872
9873 2001-08-13 Marc Autret <autret_m@epita.fr>
9874
9875 * src/bison.simple (_yy_memcpy): CPP reformat.
9876
9877 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
9878
9879 * tests/atconfig.in (CPPFLAGS): Fix.
9880
9881 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
9882
9883 * doc/bison.texinfo: Include GNU General Public License from
9884 `gpl.texi'.
9885 * doc/gpl.texi: Add to package.
9886
9887 2001-08-10 Marc Autret <autret_m@epita.fr>
9888
9889 * src/print_graph.h: Fix.
9890 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
9891
9892 2001-08-10 Akim Demaille <akim@epita.fr>
9893
9894 * src/system.h: Provide default declarations for stpcpy, strndup,
9895 and strnlen.
9896
9897 2001-08-10 Robert Anisko <anisko_r@epita.fr>
9898
9899 * doc/bison.texinfo (Locations): Update @$ stuff.
9900
9901 2001-08-09 Robert Anisko <anisko_r@epita.fr>
9902
9903 * src/bison.simple (YYLLOC_DEFAULT): Update.
9904 (yyparse): Adjust.
9905
9906 2001-08-08 Marc Autret <autret_m@epita.fr>
9907
9908 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
9909 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
9910 Reported by Fabrice Bauzac.
9911
9912 2001-08-08 Marc Autret <autret_m@epita.fr>
9913
9914 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
9915 * src/vcg.c (output_node): Fix.
9916 * src/vcg.h: Cleanup.
9917 * src/print_graph.c: Add comments.
9918 (node_output_size): New global variable. Simplify the formatting of
9919 the VCG graph output.
9920 (print_actions): Unused code is now used. It notifies the final state
9921 and no action states in the VCG graph. It also give the reduce actions.
9922 The `shift and goto' edges are red and the `go to state' edges are
9923 blue.
9924 Get the current node name and node_obstack by argument.
9925 (node_obstack): New variable.
9926 (print_state): Manage node_obstack.
9927 (print_core): Use node_obstack given by argument.
9928 A node is not only computed here but in print_actions also.
9929 (print_graph): CPP out useless code instead of commenting it.
9930
9931 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
9932
9933 * tests/atconfig.in (CPPFLAGS): Fix.
9934
9935 2001-08-07 Akim Demaille <akim@epita.fr>
9936
9937 * src/print_graph.c (quote): New.
9938 (print_core): Use it.
9939
9940 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
9941
9942 * src/vcg.c (complain.h): Include it.
9943 Unepitaize `return' invocations.
9944 [NDEBUG] (main): Remove.
9945 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
9946 * src/files.c (open_files): Initialize graph_obstack.
9947 * src/print_graph.c (print_actions): CPP out useless code.
9948 (print_core): Don't output the last `\n' in labels.
9949 Use `quote'.
9950 * src/files.c (output_files): Output the VCG file.
9951 * src/main.c (main): Invoke print_graph ();
9952
9953 2001-08-06 Marc Autret <autret_m@epita.fr>
9954
9955 Automaton VCG graph output.
9956 Using option ``-g'' or long option ``--graph'', you can generate
9957 a gram_filename.vcg file containing a VCG description of the LALR (1)
9958 automaton of your grammar.
9959
9960 * src/main.c: Call to print_graph() function.
9961 * src/getargs.h: Update.
9962 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
9963 (graph_flag): New flag.
9964 (longopts): Update.
9965 (getargs): Add case `g'.
9966 * src/files.c (graph_obstack): New obstack struct.
9967 (open_files): Initialize new obstack.
9968 (output_files): Saves graph_obstack if required.
9969 * src/files.h (graph_obstack): New extern declaration.
9970 * src/Makefile.am: Add new source files.
9971
9972 2001-08-06 Marc Autret <autret_m@epita.fr>
9973
9974 * src/print_graph.c, src/print_graph.h (graph): New.
9975 * src/vcg.h: New file.
9976 * src/vcg.c: New file, VCG graph handling.
9977
9978 2001-08-06 Marc Autret <autret_m@epita.fr>
9979
9980 Add of %source_extension and %header_extension which specify
9981 the source or/and the header output file extension.
9982
9983 * src/files.c (compute_base_names): Remove initialisation of
9984 src_extension and header_extension.
9985 (compute_exts_from_gf): Update.
9986 (compute_exts_from_src): Update.
9987 (output_files): Update.
9988 * src/reader.c (parse_header_extension_decl): New.
9989 (parse_source_extension_decl): New.
9990 (read_declarations): New case statements for the new tokens.
9991 * src/lex.c (percent_table): Add entries for %source_extension
9992 and %header_extension.
9993 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
9994
9995 2001-08-06 Marc Autret <autret_m@epita.fr>
9996
9997 * configure.in: Bump to 1.28c.
9998 * doc/bison.texinfo: Texinfo thingies.
9999
10000 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
10001
10002 * tests/atconfig.in (CPPFLAGS): Add.
10003 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
10004
10005 2001-08-03 Akim Demaille <akim@epita.fr>
10006
10007 Version 1.28b.
10008
10009 2001-08-03 Akim Demaille <akim@epita.fr>
10010
10011 * tests/Makefile.am (check-local): Ship testsuite.
10012 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
10013 Include `string.h'.
10014
10015 2001-08-03 Akim Demaille <akim@epita.fr>
10016
10017 * configure.in: Try using -Wformat when compiling.
10018
10019 2001-08-03 Akim Demaille <akim@epita.fr>
10020
10021 * configure.in: Bump to 1.28b.
10022
10023 2001-08-03 Akim Demaille <akim@epita.fr>
10024
10025 * src/complain.c: Adjust strerror_r portability issues.
10026
10027 2001-08-03 Akim Demaille <akim@epita.fr>
10028
10029 Version 1.28a.
10030
10031 2001-08-03 Akim Demaille <akim@epita.fr>
10032
10033 * src/getargs.c, src/getarg.h (skeleton)): Constify.
10034 * src/lex.c (literalchar): Avoid name clashes on `buf'.
10035 * src/getargs.c: Include complain.h.
10036 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
10037 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
10038
10039 2001-08-03 Akim Demaille <akim@epita.fr>
10040
10041 * src/reader.c (readgram): Display hidden chars in error messages.
10042
10043 2001-08-03 Akim Demaille <akim@epita.fr>
10044
10045 Update to gettext 0.10.39.
10046
10047 2001-08-03 Akim Demaille <akim@epita.fr>
10048
10049 * lib/strspn.c: New.
10050
10051 2001-08-01 Marc Autret <autret_m@epita.fr>
10052
10053 * doc/bison.texinfo: Update.
10054 * doc/bison.1 (mandoc): Update.
10055 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
10056 * src/files.c: Support output files extensions computing.
10057 (src_extension): New static variable.
10058 (header_extension): New static variable.
10059 (tr): New function.
10060 (get_extension_index): New function, gets the index of an extension
10061 filename in a string.
10062 (compute_exts_from_gf): New function, computes extensions from the
10063 grammar file extension.
10064 (compute_exts_from_src): New functions, computes extensions from the
10065 C source file extension, file given by ``-o'' option.
10066 (compute_base_names): Update.
10067 (output_files): Update.
10068
10069 2001-08-01 Robert Anisko <anisko_r@epita.fr>
10070
10071 * doc/bison.texi: Document @$.
10072 (Locations): New section.
10073
10074 2001-07-18 Akim Demaille <akim@epita.fr>
10075
10076 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
10077 * config/prev-version.txt, config/move-if-change: New.
10078 * Makefile.am: Adjust.
10079
10080 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
10081
10082 * src/bison.simple (yyparse): Suppress warning `comparaison
10083 between signed and unsigned'.
10084
10085 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
10086
10087 * src/getargs.h (raw_flag): Remove.
10088 * src/getargs.c: Die on `-r'/`--raw'.
10089 * src/lex.c (parse_percent_token): Die on `%raw'.
10090 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
10091 * tests/calc.at: Suppress test with option `--raw'.
10092
10093 2001-07-14 Akim Demaille <akim@epita.fr>
10094
10095 * config/: New.
10096 * configure.in: Require Autoconf 2.50.
10097 Update to gettext 0.10.38.
10098
10099 2001-03-16 Akim Demaille <akim@epita.fr>
10100
10101 * doc/bison.texinfo: ANSIfy the examples.
10102
10103 2001-03-16 Akim Demaille <akim@epita.fr>
10104
10105 * getargs.c (skeleton): New variable.
10106 (longopts): --skeleton is a new option.
10107 (shortopts, getargs): -S is a new option.
10108 * getargs.h: Declare skeleton.
10109 * output.c (output_parser): Use it.
10110
10111 2001-03-16 Akim Demaille <akim@epita.fr>
10112
10113 * m4/strerror_r.m4: New.
10114 * m4/error.m4: Run AC_FUNC_STRERROR_R.
10115 * lib/error.h, lib/error.c: Update.
10116
10117 2001-03-16 Akim Demaille <akim@epita.fr>
10118
10119 * src/getargs.c (longopts): Clean up.
10120
10121 2001-02-21 Akim Demaille <akim@epita.fr>
10122
10123 * src/reader.c (gensym): `gensym_count' is your own.
10124 Use a static buf to create the symbol name, as token_buffer is no
10125 longer a buffer.
10126
10127 2001-02-08 Akim Demaille <akim@epita.fr>
10128
10129 * src/conflicts.c (conflict_report): Be sure not to append to res
10130 between two calls, which could happen if both first sprintf were
10131 skipped, but not the first cp += strlen.
10132
10133 2001-02-08 Akim Demaille <akim@epita.fr>
10134
10135 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
10136 New, from fileutils 4.0.37.
10137 * configure.in: Require Autoconf 2.49c. I took some time before
10138 making this decision. This is the only way out for portability
10139 issues in Bison, it would mean way too much duplicate effort to
10140 import in Bison features implemented in 2.49c since 2.13.
10141 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
10142
10143 2001-02-02 Akim Demaille <akim@epita.fr>
10144
10145 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
10146 * lib/xalloc.h, lib/xmalloc.c: Update.
10147
10148 2001-01-19 Akim Demaille <akim@epita.fr>
10149
10150 Get rid of the ad hoc handling of token_buffer in the scanner: use
10151 the obstacks.
10152
10153 * src/lex.c (token_obstack): New.
10154 (init_lex): Initialize it. No longer call...
10155 (grow_token_buffer): this. Remove it.
10156 Adjust all the places which used it to use the obstack.
10157
10158 2001-01-19 Akim Demaille <akim@epita.fr>
10159
10160 * src/lex.h: Rename all the tokens:
10161 s/\bENDFILE\b/tok_eof/g;
10162 s/\bIDENTIFIER\b/tok_identifier/g;
10163 etc.
10164 Let them be enums, not #define, to ease debugging.
10165 Adjust all the code.
10166
10167 2001-01-18 Akim Demaille <akim@epita.fr>
10168
10169 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
10170 * src/lex.c (maxtoken, grow_token_buffer): Static.
10171
10172 2001-01-18 Akim Demaille <akim@epita.fr>
10173
10174 Since we now use obstacks, more % directives can be enabled.
10175
10176 * src/lex.c (percent_table): Also accept `%yacc',
10177 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
10178 `%debug'.
10179 Handle the actions for `%semantic_parser' and `%pure_parser' here,
10180 instead of returning a token.
10181 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
10182 * src/reader.c (read_declarations): Adjust.
10183 * src/files.c (open_files): Don't call `compute_base_names', don't
10184 compute `attrsfile' since they depend upon data which might be
10185 *in* the input file now.
10186 (output_files): Do it here.
10187 * src/output.c (output_headers): Document the fact that this patch
10188 introduces a guaranteed SEGV for semantic parsers.
10189 * doc/bison.texinfo: Document them.
10190 * tests/suite.at: Exercise these %options.
10191
10192 2000-12-20 Akim Demaille <akim@epita.fr>
10193
10194 Also handle the output file (--verbose) with obstacks.
10195
10196 * files.c (foutput): Remove.
10197 (output_obstack): New.
10198 Adjust all dependencies.
10199 * src/conflicts.c: Return a string.
10200 * src/system.h (obstack_grow_string): Rename as...
10201 (obstack_sgrow): this. Be ready to work with non literals.
10202 (obstack_fgrow4): New.
10203
10204 2000-12-20 Akim Demaille <akim@epita.fr>
10205
10206 * src/files.c (open_files): Fix the computation of short_base_name
10207 in the case of `-o foo.tab.c'.
10208
10209 2000-12-20 Akim Demaille <akim@epita.fr>
10210
10211 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
10212 (copy_dollar): Now that everything uses obstacks, get rid of the
10213 FILE * parameters.
10214
10215 2000-12-20 Akim Demaille <akim@epita.fr>
10216
10217 * src/files.c (open_files): Actually the `.output' file is based
10218 on the short_base_name, not base_name.
10219 * tests/suite.at (Checking output file names): Adjust.
10220
10221 2000-12-20 Akim Demaille <akim@epita.fr>
10222
10223 * src/bison.s1: Remove, we now use directly...
10224 * src/bison.simple: this.
10225 * src/Makefile.am: Use pkgdata instead of data.
10226
10227 2000-12-20 Akim Demaille <akim@epita.fr>
10228
10229 * src/files.c (guard_obstack): New.
10230 (open_files): Initialize it.
10231 (output_files): Dump it...
10232 * src/files.h: Export it.
10233 * src/reader.c (copy_guard): Use it.
10234
10235 2000-12-19 Akim Demaille <akim@epita.fr>
10236
10237 * src/files.c (outfile, defsfile, actfile): Removed as global
10238 vars.
10239 (open_files): Don't compute them.
10240 (output_files): Adjust.
10241 (base_name, short_base_name): Be global.
10242 Adjust dependencies.
10243
10244 2000-12-19 Akim Demaille <akim@epita.fr>
10245
10246 * src/files.c (strsuffix): New.
10247 (stringappend): Be just like strcat but allocate.
10248 (base_names): Eve out from open_files.
10249 Try to simplify the rather hairy computation of base_name and
10250 short_base_name.
10251 (open_files): Use it.
10252 * tests/suite.at (Checking output file names): New test.
10253
10254 2000-12-19 Akim Demaille <akim@epita.fr>
10255
10256 * src/system.h (obstack_grow_literal_string): Rename as...
10257 (obstack_grow_string): this.
10258 * src/output.c (output_parser): Recognize `%% actions' instead of
10259 `$'.
10260 * src/bison.s1: s/$/%% actions/.
10261 * src/bison.hairy: Likewise.
10262
10263 2000-12-19 Akim Demaille <akim@epita.fr>
10264
10265 * src/output.c (output_parser): Compute the `#line' lines when
10266 there are.
10267 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
10268 Suggested by Hans Aberg.
10269
10270 2000-12-19 Akim Demaille <akim@epita.fr>
10271
10272 Let the handling of the skeleton files be local to the procedures
10273 that use it.
10274
10275 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
10276 longer static.
10277 (fparser, open_extra_files): Remove.
10278 (open_files, output_files): Don't take care of fparser.
10279 * src/files.h: Adjust.
10280 * src/output.c (output_parser): Open and close the file to the
10281 skeleton.
10282 * src/reader.c (read_declarations): When %semantic_parser, open
10283 fguard.
10284
10285 2000-12-19 Akim Demaille <akim@epita.fr>
10286
10287 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
10288 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
10289
10290 2000-12-19 Akim Demaille <akim@epita.fr>
10291
10292 * src/files.c (open_files): Yipee! We no longer need all the code
10293 looking for `/tmp' since we have no tmp file.
10294
10295 2000-12-19 Akim Demaille <akim@epita.fr>
10296
10297 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
10298 New macros.
10299 * src/files.c (open_files): Less dependency on MSDOS etc.
10300
10301 2000-12-14 Akim Demaille <akim@epita.fr>
10302
10303 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
10304 Provide a default definition.
10305 Use it when executing the default @ action.
10306 * src/reader.c (reader_output_yylsp): No longer include
10307 `timestamp' and `text' in the default YYLTYPE.
10308
10309 2000-12-12 Akim Demaille <akim@epita.fr>
10310
10311 * src/reader.c (copy_definition, parse_union_decl, copy_action)
10312 (copy_guard): Quote the file names.
10313 Reported by Laurent Mascherpa.
10314
10315 2000-12-12 Akim Demaille <akim@epita.fr>
10316
10317 * src/output.c (output_headers, output_program, output): Be sure
10318 to escape special characters when outputting filenames.
10319 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
10320 (output_headers): Don't depend on them, Use ACTSTR.
10321
10322 2000-11-17 Akim Demaille <akim@epita.fr>
10323
10324 * lib/obstack.h: Formatting changes.
10325 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
10326 prevents type checking.
10327 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
10328 cast the value to (void *): assigning a `foo *' to a `void *'
10329 variable is valid.
10330 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
10331 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
10332 append characters.
10333
10334 2000-11-17 Akim Demaille <akim@epita.fr>
10335
10336 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
10337 as...
10338 (suite.m4, regression.m4, calc.m4): these.
10339 * tests/atgeneral.m4: Update from CVS Autoconf.
10340
10341 2000-11-17 Akim Demaille <akim@epita.fr>
10342
10343 * tests/regression.m4 (%union and --defines): New test,
10344 demonstrating a current bug in the obstack implementation.
10345
10346 2000-11-17 Akim Demaille <akim@epita.fr>
10347
10348 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
10349 macros.
10350 Use them to declare the variables which are global or local to
10351 `yyparse'.
10352
10353 2000-11-17 Akim Demaille <akim@epita.fr>
10354
10355 * acconfig.h: Remove, no longer used.
10356
10357 2000-11-07 Akim Demaille <akim@epita.fr>
10358
10359 * src: s/Copyright (C)/Copyright/g.
10360
10361 2000-11-07 Akim Demaille <akim@epita.fr>
10362
10363 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
10364 defining.
10365 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
10366
10367 2000-11-07 Akim Demaille <akim@epita.fr>
10368
10369 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
10370 Merge in a single CPP if/else.
10371
10372 2000-11-07 Akim Demaille <akim@epita.fr>
10373
10374 * src/output.c (output): Remove useless variables.
10375 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
10376 argument `data' for consistency with the prototypes.
10377 Qualify it `const'.
10378 (obstack_copy, obstack_copy0): Rename the second argument as
10379 `address' for consistency. Qualify it `const'.
10380 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
10381 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
10382 `const' their input argument (`data' or `address').
10383 Adjust the corresponding macros to include `const' in casts.
10384
10385 2000-11-03 Akim Demaille <akim@epita.fr>
10386
10387 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
10388 s/PFILE1/BISON_HAIRY/.
10389 Adjust dependencies.
10390
10391 2000-11-03 Akim Demaille <akim@epita.fr>
10392
10393 For some reason, this was not applied.
10394
10395 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10396 `unlink': it's no longer used.
10397
10398 2000-11-03 Akim Demaille <akim@epita.fr>
10399
10400 * src/files.c (skeleton_find): New function, eved out of...
10401 (open_files, open_extra_files): here.
10402
10403 2000-11-03 Akim Demaille <akim@epita.fr>
10404
10405 Don't use `atexit'.
10406
10407 * src/files.c (obstack_save): New function.
10408 (done): Rename as...
10409 (output_files): this.
10410 Use `obstack_save'.
10411 * src/main.c (main): Don't use `atexit' to register `done', since
10412 it no longer has to remove tmp files, just call `output_files'
10413 when there are no errors.
10414
10415 2000-11-02 Akim Demaille <akim@epita.fr>
10416
10417 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10418 `unlink': it's no longer used.
10419 * src/files.h: Formatting changes.
10420
10421 2000-11-02 Akim Demaille <akim@epita.fr>
10422
10423 Remove the last uses of mktemp and unlink/delete.
10424
10425 * src/files.c (fdefines, ftable): Removed.
10426 (defines_ostack, table_obstack): New.
10427 Adjust dependencies of the former into uses of the latter.
10428 * src/output.c (output_short_or_char_table, output_short_table):
10429 Convert to using obstacks.
10430 * src/reader.c (copy_comment2): Accept one FILE * and two
10431 obstacks.
10432 (output_token_defines, reader_output_yylsp): Use obstacks.
10433 * src/system.h (obstack_fgrow3): New.
10434 * po/POTFILES.in: Adjust.
10435
10436 2000-11-01 Akim Demaille <akim@epita.fr>
10437
10438 Change each use of `fattrs' into a use of `attrs_obstack'.
10439
10440 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
10441 * src/files.c (fattrs): Remove.
10442 (attrs_obstack): New.
10443 Adjust all dependencies.
10444 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
10445
10446 2000-11-01 Akim Demaille <akim@epita.fr>
10447
10448 Introduce obstacks.
10449 Change each use of `faction' into a use of `action_obstack'.
10450
10451 * lib/obstack.h, lib/obstack.c: New files.
10452 * src/files.c (faction): Remove.
10453 (action_obstack): New.
10454 Adjust all dependencies.
10455
10456 2000-10-20 Akim Demaille <akim@epita.fr>
10457
10458 * lib/quote.h (PARAMS): New macro. Use it.
10459
10460 2000-10-16 Akim Demaille <akim@epita.fr>
10461
10462 * src/output.c (output_short_or_char_table): New function.
10463 (output_short_table, output_token_translations): Use it.
10464 (goto_actions): Use output_short_table.
10465
10466 2000-10-16 Akim Demaille <akim@epita.fr>
10467
10468 * src/symtab.c (bucket_new): New function.
10469 (getsym): Use it.
10470
10471 * src/output.c (output_short_table): New argument to display the
10472 comment associated with the table.
10473 Adjust dependencies.
10474 (output_gram): Use it.
10475 (output_rule_data): Nicer output layout for YYTNAME.
10476
10477 2000-10-16 Akim Demaille <akim@epita.fr>
10478
10479 * src/lex.c (read_typename): New function.
10480 (lex): Use it.
10481 * src/reader.c (copy_dollar): Likewise.
10482
10483 2000-10-16 Akim Demaille <akim@epita.fr>
10484
10485 * src/reader.c (copy_comment2): Expect the input stream to be on
10486 the `/' which is suspected to open a comment, instead of being
10487 called after `//' or `/*' was read.
10488 (copy_comment, copy_definition, parse_union_decl, copy_action)
10489 (copy_guard): Adjust.
10490
10491 2000-10-16 Akim Demaille <akim@epita.fr>
10492
10493 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
10494 `read_signed_integer'.
10495
10496 2000-10-16 Akim Demaille <akim@epita.fr>
10497
10498 * src/reader.c (copy_dollar): New function.
10499 (copy_guard, copy_action): Use it.
10500
10501 2000-10-16 Akim Demaille <akim@epita.fr>
10502
10503 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
10504 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
10505 New files, from Fileutils 4.0.27.
10506 * src/main.c (printable_version): Remove.
10507 * src/lex.c, src/reader.c: Use `quote'.
10508
10509 2000-10-04 Akim Demaille <akim@epita.fr>
10510
10511 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
10512
10513 2000-10-04 Akim Demaille <akim@epita.fr>
10514
10515 * doc/bison.texinfo: Various typos spotted by Neil Booth.
10516
10517 2000-10-04 Akim Demaille <akim@epita.fr>
10518
10519 When a literal string is used to define two different tokens,
10520 `bison -v' segfaults.
10521 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
10522
10523 * tests/regression.m4: New file.
10524 Include the core of the sample provided by Piotr Gackiewicz.
10525 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
10526 properly.
10527
10528 2000-10-04 Akim Demaille <akim@epita.fr>
10529
10530 * src/reader.c (parse_expect_decl): Keep `count' within the size
10531 of `buffer'.
10532 From Neil Booth.
10533
10534 2000-10-02 Paul Eggert <eggert@twinsun.com>
10535
10536 * bison.s1 (yyparse): Assign the default value
10537 unconditionally, to avoid a GCC warning and make the parser a
10538 tad smaller.
10539
10540 2000-10-02 Akim Demaille <akim@epita.fr>
10541
10542 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
10543 options.
10544
10545 2000-10-02 Akim Demaille <akim@epita.fr>
10546
10547 * src/derives.c, src/print.c, src/reduce.c: To ease the
10548 translation, move some `\n' out of the translated strings.
10549
10550 2000-10-02 Akim Demaille <akim@epita.fr>
10551
10552 The location tracking mechanism is precious for parse error
10553 messages. Nevertheless, it is enabled only when `@n' is used in
10554 the grammar, which is a different issue (you can use it in error
10555 message, but not in the grammar per se). Therefore, there should
10556 be another means to enable it.
10557
10558 * src/getargs.c (getargs): Support `--locations'.
10559 (usage): Report it.
10560 * src/getargs.h (locationsflag): Export it.
10561 * src/lex.c (percent_table): Support `%locations'.
10562 * src/reader.c (yylsp_needed): Remove this variable, now replaced
10563 with `locationsflag'.
10564 * doc/bison.texinfo: Document `--locations' and `%locations'.
10565 Sort the options.
10566 * tests/calc.m4: Test it.
10567
10568 For regularity of the names, replace each
10569 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
10570 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
10571 In addition replace each `flag' with `_flag'.
10572
10573 2000-10-02 Akim Demaille <akim@epita.fr>
10574
10575 Also test parse error messages, including with YYERROR_VERBOSE.
10576
10577 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
10578 associative).
10579 Use it to check the computations.
10580 Use it to check `nonassoc' is honored.
10581 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
10582 `--yyerror-verbose'.
10583 (_AT_CHECK_CALC): Adjust to this option.
10584 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
10585
10586 2000-10-02 Akim Demaille <akim@epita.fr>
10587
10588 Test also `--verbose', `--defines' and `--name-prefix'. Testing
10589 the latter demonstrates a flaw in the handling of non debugging
10590 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
10591 was used in order to simplify:
10592
10593 #if YYDEBUG
10594 if (yydebug)
10595 {
10596 ...
10597 }
10598 #endif
10599
10600 into
10601
10602 if (yydebug)
10603 {
10604 ...
10605 }
10606
10607 unfortunately this leads to a CPP conflict when
10608 `--name-prefix=foo' is used since it produces `#define yydebug
10609 foodebug'.
10610
10611 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
10612 (YYDPRINTF): New macro.
10613 Spread its use.
10614 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10615 the bison options.
10616 Also test `--verbose', `--defines' and `--name-prefix'.
10617
10618 2000-10-02 Akim Demaille <akim@epita.fr>
10619
10620 Improve the readability of the produced parsers.
10621
10622 * src/bison.s1: Formatting changes.
10623 Improve the comment related to the `$' mark.
10624 (yydefault): Don't fall through to `yyresume': `goto' there.
10625 * src/output.c (output_parser): When the `$' is met, skip the end
10626 of its line.
10627 New variable, `number_of_dollar_signs', to check there's exactly
10628 one `$' in the parser skeleton.
10629
10630 2000-10-02 Akim Demaille <akim@epita.fr>
10631
10632 * lib/xstrdup.c: New file, from the fileutils.
10633 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10634 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10635 instead of strlen + xmalloc + strcpy.
10636 * src/symtab.c (copys): Remove, use xstrdup instead.
10637
10638 2000-10-02 Akim Demaille <akim@epita.fr>
10639
10640 * src/gram.h (associativity): New enum type which replaces the
10641 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10642 `right_assoc', `left_assoc' and `non_assoc'.
10643 Adjust all dependencies.
10644 * src/reader.c: Formatting changes.
10645 (LTYPESTR): Don't define it, use it as a literal in
10646 `reader_output_yylsp'.
10647 * src/symtab.h (symbol_class): New enum type which replaces the
10648 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10649 `sunknown', `stoken and `snterm'.
10650
10651 2000-10-02 Akim Demaille <akim@epita.fr>
10652
10653 * src/getargs.c (fixed_outfiles): Rename as...
10654 (yaccflag): for consistency and accuracy.
10655 Adjust dependencies.
10656
10657 2000-10-02 Akim Demaille <akim@epita.fr>
10658
10659 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10660 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10661 difficult and introduced a lot of core dump. It turns out that
10662 Bison used an implementation of `xmalloc' based on `calloc', and
10663 at various places it does depend upon the initialization to 0. I
10664 have not tried to isolate the pertinent places, and all the former
10665 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10666 someone should address this issue.
10667
10668 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10669 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10670 files.
10671 Adjust dependencies.
10672 * src/warshall.h: New file.
10673 Propagate.
10674
10675 2000-10-02 Akim Demaille <akim@epita.fr>
10676
10677 Various anti-`extern in *.c' changes.
10678
10679 * src/system.h: Include `assert.h'.
10680
10681 2000-10-02 Akim Demaille <akim@epita.fr>
10682
10683 * src/state.h (nstates, final_state, first_state, first_shift)
10684 (first_reduction): Move their exportation from here...
10685 * src/LR0.h: to here.
10686 Adjust dependencies.
10687 * src/getargs.c (statisticsflag): New variable.
10688 Add support for `--statistics'.
10689 Adjust dependencies.
10690
10691 Remove a lot of now useless `extern' statements in most files.
10692
10693 2000-10-02 Akim Demaille <akim@epita.fr>
10694
10695 * src/LR0.h: New file.
10696 Propagate its use.
10697
10698 2000-10-02 Akim Demaille <akim@epita.fr>
10699
10700 * src/print.h: New file.
10701 Propagate its use.
10702 * src/print.c: Formatting and ordering changes.
10703 (verbose, terse): Replace with...
10704 (print_results): this new function.
10705 Adjust dependencies.
10706
10707 2000-10-02 Akim Demaille <akim@epita.fr>
10708
10709 * src/conflicts.c (conflict_report): New function.
10710 (conflict_log, verbose_conflict_log): Replace with...
10711 (print_conflicts): this function.
10712 Adjust dependencies.
10713 * src/conflicts.h: New file.
10714 Propagate its inclusion.
10715
10716 2000-10-02 Akim Demaille <akim@epita.fr>
10717
10718 * src/nullable.h: New file.
10719 Propagate its inclusion.
10720 * src/nullable.c: Formatting changes.
10721
10722 2000-10-02 Akim Demaille <akim@epita.fr>
10723
10724 * src/reduce.h: New file.
10725 Propagate its inclusion.
10726 * src/reduce.c: Topological sort and other formatting changes.
10727 (bool, TRUE, FALSE): Move their definition to...
10728 * src/system.h: here.
10729
10730 2000-10-02 Akim Demaille <akim@epita.fr>
10731
10732 * src/files.c: Formatting changes.
10733 (tryopen, tryclose, openfiles): Rename as...
10734 (xfopen, xfclose, open_files): this.
10735 (stringappend): static.
10736 * src/files.h: Complete the list of exported symbols.
10737 Propagate its use.
10738
10739 2000-10-02 Akim Demaille <akim@epita.fr>
10740
10741 * src/reader.h: New file.
10742 Propagate its use instead of tedious list of `extern' and
10743 prototypes.
10744 * src/reader.c: Formatting changes, topological sort,
10745 s/register//.
10746
10747 2000-10-02 Akim Demaille <akim@epita.fr>
10748
10749 * src/lex.h: Prototype `lex.c' exported functions.
10750 * src/reader.c: Adjust.
10751 * src/lex.c: Formatting changes.
10752 (safegetc): Rename as...
10753 (xgetc): this.
10754
10755 2000-10-02 Akim Demaille <akim@epita.fr>
10756
10757 * src/lalr.h: New file.
10758 Propagate its inclusion instead of prototypes and `extern'.
10759 * src/lalr.c: Formatting changes, topological sorting etc.
10760
10761 2000-10-02 Akim Demaille <akim@epita.fr>
10762
10763 * src/output.c (token_actions): Introduce a temporary array,
10764 YYDEFACT, that makes it possible for this function to use
10765 output_short_table.
10766
10767 2000-10-02 Akim Demaille <akim@epita.fr>
10768
10769 `user_toknums' is output as a `short[]' in `output.c', while it is
10770 defined as a `int[]' in `reader.c'. For consistency with the
10771 other output tables, `user_toknums' is now defined as a table of
10772 shorts.
10773
10774 * src/reader.c (user_toknums): Be a short table instead of an int
10775 table.
10776 Adjust dependencies.
10777
10778 Factor the short table outputs.
10779
10780 * src/output.c (output_short_table): New function.
10781 * src/output.c (output_gram, output_stos, output_rule_data)
10782 (output_base, output_table, output_check): Use it.
10783
10784 2000-10-02 Akim Demaille <akim@epita.fr>
10785
10786 * src/output.c (output): Topological sort of the functions, in
10787 order to get rid of the `static' prototypes.
10788 No longer use `register'.
10789 * src/output.h: New file.
10790 Propagate its inclusion in files explicitly prototyping functions
10791 from output.c.
10792
10793 2000-09-21 Akim Demaille <akim@epita.fr>
10794
10795 * src/atgeneral.m4: Update from Autoconf.
10796
10797 2000-09-21 Akim Demaille <akim@epita.fr>
10798
10799 * src/closure.h: New file.
10800 * src/closure.c: Formatting changes, topological sort over the
10801 functions, use of closure.h.
10802 (initialize_closure, finalize_closure): Rename as...
10803 (new_closure, free_closure): these. Adjust dependencies.
10804 * src/LR0.c: Formatting changes, topological sort, use of
10805 cloture.h.
10806 (initialize_states): Rename as...
10807 (new_states): this.
10808 * src/Makefile.am (noinst_HEADERS): Adjust.
10809
10810 2000-09-20 Akim Demaille <akim@epita.fr>
10811
10812 * src/acconfig.h: Don't protect config.h against multiple
10813 inclusion.
10814 Don't define PARAMS.
10815 * src/system.h: Define PARAMS.
10816 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
10817 purpose of config.h. system.h must not try to fix wrong
10818 definitions in config.h.
10819
10820 2000-09-20 Akim Demaille <akim@epita.fr>
10821
10822 * src/derives.h: New file.
10823 * src/main.c, src/derives.h: Use it.
10824 Formatting changes.
10825 * src/Makefile.am (noinst_HEADERS): Adjust.
10826
10827 2000-09-20 Akim Demaille <akim@epita.fr>
10828
10829 * tests/atgeneral.m4: Update from Autoconf.
10830 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
10831 (AT_CHECK_CALC): New macros.
10832 Use these macros to test bison with options `', `--raw',
10833 `--debug', `--yacc', `--yacc --debug'.
10834
10835 2000-09-19 Akim Demaille <akim@epita.fr>
10836
10837 * src/output.c: Formatting changes.
10838 * src/machine.h: Remove, leaving its contents in...
10839 * src/system.h: here.
10840 Include stdio.h.
10841 Adjust all dependencies on stdio.h and machine.h.
10842 * src/getargs.h: New file.
10843 Let all `extern' declarations about getargs.c be replaced with
10844 inclusion of `getargs.h'.
10845 * src/Makefile.am (noinst_HEADERS): Adjust.
10846
10847 * tests/calc.m4 (yyin): Be initialized in main, not on the global
10848 scope.
10849 (yyerror): Returns void, not int.
10850 * doc/bison.texinfo: Formatting changes.
10851
10852 2000-09-19 Akim Demaille <akim@epita.fr>
10853
10854 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
10855 portable.
10856
10857 2000-09-18 Akim Demaille <akim@epita.fr>
10858
10859 * configure.in: Append WARNING_CFLAGS to CFLAGS.
10860 * src/Makefile.am (INCLUDES): Don't.
10861 Be ready to fetch headers in lib/.
10862
10863 2000-09-18 Akim Demaille <akim@epita.fr>
10864
10865 * doc/bison.texinfo: Update the copyright.
10866 ANSIfy and GNUify the examples.
10867 Remove the old menu.
10868
10869 2000-09-18 Akim Demaille <akim@epita.fr>
10870
10871 First set of tests: use the `calc' example from the documentation.
10872
10873 * src/bison.s1 (yyparse): Condition the code using `yytname' which
10874 is defined only when YYDEBUG is.
10875 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
10876 * src/files.c (tryopen, tryclose): Formatting changes.
10877 Move to the top and be static.
10878 * src/reader.c (read_signed_integer): Likewise.
10879 * tests/calc.m4: New file.
10880 * Makefile.am, suite.m4: Adjust.
10881 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
10882
10883 2000-09-18 Akim Demaille <akim@epita.fr>
10884
10885 Add support for an Autotest test suite for Bison.
10886
10887 * m4/m4.m4, m4/atconfig.m4: New files.
10888 * m4/Makefile.am (EXTRA_DIST): Adjust.
10889 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
10890 files.
10891 * src/getargs.c: Display a more standard --version message.
10892 * src/reader.c (reader): Formatting changes.
10893 No longer depend upon VERSION_STRING.
10894 * configure.in: No longer use `dnl'.
10895 Set up the test suite and the new directory `tests/.
10896 (VERSION_STRING): Remove.
10897
10898 2000-04-14 Akim Demaille <akim@epita.fr>
10899
10900 * src/reader.c (copy_comment2): New function, same as former
10901 `copy_comment', but outputs into two FILE *.
10902 (copy_comment): Use it.
10903 (parse_union_decl): Use it.
10904 (get_type, parse_start_decl): Use the same `invalid' message.
10905 (parse_start_decl, parse_union_decl): Use the same `multiple'
10906 message.
10907 (parse_union_decl, copy_guard, copy_action): Use the same
10908 `unmatched' message.
10909 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
10910
10911 2000-03-31 Akim Demaille <akim@epita.fr>
10912
10913 * src/files.c (tryopen, tryclose): Move to the top.
10914 Be static.
10915
10916 2000-03-31 Akim Demaille <akim@epita.fr>
10917
10918 * src/main.c (main): Don't call `done', exit does it.
10919
10920 2000-03-31 Akim Demaille <akim@epita.fr>
10921
10922 * allocate.c: s/return (foo)/return foo/.
10923 * lalr.c: Likewise.
10924 * LR0.c: Likewise.
10925 * output.c: Likewise.
10926 * reader.c: Likewise.
10927 * symtab.c: Likewise.
10928 * vmsgetargs.c: Likewise.
10929
10930 2000-03-31 Akim Demaille <akim@epita.fr>
10931
10932 Clean up the error reporting functions.
10933
10934 * src/report.c: New file.
10935 * src/report.h: Likewise.
10936 * src/Makefile.am: Adjust.
10937 * m4/error.m4: New file.
10938 * m4/Makefile.am: Adjust.
10939 * configure.in (jm_PREREQ_ERROR): Call it.
10940 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
10941 Remove.
10942 (fatal, fatals): Remove. All callers use complain.c::fatal.
10943 (warn, warni, warns, warnss, warnss): Remove. All callers use
10944 complain.c::complain.
10945 (toomany): Remove, use fatal instead.
10946 * src/files.c (done): No argument, use complain_message_count.
10947 * src/main.c (main): Register `done' to `atexit'.
10948
10949 * src/getargs.c (usage): More `fputs', less `fprintf'.
10950
10951 2000-03-28 Akim Demaille <akim@epita.fr>
10952
10953 * lib/: New directory.
10954 * Makefile.am (SUBDIRS): Adjust.
10955 * configure.in: Adjust.
10956 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
10957 useless.
10958 * src/alloca.c: Moved to lib/.
10959 * src/getopt.c: Likewise.
10960 * src/getopt1.c: Likewise.
10961 * src/getopt.h: Likewise.
10962 * src/ansi2knr.c: Likewise.
10963 * src/ansi2knr.1: Likewise.
10964 * src/Makefile.am: Adjust.
10965 * lib/Makefile.am: New file.
10966
10967 2000-03-28 Akim Demaille <akim@epita.fr>
10968
10969 * src/getargs.c (usage): Refresh the help message.
10970
10971 2000-03-17 Akim Demaille <akim@epita.fr>
10972
10973 * src/getopt1.c: Updated from textutils 2.0e
10974 * src/getopt.c: Likewise.
10975 * src/getopt.h: Likewise.
10976
10977 2000-03-17 Akim Demaille <akim@epita.fr>
10978
10979 * src/Makefile.am (bison.simple): Fix the awk program: quote only
10980 the file name, not the whole `#line LINE FILE'.
10981
10982 2000-03-17 Akim Demaille <akim@epita.fr>
10983
10984 On syntax errors, report the token on which we choked.
10985
10986 * src/bison.s1 (yyparse): In the label yyerrlab, when
10987 YYERROR_VERBOSE, add yychar in msg.
10988
10989 2000-03-17 Akim Demaille <akim@epita.fr>
10990
10991 * src/reader.c (copy_at): New function.
10992 (copy_guard): Use it.
10993 (copy_action): Use it.
10994
10995 2000-03-17 Akim Demaille <akim@epita.fr>
10996
10997 Be kind to translators, save some useless translations.
10998
10999 * src/main.c (banner): New function.
11000 (fatal_banner): Use it.
11001 (warn_banner): Use it.
11002
11003 2000-03-17 Akim Demaille <akim@epita.fr>
11004
11005 * src/reader.c (copy_definition): Use copy_string and
11006 copy_comment. Removed now unused `match', `ended',
11007 `cplus_comment'.
11008 (copy_comment, copy_string): Moved, to be visible from
11009 copy_definition.
11010
11011 2000-03-17 Akim Demaille <akim@epita.fr>
11012
11013 * src/reader.c (copy_string): Declare `static inline'. No
11014 problems with inline, since it is checked by configure.
11015 (copy_comment): Likewise.
11016
11017 2000-03-17 Akim Demaille <akim@epita.fr>
11018
11019 * src/reader.c (packsymbols): Formatting changes.
11020
11021 2000-03-17 Akim Demaille <akim@epita.fr>
11022
11023 * src/reader.c (copy_comment): New function, factored out from:
11024 (copy_action): Use it. Removed now unused `match', `ended',
11025 `cplus_comment'.
11026 (copy_guard): Likewise.
11027
11028 2000-03-17 Akim Demaille <akim@epita.fr>
11029
11030 * src/reader.c (copy_string): New function, factored out from:
11031 (copy_action): Use it.
11032 (copy_guard): Likewise.
11033
11034 2000-03-17 Akim Demaille <akim@epita.fr>
11035
11036 Change the handling of @s so that they behave exactly like $s.
11037 There is now a pseudo variable @$ (readble and writable), location
11038 of the lhs of the rule (by default ranging from the location of
11039 the first symbol of the rhs, to the location of the last symbol,
11040 or, if the rhs is empty, YYLLOC).
11041
11042 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
11043 yyval.
11044 (yyparse): When providing a default semantic action, provide a
11045 default location action.
11046 (after the $): No longer change `*YYLSP', just stack YYLOC the
11047 same way you stack YYVAL.
11048 * src/reader.c (read_declarations): Use warns.
11049 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
11050 (copy_action, case '@'): Likewise.
11051 Use a standard error message, to save useless work from
11052 translators.
11053
11054 2000-03-17 Akim Demaille <akim@epita.fr>
11055
11056 * src/bison.s1: Formatting and cosmetics changes.
11057 * src/reader.c: Likewise.
11058 Update the Copyright notice.
11059
11060 2000-03-17 Akim Demaille <akim@epita.fr>
11061
11062 * src/bison.s1 (#line): All set to `#line' only, since the
11063 Makefile now handles them.
11064
11065 2000-03-16 Akim Demaille <akim@epita.fr>
11066
11067 * src/output.c (output_rule_data): Output the documentation of
11068 some of the tables.
11069 (Copyright notice): Update.
11070 Formatting changes.
11071
11072 2000-03-16 Akim Demaille <akim@epita.fr>
11073
11074 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
11075 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
11076 One `#if YYDEBUG' remains, since it uses variables which are
11077 defined only if `YYDEBUG != 0'.
11078
11079 2000-03-16 Akim Demaille <akim@epita.fr>
11080
11081 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
11082 and related variables so that the similarities are highlighted.
11083
11084 2000-03-16 Akim Demaille <akim@epita.fr>
11085
11086 * src/bison.s1: Properly indent CPP directives.
11087
11088 2000-03-16 Akim Demaille <akim@epita.fr>
11089
11090 * src/bison.s1: Properly indent the `alloca' CPP section.
11091
11092 2000-03-16 Akim Demaille <akim@epita.fr>
11093
11094 Do not hard code values of directories in `configure.in'.
11095 Update the `configure' tool chain.
11096
11097 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
11098 src/makefile.am.
11099 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
11100 (AC_OUTPUT): Add m4/Makefile.
11101 Bump to bison 1.28a, 1.29 has never been released.
11102 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
11103 handled via src/Makefile.am.
11104 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
11105 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
11106 autoheader.
11107 * Makefile.am (SUBDIRS): Add m4.
11108 (ACLOCAL_AM_FLAGS): New variable.
11109 (AUTOMAKE_OPTIONS): Add check-news.
11110 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
11111 the proper line number and file name.
11112 (DEFS): Propagate the location of bison library files and of the
11113 locale files.
11114 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
11115 builddir.
11116 * acinclude.m4: Remove, replaced by the directory m4.
11117 * m4/Makefile.am (EXTRA_DIST): New variable.
11118 * m4/gettext.m4: New file, from the fileutils.
11119 * m4/lcmessage.m4: Likewise
11120 * m4/progtest.m4: Likewise.
11121 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
11122
11123 2000-03-10 Akim Demaille <akim@epita.fr>
11124
11125 * src/closure.c:
11126 Formatting changes of various comments.
11127 Respect the GNU coding standards at various places.
11128 Don't use `_()' when no translation is needed.
11129
11130 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11131
11132 * src/files.c:
11133 OS/2 honors TMPDIR environment variable.
11134
11135 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11136
11137 * doc/bison.texinfo: Tweaked spelling and grammar.
11138 Updated ISBN.
11139 Removed reference to price of printed copy.
11140 Mention BISON_SIMPLE and BISON_HAIRY.
11141
11142 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11143
11144 * configure.in, NEWS:
11145 Bison 1.29 released.
11146
11147 1999-10-27 Jesse Thilo <jthilo@gnu.org>
11148
11149 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
11150 Added reference card.
11151
11152 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11153
11154 * po/ru.po: Added Russian translation.
11155
11156 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11157
11158 * configure.in: Added Russian translation.
11159
11160 1999-07-06 Jesse Thilo <jthilo@gnu.org>
11161
11162 * configure.in, NEWS, README:
11163 Released version 1.28.
11164
11165 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11166
11167 * src/system.h:
11168 Squashed redefinition warning on some systems.
11169
11170 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
11171 Have configure build version string instead of relying on ANSI string
11172 concatentation.
11173
11174 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11175
11176 * po/POTFILES.in: Got rid of version.c.
11177
11178 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11179
11180 * acconfig.h, configure.in:
11181 Have configure build version string instead of relying on ANSI string
11182 concatentation.
11183
11184 1999-06-08 Jesse Thilo <jthilo@gnu.org>
11185
11186 * doc/bison.1:
11187 Dropped mention of `+' for long-named options.
11188
11189 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11190
11191 * src/files.c: Added <unistd.h> for unlink().
11192
11193 * src/Makefile.am, src/system.h:
11194 I18n fixes.
11195
11196 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11197
11198 * README: Added a FAQ list.
11199
11200 * configure.in, acconfig.h:
11201 I18n fixes.
11202
11203 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11204
11205 * doc/FAQ, doc/Makefile.am:
11206 Added a FAQ list.
11207
11208 1999-05-19 Jesse Thilo <jthilo@gnu.org>
11209
11210 * src/alloc.h, src/symtab.h, src/version.c:
11211 Protected inclusion of "config.h" with HAVE_CONFIG_H.
11212
11213 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11214
11215 * src/.cvsignore, src/Makefile.am:
11216 Reorganized: sources in `src', documentation in `doc'.
11217
11218 * src/lex.c (literalchar):
11219 fixed the code for escaping double quotes (thanks
11220 Jonathan Czisny.)
11221
11222 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11223
11224 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
11225 Adjusted paths to reflect directory reorganization.
11226
11227 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11228
11229 * doc/.cvsignore, doc/Makefile.am:
11230 Reorganized: sources in `src', documentation in `doc'.
11231
11232 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11233
11234 * configure.in:
11235 Updated AC_INIT file to reflect directory reorganization.
11236
11237 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
11238 Reorganized: sources in `src', documentation in `doc'.
11239
11240 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11241
11242 * src/allocate.c:
11243 Don't declare calloc() and realloc() if not necessary.
11244
11245 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11246
11247 * configure.in, acconfig.h, acinclude.m4:
11248 Don't declare calloc() and realloc() if not necessary.
11249
11250 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11251
11252 * po/.cvsignore: Added i18n support.
11253
11254 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11255
11256 * acconfig.h, configure.in, Makefile.am:
11257 Added i18n support.
11258
11259 1999-03-22 Jesse Thilo <jthilo@gnu.org>
11260
11261 * src/bison.s1: Fixed #line numbers.
11262
11263 1999-03-15 Jesse Thilo <jthilo@gnu.org>
11264
11265 * po/es.po, po/fr.po, po/nl.po, po/de.po:
11266 Added PO files from Translation Project.
11267
11268 1999-03-03 Jesse Thilo <jthilo@gnu.org>
11269
11270 * Makefile.am:
11271 Added support for non-ANSI compilers (ansi2knr).
11272
11273 1999-02-16 Jesse Thilo <jthilo@gnu.org>
11274
11275 * configure.in: Bumped version number to 1.27.
11276
11277 * Makefile.am:
11278 Added `bison.simple' to list of files removed by `make distclean'.
11279
11280 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11281
11282 * src/files.c, src/files.h:
11283 Defined locations of parser files in config.h instead of Makefile.
11284
11285 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11286
11287 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
11288 Defined locations of parser files in config.h instead of Makefile.
11289
11290 1999-02-09 Jesse Thilo <jthilo@gnu.org>
11291
11292 * Makefile.am:
11293 Removed inappropriate use of $< macro.
11294
11295 1999-02-05 Jesse Thilo <jthilo@gnu.org>
11296
11297 * po/Makefile.in.in, po/POTFILES.in:
11298 Add `po' directory skeleton.
11299
11300 1999-01-27 Jesse Thilo <jthilo@gnu.org>
11301
11302 * README: Document help-bison list.
11303
11304 * configure.in: Add check for mkstemp().
11305
11306 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11307
11308 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
11309 Hush a few compiler warnings.
11310
11311 * src/files.c:
11312 Add tryclose(), which verifies that fclose was successful.
11313 Hush a couple of compiler warnings.
11314
11315 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11316
11317 * Makefile.am, OChangeLog:
11318 ChangeLog is now automatically generated. Include the old version as
11319 OChangeLog.
11320
11321 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11322
11323 * 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:
11324 Update FSF address.
11325
11326 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11327
11328 * doc/bison.texinfo: Fix formatting glitch.
11329
11330 * doc/bison.texinfo: Update FSF address.
11331
11332 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11333
11334 * acconfig.h: Update FSF address.
11335
11336 1999-01-08 Jesse Thilo <jthilo@gnu.org>
11337
11338 * src/system.h:
11339 Don't define PACKAGE here, since config.h defines it.
11340
11341 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11342
11343 * src/reader.c: Update copyright date.
11344
11345 * src/main.c:
11346 Ditch sprintf to statically-sized buffers in fatal/warn functions in
11347 favor of output directly to stderr (avoids buffer overruns).
11348
11349 * src/reader.c: Some checks for premature EOF.
11350
11351 * 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:
11352 Use prototypes if the compiler understands them.
11353
11354 * src/files.c: Honor TMPDIR on Unix hosts.
11355 Use prototypes if the compiler understands them.
11356
11357 * src/reader.c:
11358 Fix a couple of buffer overrun bugs.
11359 Use prototypes if the compiler understands them.
11360
11361 * src/system.h: Include unistd.h and ctype.h.
11362 Use #ifdef instead of #if for NLS symbols.
11363
11364 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11365
11366 * doc/bison.texinfo:
11367 Delete comment "consider using @set for edition number, etc..." since
11368 we now are doing so.
11369
11370 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11371
11372 * configure.in:
11373 Use prototypes if the compiler understands them.
11374
11375 * NEWS: Document 1.26 highlights.
11376
11377 * Makefile.am: Require Automake 1.3 or later.
11378
11379 * acconfig.h:
11380 Use prototypes if the compiler understands them.
11381
11382 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11383
11384 * src/version.c:
11385 Use VERSION symbol from automake for version number.
11386
11387 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11388
11389 * acconfig.h, configure.in, version.cin:
11390 Use VERSION symbol from automake for version number.
11391
11392 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11393
11394 * Makefile.am:
11395 Distribute original version of simple parser (bison.s1), not built
11396 version (bison.simple).
11397
11398 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11399
11400 * doc/bison.texinfo: Add info dir entry.
11401
11402 * doc/bison.texinfo:
11403 Let automake put version number into documentation.
11404
11405 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11406
11407 * src/bison.cld, src/build.com, src/vmshlp.mar:
11408 Add non-RCS files from /gd/gnu/bison.
11409
11410 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11411
11412 * doc/bison.1:
11413 Document the BISON_HAIRY and BISON_SIMPLE variables.
11414
11415 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11416
11417 * src/version.c: Build version.c automatically.
11418
11419 * src/reader.c:
11420 Fix token numbering (used to start at 258, not 257).
11421
11422 * src/system.h: Include config.h.
11423
11424 * src/getargs.c: Update bug report address.
11425
11426 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
11427 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
11428
11429 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11430
11431 * Makefile.am:
11432 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11433
11434 * configure.in, version.cin:
11435 Build version.c automatically.
11436
11437 * AUTHORS: Add AUTHORS file.
11438
11439 * README: Update bug report address.
11440
11441 * bison.simple:
11442 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11443
11444 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
11445 Add automake stuff.
11446
11447 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11448
11449 * doc/bison.texinfo: Clean up some formatting.
11450
11451 1998-05-05 Richard Stallman <rms@gnu.org>
11452
11453 * doc/bison.texinfo:
11454 Explain better why to make a pure parser.
11455
11456 1998-01-05 Richard Stallman <rms@gnu.org>
11457
11458 * src/files.c (openfiles):
11459 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
11460 find a temporary directory, if possible. Do not unlink files while
11461 they are open.
11462
11463 1997-08-25 Richard Stallman <rms@gnu.org>
11464
11465 * src/reader.c (stack_offset;):
11466 Change some warni to warns.
11467
11468 * src/lex.c (literalchar): Use warns, not warni.
11469
11470 1997-06-28 Richard Stallman <rms@gnu.org>
11471
11472 * src/bison.s1: Add a Bison version comment.
11473
11474 * src/main.c (fatal, warn, berror):
11475 Use program_name.
11476
11477 1997-06-28 Richard Stallman <rms@gnu.org>
11478
11479 * Makefile.in (bison_version): New variable.
11480 (dist): Use that variable.
11481 (bison.s1): Substitute the Bison version into bison.simple.
11482
11483 * bison.simple: Add a Bison version comment.
11484
11485 1997-06-18 Richard Stallman <rms@gnu.org>
11486
11487 * src/main.c (fatal, warn, berror):
11488 Make error messages standard.
11489 (toomany): Improve error message text.
11490
11491 * 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:
11492 new.h renamed to alloc.h.
11493
11494 1997-06-18 Richard Stallman <rms@gnu.org>
11495
11496 * Makefile.in: new.h renamed to alloc.h.
11497
11498 1997-05-24 Richard Stallman <rms@gnu.org>
11499
11500 * src/lex.c (literalchar):
11501 Fix the code for escaping \, " and '.
11502
11503 (lex): Avoid trouble when there are many chars
11504 to discard in a char literal with just several chars in it.
11505
11506 1997-05-17 Richard Stallman <rms@gnu.org>
11507
11508 * src/bison.s1:
11509 Use malloc, if using alloca is troublesome.
11510 (YYSTACK_USE_ALLOCA): New flag macro.
11511 Define it for some systems and compilers.
11512 (YYSTACK_ALLOC): New macro.
11513 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11514 If it was malloc'd, free it.
11515
11516 1997-05-17 Richard Stallman <rms@gnu.org>
11517
11518 * bison.simple:
11519 Use malloc, if using alloca is troublesome.
11520 (YYSTACK_USE_ALLOCA): New flag macro.
11521 Define it for some systems and compilers.
11522 (YYSTACK_ALLOC): New macro.
11523 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11524 If it was malloc'd, free it.
11525
11526 1997-04-23 Richard Stallman <rms@gnu.org>
11527
11528 * src/bison.s1:
11529 (alloca) [__hpux]: Always define as __builtin_alloca.
11530
11531 1997-04-23 Richard Stallman <rms@gnu.org>
11532
11533 * bison.simple:
11534 (alloca) [__hpux]: Always define as __builtin_alloca.
11535
11536 1997-04-22 Richard Stallman <rms@gnu.org>
11537
11538 * src/bison.s1:
11539 [__hpux]: Include alloca.h (right for HPUX 10)
11540 instead of declaring alloca (right for HPUX 9).
11541
11542 * src/bison.s1 (__yy_memcpy):
11543 Declare arg `count' as unsigned int.
11544 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11545
11546 1997-04-22 Richard Stallman <rms@gnu.org>
11547
11548 * bison.simple:
11549 [__hpux]: Include alloca.h (right for HPUX 10)
11550 instead of declaring alloca (right for HPUX 9).
11551
11552 * bison.simple (__yy_memcpy):
11553 Declare arg `count' as unsigned int.
11554 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11555
11556 1997-01-03 Richard Stallman <rms@gnu.org>
11557
11558 * src/allocate.c: [__STDC__ or _MSC_VER]:
11559 Declare calloc and realloc to return void *.
11560
11561 1997-01-02 Richard Stallman <rms@gnu.org>
11562
11563 * src/system.h:
11564 [_MSC_VER]: Include stdlib.h and process.h.
11565 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
11566
11567 * src/main.c (main): Return FAILURE as a value.
11568 (printable_version): Declare arg as int, not char.
11569
11570 1997-01-02 Richard Stallman <rms@gnu.org>
11571
11572 * Makefile.in (dist):
11573 Explicitly check for symlinks, and copy them.
11574
11575 1996-12-19 Richard Stallman <rms@gnu.org>
11576
11577 * src/files.c:
11578 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
11579
11580 1996-12-18 Paul Eggert <eggert@gnu.org>
11581
11582 * src/bison.s1 (yyparse):
11583 If __GNUC__ and YYPARSE_PARAM are both defined,
11584 declare yyparse to have a void * argument.
11585
11586 1996-12-18 Paul Eggert <eggert@gnu.org>
11587
11588 * bison.simple (yyparse):
11589 If __GNUC__ and YYPARSE_PARAM are both defined,
11590 declare yyparse to have a void * argument.
11591
11592 1996-12-17 Richard Stallman <rms@gnu.org>
11593
11594 * src/reduce.c (nbits): Add some casts.
11595
11596 1996-08-12 Richard Stallman <rms@gnu.org>
11597
11598 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
11599
11600 1996-08-12 Richard Stallman <rms@gnu.org>
11601
11602 * bison.simple: Test _MSDOS as well as _MSDOS_.
11603
11604 1996-07-31 Richard Stallman <rms@gnu.org>
11605
11606 * src/bison.s1:
11607 [__sun && __i386]: Include alloca.h.
11608
11609 1996-07-31 Richard Stallman <rms@gnu.org>
11610
11611 * bison.simple:
11612 [__sun && __i386]: Include alloca.h.
11613
11614 1996-07-30 Richard Stallman <rms@gnu.org>
11615
11616 * src/bison.s1: Comment change.
11617
11618 * src/bison.s1: Test _MSDOS_, not MSDOS.
11619
11620 1996-07-30 Richard Stallman <rms@gnu.org>
11621
11622 * bison.simple: Comment change.
11623
11624 * bison.simple: Test _MSDOS_, not MSDOS.
11625
11626 1996-06-01 Richard Stallman <rms@gnu.org>
11627
11628 * 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:
11629 Insert `_' macro around many string constants.
11630
11631 * src/main.c:
11632 Insert `_' macro around many string constants.
11633
11634 (main): Call setlocale, bindtextdomain and textdomain.
11635
11636 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11637 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11638 [ENABLE_NLS]: Include libintl.h.
11639 [ENABLE_NLS] (gettext): Define.
11640 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11641 (N_, PACKAGE, LOCALEDIR): New macros.
11642
11643 1996-06-01 Richard Stallman <rms@gnu.org>
11644
11645 * POTFILES.in: New file.
11646
11647 * Makefile.in (allocate.o):
11648 Define target explicitly.
11649
11650 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11651 (LDFLAGS): Set to @LDFLAGS@.
11652 (configure): Run autoconf only if preceding `cd' succeeds.
11653 (bison.s1): Redirect output to temporary file then move the
11654 temporary to the target, rather than redirecting directly to bison.s1.
11655 (clean): Remove config.status and config.log.
11656 (distclean): Don't remove config.status here.
11657
11658 1996-05-12 Richard Stallman <rms@gnu.org>
11659
11660 * src/bison.s1:
11661 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11662
11663 1996-05-12 Richard Stallman <rms@gnu.org>
11664
11665 * bison.simple:
11666 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11667
11668 1996-05-11 Richard Stallman <rms@gnu.org>
11669
11670 * src/bison.s1 (__yy_memcpy):
11671 Really reorder the args, as was supposedly done on Feb 14 1995.
11672 (yyparse): Calls changed accordingly.
11673
11674 1996-05-11 Richard Stallman <rms@gnu.org>
11675
11676 * Makefile.in (dist): Don't use $(srcdir).
11677
11678 * bison.simple (__yy_memcpy):
11679 Really reorder the args, as was supposedly done on Feb 14 1995.
11680 (yyparse): Calls changed accordingly.
11681
11682 1996-01-27 Richard Stallman <rms@gnu.org>
11683
11684 * src/output.c (output_rule_data):
11685 Test YYERROR_VERBOSE in the conditional
11686 around the definition of ttyname.
11687
11688 1995-12-29 Richard Stallman <rms@gnu.org>
11689
11690 * src/bison.s1:
11691 Fix line numbers in #line commands.
11692
11693 1995-12-29 Richard Stallman <rms@gnu.org>
11694
11695 * bison.simple:
11696 Fix line numbers in #line commands.
11697
11698 1995-12-27 Richard Stallman <rms@gnu.org>
11699
11700 * src/bison.s1 (YYPARSE_PARAM_DECL):
11701 In C++, make it always null.
11702 (YYPARSE_PARAM_ARG): New macro.
11703 (yyparse): Use YYPARSE_PARAM_ARG.
11704
11705 1995-12-27 Richard Stallman <rms@gnu.org>
11706
11707 * bison.simple (YYPARSE_PARAM_DECL):
11708 In C++, make it always null.
11709 (YYPARSE_PARAM_ARG): New macro.
11710 (yyparse): Use YYPARSE_PARAM_ARG.
11711
11712 1995-11-29 Richard Stallman <rms@gnu.org>
11713
11714 * doc/bison.texinfo:
11715 Describe literal string tokens, %raw, %no_lines, %token_table.
11716
11717 1995-11-29 Daniel Hagerty <hag@gnu.org>
11718
11719 * doc/bison.texinfo: Fixed update date
11720
11721 1995-10-16 Richard Stallman <rms@gnu.org>
11722
11723 * src/version.c: Version 1.25.
11724
11725 1995-10-16 Richard Stallman <rms@gnu.org>
11726
11727 * NEWS: *** empty log message ***
11728
11729 1995-10-16 Richard Stallman <rms@gnu.org>
11730
11731 * doc/bison.1, doc/bison.rnh:
11732 Add new options.
11733
11734 1995-10-15 Richard Stallman <rms@gnu.org>
11735
11736 * src/vmsgetargs.c, src/getargs.c:
11737 Added -n, -k, and -raw switches.
11738 (noparserflag, toknumflag, rawtoknumflag): New variables.
11739
11740 * src/symtab.h (SALIAS):
11741 New #define for adding aliases to %token.
11742 (struct bucket): Added `alias' field.
11743
11744 * src/reduce.c (reduce_grammar):
11745 Revise error message.
11746 (print_notices): Remove final `.' from error message.
11747
11748 * src/reader.c (reader_output_yylsp):
11749 New function.
11750 (readgram): Use `#if 0' around code that accepted %command
11751 inside grammar rules: The documentation doesn't allow it,
11752 and it will fail since the %command processors scan for the next %.
11753 (parse_token_decl): Extended the %token
11754 declaration to allow a multi-character symbol as an alias.
11755 (parse_thong_decl): New function.
11756 (read_declarations): Added %thong declarations.
11757 (read_declarations): Handle NOOP to deal with allowing
11758 % declarations as another means to specify the flags.
11759 (readgram): Allow %prec prior to semantics embedded in a rule.
11760 (skip_to_char, read_declarations, copy_definition)
11761 (parse_token_decl, parse_start_decl, parse_type_decl)
11762 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
11763 (get_type_name, copy_guard, copy_action, readgram)
11764 (get_type, packsymbols): Revised most error messages.
11765 Changed `fatal' to `warnxxx' to avoid aborting for error.
11766 Revised and use multiple warnxxx functions to avoid using VARARGS1.
11767 (read_declarations): Improve the error message for
11768 an invalid character. Do not abort.
11769 (read_declarations, copy_guard, copy_action): Use
11770 printable_version to avoid unprintable characters in printed output.
11771 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
11772 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
11773 Allow the type of a non-terminal can be given
11774 more than once, as long as all specifications give the same type.
11775
11776 * src/output.c:
11777 (output_headers, output_trailers, output, output_gram)
11778 (output_rule_data): Implement noparserflag variable.
11779 Implement toknumflag variable.
11780 (output): Call reader_output_yylsp to output LTYPESTR.
11781
11782 * src/main.c (main):
11783 If reader sees an error, don't process the grammar.
11784 (fatals): Updated to not use VARARGS1.
11785 (printable_version, int_to_string, warn, warni, warns, warnss)
11786 (warnsss): New error reporting functions. Avoid abort for error.
11787
11788 * src/lex.h:
11789 Added THONG and NOOP for alias processing.
11790 Added SETOPT for the new code that allows setting options with %flags.
11791
11792 * src/lex.c:
11793 Include getopt.h. Add some extern decls.
11794 (safegetc): New function to deal with EOF gracefully.
11795 (literalchar); new function to deal with reading \ escapes.
11796 (lex): Use literalchar.
11797 (lex): Implemented "..." tokens.
11798 (literalchar, lex, parse_percent_token): Made tokenbuffer
11799 always contain the token. This includes growing the token
11800 buffer while reading an integer.
11801 (parse_percent_token): Replaced if-else statement with percent_table.
11802 (parse_percent_token): Added % declarations as another
11803 way to specify the flags -n, -l, and -r. Also added hooks for
11804 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
11805 major changes to files.c.
11806 (lex) Retain in the incoming stream a character following
11807 an incorrect '/'.
11808 (skip_white_space, lex): Revised most error messages
11809 and changed fatal to warn to avoid aborting.
11810 (percent_table): Added %thong declarations.
11811
11812 * src/gram.h: Comment changes.
11813
11814 * src/files.c (openfiles, open_extra_files, done):
11815 Add faction flag
11816 and actfile file. Handle noparserflag. Both for -n switch.
11817
11818 * src/conflicts.c (resolve_sr_conflict):
11819 Remove use of alloca.
11820
11821 1995-06-01 Jim Meyering <meyering@gnu.org>
11822
11823 * doc/bison.texinfo: *** empty log message ***
11824
11825 1995-05-06 Richard Stallman <rms@gnu.org>
11826
11827 * src/bison.s1: Comment change.
11828
11829 1995-05-06 Richard Stallman <rms@gnu.org>
11830
11831 * bison.simple: Comment change.
11832
11833 1995-05-03 Richard Stallman <rms@gnu.org>
11834
11835 * src/version.c: Version now 1.24.
11836
11837 * src/bison.s1: Change distribution terms.
11838
11839 * src/version.c: Version now 1.23.
11840
11841 1995-05-03 Richard Stallman <rms@gnu.org>
11842
11843 * doc/bison.texinfo:
11844 Rewrite "Conditions for Using Bison".
11845 Update version to 1.24.
11846
11847 1995-05-03 Richard Stallman <rms@gnu.org>
11848
11849 * bison.simple: Change distribution terms.
11850
11851 1995-02-23 Richard Stallman <rms@gnu.org>
11852
11853 * src/files.c: Test __VMS_POSIX as well as VMS.
11854
11855 1995-02-14 Jim Meyering <meyering@gnu.org>
11856
11857 * src/bison.s1 (__yy_memcpy):
11858 Renamed from __yy_bcopy to avoid
11859 confusion. Reverse FROM and TO arguments to be consistent with
11860 those of memcpy.
11861
11862 1995-02-14 Jim Meyering <meyering@gnu.org>
11863
11864 * bison.simple (__yy_memcpy):
11865 Renamed from __yy_bcopy to avoid
11866 confusion. Reverse FROM and TO arguments to be consistent with
11867 those of memcpy.
11868
11869 1994-11-10 David J. MacKenzie <djm@gnu.org>
11870
11871 * NEWS: reformat
11872
11873 * NEWS: New file.
11874
11875 * Makefile.in (DISTFILES): Include NEWS.
11876
11877 * Makefile.in (DISTFILES):
11878 Include install-sh, not install.sh.
11879
11880 * configure.in: Update to Autoconf v2 macro names.
11881
11882 1994-10-05 David J. MacKenzie <djm@gnu.org>
11883
11884 * Makefile.in: fix typo
11885
11886 * Makefile.in (prefix, exec_prefix):
11887 Let configure set them.
11888
11889 1994-09-28 David J. MacKenzie <djm@gnu.org>
11890
11891 * Makefile.in: Set datadir to $(prefix)/share.
11892
11893 1994-09-15 Richard Stallman <rms@gnu.org>
11894
11895 * src/bison.s1:
11896 Update copyright notice and GPL version.
11897
11898 1994-09-15 Richard Stallman <rms@gnu.org>
11899
11900 * bison.simple:
11901 Update copyright notice and GPL version.
11902
11903 1994-07-12 Richard Stallman <rms@gnu.org>
11904
11905 * src/reduce.c, src/reader.c:
11906 entered into RCS
11907
11908 1994-05-05 David J. MacKenzie <djm@gnu.org>
11909
11910 * Makefile.in: entered into RCS
11911
11912 1994-03-26 Richard Stallman <rms@gnu.org>
11913
11914 * src/bison.s1: entered into RCS
11915
11916 1994-03-26 Richard Stallman <rms@gnu.org>
11917
11918 * bison.simple: entered into RCS
11919
11920 1994-03-25 Richard Stallman <rms@gnu.org>
11921
11922 * src/main.c: entered into RCS
11923
11924 1994-03-24 Richard Stallman <rms@gnu.org>
11925
11926 * src/conflicts.c: entered into RCS
11927
11928 1994-01-02 Richard Stallman <rms@gnu.org>
11929
11930 * Makefile.in: *** empty log message ***
11931
11932 1993-11-21 Richard Stallman <rms@gnu.org>
11933
11934 * src/bison.s1: *** empty log message ***
11935
11936 1993-11-21 Richard Stallman <rms@gnu.org>
11937
11938 * doc/bison.texinfo: entered into RCS
11939
11940 * doc/bison.texinfo: *** empty log message ***
11941
11942 1993-11-21 Richard Stallman <rms@gnu.org>
11943
11944 * bison.simple: *** empty log message ***
11945
11946 1993-10-25 David J. MacKenzie <djm@gnu.org>
11947
11948 * doc/bison.texinfo: *** empty log message ***
11949
11950 1993-10-19 Richard Stallman <rms@gnu.org>
11951
11952 * src/bison.s1: *** empty log message ***
11953
11954 1993-10-19 Richard Stallman <rms@gnu.org>
11955
11956 * bison.simple: *** empty log message ***
11957
11958 1993-10-14 Richard Stallman <rms@gnu.org>
11959
11960 * src/bison.s1: *** empty log message ***
11961
11962 1993-10-14 Richard Stallman <rms@gnu.org>
11963
11964 * bison.simple: *** empty log message ***
11965
11966 1993-09-14 David J. MacKenzie <djm@gnu.org>
11967
11968 * doc/bison.texinfo: *** empty log message ***
11969
11970 1993-09-13 Noah Friedman <friedman@gnu.org>
11971
11972 * Makefile.in: *** empty log message ***
11973
11974 1993-09-10 Richard Stallman <rms@gnu.org>
11975
11976 * src/conflicts.c: *** empty log message ***
11977
11978 * src/system.h: entered into RCS
11979
11980 1993-09-10 Richard Stallman <rms@gnu.org>
11981
11982 * doc/bison.1: entered into RCS
11983
11984 1993-09-06 Noah Friedman <friedman@gnu.org>
11985
11986 * src/version.c: entered into RCS
11987
11988 1993-09-06 Noah Friedman <friedman@gnu.org>
11989
11990 * Makefile.in: *** empty log message ***
11991
11992 1993-07-30 David J. MacKenzie <djm@gnu.org>
11993
11994 * Makefile.in: *** empty log message ***
11995
11996 1993-07-24 Richard Stallman <rms@gnu.org>
11997
11998 * src/bison.s1: *** empty log message ***
11999
12000 1993-07-24 Richard Stallman <rms@gnu.org>
12001
12002 * bison.simple: *** empty log message ***
12003
12004 1993-07-08 David J. MacKenzie <djm@gnu.org>
12005
12006 * Makefile.in: *** empty log message ***
12007
12008 1993-07-04 Richard Stallman <rms@gnu.org>
12009
12010 * src/bison.s1: *** empty log message ***
12011
12012 1993-07-04 Richard Stallman <rms@gnu.org>
12013
12014 * bison.simple: *** empty log message ***
12015
12016 1993-06-26 David J. MacKenzie <djm@gnu.org>
12017
12018 * src/getargs.c: entered into RCS
12019
12020 1993-06-26 David J. MacKenzie <djm@gnu.org>
12021
12022 * doc/bison.texinfo: *** empty log message ***
12023
12024 * doc/bison.1: New file.
12025
12026 1993-06-25 Richard Stallman <rms@gnu.org>
12027
12028 * src/getargs.c: New file.
12029
12030 1993-06-16 Richard Stallman <rms@gnu.org>
12031
12032 * src/bison.s1: *** empty log message ***
12033
12034 1993-06-16 Richard Stallman <rms@gnu.org>
12035
12036 * bison.simple: *** empty log message ***
12037
12038 1993-06-03 Richard Stallman <rms@gnu.org>
12039
12040 * src/bison.s1: New file.
12041
12042 1993-06-03 Richard Stallman <rms@gnu.org>
12043
12044 * doc/bison.texinfo: *** empty log message ***
12045
12046 1993-06-03 Richard Stallman <rms@gnu.org>
12047
12048 * bison.simple: New file.
12049
12050 1993-05-19 Richard Stallman <rms@gnu.org>
12051
12052 * doc/bison.texinfo: New file.
12053
12054 1993-05-07 Noah Friedman <friedman@gnu.org>
12055
12056 * Makefile.in: *** empty log message ***
12057
12058 1993-04-28 Noah Friedman <friedman@gnu.org>
12059
12060 * src/reader.c: *** empty log message ***
12061
12062 1993-04-23 Noah Friedman <friedman@gnu.org>
12063
12064 * src/alloc.h: entered into RCS
12065
12066 1993-04-20 David J. MacKenzie <djm@gnu.org>
12067
12068 * src/version.c: *** empty log message ***
12069
12070 * src/files.c, src/allocate.c:
12071 entered into RCS
12072
12073 * src/reader.c: *** empty log message ***
12074
12075 * src/lex.c: entered into RCS
12076
12077 * src/conflicts.c: New file.
12078
12079 * src/symtab.c: entered into RCS
12080
12081 * src/alloc.h: New file.
12082
12083 * src/LR0.c: entered into RCS
12084
12085 1993-04-18 Noah Friedman <friedman@gnu.org>
12086
12087 * src/reader.c: New file.
12088
12089 * src/version.c: *** empty log message ***
12090
12091 1993-04-18 Noah Friedman <friedman@gnu.org>
12092
12093 * Makefile.in: *** empty log message ***
12094
12095 1993-04-17 Noah Friedman <friedman@gnu.org>
12096
12097 * Makefile.in: *** empty log message ***
12098
12099 1993-04-15 Richard Stallman <rms@gnu.org>
12100
12101 * src/main.c, src/files.c:
12102 New file.
12103
12104 1993-04-15 Noah Friedman <friedman@gnu.org>
12105
12106 * configure.in: entered into RCS
12107
12108 * configure.in: *** empty log message ***
12109
12110 * configure.in: New file.
12111
12112 1993-04-14 Richard Stallman <rms@gnu.org>
12113
12114 * Makefile.in: New file.
12115
12116 1993-04-13 Richard Stallman <rms@gnu.org>
12117
12118 * src/version.c: New file.
12119
12120 1993-03-25 Richard Stallman <rms@gnu.org>
12121
12122 * src/output.c: entered into RCS
12123
12124 1992-09-25 Richard Stallman <rms@gnu.org>
12125
12126 * configure.bat: entered into RCS
12127
12128 1992-06-22 Richard Stallman <rms@gnu.org>
12129
12130 * src/vmsgetargs.c: entered into RCS
12131
12132 1992-06-22 Richard Stallman <rms@gnu.org>
12133
12134 * doc/bison.rnh: entered into RCS
12135
12136 1992-04-20 David J. MacKenzie <djm@gnu.org>
12137
12138 * README: entered into RCS
12139
12140 1992-01-22 Richard Stallman <rms@gnu.org>
12141
12142 * src/machine.h: entered into RCS
12143
12144 1991-12-21 Richard Stallman <rms@gnu.org>
12145
12146 * src/lalr.c, src/closure.c:
12147 entered into RCS
12148
12149 1991-12-20 Richard Stallman <rms@gnu.org>
12150
12151 * src/state.h: entered into RCS
12152
12153 1991-12-18 Richard Stallman <rms@gnu.org>
12154
12155 * src/print.c, src/nullable.c, src/derives.c:
12156 entered into RCS
12157
12158 1991-11-03 David J. MacKenzie <djm@gnu.org>
12159
12160 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
12161 entered into RCS
12162
12163 1988-09-09 Richard Stallman <rms@gnu.org>
12164
12165 * src/bison.hairy: entered into RCS
12166
12167 1987-12-16 Richard Stallman <rms@gnu.org>
12168
12169 * REFERENCES: entered into RCS
12170
12171 -----
12172
12173 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
12174 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
12175
12176 This file is part of Bison, the GNU Compiler Compiler.
12177
12178 Bison is free software; you can redistribute it and/or modify
12179 it under the terms of the GNU General Public License as published by
12180 the Free Software Foundation; either version 2, or (at your option)
12181 any later version.
12182
12183 Bison is distributed in the hope that it will be useful,
12184 but WITHOUT ANY WARRANTY; without even the implied warranty of
12185 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12186 GNU General Public License for more details.
12187
12188 You should have received a copy of the GNU General Public License
12189 along with Bison; see the file COPYING. If not, write to
12190 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
12191 Boston, MA 02111-1307, USA.