]> git.saurik.com Git - bison.git/blob - ChangeLog
* configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to 0.11.5.
[bison.git] / ChangeLog
1 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
2
3 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
4 0.11.5. Suggested by Bruno Haible.
5 * bootstrap: Remove gettext version checking.
6
7 * doc/bison.texinfo (Decl Summary): Also mention that %union
8 can depend on prerequisite types. Problem reported by Tim
9 Van Holder.
10
11 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
12
13 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
14 * README-alpha: Don't tell people not to package this.
15
16 * bootstrap: Don't assume $(...) works; use `...` instead.
17 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
18 gettext better.
19
20 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
21 put into the -d output file, and mention what to do if YYSTYPE is
22 defined as a macro.
23
24 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
25
26 Undo change made earlier today: it caused autopoint to not bring
27 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
28 autopoint's.
29
30 * bootstrap: Check that gettext version matches what's in
31 configure.ac. Warn users to ignore robots.txt ERROR 404.
32 * bootstrap: Undo today's earlier change (logged below).
33 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
34
35 The gettext version checking is causing more trouble than it's
36 curing; remove it. Problem reported by Paul Hilfinger.
37
38 * bootstrap: Issue a warning that one can expect a message
39 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
40 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
41
42 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
43
44 Ensure that the C++ compiler used for testing actually works on a
45 simple test program; if not, skip the C++-related tests. Problem
46 reported by Vin Shelton in:
47 http://mail.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
48
49 * m4/cxx.m4: New file.
50 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
51 * tests/atlocal.in (BISON_CXX_WORKS): Add.
52 * tests/local.at (AT_COMPILE_CXX): Use it.
53
54 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
55
56 * data/glr.c (yylloc): Output this macro even if locations are not
57 being generated, as the GLR parser needs it even in that case.
58 Problem reported by Troy A. Johnson
59 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
60
61 * configure.ac (AC_INIT): Update to 1.875e.
62
63 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
64
65 * NEWS: Version 1.875d.
66 * configure.ac (AC_INIT): Likewise.
67 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
68
69 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
70 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
71 lalr1.cc runs afoul of the first, and the last two are no longer
72 supported by GCC 3.4.0.
73 * README: Mention GNU m4 1.4 or later; mention m4 patches.
74 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
75
76 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
77
78 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
79 unsigned int, for compatibility with latest gnulib hash module.
80 * src/state.c (state_hash, state_hasher): Likewise.
81 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
82 * src/uniqstr.c (hash_uniqstr): Likewise.
83
84 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
85
86 * NEWS: Unescaped newlines are no longer allowed in char & strings.
87
88 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
89 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
90 character and string literals.
91 (unexpected_end): New function.
92 (unexpected_eof): Use it.
93 (unexpected_newline): New function.
94 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
95 actions.
96
97 * NEWS: Document %expect-rr.
98
99 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
100 Fix typo by replacing $1 with $option.
101 Remove more 'intl'-related files.
102 Don't DEFUN AM_INTL_SUBDIR twice.
103
104 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
105 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
106 strtoul.c.
107 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
108 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
109 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
110 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
111 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
112 * src/.cvsignore: Add *.output.
113
114 * src/parse-gram.y: Put copyright notice inside %{ %} so it
115 gets copied to the output file.
116
117 2004-04-28 Paul Eggert <eggert@twinsun.com>
118
119 Get files from the gnulib and po repositories, instead of relying
120 on them being in our CVS. Upgrade to latest versions of gnulib
121 and Automake.
122
123 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
124 * bootstrap: Bootstrap from gnulib and po repositories.
125 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
126 * README-cvs: Document these changes. Remove version numbers from
127 mentions of build tools, since they change so often. Mention Flex.
128
129 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
130 (gl_USE_SYSTEM_EXTENSIONS): Add.
131 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
132 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
133 does this for us.
134 (AC_ISC_POSIX): Remove; we no longer support this
135 ancient OS, as it gets in the way of latest Autoconf & gnulib.
136 (AC_HEADER_STDC): Remove: we now assume C89 or better.
137 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
138 Do not check for C89 headers, except for locale.h which is used
139 by the Yacc library and must port to K&R hosts.
140 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
141 Do not check for C89 functions, except for setlocale which is
142 used by the Yacc library.
143 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
144 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
145 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
146 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
147 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
148 AM_GNU_GETTEXT): Remove; now done by:
149 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
150 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
151 for us.
152
153 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
154 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
155 Define to empty, as gnulib.mk will do the rest for us.
156 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
157 for us.
158 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
159 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
160
161 * src/files.c: Include gnulib's xstrndup.h.
162
163 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
164 (REALLOC): Use xnrealloc, for likewise.
165 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
166 (strnlen, memrchr): Remove decls; functions no longer used.
167 Include <stpcpy.h>.
168
169 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
170 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
171 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
172 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
173 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
174 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
175 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
176 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
177 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
178 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
179 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
180 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
181 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
182 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
183 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
184 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
185 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
186 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
187 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
188 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
189 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
190 Remove, as these files are now generated automatically
191 by bootstrap or automake.
192
193 * po/ChangeLog: Remove: all but one entry was a duplicate
194 of this file, and I moved that 2000-11-02 entry here.
195
196 * config/.cvsignore: Add Makefile, depcomp, install-sh.
197 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
198 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
199 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
200 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
201 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
202 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
203 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
204 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
205 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
206 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
207 xstrndup.h.
208 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
209 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
210 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
211 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
212 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
213 * src/.cvsignore: Remove *_.c.
214
215
216 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
217 support it. (The latest stable gzip doesn't.)
218
219 2004-04-27 Paul Eggert <eggert@twinsun.com>
220
221 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
222 case, as stos_ is now used by destructors due to the 2004-02-09
223 change.
224
225 Remove more K&R C support.
226 * lib/libiberty.y (PARAMS): Remove. All uses removed.
227 * lib/subpipe.c (errno): Remove decl.
228 Include <stdlib.h> unconditionally.
229 (EXIT_FAILURE): Remove macro.
230 * src/complain.c (vfprintf, strerror): Remove.
231 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
232 unconditionally.
233 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
234 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
235 (strchr, strspn, memchr): Remove decls.
236 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
237 unconditionally. Do not declare perror.
238 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
239 unconditionally.
240
241 * src/complain.c (_): Remove useless defn, as system.h defines this.
242
243 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
244 with latest obstack.h.
245 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
246 to procedure types, as obstack.h now does that for us.
247 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
248
249 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
250 so that this include file can stand alone.
251 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
252 does this now. Include subpipe.h first after config.h, to
253 test whether it can stand alone.
254
255 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
256 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
257 unused declaration.
258
259 * tests/synclines.at (%union synch line): Put a dummy member in
260 the union, because empty unions aren't allowed in C. Caught
261 by GCC 3.4.0.
262
263 2004-04-13 Jim Meyering <jim@meyering.net>
264
265 * src/conflicts.c (conflicts_print): Correct format string typo:
266 use `%%' to produce literal `%'. (trivial change)
267
268 2004-03-30 Paul Eggert <eggert@twinsun.com>
269
270 * src/getargs.c (version): Update copyright year to 2004.
271
272 * data/c.m4 (b4_int_type): Use 'short int' rather than
273 'short', and similarly for 'long', 'unsigned', etc.
274 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
275 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
276 yy_yypstack, yydumpstack): Likewise.
277 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
278 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
279 Likewise.
280 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
281 yy_stack_print, yyparse): Likewise.
282 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
283 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
284 * lib/bitset.c (bitset_print): Likewise.
285 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
286 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
287 * lib/bitsetv.c (bitsetv_dump): Likewise.
288 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
289 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
290 Likewise.
291 * src/LR0.c (allocate_itemsets): Likewise.
292 * src/gram.h (rule_number, rule): Likewise.
293 * src/lalr.h (goto_number): Likewise.
294 * src/nullable.c (nullable_compute): Likewise.
295 * src/output.c (prepare_rules): Likewise.
296 * src/relation.c (relation_print, relation_digraph): Likewise.
297 * src/relation.h (relation_node): Likewise.
298 * src/state.h (state_number, transitions, errs, reductions,
299 struct state): Likewise.
300 * src/symtab.h (symbol_number, struct symbol): Likewise.
301 * src/tables.c (vector_number, tally, action_number,
302 default_goto, goto_actions): Likewise.
303 * tests/existing.at (GNU Cim Grammar): Likewise.
304 * tests/regression.at (Web2c Actions): Likewise.
305
306 * src/output.c (muscle_insert_short_int_table): Renamed from
307 muscle_insert_short_table. All uses changed.
308
309 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
310
311 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
312 (declaration): Replace expected_conflicts with expected_sr_conflicts.
313 Add %expect-rr rule.
314
315 * src/scan-gram.l: Recognize %expect-rr.
316
317 * src/conflicts.h (expected_sr_conflicts): Rename from
318 expected_conflicts.
319 (expected_rr_conflicts): Declare.
320
321 * src/conflicts.c (expected_sr_conflicts): Rename from
322 expected_conflicts.
323 (expected_rr_conflicts): Define.
324 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
325 for GLR parsers.
326 Use expected_sr_conflicts in place of expected_conflicts.
327 Warn if expected_rr_conflicts used in non-GLR parser.
328
329 * doc/bison.texinfo: Add documentation for %expect-rr.
330
331 2004-03-08 Paul Eggert <eggert@gnu.org>
332
333 Add support for hex token numbers. Suggested by Odd Arild Olsen in
334 <http://mail.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
335
336 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
337 in lalr1.cc.
338 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
339 * src/scan-gram.l (scan_integer): New function.
340 ({int}): Use it.
341 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
342 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
343 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
344 Say "long int", not "long", for uniformity with GNU style.
345
346 2004-02-25 Paul Eggert <eggert@twinsun.com>
347
348 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
349 compilers. This fixes a problem with Intel's C++ compiler being
350 chatty, reported by Guido Trentalancia in
351 <http://mail.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
352
353 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
354
355 Support %destructor and merge error locations in lalr1.cc.
356
357 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
358 (Parser::stos_): Define unconditionally.
359 (Parser::destruct_): New method. Generate its body with
360 b4_yydestruct_generate.
361 (Parser::error_start_): New attribute.
362 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
363 token which are discarded.
364 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
365 error_start_ when erroneous token are discarded.
366 (Parser::parse) <yyerrlab1>: Compute the location of the error
367 token so that it covers all the discarded tokens.
368 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
369 it can be called with `%skeleton "lalr1.cc"', and do that.
370
371 2004-02-02 Paul Eggert <eggert@twinsun.com>
372
373 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
374 $(top_srcdir)/lib and ../lib. This fixes a bug reported
375 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
376 There's no need to mention top_builddir since Automake does that
377 for us.
378 (INCLUDES): Remove, as Automake says it's obsolescent.
379 Contents migrated into AM_CPPFLAGS as described above.
380 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
381
382 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
383
384 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
385 (yyreportSyntaxError): Handle case where lookahead token is
386 YYEMPTY.
387
388 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
389
390 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
391 resulting parsers are compilable with C++.
392
393 2003-12-23 Paul Eggert <eggert@twinsun.com>
394
395 * config/depcomp, config/install-sh: Sync with Automake 1.8.
396 * src/output.c (output_skeleton): Rename local var.
397 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
398 Bison tokens, as this runs afoul of the 2003-10-07 change that
399 disallowed NUL bytes in character constants or string literals.
400
401 * tests/local.at: Require Autoconf 2.59's Autotest.
402 * tests/testsuite.at: Don't include local.at, since we now assume
403 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
404 including it.
405 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
406 multiple inclusion warnings.
407
408 2003-12-02 Akim Demaille <akim@epita.fr>
409
410 * doc/bison.texinfo (How Can I Reset the Parser): More about start
411 conditions.
412 From Bruno Haible.
413
414 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
415
416 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
417
418 2003-10-07 Paul Eggert <eggert@twinsun.com>
419
420 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
421 if testsuite doesn't exist.
422
423 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
424 literals, unfortunately.
425 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
426 Complain about NUL bytes in character constants or string literals.
427
428 2003-10-05 Paul Eggert <eggert@twinsun.com>
429
430 * NEWS: Don't document %no-default-prec, as it's still
431 too experimental.
432 * doc/bison.texinfo: Document %no-default-prec only if
433 the defaultprec flag is set. Normally it's not.
434
435 2003-10-04 Paul Eggert <eggert@twinsun.com>
436
437 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
438 non-modifiable lvalue, instead of a modifiable one.
439 * doc/bison.texinfo (Actions): Document that $$ can
440 be assigned to. Do not claim that $$ and $N are
441 array element references: user code should not rely on this.
442
443 2003-10-01 Paul Eggert <eggert@twinsun.com>
444
445 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
446 (grammar_declaration): Use it.
447 * src/scan-gram.l: New token %no-default-prec.
448 * tests/conflicts.at: Revamp tests to use %no-default-prec.
449 * NEWS, doc/bison.texinfo: Document the above.
450
451 2003-10-01 Akim Demaille <akim@epita.fr>
452
453 VCG no longer supports long_straight_phase.
454
455 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
456 * src/print_graph.c (print_graph): Adjust.
457
458 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
459 and Paul Eggert <eggert@twinsun.com>
460
461 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
462 Table of Symbols): Document %default-prec.
463 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
464 (grammar_declaration): Set default_prec on %default-prec.
465 * src/scan-gram.l (%default-prec): New token.
466 * src/reader.h (default_prec): New flag.
467 * src/reader.c: Likewise.
468 (packgram): Handle it.
469 * tests/conflicts.at (%default-prec without %prec,
470 %default-prec with %prec, %default-prec 1): New tests.
471
472 2003-09-30 Paul Eggert <eggert@twinsun.com>
473
474 * tests/testsuite.at: Include local.at, not input.at, fixing
475 a typo in the 2003-08-25 patch.
476
477 2003-08-27 Akim Demaille <akim@epita.fr>
478
479 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
480 GCC warnings.
481
482 2003-08-26 Akim Demaille <akim@epita.fr>
483
484 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
485 "<\#" to avoid magic from Gnus when posting parts of this script.
486
487 2003-08-26 Akim Demaille <akim@epita.fr>
488
489 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
490 (Parser::parse): here.
491 Adjust: nerrs and errstatus is now replaced by...
492 (Parser::nerrs_, Parser::errstatus_): New.
493
494 2003-08-25 Akim Demaille <akim@epita.fr>
495
496 * config/announce-gen, Makefile.cfg: New.
497 * Makefile.am: Adjust.
498 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
499 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
500
501 2003-08-25 Akim Demaille <akim@epita.fr>
502
503 When reducing initial empty rules, Bison parser read an initial
504 location that is not defined. This results in garbage, and that
505 affects Bison's own parser. Therefore we need (i) to extend Bison
506 to support a means to initialize this location, and (ii) to use
507 this CVS Bison to fix CVS Bison's parser.
508
509 * src/reader.h, reader.c (epilogue_augment): Remove, replace
510 with...
511 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
512 * src/parse-gram.y: Adjust.
513 (%initial-action): New.
514 (%error-verbose): Since we require CVS Bison, there is no reason
515 not to use it.
516 * src/scan-gram.l: Adjust.
517 * src/Makefile.am (YACC): New, to make sure we use our own parser.
518 * data/yacc.c (yyparse): Use b4_initial_action.
519
520 2003-08-25 Akim Demaille <akim@epita.fr>
521
522 * doc/bison.texinfo: Don't promote stdout for error messages.
523
524 2003-08-25 Akim Demaille <akim@epita.fr>
525
526 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
527 From Alexandre Duret-Lutz.
528
529 2003-08-25 Akim Demaille <akim@epita.fr>
530
531 Version 1.875c.
532
533 2003-08-25 Akim Demaille <akim@epita.fr>
534
535 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
536 Use them.
537
538 2003-08-25 Akim Demaille <akim@epita.fr>
539
540 * data/lalr1.cc (Parser::reduce_print_): New.
541 Use it.
542
543 2003-08-25 Akim Demaille <akim@epita.fr>
544
545 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
546 error recovery loops. This patch is based on
547 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
548 Also, augment the similarity between lalr1.cc and yacc.c.
549 Note: the locations of error recovery rules are not correct yet.
550
551 * data/lalr1.cc: Comment changes to augment the similarity between
552 lalr1.cc and yacc.c.
553 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
554 (yyerrlab1): Remove, but where it used to be (now the bottom part of
555 yyerrlab), when hitting EOF, pop the whole stack here instead of
556 merely falling thru the default error handling mechanism.
557 (yyerrorlab): New label, with the old contents of YYERROR,
558 plus the following change: pop the stack of rhs corresponding
559 to the production that invoked YYERROR. That is how Yacc
560 behaves (required by POSIX).
561 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
562 fail.
563
564 2003-08-25 Akim Demaille <akim@epita.fr>
565
566 Tune local.at so that people can "autom4te -l autotest calc.at -o
567 calc" for instance, to extract a sub test suite.
568
569 * tests/testsuite.at: Move the initialization, Autotest version
570 requirement, and AT_TESTED invocation into...
571 * tests/local.at: here.
572 * tests/testsuite.at: Include it for compatibility with Autoconf
573 2.57.
574 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
575 be ignore.
576
577 2003-08-04 Paul Eggert <eggert@twinsun.com>
578
579 Rework code slightly to avoid gcc -Wtraditional warnings.
580 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
581 The returned value is now stored in *YY0. All callers changed.
582 * src/output.c (merge_output): Adjust to the above change.
583
584 2003-07-26 Paul Eggert <eggert@twinsun.com>
585
586 * data/glr.c (YYASSERT): New macro.
587 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
588 yyresolveStates, yyprocessOneStack):
589 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
590 Derived from a suggestion by Frank Heckenbach.
591
592 2003-07-25 Paul Eggert <eggert@twinsun.com>
593
594 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
595 for portability to K&R C (after ansi2knr, presumably). See
596 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
597 by Frank Heckenbach, though I have omitted the structure-initialization
598 part of his glr-knr.diff patch since I recall that the Portable
599 C Compiler didn't require that change.
600
601 Let the user specify how to allocate and free memory.
602 Derived from a suggestion by Frank Heckenbach in
603 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
604 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
605 All uses of free, malloc, realloc changed to use these macros,
606 and unnecessary casts removed.
607 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
608
609 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
610
611 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
612 use s.empty() rather than s == "" to test for empty string; see
613 <http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
614 (trivial change)
615
616 2003-06-25 Akim Demaille <akim@epita.fr>
617
618 * config/depcomp, config/install-sh: Update from masters.
619
620 2003-06-20 Paul Eggert <eggert@twinsun.com>
621
622 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
623 and return properly parenthesized result.
624 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
625 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
626 Remove unnecessary parentheses from uses.
627 * doc/bison.texinfo (Location Default Action): Describe the
628 conventions for parentheses.
629
630 2003-06-19 Paul Eggert <eggert@twinsun.com>
631
632 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
633 yyreportTree): Do not assume that size_t is the same width as int,
634 when printing sizes. Print sizes using an unsigned format.
635 Problem reported by Frank Heckenbach in
636 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
637
638 Port to Forte Developer 7 C compiler.
639 * data/glr.c (struct YYLTYPE): If locations are not being used,
640 declare a single dummy member, as empty structs do not conform
641 to the C standard.
642 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
643 the Forte Developer 7 C compiler complains that end-of-loop
644 code is not reached.
645
646 2003-06-17 Paul Eggert <eggert@twinsun.com>
647
648 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
649 avoid warnings from picky compilers about redefinition of PARAMS.
650
651 2003-06-17 Paul Eggert <eggert@twinsun.com>
652
653 Version 1.875b.
654
655 * NEWS: Document 1.875b.
656
657 * lib/bbitset.h: Do not include config.h; that's the includer's job.
658 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
659 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
660 Don't use 'index' in comments, as it's a builtin fn on some hosts.
661 * lib/bitset_stats.c: Include gettext.h unconditionally, as
662 per recent gettext manual's suggestion.
663 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
664 Use prototypes, not old-style definitions.
665 * lib/lbitset.c (lbitset_unused_clear): Likewise.
666 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
667 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
668 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
669 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
670 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
671 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
672 vbitset_or_and_cmp, vbitset_copy): Likewise.
673
674 * lib/libiberty.h: Do not include config.h; that's the includer's job.
675 Do not include <stdlib.h>.
676 (PARAMS): Define unconditionally for C89.
677 (ATTRIBUTE_NORETURN): Remove.
678 (ATTRIBUTE_UNUSED): Define unconditionally.
679
680 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
681 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
682 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
683 * lib/vbitset.c, lib/vbitset.h: New files.
684 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
685 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
686 from libbitset.
687
688 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
689 `How Can I Reset @code{yyparse}', since texinfo does not allow
690 arbitrary @ in node names.
691
692 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
693 shouldn't be needed according to the gettext 0.12.1 documentation
694 but which seem to be needed anyway: codeset.m4 glibc21.m4
695 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
696 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
697 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
698
699 * lib/.cvsignore: Add stdbool.h.
700 * m4/.cvsignore: Add nls.m4, po.m4.
701
702 Upgrade to CVS gnulib.
703 * stdbool_.h: File renamed from stdbool.h.in.
704 * configure.ac (AM_STDBOOL_H): Invoke this instead of
705 AC_HEADER_STDBOOL.
706 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
707 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
708 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
709 (MOSTLYCLEANFILES): New var.
710 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
711 (stdbool.h): New rule.
712 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
713 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
714 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
715 m4/quote.m4: Upgrade to today's gnulib.
716
717 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
718 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
719 the tests right now.
720 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
721 yyerror are declared before use; C99 requires this.
722
723 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
724
725 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
726 first.
727 (yyrecoverSyntaxError): Correct the logic for setting and testing
728 yyerrState.
729 Correct comment on handling EOF.
730 Allow states with only a default reduction, rather than failing
731 (I can't quite reconstruct why these were not allowed before).
732
733 Fixes to avoid problem that $-N rules in GLR parsers can cause
734 buffer overruns, corrupting state.
735
736 * src/output.c (prepare_rules): Output max_left_semantic_context
737 definition.
738 * src/reader.h (max_left_semantic_context): New variable declaration.
739 * src/scan-gram.l (max_left_semantic_context): Define.
740 (handle_action_dollar): Update max_left_semantic_context.
741 * data/glr.c (YYMAXLEFT): New definition.
742 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
743 (yyresolveAction): Ditto.
744
745 Fixes to problems with location handling in GLR parsers reported by
746 Frank Heckenbach (2003/06/05).
747
748 * data/glr.c (YYLTYPE): Make trivial if locations not used.
749 (YYRHSLOC): Add parentheses, and define only if locations used.
750 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
751 locations not used.
752 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
753 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
754
755 * tests/cxx-type.at: Exercise location information; update tests
756 to differentiate output with and without locations.
757 Remove forward declarations of yylex and yyerror---caused errors
758 because default YYLTYPE not yet defined.
759 Change semantic actions to compute strings, rather than printing
760 them directly (to test proper passing of semantics values). Change
761 output to prefix notation and update test data and expected results.
762 (yylex): Track locations.
763 (stmtMerge): Return value rather than printing, and include arguments
764 in value.
765
766 2003-06-03 Paul Eggert <eggert@twinsun.com>
767
768 Avoid warnings generated by GCC 2.95.4 when Bison is
769 configured with --enable-gcc-warnings.
770 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
771 yy::]b4_parser_class_name[::translate_,
772 yy::Stack::operator[] (unsigned),
773 yy::Stack::operator[] (unsigned) const,
774 yy::Slice::operator[] (unsigned),
775 yy::Slice::operator[] (unsigned) const):
776 Rename local vars to avoid warnings.
777 * tests/glr-regression.at (Improper handling of embedded actions
778 and $-N in GLR parsers): Remove unused local variable from yylex.
779 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
780 (void) as arg when not pure, since we now assume C89 when building
781 Bison. Pacify GCC by using parameter.
782
783 2003-06-02 Paul Eggert <eggert@twinsun.com>
784
785 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
786 yy::Location::lines, yy::Location::columns): Rename arguments
787 to avoid shadowing; this removes a warning generated by GCC 3.3.
788
789 2003-06-01 Paul Eggert <eggert@twinsun.com>
790
791 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
792 to g++, as GCC 3.3 complains if you do it.
793 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
794 everything that WARNING_CFLAGS has, except omit warnings
795 not suitable for C++.
796 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
797 * tests/atlocal.in (CXXFLAGS): New var.
798 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
799
800 Fix a GLR parser bug I reported in February; see
801 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
802 The problem was that GLR parsers did not conform to the C standard,
803 because actions like { $1 = $2 + $3; } expanded to expressions
804 that invoked YYFILL in separate subexpressions, and YYFILL assigned
805 to a local variable. The C standard says that expressions
806 like (var = f ()) + (var = f ()) have undefined behavior.
807 Another problem was that GCC sometimes issues warnings that
808 yyfill and its parameters are unused.
809
810 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
811 as possibly unused.
812 (yyfill): New function.
813 (YYFILL): Use it.
814 (yyuserAction): Change type of yynormal to bool, so that it matches
815 the new yyfill signature. Mark it as possibly unused.
816
817
818 Follow up on a bug I reported in February, where a Bison-generated
819 parser can loop. Provide a test case and a fix for yacc.c. I
820 don't have a fix for lalr1.cc or for glr.c, unfortunately.
821 The original bug report is in:
822 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
823
824 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
825 macro's size was becoming unwieldy.
826 (yyerrlab): Do not discard an empty lookahead symbol, as this
827 might destroy garbage.
828 (yyerrorlab): New label, with the old contents of YYERROR,
829 plus the following change: pop the stack of rhs corresponding
830 to the production that invoked YYERROR. That is how Yacc
831 behaves, and POSIX requires this behavior.
832 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
833 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
834 Define 'alarm' to do nothing if unistd.h is not available.
835 Add a new rule "exp: '-' error;" to test the above change to
836 data/yacc.c. Use 'alarm' to abort any test taking longer than
837 10 seconds, as it's probably looping.
838 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
839 Also, the new yacc.c generates two fewer diagnostics for an
840 existing test.
841
842 2003-05-24 Paul Eggert <eggert@twinsun.com>
843
844 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
845 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
846 This fixes a problem reported by John Bowman when the Compaq/HP
847 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
848 -ansi -Wall -gall).
849 * data/yacc.c (union yyalloc): Likewise.
850 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
851
852 Switch from 'int' to 'bool' where that makes sense.
853
854 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
855 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
856 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
857 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
858 Return or accept bool, not int. All callers changed.
859 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
860 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
861 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
862 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
863 bitset_or_and_cmp_): Likewise.
864 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
865 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
866 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
867 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
868 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
869 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
870 bitset_stats_or_and_cmp): Likewise.
871 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
872 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
873 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
874 ebitset_xor_cmp): Likewise.
875 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
876 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
877 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
878 lbitset_xor_cmp): Likewise.
879 * lib/bbitset.h: Include <stdbool.h>.
880 (struct bitset_vtable): The following members now return bool, not
881 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
882 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
883 or_and_cmp).
884 * src/conflicts.c (count_rr_conflicts): Likewise.
885 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
886 All uses changed.
887 * lib/ebitset.c (ebitset_obstack_init): Likewise.
888 * lib/lbitset.c (lbitset_obstack_init): Likewise.
889 * src/getargs.c (debug_flag, defines_flag, locations_flag,
890 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
891 graph_flag): Likewise.
892 * src/getargs.h (debug_flag, defines_flag, locations_flag,
893 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
894 graph_flag): Likewise.
895 * src/output.c (error_verbose): Likewise.
896 * src/output.h (error_verbose): Likewise.
897 * src/reader.c (start_flag, typed): Likewise.
898 * src/reader.h (typed): Likewise.
899 * src/getargs.c (LOCATIONS_OPTION): New constant.
900 (long_options, getargs): Use it.
901 * src/lalr.c (build_relations): Use bool, not int.
902 * src/nullable.c (nullable_compute): Likewise.
903 * src/print.c (print_reductions): Likewise.
904 * src/tables.c (action_row, pack_vector): Likewise.
905 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
906 * src/output.c (prepare): Use it.
907 * src/output.c (token_definitions_output,
908 symbol_destructors_output, symbol_destructors_output): Use string,
909 not boolean integer, to keep track of whether to output separator.
910 * src/print_graph.c (print_core): Likewise.
911 * src/state.c (state_rule_lookaheads_print): Likewise.
912
913 * config/install-sh: Sync from automake 1.7.5.
914
915 2003-05-14 Paul Eggert <eggert@twinsun.com>
916
917 * src/parse-gram.y (rules_or_grammar_declaration): Require a
918 semicolon after a grammar declaration, in the interest of possible
919 future changes to the Bison input language.
920 Do not allow a stray semicolon at the start of the grammar.
921 (rhses.1): Allow one or more semicolons after any rule, including
922 just before "|" as required by POSIX.
923 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
924 grammar.
925
926 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
927
928 %parse-param support for lalr1.cc.
929
930 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
931 b4_cc_constructor_calls, b4_cc_constructor_call,
932 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
933 definitions.
934 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
935 parse-param arguments.
936 (yy::b4_parser_class_name): Declare instance variables to
937 hold parse-param arguments.
938 * tests/calc.at: s/value/semantic_value/ because value clashes
939 with a member of yy::b4_parser_class_name. Adjust C++ code
940 to handle %parse-param. Enable %parse-param test in C++.
941
942 2003-05-12 Paul Eggert <eggert@twinsun.com>
943
944 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
945 English a bit. Fix fclose typo. Change "const char" to "char
946 const", and use ANSI C rather than K&R for "main". Suggest
947 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
948 and suggest yy_switch_to_buffer.
949
950 2003-05-05 Paul Eggert <eggert@twinsun.com>
951
952 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
953 C89. This avoids a diagnostic on compilers that define __STDC__
954 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
955 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
956
957 2003-05-03 Paul Eggert <eggert@twinsun.com>
958
959 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
960 Do not overrun array bounds.
961 This should fix a bug reported today by Olatunji Oluwabukunmi in
962 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
963
964 2003-04-29 Akim Demaille <akim@epita.fr>
965
966 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
967 * src/getargs.c, src/getargs.h: here, as bool, not int.
968 (nondeterministic_parser): New.
969 * src/parse-gram.y, src/scan-gram.l: Support
970 %nondeterministic-parser.
971 * src/output.c (prepare): Use nondeterministic_parser instead
972 of glr_parser where appropriate.
973 * src/tables.c (conflict_row, action_row, save_row)
974 (token_actions, token_actions, pack_vector): Ditto.
975
976 2003-04-29 Akim Demaille <akim@epita.fr>
977
978 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
979
980 2003-04-29 Akim Demaille <akim@epita.fr>
981
982 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
983 with %pure-parser and %locations to exercise the patch from Yakov
984 Markovitch below.
985
986 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
987
988 * data/yacc.c: (b4_lex_param): Corrected for the case where
989 %lex-param is provided and %pure-parser isn't.
990
991 2003-04-27 Paul Eggert <eggert@twinsun.com>
992
993 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
994 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
995 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
996 if it is not defined.
997 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
998
999 2003-04-26 Paul Eggert <eggert@twinsun.com>
1000
1001 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
1002 Declare to be of type suitable for the ninf value itself, not of
1003 type suitable for the corresponding table, since the latter might
1004 be unsigned but the ninf value might be negative. This fixes a
1005 bug reported by Alexandre Duret-Lutz in
1006 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
1007
1008 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
1009 invokes it. We shouldn't invoke it twice because it will attempt
1010 to put error.o in the archive twice. This fixes a glitch reported
1011 by Martin Mokrejs in
1012 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
1013
1014 2003-04-21 Paul Eggert <eggert@twinsun.com>
1015
1016 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
1017 to gnulib.
1018
1019 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
1020
1021 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
1022 Fix obvious typo that results in uncompilable GLR parsers
1023 when both %pure-parser and %locations are used. (trivial change)
1024
1025 2003-04-17 Paul Eggert <eggert@twinsun.com>
1026
1027 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
1028 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
1029 Do not insert the expected token via unput, as this runs afoul
1030 of a POSIX-compatibility bug in flex 2.5.31.
1031 All uses changed to BEGIN the parent state,
1032 since we no longer insert the expected token via unput.
1033 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
1034 that is no longer emitted after the above change.
1035
1036 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
1037 the first one. This change is from Paul Hilfinger, and it fixes
1038 regression reported by Werner Lemberg in
1039 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1040
1041 (resolve_sr_conflict): Don't invoke state_errs_set
1042 unless one or more tokens have been explicitly made errors.
1043 Otherwise, the above change causes Bison to abort.
1044
1045 * tests/existing.at (GNU pic Grammar): New test case, taken from
1046 Lemberg's email.
1047
1048 2003-03-31 Akim Demaille <akim@epita.fr>
1049
1050 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
1051
1052 2003-03-31 Akim Demaille <akim@epita.fr>
1053
1054 * src/output.c (prepare_symbols): Avoid trailing spaces in the
1055 output.
1056
1057 2003-03-31 Akim Demaille <akim@epita.fr>
1058
1059 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
1060 From Paul Hilfinger.
1061
1062 2003-03-29 Akim Demaille <akim@epita.fr>
1063
1064 * m4/error.m4: Do not put under dynamic conditions some code which
1065 expansion is under static control.
1066
1067 2003-03-29 Akim Demaille <akim@epita.fr>
1068
1069 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
1070
1071 2003-03-29 Akim Demaille <akim@epita.fr>
1072
1073 * doc/bison.texinfo (Strings are Destroyed): New.
1074
1075 2003-03-13 Paul Eggert <eggert@twinsun.com>
1076
1077 * .cvsignore: Add configure.lineno.
1078 * src/.cvsignore: Add yacc.
1079 * tests/.cvsignore: Add testsuite.log.
1080 * doc/fdl.texi: Sync with latest FSF version.
1081
1082 2003-03-12 Paul Eggert <eggert@twinsun.com>
1083
1084 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
1085 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
1086 cursor, instead of leaving it undefined. This fixes a bug
1087 reported by Tim Van Holder in
1088 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
1089 * tests/input.at (Torturing the Scanner): Test the scanner on
1090 an empty input file, which was Tim Van Holder's test case.
1091
1092 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
1093 <sys/resource.h> can be included, include sys/time.h and
1094 sys/times.h first, if available. This works around the SunOS
1095 4.1.4 porting bug reported by Bruce Becker in
1096 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
1097
1098 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
1099 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
1100 AC_HEADER_SYS_WAIT.
1101
1102 Merge changes from gnulib. This was prompted because the CVS
1103 snapshot didn't build on Solaris 7 due to strnlen problems.
1104
1105 These changes need to be merged back into gnulib:
1106 * lib/hash.c: Include <stdbool.h> unconditionally.
1107 * m4/onceonly.m4 (m4_quote): New macro.
1108 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
1109 Quote AC_FOREACH variable-expansions properly.
1110 The 2003-01-03 obstack.h change also needs merging.
1111 {end of changes requiring merging}
1112
1113 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
1114 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
1115 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
1116 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
1117 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
1118 New files, imported from gnulib.
1119 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
1120 above.
1121
1122 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
1123 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
1124 gnulib sources.
1125
1126 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
1127 Add.
1128 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
1129 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
1130 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
1131 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
1132 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
1133 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
1134 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
1135 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
1136 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
1137 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
1138 (jm_PREREQ_ARGMATCH): Remove.
1139 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
1140 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
1141
1142 * src/system.h: Include <stdbool.h> unconditionally.
1143
1144 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
1145 assuming at least C89 in the bitset code for some time now.
1146
1147 2003-03-03 Akim Demaille <akim@epita.fr>
1148
1149 * ro.po: New.
1150
1151 2003-03-02 Akim Demaille <akim@epita.fr>
1152
1153 * doc/bison.texinfo (Table of Symbols): Reactivate the
1154 documentation for %lex-param, and %parse-param.
1155
1156 2003-03-02 Akim Demaille <akim@epita.fr>
1157
1158 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
1159 generate verbose error messages.
1160 Use the number of tokens as an upper bound in yytname, as it
1161 cannot be a non terminal.
1162
1163 2003-03-02 Akim Demaille <akim@epita.fr>
1164
1165 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
1166 message.
1167
1168 2003-03-02 Akim Demaille <akim@epita.fr>
1169
1170 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
1171 Use them to exercise yycheck overrun.
1172 Based on Andrew Suffield's grammar.
1173
1174 2003-03-02 Akim Demaille <akim@epita.fr>
1175
1176 Create tests/local.at for Bison generic testing macros.
1177
1178 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
1179 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
1180 This new file.
1181 * tests/calc.at (AT_CHECK_CALC): Adjust.
1182 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
1183 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
1184 * tests/local.at: here.
1185 (AT_COMPILE_CXX): Tags the tests using it as c++.
1186 Ignore the test if CXX is not functional.
1187
1188 2003-03-01 Paul Eggert <eggert@twinsun.com>
1189
1190 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
1191 not loc->end, since loc->end might contain garbage and this leads
1192 to undefined behavior on some platforms.
1193 (id_loc, token_start): Use (IF_LINTed) initial values that do not
1194 depend on *loc, so that the reader doesn't give the the false
1195 impression that *loc is initialized.
1196 (<INITIAL>"%%"): Do not bother setting code_start, since its value
1197 does not survive the return.
1198
1199 2003-03-01 Akim Demaille <akim@epita.fr>
1200
1201 * src/scan-gram.l (code_start): Always initialize it when entering
1202 into yylex, as SC_EPILOGUE is activated *before* the corresponding
1203 yylex invocation. An alternative would be making it static, but
1204 then it starts with the second %%'s beginning, instead of its end.
1205
1206 2003-02-28 Paul Eggert <eggert@twinsun.com>
1207
1208 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
1209 around a UnixWare 7.1.1 porting bug reported by John Hughes in
1210 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
1211
1212 2003-02-26 Paul Eggert <eggert@twinsun.com>
1213
1214 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
1215 Remove Sequent/Pyramid discussion (nobody uses them any more).
1216 Merge VMS and MS-DOS discussion; these ports may well be dead
1217 but let's keep mentioning them for now. Put <> around email
1218 addresses. Add copyright notice.
1219
1220 2003-02-24 Paul Eggert <eggert@twinsun.com>
1221
1222 * data/glr.c (yy_reduce_print): yylineno -> yylno,
1223 to avoid collision with flex use of yylineno.
1224 Problem reported by Bruce Lilly in
1225 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
1226 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1227 * data/yacc.c (yy_reduce_print): Likewise.
1228
1229 * config/depcomp: Sync with Automake 1.7.3.
1230
1231 2003-02-21 Akim Demaille <akim@epita.fr>
1232
1233 * data/lalr1.cc: Use temporary variables instead of casts to
1234 change integer types.
1235 Suggested by Paul Eggert.
1236
1237 2003-02-21 Akim Demaille <akim@epita.fr>
1238
1239 * doc/bison.texinfo: Use "location" consistently to refer to @n,
1240 to avoid confusions with lalr1.cc's notion of Position.
1241 Suggested by Paul Eggert.
1242
1243 2003-02-20 Akim Demaille <akim@epita.fr>
1244
1245 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
1246 before initial_columns.
1247 (location.hh): Use consistent variable names when defining the
1248 operator<<.
1249 Use "last" so that we subtract from Positions, not from unsigned.
1250
1251 2003-02-20 Akim Demaille <akim@epita.fr>
1252
1253 * data/lalr1.cc (position.hh): New subfile, including the extended
1254 and Doxygen'ed documentation of class Position.
1255 (location.hh): Use it.
1256 Document a` la Doxygen.
1257 With the help of Benoit Perrot.
1258
1259 2003-02-20 Akim Demaille <akim@epita.fr>
1260
1261 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
1262 AT_YACC_IF.
1263 Redefine AT_YYERROR_SEES_LOC_IF using it.
1264 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
1265 not defined.
1266 Don't use the location in yy::Parser::error_ and
1267 yy::Parser::print_ when not %locations.
1268 Activate more lalr1.cc tests.
1269
1270 2003-02-19 Akim Demaille <akim@epita.fr>
1271
1272 * data/lalr1.cc: When displaying a line number, be sure to make it
1273 an int.
1274
1275 2003-02-19 Akim Demaille <akim@epita.fr>
1276
1277 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
1278 Remove, useless.
1279 (YYABORT, YYACCEPT, YYERROR): New.
1280 * tests/calc.at: Renable the lalr1.cc test.
1281
1282 2003-02-19 Akim Demaille <akim@epita.fr>
1283
1284 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
1285 error recovery, mixing with/without pops and discarding of the
1286 lookahead.
1287 Exercise YYERROR.
1288 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
1289
1290 2003-02-17 Paul Eggert <eggert@twinsun.com>
1291
1292 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
1293 * tests/testsuite.at (AT_COMPILE): Use them.
1294 This fixes the testsuite problem reported by Robert Lentz in
1295 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
1296
1297 2003-02-12 Paul Eggert <eggert@twinsun.com>
1298
1299 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
1300 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
1301 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
1302 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
1303 Check for malloc failure, for consistency with yacc.c.
1304 (yytname_size): Remove, for consistency with yacc.c.
1305
1306 The bug still remains in data/lalr1.cc, as I didn't have time
1307 to fix it there.
1308
1309 2003-02-06 Akim Demaille <akim@epita.fr>
1310
1311 * configure.ac (GXX): Rename as...
1312 (CXX): this, to keep the original Autoconf semantics.
1313 Require 2.57.
1314 * data/lalr1.cc: Fix b4_copyright invocations.
1315 If YYDEBUG is not defined, don't depend upon name_ being defined.
1316 (location.hh): Include string and iostream.
1317 (Position::filename): New member.
1318 (Position::Position ()): New.
1319 (operator<< (Position)): New.
1320 (operator- (Position, int)): New.
1321 (Location::first, Location::last): Rename as...
1322 (Location::begin, Location::end): these, to mock the conventional
1323 iterator names.
1324 (operator<< (Location)): New.
1325 * tests/atlocal.in (CXX): New.
1326 * tests/testsuite.at (AT_COMPILE_CXX): New.
1327 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
1328 locations in a more synthetic way.
1329 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
1330 lalr1.cc is used.
1331 Adjust the C locations to match those from Emacs: first column is
1332 column 0.
1333 Change all the expected results.
1334 Conform to the GCS: simplify the locations when applicable.
1335 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
1336 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
1337 these CPP macros with the m4 macros new defined by...
1338 (AT_CHECK_PUSHDEFS): this, i.e.:
1339 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
1340 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
1341 New macros.
1342 (AT_CHECK_POPDEFS): Undefine them.
1343 (AT_CHECK_CALC_LALR1_CC): New.
1344 Use it for the first lalr1.cc test.
1345
1346 2003-02-04 Akim Demaille <akim@epita.fr>
1347
1348 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
1349 Location as is defined.
1350
1351 2003-02-04 Akim Demaille <akim@epita.fr>
1352
1353 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
1354 name_ being defined.
1355
1356 2003-02-03 Paul Eggert <eggert@twinsun.com>
1357
1358 * src/gram.h (start_symbol): Remove unused decl.
1359
1360 Use more-consistent naming conventions for local vars.
1361
1362 * src/derives.c (derives_compute): Change type of local var from
1363 int to rule_number.
1364 * src/gram.c (grammar_rules_partial_print): Likewise.
1365 * src/print.c (print_core): Likewise.
1366 * src/reduce.c (reduce_grammar_tables): Likewise.
1367
1368 * src/gram.c (grammar_dump): Change name of item_number *
1369 local var from r to rp.
1370 * src/nullable.c (nullable_compute): Likewise.
1371
1372 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
1373
1374 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
1375 for symbol or symbol_number var.
1376 * src/reader.c (grammar_start_symbol_set): Likewise.
1377 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
1378 Likewise.
1379 * src/state.c (transitions_to): Likewise.
1380 * src/state.h: Likewise.
1381 * src/tables.c (symbol_number_to_vector_number): Likewise.
1382
1383 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
1384 char * var.
1385
1386 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
1387 var.
1388
1389 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
1390 var.
1391
1392 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
1393 Use str, not s, for char * var. Use ch, not c, for character var.
1394 Use size for size var.
1395
1396 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
1397 char * var.
1398 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
1399 uniqstr var.
1400 * src/uniqstr.h: Likewise.
1401
1402 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1403 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1404 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
1405 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
1406 param to have same name as that of enum, so that we don't use
1407 "s" to stand for a non-state.
1408
1409 2003-02-02 Akim Demaille <akim@epita.fr>
1410
1411 * src/scan-skel.l: Scan more than one inert character per yylex
1412 invocation.
1413
1414 2003-02-01 Paul Eggert <eggert@twinsun.com>
1415
1416 Version 1.875a.
1417
1418 * po/LINGUAS: Add ms.
1419
1420 2003-01-30 Akim Demaille <akim@epita.fr>
1421
1422 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
1423
1424 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1425
1426 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
1427 of $1.
1428
1429 Changes in response to error report by S. Eken: GLR mode does not
1430 handle negative $ indices or $ indices in embedded rules correctly.
1431 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
1432
1433 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
1434 (b4_rhs_location): Ditto.
1435 (yyfill): New function to copy from stack tree into array
1436 incrementally.
1437 (yyuserAction): Modify to allow incremental move of semantic values
1438 to rhs array when in GLR mode.
1439 Define YYFILL to use in user-defined actions to fill semantic array
1440 as needed.
1441 Remove dummy use of yystack, as there is now a guaranteed use.
1442 (yydoAction): Modify to allow incremental move of semantic values
1443 to rhs array when in GLR mode.
1444 (yyresolveAction): Ditto.
1445 (yyglrShiftDefer): Update comment.
1446 (yyresolveStates): Use X == NULL for pointers, not !X.
1447 (yyglrReduce): Ditto.
1448 (yydoAction): Ditto
1449
1450 * tests/glr-regr1.at: Rename to ...
1451 * tests/glr-regression.at: Add new regression test for the problems
1452 described above (adapted from S. Eken).
1453 Update copyright notice.
1454 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
1455 * tests/Makefile.am: Ditto.
1456
1457 2003-01-28 Paul Eggert <eggert@twinsun.com>
1458
1459 * data/lalr1.cc: Do not use @output_header_name@ unless
1460 b4_defines_flag is set. This fixes two bugs reported by
1461 Tim Van Holder in
1462 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
1463 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
1464
1465 2003-01-21 Paul Eggert <eggert@twinsun.com>
1466
1467 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
1468 we don't need to worry about yyerrlab1 being reported as an
1469 "unused label" by non-GCC C compilers. The downside is that if
1470 locations are used then a couple of statements are duplicated each
1471 time YYERROR is invoked, but the upside is that the warnings
1472 should vanish.
1473 (yyerrlab1): Move code to YERROR.
1474 (yyerrlab2): Remove. Change uses back to yyerrlab1.
1475 This reverts some of the 2002-12-27 change.
1476
1477 2003-01-17 Paul Eggert <eggert@twinsun.com>
1478
1479 * src/output.c (symbol_printers_output): Fix typo that led
1480 to core dump. Problem reported by Antonio Rus in
1481 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
1482
1483 2003-01-13 Akim Demaille <akim@epita.fr>,
1484 Quoc Peyrot <chojin@lrde.epita.fr>,
1485 Robert Anisko <anisko_r@lrde.epita.fr>
1486
1487 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
1488 when the stacks contain one element, as the loop would otherwise
1489 free the last state, and then use the top state (the one we just
1490 popped). This means that the initial elements will not be freed
1491 explicitly, as is the case in yacc.c; it is not a problem, as
1492 these elements have fake values.
1493
1494 2003-01-11 Paul Eggert <eggert@twinsun.com>
1495
1496 * NEWS: %expect-violations are now just warnings, reverting
1497 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
1498 bootstrapping problem reported by Matthias Klose; see
1499 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
1500 * src/conflicts.c (conflicts_print): Likewise.
1501 * tests/conflicts.at (%expect not enough, %expect too much,
1502 %expect with reduce conflicts): Likewise.
1503 * doc/bison.texinfo (Expect Decl): Document this. Also mention
1504 that the warning is enabled if the number of conflicts changes
1505 (not necessarily increases).
1506
1507 * src/getargs.c (version): Update copyright year.
1508
1509 2003-01-09 Akim Demaille <akim@epita.fr>
1510
1511 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
1512
1513 2003-01-08 Paul Eggert <eggert@twinsun.com>
1514
1515 * Makefile.maint (WGETFLAGS):
1516 New macro, containing "-C off" to disable proxy caches.
1517 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
1518 (rel-check): Use $(WGET) instead of wget.
1519
1520 2003-01-06 Paul Eggert <eggert@twinsun.com>
1521
1522 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
1523 the GLR paper of Scott, Johnstone and Hussain.
1524
1525 2003-01-04 Paul Eggert <eggert@twinsun.com>
1526
1527 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
1528 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
1529 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
1530 (EXTRA_LIBRARIES): New var, for liby.a.
1531 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
1532 (EXTRA_SCRIPTS): New var, for yacc.
1533
1534 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
1535 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
1536 Problem reported by Nelson H. F. Beebe.
1537
1538 2003-01-03 Paul Eggert <eggert@twinsun.com>
1539
1540 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
1541 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1542 when compiling Bison 1.875's `bitset bset = obstack_alloc
1543 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
1544
1545 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
1546 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
1547 grow to a huge size with typical invocation.
1548
1549 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
1550 Use the pattern recommended by Autoconf 2.57, except also protect
1551 against double-definition.
1552 * src/system.h: Likewise.
1553 Portability issues reported by Nelson H. F. Beebe.
1554
1555 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
1556 All uses changed. Provide a definition in both C and C++.
1557 (yytrue, yyfalse): Define even if defined (__cplusplus).
1558
1559 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
1560 Reported by Nelson H. F. Beebe.
1561
1562 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
1563
1564 2003-01-02 Paul Eggert <eggert@twinsun.com>
1565
1566 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
1567 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
1568 Bug reported by Nelson H. F. Beebe.
1569
1570 2003-01-01 Paul Eggert <eggert@twinsun.com>
1571
1572 * Version 1.875.
1573
1574 2002-12-30 Paul Eggert <eggert@twinsun.com>
1575
1576 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
1577 Moved here from...
1578 (<INITIAL>","): Here. This causes stray "," to be treated
1579 more uniformly.
1580
1581 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
1582 last brace in braced code when not in Yacc mode, for compatibility
1583 with Bison 1.35. This resurrects the 2001-12-15 patch to
1584 src/reader.c.
1585
1586 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
1587 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
1588
1589 2002-12-28 Paul Eggert <eggert@twinsun.com>
1590
1591 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
1592 that of SYM's type. This fixes Debian bug 168069, reported by
1593 Thomas Olsson.
1594
1595 2002-12-28 Paul Eggert <eggert@twinsun.com>
1596
1597 Version 1.75f.
1598
1599 Switch back to the Yacc style of conflict reports, undoing some
1600 of the 2002-07-30 change.
1601 * doc/bison.texinfo (Understanding): Use Yacc style for
1602 conflict reports. Also, use new way of locating rules.
1603 * src/conflicts.c (conflict_report):
1604 Renamed from conflict_report_yacc, removing the old
1605 'conflict_report'. Translate the entire conflict report at once,
1606 so that we don't assume that "," has the same interpretation in
1607 all languages.
1608 (conflicts_output): Use Yacc-style conflict report for each state,
1609 instead of our more-complicated style.
1610 (conflicts_print): Use Yacc-style conflict report, except print
1611 the input file name when not emulating Yacc.
1612 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
1613 Conflicted Reduction, %expect not enough, %expect too much,
1614 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
1615 * tests/existing.at (GNU Cim Grammar): Likewise.
1616 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
1617
1618 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
1619 fatal): Don't invoke fflush; it's not needed and it might even be
1620 harmful for stdout, as stdout might not be open.
1621 * src/reduce.c (reduce_print): Likewise.
1622
1623 2002-12-27 Paul Eggert <eggert@twinsun.com>
1624
1625 Fix a bug where error locations were not being recorded correctly.
1626 This problem was originally reported by Paul Hilfinger in
1627 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
1628
1629 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1630 top of the location stack's error locations.
1631 (yyerrlab): Set it. When discarding a token, push its location
1632 onto yylerrsp so that we don't lose track of the error's end.
1633 (yyerrlab1): Now is only the target of YYERROR, so that we can
1634 properly record the location of the action that failed. For GCC
1635 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1636 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1637 (yyerrlab2): New label, which yyerrlab now falls through to.
1638 Compute the error's location by applying YYLLOC_DEFAULT to
1639 the locations of all the symbols that went into the error.
1640 * doc/bison.texinfo (Location Default Action): Mention that
1641 YYLLOC_DEFAULT is also invoked for syntax errors.
1642 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1643 Error locations include the locations of all the tokens that were
1644 discarded, not just the last token.
1645
1646 2002-12-26 Paul Eggert <eggert@twinsun.com>
1647
1648 * src/files.c: Include quote.h.
1649 (compute_output_file_names): Warn if we detect conflicting
1650 outputs to the same file. This should catch the misunderstanding
1651 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1652
1653 * src/conflicts.c (conflicts_print): If the user specifies
1654 "%expect N", report an error if there are any reduce/reduce
1655 conflicts. This is what the manual says should happen.
1656 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1657 * tests/conflicts.at (%expect with reduce conflicts): New test.
1658
1659 Don't use m4_include on relative file names, as it doesn't work as
1660 desired if there happens to be a file with that name under ".".
1661
1662 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1663 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1664 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1665 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1666 * src/output.c (output_skeleton): Use full path names when
1667 specifying a file to include; don't rely on include path, as
1668 it's unreliable when the working file contains a file with
1669 that name.
1670
1671 2002-12-25 Paul Eggert <eggert@twinsun.com>
1672
1673 Remove obsolete references to bison.simple and bison.hairy.
1674 Problem mentioned by Aubin Mahe in
1675 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
1676 * data/glr.c: Comment fix.
1677 * doc/bison.1: Remove references. Also, mention "yacc".
1678
1679 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1680 with -g option.
1681
1682 * src/parse-gram.y (declaration): Use enum "report_states" rather
1683 than its numeric value 1.
1684
1685 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1686 opening a new one. This fixes Debian bug 165349, reported by
1687 Bruce Stephens.
1688
1689 2002-12-24 Paul Eggert <eggert@twinsun.com>
1690
1691 Version 1.75e.
1692
1693 * Makefile.maint (cvs-update): Don't assume that the shell
1694 supports $(...), as Solaris sh doesn't.
1695
1696 * src/parse-gram.y (lloc_default): Remove test for empty
1697 nonterminals at the end, since it didn't change the result.
1698
1699 2002-12-24 Paul Eggert <eggert@twinsun.com>
1700
1701 If the user does not define YYSTYPE as a macro, Bison now declares it
1702 using typedef instead of defining it as a macro. POSIX requires this.
1703 For consistency, YYLTYPE is also declared instead of defined.
1704
1705 %union directives can now have a tag before the `{', e.g., the
1706 directive `%union foo {...}' now generates the C code
1707 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1708 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1709 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1710 instead of `yyltype'.
1711
1712 `yystype' and `yyltype' are now obsolescent macros instead of being
1713 typedefs or tags; they are no longer documented and will be
1714 withdrawn in a future release.
1715
1716 * data/glr.c (b4_location_type): Remove.
1717 (YYSTYPE): Renamed from yystype.
1718 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
1719 (struct YYLTYPE): Renamed from struct yyltype.
1720 (YYLTYPE): Renamed from yyltype.
1721 (yyltype, yystype): New (and obsolescent) macros,
1722 for backward compatibility.
1723 * data/yacc.c: Likewise.
1724
1725 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
1726 does not specify a union tag. This is for compatibility with
1727 Solaris 9 yacc.
1728
1729 * src/parse-gram.y (add_param): 2nd arg is now char * not char
1730 const *, since it is now modified by stripping surrounding { }.
1731 (current_braced_code): Remove.
1732 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
1733 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
1734 trailing " {...}". Now of type <chars>.
1735 (grammar_declaration): Adjust to bundled tokens.
1736 (code_content): Remove; stripping is now done by add_param.
1737 (print_token_value): Print contents of bundled tokens.
1738 (token_name): New function.
1739
1740 * src/reader.h (braced_code, current_braced_code): Remove.
1741 (token_name): New decl.
1742
1743 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
1744 token_type, not braced_code code_kind. All uses changed.
1745 (SC_PRE_CODE): New state, for scanning after a keyword that
1746 has (or usually has) an immediately-following braced code.
1747 (token_type): New local var, to keep track of which token type
1748 to return when scanning braced code.
1749 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
1750 <INITIAL>"%parse-param", <INITIAL>"%printer",
1751 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
1752 instead of returning a token type immediately.
1753 (<INITIAL>"{"): Set token type.
1754 (<SC_BRACED_CODE>"}"): Use it.
1755 (handle_action_dollar, handle_action_at): Now returns bool
1756 indicating success. Fail if ! current_rule; this prevents a core dump.
1757 (handle_symbol_code_dollar, handle_symbol_code_at):
1758 Remove; merge body into caller.
1759 (handle_dollar, handle_at): Complain in invalid contexts.
1760
1761 * NEWS, doc/bison.texinfo: Document the above.
1762 * NEWS: Fix years and program names in copyright notice.
1763
1764 2002-12-17 Paul Eggert <eggert@twinsun.com>
1765
1766 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
1767 Reporting, Table of Symbols): Omit mentions of %lex-param and
1768 %parse-param from the documentation for now.
1769
1770 2002-12-15 Paul Eggert <eggert@twinsun.com>
1771
1772 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
1773 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
1774 lookahead symbol, and which sets yychar in parser actions) and it
1775 disagreed with the Bison documentation. Bug
1776 reported by Andrew Walrond.
1777
1778 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
1779 as the caller now does that.
1780 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
1781 (YYEMPTY): Parenthesize right hand side, since others use it.
1782 (yyparse): Don't assume that our generated code is the only code
1783 that sets yychar.
1784
1785 2002-12-13 Paul Eggert <eggert@twinsun.com>
1786
1787 Version 1.75d.
1788
1789 POSIX requires a "yacc" command.
1790 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
1791 (MOSTLYCLEANFILES): Add yacc.
1792 (yacc): New rule.
1793 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
1794 as an alias for bison y.
1795
1796 * po/LINGUAS: Add da.
1797
1798 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
1799 problem with latest <getopt.h>.
1800 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
1801
1802 * doc/fdl.texi: Upgrade to 1.2.
1803 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
1804 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
1805 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
1806 gnulib.
1807 * config/install-sh: Sync with autotools.
1808
1809 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
1810 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1811 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
1812 locations are requested.
1813 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
1814 locations are requested.
1815
1816 2002-12-12 Paul Eggert <eggert@twinsun.com>
1817
1818 Remove unportable casts and storage allocation tricks.
1819 While we're at it, remove almost all casts, since they
1820 usually aren't needed and are a sign of trouble.
1821
1822 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
1823
1824 * src/derives.c (derives_compute): Do not subtract NTOKENS from
1825 the pointer DSET returned by malloc; this isn't portable.
1826 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
1827 Similarly for DERIVES.
1828 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
1829 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
1830 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
1831
1832 * src/derives.c (derives_compute): Do not bother invoking
1833 int_of_rule_number, since rule numbers are integers.
1834
1835 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
1836 rather than XMALLOC (char, N).
1837
1838 * src/files.c (filename_split): Rewrite to avoid cast.
1839
1840 * src/gram.h (symbol_number_as_item_number,
1841 item_number_as_symbol_number, rule_number_as_item_number,
1842 item_number_as_rule_number):
1843 Now inline functions rather than macros, to avoid casts.
1844 * src/state.h (state_number_as_int): Likewise.
1845 * src/tables.c (state_number_to_vector_number,
1846 symbol_number_to_vector_number): Likewise.
1847
1848 * src/gram.h (int_of_rule_number): Remove; no longer used.
1849
1850 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
1851 since the resulting storage is always stored into.
1852
1853 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
1854 where it's needed.
1855
1856 * src/muscle_tab.c (muscle_m4_output):
1857 Now inline. Return bool, not int.
1858 * src/state.c (state_compare): Likewise.
1859 * src/symtab.c (symbol_check_defined,
1860 symbol_check_alias_consistency, symbol_pack, symbol_translation,
1861 hash_compare_symbol, hash_symbol):
1862 Likewise.
1863 * src/uniqstr.c (uniqstr_print): Likewise.
1864 * src/muscle_tab.c (muscle_m4_output_processor):
1865 New function, to avoid casts.
1866 * src/state.c (state_comparator, stage_hasher): Likewise.
1867 * src/symtab.c (symbol_check_defined_processor,
1868 symbol_check_alias_consistency_processor, symbol_pack_processor,
1869 symbol_translation_processor, hash_symbol_comparator,
1870 hash_symbol_hasher): Likewise.
1871 * src/uniqstr.c (uniqstr_print_processor): Likewise.
1872 * src/muscle_tab.c (muscles_m4_output):
1873 Use new functions instead of casting old functions unportably.
1874 * src/state.c (state_hash_new): Likewise.
1875 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
1876 symbols_token_translations_init):
1877 Likewise.
1878 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
1879
1880 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
1881 var instead of casting to long, to avoid casts.
1882 (prepare_states): Use MALLOC rather than alloca, so that we don't
1883 have to worry about alloca.
1884 * src/state.c (state_hash_lookup): Likewise.
1885
1886 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
1887 local var instead of casting to unsigned char, to avoid casts.
1888
1889 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
1890 STATE_ALLOC): Remove.
1891 (transitions_new, errs_new, reductions_new, state_new): Use malloc
1892 rather than calloc, and use offsetof to avoid allocating slightly
1893 too much storage.
1894 (state_new): Initialize all members.
1895
1896 * src/state.c (state_hash): Use unsigned accumulator, not signed.
1897
1898 * src/symtab.c (symbol_free): Remove; unused.
1899 (symbol_get): Remove cast in lhs of assignment.
1900 (symbols_do): Now static. Accept generic arguments, not
1901 hashing-related ones.
1902
1903 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
1904 (symbol_processor): Remove.
1905 (symbols_do): Remove decl; now static.
1906
1907 * src/system.h (alloca): Remove; decl no longer needed.
1908 (<stddef.h>): Include, for offsetof.
1909 (<inttypes.>, <stdint.h>): Include if available.
1910 (uintptr_t): New type, if system lacks it.
1911 (CALLOC, MALLOC, REALLOC): New macros.
1912 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
1913 new macros.
1914
1915 * src/tables.c (table_size): Now int, to pacify GCC.
1916 (table_grow, table_ninf_remap): Use signed table size.
1917 (save_row): Don't bother initializing locals when not needed.
1918 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
1919 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
1920
1921 * src/vcg.h: Correct misspellings.
1922
1923 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
1924
1925
1926 * src/getargs.c (getargs): Don't assume EOF == -1.
1927
1928 2002-12-09 Paul Eggert <eggert@twinsun.com>
1929
1930 Change identifier spellings to avoid collisions with names
1931 that are reserved by POSIX.
1932
1933 Don't use names ending in _t, since POSIX reserves them.
1934 For consistency, remove _e and _s endings -- they're weren't
1935 needed to remove ambiguity. All uses changed.
1936 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
1937 turn was just renamed from struniq_t.
1938 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
1939 which in turn was just renamed from struniq_processor_t.
1940 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
1941 in turn was renamed from hash_compare_struniq_t.
1942 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
1943 (state_list): Renamed from state_list_t.
1944 * src/assoc.h (assoc): Renamed from assoc_t.
1945 * src/conflicts.c (enum conflict_resolution): Renamed from
1946 enum conflict_resolution_e.
1947 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
1948 (rule_list): Renamed from rule_list_t.
1949 * src/getargs.h (enum trace): Renamed from enum trace_e.
1950 (enum report): Renamed from enum report_e.
1951 * src/gram.h (item_number): Renamed from item_number_t.
1952 (rule_number): Renamed from rule_number_t.
1953 (struct rule_s): Remove the "rule_s" part; not used.
1954 (rule): Renamed from rule_t.
1955 (rule_filter): Renamed from rule_filter_t.
1956 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
1957 (goto_list): Renamed from goto_list_t.
1958 * src/lalr.h (goto_number): Renamed from goto_number_t.
1959 * src/location.h (location): Renamed from location_t.
1960 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
1961 and moved here from:
1962 * src/muscle_tab.h (muscle_entry_t): here.
1963 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
1964 (rule_list): Renamed from rule_list_t.
1965 * src/print_graph.c (static_graph): Renamed from graph.
1966 * src/reader.h (braced_code): Renamed from braced_code_t.
1967 Remove brace_code_e tag.
1968 * src/relation.h (relation_node): Renamed from relation_node_t.
1969 (relation_nodes): Renamed from relation_nodes_t.
1970 (relation): Renamed from relation_t.
1971 * src/state.h (state_number): Renamed from state_number_t.
1972 (struct state): Renamed from struct state_s.
1973 (state): Renamed from state_t.
1974 (transitions): Renamed from transitions_t. Unused (and
1975 misspelled) transtion_s tag removed.
1976 (errs): Renamed from errs_t. Unused errs_s tag removed.
1977 (reductions): Renamed from reductions_t. Unused tag
1978 reductions_s removed.
1979 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
1980 (struct symbol_list): Renamed from struct symbol_list_s.
1981 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
1982 (struct symbol): Renamed from struct symbol_s.
1983 (symbol): Renamed from symbol_t.
1984 * src/tables.c (vector_number): Renamed from vector_number_t.
1985 (action_number): Renamed from action_t.
1986 * src/tables.h (base_number): Renamed from base_t.
1987 * src/vcg.h (enum color): Renamed from enum color_e.
1988 (enum textmode): Renamed from enum textmode_e.
1989 (enum shape): Renamed from enum shape_e.
1990 (struct colorentry): Renamed from struct colorentry_s.
1991 (struct classname): Renamed from struct classname_s.
1992 (struct infoname): Renamed from struct infoname_s.
1993 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
1994 (enum decision): Renamed from enum decision_e.
1995 (enum orientation): Renamed from enum orientation_e.
1996 (enum alignment): Renamed from enum alignment_e.
1997 (enum arrow_mode): Renamed from enum arrow_mode_e.
1998 (enum crossing_type): Renamed from enum crossing_type_e.
1999 (enum view): Renamed from enum view_e.
2000 (struct node): Renamed from struct node_s.
2001 (node): Renamed from node_t.
2002 (enum linestyle): Renamed from enum linestyle_e.
2003 (enum arrowstyle): Renamed from enum arrowstyle_e.
2004 (struct edge): Renamed from struct edge.
2005 (edge): Renamed from edge_t.
2006 (struct graph): Renamed from struct graph_s.
2007 (graph): Renamed from graph_t.
2008 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
2009 Rename value_t -> value.
2010 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
2011 value_t_as_yystype -> value_as_yystype.
2012
2013 Don't include <errno.h> in the mainstream code, since it
2014 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
2015 * lib/get-errno.c, lib/get-errno.h: New files.
2016 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
2017 get-errno.c.
2018 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
2019 * src/output.c (output_skeleton): Likewise.
2020 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
2021 instead of errno.
2022 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
2023 Likewise.
2024 (handle_action_dollar, handle_action_at): Likewise.
2025 * src/system.h: Do not include <errno.h>.
2026 (TAB_EXT): Renamed from EXT_TAB.
2027 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
2028
2029 Avoid str[a-z]*, since <string.h> reserves that name space.
2030 Change all instances of "struniq" in names to "uniqstr", and
2031 likewise for "STRUNIQ" and "UNIQSTR".
2032 * src/uniqstr.c: Renamed from src/struniq.c.
2033 * src/uniqstr.h: Renamed from src/struniq.h.
2034 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
2035 * src/files.c (strsuffix): Remove; unused.
2036 (concat2): Renamed from stringappend. Now static.
2037 * src/files.h (strsuffix, stringappend): Remove; unused.
2038 * src/parse-gram.y (<chars>): Renamed from <string>.
2039 (<uniqstr>): Renamed from <struniq>.
2040 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
2041 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
2042 (struct graph_s.expand): Renamed from struct graph_s.stretch.
2043 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
2044 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
2045 (N_EXPAND): Renamed from N_STRETCH.
2046
2047 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
2048 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
2049 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
2050 Remove; unused.
2051 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
2052 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
2053 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
2054 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
2055 (BASE_MAXIMUM): Renamed from BASE_MAX.
2056 (BASE_MINIMUM): Renamed from BASE_MIN.
2057 (ACTION_MAX): Remove; unused.
2058 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
2059 Unnecessary casts removed from above defines.
2060
2061
2062 Fix misspelling in names.
2063 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
2064 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
2065 G_NODE_ALIGNEMENT.
2066
2067
2068 * lib/timevar.c (timevar_report): Renamed from time_report,
2069 for consistency with other names.
2070 * lib/timevar.h (timevar_report): New decl.
2071 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
2072
2073
2074 Sort include-file uses.
2075
2076 Reorder all include files under src to be in the order "system.h".
2077 then the ../lib include files in angle brackets (alphabetized),
2078 then the . include files in double-quotes (alphabetized). Fix
2079 dependency breakages encountered in this process, as follows:
2080 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
2081 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
2082 * src/state.h: Include "symtab.h".
2083
2084 2002-12-08 Paul Eggert <eggert@twinsun.com>
2085
2086 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
2087 since this causes problems when __file__ contains character
2088 sequences like "@" that are treated specially by src/scan-skel.l.
2089 Instead, just use the file's basename. This fixes the bug
2090 reported by Martin Mokrejs in
2091 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
2092
2093 2002-12-06 Paul Eggert <eggert@twinsun.com>
2094
2095 Add support for rules that do not have trailing semicolons, as
2096 POSIX requires. Improve the quality of locations in Bison
2097 diagnostics.
2098
2099 * src/location.c: Include <quotearg.h>.
2100 (empty_location): Now const.
2101 (location_print): New function. Follow the recommendation of the
2102 GNU Coding Standards for locations that span file boundaries.
2103 * src/location.h: Do not include <quotearg.h>; no longer needed.
2104 (boundary): New type.
2105 (location_t): Use it. This allows locations to span file boundaries.
2106 All member uses changed: file -> start.file or end.file (as needed),
2107 first_line -> start.line, first_column -> start.column,
2108 last_line -> end.line, last_column -> end.column.
2109 (equal_boundaries): New function.
2110 (LOCATION_RESET, LOCATION_STEP): Remove.
2111 (LOCATION_PRINT): Remove. All callers changed to use location_print.
2112 (empty_location): Now const.
2113 (location_print): New decl.
2114 * src/parse-gram.y (lloc_default): New function, which handles
2115 empty locations more accurately.
2116 (YYLLOC_DEFAULT): Use it.
2117 (%token COLON): Remove.
2118 (%token ID_COLON): New token.
2119 (rules): Use it.
2120 (declarations, rules): Remove trailing semicolon.
2121 (declaration, rules_or_grammar_declaration):
2122 Allow empty (";") declaration.
2123 (symbol_def): Remove empty actions; no longer needed.
2124 (rules_or_grammar_declaration): Remove trailing semicolon.
2125 (semi_colon.opt): Remove.
2126 * src/reader.h: Include location.h.
2127 (scanner_cursor): New decl.
2128 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
2129 rolling our own.
2130 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
2131 of *loc.
2132 (STEP): Remove. No longer needed, now that adjust_location does
2133 the work. All uses removed.
2134 (scanner_cursor): New var.
2135 (adjust_location): Renamed from extend_location. It now sets
2136 *loc and adjusts the scanner cursor. All uses changed.
2137 Don't bother testing for CR.
2138 (handle_syncline): Remove location arg; now updates scanner cursor.
2139 All callers changed.
2140 (unexpected_end_of_file): Now accepts start boundary of token or
2141 comment, not location. All callers changed. Update scanner cursor,
2142 not the location.
2143 (SC_AFTER_IDENTIFIER): New state.
2144 (context_state): Renamed from c_context. All uses changed.
2145 (id_loc, code_start, token_start): New local vars.
2146 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
2147 processing of Yacc white space and equivalents here.
2148 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
2149 instead of returning ID immediately, since we need to search for
2150 a subsequent colon.
2151 (<INITIAL>"'", "\""): Save token_start.
2152 (<INITIAL>"%{", "{", "%%"): Save code_start.
2153 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
2154 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
2155 BEGIN context_state at end, not INITIAL.
2156 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
2157 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
2158 Return correct token start.
2159 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
2160 the start of a character, string or multiline comment is found.
2161 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
2162 Reduction): Adjust reported locations to match the more-precise
2163 results now expected.
2164 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
2165 * tests/reduce.at (Useless Rules, Reduced Automaton,
2166 Underivable Rules): Likewise.
2167 * tests/regression.at (Invalid inputs): No longer `expecting ";"
2168 or "|"' now that so many other tokens are allowed by the new grammar.
2169
2170 * src/complain.h (current_file): Remove duplicate decl;
2171 current_file is now owned by files.h.
2172 * src/complain.c, src/scan-gram.l: Include files.h.
2173
2174 2002-12-06 Paul Eggert <eggert@twinsun.com>
2175
2176 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
2177 promotes to int; it might be unsigned int.
2178 * data/yacc.c (yy_reduce_print): Likewise.
2179
2180 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
2181 be #defined in the prologue, not in the Bison declarations.
2182 This fixes Debian Bug 102878, reported by Shaul Karl.
2183
2184 2002-12-02 Paul Eggert <eggert@twinsun.com>
2185
2186 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
2187 * lib/strtoul.c: New file, from gnulib.
2188 This fixes a porting bug reported by Peter Klein in
2189 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
2190
2191 2002-11-30 Paul Eggert <eggert@twinsun.com>
2192
2193 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
2194 and put only a forward declaration in the prologue. This is for
2195 consistency with the other scanner helper functions.
2196
2197 Type clashes now generate warnings, not errors, since it
2198 appears that POSIX may allow some grammars with type clashes.
2199 * src/reader.c (grammar_current_rule_check): Warn about
2200 type clashes instead of complaining.
2201 * tests/input.at (Type Clashes): Expect warnings, not complaints.
2202
2203 Add Yacc library, since POSIX requires it.
2204 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
2205 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
2206 * lib/main.c, lib/yyerror.c: New files.
2207
2208 gram_error can be static; it need not be extern.
2209 * src/reader.h (gram_error): Remove decl.
2210 * src/parse-gram.y (gram_error): Now static. Add static decl.
2211 (print_token_value): Omit parameter names from forward decl,
2212 for consistency.
2213
2214 2002-11-29 Paul Eggert <eggert@twinsun.com>
2215
2216 * doc/bison.texinfo: Emphasize that yylex and yyerror must
2217 be declared before being used. E.g., one should typically
2218 declare them in the prologue. Use GNU coding style in examples.
2219 Put "const" consistently after the type it modifies. Mention
2220 that C99 supports "inline". Mention that yyerror traditionally
2221 returns "int".
2222
2223 %parse-param and %lex-param now take just one argument, the
2224 declaration; the argument name is deduced from the declaration.
2225
2226 * doc/bison.texinfo (Parser Function, Pure Calling, Error
2227 Reporting, Table of Symbols): Document this.
2228 * src/parse-gram.y (add_param): New function.
2229 (COMMA): Remove.
2230 (declaration): Implement new rule for %parse-param and %lex-param.
2231 * src/scan-gram.l: "," now elicits a warning, rather than being
2232 a token; this is more compatible with byacc.
2233 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
2234
2235 2002-11-27 Paul Eggert <eggert@twinsun.com>
2236
2237 Rename identifiers to avoid real and potential collisions.
2238
2239 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
2240 to avoid collision with lex macro described by Bruce Lilly in
2241 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
2242 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2243 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
2244 * src/parse-gram.y (print_token_value): Renamed from yyprint.
2245 All uses changed.
2246 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
2247 The name "yycontrol" violates the name space rules, and this stuff
2248 wasn't being used anyway.
2249 (input): Remove action; this stuff wasn't being used.
2250 (gram_error): Rename local variable yylloc -> loc.
2251 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
2252 (YY_DECL): Don't use "yy" at start of local variables.
2253 All uses changed, e.g., yylloc -> loc.
2254 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
2255 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
2256 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
2257 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
2258
2259 * src/parse-gram.y (gram_error): loc is now const *.
2260 * src/reader.h (gram_error): Likewise.
2261
2262 2002-11-24 Paul Eggert <eggert@twinsun.com>
2263
2264 Version 1.75c.
2265
2266 * tests/actions.at (Actions after errors): Use an output format
2267 more similar to that of the Printers and Destructors test.
2268 Test the position of the ';' token too.
2269 (Printers and Destructors): Likewise.
2270 (Printers and Destructors: %glr-parser): Remove for now, to avoid
2271 unnecessarily alarming people when the test fails.
2272
2273 * data/yacc.c (yyerrlab1): Move this label down, so that the
2274 parser does not discard the lookahead token if the user code
2275 invokes YYERROR. This change is required for POSIX conformance.
2276
2277 * lib/error.c: Sync with gnulib.
2278
2279 2002-11-22 Paul Eggert <eggert@twinsun.com>
2280
2281 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
2282 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
2283 * lib/xmalloc.c: Likewise.
2284
2285 2002-11-20 Paul Eggert <eggert@twinsun.com>
2286
2287 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
2288
2289 2002-11-20 Paul Eggert <eggert@twinsun.com>
2290
2291 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
2292 should use `if (! x) abort ();' rather than `assert (x);', and
2293 anyway it's one less thing to worry about configuring.
2294
2295 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
2296 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
2297 and replace all instances of assert with abort.
2298 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2299 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
2300
2301 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
2302 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
2303 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
2304 hash_find_entry, hash_rehash, hash_insert): Likewise.
2305 * src/conflicts.c (resolve_sr_conflict): Likewise.
2306 * src/lalr.c (set_goto_map, map_goto): Likewise.
2307 * src/nullable.c (nullable_compute): Likewise.
2308 * src/output.c (prepare_rules, token_definitions_output): Likewise.
2309 * src/reader.c (packgram, reader): Likewise.
2310 * src/state.c (state_new, state_free, state_transitions_set,
2311 state_reduction_find): Likewise.
2312 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
2313 symbol_pack): Likewise.
2314 * src/tables.c (conflict_row, pack_vector): Likewise.
2315 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
2316 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
2317 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
2318 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
2319
2320 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
2321 (ARGMATCH_CONSTRAINT): New macro.
2322 (ARGMATCH_ASSERT): Use it.
2323
2324 * src/system.h (verify): New macro.
2325 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
2326 rather than assert.
2327 * src/tables.c (tables_generate): Likewise.
2328
2329 * src/struniq.c (struniq_assert): Now returns void, and aborts
2330 if the assertion is false.
2331 (struniq_assert_p): Remove.
2332 * src/struniq.h: Likewise.
2333
2334 2002-11-18 Paul Eggert <eggert@twinsun.com>
2335
2336 * data/glr.c (yygetLRActions): Replace `yyindex' with
2337 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
2338 This fixes the regression with Sun ONE Studio 7 cc that I reported in
2339 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
2340
2341 2002-11-18 Akim Demaille <akim@epita.fr>
2342
2343 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
2344 space.
2345 From Tim Van Holder.
2346
2347 2002-11-17 Paul Eggert <eggert@twinsun.com>
2348
2349 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
2350 to "SyntaxError" for consistency with my 2002-11-15 change.
2351
2352 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
2353 not define to {}, since this breaks the common use of `YYDPRINTF
2354 ((...));' if a single statement is desired (e.g. before `else').
2355 Work around GCC warnings by surrounding corresponding calls with
2356 {} if needed.
2357 (yyhasResolvedValue): Remove unused function.
2358 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
2359 loop body.
2360 (yyreportSyntaxError): Renamed from yyreportParseError.
2361 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
2362 All uses changed.
2363 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
2364 extern when possible. Remove unused initializations.
2365
2366 2002-11-16 Akim Demaille <akim@epita.fr>
2367
2368 Augment the similarity between GLR and LALR traces.
2369
2370 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
2371 (YY_REDUCE_PRINT): New.
2372 (yyparse): Use them.
2373 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
2374 YYDPRINT here.
2375 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
2376 state reached after the reduction/recovery, since...
2377 (yyparse, yyprocessOneStack): Report the state we are entering in.
2378
2379 2002-11-16 Akim Demaille <akim@epita.fr>
2380
2381 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
2382 Add support for --trace=skeleton.
2383 * src/scan-skel.l: %option debug.
2384 Scan strings of non-@ or \n instead of character by character.
2385 (scan_skel): Handle trace_skeleton.
2386 (QPUTS): New.
2387 (@output_parser_name@, @output_header_name@): ``Restore'' their
2388 support (used to be M4 macros).
2389 * data/yacc.c: Quote larger chunks, a la glr.c.
2390 * data/lalr1.cc: Likewise.
2391 The header guards are no longer available, so use some other
2392 string than `YYLSP_NEEDED'.
2393
2394 2002-11-16 Akim Demaille <akim@epita.fr>
2395
2396 Make the ``Printers and Destructors'' test more verbose, taking
2397 `yacc.c''s behavior as (possibly wrong) reference.
2398
2399 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
2400 instead of fprint on stdout.
2401 Set and report the last_line of the symbols.
2402 Consistently display values and locations.
2403
2404 2002-11-16 Paul Eggert <eggert@twinsun.com>
2405
2406 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
2407
2408 2002-11-15 Paul Eggert <eggert@twinsun.com>
2409
2410 * tests/actions.at (Actions after errors): New test case.
2411
2412 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
2413 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
2414 tests/action.at, tests/calc.at, tests/conflicts.at,
2415 tests/cxx-type.at, tests/regression.at:
2416 "parse error" -> "syntax error" for POSIX compatibility.
2417 "parsing stack overflow..." -> "parser stack overflow" so
2418 that code matches Bison documentation.
2419
2420 2002-11-15 Akim Demaille <akim@epita.fr>
2421
2422 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
2423 take two BRACED_CODE, not two string_content.
2424 Free the scanner's obstack when we are done.
2425 (code_content): New.
2426 * tests/calc.at: Adjust.
2427 * doc/bison.texinfo: Adjust.
2428 Also, make sure to include the `,' for these declarations.
2429
2430 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
2431
2432 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
2433 definition; avoids potential autoreconf problems.
2434
2435 2002-11-15 Akim Demaille <akim@epita.fr>
2436
2437 Always check the value returned by yyparse.
2438
2439 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
2440 returned by yyparse.
2441 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
2442 Adjust calls.
2443 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
2444 returned by yyparse.
2445
2446 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2447
2448 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
2449 on input.at test.
2450
2451 2002-11-14 Paul Eggert <eggert@twinsun.com>
2452
2453 * src/output.c (output_skeleton): Call xfopen instead of
2454 duplicating xfopen's body.
2455
2456 Fix bugs reported by Nelson H. F. Beebe in
2457 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
2458
2459 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
2460 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
2461 Group compiler. Instead, use "$CC -E bar.c". Include the .h
2462 file twice in the grammar, as an extra check.
2463
2464 * tests/input.at (Torturing the Scanner): Surround the
2465 backslash-newline tests with "#if 0", to make it less likely that
2466 we'll run into compiler bugs. Bring back solitary \ inside
2467 comment, but add a closing comment to work around HP C bug. Don't
2468 test backslash-newline in C character constant.
2469
2470 2002-11-14 Akim Demaille <akim@epita.fr>
2471
2472 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
2473 status of the compiler.
2474 Calling `exit 1' is no longer needed.
2475 Reported by Nelson H. F. Beebe.
2476
2477 2002-11-14 Akim Demaille <akim@epita.fr>
2478
2479 * tests/atlocal.in (CPPFLAGS): We have config.h.
2480 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
2481 New.
2482 * tests/actions.at, tests/calc.at, tests/conflicts.at,
2483 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
2484 * tests/regression.at, tests/torture.at: Use them for all the
2485 grammars that are to be compiled.
2486 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
2487 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
2488 * doc/bison.texinfo (GLR Parsers): Document `inline'.
2489
2490 2002-11-14 Akim Demaille <akim@epita.fr>
2491
2492 * doc/bison.texinfo: Various formatting changes (alignments in
2493 samples, additional @group/@end group, GCS in samples.
2494 Use @deffn instead of simple @table to define the directives,
2495 macros, variables etc.
2496
2497 2002-11-13 Paul Eggert <eggert@twinsun.com>
2498
2499 Fix some bugs reported by Albert Chin-A-Young in
2500 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
2501
2502 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
2503 -o c"; the HP C compiler chatters during compilation.
2504 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
2505 * tests/headers.at (export YYLTYPE): Likewise.
2506
2507 * tests/input.at (Torturing the Scanner): Remove lines containing
2508 solitary backslashes, as they tickle a bug in the HP C compiler.
2509
2510 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
2511 comments, since they're not portable. Use GNU coding style.
2512
2513 2002-11-13 Akim Demaille <akim@epita.fr>
2514
2515 * data/yacc.c: Leave bigger chunks of quoted text.
2516 (YYDSYMPRINTF): New.
2517 Use it to report symbol activities.
2518 * data/glr.c (YYDSYMPRINTF): New.
2519 Use it.
2520
2521 2002-11-12 Paul Eggert <eggert@twinsun.com>
2522
2523 Version 1.75b.
2524
2525 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
2526 (yyglrReduce): Return yyok, not 0.
2527 This should avoid the enumerated-type warnings reported
2528 by Nelson H. F. Beebe in
2529 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
2530
2531 * lib/bbitset.h (BITSET_INLINE): Remove.
2532 * lib/bitset.h [! BITSET_INLINE]: Remove.
2533 (bitset_set, bitset_reset, bitset_test): Rename local vars
2534 to avoid shadowing warnings by GCC.
2535
2536 * data/glr.c (inline): Remove #define. It's the user's
2537 responsibility to #define it away, just like 'const'.
2538 This fixes one of the bugs reported by Nelson H. F. Beebe in
2539 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
2540
2541 * Makefile.maint (po-check): Scan .l and .y files instead of the
2542 .c and the .h files that they generate. This fixes the bug
2543 reported by Tim Van Holder in:
2544 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
2545 Look for N_ as well as for _. Try to avoid matching #define for
2546 N_ and _.
2547 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
2548 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
2549 * src/scan-gram.l: Revamp regular expressions so that " and '
2550 do not confuse xgettext.
2551
2552 * src/struniq.h (struniq_new): Do not declare the return type
2553 to be 'const'; this violates the C standard.
2554 * src/struniq.c (struniq_new): Likewise.
2555
2556 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
2557
2558 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
2559 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
2560 linker.
2561
2562 2002-11-12 Akim Demaille <akim@epita.fr>
2563
2564 * Makefile.maint: Sync with Autoconf:
2565 (local_updates): New.
2566
2567 2002-11-12 Akim Demaille <akim@epita.fr>
2568
2569 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
2570
2571 2002-11-12 Akim Demaille <akim@epita.fr>
2572
2573 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
2574 locations.
2575
2576 2002-11-12 Akim Demaille <akim@epita.fr>
2577
2578 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
2579 not yyvalue.
2580
2581 2002-11-12 Akim Demaille <akim@epita.fr>
2582
2583 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
2584 Use it to test the GLR parser.
2585
2586 2002-11-12 Akim Demaille <akim@epita.fr>
2587
2588 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
2589 defines it.
2590 * data/glr.c (yystos): New.
2591 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
2592 (YYDSYMPRINT): New.
2593 (yyval): Don't define it, it is handled via M4.
2594 (yyrecoverParseError): Free verbosely the discarded symbols.
2595 * data/yacc.c (yysymprint): Remove, rather...
2596 (b4_yysymprint_generate): invoke.
2597 * data/c.m4 (b4_yysymprint_generate): New.
2598 Accept pointers as arguments, as opposed to the version from
2599 yacc.c.
2600 (b4_yydestruct_generate): Likewise.
2601 * tests/cations.at (Printers and Destructors): Use Bison directives
2602 instead of CPP macros.
2603 Don't rely on internal details.
2604
2605 2002-11-12 Akim Demaille <akim@epita.fr>
2606
2607 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
2608 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
2609 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
2610 it against YYEMPTY and so forth), work on yytoken (i.e., set
2611 it to YYEMPTY etc.).
2612 (yydestruct): Replace with a b4_yydestruct_generate invocation.
2613 (b4_symbol_actions): Remove.
2614 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
2615 for 0, end-of-input.
2616
2617 2002-11-12 Akim Demaille <akim@epita.fr>
2618
2619 * doc/bison.texinfo (Destructor Decl): New.
2620
2621 2002-11-12 Akim Demaille <akim@epita.fr>
2622
2623 * src/tables.c (tables_generate): Use free for pointers that
2624 cannot be NULL, not XFREE.
2625 (pack_vector): Use assert, not fatal, for bound violations.
2626 * src/state.c (state_new): Likewise.
2627 * src/reader.c (reader): Likewise.
2628 * src/lalr.c (set_goto_map): Likewise.
2629 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
2630 the file name.
2631
2632 2002-11-12 Akim Demaille <akim@epita.fr>
2633
2634 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2635 Restore.
2636 * src/scan-gram.l (last_string): Is global to the file, not to
2637 yylex.
2638 * src/parse-gram.y (input): Don't append the epilogue here,
2639 (epilogue.opt): do it here, and free the scanner's obstack.
2640 * src/reader.c (epilogue_set): Rename as...
2641 (epilogue_augment): this.
2642 * data/c.m4 (b4_epilogue): Defaults to empty.
2643
2644 2002-11-12 Akim Demaille <akim@epita.fr>
2645
2646 * src/getargs.c (long_options): Remove duplicates.
2647 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2648 Remove.
2649 * doc/bison.rnh: Remove.
2650 * doc/bison.texinfo (VMS Invocation): Remove.
2651
2652 2002-11-12 Akim Demaille <akim@epita.fr>
2653
2654 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2655 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2656
2657 Use struniq for symbols.
2658
2659 * src/symtab.h (symbol_t): The tag member is a struniq.
2660 (symbol_type_set): Adjust.
2661 * src/symtab.c (symbol_new): Takes a struniq.
2662 (symbol_free): Don't free the tag member.
2663 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2664 (hash_compare_symbol, hash_symbol): these.
2665 Use the fact that tags as struniqs.
2666 (symbol_get): Use struniq_new.
2667 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2668 Returns a strniq.
2669 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2670 and type members are struniqs.
2671 * src/reader.c (get_merge_function)
2672 (grammar_current_rule_merge_set): Adjust.
2673 (TYPE, current_type): Are struniq.
2674
2675 Use struniq for file names.
2676
2677 * src/files.h, src/files.c (infile): Split into...
2678 (grammar_file, current_file): these.
2679 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2680 * src/reduce.c (reduce_print): Likewise.
2681 * src/getargs.c (getargs): Likewise.
2682 * src/complain.h, src/complain.c: Likewise.
2683 * src/main.c (main): Call struniqs_new early enough to use it for
2684 file names.
2685 Don't free the input file name.
2686
2687 2002-11-12 Akim Demaille <akim@epita.fr>
2688
2689 * src/symtab.c (symbol_free): Remove dead deactivated code:
2690 type_name are properly removed.
2691 Don't use XFREE to free items that cannot be NULL.
2692 * src/struniq.h, src/struniq.c: New.
2693 * src/main.c (main): Initialize/free struniqs.
2694 * src/parse-gram.y (%union): Add astruniq member.
2695 (yyprint): Adjust.
2696 * src/scan-gram.l (<{tag}>): Return a struniq.
2697 Free the obstack bit that used to store it.
2698 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2699
2700 2002-11-11 Paul Eggert <eggert@twinsun.com>
2701
2702 Revamp to fix many (but not all) of the C- and M4-related quoting
2703 problems. Among other things, this fixes the Bison bug reported
2704 by Jan Hubicka when processing the Bash grammar; see:
2705 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
2706
2707 Use new @ escapes consistently. Represent brackets with @{ and @}
2708 rather than @<:@ and @:>@, since this works a bit better with dumb
2709 editors like vi. Represent @ with @@, since @ is now consistently
2710 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2711 __ofile__, to avoid unexpected expansions. Similarly, use @output
2712 rather than #output.
2713
2714 * data/c.m4 (b4_copyright): Omit file name from comment, since
2715 the file name could contain "*/".
2716 (b4_synclines_flag): Don't quote the 2nd argument; it should already
2717 be quoted. All uses changed.
2718
2719 * data/glr.c: Use new @ escapes consistently.
2720 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
2721 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
2722 Remove, since they couldn't handle arbitrary characters in file
2723 names.
2724 * data/lalr1.cc: Likewise.
2725 * data/yacc.c: Likewise.
2726
2727 * src/files.c (output_infix): Remove; all uses removed.
2728 * src/files.h: Likewise.
2729
2730 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
2731 mishandled funny characters in file names, and anyway it isn't
2732 needed any more.
2733 * data/yacc.c: Likewise.
2734 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
2735
2736 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
2737 * data/yacc.c: Likewise.
2738
2739 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
2740 strings now.
2741 (muscle_init): Quote filename as a C string.
2742 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
2743 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
2744 * src/output.c (escaped_file_name_output): New function.
2745 (prepare_symbols): Quote tokens for M4.
2746 (prepare): Don't insert output_infix, output_prefix,
2747 output_parser_name, output_header_name; this is now down by scan-skel.
2748 Insert skeleton as a C string.
2749
2750 * src/output.c (user_actions_output, symbol_destructors_output,
2751 symbol_printers_output): Quote filenames for C and M4.
2752 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2753
2754 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
2755 escapes other than \\ and \'; this simplifies the code.
2756 (<SC_STRING>): Likewise, for \\ and \".
2757 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
2758 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
2759 Use new escapes @{ and @} for [ and ].
2760
2761 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
2762 them with auto vars.
2763 Switch to new escape scheme, where @ is the escape character uniformly.
2764 Abort if a stray escape character is found. Avoid unbounded input
2765 buffer when parsing non-escaped text.
2766
2767 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
2768 __oline__, #output, $@, and @{ do not have unintended meanings.
2769
2770 2002-11-09 Paul Eggert <eggert@twinsun.com>
2771
2772 Fix the test failure due to GCC warnings described in
2773 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
2774 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
2775 evaluate to 0 if it's impossible for NINF to be in the respective
2776 table.
2777 (yygetLRActions, yyrecoverParseError): Use them.
2778
2779 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
2780 counted in the token inserted at end of file. Now takes
2781 location_t *, not location_t, so that the location can be
2782 adjusted. All uses changed.
2783
2784 * tests/regression.at (Invalid inputs): Adjust wording in
2785 diagnostic to match the new behavior.
2786
2787 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
2788 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
2789 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
2790 abort ();'. This reduces the runtime of the "Many lookaheads"
2791 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
2792 GCC 3.2.
2793
2794 2002-11-07 Paul Eggert <eggert@twinsun.com>
2795
2796 * src/parse-gram.y (CHARACTER): Remove unused token.
2797 All uses removed.
2798
2799 * src/scan-gram.l: Remove stack option. We no longer use the
2800 stack, since the stack was never deeper than 1; instead, use the
2801 new auto var c_context to record the stacked value.
2802
2803 Remove nounput option. At an unexpected end of file, we now unput
2804 the minimal input necessary to end cleanly; this simplifies the
2805 code.
2806
2807 Avoid unbounded token sizes where this is easy.
2808
2809 (unexpected_end_of_file): New function.
2810 Use it to systematize the error message on unexpected EOF.
2811 (last-string): Now auto, not static.
2812 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
2813 (scanner_last_string_free): Remove; not used.
2814 (percent_percent_count): Move decl to just before use.
2815 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
2816 not the (never otherwised-used) CHARACTER.
2817
2818 2002-11-07 Akim Demaille <akim@epita.fr>
2819
2820 Let yyerror always receive the msg as last argument, so that
2821 yyerror can be variadic.
2822
2823 * data/yacc.c (b4_yyerror_args): New.
2824 Use it when calling yyerror.
2825 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
2826 Use it when calling yyerror.
2827 * doc/bison.texinfo (Error Reporting): Adjust.
2828 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
2829 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
2830
2831 2002-11-06 Akim Demaille <akim@epita.fr>
2832
2833 #line should have quoted strings.
2834 Ideally, this should be done by m4_quotearg.
2835
2836 * src/scan-skel.l: Include quotearg.h.
2837 Quote __ofile__.
2838 * src/output.c (symbol_printers_output)
2839 (symbol_destructors_output): Quote the file name.
2840
2841 2002-11-06 Akim Demaille <akim@epita.fr>
2842
2843 * tests/regression.at (Invalid inputs): Adjust to the recent
2844 messages.
2845
2846 2002-11-06 Akim Demaille <akim@epita.fr>
2847
2848 Restore --no-lines.
2849 Reported by Jim Kent.
2850
2851 * data/c.m4 (b4_syncline): New.
2852 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
2853 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
2854 * src/output.c (user_actions_output): Likewise.
2855 (prepare): Define 'b4_synclines_flag'.
2856 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
2857
2858 2002-11-06 Akim Demaille <akim@epita.fr>
2859
2860 * src/main.c (main): Free `infile'.
2861 * src/scan-gram.l (handle_syncline): New.
2862 Recognize `#line'.
2863 * src/output.c (user_actions_output, symbol_destructors_output)
2864 (symbol_printers_output): Use the location's file name, not
2865 infile.
2866 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2867
2868 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2869
2870 * src/tables.c (matching_state): Don't allow states to match if
2871 either has GLR conflict entries.
2872
2873 2002-11-05 Paul Eggert <eggert@twinsun.com>
2874
2875 * src/scan-gram.l: Use more accurate diagnostics, e.g.
2876 "integer out of range" rather than "invalid value".
2877 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
2878 accordingly.
2879
2880 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
2881 Also, remove one static variable in the scanner.
2882
2883 * src/scan-gram.l (braces_level): Now auto, not static.
2884 Initialize to zero if the compiler is being picky.
2885 (INITIAL): Clear braces_level instead of incrementing it.
2886 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
2887 as POSIX 1003.1-2001 requires.
2888 * src/system.h (IF_LINT): New macro, taken from coreutils.
2889 * configure.ac: Define "lint" if --enable-gcc-warnings.
2890
2891 2002-11-05 Akim Demaille <akim@epita.fr>
2892
2893 * src/scan-gram.l: When it starts with `%', complain about the
2894 whole directive, not just that `invalid character: %'.
2895
2896 2002-11-04 Akim Demaille <akim@epita.fr>
2897
2898 * Makefile.maint: Update from Autoconf.
2899 (update, cvs-update, po-update, do-po-update): New.
2900
2901 2002-11-04 Akim Demaille <akim@epita.fr>
2902
2903 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
2904 and yyerror.
2905 Have yyerror `use' its arguments.
2906 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
2907 returns true when location & yacc & pure & parse-param.
2908 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
2909
2910 2002-11-04 Akim Demaille <akim@epita.fr>
2911
2912 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
2913 clashes.
2914 * src/scan-gram.l: Use [\'] instead of ['] to pacify
2915 font-lock-mode.
2916 Use complain_at.
2917 Use quote, not quote_n since LOCATION_PRINT no longer uses the
2918 slot 0.
2919
2920 2002-11-03 Paul Eggert <eggert@twinsun.com>
2921
2922 * src/reader.c (get_merge_function, grammar_current_rule_check):
2923 Use consistent diagnostics for reporting type name clashes.
2924 Quote the types with <>, for consistency with Yacc.
2925 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
2926
2927 2002-11-03 Akim Demaille <akim@epita.fr>
2928
2929 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
2930 New.
2931 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
2932 (b4_parse_param): Remove.
2933 Use b4_identification.
2934 Propagate b4_pure_args where needed to pass them to yyerror.
2935 * data/glr.m4 (b4_parse_param): Remove.
2936 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
2937 (b4_lpure_formals): New.
2938 Use b4_identification.
2939 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
2940 b4_user_formals and b4_user_args.
2941 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
2942 (yyreportAmbiguity): When using a pure parser, also need
2943 the location, and the parse-params.
2944 Adjust callers.
2945 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
2946 When using a pure parser, also need the parse-params.
2947 Adjust callers.
2948 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
2949 (%pure-parser + %parse-param) LALR and GLR parsers.
2950 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
2951 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
2952 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
2953 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
2954 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
2955 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
2956 * doc/bison.texinfo: Untabify the whole file.
2957 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
2958 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
2959 (Error Reporting): Adjust to these new directives.
2960 Document %error-verbose, deprecate YYERROR_VERBOSE.
2961
2962 2002-11-03 Akim Demaille <akim@epita.fr>
2963
2964 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
2965 AT_CHECK_CALC_GLR invocations to use % directives, instead of
2966 command line options.
2967 * tests/cxx-type.at: Formatting changes.
2968
2969 2002-11-03 Paul Eggert <eggert@twinsun.com>
2970
2971 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
2972 to count columns correctly, and to check for invalid inputs.
2973
2974 Use mbsnwidth to count columns correctly. Account for tabs, too.
2975 Include mbswidth.h.
2976 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
2977 (extend_location): New function.
2978 (YY_LINES): Remove.
2979
2980 Handle CRLF in C code rather than in Lex code.
2981 (YY_INPUT): New macro.
2982 (no_cr_read): New function.
2983
2984 Scan UCNs, even though we don't fully handle them yet.
2985 (convert_ucn_to_byte): New function.
2986
2987 Handle backslash-newline correctly in C code.
2988 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
2989 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
2990 all uses changed.
2991 (tag, splice): New EREs. Do not allow NUL or newline in tags.
2992 Use {splice} wherever C allows backslash-newline.
2993 YY_STEP after space, newline, vertical-tab.
2994 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
2995
2996 (letter, id): Don't assume ASCII; e.g., spell out a-z.
2997
2998 ({int}, handle_action_dollar, handle_action_at): Check for integer
2999 overflow.
3000
3001 (YY_STEP): Omit trailing semicolon, so that it's more like C.
3002
3003 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
3004 as well as \000. Check for UCHAR_MAX, not 255.
3005 Allow \x with an arbitrary positive number of digits, as in C.
3006 Check for overflow here.
3007 Allow \? and UCNs, for compatibility with C.
3008
3009 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
3010 with quote slot used by complain_at.
3011
3012 * tests/input.at: Add tests for backslash-newline, m4 quotes
3013 in symbols, long literals, and funny escapes in strings.
3014
3015 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
3016 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
3017 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
3018 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
3019 * m4/mbswidth.m4: New file, from GNU coreutils.
3020
3021 * doc/bison.texinfo (Grammar Outline): Document // comments.
3022 (Symbols): Document that trigraphs have no special meaning in Bison,
3023 nor is backslash-newline allowed.
3024 (Actions): Document that trigraphs have no special meaning.
3025
3026 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
3027 no longer used.
3028
3029 2002-11-02 Paul Eggert <eggert@twinsun.com>
3030
3031 * src/reader.c: Don't include quote.h; not needed.
3032 (get_merge_function): Reword warning to be consistent with
3033 type clash diagnostic in grammar_current_rule_check.
3034
3035 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
3036 bug in trigraph handling.
3037
3038 * src/output.c (prepare_symbols): When printing token names,
3039 escape "[" as "@<:@" and likewise for "]".
3040
3041 * src/system.h (errno): Remove declaration, as we are now
3042 assuming C89 or better, and C89 guarantees errno.
3043
3044 2002-10-30 Paul Eggert <eggert@twinsun.com>
3045
3046 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
3047 Check for close failures.
3048 * src/files.h (xfclose): Return void, not int, since it always
3049 returned zero.
3050 * src/files.c (xfclose): Likewise. Report I/O error if ferror
3051 indicates one.
3052 * src/output.c (output_skeleton): Use xfclose rather than fclose
3053 and ferror. xfclose now checks ferror.
3054
3055 * data/glr.c (YYLEFTMOST_STATE): Remove.
3056 (yyreportTree): Use a stack-based leftmost state. This avoids
3057 our continuing battles with bogus warnings about initializers.
3058
3059 2002-10-30 Akim Demaille <akim@epita.fr>
3060
3061 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
3062 #if.
3063
3064 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3065
3066 * tests/glr-regr1.at: New test for reported regressions.
3067 * tests/testsuite.at: Add glr-regr1.at test.
3068 * tests/Makefile.am: Add glr-regr1.at test.
3069
3070 2002-10-24 Paul Eggert <eggert@twinsun.com>
3071
3072 Version 1.75a.
3073
3074 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
3075 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
3076 we use malloc. Don't assume 'A' through 'Z' are contiguous.
3077 Don't assume strdup exists; POSIX says its an XSI extension.
3078 Check for buffer overflow on input.
3079
3080 2002-10-24 Akim Demaille <akim@epita.fr>
3081
3082 * src/output.c (output_skeleton): Don't disable M4sugar comments
3083 too soon: it results in comments being expanded.
3084 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
3085 first output.
3086
3087 2002-10-24 Akim Demaille <akim@epita.fr>
3088
3089 * data/yacc.c (m4_int_type): New.
3090 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
3091 char' as only yacc.c wants K&R portability.
3092 * data/glr.c (yysigned_char): Remove.
3093 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
3094 Reported by Quoc Peyrot.
3095
3096 2002-10-23 Paul Eggert <eggert@twinsun.com>
3097
3098 * src/main.c (main): With --trace=time, report times even if a
3099 non-fatal error occurs. Formerly, the times were reported in some
3100 such cases but not in others.
3101 * src/reader.c (reader): Just return if a complaint has been issued,
3102 instead of exiting, so that 'main' can report times.
3103
3104 2002-10-22 Akim Demaille <akim@epita.fr>
3105
3106 * src/system.h: Include sys/types.
3107 Reported by Bert Deknuydt.
3108
3109 2002-10-23 Paul Eggert <eggert@twinsun.com>
3110
3111 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
3112 Suggested by Art Haas.
3113
3114 2002-10-22 Paul Eggert <eggert@twinsun.com>
3115
3116 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
3117 decl; not needed any more.
3118 * src/main.c (main): Use return to exit, undoing yesterday's change.
3119 The last OS that we could find where this wouldn't work is
3120 SunOS 3.5, and that's too old to worry about now.
3121
3122 * data/glr.c (struct yyltype): Define members even when not
3123 doing locations. This is more consistent with yacc.c, and it
3124 works around the following bug reports:
3125 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
3126 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
3127
3128 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
3129 @acronym consistently. Standardize on "Yacc" instead of "YACC",
3130 "Algol" instead of "ALGOL". Give a bit more history about BNF.
3131
3132 2002-10-22 Akim Demaille <akim@epita.fr>
3133
3134 * data/README: New.
3135
3136 2002-10-21 Paul Eggert <eggert@twinsun.com>
3137
3138 Be consistent about 'bool'; the old code used an enum in one
3139 module and an int in another, and this violates the C standard.
3140 * m4/stdbool.m4: New file, from coreutils 4.5.3.
3141 * configure.ac (AC_HEADER_STDBOOL): Add.
3142 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
3143 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
3144 * src/symtab.c (hash_compare_symbol_t): Likewise.
3145 * src/system.h (bool, false, true): Use a definition consistent
3146 with ../lib/hash.c. All uses changed.
3147
3148 * src/complain.c (warning_issued): Renamed from warn_message_count,
3149 so that we needn't worry about integer overflow (!).
3150 Now of type bool. All uses changed.
3151 (complaint_issued): Renamed from complain_message_count; likewise.
3152
3153 * src/main.c (main): Use exit to exit with failure.
3154
3155 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
3156 rather than 1 and 0.
3157 * src/main.c (main): Likewise.
3158 * src/getargs.c (getargs): Likewise.
3159 * src/reader.c (reader): Likewise.
3160
3161 * src/getarg.c (getargs): Remove duplicate code for
3162 "Try `bison --help'".
3163
3164 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
3165 What was that "2" for?
3166
3167 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
3168 * src/getargs.c (usage): Likewise.
3169
3170 * src/getargs.c (getargs): When there are too few operands, report
3171 the last one. When there are too many, report the first extra
3172 one. This is how diffutils does it.
3173
3174 2002-10-20 Paul Eggert <eggert@twinsun.com>
3175
3176 Remove K&R vestiges.
3177 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
3178 * src/complain.c (VA_START): Remove. Assume prototypes.
3179 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
3180 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
3181 fatal): Assume prototypes.
3182 * src/complain.h: Assume prototypes.
3183 * src/system.h (PARAMS): Remove.
3184 Include <limits.h> unconditionally, since it's guaranteeed even
3185 for a freestanding C89 compiler.
3186 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
3187 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
3188
3189 2002-10-20 Akim Demaille <akim@epita.fr>
3190
3191 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
3192 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
3193 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
3194 (yyresolveStates, yyresolveAction, yyresolveStack)
3195 (yyprocessOneStack): Use them.
3196 (yy_reduce_print): New.
3197 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
3198
3199 2002-10-20 Akim Demaille <akim@epita.fr>
3200
3201 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
3202 arguments and output `void'.
3203 (b4_c_function): Rename as...
3204 (b4_c_function_def): this.
3205 (b4_c_function_decl, b4_c_ansi_function_def)
3206 (b4_c_ansi_function_decl): New.
3207 Change the interpretation of the arguments: before `int, foo', now
3208 `int foo, foo'.
3209 * data/yacc.c (yyparse): Prototype and define thanks to these.
3210 Adjust b4_c_function_def uses.
3211 * data/glr.c (yyparse): Likewise, but ANSI only.
3212
3213 2002-10-20 Akim Demaille <akim@epita.fr>
3214
3215 * src/output.c (prepare): Move the definition of `tokens_number',
3216 `nterms_number', `undef_token_number', `user_token_number_max'
3217 to...
3218 (prepare_tokens): Here.
3219 (prepare_tokens): Rename as...
3220 (prepare_symbols): this.
3221 (prepare): Move the definition of `rules_number' to...
3222 (prepare_rules): here.
3223 (prepare): Move the definition of `last', `final_state_number',
3224 `states_number' to...
3225 (prepare_states): here.
3226 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
3227
3228 2002-10-20 Akim Demaille <akim@epita.fr>
3229
3230 * src/tables.h, src/tables.c, src/output.c: Comment changes.
3231
3232 2002-10-20 Akim Demaille <akim@epita.fr>
3233
3234 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
3235 * data/c.m4: here.
3236
3237 2002-10-20 Akim Demaille <akim@epita.fr>
3238
3239 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
3240 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
3241 `pair'.
3242 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
3243 `name' to...
3244 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
3245 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
3246 These.
3247
3248 2002-10-19 Paul Eggert <eggert@twinsun.com>
3249
3250 Do not create a temporary file, as that involves security and
3251 cleanup headaches. Instead, use a pair of pipes.
3252 Derived from a suggestion by Florian Krohm.
3253 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
3254 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
3255 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
3256 (BISON_PREREQ_SUBPIPE): Add.
3257 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
3258 Add subpipe.h, subpipe.c.
3259 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
3260 * po/POTFILES.in: Add lib/subpipe.c.
3261 * src/output.c: Include "subpipe.h".
3262 (m4_invoke): Remove decl.
3263 (scan_skel): New decl.
3264 (output_skeleton): Use pipe rather than temporary file for m4 input.
3265 Check that m4sugar.m4 is readable, to avoid deadlock.
3266 Check for pipe I/O error.
3267 * src/scan-skel.l (readpipe): Remove decl.
3268 (scan_skel): New function, to be used in place of m4_invoke.
3269 Read from stream rather than file.
3270
3271 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
3272 float, as this generates a warning on Solaris 8 + GCC 3.2 with
3273 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
3274 this generates a more-accurate value anyway.
3275
3276 * lib/timevar.c (timervar_accumulate): Rename locals to
3277 avoid confusion with similarly-named more-global.
3278 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
3279
3280 * src/output.c (prepare): Use xstrdup to convert char const *
3281 to char *, to avoid GCC warning.
3282
3283 2002-10-19 Akim Demaille <akim@epita.fr>
3284
3285 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
3286 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
3287 Use them to have `calc.y' ready for %pure-parser.
3288 * data/yacc.c (YYLEX): Pass a yylex return type to
3289 b4_c_function_call.
3290
3291 2002-10-19 Akim Demaille <akim@epita.fr>
3292
3293 Prototype support of %lex-param and %parse-param.
3294
3295 * src/parse-gram.y: Add the definition of the %lex-param and
3296 %parse-param tokens, plus their rules.
3297 Drop the `_' version of %glr-parser.
3298 Add the "," token.
3299 * src/scan-gram.l (INITIAL): Scan them.
3300 * src/muscle_tab.c: Comment changes.
3301 (muscle_insert, muscle_find): Rename `pair' as `probe'.
3302 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
3303 (muscle_entry_s): The `value' member is no longer const.
3304 Adjust all dependencies.
3305 * src/muscle_tab.c (muscle_init): Adjust: use
3306 MUSCLE_INSERT_STRING.
3307 Initialize the obstack earlier.
3308 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
3309 (muscle_pair_list_grow): New.
3310 * data/c.m4 (b4_c_function_call, b4_c_args): New.
3311 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
3312 * tests/calc.at: Use %locations, not --locations.
3313 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
3314
3315 2002-10-19 Akim Demaille <akim@epita.fr>
3316
3317 * src/getargs.c (usage): Take status as argument and exit
3318 accordingly.
3319 Report the traditional `Try ... --help' message when status != 0.
3320 (usage, version): Don't take a FILE * as arg, it is pointless.
3321 (getargs): When there is an incorrect number of arguments, make it
3322 an error, and report it GNUlically thanks to `usage ()'.
3323
3324 2002-10-18 Paul Eggert <eggert@twinsun.com>
3325
3326 * data/glr.c (yyreportParseError): Don't assume that sprintf
3327 yields the length of the printed string, as this is not true
3328 on SunOS 4.1.4. Reported by Peter Klein.
3329
3330 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
3331 * tests/conflicts.at (%nonassoc and eof): Likewise.
3332 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
3333
3334 2002-10-17 Akim Demaille <akim@epita.fr>
3335
3336 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
3337 * src/getargs.c (trace_types, trace_args): Adjust.
3338 * src/reader.c (grammar_current_rule_prec_set)
3339 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
3340 Standardize error messages.
3341 And s/@prec/%prec/!
3342 (reader): Use trace_flag to enable scanner/parser debugging,
3343 instead of an adhoc scheme.
3344 * src/scan-gram.l: Remove trailing debugging code.
3345
3346 2002-10-16 Paul Eggert <eggert@twinsun.com>
3347
3348 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
3349 MUSCLE_TAB_H.
3350
3351 * NEWS: Officially drop support for building Bison with K&R C,
3352 since it didn't work anyway and it's not worth worrying about.
3353 * Makefile.maint (wget_files): Remove ansi2knr.c.
3354 (ansi2knr.c-url_prefix): Remove.
3355 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
3356 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3357 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3358
3359 2002-10-15 Paul Eggert <eggert@twinsun.com>
3360
3361 Stop using the "enum_" trick for K&R-style function definitions;
3362 it confused me, and I was the author! Instead, assume that people
3363 who want to use K&R C compilers (when using these modules in GCC,
3364 perhaps?) will run ansi2knr.
3365
3366 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
3367 All uses of "enum_" changed to "enum ".
3368 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3369 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3370
3371 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
3372 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
3373 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
3374 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
3375 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
3376 abitset_not, abitset_ones, abitset_or, abitset_or_and,
3377 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
3378 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
3379 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
3380 Use function prototypes; this removes the need for declaring
3381 static functions simply to provide their prototypes.
3382 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
3383 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
3384 bitset_count_, bitset_create, bitset_dump, bitset_first,
3385 bitset_free, bitset_init, bitset_last, bitset_next,
3386 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
3387 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
3388 bitset_print, bitset_release_memory, bitset_toggle_,
3389 bitset_type_choose, bitset_type_get, bitset_type_name_get,
3390 debug_bitset): Likewise.
3391 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
3392 * lib/bitset_stats.c (bitset_log_histogram_print,
3393 bitset_percent_histogram_print, bitset_stats_and,
3394 bitset_stats_and_cmp, bitset_stats_and_or,
3395 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
3396 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
3397 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
3398 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
3399 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
3400 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
3401 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
3402 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
3403 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
3404 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
3405 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
3406 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
3407 bitset_stats_zero): Likewise.
3408 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3409 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3410 bitsetv_dump, debug_bitsetv): Likewise.
3411 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
3412 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
3413 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
3414 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
3415 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
3416 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
3417 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
3418 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
3419 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
3420 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
3421 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
3422 Likewise.
3423 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
3424 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
3425 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
3426 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
3427 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
3428 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
3429 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
3430 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
3431 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
3432 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
3433 lbitset_xor_cmp, lbitset_zero): Likewise.
3434
3435 2002-10-14 Akim Demaille <akim@epita.fr>
3436
3437 Version 1.75.
3438
3439 2002-10-14 Akim Demaille <akim@epita.fr>
3440
3441 * tests/Makefile.am (maintainer-check-posix): New.
3442
3443 2002-10-14 Akim Demaille <akim@epita.fr>
3444
3445 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
3446 member.
3447
3448 2002-10-14 Akim Demaille <akim@epita.fr>
3449
3450 * src/tables.c (table_ninf_remap): base -> tab.
3451 Reported by Matt Rosing.
3452
3453 2002-10-14 Paul Eggert <eggert@twinsun.com>
3454
3455 * tests/action.at, tests/calc.at, tests/conflicts.at,
3456 tests/cxx-type.at, tests/headers.at, tests/input.at,
3457 tests/regression.at, tests/synclines.at, tests/torture.at:
3458 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
3459 so that the tests still work even if POSIXLY_CORRECT is set.
3460 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
3461
3462 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
3463 for portability to K&R hosts. Fix typo: signed char is guaranteed
3464 only to 127, not to 128.
3465 * data/glr.c (yysigned_char): New type.
3466 * data/yacc.c (yysigned_char): Likewise.
3467 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
3468
3469 2002-10-13 Paul Eggert <eggert@twinsun.com>
3470
3471 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
3472 true due to limited range of data type" warning from GCC.
3473
3474 * data/c.m4 (b4_token_defines): Protect against double-inclusion
3475 by wrapping enum yytokentype's definition inside #ifndef
3476 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
3477
3478 2002-10-13 Akim Demaille <akim@epita.fr>
3479
3480 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
3481 Un yy- yyrhs to avoid the name clash with the global YYRHS.
3482
3483 2002-10-13 Akim Demaille <akim@epita.fr>
3484
3485 * Makefile.maint: Update from Autoconf 2.54.
3486 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
3487
3488 2002-10-13 Akim Demaille <akim@epita.fr>
3489
3490 * src/print.c (print_state): Separate the list of solved conflicts
3491 from the other items.
3492 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
3493
3494 2002-10-13 Akim Demaille <akim@epita.fr>
3495
3496 Let nondeterministic skeletons be usable with deterministic
3497 tables.
3498
3499 With the patch, GAWK compiled by GCC without -O2 passes its test
3500 suite using a GLR parser driven by LALR tables. It fails with -O2
3501 because `struct stat' gives two different answers on my machine:
3502 88 (definition of an auto var) and later 96 (memset on this var).
3503 Hence the stack is badly corrumpted. The headers inclusion is to
3504 blame: if I move the awk.h inclusion before GLR's system header
3505 inclusion, the two struct stat have the same size.
3506
3507 * src/tables.c (pack_table): Always create conflict_table.
3508 (token_actions): Always create conflict_list.
3509 * data/glr.c (YYFLAG): Remove, unused.
3510
3511 2002-10-13 Akim Demaille <akim@epita.fr>
3512
3513 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
3514 (O0FLAGS): New.
3515 (VALGRIND, GXX): New.
3516 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
3517 * tests/bison.in: Run $PREBISON a pre-command.
3518 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
3519 (maintainer-check-g++): New.
3520 * Makefile.am (maintainer-check): New.
3521
3522 2002-10-13 Akim Demaille <akim@epita.fr>
3523
3524 * data/glr.c: Formatting changes.
3525 Tweak some trace messages to match yacc.c's.
3526
3527 2002-10-13 Akim Demaille <akim@epita.fr>
3528
3529 GLR parsers sometimes raise parse errors instead of performing the
3530 default reduction.
3531 Reported by Charles-Henry de Boysson.
3532
3533 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
3534 check the length of the traces when %glr.
3535 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
3536 GLR's traces.
3537 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
3538 Test GLR parsers.
3539 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
3540 (yyltype): Remove the yy prefix from the member names.
3541 (yytable): Complete its comment.
3542 (yygetLRActions): Map error action number from YYTABLE from
3543 YYTABLE_NINF to 0.
3544 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
3545 (which was a bug: it should have been YYTABEL_NINF, and yet it was
3546 not satisfying as we could compare an YYACTION computed from
3547 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
3548 only value for error actions.
3549 (yyreportParseError): In verbose parse error messages, don't issue
3550 `error' in the list of expected tokens.
3551 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
3552 next action to perform to match glr.c's decoding.
3553 (yytable): Complete its comment.
3554
3555 2002-10-13 Paul Eggert <eggert@twinsun.com>
3556
3557 Fix problem reported by Henrik Grubbstroem in
3558 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
3559 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
3560 because the Bison parser reads the second action before reducing
3561 the first one.
3562 * src/scan-gram.l (rule_length): New static var.
3563 Use it to keep track of the rule length in the scanner, since
3564 we can't expect the parser to be in lock-step sync with the scanner.
3565 (handle_action_dollar, handle_action_at): Use this var.
3566 * tests/actions.at (Exotic Dollars): Test for the problem.
3567
3568 2002-10-12 Paul Eggert <eggert@twinsun.com>
3569
3570 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
3571 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
3572 Include <sys/time.h> when checking for clock_t and struct tms.
3573 Use same include order as source.
3574 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
3575 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
3576
3577 * lib/timevar.c: Update copyright date and clarify comments.
3578 (get_time) [IN_GCC]: Keep the GCC version for reference.
3579
3580 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
3581 GCC version as of today, then merge Bison's changes.
3582 Change "GCC" to "Bison" in copyright notice. timevar.def's
3583 author is Akim, so change that too.
3584
3585 * src/reader.c (grammar_current_rule_check):
3586 Don't worry about the default action if $$ is untyped.
3587 Prevents bogus warnings reported by Jim Gifford in
3588 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
3589
3590 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
3591 * data/glr.c, data/lalr1.cc, data/yacc.c:
3592 Output token definitions before the first part of user declarations.
3593 Fixes compatibility problem reported by Jim Gifford for kbd in
3594 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
3595
3596 2002-10-11 Paul Eggert <eggert@twinsun.com>
3597
3598 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
3599 (yyparse): here. This undoes some of the 2002-07-25 change.
3600 Compatibility problem reported by Ralf S. Engelschall with
3601 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
3602
3603 2002-10-11 Akim Demaille <akim@epita.fr>
3604
3605 * tests/regression.at Characters Escapes): New.
3606 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
3607 characters.
3608 Reported by Jan Nieuwenhuizen.
3609
3610 2002-10-11 Akim Demaille <akim@epita.fr>
3611
3612 * po/id.po: New.
3613
3614 2002-10-10 Paul Eggert <eggert@twinsun.com>
3615
3616 Portability fixes for bitsets; this also avoids several GCC
3617 warnings.
3618
3619 * lib/abitset.c: Include <stddef.h>, for offsetof.
3620 * lib/lbitset.c: Likewise.
3621
3622 * lib/abitset.c (abitset_bytes): Return a size that is aligned
3623 properly for vectors of objects. Do not assume that adding a
3624 header size to a multiple of a word size yields a value that is
3625 properly aligned for the whole union.
3626 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3627
3628 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3629 unique names for structures.
3630 * lib/ebitset.c (ebitset_bytes): Likewise.
3631 * lib/lbitset.c (lbitset_bytes): Likewise.
3632
3633 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3634 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3635 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3636 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3637 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3638 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3639 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3640 to improve the type-checking that GCC can do.
3641 * lib/bitset.c (bitset_op4_cmp): Likewise.
3642 * lib/bitset_stats.c (bitset_stats_count,
3643 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3644 bitset_stats_copy, bitset_stats_disjoint_p,
3645 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3646 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3647 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3648 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3649 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3650 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3651 bitset_stats_or_and_cmp): Likewise.
3652 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3653 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3654 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3655 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3656
3657 * lib/abitset.h: Include bitset.h, not bbitset.h.
3658 * lib/ebitset.h: Likewise.
3659 * lib/lbitset.h: Likewise.
3660
3661 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3662 All instances of parameters of type enum bitset_opts are now of
3663 type enum_bitset_opts, to conform to the C Standard, and similarly
3664 for enum_bitset_type.
3665 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3666 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3667
3668 Do not use "struct bitset_struct" to mean different things in
3669 different modules. Not only is this confusing, it violates
3670 the C Standard, which requires that structure types in different
3671 modules must be compatible if one is to be passed to the other.
3672 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3673 All instances of "struct bitset_struct *" replaced with "bitset".
3674 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3675 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3676 struct lbitset_struct, struct bitset_stats_struct): New types.
3677 All uses of struct bitset_struct changed to union bitset_union,
3678 etc.
3679 * lib/abitset.c (struct abitset_struct, abitset,
3680 struct bitset_struct): Remove.
3681 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3682 struct bitset_struct): Remove.
3683 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3684 bitset_struct): Remove.
3685 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3686 Likewise.
3687
3688 Do not call a function of type T using a call that assumes the
3689 function is of a different type U. Standard C requires that a
3690 function must be called with a type that is compatible with its
3691 definition.
3692 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3693 New decls.
3694 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3695 New functions.
3696 * lib/ebitset.c (PFV): Remove.
3697 * lib/lbitset.c (PFV): Likewise.
3698 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3699 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3700 decls.
3701 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3702 (ebitset_vtable): Use them.
3703 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3704 lbitset_xor): New functions.
3705 (lbitset_vtable): Use them.
3706
3707 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3708 Declare.
3709
3710 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3711 GCC warning.
3712 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
3713 Use offsetof, for simplicity.
3714
3715 2002-10-06 Paul Eggert <eggert@twinsun.com>
3716
3717 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
3718 the same width as int. This reapplies a hunk of the 2002-08-12 patch
3719 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
3720 which was inadvertently undone by the 2002-09-30 patch.
3721 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
3722 the same width as int.
3723
3724 2002-10-04 Paul Eggert <eggert@twinsun.com>
3725
3726 Version 1.50.
3727
3728 * configure.ac (AC_INIT), NEWS: Increment version number.
3729
3730 * doc/bison.texinfo: Minor spelling, grammar, and white space
3731 fixes.
3732 (Symbols): Mention that any negative value returned from yylex
3733 signifies end-of-input. Warn about negative chars. Mention
3734 the portable Standard C character set.
3735
3736 The GNU coding standard says CFLAGS and YFLAGS are reserved
3737 for the installer to set.
3738 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
3739 * src/Makefile.am (AM_CFLAGS): Likewise.
3740 (AM_YFLAGS): Renamed from YFLAGS.
3741
3742 Fix some MAX and MIN problems.
3743 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
3744 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
3745 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
3746 * src/reader.c (reader): Use it.
3747
3748 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
3749 POSIX 1003.1-2001 has removed fgrep.
3750
3751 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3752
3753 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
3754 interpreted as signed.
3755 * lib/ebitset.c (ebitset_list): Fix bug.
3756
3757 2002-10-01 Paul Eggert <eggert@twinsun.com>
3758
3759 More fixes for 64-bit hosts and large bitsets.
3760
3761 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
3762 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
3763 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
3764 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
3765 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
3766 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
3767 bitset_count_): Likewise.
3768 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
3769 bitset_first, bitset_last): Likewise.
3770 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
3771 bitset_stats_list_reverse, bitset_stats_size,
3772 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
3773 Likewise.
3774 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3775 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3776 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3777 bitsetv_reflexive_transitive_closure): Likewise.
3778 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
3779 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
3780 Likewise.
3781 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
3782 Likewise.
3783
3784 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
3785 Use size_t, not unsigned int, to count bytes.
3786 * lib/abitset.h (abitset_bytes): Likewise.
3787 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
3788 Likewise.
3789 * lib/bitset.h (bitset_bytes): Likewise.
3790 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
3791 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
3792 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3793 * lib/ebitset.c (ebitset_bytes): Likewise.
3794 * lib/ebitset.h (ebitset_bytes): Likewise.
3795 * lib/lbitset.c (lbitset_bytes): Likewise.
3796 * lib/lbitset.h (lbitset_bytes): Likewise.
3797
3798 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
3799 abitset_subset_p, abitset_disjoint_p, abitset_and,
3800 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
3801 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
3802 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
3803 abitset_or_and, abitset_or_and_cmp):
3804 Use bitset_windex instead of unsigned int.
3805 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3806 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
3807 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
3808 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
3809 Likewise.
3810 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
3811
3812 * lib/bitset.c (bitset_print):
3813 Use proper printf formats for widths of integer types.
3814 * lib/bitset_stats.c (bitset_percent_histogram_print,
3815 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
3816 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3817 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3818 * lib/lbitset.c (lbitset_bytes): Likewise.
3819
3820 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
3821 BITSET_SIZE_MAX): New macros.
3822 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
3823 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
3824 to BITSET_WINDEX_MAX.
3825
3826 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
3827 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
3828 since we now return the bitset_bindex type (not int).
3829
3830 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
3831 when computing sizes.
3832 * lib/ebitset.c (ebitset_elts_grow): Likewise.
3833
3834 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
3835 and avoid cast to unsigned.
3836
3837 2002-09-30 Akim Demaille <akim@epita.fr>
3838
3839 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3840 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
3841 Updates from Michael Hayes.
3842
3843 2002-09-30 Art Haas <ahaas@neosoft.com>
3844
3845 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
3846 invocations.
3847 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
3848 defined.
3849
3850 2002-09-27 Akim Demaille <akim@epita.fr>
3851
3852 Version 1.49c.
3853
3854 2002-09-27 Akim Demaille <akim@epita.fr>
3855
3856 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
3857 (Because of AC_LIBSOURCE).
3858
3859 2002-09-27 Akim Demaille <akim@epita.fr>
3860
3861 Playing with Autoscan.
3862
3863 * configure.ac: Remove the old LIBOBJ tweaks.
3864 (AC_REPLACE_FUNCS): Add strrchr and strtol.
3865 * lib/strrchr.c: New.
3866 * lib/strtol.c: New, from the Coreutils 4.5.1.
3867
3868 2002-09-27 Akim Demaille <akim@epita.fr>
3869
3870 Playing with Autoscan.
3871
3872 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
3873 * lib/Makefile.am (libbison_a_SOURCES): No longer include
3874 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
3875 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
3876 Coreutils 4.5.1.
3877
3878 2002-09-24 Akim Demaille <akim@epita.fr>
3879
3880 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
3881 (Frequently Asked Questions, Parser Stack Overflow): New.
3882
3883 2002-09-13 Akim Demaille <akim@epita.fr>
3884
3885 Playing with autoscan.
3886
3887 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
3888 * src/files.c (skeleton_find): Remove, unused.
3889 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
3890 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
3891
3892 2002-09-13 Akim Demaille <akim@epita.fr>
3893
3894 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
3895 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
3896
3897 2002-09-13 Akim Demaille <akim@epita.fr>
3898
3899 * configure.ac: Require 2.54.
3900 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
3901 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
3902 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
3903 Remove, provided by Autoconf macros.
3904
3905 2002-09-12 Akim Demaille <akim@epita.fr>
3906
3907 * m4/prereq.m4: Update, from Coreutils 4.5.1.
3908
3909 2002-09-12 Akim Demaille <akim@epita.fr>
3910
3911 * m4/prereq.m4: Update, from Fileutils 4.1.5.
3912 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
3913 Reported by Martin Mokrejs.
3914
3915 2002-09-10 Akim Demaille <akim@epita.fr>
3916
3917 * src/parse-gram.y: Associate a human readable string to each
3918 token type.
3919 * tests/regression.at (Invalid inputs): Adjust.
3920
3921 2002-09-10 Gary V. Vaughan <gary@gnu.org>
3922
3923 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
3924 with an Autoconf-2.5x style configure.ac.
3925
3926 2002-09-06 Paul Eggert <eggert@twinsun.com>
3927
3928 * doc/bison.texinfo (Conditions): Make explicit that the GPL
3929 exception applies only to yacc.c. This is a modification of a
3930 patch originally suggested by Akim Demaille.
3931
3932 2002-09-06 Akim Demaille <akim@epita.fr>
3933
3934 * data/c.m4 (b4_copyright): Move the GPL exception comment from
3935 here to...
3936 * data/yacc.c: here.
3937
3938 * data/lalr1.cc (struct yyltype): Don't define it, since we use
3939 LocationType.
3940 (b4_ltype): Default to yy::Location from location.hh.
3941
3942 2002-09-04 Jim Meyering <jim@meyering.net>
3943
3944 * data/yacc.c: Guard the declaration of yytoknum also with
3945 `#ifdef YYPRINT', so it is declared only when used.
3946
3947 2002-09-04 Akim Demaille <akim@epita.fr>
3948
3949 * configure.in: Rename as...
3950 * configure.ac: this.
3951 Bump to 1.49c.
3952
3953 2002-09-04 Akim Demaille <akim@epita.fr>
3954
3955 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
3956 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
3957 translate maintainer only messages.
3958
3959 2002-08-12 Paul Eggert <eggert@twinsun.com>
3960
3961 Version 1.49b.
3962
3963 * Makefile.am (SUBDIRS): Remove intl.
3964 (DISTCLEANFILES): Remove.
3965 * NEWS: Mention that GNU M4 is now required. Clarify what is
3966 meant by "larger grammars". Mention the pt_BR translation.
3967 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
3968 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
3969 Bump version from 0.11.2 to 0.11.5.
3970 (BISON_PREREQ_STAGE): Remove.
3971 (AM_GNU_GETTEXT): Use external gettext.
3972 (AC_OUTPUT): Remove intl/Makefile.
3973
3974 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
3975
3976 * data/glr.c: Include string.h, for strlen.
3977 (yyreportParseError): Use size_t for yysize.
3978 (yy_yypstack): No longer nested inside yypstates, as nested
3979 functions are not portable. Do not assume size_t is the
3980 same width as int.
3981 (yypstates): Do not assume that ptrdiff_t is the same width
3982 as int, and similarly for yyposn and YYINDEX.
3983
3984 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
3985
3986 * lib/Makefile.am (INCLUDES): Do not include from the intl
3987 directory, which has been removed.
3988 * src/Makefile.am (INCLUDES): Likewise.
3989
3990 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
3991 (bitsets_sources, additional_bitsets_sources, timevars_sources):
3992 New vars.
3993
3994 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
3995 * tests/Makefile.am (EXTRA_DIST): Likewise.
3996
3997 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
3998 Do not assume that bitset_windex is the same width as unsigned.
3999
4000 * lib/abitset.c (abitset_unused_clear): Do not assume that
4001 bitset_word is the same width as int.
4002 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
4003 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
4004 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
4005 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
4006 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
4007
4008 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
4009 portability to one's complement hosts!).
4010 * lib/ebitset.c (ebitset_op1): Likewise.
4011 * lib/lbitset.c (lbitset_op1): Likewise.
4012
4013 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
4014 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4015 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
4016 Sync with fileutils.
4017 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
4018 lib/gettext.h: Sync with diffutils.
4019
4020 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
4021 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
4022
4023 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
4024 PROTOTYPES to check for prototypes, and "defined __STDC__" to
4025 check for void *.
4026
4027 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
4028 size_t; the old version tried to do this but casted improperly.
4029 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
4030 (bitset_test): Now returns int, not unsigned long.
4031
4032 * lib/bitset_stats.c: Include "gettext.h".
4033 (_): New macro.
4034 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
4035 name locals "index", as it generates unnecessary warnings on some
4036 hosts that have an "index" function.
4037
4038 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
4039 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
4040 they need translation.
4041 * src/LR0.c (state_list_append, new_itemsets, get_state,
4042 append_states, generate_states): Likewise.
4043 * src/assoc.c (assoc_to_string): Likewise.
4044 * src/closure.c (print_closure, set_firsts, closure): Likewise.
4045 * src/gram.c (grammar_dump): Likewise.
4046 * src/injections.c (injections_compute): Likewise.
4047 * src/lalr.c (lookaheads_print): Likewise.
4048 * src/relation.c (relation_transpose): Likewise.
4049 * src/scan-gram.l: Likewise.
4050 * src/tables.c (table_grow, pack_vector): Likewise.
4051
4052 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
4053 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
4054 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
4055 * m4/mbstate_t.m4: Sync with fileutils.
4056 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
4057
4058 * po/LINGUAS: Add pt_BR.
4059 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
4060 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
4061 lib/timevar.c.
4062 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
4063 manual recommends.
4064 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
4065
4066 * src/complain.c (strerror_r): Remove decl; not needed.
4067 (strerror): Use same pattern as ../lib/error.c.
4068
4069 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
4070
4071 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
4072
4073 * src/main.c (main): Cast result of bindtextdomain and textdomain
4074 to void, to avoid a GCC warning when --disable-nls is in effect.
4075
4076 * src/scan-gram.l: Use strings rather than escapes when possible,
4077 to minimize the number of warnings from xgettext.
4078 (handle_action_dollar, handle_action_at): Don't use isdigit,
4079 as it mishandles negative chars and it may not work as expected
4080 outside the C locale.
4081
4082 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
4083 this is a GCC extension and is not portable to other compilers.
4084
4085 * src/system.h (alloca): Use same pattern as ../lib/error.c.
4086 Do not include <ctype.h>; no longer needed.
4087 Do not include <malloc.h>; no longer needed (and generates
4088 warnings on OpenBSD 3.0).
4089
4090 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
4091 it's not portable.
4092
4093 * tests/regression.at: Do not use 'cc -c input.c -o input';
4094 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
4095
4096 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
4097 exit status as failure, not just exit status 1. Sun C exits
4098 with status 2 sometimes.
4099
4100 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
4101 Use it for the two large tests.
4102
4103 2002-08-02 Akim Demaille <akim@epita.fr>
4104
4105 * src/conflicts.c (conflicts_output): Don't output rules never
4106 reduced here, since anyway that computation doesn't work.
4107 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
4108 (rule_useless_p, rule_never_reduced_p): New.
4109 (grammar_rules_partial_print): Use a filter instead of a range.
4110 Display the title only if needed.
4111 (grammar_rules_print): Adjust.
4112 (grammar_rules_never_reduced_report): New.
4113 * src/tables.c (action_row): Move the computation of rules never
4114 reduced to...
4115 (token_actions): here.
4116 * src/main.c (main): Make the parser before making the report, so
4117 that rules never reduced are computed.
4118 Call grammar_rules_never_reduced_report.
4119 * src/print.c (print_results): Report rules never reduced.
4120 * tests/conflicts.at, tests/reduce.at: Adjust.
4121
4122 2002-08-01 Akim Demaille <akim@epita.fr>
4123
4124 Instead of attaching lookaheads and duplicating the rules being
4125 reduced by a state, attach the lookaheads to the reductions.
4126
4127 * src/state.h (state_t): Remove the `lookaheads',
4128 `lookaheads_rule' member.
4129 (reductions_t): Add a `lookaheads' member.
4130 Use a regular array for the `rules'.
4131 * src/state.c (reductions_new): Initialize the lookaheads member
4132 to 0.
4133 (state_rule_lookaheads_print): Adjust.
4134 * src/state.h, src/state.c (state_reductions_find): New.
4135 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
4136 (count_rr_conflicts): Adjust.
4137 * src/lalr.c (LArule): Remove.
4138 (add_lookback_edge): Adjust.
4139 (state_lookaheads_count): New.
4140 (states_lookaheads_initialize): Merge into...
4141 (initialize_LA): this.
4142 (lalr_free): Adjust.
4143 * src/main.c (main): Don't free nullable and derives too early: it
4144 is used by --verbose.
4145 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
4146
4147 2002-08-01 Akim Demaille <akim@epita.fr>
4148
4149 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
4150 `rule_number_t**'.
4151 (set_derives, free_derives): Rename as...
4152 (derives_compute, derives_free): this.
4153 Adjust all dependencies.
4154 * src/nullable.c (set_nullable, free_nullable): Rename as...
4155 (nullable_compute, nullable_free): these.
4156 (rule_list_t): Store rule_t *, not rule_number_t.
4157 * src/state.c (state_rule_lookaheads_print): Directly compare rule
4158 pointers, instead of their numbers.
4159 * src/main.c (main): Call nullable_free, and derives_free earlier,
4160 as they were lo longer used.
4161
4162 2002-08-01 Akim Demaille <akim@epita.fr>
4163
4164 * lib/timevar.c (get_time): Include children time.
4165 * src/lalr.h (LA, LArule): Don't export them: used with the
4166 state_t.
4167 * src/lalr.c (LA, LArule): Static.
4168 * src/lalr.h, src/lalr.c (lalr_free): New.
4169 * src/main.c (main): Call it.
4170 * src/tables.c (pack_vector): Check whether loc is >= to the
4171 table_size, not >.
4172 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
4173 (tables_generate): do it, since that's also it which allocates
4174 them.
4175 Don't free LA and LArule, main does.
4176
4177 2002-07-31 Akim Demaille <akim@epita.fr>
4178
4179 Separate parser tables computation and output.
4180
4181 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
4182 (conflict_list, conflict_list_cnt, table, check, table_ninf)
4183 (yydefgoto, yydefact, high): Move to...
4184 * src/tables.h, src/tables.c: here.
4185 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4186 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4187 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
4188 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
4189 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
4190 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
4191 (action_row, save_row, token_actions, save_column, default_goto)
4192 (goto_actions, sort_actions, matching_state, pack_vector)
4193 (table_ninf_remap, pack_table, prepare_actions): Move to...
4194 * src/tables.c: here.
4195 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
4196 * src/output.c (token_actions, output_base, output_conflicts)
4197 (output_check): Merge into...
4198 (prepare_actions): this.
4199 (actions_output): Rename as...
4200 (user_actions_output): this.
4201 * src/main.c (main): Call tables_generate and tables_free.
4202
4203 2002-07-31 Akim Demaille <akim@epita.fr>
4204
4205 Steal GCC's --time-report support.
4206
4207 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
4208 stolen/adjusted from GCC.
4209 * m4/stage.m4: Remove time related checks.
4210 * m4/timevar.m4: New.
4211 * configure.in: Adjust.
4212 * src/system.h: Adjust to using timevar.h.
4213 * src/getargs.h, src/getargs.c: Support trace_time for
4214 --trace=time.
4215 * src/main.c (stage): Remove.
4216 (main): Replace `stage' invocations with timevar calls.
4217 * src/output.c: Insert pertinent timevar calls.
4218
4219 2002-07-31 Akim Demaille <akim@epita.fr>
4220
4221 Let --trace have arguments.
4222
4223 * src/getargs.h (enum trace_e): New.
4224 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
4225 (long_options, short_options): --trace/-T takes an optional
4226 argument.
4227 Change all the uses of trace_flag to reflect the new flags.
4228 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
4229
4230 Strengthen `stage' portability.
4231
4232 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
4233 * configure.in: Use it.
4234 Don't check for malloc.h and sys/times.h.
4235 * src/system.h: Include them when appropriate.
4236 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
4237 times and struct tms are available.
4238
4239 2002-07-30 Akim Demaille <akim@epita.fr>
4240
4241 In verbose parse error message, don't report `error' as an
4242 expected token.
4243 * tests/actions.at (Printers and Destructors): Adjust.
4244 * tests/calc.at (Calculator $1): Adjust.
4245 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
4246 error message, do not report the parser accepts the error token in
4247 that state.
4248
4249 2002-07-30 Akim Demaille <akim@epita.fr>
4250
4251 Normalize conflict related messages.
4252
4253 * src/complain.h, src/complain.c (warn, complain): New.
4254 * src/conflicts.c (conflicts_print): Use them.
4255 (conflict_report_yacc): New, extracted from...
4256 (conflicts_print): here.
4257 * tests/conflicts.at, tests/existing.at: Adjust.
4258
4259 2002-07-30 Akim Demaille <akim@epita.fr>
4260
4261 Report rules which are never reduced by the parser: those hidden
4262 by conflicts.
4263
4264 * src/LR0.c (save_reductions): Don't make the final state too
4265 different: save its reduction (accept) instead of having a state
4266 without any action (no shift or goto, no reduce).
4267 Note: the final state is now a ``regular'' state, i.e., the
4268 parsers now contain `reduce 0' as default reduction.
4269 Nevertheless, since they decide to `accept' when yystate =
4270 final_state, they still will not reduce rule 0.
4271 * src/print.c (print_actions, print_reduction): Adjust.
4272 * src/output.c (action_row): Track reduced rules.
4273 (token_actions): Report rules never reduced.
4274 * tests/conflicts.at, tests/regression.at: Adjust.
4275
4276 2002-07-30 Akim Demaille <akim@epita.fr>
4277
4278 `stage' was accidently included in a previous patch.
4279 Initiate its autoconfiscation.
4280
4281 * configure.in: Look for malloc.h and sys/times.h.
4282 * src/main.c (stage): Adjust.
4283 Report only when trace_flag.
4284
4285 2002-07-29 Akim Demaille <akim@epita.fr>
4286
4287 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
4288 state_number_t.
4289 (errs_t): symbol_t*, not symbol_number_t.
4290 (reductions_t): rule_t*, not rule_number_t.
4291 (FOR_EACH_SHIFT): New.
4292 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
4293 * src/print.c, src/print_graph.c: Adjust.
4294
4295 2002-07-29 Akim Demaille <akim@epita.fr>
4296
4297 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
4298
4299 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
4300 (endtoken, accept): these.
4301 * src/reader.c (reader): Set endtoken's default tag to "$end".
4302 Set undeftoken's tag to "$undefined" instead of "$undefined.".
4303 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
4304 Adjust.
4305
4306 2002-07-29 Akim Demaille <akim@epita.fr>
4307
4308 * src/reduce.c (reduce_grammar): When the language is empty,
4309 complain about the start symbol, not the axiom.
4310 Use its location.
4311 * tests/reduce.at (Empty Language): New.
4312
4313 2002-07-26 Akim Demaille <akim@epita.fr>
4314
4315 * src/reader.h, src/reader.c (gram_error): ... can't get
4316 yycontrol without making too strong assumptions on the parser
4317 itself.
4318 * src/output.c (prepare_tokens): Use the real 0th value of
4319 token_translations instead of `0'.
4320 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
4321 visible here.
4322 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
4323 for the time being: %locations ought to provide it to yyerror.
4324
4325 2002-07-25 Akim Demaille <akim@epita.fr>
4326
4327 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
4328 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
4329 * tests/regression.at (Web2c Actions): Adjust.
4330
4331 2002-07-25 Akim Demaille <akim@epita.fr>
4332
4333 Stop storing rules from 1 to nrules + 1.
4334
4335 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
4336 * src/nullable.c, src/output.c, src/print.c, src/reader.c
4337 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
4338 Iterate from 0 to nrules.
4339 Use rule_number_as_item_number and item_number_as_rule_number.
4340 Adjust to `derive' now containing possibly 0.
4341 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
4342 Handle the `- 1' part in rule numbers from/to item numbers.
4343 * src/conflicts.c (log_resolution): Fix the message which reversed
4344 shift and reduce.
4345 * src/output.c (action_row): Initialize default_rule to -1.
4346 (token_actions): Adjust.
4347 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
4348 expected output.
4349 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
4350
4351 2002-07-25 Akim Demaille <akim@epita.fr>
4352
4353 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
4354 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
4355 (b4_c_knr_arg_decl): New.
4356 * data/yacc.c: Use it to define yysymprint, yydestruct, and
4357 yyreport_parse_error.
4358
4359 2002-07-25 Akim Demaille <akim@epita.fr>
4360
4361 * data/yacc.c (yyreport_parse_error): New, extracted from...
4362 (yyparse): here.
4363 (yydestruct, yysymprint): Move above yyparse.
4364 Be K&R compliant.
4365
4366 2002-07-25 Akim Demaille <akim@epita.fr>
4367
4368 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
4369 replace...
4370 (b4_sint_type, b4_uint_type): these.
4371 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
4372 * tests/regression.at (Web2c Actions): Adjust.
4373
4374 2002-07-25 Akim Demaille <akim@epita.fr>
4375
4376 * src/gram.h (TIEM_NUMBER_MAX): New.
4377 (item_number_of_rule_number, rule_number_of_item_number): Rename
4378 as...
4379 (rule_number_as_item_number, item_number_as_rule_number): these.
4380 Adjust dependencies.
4381 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4382 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4383 (symbol_number_to_vector_number): New.
4384 (order): Of vector_number_t* type.
4385 (base_t, BASE_MAX, BASE_MIN): New.
4386 (froms, tos, width, pos, check): Of base_t type.
4387 (action_number_t, ACTION_MIN, ACTION_MAX): New.
4388 (actrow): Of action_number_t type.
4389 (conflrow): Of unsigned int type.
4390 (table_ninf, base_ninf): New.
4391 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
4392 (muscle_insert_int_table, muscle_insert_base_table)
4393 (muscle_insert_rule_number_table): New.
4394 (prepare_tokens): Output `toknum' as int_table.
4395 (action_row): Returns a rule_number_t.
4396 Use ACTION_MIN, not SHRT_MIN.
4397 (token_actions): yydefact is rule_number_t*.
4398 (table_ninf_remap): New.
4399 (pack_table): Use it for `base' and `table'.
4400 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
4401 replaced with...
4402 (YYPACT_NINF, YYTABLE_NINF): these.
4403 (yypact, yytable): Compute their types instead of hard-coded
4404 `short'.
4405 * tests/regression.at (Web2c Actions): Adjust.
4406
4407 2002-07-19 Akim Demaille <akim@epita.fr>
4408
4409 * src/scan-gram.l (id): Can start with an underscore.
4410
4411 2002-07-16 Akim Demaille <akim@epita.fr>
4412
4413 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
4414 Adjust all former `associativity' dependencies.
4415 * src/symtab.c (symbol_new): Default associativity is `undef', not
4416 `right'.
4417 (symbol_check_alias_consistence): Adjust.
4418
4419 2002-07-09 Akim Demaille <akim@epita.fr>
4420
4421 * doc/bison.texinfo: Properly set the ``header'' part.
4422 Use @dircategory ``GNU programming tools'' as per Texinfo's
4423 documentation.
4424 Use @copying.
4425
4426 2002-07-09 Akim Demaille <akim@epita.fr>
4427
4428 * lib/quotearg.h: Protect against multiple inclusions.
4429 * src/location.h (location_t): Add a `file' member.
4430 (LOCATION_RESET, LOCATION_PRINT): Adjust.
4431 * src/complain.c (warn_at, complain_at, fatal_at): Drop
4432 `error_one_per_line' support.
4433
4434 2002-07-09 Akim Demaille <akim@epita.fr>
4435
4436 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
4437 * src/reader.c (lineno): Remove.
4438 Adjust all dependencies.
4439 (get_merge_function): Take a location and use complain_at.
4440 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
4441 * tests/regression.at (Invalid inputs, Mixing %token styles):
4442 Adjust.
4443
4444 2002-07-09 Akim Demaille <akim@epita.fr>
4445
4446 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
4447 recovery rule, and forbid extensions when --yacc.
4448 (gram_error): Use complain_at.
4449 * src/reader.c (reader): Exit if there were parse errors.
4450
4451 2002-07-09 Akim Demaille <akim@epita.fr>
4452
4453 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
4454 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
4455 Reported by R Blake <blakers@mac.com>.
4456
4457 2002-07-09 Akim Demaille <akim@epita.fr>
4458
4459 * data/yacc.c: Output the copyright notive in the header.
4460
4461 2002-07-03 Akim Demaille <akim@epita.fr>
4462
4463 * src/output.c (froms, tos): Are state_number_t.
4464 (save_column): sp, sp1, and sp2 are state_number_t.
4465 (prepare): Rename `final' as `final_state_number', `nnts' as
4466 `nterms_number', `nrules' as `rules_number', `nstates' as
4467 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
4468 unused.
4469 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
4470 * data/lalr1.cc (nsym_): Remove, unused.
4471
4472 2002-07-03 Akim Demaille <akim@epita.fr>
4473
4474 * src/lalr.h, src/lalr.c (goto_number_t): New.
4475 * src/lalr.c (goto_list_t): New.
4476 Propagate them.
4477 * src/nullable.c (rule_list_t): New.
4478 Propagate.
4479 * src/types.h: Remove.
4480
4481 2002-07-03 Akim Demaille <akim@epita.fr>
4482
4483 * src/closure.c (print_fderives): Use rule_rhs_print.
4484 * src/derives.c (print_derives): Use rule_rhs_print.
4485 (rule_list_t): New, replaces `shorts'.
4486 (set_derives): Add comments.
4487 * tests/sets.at (Nullable, Firsts): Adjust.
4488
4489 2002-07-03 Akim Demaille <akim@epita.fr>
4490
4491 * src/output.c (prepare_actions): Free `tally' and `width'.
4492 (prepare_actions): Allocate and free `order'.
4493 * src/symtab.c (symbols_free): Free `symbols'.
4494 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
4495 * src/output.c (m4_invoke): Move to...
4496 * src/scan-skel.l: here.
4497 (<<EOF>>): Close yyout, and free its name.
4498
4499 2002-07-03 Akim Demaille <akim@epita.fr>
4500
4501 Fix some memory leaks, and fix a bug: state 0 was examined twice.
4502
4503 * src/LR0.c (new_state): Merge into...
4504 (state_list_append): this.
4505 (new_states): Merge into...
4506 (generate_states): here.
4507 (set_states): Don't ensure a proper `errs' state member here, do it...
4508 * src/conflicts.c (conflicts_solve): here.
4509 * src/state.h, src/state.c: Comment changes.
4510 (state_t): Rename member `shifts' as `transitions'.
4511 Adjust all dependencies.
4512 (errs_new): For consistency, also take the values as argument.
4513 (errs_dup): Remove.
4514 (state_errs_set): New.
4515 (state_reductions_set, state_transitions_set): Assert that no
4516 previous value was assigned.
4517 (state_free): New.
4518 (states_free): Use it.
4519 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
4520 temporary storage: use `errs' and `nerrs' as elsewhere.
4521 (set_conflicts): Allocate and free this `errs'.
4522
4523 2002-07-02 Akim Demaille <akim@epita.fr>
4524
4525 * lib/libiberty.h: New.
4526 * lib: Update the bitset implementation from upstream.
4527 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
4528 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
4529 * src/main.c: Adjust bitset stats calls.
4530
4531 2002-07-01 Paul Eggert <eggert@twinsun.com>
4532
4533 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
4534 char, so that negative chars don't collide with $.
4535
4536 2002-06-30 Akim Demaille <akim@epita.fr>
4537
4538 Have the GLR tests be `warning' checked, and fix the warnings.
4539
4540 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
4541 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
4542 (yyremoveDeletes): `yyi' and `yyj' are size_t.
4543 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
4544 (yyaddDeferredAction): static.
4545 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
4546 (yyreportParseError): yyprefix is const.
4547 yytokenp is used only when verbose.
4548 (yy__GNUC__): Replace with __GNUC__.
4549 (yypdumpstack): yyi is size_t.
4550 (yypreference): Un-yy local variables and arguments, to avoid
4551 clashes with `yyr1'. Anyway, we are not in the user name space.
4552 (yytname_size): be an int, as is compared with ints.
4553 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
4554 Use them.
4555 * tests/cxx-gram.at: Use quotation to protect $1.
4556 Use AT_COMPILE to enable warnings hunts.
4557 Prototype yylex and yyerror.
4558 `Use' argc.
4559 Include `string.h', not `strings.h'.
4560 Produce and prototype stmtMerge only when used.
4561 yylex takes a location.
4562
4563 2002-06-30 Akim Demaille <akim@epita.fr>
4564
4565 We spend a lot of time in quotearg, in particular when --verbose.
4566
4567 * src/symtab.c (symbol_get): Store a quoted version of the key.
4568 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
4569 Adjust all callers.
4570
4571 2002-06-30 Akim Demaille <akim@epita.fr>
4572
4573 * src/state.h (reductions_t): Rename member `nreds' as num.
4574 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
4575 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
4576
4577 2002-06-30 Akim Demaille <akim@epita.fr>
4578
4579 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
4580 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
4581 (shifts_to): Rename as...
4582 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
4583 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
4584 (TRANSITION_IS_DISABLED, transitions_to): these.
4585
4586 2002-06-30 Akim Demaille <akim@epita.fr>
4587
4588 * src/print.c (print_shifts, print_gotos): Merge into...
4589 (print_transitions): this.
4590 (print_transitions, print_errs, print_reductions): Align the
4591 lookaheads columns.
4592 (print_core, print_transitions, print_errs, print_state,
4593 print_grammar): Output empty lines separator before, not after.
4594 (state_default_rule_compute): Rename as...
4595 (state_default_rule): this.
4596 * tests/conflicts.at (Defaulted Conflicted Reduction),
4597 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
4598 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
4599
4600 2002-06-30 Akim Demaille <akim@epita.fr>
4601
4602 Display items as we display rules.
4603
4604 * src/gram.h, src/gram.c (rule_lhs_print): New.
4605 * src/gram.c (grammar_rules_partial_print): Use it.
4606 * src/print.c (print_core): Likewise.
4607 * tests/conflicts.at (Defaulted Conflicted Reduction),
4608 (Unresolved SR Conflicts): Adjust.
4609 (Unresolved SR Conflicts): Adjust and rename as...
4610 (Resolved SR Conflicts): this, as was meant.
4611 * tests/regression.at (Web2c Report): Adjust.
4612
4613 2002-06-30 Akim Demaille <akim@epita.fr>
4614
4615 * src/print.c (state_default_rule_compute): New, extracted from...
4616 (print_reductions): here.
4617 Pessimize, but clarify the code.
4618 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
4619
4620 2002-06-30 Akim Demaille <akim@epita.fr>
4621
4622 * src/output.c (action_row): Let default_rule be always a rule
4623 number.
4624
4625 2002-06-30 Akim Demaille <akim@epita.fr>
4626
4627 * src/closure.c (print_firsts, print_fderives, closure):
4628 Use BITSET_EXECUTE.
4629 * src/lalr.c (lookaheads_print): Likewise.
4630 * src/state.c (state_rule_lookaheads_print): Likewise.
4631 * src/print_graph.c (print_core): Likewise.
4632 * src/print.c (print_reductions): Likewise.
4633 * src/output.c (action_row): Likewise.
4634 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4635
4636 2002-06-30 Akim Demaille <akim@epita.fr>
4637
4638 * src/print_graph.c: Use report_flag.
4639
4640 2002-06-30 Akim Demaille <akim@epita.fr>
4641
4642 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4643 to...
4644 * src/relation.h, src/relation.c (traverse, relation_digraph)
4645 (relation_print, relation_transpose): New.
4646
4647 2002-06-30 Akim Demaille <akim@epita.fr>
4648
4649 * src/state.h, src/state.c (shifts_to): New.
4650 * src/lalr.c (build_relations): Use it.
4651
4652 2002-06-30 Akim Demaille <akim@epita.fr>
4653
4654 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4655 (item_number_of_rule_number, rule_number_of_item_number): New.
4656 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4657 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4658 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4659 Propagate their use.
4660 Much remains to be done, in particular wrt `shorts' from types.h.
4661
4662 2002-06-30 Akim Demaille <akim@epita.fr>
4663
4664 * src/symtab.c (symbol_new): Initialize the `printer' member.
4665
4666 2002-06-30 Akim Demaille <akim@epita.fr>
4667
4668 * src/LR0.c (save_reductions): Remove, replaced by...
4669 * src/state.h, src/state.c (state_reductions_set): New.
4670 (reductions, errs): Rename as...
4671 (reductions_t, errs_t): these.
4672 Adjust all dependencies.
4673
4674 2002-06-30 Akim Demaille <akim@epita.fr>
4675
4676 * src/LR0.c (state_list_t, state_list_append): New.
4677 (first_state, last_state): Now symbol_list_t.
4678 (this_state): Remove.
4679 (new_itemsets, append_states, save_reductions): Take a state_t as
4680 argument.
4681 (set_states, generate_states): Adjust.
4682 (save_shifts): Remove, replaced by...
4683 * src/state.h, src/state.c (state_shifts_set): New.
4684 (shifts): Rename as...
4685 (shifts_t): this.
4686 Adjust all dependencies.
4687 * src/state.h (state_t): Remove the `next' member.
4688
4689 2002-06-30 Akim Demaille <akim@epita.fr>
4690
4691 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4692 escaped in slot 0.
4693
4694 2002-06-30 Akim Demaille <akim@epita.fr>
4695
4696 Use hash.h for the state hash table.
4697
4698 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4699 (allocate_storage): Use state_hash_new.
4700 (free_storage): Use state_hash_free.
4701 (new_state, get_state): Adjust.
4702 * src/lalr.h, src/lalr.c (states): Move to...
4703 * src/states.h (state_t): Remove the `link' member, no longer
4704 used.
4705 * src/states.h, src/states.c: here.
4706 (state_hash_new, state_hash_free, state_hash_lookup)
4707 (state_hash_insert, states_free): New.
4708 * src/states.c (state_table, state_compare, state_hash): New.
4709 * src/output.c (output_actions): Do not free states now, since we
4710 still need to know the final_state number in `prepare', called
4711 afterwards. Do it...
4712 * src/main.c (main): here: call states_free after `output'.
4713
4714 2002-06-30 Akim Demaille <akim@epita.fr>
4715
4716 * src/state.h, src/state.c (state_new): New, extracted from...
4717 * src/LR0.c (new_state): here.
4718 * src/state.h (STATE_ALLOC): Move to...
4719 * src/state.c: here.
4720 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
4721 * src/state.h, src/state.c: here.
4722
4723 2002-06-30 Akim Demaille <akim@epita.fr>
4724
4725 * src/reader.c (gensym): Rename as...
4726 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
4727 (getsym): Rename as...
4728 (symbol_get): this.
4729
4730 2002-06-30 Akim Demaille <akim@epita.fr>
4731
4732 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
4733 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
4734 * src/output.c, src/print.c, src/print_graph.c: Propagate.
4735 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
4736
4737 2002-06-30 Akim Demaille <akim@epita.fr>
4738
4739 Make the test suite pass with warnings checked.
4740
4741 * tests/actions.at (Printers and Destructors): Improve.
4742 Avoid unsigned vs. signed issues.
4743 * tests/calc.at: Don't exercise the scanner here, do it...
4744 * tests/input.at (Torturing the Scanner): here.
4745
4746 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4747
4748 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
4749 reorganize first lines parallel to yacc.c.
4750
4751 2002-06-28 Akim Demaille <akim@epita.fr>
4752
4753 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
4754 (b4_token_enum, b4_token_defines): New, factored from...
4755 * data/lalr1.cc, data/yacc.c, glr.c: here.
4756
4757 2002-06-28 Akim Demaille <akim@epita.fr>
4758
4759 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
4760 unused variables.
4761 * src/output.c (merger_output): static.
4762
4763 2002-06-28 Akim Demaille <akim@epita.fr>
4764
4765 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
4766 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
4767 pacify GCC.
4768 * src/output.c (save_row): Initialize all the variables to pacify GCC.
4769
4770 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4771
4772 Accumulated changelog for new GLR parsing features.
4773
4774 * src/conflicts.c (count_total_conflicts): Change name to
4775 conflicts_total_count.
4776 * src/conflicts.h: Ditto.
4777 * src/output.c (token_actions): Use the new name.
4778 (output_conflicts): Change conflp => conflict_list_heads, and
4779 confl => conflict_list for better readability.
4780 * data/glr.c: Use the new names.
4781 * NEWS: Add self to GLR announcement.
4782
4783 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
4784
4785 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
4786 Akim Demaille.
4787
4788 * data/bison.glr: Change name to glr.c
4789 * data/glr.c: Renamed from bison.glr.
4790 * data/Makefile.am: Add glr.c
4791
4792 * src/getargs.c:
4793
4794 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
4795 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
4796
4797 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4798
4799 * data/bison.glr: Be sure to restore the
4800 current #line when returning to the skeleton contents after having
4801 exposed the input file's #line.
4802
4803 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4804
4805 * data/bison.glr: Bring up to date with changes to bison.simple.
4806
4807 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4808
4809 * data/bison.glr: Correct definitions that use b4_prefix.
4810 Various reformatting.
4811 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
4812 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
4813 yytokenp argument; now part of stack.
4814 (yychar): Define to behave as documented.
4815 (yyclearin): Ditto.
4816
4817 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4818
4819 * src/reader.h: Add declaration for free_merger_functions.
4820
4821 * src/reader.c (merge_functions): New variable.
4822 (get_merge_function): New function.
4823 (free_merger_functions): New function.
4824 (readgram): Check for %prec that is not followed by a symbol.
4825 Handle %dprec and %merge declarations.
4826 (packgram): Initialize dprec and merger fields in rules array.
4827
4828 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
4829 conflict_list_cnt, conflict_list_free): New variables.
4830 (table_grow): Also grow conflict_table.
4831 (prepare_rules): Output dprec and merger tables.
4832 (conflict_row): New function.
4833 (action_row): Output conflict lists for GLR parser. Don't use
4834 default reduction in conflicted states for GLR parser so that there
4835 are spaces for the conflict lists.
4836 (save_row): Also save conflict information.
4837 (token_actions): Allocate conflict list.
4838 (merger_output): New function.
4839 (pack_vector): Pack conflict table, too.
4840 (output_conflicts): New function to output yyconflp and yyconfl.
4841 (output_check): Allocate conflict_tos.
4842 (output_actions): Output conflict tables, also.
4843 (output_skeleton): Output b4_mergers definition.
4844 (prepare): Output b4_max_rhs_length definition.
4845 Use 'bison.glr' as default skeleton for GLR parsers.
4846
4847 * src/gram.c (glr_parser): New flag.
4848 (grammar_free): Call free_merger_functions.
4849
4850 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
4851 all pairs of conflicting reductions, rather than just all tokens
4852 causing conflicts. Needed to size conflict tables.
4853 (conflicts_output): Modify call to count_rr_conflicts for new
4854 interface.
4855 (conflicts_print): Ditto.
4856 (count_total_conflicts): New function.
4857
4858 * src/reader.h (merger_list): New type.
4859 (merge_functions): New variable.
4860
4861 * src/lex.h (tok_dprec, tok_merge): New token types.
4862
4863 * src/gram.h (rule_s): Add dprec and merger fields.
4864 (glr_parser): New flag.
4865
4866 * src/conflicts.h (count_total_conflicts): New function.
4867
4868 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
4869
4870 * doc/bison.texinfo (Generalized LR Parsing): New section.
4871 (GLR Parsers): New section.
4872 (Language and Grammar): Mention GLR parsing.
4873 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
4874 Correct typo ("tge" -> "the").
4875
4876 * data/bison.glr: New skeleton for GLR parsing.
4877
4878 * tests/cxx-gram.at: New tests for GLR parsing.
4879
4880 * tests/testsuite.at: Include cxx-gram.at.
4881
4882 * tests/Makefile.am: Add cxx-gram.at.
4883
4884 * src/parse-gram.y:
4885
4886 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
4887
4888 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
4889
4890 2002-06-27 Akim Demaille <akim@epita.fr>
4891
4892 * src/options.h, src/options.c: Remove.
4893 * src/getargs.c (short_options, long_options): New.
4894
4895 2002-06-27 Akim Demaille <akim@epita.fr>
4896
4897 * data/bison.simple, data/bison.c++: Rename as...
4898 * data/yacc.c, data/lalr1.cc: these.
4899 * doc/bison.texinfo (Environment Variables): Remove.
4900
4901 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
4902
4903 * src/getargs.c (report_argmatch): Initialize strtok().
4904
4905 2002-06-20 Akim Demaille <akim@epita.fr>
4906
4907 * data/bison.simple (b4_symbol_actions): New, replaces...
4908 (b4_symbol_destructor, b4_symbol_printer): these.
4909 (yysymprint): Be sure to call YYPRINT only for tokens, and using
4910 user token numbers.
4911
4912 2002-06-20 Akim Demaille <akim@epita.fr>
4913
4914 * data/bison.simple (yydestructor): Rename as...
4915 (yydestruct): this.
4916
4917 2002-06-20 Akim Demaille <akim@epita.fr>
4918
4919 * src/symtab.h, src/symtab.c (symbol_type_set)
4920 (symbol_destructor_set, symbol_precedence_set): The location is
4921 the last argument.
4922 Adjust all callers.
4923
4924 2002-06-20 Akim Demaille <akim@epita.fr>
4925
4926 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
4927 internals.
4928 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
4929 Takes a location.
4930 * src/symtab.h, src/symtab.c (symbol_class_set)
4931 (symbol_user_token_number_set): Likewise.
4932 Adjust all callers.
4933 Promote complain_at.
4934 * tests/input.at (Type Clashes): Adjust.
4935
4936 2002-06-20 Akim Demaille <akim@epita.fr>
4937
4938 * data/bison.simple (YYLEX): Fix the declaration when
4939 %pure-parser.
4940
4941 2002-06-20 Akim Demaille <akim@epita.fr>
4942
4943 * data/bison.simple (yysymprint): Don't print the token number,
4944 just its name.
4945 * tests/actions.at (Destructors): Rename as...
4946 (Printers and Destructors): this.
4947 Also exercise %printer.
4948
4949 2002-06-20 Akim Demaille <akim@epita.fr>
4950
4951 * data/bison.simple (YYDSYMPRINT): New.
4952 Use it to remove many of the #if YYDEBUG/if (yydebug).
4953
4954 2002-06-20 Akim Demaille <akim@epita.fr>
4955
4956 * src/symtab.h, src/symtab.c (symbol_t): printer and
4957 printer_location are new members.
4958 (symbol_printer_set): New.
4959 * src/parse-gram.y (PERCENT_PRINTER): New token.
4960 Handle its associated rule.
4961 * src/scan-gram.l: Adjust.
4962 (handle_destructor_at, handle_destructor_dollar): Rename as...
4963 (handle_symbol_code_at, handle_symbol_code_dollar): these.
4964 * src/output.c (symbol_printers_output): New.
4965 (output_skeleton): Call it.
4966 * data/bison.simple (yysymprint): New. Cannot be named yyprint
4967 since there are already many grammar files with a user `yyprint'.
4968 Replace the calls to YYPRINT to calls to yysymprint.
4969 * tests/calc.at: Adjust.
4970 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
4971 taking advantage of parser very internal details (stack size!).
4972
4973 2002-06-20 Akim Demaille <akim@epita.fr>
4974
4975 * src/scan-gram.l: Complete the scanner with the missing patterns
4976 to pacify Flex.
4977 Use `quote' and `symbol_tag_get' where appropriate.
4978
4979 2002-06-19 Akim Demaille <akim@epita.fr>
4980
4981 * tests/actions.at (Destructors): Augment to test locations.
4982 * data/bison.simple (yydestructor): Pass it the current location
4983 if locations are enabled.
4984 Prototype only when __STDC__ or C++.
4985 Change the argument names to move into the yy name space: there is
4986 user code here.
4987
4988 2002-06-19 Akim Demaille <akim@epita.fr>
4989
4990 * data/bison.simple (b4_pure_if): New.
4991 Use it instead of #ifdef YYPURE.
4992
4993 2002-06-19 Akim Demaille <akim@epita.fr>
4994
4995 * data/bison.simple (b4_location_if): New.
4996 Use it instead of #ifdef YYLSP_NEEDED.
4997
4998 2002-06-19 Akim Demaille <akim@epita.fr>
4999
5000 Prepare @$ in %destructor, but currently don't bind it in the
5001 skeleton, as %location use is not cleaned up yet.
5002
5003 * src/scan-gram.l (handle_dollar, handle_destructor_at)
5004 (handle_action_at): New.
5005 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
5006 a braced_code_t and a location as additional arguments.
5007 (handle_destructor_dollar): Instead of requiring `b4_eval', just
5008 unquote one when outputting `b4_dollar_dollar'.
5009 Adjust callers.
5010 * data/bison.simple (b4_eval): Remove.
5011 (b4_symbol_destructor): Adjust.
5012 * tests/input.at (Invalid @n): Adjust.
5013
5014 2002-06-19 Zack Weinberg <zack@codesourcery.com>
5015
5016 * doc/bison.texinfo: Document ability to have multiple
5017 prologue sections.
5018
5019 2002-06-18 Akim Demaille <akim@epita.fr>
5020
5021 * src/files.c (compute_base_names): When computing the output file
5022 names from the input file name, strip the directory part.
5023
5024 2002-06-18 Akim Demaille <akim@epita.fr>
5025
5026 * data/bison.simple.new: Comment changes.
5027 Reported by Andreas Schwab.
5028
5029 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
5030
5031 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
5032 there are no `label `yyoverflowlab' defined but not used' warnings
5033 when yyoverflow is defined.
5034
5035 2002-06-18 Akim Demaille <akim@epita.fr>
5036
5037 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
5038 new member.
5039 (symbol_destructor_set): Adjust.
5040 * src/output.c (symbol_destructors_output): Output the destructor
5041 locations.
5042 Output the symbol name.
5043 * data/bison.simple (b4_symbol_destructor): Adjust.
5044
5045 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
5046 and Akim Demaille <akim@epita.fr>
5047
5048 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
5049 what's left on the stack when the error recovery hits EOF.
5050 * tests/actions.at (Destructors): Complete to exercise this case.
5051
5052 2002-06-17 Akim Demaille <akim@epita.fr>
5053
5054 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
5055 arguments is really empty, not only equal to `[]'.
5056 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
5057 member.
5058 (symbol_destructor_set): New.
5059 * src/output.c (symbol_destructors_output): New.
5060 * src/reader.h (brace_code_t, current_braced_code): New.
5061 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
5062 (handle_dollar): Rename as...
5063 (handle_action_dollar): this.
5064 (handle_destructor_dollar): New.
5065 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
5066 (grammar_declaration): Use it.
5067 * data/bison.simple (yystos): Is always defined.
5068 (yydestructor): New.
5069 * tests/actions.at (Destructors): New.
5070 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
5071
5072 2002-06-17 Akim Demaille <akim@epita.fr>
5073
5074 * src/symlist.h, src/symlist.c (symbol_list_length): New.
5075 * src/scan-gram.l (handle_dollar, handle_at): Compute the
5076 rule_length only when needed.
5077 * src/output.c (actions_output, token_definitions_output): Output
5078 the full M4 block.
5079 * src/symtab.c: Don't access directly to the symbol tag, use
5080 symbol_tag_get.
5081 * src/parse-gram.y: Use symbol_list_free.
5082
5083 2002-06-17 Akim Demaille <akim@epita.fr>
5084
5085 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
5086 (symbol_list_prepend, get_type_name): Move to...
5087 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
5088 (symbol_list_prepend, symbol_list_n_type_name_get): here.
5089 Adjust all callers.
5090 (symbol_list_free): New.
5091 * src/scan-gram.l (handle_dollar): Takes a location.
5092 * tests/input.at (Invalid $n): Adjust.
5093
5094 2002-06-17 Akim Demaille <akim@epita.fr>
5095
5096 * src/reader.h, src/reader.c (symbol_list_new): Export it.
5097 (symbol_list_prepend): New.
5098 * src/parse-gram.y (%union): `list' is a new member.
5099 (symbols.1): New, replaces...
5100 (terms_to_prec.1, nterms_to_type.1): these.
5101 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
5102 Take a location as additional argument.
5103 Adjust all callers.
5104
5105 2002-06-15 Akim Demaille <akim@epita.fr>
5106
5107 * src/parse-gram.y: Move %token in the declaration section so that
5108 we don't depend upon CVS Bison.
5109
5110 2002-06-15 Akim Demaille <akim@epita.fr>
5111
5112 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
5113 * src/print.c (print_core): Use it.
5114
5115 2002-06-15 Akim Demaille <akim@epita.fr>
5116
5117 * src/conflicts.c (log_resolution): Accept the rule involved in
5118 the sr conflicts instead of the lookahead number that points to
5119 that rule.
5120 (flush_reduce): Accept the current lookahead vector as argument,
5121 instead of the index in LA.
5122 (resolve_sr_conflict): Accept the current number of lookahead
5123 bitset to consider for the STATE, instead of the index in LA.
5124 (set_conflicts): Adjust.
5125 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
5126
5127 2002-06-15 Akim Demaille <akim@epita.fr>
5128
5129 * src/state.h (state_t): Replace the `lookaheadsp' member, a
5130 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
5131 Adjust all dependencies.
5132 * src/lalr.c (initialize_lookaheads): Split into...
5133 (states_lookaheads_count, states_lookaheads_initialize): these.
5134 (lalr): Adjust.
5135
5136 2002-06-15 Akim Demaille <akim@epita.fr>
5137
5138 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
5139 out of...
5140 (grammar_rules_print): here.
5141 * src/reduce.c (reduce_output): Use it.
5142 * tests/reduce.at (Useless Rules, Reduced Automaton)
5143 (Underivable Rules): Adjust.
5144
5145 2002-06-15 Akim Demaille <akim@epita.fr>
5146
5147 Copy BYacc's nice way to report the grammar.
5148
5149 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
5150 New.
5151 Don't print the rules' location, it is confusing and useless.
5152 (rule_print): Use grammar_rhs_print.
5153 * src/print.c (print_grammar): Use grammar_rules_print.
5154
5155 2002-06-15 Akim Demaille <akim@epita.fr>
5156
5157 Complete and rationalize `useless thing' warnings.
5158
5159 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
5160 (symbol_tag_print): New.
5161 Use them everywhere in place of accessing directly the tag member.
5162 * src/gram.h, src/gram.c (rule_print): New.
5163 Use it where a rule used to be printed `by hand'.
5164 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
5165 (reduce_grammar_tables): Report the useless rules.
5166 (reduce_print): Useless things are a warning, not an error.
5167 Report it as such.
5168 * tests/reduce.at (Useless Nonterminals, Useless Rules):
5169 (Reduced Automaton, Underivable Rules): Adjust.
5170 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
5171 * tests/conflicts.at (Unresolved SR Conflicts)
5172 (Solved SR Conflicts): Adjust.
5173
5174 2002-06-15 Akim Demaille <akim@epita.fr>
5175
5176 Let symbols have a location.
5177
5178 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
5179 (getsym): Adjust.
5180 Adjust all callers.
5181 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
5182 Use location_t, not int.
5183 * src/symtab.c (symbol_check_defined): Take advantage of the
5184 location.
5185 * tests/regression.at (Invalid inputs): Adjust.
5186
5187 2002-06-15 Akim Demaille <akim@epita.fr>
5188
5189 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
5190 (input): Don't try to initialize yylloc here, do it in the
5191 scanner.
5192 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
5193 * src/gram.h (rule_t): Change line and action_line into location
5194 and action_location, of location_t type.
5195 Adjust all dependencies.
5196 * src/location.h, src/location.c (empty_location): New.
5197 * src/reader.h, src/reader.c (grammar_start_symbol_set)
5198 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
5199 (grammar_current_rule_symbol_append)
5200 (grammar_current_rule_action_append): Expect a location as argument.
5201 * src/reader.c (grammar_midrule_action): Adjust to attach an
5202 action's location as dummy symbol location.
5203 * src/symtab.h, src/symtab.c (startsymbol_location): New.
5204 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
5205 the line numbers.
5206
5207 2002-06-14 Akim Demaille <akim@epita.fr>
5208
5209 Grammar declarations may be found in the grammar section.
5210
5211 * src/parse-gram.y (rules_or_grammar_declaration): New.
5212 (declarations): Each declaration may end with a semicolon, not
5213 just...
5214 (grammar_declaration): `"%union"'.
5215 (grammar): Branch to rules_or_grammar_declaration.
5216
5217 2002-06-14 Akim Demaille <akim@epita.fr>
5218
5219 * src/main.c (main): Invoke scanner_free.
5220
5221 2002-06-14 Akim Demaille <akim@epita.fr>
5222
5223 * src/output.c (m4_invoke): Extracted from...
5224 (output_skeleton): here.
5225 Free tempfile.
5226
5227 2002-06-14 Akim Demaille <akim@epita.fr>
5228
5229 * src/parse-gram.y (directives, directive, gram)
5230 (grammar_directives, precedence_directives, precedence_directive):
5231 Rename as...
5232 (declarations, declaration, grammar, grammar_declaration)
5233 (precedence_declaration, precedence_declarator): these.
5234 (symbol_declaration): New.
5235
5236 2002-06-14 Akim Demaille <akim@epita.fr>
5237
5238 * src/files.c (action_obstack): Remove, unused.
5239 (output_obstack): Remove it, and all its dependencies, as it is no
5240 longer needed.
5241 * src/reader.c (epilogue_set): Build the epilogue in the
5242 muscle_obstack.
5243 * src/output.h, src/output.c (muscle_obstack): Move to...
5244 * src/muscle_tab.h, src/muscle_tab.h: here.
5245 (muscle_init): Initialize muscle_obstack.
5246 (muscle_free): New.
5247 * src/main.c (main): Call it.
5248
5249 2002-06-14 Akim Demaille <akim@epita.fr>
5250
5251 * src/location.h: New, extracted from...
5252 * src/reader.h: here.
5253 * src/Makefile.am (noinst_HEADERS): Merge into
5254 (bison_SOURCES): this.
5255 Add location.h.
5256 * src/parse-gram.y: Use location_t instead of Bison's.
5257 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
5258 Use location_t instead of ints.
5259
5260 2002-06-14 Akim Demaille <akim@epita.fr>
5261
5262 * data/bison.simple, data/bison.c++: Be sure to restore the
5263 current #line when returning to the skeleton contents after having
5264 exposed the input file's #line.
5265
5266 2002-06-12 Akim Demaille <akim@epita.fr>
5267
5268 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
5269 eager.
5270 * tests/actions.at (Exotic Dollars): New.
5271
5272 2002-06-12 Akim Demaille <akim@epita.fr>
5273
5274 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
5275 ['"/] too eagerly.
5276 * tests/input.at (Torturing the Scanner): New.
5277
5278 2002-06-11 Akim Demaille <akim@epita.fr>
5279
5280 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
5281 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
5282 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
5283 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
5284 * src/reader.c (reader): Use it.
5285
5286 2002-06-11 Akim Demaille <akim@epita.fr>
5287
5288 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
5289 Adjust all callers.
5290 (scanner_last_string_free): New.
5291
5292 2002-06-11 Akim Demaille <akim@epita.fr>
5293
5294 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
5295 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
5296 (last_string, YY_OBS_FREE): New.
5297 Use them when returning an ID.
5298
5299 2002-06-11 Akim Demaille <akim@epita.fr>
5300
5301 Have Bison grammars parsed by a Bison grammar.
5302
5303 * src/reader.c, src/reader.h (prologue_augment): New.
5304 * src/reader.c (copy_definition): Remove.
5305
5306 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
5307 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
5308 (grammar_current_rule_prec_set, grammar_current_rule_check)
5309 (grammar_current_rule_symbol_append)
5310 (grammar_current_rule_action_append): Export.
5311 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
5312 (symbol_list_action_append): Remove.
5313 Hook the routines from reader.
5314 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
5315 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
5316
5317 * src/reader.c (read_declarations): Remove, unused.
5318
5319 * src/parse-gram.y: Handle the epilogue.
5320 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
5321 (grammar_start_symbol_set): this.
5322 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
5323 * src/reader.c (readgram): Remove, unused.
5324 (reader): Adjust to insert eoftoken and axiom where appropriate.
5325
5326 * src/reader.c (copy_dollar): Replace with...
5327 * src/scan-gram.h (handle_dollar): this.
5328 * src/parse-gram.y: Remove `%thong'.
5329
5330 * src/reader.c (copy_at): Replace with...
5331 * src/scan-gram.h (handle_at): this.
5332
5333 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
5334 New.
5335
5336 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
5337 time being.
5338
5339 * src/reader.h, src/reader.c (grammar_rule_end): New.
5340
5341 * src/parse.y (current_type, current_class): New.
5342 Implement `%nterm', `%token' support.
5343 Merge `%term' into `%token'.
5344 (string_as_id): New.
5345 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
5346 type name.
5347
5348 * src/parse-gram.y: Be sure to handle properly the beginning of
5349 rules.
5350
5351 * src/parse-gram.y: Handle %type.
5352 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
5353
5354 * src/parse-gram.y: More directives support.
5355 * src/options.c: No longer handle source directives.
5356
5357 * src/parse-gram.y: Fix %output.
5358
5359 * src/parse-gram.y: Handle %union.
5360 Use the prologue locations.
5361 * src/reader.c (parse_union_decl): Remove.
5362
5363 * src/reader.h, src/reader.c (epilogue_set): New.
5364 * src/parse-gram.y: Use it.
5365
5366 * data/bison.simple, data/bison.c++: b4_stype is now either not
5367 defined, then default to int, or to the contents of %union,
5368 without `union' itself.
5369 Adjust.
5370 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
5371
5372 * src/output.c (actions_output): Don't output braces, as they are
5373 already handled by the scanner.
5374
5375 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
5376 characters to themselves.
5377
5378 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
5379 that the epilogue has a proper #line.
5380
5381 * src/parse-gram.y: Handle precedence/associativity.
5382
5383 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
5384 a terminal.
5385 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
5386 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
5387 at all to define terminals that cannot be emitted.
5388
5389 * src/scan-gram.l: Escape M4 characters.
5390
5391 * src/scan-gram.l: Working properly with escapes in user
5392 strings/characters.
5393
5394 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
5395 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
5396 grammar.
5397 Use more modest sizes, as for the time being the parser does not
5398 release memory, and therefore the process swallows a huge amount
5399 of memory.
5400
5401 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
5402 stricter %token grammar.
5403
5404 * src/symtab.h (associativity): Add `undef_assoc'.
5405 (symbol_precedence_set): Do nothing when passed an undef_assoc.
5406 * src/symtab.c (symbol_check_alias_consistence): Adjust.
5407
5408 * tests/regression.at (Invalid %directive): Remove, as it is now
5409 meaningless.
5410 (Invalid inputs): Adjust to the new error messages.
5411 (Token definitions): The new grammar doesn't allow too many
5412 eccentricities.
5413
5414 * src/lex.h, src/lex.c: Remove.
5415 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
5416 (copy_character, copy_string2, copy_string, copy_identifier)
5417 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
5418 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
5419 (parse_action): Remove.
5420 * po/POTFILES.in: Adjust.
5421
5422 2002-06-11 Akim Demaille <akim@epita.fr>
5423
5424 * src/reader.c (parse_action): Don't store directly into the
5425 rule's action member: return the action as a string.
5426 Don't require `rule_length' as an argument: compute it.
5427 (grammar_current_rule_symbol_append)
5428 (grammar_current_rule_action_append): New, eved out from
5429 (readgram): here.
5430 Remove `action_flag', `rulelength', unused now.
5431
5432 2002-06-11 Akim Demaille <akim@epita.fr>
5433
5434 * src/reader.c (grammar_current_rule_prec_set).
5435 (grammar_current_rule_check): New, eved out from...
5436 (readgram): here.
5437 Remove `xaction', `first_rhs': useless.
5438 * tests/input.at (Type clashes): New.
5439 * tests/existing.at (GNU Cim Grammar): Adjust.
5440
5441 2002-06-11 Akim Demaille <akim@epita.fr>
5442
5443 * src/reader.c (grammar_midrule_action): New, Eved out from
5444 (readgram): here.
5445
5446 2002-06-11 Akim Demaille <akim@epita.fr>
5447
5448 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
5449 New.
5450 (readgram): Use them as replacement of inlined code, crule and
5451 crule1.
5452
5453 2002-06-11 Akim Demaille <akim@epita.fr>
5454
5455 * src/reader.c (grammar_end, grammar_symbol_append): New.
5456 (readgram): Use them.
5457 Make the use of `p' as local as possible.
5458
5459 2002-06-10 Akim Demaille <akim@epita.fr>
5460
5461 GCJ's parser requires the tokens to be defined before the prologue.
5462
5463 * data/bison.simple: Output the token definition before the user's
5464 prologue.
5465 * tests/regression.at (Braces parsing, Duplicate string)
5466 (Mixing %token styles): Check the output from bison.
5467 (Early token definitions): New.
5468
5469 2002-06-10 Akim Demaille <akim@epita.fr>
5470
5471 * src/symtab.c (symbol_user_token_number_set): Don't complain when
5472 assigning twice the same user number to a token, so that we can
5473 use it in...
5474 * src/lex.c (lex): here.
5475 Also use `symbol_class_set' instead of hand written code.
5476 * src/reader.c (parse_assoc_decl): Likewise.
5477
5478 2002-06-10 Akim Demaille <akim@epita.fr>
5479
5480 * src/symtab.c, src/symtab.c (symbol_class_set)
5481 (symbol_user_token_number_set): New.
5482 * src/reader.c (parse_token_decl): Use them.
5483 Use a switch instead of ifs.
5484 Use a single argument.
5485
5486 2002-06-10 Akim Demaille <akim@epita.fr>
5487
5488 Remove `%thong' support as it is undocumented, unused, duplicates
5489 `%token's job, and creates useless e-mail traffic with people who
5490 want to know what it is, why it is undocumented, unused, and
5491 duplicates `%token's job.
5492
5493 * src/reader.c (parse_thong_decl): Remove.
5494 * src/options.c (option_table): Remove "thong".
5495 * src/lex.h (tok_thong): Remove.
5496
5497 2002-06-10 Akim Demaille <akim@epita.fr>
5498
5499 * src/symtab.c, src/symtab.c (symbol_type_set)
5500 (symbol_precedence_set): New.
5501 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
5502 (value_components_used): Remove, unused.
5503
5504 2002-06-09 Akim Demaille <akim@epita.fr>
5505
5506 Move symbols handling code out of the reader.
5507
5508 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
5509 (axiom): Move to...
5510 * src/symtab.h, src/symtab.c: here.
5511
5512 * src/gram.c (start_symbol): Remove: use startsymbol->number.
5513 * src/reader.c (startval): Rename as...
5514 * src/symtab.h, src/symtab.c (startsymbol): this.
5515 * src/reader.c: Adjust.
5516
5517 * src/reader.c (symbol_check_defined, symbol_make_alias)
5518 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5519 (token_translations_init)
5520 Move to...
5521 * src/symtab.c: here.
5522 * src/reader.c (packsymbols): Move to...
5523 * src/symtab.h, src/symtab.c (symbols_pack): here.
5524 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
5525 argument.
5526
5527 2002-06-03 Akim Demaille <akim@epita.fr>
5528
5529 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
5530 then statements.
5531
5532 2002-06-03 Akim Demaille <akim@epita.fr>
5533
5534 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
5535 structs with non literals.
5536 * src/scan-skel.l: never-interactive.
5537 * src/conflicts.c (enum conflict_resolution_e): No trailing
5538 comma.
5539 * src/getargs.c (usage): Split long literal strings.
5540 Reported by Hans Aberg.
5541
5542 2002-05-28 Akim Demaille <akim@epita.fr>
5543
5544 * data/bison.c++: Use C++ ostreams.
5545 (cdebug_): New member.
5546
5547 2002-05-28 Akim Demaille <akim@epita.fr>
5548
5549 * src/output.c (output_skeleton): Be sure to allocate enough room
5550 for `/' _and_ for `\0' in full_skeleton.
5551
5552 2002-05-28 Akim Demaille <akim@epita.fr>
5553
5554 * data/bison.c++: Catch up with bison.simple:
5555 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5556 and Paul Eggert <eggert@twinsun.com>: `error' handing.
5557 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
5558 and popping traces.
5559
5560 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5561
5562 * src/output.c (output_skeleton): Put an explicit path in front of
5563 the skeleton file name, rather than relying on the -I directory,
5564 to partially alleviate effects of having a skeleton file lying around
5565 in the current directory.
5566
5567 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5568
5569 * src/conflicts.c (log_resolution): Correct typo:
5570 obstack_printf should be obstack_fgrow1.
5571
5572 2002-05-26 Akim Demaille <akim@epita.fr>
5573
5574 * src/state.h (state_t): `solved_conflicts' is a new member.
5575 * src/LR0.c (new_state): Set it to 0.
5576 * src/conflicts.h, src/conflicts.c (print_conflicts)
5577 (free_conflicts, solve_conflicts): Rename as...
5578 (conflicts_print, conflicts_free, conflicts_solve): these.
5579 Adjust callers.
5580 * src/conflicts.c (enum conflict_resolution_e)
5581 (solved_conflicts_obstack): New, used by...
5582 (log_resolution): this.
5583 Adjust to attach the conflict resolution to each state.
5584 Complete the description with the precedence/associativity
5585 information.
5586 (resolve_sr_conflict): Adjust.
5587 * src/print.c (print_state): Output its solved_conflicts.
5588 * tests/conflicts.at (Unresolved SR Conflicts)
5589 (Solved SR Conflicts): Exercise --report=all.
5590
5591 2002-05-26 Akim Demaille <akim@epita.fr>
5592
5593 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5594 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5595 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
5596 (token_number_t, item_number_as_token_number)
5597 (token_number_as_item_number, muscle_insert_token_number_table):
5598 Rename as...
5599 (symbol_number_t, item_number_as_symbol_number)
5600 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
5601 these, since it is more appropriate.
5602
5603 2002-05-26 Akim Demaille <akim@epita.fr>
5604
5605 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
5606 `Error:' lines.
5607 * data/bison.simple (yystos) [YYDEBUG]: New.
5608 (yyparse) [YYDEBUG]: Display the symbols which are popped during
5609 error recovery.
5610 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
5611
5612 2002-05-25 Akim Demaille <akim@epita.fr>
5613
5614 * doc/bison.texinfo (Debugging): Split into...
5615 (Tracing): this new section, its former contents, and...
5616 (Understanding): this new section.
5617 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
5618 by...
5619 (report_flag): this.
5620 Adjust all dependencies.
5621 (report_args, report_types, report_argmatch): New.
5622 (usage, getargs): Report/support -r, --report.
5623 * src/options.h
5624 (struct option_table_struct): Rename as..,
5625 (struct option_table_s): this.
5626 Rename the `set_flag' member to `flag' to match with getopt_long's
5627 struct.
5628 * src/options.c (option_table): Split verbose into an entry for
5629 %verbose, and another for --verbose.
5630 Support --report/-r, so remove -r from the obsolete --raw.
5631 * src/print.c: Attach full item sets and lookaheads reports to
5632 report_flag instead of trace_flag.
5633 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5634
5635 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5636 and Paul Eggert <eggert@twinsun.com>
5637
5638 * data/bison.simple (yyparse): Correct error handling to conform to
5639 POSIX and yacc. Specifically, after syntax error is discovered,
5640 do not reduce further before shifting the error token.
5641 Clean up the code a bit by removing the labels yyerrdefault,
5642 yyerrhandle, yyerrpop.
5643 * NEWS: Document the above.
5644
5645 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5646
5647 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5648 type; it isn't always big enough, since it doesn't necessarily
5649 include non-terminals.
5650 (yytranslate): Expand definition of yy_token_number_type, so that
5651 the latter can be removed.
5652 (yy_token_number_type): Remove, only one use.
5653 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5654 don't use TokenNumberType as element type.
5655
5656 * tests/regression.at: Modify expected output to agree with change
5657 to yyr1 and yytranslate.
5658
5659 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5660
5661 * src/reader.c (parse_action): Use copy_character instead of
5662 obstack_1grow.
5663
5664 2002-05-13 Akim Demaille <akim@epita.fr>
5665
5666 * tests/regression.at (Token definitions): Prototype yylex and
5667 yyerror.
5668
5669 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5670
5671 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
5672 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5673 32-bit arithmetic.
5674 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5675
5676 2002-05-07 Akim Demaille <akim@epita.fr>
5677
5678 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5679 avoid GCC warnings.
5680
5681 2002-05-07 Akim Demaille <akim@epita.fr>
5682
5683 Kill GCC warnings.
5684
5685 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5686 over the RHS of each rule.
5687 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5688 * src/state.h (state_t): Member `nitems' is unsigned short.
5689 * src/LR0.c (get_state): Adjust.
5690 * src/reader.c (packgram): Likewise.
5691 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5692 `Type'.
5693 (muscle_insert_int_table): Remove, unused.
5694 (prepare_rules): Remove `max'.
5695
5696 2002-05-06 Akim Demaille <akim@epita.fr>
5697
5698 * src/closure.c (print_firsts): Display of the symbol tags.
5699 (bitmatrix_print): Move to...
5700 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5701 here.
5702 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5703
5704 2002-05-06 Akim Demaille <akim@epita.fr>
5705
5706 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5707 hash_do_for_each.
5708
5709 2002-05-06 Akim Demaille <akim@epita.fr>
5710
5711 * src/LR0.c (new_state, get_state): Instead of using the global
5712 `kernel_size' and `kernel_base', have two new arguments:
5713 `core_size' and `core'.
5714 Adjust callers.
5715
5716 2002-05-06 Akim Demaille <akim@epita.fr>
5717
5718 * src/reader.c (packgram): No longer end `ritem' with a 0
5719 sentinel: it is not used.
5720
5721 2002-05-05 Akim Demaille <akim@epita.fr>
5722
5723 New experimental feature: display the lookaheads in the report and
5724 graph.
5725
5726 * src/print (print_core): When --trace-flag, display the rules
5727 lookaheads.
5728 * src/print_graph.c (print_core): Likewise.
5729 Swap the arguments.
5730 Adjust caller.
5731
5732 2002-05-05 Akim Demaille <akim@epita.fr>
5733
5734 * tests/torture.at (Many lookaheads): New test.
5735
5736 2002-05-05 Akim Demaille <akim@epita.fr>
5737
5738 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
5739 (GENERATE_MUSCLE_INSERT_TABLE): this.
5740 (output_int_table, output_unsigned_int_table, output_short_table)
5741 (output_token_number_table, output_item_number_table): Replace with...
5742 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
5743 (muscle_insert_short_table, muscle_insert_token_number_table)
5744 (muscle_insert_item_number_table): these.
5745 Adjust all callers.
5746 (prepare_tokens): Don't free `translations', since...
5747 * src/reader.h, src/reader.c (grammar_free): do it.
5748 Move to...
5749 * src/gram.h, src/gram.c (grammar_free): here.
5750 * data/bison.simple, data/bison.c++: b4_token_number_max is now
5751 b4_translate_max.
5752
5753 2002-05-05 Akim Demaille <akim@epita.fr>
5754
5755 * src/output.c (output_unsigned_int_table): New.
5756 (prepare_rules): `i' is unsigned.
5757 `prhs', `rline', `r2' are unsigned int.
5758 Rename muscle `rhs_number_max' as `rhs_max'.
5759 Output muscles `prhs_max', `rline_max', and `r2_max'.
5760 Free rline and r1.
5761 * data/bison.simple, data/bison.c++: Adjust to use these muscles
5762 to compute types instead of constant types.
5763 * tests/regression.at (Web2c Actions): Adjust.
5764
5765 2002-05-04 Akim Demaille <akim@epita.fr>
5766
5767 * src/symtab.h (SALIAS, SUNDEF): Rename as...
5768 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
5769 Adjust dependencies.
5770 * src/output.c (token_definitions_output): Be sure not to output a
5771 `#define 'a'' when fed with `%token 'a' "a"'.
5772 * tests/regression.at (Token definitions): New.
5773
5774 2002-05-03 Paul Eggert <eggert@twinsun.com>
5775
5776 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
5777 for K&R C.
5778
5779 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
5780
5781 * Makefile.am (SUBDIRS): Remove intl.
5782 (EXTRA_DIST): Add config/config.rpath.
5783
5784 2002-05-03 Akim Demaille <akim@epita.fr>
5785
5786 * data/bison.simple (m4_if): Don't output empty enums.
5787 And actually, output valid enum definitions :(.
5788
5789 2002-05-03 Akim Demaille <akim@epita.fr>
5790
5791 * configure.bat: Remove, completely obsolete.
5792 * Makefile.am (EXTRA_DIST): Adjust.
5793 Don't distribute config.rpath...
5794 * config/Makefile.am (EXTRA_DIST): Do it.
5795
5796 2002-05-03 Akim Demaille <akim@epita.fr>
5797
5798 * configure.in (GETTEXT_VERSION): New.
5799 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
5800
5801 2002-05-03 Akim Demaille <akim@epita.fr>
5802
5803 * data/bison.simple (b4_token_enum): New.
5804 (b4_token_defines): Use it to output tokens both as #define and
5805 enums.
5806 Suggested by Paul Eggert.
5807 * src/output.c (token_definitions_output): Don't output spurious
5808 white spaces.
5809
5810 2002-05-03 Akim Demaille <akim@epita.fr>
5811
5812 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5813
5814 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
5815
5816 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
5817 Update the stack class, give a try to deque as the default container.
5818
5819 2002-05-02 Akim Demaille <akim@epita.fr>
5820
5821 * data/bison.simple (yyparse): Do not implement @$ = @1.
5822 (YYLLOC_DEFAULT): Adjust to do it.
5823 * doc/bison.texinfo (Location Default Action): Fix.
5824
5825 2002-05-02 Akim Demaille <akim@epita.fr>
5826
5827 * src/reader.c (parse_braces): Merge into...
5828 (parse_action): this.
5829
5830 2002-05-02 Akim Demaille <akim@epita.fr>
5831
5832 * configure.in (ALL_LINGUAS): Remove.
5833 * po/LINGUAS, hr.po: New.
5834
5835 2002-05-02 Akim Demaille <akim@epita.fr>
5836
5837 Remove the so called hairy (semantic) parsers.
5838
5839 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
5840 * src/gram.h, src/gram.c (semantic_parser): Remove.
5841 (rule_t): Remove the guard and guard_line members.
5842 * src/lex.h (token_t): remove tok_guard.
5843 * src/options.c (option_table): Remove %guard and %semantic_parser
5844 support.
5845 * src/output.c, src/output.h (guards_output): Remove.
5846 (prepare): Adjust.
5847 (token_definitions_output): Don't output the `T'
5848 tokens (???).
5849 (output_skeleton): Don't output the guards.
5850 * src/files.c, src/files.c (attrsfile): Remove.
5851 * src/reader.c (symbol_list): Remove the guard and guard_line
5852 members.
5853 Adjust dependencies.
5854 (parse_guard): Remove.
5855 * data/bison.hairy: Remove.
5856 * doc/bison.texinfo (Environment Variables): Remove occurrences of
5857 BISON_HAIRY.
5858
5859 2002-05-02 Akim Demaille <akim@epita.fr>
5860
5861 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
5862 (parse_guard): Rename the formal argument `stack_offset' as
5863 `rule_length', which is more readable.
5864 Adjust callers.
5865 (copy_at, copy_dollar): Instead of outputting the hard coded
5866 values of $$, $n and so forth, output invocation to b4_lhs_value,
5867 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
5868 Note: this patch partially drops `semantic-parser' support: it
5869 always does `rule_length - n', where semantic parsers ought to
5870 always use `-n'.
5871 * data/bison.simple, data/bison.c++ (b4_lhs_value)
5872 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
5873
5874 2002-05-02 Akim Demaille <akim@epita.fr>
5875
5876 * configure.in (AC_INIT): Bump to 1.49b.
5877 (AM_INIT_AUTOMAKE): Short invocation.
5878
5879 2002-05-02 Akim Demaille <akim@epita.fr>
5880
5881 Version 1.49a.
5882
5883 2002-05-01 Akim Demaille <akim@epita.fr>
5884
5885 * src/skeleton.h: Remove.
5886
5887 2002-05-01 Akim Demaille <akim@epita.fr>
5888
5889 * src/skeleton.h: Fix the #endif.
5890 Reported by Magnus Fromreide.
5891
5892 2002-04-26 Paul Eggert <eggert@twinsun.com>
5893
5894 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
5895 Define if we define YYSTYPE and YYLTYPE, respectively.
5896 (YYCOPY): Fix [] quoting problem in the non-GCC case.
5897
5898 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
5899
5900 * src/scan-skel.l: Postprocess quadrigraphs.
5901
5902 * src/reader.c (copy_character): New function, used to output
5903 single characters while replacing `[' and `]' with quadrigraphs, to
5904 avoid troubles with M4 quotes.
5905 (copy_comment): Output characters with copy_character.
5906 (read_additionnal_code): Likewise.
5907 (copy_string2): Likewise.
5908 (copy_definition): Likewise.
5909
5910 * tests/calc.at: Exercise M4 quoting.
5911
5912 2002-04-25 Akim Demaille <akim@epita.fr>
5913
5914 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
5915 between `!' and the command.
5916 Reported by Paul Eggert.
5917
5918 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
5919
5920 * tests/calc.at: Exercise prologue splitting.
5921
5922 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
5923 `b4_post_prologue' instead of `b4_prologue'.
5924
5925 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
5926 muscles.
5927 (output): Free pre_prologue_obstack and post_prologue_obstack.
5928 * src/files.h, src/files.c (attrs_obstack): Remove.
5929 (pre_prologue_obstack, post_prologue_obstack): New.
5930 * src/reader.c (copy_definition): Add a parameter to specify the
5931 obstack to fill, instead of using attrs_obstack unconditionally.
5932 (read_declarations): Pass pre_prologue_obstack to copy_definition if
5933 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
5934
5935 2002-04-23 Paul Eggert <eggert@twinsun.com>
5936
5937 * data/bison.simple: Remove unnecessary commentary and white
5938 space differences from 1_29-branch.
5939 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
5940
5941 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
5942 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
5943 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
5944 constructors or destructors.
5945
5946 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
5947
5948 2002-04-23 Akim Demaille <akim@epita.fr>
5949
5950 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
5951 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
5952 location with columns.
5953 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
5954 All reported by Paul Eggert.
5955
5956 2002-04-22 Akim Demaille <akim@epita.fr>
5957
5958 * src/reduce.c (dump_grammar): Move to...
5959 * src/gram.h, src/gram.c (grammar_dump): here.
5960 Be sure to separate long item numbers.
5961 Don't read the members of a rule's prec if its nil.
5962
5963 2002-04-22 Akim Demaille <akim@epita.fr>
5964
5965 * src/output.c (table_size, table_grow): New.
5966 (MAXTABLE): Remove, replace uses with table_size.
5967 (pack_vector): Instead of dying when the table is too big, grow it.
5968
5969 2002-04-22 Akim Demaille <akim@epita.fr>
5970
5971 * data/bison.simple (yyr1): Its type is that of a token number.
5972 * data/bison.c++ (r1_): Likewise.
5973 * tests/regression.at (Web2c Actions): Adjust.
5974
5975 2002-04-22 Akim Demaille <akim@epita.fr>
5976
5977 * src/reader.c (token_translations_init): 256 is now the default
5978 value for the error token, i.e., it will be assigned another
5979 number if the user assigned 256 to one of her tokens.
5980 (reader): Don't force 256 to error.
5981 * doc/bison.texinfo (Symbols): Adjust.
5982 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
5983 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
5984 etc. instead of 10, 20, 30 (which was used to `jump' over error
5985 (256) and undefined (2)).
5986
5987 2002-04-22 Akim Demaille <akim@epita.fr>
5988
5989 Propagate more token_number_t.
5990
5991 * src/gram.h (token_number_as_item_number)
5992 (item_number_as_token_number): New.
5993 * src/output.c (GENERATE_OUTPUT_TABLE): New.
5994 Use it to create output_item_number_table and
5995 output_token_number_table.
5996 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5997 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
5998 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
5999 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
6000
6001 2002-04-22 Akim Demaille <akim@epita.fr>
6002
6003 * src/output.h, src/output.c (get_lines_number): Remove.
6004
6005 2002-04-19 Akim Demaille <akim@epita.fr>
6006
6007 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
6008 as Lex/Flex'.
6009 (Debugging): More details about enabling the debugging features.
6010 (Table of Symbols): Describe $$, $n, @$, and @n.
6011 Suggested by Tim Josling.
6012
6013 2002-04-19 Akim Demaille <akim@epita.fr>
6014
6015 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
6016
6017 2002-04-10 Akim Demaille <akim@epita.fr>
6018
6019 * src/system.h: Rely on HAVE_LIMITS_H.
6020 Suggested by Paul Eggert.
6021
6022 2002-04-09 Akim Demaille <akim@epita.fr>
6023
6024 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
6025 full stderr, and strip it according to the bison options, instead
6026 of composing the error message from different bits.
6027 This makes it easier to check for several error messages.
6028 Adjust all the invocations.
6029 Add an invocation exercising the error token.
6030 Add an invocation demonstrating a stupid error message.
6031 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
6032 Adjust the tests.
6033 Error message are for stderr, not stdout.
6034
6035 2002-04-09 Akim Demaille <akim@epita.fr>
6036
6037 * src/gram.h, src/gram.c (error_token_number): Remove, use
6038 errtoken->number.
6039 * src/reader.c (reader): Don't specify the user token number (2)
6040 for $undefined, as it uselessly prevents using it.
6041 * src/gram.h (token_number_t): Move to...
6042 * src/symtab.h: here.
6043 (state_t.number): Is a token_number_t.
6044 * src/print.c, src/reader.c: Use undeftoken->number instead of
6045 hard coded 2.
6046 (Even though this 2 is not the same as above: the number of the
6047 undeftoken remains being 2, it is its user token number which
6048 might not be 2).
6049 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
6050 `user_token_number_max'.
6051 Output `undef_token_number'.
6052 * data/bison.simple, data/bison.c++: Use them.
6053 Be sure to map invalid yylex return values to
6054 `undef_token_number'. This saves us from gratuitous SEGV.
6055
6056 * tests/conflicts.at (Solved SR Conflicts)
6057 (Unresolved SR Conflicts): Adjust.
6058 * tests/regression.at (Web2c Actions): Adjust.
6059
6060 2002-04-08 Akim Demaille <akim@epita.fr>
6061
6062 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
6063 Adding #line.
6064 Remove the duplicate `typedefs'.
6065 (RhsNumberType): Fix the declaration and various other typos.
6066 Use __ofile__.
6067 * data/bison.simple: Use __ofile__.
6068 * src/scan-skel.l: Handle __ofile__.
6069
6070 2002-04-08 Akim Demaille <akim@epita.fr>
6071
6072 * src/gram.h (item_number_t): New, the type of item numbers in
6073 RITEM. Note that it must be able to code symbol numbers as
6074 positive number, and the negation of rule numbers as negative
6075 numbers.
6076 Adjust all dependencies (pretty many).
6077 * src/reduce.c (rule): Remove this `short *' pointer: use
6078 item_number_t.
6079 * src/system.h (MINSHORT, MAXSHORT): Remove.
6080 Include `limits.h'.
6081 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
6082 (shortcpy): Remove.
6083 (MAXTABLE): Move to...
6084 * src/output.c (MAXTABLE): here.
6085 (prepare_rules): Use output_int_table to output rhs.
6086 * data/bison.simple, data/bison.c++: Adjust.
6087 * tests/torture.at (Big triangle): Move the limit from 254 to
6088 500.
6089 * tests/regression.at (Web2c Actions): Ajust.
6090
6091 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
6092 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
6093 passes, but produces negative #line number, once fixed, GCC is
6094 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
6095 C), it passes.
6096 * src/state.h (state_h): Code input lines on ints, not shorts.
6097
6098 2002-04-08 Akim Demaille <akim@epita.fr>
6099
6100 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
6101 and then the grammar.
6102
6103 2002-04-08 Akim Demaille <akim@epita.fr>
6104
6105 * src/system.h: No longer using strndup.
6106
6107 2002-04-07 Akim Demaille <akim@epita.fr>
6108
6109 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
6110 * src/output.c (output_table_data): Return the longest number.
6111 (prepare_tokens): Output `token_number_max').
6112 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
6113 New.
6114 Use them to define yy_token_number_type/TokenNumberType.
6115 Use this type for yytranslate.
6116 * tests/torture.at (Big triangle): Push the limit from 124 to
6117 253.
6118 * tests/regression.at (Web2c Actions): Adjust.
6119
6120 2002-04-07 Akim Demaille <akim@epita.fr>
6121
6122 * tests/torture.at (Big triangle): New.
6123 (GNU AWK Grammar, GNU Cim Grammar): Move to...
6124 * tests/existing.at: here.
6125
6126 2002-04-07 Akim Demaille <akim@epita.fr>
6127
6128 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
6129 nritems.
6130 Adjust dependencies.
6131
6132 2002-04-07 Akim Demaille <akim@epita.fr>
6133
6134 * src/reader.c: Normalize increments to prefix form.
6135
6136 2002-04-07 Akim Demaille <akim@epita.fr>
6137
6138 * src/reader.c, symtab.c: Remove debugging code.
6139
6140 2002-04-07 Akim Demaille <akim@epita.fr>
6141
6142 Rename all the `bucket's as `symbol_t'.
6143
6144 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
6145 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
6146 * src/symtab.c, src/symtab.h (bucket): Rename as...
6147 (symbol_t): this.
6148 (symbol_list_new, bucket_check_defined, bucket_make_alias)
6149 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
6150 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6151 (buckets_new, buckets_free, buckets_do): Rename as...
6152 (symbol_list_new, symbol_check_defined, symbol_make_alias)
6153 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
6154 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
6155 (symbols_new, symbols_free, symbols_do): these.
6156
6157 2002-04-07 Akim Demaille <akim@epita.fr>
6158
6159 Use lib/hash for the symbol table.
6160
6161 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
6162 EOF.
6163 * src/lex.c (lex): Set the `number' member of new terminals.
6164 * src/reader.c (bucket_check_defined, bucket_make_alias)
6165 (bucket_check_alias_consistence, bucket_translation): New.
6166 (reader, grammar_free, readgram, token_translations_init)
6167 (packsymbols): Adjust.
6168 (reader): Number the predefined tokens.
6169 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
6170 for predefined tokens.
6171 * src/symtab.h (bucket): Remove all the hash table related
6172 members.
6173 * src/symtab.c (symtab): Replace by...
6174 (bucket_table): this.
6175 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6176 (buckets_new, buckets_do): New.
6177
6178 2002-04-07 Akim Demaille <akim@epita.fr>
6179
6180 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
6181 (start_symbol, max_user_token_number, semantic_parser)
6182 (error_token_number): Initialize.
6183 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
6184 Initialize.
6185 (reader): Don't.
6186 (errtoken, eoftoken, undeftoken, axiom): Extern.
6187
6188 2002-04-07 Akim Demaille <akim@epita.fr>
6189
6190 * src/gram.h (rule_s): prec and precsym are now pointers
6191 to the bucket giving the priority/associativity.
6192 Member `associativity' removed: useless.
6193 * src/reduce.c, src/conflicts.c: Adjust.
6194
6195 2002-04-07 Akim Demaille <akim@epita.fr>
6196
6197 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
6198 Properly escape the symbols' TAG when outputting them.
6199
6200 2002-04-07 Akim Demaille <akim@epita.fr>
6201
6202 * src/lalr.h (LA): Is a bitsetv, not bitset*.
6203
6204 2002-04-07 Akim Demaille <akim@epita.fr>
6205
6206 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
6207 (LArule): this, which is an array to rule_t*.
6208 * src/print.c, src/conflicts.c: Adjust.
6209
6210 2002-04-07 Akim Demaille <akim@epita.fr>
6211
6212 * src/gram.h (rule_t): Rename `number' as `user_number'.
6213 `number' is a new member.
6214 Adjust dependencies.
6215 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
6216
6217 2002-04-07 Akim Demaille <akim@epita.fr>
6218
6219 As a result of the previous patch, it is no longer needed
6220 to reorder ritem itself.
6221
6222 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
6223
6224 2002-04-07 Akim Demaille <akim@epita.fr>
6225
6226 Be sure never to walk through RITEMS, but use only data related to
6227 the rules themselves. RITEMS should be banished.
6228
6229 * src/output.c (output_token_translations): Rename as...
6230 (prepare_tokens): this.
6231 In addition to `translate', prepare the muscles `tname' and
6232 `toknum', which were handled by...
6233 (output_rule_data): this.
6234 Remove, and move the remainder of its outputs into...
6235 (prepare_rules): this new routines, which also merges content from
6236 (output_gram): this.
6237 (prepare_rules): Be sure never to walk through RITEMS.
6238 (output_stos): Rename as...
6239 (prepare_stos): this.
6240 (output): Always invoke prepare_states, after all, just don't use it
6241 in the output if you don't need it.
6242
6243 2002-04-07 Akim Demaille <akim@epita.fr>
6244
6245 * src/LR0.c (new_state): Display `nstates' as the name of the
6246 newly created state.
6247 Adjust to initialize first_state and last_state if needed.
6248 Be sure to distinguish the initial from the final state.
6249 (new_states): Create the itemset of the initial state, and use
6250 new_state.
6251 * src/closure.c (closure): Now that the initial state has its
6252 items properly set, there is no need for a special case when
6253 creating `ruleset'.
6254
6255 As a result, now the rule 0, reducing to $axiom, is visible in the
6256 outputs. Adjust the test suite.
6257
6258 * tests/conflicts.at (Solved SR Conflicts)
6259 (Unresolved SR Conflicts): Adjust.
6260 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
6261 * tests/conflicts.at (S/R in initial): New.
6262
6263 2002-04-07 Akim Demaille <akim@epita.fr>
6264
6265 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
6266 the RHS of the rules.
6267 * src/output.c (output_gram): Likewise.
6268
6269 2002-04-07 Akim Demaille <akim@epita.fr>
6270
6271 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
6272 bucket.
6273 Adjust all dependencies.
6274 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
6275 `number' of the buckets too.
6276 * src/gram.h: Include `symtab.h'.
6277 (associativity): Move to...
6278 * src/symtab.h: here.
6279 No longer include `gram.h'.
6280
6281 2002-04-07 Akim Demaille <akim@epita.fr>
6282
6283 * src/gram.h, src/gram.c (rules_rhs_length): New.
6284 (ritem_longest_rhs): Use it.
6285 * src/gram.h (rule_t): `number' is a new member.
6286 * src/reader.c (packgram): Set it.
6287 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
6288 the end of `rules', and count them out of `nrules'.
6289 (reduce_output, dump_grammar): Adjust.
6290 * src/print.c (print_grammar): It is no longer needed to check for
6291 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
6292 * tests/reduce.at (Reduced Automaton): New test.
6293
6294 2002-04-07 Akim Demaille <akim@epita.fr>
6295
6296 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
6297 lacking `+ 1' to nrules, Bison reported as useless a token if it
6298 was used solely to set the precedence of the last rule...
6299
6300 2002-04-07 Akim Demaille <akim@epita.fr>
6301
6302 * data/bison.c++, data/bison.simple: Don't output the current file
6303 name in #line, to avoid useless diffs between two identical
6304 outputs under different names.
6305
6306 2002-04-07 Akim Demaille <akim@epita.fr>
6307
6308 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
6309 Normalize loops to using `< nrules + 1', not `<= nrules'.
6310
6311 2002-04-07 Akim Demaille <akim@epita.fr>
6312
6313 * TODO: Update.
6314
6315 2002-04-07 Akim Demaille <akim@epita.fr>
6316
6317 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
6318 bucket.value as bucket.number.
6319
6320 2002-04-07 Akim Demaille <akim@epita.fr>
6321
6322 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
6323 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
6324 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
6325 RHS, instead of being an index in RITEMS.
6326
6327 2002-04-04 Paul Eggert <eggert@twinsun.com>
6328
6329 * doc/bison.texinfo: Update copyright date.
6330 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
6331 (Symbols): Warn about running Bison in one character set,
6332 but compiling and/or running in an incompatible one.
6333 Warn about character code 256, too.
6334
6335 2002-04-03 Paul Eggert <eggert@twinsun.com>
6336
6337 * src/bison.data (YYSTACK_ALLOC): Depend on whether
6338 YYERROR_VERBOSE is nonzero, not whether it is defined.
6339
6340 Merge changes from bison-1_29-branch.
6341
6342 2002-03-20 Paul Eggert <eggert@twinsun.com>
6343
6344 Merge fixes from Debian bison_1.34-1.diff.
6345
6346 * configure.in (AC_PREREQ): 2.53.
6347
6348 2002-03-20 Akim Demaille <akim@epita.fr>
6349
6350 * src/conflicts.c (log_resolution): Argument `resolution' is const.
6351
6352 2002-03-19 Paul Eggert <eggert@twinsun.com>
6353
6354 * src/bison.simple (YYCOPY): New macro.
6355 (YYSTACK_RELOCATE): Use it.
6356 Remove Type arg; no longer needed. All callers changed.
6357 (yymemcpy): Remove; no longer needed.
6358
6359 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
6360 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6361
6362 2002-03-19 Akim Demaille <akim@epita.fr>
6363
6364 Test and fix the #line outputs.
6365
6366 * tests/atlocal.at (GCC): New.
6367 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
6368 (Prologue synch line, ,%union synch line, Postprologue synch line)
6369 (Action synch line, Epilogue synch line): New tests.
6370 * src/reader.c (parse_union_decl): Define the muscle stype_line.
6371 * data/bison.simple, data/bison.c++: Use it.
6372
6373 2002-03-19 Akim Demaille <akim@epita.fr>
6374
6375 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
6376 (Solved SR Conflicts, %expect not enough, %expect right)
6377 (%expect too much): Move to...
6378 * tests/conflicts.at: this new file.
6379
6380 2002-03-19 Akim Demaille <akim@epita.fr>
6381
6382 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6383 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
6384 that we can move to enums for instance.
6385 * src/output.c (token_definitions_output): Output a list of
6386 `token-name, token-number' instead of the #define.
6387 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
6388
6389 2002-03-14 Akim Demaille <akim@epita.fr>
6390
6391 Use Gettext 0.11.1.
6392
6393 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
6394
6395 * data/bison.c++: Make the user able to add members to the generated
6396 parser by subclassing.
6397
6398 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
6399
6400 * src/reader.c (read_additionnal_code): `c' should be an integer, not
6401 a character.
6402 Reported by Nicolas Tisserand and Nicolas Burrus.
6403
6404 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6405
6406 * src/reader.c: Warn about lacking semi-colons, do not complain.
6407
6408 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6409
6410 * data/bison.c++: Remove a debug line.
6411
6412 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6413
6414 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
6415 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
6416 provide a default implementation.
6417
6418 2002-03-04 Akim Demaille <akim@epita.fr>
6419
6420 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
6421 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
6422 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
6423 * tests/semantic.at (Parsing Guards): Similarly.
6424 * src/reader.at (readgram): Complain if the last rule is not ended
6425 with a semi-colon.
6426
6427 2002-03-04 Akim Demaille <akim@epita.fr>
6428
6429 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
6430 * src/closure.c: here.
6431 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
6432 RTC.
6433 * src/warshall.h, src/warshall.c: Remove.
6434 * tests/sets.at (Broken Closure): Adjust.
6435
6436 2002-03-04 Akim Demaille <akim@epita.fr>
6437
6438 * src/output.c (output_skeleton): tempdir is const.
6439 bytes_read is unused.
6440
6441 2002-03-04 Akim Demaille <akim@epita.fr>
6442
6443 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6444 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
6445 Update.
6446 From Michael Hayes.
6447
6448 2002-03-04 Akim Demaille <akim@epita.fr>
6449
6450 * src/closure.c (closure): `r' is unused.
6451
6452 2002-03-04 Akim Demaille <akim@epita.fr>
6453
6454 * tests/sets.at (Broken Closure): Add the ending `;'.
6455 * src/reader.at (readgram): Complain if a rule is not ended with a
6456 semi-colon.
6457
6458 2002-03-04 Akim Demaille <akim@epita.fr>
6459
6460 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
6461 (count_sr_conflicts): Use bitset_count.
6462 * src/reduce.c (inaccessable_symbols): Ditto.
6463 (bits_size): Remove.
6464 * src/warshall.h, src/warshall.c: Convert to bitsetv.
6465
6466 2002-03-04 Akim Demaille <akim@epita.fr>
6467
6468 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
6469 * src/reduce.c: Remove the `bitset_zero's following the
6470 `bitset_create's, as now it is performed by the latter.
6471
6472 2002-03-04 Akim Demaille <akim@epita.fr>
6473
6474 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
6475 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
6476 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
6477 latest sources from Michael.
6478
6479 2002-03-04 Akim Demaille <akim@epita.fr>
6480
6481 * src/output.c (output): Don't free the grammar.
6482 * src/reader.c (grammar_free): New.
6483 * src/main.c (main): Call it and don't free symtab here.
6484
6485 2002-03-04 Akim Demaille <akim@epita.fr>
6486
6487 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
6488 before returning.
6489 Reported by Benoit Perrot.
6490
6491 2002-03-04 Akim Demaille <akim@epita.fr>
6492
6493 Use bitset operations when possible, not loops over bits.
6494
6495 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
6496 bitset_or.
6497 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
6498 * src/reduce.c (useless_nonterminals): Formatting changes.
6499 * src/warshall.c (TC): Use bitset_or.
6500
6501 2002-03-04 Akim Demaille <akim@epita.fr>
6502
6503 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
6504 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
6505 Ditto.
6506
6507 2002-03-04 Akim Demaille <akim@epita.fr>
6508
6509 * src/lalr.c (F): Now a bitset*.
6510 Adjust all dependencies.
6511
6512 2002-03-04 Akim Demaille <akim@epita.fr>
6513
6514 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
6515 Adjust all dependencies.
6516
6517 2002-03-04 Akim Demaille <akim@epita.fr>
6518
6519 * src/L0.c, src/LR0.h (nstates): Be size_t.
6520 Adjust comparisons (signed vs unsigned).
6521 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
6522 bitset*.
6523 Adjust all dependencies.
6524
6525 2002-03-04 Akim Demaille <akim@epita.fr>
6526
6527 * src/closure.c (firsts): Now, also a bitset.
6528 Adjust all dependencies.
6529 (varsetsize): Remove, now unused.
6530 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
6531
6532 2002-03-04 Akim Demaille <akim@epita.fr>
6533
6534 * src/print.c: Convert to use bitset.h, not hand coded iterations
6535 over ints.
6536
6537 2002-03-04 Akim Demaille <akim@epita.fr>
6538
6539 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
6540
6541 2002-03-04 Akim Demaille <akim@epita.fr>
6542
6543 * src/closure.c (ruleset): Be a bitset.
6544 (rulesetsize): Remove.
6545
6546 2002-03-04 Akim Demaille <akim@epita.fr>
6547
6548 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6549 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
6550 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
6551 * src/closure.c (fderives): Be an array of bitsets.
6552
6553 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
6554
6555 * data/bison.c++: Merge the two generated headers. Insert a copyright
6556 notice in each output file.
6557
6558 2002-02-28 Akim Demaille <akim@epita.fr>
6559
6560 * data/bison.c++: Copy the prologue of bison.simple to fetch
6561 useful M4 definitions, such as b4_header_guard.
6562
6563 2002-02-25 Akim Demaille <akim@epita.fr>
6564
6565 * src/getargs.c (version): Give the name of the authors, and use a
6566 translator friendly scheme for the bgr
6567 copyright notice.
6568
6569 2002-02-25 Akim Demaille <akim@epita.fr>
6570
6571 * src/output.c (header_output): Remove, now handled completely via
6572 M4.
6573
6574 2002-02-25 Akim Demaille <akim@epita.fr>
6575
6576 * m4/m4.m4: New, from CVS Autoconf.
6577 * configure.in: Invoke it.
6578 * src/output.c (output_skeleton): Use its result instead of the
6579 hard coded name.
6580
6581 2002-02-25 Akim Demaille <akim@epita.fr>
6582
6583 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
6584 Fileutils 4.1.5.
6585 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
6586 * src/output.c (output_skeleton): Use mkstemp to create a real
6587 temporary file.
6588 Move the filling of `skeleton' and its muscle to...
6589 (prepare): here.
6590 (output): Move the definition of the prologue muscle to...
6591 (prepare): here.
6592 * src/system.h (DEFAULT_TMPDIR): New.
6593
6594 2002-02-14 Paul Eggert <eggert@twinsun.com>
6595
6596 Remove the support for C++ namespace cleanliness; it was
6597 causing more problems than it was curing, since it didn't work
6598 properly on some nonstandard C++ compilers. This can wait
6599 for a proper C++ parser.
6600
6601 * NEWS: Document this.
6602 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
6603 of C++, as it's treated like C now.
6604 * src/bison.simple (YYSTD): Remove.
6605 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
6606 Treat C++ just like Standard C instead of trying to support
6607 namespace cleanliness.
6608
6609 2002-02-14 Akim Demaille <akim@epita.fr>
6610
6611 * tests/regression.at (else): Adjust to Andreas' change.
6612
6613 2002-02-14 Akim Demaille <akim@epita.fr>
6614
6615 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
6616
6617 2002-02-13 Andreas Schwab <schwab@suse.de>
6618
6619 * src/output.c (output_rule_data): Don't output NULL, it might
6620 not be defined yet.
6621
6622 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
6623
6624 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6625 (Copyright notice): Update.
6626
6627 2002-02-11 Akim Demaille <akim@epita.fr>
6628
6629 * tests/regression.at (%nonassoc and eof): Don't include
6630 nonportable headers.
6631
6632 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
6633
6634 * data/bison.c++: Correct error recovery. Make the user able to
6635 initialize the starting location.
6636
6637 2002-02-07 Akim Demaille <akim@epita.fr>
6638
6639 * tests/input.at: New.
6640
6641 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6642
6643 * data/bison.c++: Replace some direct m4 expansions by constants. Be
6644 more consistent when naming methods and variables. Put preprocessor
6645 directives around tables only needed for debugging.
6646
6647 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6648
6649 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6650 C++ parsers.
6651 (yy::b4_name::parse): Use print_.
6652
6653 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6654
6655 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6656
6657 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6658
6659 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6660 C++ parsers.
6661 (yy::b4_name::parse): Build verbose error messages, and use error_.
6662
6663 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6664
6665 * data/bison.c++: Fix m4 quoting in comments.
6666
6667 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6668
6669 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6670 not expanded by m4.
6671
6672 2002-02-05 Akim Demaille <akim@epita.fr>
6673
6674 * data/bison.c++: Adjust to the M4 back end.
6675 More is certainly needed.
6676
6677 2002-02-05 Akim Demaille <akim@epita.fr>
6678
6679 Give a try to M4 as a back end.
6680
6681 * lib/readpipe.c: New, from wdiff.
6682 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6683 BISON_HAIRY.
6684 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6685 specific values. Now it is m4 that performs the lookup.
6686 * src/parse-skel.y: Remove.
6687 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6688 * src/output.c (actions_output, guards_output)
6689 (token_definitions_output): No longer keeps track of the output
6690 line number, hence remove the second argument.
6691 (guards_output): Check against the guard member of a rule, not the
6692 action member.
6693 Adjust callers.
6694 (output_skeleton): Don't look for the skeleton location, let m4 do
6695 that.
6696 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6697 file will be used.
6698 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6699 (prepare): Given that for the time being changesyntax is not
6700 usable in M4, rename the muscles using `-' to `_'.
6701 Define `defines_flag', `output_parser_name' and `output_header_name'.
6702 * src/output.h (actions_output, guards_output)
6703 (token_definitions_output): Adjust prototypes.
6704 * src/scan-skel.l: Instead of scanning the skeletons, it now
6705 processes the output of m4: `__oline__' and `#output'.
6706 * data/bison.simple: Adjust to be used by M4(sugar).
6707 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6708 to date.
6709 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6710 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6711 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6712 shamelessly stolen from CVS Autoconf.
6713
6714 2002-02-05 Akim Demaille <akim@epita.fr>
6715
6716 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
6717 * configure.in: Check for the declarations of free and malloc.
6718 * src/muscle_tab.c: Adjust.
6719
6720 2002-02-05 Akim Demaille <akim@epita.fr>
6721
6722 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
6723 which have no values.
6724
6725 2002-02-05 Akim Demaille <akim@epita.fr>
6726
6727 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
6728 * data/: here.
6729
6730 2002-01-29 Paul Eggert <eggert@twinsun.com>
6731
6732 * src/bison.simple (YYSIZE_T): Do not define merely because
6733 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
6734 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6735
6736 2002-01-27 Akim Demaille <akim@epita.fr>
6737
6738 Fix `%nonassoc and eof'.
6739
6740 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
6741 which were not properly copied! Replace
6742 memcpy (res->errs, src->errs, src->nerrs);
6743 with
6744 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
6745 !!!
6746 * tests/regression.at (%nonassoc and eof): Adjust to newest
6747 Autotest: `.' is not in the PATH.
6748
6749 2002-01-27 Akim Demaille <akim@epita.fr>
6750
6751 * tests/sets.at (AT_EXTRACT_SETS): New.
6752 (Nullable): Use it.
6753 (Firsts): New.
6754
6755 2002-01-26 Akim Demaille <akim@epita.fr>
6756
6757 * tests/actions.at, tests/calc.at, tests/headers.at,
6758 * tests/torture.at: Adjust to the newest Autotest which no longer
6759 forces `.' in the PATH.
6760
6761 2002-01-25 Akim Demaille <akim@epita.fr>
6762
6763 * tests/regression.at (%nonassoc and eof): New.
6764 Suggested by Robert Anisko.
6765
6766 2002-01-24 Akim Demaille <akim@epita.fr>
6767
6768 Bison dumps core when trying to complain about broken input files.
6769 Reported by Cris van Pelt.
6770
6771 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
6772 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
6773 into...
6774 (Invalid inputs): Strengthen: exercise parse_percent_token.
6775
6776 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
6777
6778 * src/Makefile.am: Add bison.c++.
6779 * src/bison.c++: New skeleton.
6780
6781 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
6782
6783 * po/it.po: New.
6784
6785 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6786
6787 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
6788
6789 2002-01-20 Marc Autret <marc@gnu.org>
6790
6791 * src/files.c (compute_output_file_names): Fix
6792
6793 2002-01-20 Marc Autret <marc@gnu.org>
6794
6795 * tests/output.at: New test.
6796 * src/files.c (compute_base_names): Don't map extensions when
6797 the YACC flag is set, use defaults.
6798 Reported by Evgeny Stambulchik.
6799
6800 2002-01-20 Marc Autret <marc@gnu.org>
6801
6802 * src/system.h: Need to define __attribute__ away for non-GCC
6803 compilers as well (i.e. the vendor C compiler).
6804 Suggested by Albert Chin-A-Young.
6805
6806 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
6807
6808 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
6809 canonical definition.
6810 * src/system.h: Use the canonical definition for PARAMS (avoids
6811 a conflict with the macro from lib/hash.h).
6812
6813 2002-01-11 Akim Demaille <akim@epita.fr>
6814
6815 * configure.in: Use AC_FUNC_STRNLEN.
6816 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
6817
6818 2002-01-09 Akim Demaille <akim@epita.fr>
6819
6820 * src/files.c, src/files.h (output_infix): New.
6821 (tab_extension): Remove.
6822 (compute_base_names): Compute the former, drop the latter.
6823 * src/output.c (prepare): Insert the muscles `output-infix', and
6824 `output-suffix'.
6825 * src/parse-skel.y (string, string.1): New.
6826 (section.header): Use it.
6827 (section.yacc): Remove.
6828 (prefix): Remove too.
6829 * src/scan-skel.l: Adjust.
6830 * src/bison.simple, src/bison.hairy: Adjust.
6831
6832 2002-01-09 Akim Demaille <akim@epita.fr>
6833
6834 * configure.in (WERROR_CFLAGS): Compute it.
6835 * src/Makefile.am (CFLAGS): Pass it.
6836 * tests/atlocal.in (CFLAGS): Idem.
6837 * src/files.c: Fix a few warnings.
6838 (get_extension_index): Remove, unused.
6839
6840 2002-01-08 Akim Demaille <akim@epita.fr>
6841
6842 * src/getargs.c (AS_FILE_NAME): New.
6843 (getargs): Use it to convert DOSish file names.
6844 * src/files.c (base_name): Rename as full_base_name to avoid
6845 clashes with `base_name ()'.
6846 (filename_split): New.
6847 (compute_base_names): N-th rewrite, using filename_split.
6848
6849 2002-01-08 Akim Demaille <akim@epita.fr>
6850
6851 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
6852 New, stolen from the Fileutils 4.1.
6853 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6854 * configure.in: Check for the presence of memrchr, and of its
6855 prototype.
6856
6857 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
6858
6859 * lib/hash.h (__P): Added definition for this macro.
6860 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
6861 BUILT_SOURCES, to ensure they are generated first.
6862 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
6863 %error-verbose to allow bootstrapping with bison 1.30x.
6864
6865 2002-01-06 Akim Demaille <akim@epita.fr>
6866
6867 * src/reader.c (parse_braces): Don't fetch the next char, the
6868 convention is to fetch on entry.
6869 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
6870 'switch' without a following semicolon.
6871 * tests/regression.at (braces parsing): New.
6872
6873 2002-01-06 Akim Demaille <akim@epita.fr>
6874
6875 Bison is dead wrong in its RR conflict reports.
6876
6877 * tests/torture.at (GNU Cim Grammar): New.
6878 * src/conflicts.c (count_rr_conflicts): Fix.
6879
6880 2002-01-06 Akim Demaille <akim@epita.fr>
6881
6882 Creating package.m4 from configure.ac causes too many problems.
6883
6884 * tests/Makefile.am (package.m4): Create it by hand,
6885 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
6886
6887 2002-01-06 Akim Demaille <akim@epita.fr>
6888
6889 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
6890 skeleton.h.
6891
6892 2002-01-04 Paul Eggert <eggert@twinsun.com>
6893
6894 * doc/bison.texinfo (Debugging):
6895 Remove YYSTDERR; it's no longer defined or used.
6896 Also, s/cstdio.h/cstdio/.
6897
6898 2002-01-03 Akim Demaille <akim@epita.fr>
6899
6900 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
6901
6902 2002-01-03 Akim Demaille <akim@epita.fr>
6903
6904 * src/parse-skel.y (process_skeleton): Don't bind the parser's
6905 tracing code to --trace, wait for a better --trace option, with
6906 args.
6907
6908 2002-01-03 Akim Demaille <akim@epita.fr>
6909
6910 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
6911 The ISO C++ standard is extremely clear about it: stderr is
6912 considered a macro, not a regular symbol (see table 94 `Header
6913 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
6914 Therefore std:: does not apply to it. It still does with fprintf.
6915 Also, s/cstdio.h/cstdio/.
6916
6917 2002-01-03 Akim Demaille <akim@epita.fr>
6918
6919 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
6920 for non system headers.
6921
6922 2002-01-02 Akim Demaille <akim@epita.fr>
6923
6924 Equip the skeleton chain with location tracking, runtime trace,
6925 pure parser and scanner.
6926
6927 * src/parse-skel.y: Request a pure parser, locations, and prefix
6928 renaming.
6929 (%union): Having several members with the same type does not help
6930 type mismatches, simplify.
6931 (YYPRINT, yyprint): New.
6932 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
6933 (skel_error): this.
6934 Handle locations.
6935 * src/scan-skel.l: Adjust to these changes.
6936 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
6937 (LOCATION_PRINT, skel_control_t): New.
6938
6939 2001-12-30 Akim Demaille <akim@epita.fr>
6940
6941 * src/parse-skel.y: Get rid of the shift/reduce conflict:
6942 replace `gb' with BLANKS.
6943 * src/scan-skel.l: Adjust.
6944
6945 2001-12-30 Akim Demaille <akim@epita.fr>
6946
6947 * src/system.h: We don't need nor want bcopy.
6948 Throw away MS-DOS crap: we don't need getpid.
6949 * configure.in: We don't need strndup. It was even causing
6950 problems: because Flex includes the headers *before* us,
6951 _GNU_SOURCE is not defined by config.h, and therefore strndup was
6952 not visible.
6953 * lib/xstrndup.c: New.
6954 * src/scan-skel.l: Use it.
6955 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
6956 * src/parse-skel.y: Use %directives instead of #defines.
6957
6958 2001-12-30 Akim Demaille <akim@epita.fr>
6959
6960 * src/skeleton.h: New.
6961 * src/output.c (output_parser, output_master_parser): Remove, dead
6962 code.
6963 * src/output.h (get_lines_number, actions_output, guards_output)
6964 (token_definitions_output): Prototype them.
6965 * src/parse-skel.y: Add the license notice.
6966 Include output.h and skeleton.h.
6967 (process_skeleton): Returns void, and takes a single parameter.
6968 * src/scan-skel.l: Add the license notice.
6969 Include skeleton.h.
6970 Don't use %option yylineno: it seems that then Flex imagines
6971 REJECT has been used, and therefore it won't reallocate its
6972 buffers (which makes no other sense to me than a bug). It results
6973 in warnings for `unused: yy_flex_realloc'.
6974
6975 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
6976
6977 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6978 (MUSCLE_INSERT_PREFIX): ...to there.
6979 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6980 (MUSCLE_INSERT_PREFIX): Move from here...
6981
6982 * src/bison.hairy: Add a section directive. Put braces around muscle
6983 names. This parser skeleton is still broken, but Bison should not
6984 choke on a bad muscle 'syntax'.
6985 * src/bison.simple: Add a section directive. Put braces around muscle
6986 names.
6987
6988 * src/files.h (strsuffix, stringappend): Add declarations.
6989 (tab_extension): Add declaration.
6990 (short_base_name): Add declaration.
6991
6992 * src/files.c (strsuffix, stringappend): No longer static. These
6993 functions are used in the skeleton parser.
6994 (tab_extension): New.
6995 (compute_base_names): Use the computations done in this function
6996 to guess if the generated parsers should have '.tab' in their
6997 names.
6998 (short_base_name): No longer static.
6999
7000 * src/output.c (output_skeleton): New.
7001 (output): Disable call to output_master_parser, and give a try to
7002 a new skeleton handling system.
7003 (guards_output, actions_output): No longer static.
7004 (token_definitions_output, get_lines_number): No longer static.
7005
7006 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
7007
7008 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
7009 parse-skel.y.
7010
7011 * src/parse-skel.y: New file.
7012 * src/scan-skel.l: New file.
7013
7014 2001-12-29 Akim Demaille <akim@epita.fr>
7015
7016 %name-prefix is broken.
7017
7018 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
7019 Adjust all dependencies.
7020 * tests/headers.at (export YYLTYPE): Strengthen this test: use
7021 %name-prefix.
7022
7023 Renaming yylval but not yylloc is not consistent. Now we do.
7024
7025 * src/bison.simple: Prefix yylloc if used.
7026 * doc/bison.texinfo (Decl Summary): Document that.
7027
7028 2001-12-29 Akim Demaille <akim@epita.fr>
7029
7030 * doc/bison.texinfo: Promote `%long-directive' over
7031 `%long_directive'.
7032 Remove all references to fixed-output-files, yacc is enough.
7033
7034 2001-12-29 Akim Demaille <akim@epita.fr>
7035
7036 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
7037 user prologue. These are defaults.
7038 * tests/actions.at (Mid-rule actions): Make sure the user can
7039 define YYDEBUG and YYERROR_VERBOSE.
7040
7041 2001-12-29 Akim Demaille <akim@epita.fr>
7042
7043 * src/output.c (header_output): Don't forget to export YYLTYPE and
7044 yylloc.
7045 * tests/headers.at (export YYLTYPE): New, make sure it does.
7046 * tests/regression.at (%union and --defines, Invalid CPP headers):
7047 Move to...
7048 * tests/headers.at: here.
7049
7050 2001-12-29 Akim Demaille <akim@epita.fr>
7051
7052 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
7053
7054 2001-12-29 Akim Demaille <akim@epita.fr>
7055
7056 * tests/actions.at (Mid-rule actions): Output on a single line
7057 instead of several.
7058
7059 2001-12-29 Akim Demaille <akim@epita.fr>
7060
7061 * doc/bison.texinfo: Formatting changes.
7062
7063 2001-12-29 Akim Demaille <akim@epita.fr>
7064
7065 Don't store the token defs in a muscle, just be ready to output it
7066 on command. Now possible via `symbols'. Fixes a memory leak.
7067
7068 * src/output.c (token_definitions_output): New.
7069 (output_parser, header_output): Use it.
7070 * src/reader.c (symbols_save): Remove.
7071
7072 2001-12-29 Akim Demaille <akim@epita.fr>
7073
7074 * src/bison.simple: Do not provide a default for YYSTYPE and
7075 YYLTYPE before the user's prologue. Otherwise it's hardly... a
7076 default.
7077
7078 2001-12-29 Akim Demaille <akim@epita.fr>
7079
7080 Mid-rule actions are simply... ignored!
7081
7082 * src/reader.c (readgram): Be sure to attach mid-rule actions to
7083 the empty-rule associated to the dummy symbol, not to the host
7084 rule.
7085 * tests/actions.at (Mid-rule actions): New.
7086
7087 2001-12-29 Akim Demaille <akim@epita.fr>
7088
7089 Memory leak.
7090
7091 * src/reader.c (reader): Free grammar.
7092
7093 2001-12-29 Akim Demaille <akim@epita.fr>
7094
7095 Memory leak.
7096
7097 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
7098 since it allocates it for each state, although only one is needed.
7099 (allocate_storage): Do it here.
7100
7101 2001-12-29 Akim Demaille <akim@epita.fr>
7102
7103 * src/options.h, src/options.c (create_long_option_table): Rename
7104 as...
7105 (long_option_table_new): this, with a clearer prototype.
7106 (percent_table): Remove, unused,
7107 * src/getargs.c (getargs): Adjust.
7108
7109 2001-12-29 Akim Demaille <akim@epita.fr>
7110
7111 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
7112 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
7113 as states.
7114
7115 2001-12-29 Akim Demaille <akim@epita.fr>
7116
7117 * src/lalr.c (build_relations): Rename `states' as `states1'.
7118 Sorry, I don't understand exactly what it is, no better name...
7119
7120 2001-12-29 Akim Demaille <akim@epita.fr>
7121
7122 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
7123 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
7124 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
7125 as rules.
7126
7127 2001-12-29 Akim Demaille <akim@epita.fr>
7128
7129 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
7130 ago.
7131
7132 2001-12-29 Akim Demaille <akim@epita.fr>
7133
7134 * src/reader.c, src/reader.h (user_toknums): Remove.
7135 Adjust all users to use symbols[i]->user_token_number.
7136
7137 2001-12-29 Akim Demaille <akim@epita.fr>
7138
7139 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
7140 Adjust all users to use symbols[i]->prec or ->assoc.
7141
7142 2001-12-29 Akim Demaille <akim@epita.fr>
7143
7144 * src/reader.c, src/reader.h (tags): Remove.
7145 Adjust all users to use symbols[i]->tag.
7146
7147 2001-12-29 Akim Demaille <akim@epita.fr>
7148
7149 * src/gram.h, src/gram.c (symbols): New, similar to state_table
7150 and rule_table.
7151 * src/reader.c (packsymbols): Fill this table.
7152 Drop sprec.
7153 * src/conflicts.c (resolve_sr_conflict): Adjust.
7154 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
7155 single table.
7156 Use symbols[i]->tag instead of tags[i].
7157
7158 2001-12-29 Akim Demaille <akim@epita.fr>
7159
7160 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
7161 In addition, put a comment in there, to replace...
7162 * tests/regression.at (%union and C comments): Remove.
7163
7164 2001-12-29 Akim Demaille <akim@epita.fr>
7165
7166 * tests/regression.at (Web2c Actions): Blindly move the actual
7167 output as expected output. The contents *seem* right to me, but I
7168 can't pretend reading perfectly parser tables... Nonetheless, all
7169 the other tests pass correctly, the table look OK, even though the
7170 presence of `$axiom' is to be noted: AFAICS it is useless (but
7171 harmless).
7172
7173 2001-12-29 Akim Demaille <akim@epita.fr>
7174
7175 * src/reader.c (readgram): Don't add the rule 0 if there were no
7176 rules read. In other words, add it _after_ having performed
7177 grammar sanity checks.
7178 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
7179
7180 2001-12-29 Akim Demaille <akim@epita.fr>
7181
7182 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
7183 visible, and some states have now a different number.
7184
7185 2001-12-29 Akim Demaille <akim@epita.fr>
7186
7187 * src/reader.c (readgram): Bind the initial rule's lineno to that
7188 of the first rule.
7189 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
7190 (Solved SR Conflicts): Adjust rule 0's line number.
7191
7192 2001-12-29 Akim Demaille <akim@epita.fr>
7193
7194 Fix the `GAWK Grammar' failure.
7195
7196 * src/LR0.c (final_state): Initialize to -1 so that we do compute
7197 the reductions of the first state which was mistakenly confused
7198 with the final state because precisely final_state was initialized
7199 to 0.
7200 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
7201 now noticed by Bison.
7202 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
7203 have a reduction on $default.
7204
7205 2001-12-29 Akim Demaille <akim@epita.fr>
7206
7207 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
7208 rule line numbers.
7209 * src/closure.c (print_closure): Likewise.
7210 * src/derives.c (print_derives): Likewise.
7211 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
7212 now.
7213
7214 2001-12-29 Akim Demaille <akim@epita.fr>
7215
7216 * src/lalr.c (lookaheads_print): New.
7217 (lalr): Call it when --trace-flag.
7218 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
7219 are dumped.
7220
7221 2001-12-29 Akim Demaille <akim@epita.fr>
7222
7223 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
7224 when walking through ritem, even via rule->rhs.
7225 * src/reduce.c (dump_grammar, useful_production, reduce_output)
7226 (useful_production, useless_nonterminals): Likewise.
7227 (reduce_grammar_tables): Likewise, plus update nritems.
7228 * src/nullable.c (set_nullable): Likewise.
7229 * src/lalr.c (build_relations): Likewise.
7230 * tests/sets.at (Nullable): Adjust.
7231 Fortunately, now, the $axiom is no longer nullable.
7232
7233 2001-12-29 Akim Demaille <akim@epita.fr>
7234
7235 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
7236 the 0-sentinel.
7237 * src/gram.c (ritem_longest_rhs): Likewise.
7238 * src/reduce.c (nonterminals_reduce): Likewise.
7239 * src/print_graph.c (print_graph): Likewise.
7240 * src/output.c (output_rule_data): Likewise.
7241 * src/nullable.c (set_nullable): Likewise.
7242
7243 2001-12-29 Akim Demaille <akim@epita.fr>
7244
7245 * src/output.c: Comment changes.
7246
7247 2001-12-27 Paul Eggert <eggert@twinsun.com>
7248
7249 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
7250 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
7251 Sparc, as they were causing more porting problems than the
7252 (minor) performance improvement was worth.
7253
7254 Also, catch up with 1.31's YYSTD.
7255
7256 2001-12-27 Akim Demaille <akim@epita.fr>
7257
7258 * src/output.c (output_gram): Rely on nritems, not the
7259 0-sentinel. See below.
7260 Use -1 as separator, not 0.
7261 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
7262 Rely on -1 as separator in yyrhs, instead of 0.
7263 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
7264 twice `Now at end of input', therefore there are two lines less to
7265 expect.
7266
7267 2001-12-27 Akim Demaille <akim@epita.fr>
7268
7269 * tests/regression.at (Unresolved SR Conflicts):
7270 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
7271 below.
7272
7273 2001-12-27 Akim Demaille <akim@epita.fr>
7274
7275 * src/LR0.c (new_state): Recognize the final state by the fact it
7276 is reached by eoftoken.
7277 (insert_start_shifting_state, insert_eof_shifting_state)
7278 (insert_accepting_state, augment_automaton): Remove, since now
7279 these states are automatically computed from the initial state.
7280 (generate_states): Adjust.
7281 * src/print.c: When reporting a rule number to the user, substract
7282 1, so that the axiom rule is rule 0, and the first user rule is 1.
7283 * src/reduce.c: Likewise.
7284 * src/print_graph.c (print_core): For the time being, just as for
7285 the report, depend upon --trace-flags to dump the full set of
7286 items.
7287 * src/reader.c (readgram): Once the grammar read, insert the rule
7288 0: `$axiom: START-SYMBOL $'.
7289 * tests/set.at: Adjust: rule 0 is now displayed, and since the
7290 number of the states has changed (the final state is no longer
7291 necessarily the last), catch up.
7292
7293 2001-12-27 Akim Demaille <akim@epita.fr>
7294
7295 Try to make the use of the eoftoken valid. Given that its value
7296 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
7297 is used instead of > 0 where appropriate, (ii), depend upon nritems
7298 instead of the 0-sentinel.
7299
7300 * src/gram.h, src/gram.c (nritems): New.
7301 Expected to be duplication of nitems, but for the time being...
7302 * src/reader.c (packgram): Assert nritems and nitems are equal.
7303 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
7304 * src/closure.c (print_closure, print_fderives): Likewise.
7305 * src/gram.c (ritem_print): Likewise.
7306 * src/print.c (print_core, print_grammar): Likewise.
7307 * src/print_graph.c: Likewise.
7308
7309 2001-12-27 Akim Demaille <akim@epita.fr>
7310
7311 * src/main.c (main): If there are complains after grammar
7312 reductions, then output the report anyway if requested, then die.
7313 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
7314 * src/reader.c (eoftoken): New.
7315 (parse_token_decl): If the token being defined has value `0', it
7316 is the eoftoken.
7317 (packsymbols): No longer hack `tags' to insert `$' by hand.
7318 Be sure to preserve the value of the eoftoken.
7319 (reader): Make sure eoftoken is defined.
7320 Initialize nsyms to 0: now eoftoken is created just like the others.
7321 * src/print.c (print_grammar): Don't special case the eof token.
7322 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
7323 lie anyway, albeit pleasant.
7324 * tests/calc.at: Exercise error messages with eoftoken.
7325 Change the grammar so that empty input is invalid.
7326 Adjust expectations.
7327 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
7328
7329 2001-12-27 Akim Demaille <akim@epita.fr>
7330
7331 * configure.in: Check the protos of strchr ans strspn.
7332 Replace strchr if needed.
7333 * src/system.h: Provide the protos of strchr, strspn and memchr if
7334 missing.
7335 * lib/strchr.c: New.
7336 * src/reader.c (symbols_save): Use strchr.
7337
7338 2001-12-27 Akim Demaille <akim@epita.fr>
7339
7340 * src/print.c, src/print_graph.c (escape): New.
7341 Use it to quote the TAGS outputs.
7342 * src/print_graph.c (print_state): Now errors are in red, and
7343 reductions in green.
7344 Prefer high to wide: output the state number on a line of its own.
7345
7346 2001-12-27 Akim Demaille <akim@epita.fr>
7347
7348 * src/state.h, src/state.c (reductions_new): New.
7349 * src/LR0.c (set_state_table): Let all the states have a
7350 `reductions', even if reduced to 0.
7351 (save_reductions): Adjust.
7352 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
7353 * src/print.c (print_reductions, print_actions): Adjust.
7354 * src/output.c (action_row): Adjust.
7355
7356 2001-12-27 Akim Demaille <akim@epita.fr>
7357
7358 * src/state.h, src/state.c (errs_new, errs_dup): New.
7359 * src/LR0.c (set_state_table): Let all the states have an errs,
7360 even if reduced to 0.
7361 * src/print.c (print_errs, print_reductions): Adjust.
7362 * src/output.c (output_actions, action_row): Adjust.
7363 * src/conflicts.c (resolve_sr_conflict): Adjust.
7364
7365 2001-12-27 Akim Demaille <akim@epita.fr>
7366
7367 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
7368
7369 2001-12-27 Akim Demaille <akim@epita.fr>
7370
7371 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
7372 * src/print.c: here.
7373 (lookaheadset, shiftset): New, used as additional storage by
7374 print_reductions.
7375 (print_results): Adjust.
7376 (print_shifts, print_gotos, print_errs): New, extracted from...
7377 (print_actions): here.
7378 * src/print_graph.c (print_actions): Remove dead code.
7379
7380 2001-12-27 Akim Demaille <akim@epita.fr>
7381
7382 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
7383 `$n' and `@n'.
7384
7385 2001-12-27 Akim Demaille <akim@epita.fr>
7386
7387 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
7388 (build_relations): Adjust.
7389
7390 2001-12-27 Akim Demaille <akim@epita.fr>
7391
7392 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
7393 duplication.
7394
7395 2001-12-27 Akim Demaille <akim@epita.fr>
7396
7397 * src/reader.c (packgram): Catch nitems overflows.
7398
7399 2001-12-27 Akim Demaille <akim@epita.fr>
7400
7401 * src/files.c, src/files.h (guard_obstack): Remove.
7402 * src/output.c (output): Adjust.
7403 * src/reader.c (parse_braces): New, factoring...
7404 (copy_action, copy_guard): these two which are renamed as...
7405 (parse_action, parse_guard): these.
7406 As a voluntary consequence, using braces around guards is now
7407 mandatory.
7408
7409 2001-12-27 Akim Demaille <akim@epita.fr>
7410
7411 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
7412 * src/reader.c (symbol_list): `guard' and `guard_line' are new
7413 members.
7414 (symbol_list_new): Adjust.
7415 (copy_action): action_line is the first line, not the last.
7416 (copy_guard): Just as for actions, store the `action' only, not
7417 the switch/case/break flesh.
7418 Don't parse the user action that might follow the guard, let...
7419 (readgram): do it, i.e., now, there can be an action after a
7420 guard.
7421 In other words the guard is just explicitly optional.
7422 (packgram): Adjust.
7423 * src/output.c (guards_output): New.
7424 (output_parser): Call it when needed.
7425 (output): Also free the guard and attrs obstacks.
7426 * src/files.c, src/files.h (obstack_save): Remove.
7427 (output_files): Remove.
7428 As a result, if one needs the former `.act' file, using an
7429 appropriate skeleton which requires actions and guards is now
7430 required.
7431 * src/main.c (main): Adjust.
7432 * tests/semantic.at: New.
7433 * tests/regression.at: Use `input.y' as input file name.
7434 Avoid 8+3 problems by requiring input.c when the test needs the
7435 parser.
7436
7437 2001-12-27 Akim Demaille <akim@epita.fr>
7438
7439 * src/reader.c (symbol_list_new): Be sure to initialize all the
7440 fields.
7441
7442 2001-12-27 Akim Demaille <akim@epita.fr>
7443
7444 All the hacks using a final pseudo state are now useless.
7445
7446 * src/LR0.c (set_state_table): state_table holds exactly nstates.
7447 * src/lalr.c (nLA): New.
7448 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
7449 instead of lookaheadsp from the pseudo state (nstate + 1).
7450
7451 2001-12-27 Akim Demaille <akim@epita.fr>
7452
7453 * src/output.c (action_row, token_actions): Use a state_t instead
7454 of a integer, and nlookaheads instead of the following state's
7455 lookaheadsp.
7456
7457 2001-12-27 Akim Demaille <akim@epita.fr>
7458
7459 * src/conflicts.c (log_resolution, flush_shift)
7460 (resolve_sr_conflict, set_conflicts, solve_conflicts)
7461 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
7462 (conflicts_print, print_reductions): Use a state_t instead of an
7463 integer when referring to a state.
7464 As much as possible, depend upon nlookaheads, instead of the
7465 `lookaheadsp' member of the following state (since lookaheads of
7466 successive states are successive, the difference between state n + 1
7467 and n served as the number of lookaheads for state n).
7468 * src/lalr.c (add_lookback_edge): Likewise.
7469 * src/print.c (print_core, print_actions, print_state)
7470 (print_results): Likewise.
7471 * src/print_graph.c (print_core, print_actions, print_state)
7472 (print_graph): Likewise.
7473 * src/conflicts.h: Adjust.
7474
7475 2001-12-27 Akim Demaille <akim@epita.fr>
7476
7477 * src/bison.hairy: Formatting/comment changes.
7478 ANSIfy.
7479 Remove `register' indications.
7480 Add plenty of `static'.
7481
7482 2001-12-27 Akim Demaille <akim@epita.fr>
7483
7484 * src/output.c (prepare): Drop the muscle `ntbase' which
7485 duplicates ntokens.
7486 * src/bison.simple: Formatting/comment changes.
7487 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
7488 is an undocumented synonym.
7489
7490 2001-12-22 Akim Demaille <akim@epita.fr>
7491
7492 * src/output.c (output_table_data): Change the prototype to use
7493 `int' for array ranges: some invocations do pass an int, not a
7494 short.
7495 Reported by Wayne Green.
7496
7497 2001-12-22 Akim Demaille <akim@epita.fr>
7498
7499 Some actions of web2c.y are improperly triggered.
7500 Reported by Mike Castle.
7501
7502 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
7503 * tests/regression.at (Web2c): Rename as...
7504 (Web2c Report): this.
7505 (Web2c Actions): New.
7506
7507 2001-12-22 Akim Demaille <akim@epita.fr>
7508
7509 Reductions in web2c.y are improperly reported.
7510 Reported by Mike Castle.
7511
7512 * src/conflicts.c (print_reductions): Fix.
7513 * tests/regression.at (Web2c): New.
7514
7515 2001-12-18 Akim Demaille <akim@epita.fr>
7516
7517 Some host fail on `assert (!"foo")', which expands to
7518 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
7519 Reported by Nelson Beebee.
7520
7521 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
7522 `#define it_succeeded 0' and `assert (it_succeeded)'.
7523
7524 2001-12-17 Marc Autret <autret_m@epita.fr>
7525
7526 * src/bison.simple: Don't hard code the skeleton line and filename.
7527 * src/output.c (output_parser): Rename 'line' as 'output_line'.
7528 New line counter 'skeleton_line' (skeleton-line muscle).
7529
7530 2001-12-17 Paul Eggert <eggert@twinsun.com>
7531
7532 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
7533 YYDEBUG must be defined to a nonzero value.
7534
7535 * src/bison.simple (yytname): Do not assume that the user defines
7536 YYDEBUG to a properly parenthesized expression.
7537
7538 2001-12-17 Akim Demaille <akim@epita.fr>
7539
7540 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
7541 nlookaheads is a new member.
7542 Adjust all users.
7543 * src/lalr.h (nlookaheads): Remove this orphan declaration.
7544 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
7545 state.
7546
7547 2001-12-17 Akim Demaille <akim@epita.fr>
7548
7549 * src/files.h, src/files.c (open_files, close_files): Remove.
7550 * src/main.c (main): Don't open/close files, nor invoke lex_free,
7551 let...
7552 * src/reader.c (reader): Do it.
7553
7554 2001-12-17 Akim Demaille <akim@epita.fr>
7555
7556 * src/conflicts.c (print_reductions): Formatting changes.
7557
7558 2001-12-17 Akim Demaille <akim@epita.fr>
7559
7560 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
7561 (flush_reduce): New.
7562 (resolve_sr_conflict): Adjust.
7563
7564 2001-12-17 Akim Demaille <akim@epita.fr>
7565
7566 * src/output.c (output_obstack): Be static and rename as...
7567 (format_obstack): this, to avoid any confusion with files.c's
7568 output_obstack.
7569 * src/reader.h (muscle_obstack): Move to...
7570 * src/output.h: here, since it's defined in output.c.
7571
7572 2001-12-17 Akim Demaille <akim@epita.fr>
7573
7574 * src/output.c (action_row, save_column, default_goto)
7575 (sort_actions, matching_state, pack_vector): Better variable
7576 locality.
7577
7578 2001-12-17 Akim Demaille <akim@epita.fr>
7579
7580 * src/output.c: Various formatting changes.
7581
7582 2001-12-17 Akim Demaille <akim@epita.fr>
7583
7584 * src/files.c (output_files): Free the output_obstack.
7585 * src/main.c (main): Call print and print_graph conditionally.
7586 * src/print.c (print): Work unconditionally.
7587 * src/print_graph.c (print_graph): Work unconditionally.
7588 * src/conflicts.c (log_resolution): Output only if verbose_flag.
7589
7590 2001-12-16 Marc Autret <autret_m@epita.fr>
7591
7592 * src/output.c (actions_output): Fix. When we use %no-lines,
7593 there is one less line per action.
7594
7595 2001-12-16 Marc Autret <autret_m@epita.fr>
7596
7597 * src/bison.simple: Remove a useless #line directive.
7598 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
7599 * src/output.c (get_lines_number): New.
7600 (output_parser): Adjust, now takes care about the lines of a
7601 output muscles.
7602 Fix line numbering.
7603 (actions_output): Computes the number of lines taken by actions.
7604 (output_master_parser): Insert new skeleton which is the name of
7605 the output parser file name.
7606
7607 2001-12-15 Marc Autret <autret_m@epita.fr>
7608
7609 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
7610
7611 2001-12-15 Marc Autret <autret_m@epita.fr>
7612
7613 * src/output.c (output_gram): Keep track of the hairy one.
7614
7615 2001-12-15 Akim Demaille <akim@epita.fr>
7616
7617 Make `make distcheck' work.
7618
7619 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
7620 system.h which uses libgettext.h.
7621
7622 2001-12-15 Akim Demaille <akim@epita.fr>
7623
7624 * src/nullable.c (set_nullable): Useless rules must be skipped,
7625 otherwise, since we range over their symbols, we might look at a
7626 nonterminal which no longer ``exists'', i.e., it is not counted in
7627 `nvars', hence we overflow our arrays.
7628
7629 2001-12-15 Akim Demaille <akim@epita.fr>
7630
7631 The header can also be produced directly, without any obstack!
7632 Yahoo!
7633
7634 * src/files.c, src/files.h (defines_obstack): Remove.
7635 (compute_header_macro): Global.
7636 (defines_obstack_save): Remove.
7637 * src/reader.c (parse_union_decl): No longer output to
7638 defines_obstack: its content can be found in the `stype' muscle
7639 anyway.
7640 (output_token_translations): Merge into...
7641 (symbols_output): this.
7642 Rename as...
7643 (symbols_save): this.
7644 (reader): Adjust.
7645 * src/output.c (header_output): New.
7646 (output): Call it.
7647
7648 2001-12-15 Akim Demaille <akim@epita.fr>
7649
7650 * src/reader.c (parse_union_decl): Instead of handling two obstack
7651 simultaneously, use one to define the `stype' muscle, and use the
7652 value of the latter to fill defines_obstack.
7653 (copy_comment): Remove.
7654 (copy_comment2): Work for a single obstack.
7655 Rename as...
7656 (copy_comment): this.
7657
7658 2001-12-15 Akim Demaille <akim@epita.fr>
7659
7660 * src/lex.c, src/lex.h (xgetc): No longer static.
7661 * src/reader.c (parse_union_decl): Revamp.
7662
7663 2001-12-15 Akim Demaille <akim@epita.fr>
7664
7665 Still making progress in separating Bison into (i) input, (ii)
7666 process, (iii) output: now we can directly output the parser file
7667 without using table_obstack at all.
7668
7669 * src/files.c, src/files.h (table_obstack): Bye bye.
7670 (parser_file_name): New.
7671 * src/files.c (compute_output_file_names): Compute it.
7672 * src/output.c (actions_output, output_parser)
7673 (output_master_parser): To a file instead of an obstack.
7674
7675 2001-12-15 Akim Demaille <akim@epita.fr>
7676
7677 Attach actions to rules, instead of pre-outputting them to
7678 actions_obstack.
7679
7680 * src/gram.h (rule_t): action and action_line are new members.
7681 * src/reader.c (symbol_list): Likewise.
7682 (copy_action): Save the actions within the rule.
7683 (packgram): Save them in rule_table.
7684 * src/output.c (actions_output): New.
7685 (output_parser): Use it on `%%actions'.
7686 (output_rule_data): Don't free rule_table.
7687 (output): Do it.
7688 (prepare): Don't save the `action' muscle.
7689 * src/bison.simple: s/%%action/%%actions/.
7690
7691 2001-12-15 Akim Demaille <akim@epita.fr>
7692
7693 * src/reader.c (copy_action): When --yacc, don't append a `;'
7694 to the user action: let it fail if lacking.
7695 Suggested by Arnold Robbins and Tom Tromey.
7696
7697 2001-12-14 Akim Demaille <akim@epita.fr>
7698
7699 * src/lex.c (literalchar): Simply return the char you decoded, non
7700 longer mess around with obstacks and int pointers.
7701 Adjust all callers.
7702
7703 2001-12-14 Akim Demaille <akim@epita.fr>
7704
7705 * src/lex.c (literalchar): Don't escape the special characters,
7706 just decode them, and keep them as char (before, eol was output as
7707 the 2 char string `\n' etc.).
7708 * src/output.c (output_rule_data): Use quotearg to output the
7709 token strings.
7710
7711 2001-12-13 Paul Eggert <eggert@twinsun.com>
7712
7713 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
7714 Do not infringe on the global user namespace when using C++.
7715 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
7716 All uses of `fprintf' and `stderr' changed.
7717
7718 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
7719
7720 2001-12-13 Akim Demaille <akim@epita.fr>
7721
7722 The computation of nullable is broken: it doesn't handle empty
7723 RHS's properly.
7724
7725 * tests/torture.at (GNU AWK Grammar): New.
7726 * tests/sets.at (Nullable): New.
7727 * src/nullable.c (set_nullable): Instead of blindly looping over
7728 `ritems', loop over the rules, and then over their rhs's.
7729
7730 Work around Autotest bugs.
7731
7732 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
7733 frame, because Autotest understand lines starting with a `+' as
7734 traces from the shell. Then, they are not processed properly.
7735 Admittedly an Autotest bug, but we don't have time to wait for
7736 Autotest to catch up.
7737 * tests/regression.at (Broken Closure): Adjust to the new table
7738 frames.
7739 Move to...
7740 * tests/sets.at: here.
7741
7742 2001-12-13 Akim Demaille <akim@epita.fr>
7743
7744 * src/closure.c (closure): Use nrules instead of playing tricks
7745 with BITS_PER_WORD.
7746
7747 2001-12-13 Akim Demaille <akim@epita.fr>
7748
7749 * src/print.c (print_actions): Output the handling of `$' as the
7750 traces do: shifting the token EOF. Before EOF was treated as a
7751 nonterminal.
7752 * tests/regression.at: Adjust some tests.
7753 * src/print_graph.c (print_core): Complete the set of items via
7754 closure. The next-to-final and final states are still unsatisfying,
7755 but that's to be addressed elsewhere.
7756 No longer output the rule numbers, but do output the state number.
7757 A single loop for the shifts + gotos is enough, but picked a
7758 distinct color for each.
7759 (print_graph): Initialize and finalize closure.
7760
7761 2001-12-13 Akim Demaille <akim@epita.fr>
7762
7763 * src/reader.c (readgram): Remove dead code, an strip useless
7764 braces.
7765 (get_type): Remove, unused.
7766
7767 2001-12-12 Akim Demaille <akim@epita.fr>
7768
7769 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
7770 on that of lib/error.c.
7771
7772 2001-12-12 Akim Demaille <akim@epita.fr>
7773
7774 Some hosts don't like `/' in includes.
7775
7776 * src/system.h: Include libgettext.h without qualifying the path.
7777 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
7778 $(top_srcdir).
7779
7780 2001-12-11 Marc Autret <autret_m@epita.fr>
7781
7782 * src/output.c (output_parser): Remove useless muscle.
7783
7784 2001-12-11 Marc Autret <autret_m@epita.fr>
7785
7786 * src/bison.simple: Remove #line just before %%epilogue. It
7787 is now handled in ...
7788 * src/reader.c (read_additionnal_code): Add the output of a
7789 #line for the epilogue.
7790
7791 2001-12-10 Marc Autret <autret_m@epita.fr>
7792
7793 * src/reader.c (copy_definition): Re-use CPP-outed code which
7794 replace precedent remove.
7795 * src/bison.simple: Remove #line before %%prologue because
7796 %%input-line is wrong at this time.
7797
7798 2001-12-10 Marc Autret <autret_m@epita.fr>
7799
7800 * src/reader.c (symbols_output): Clean up.
7801 * src/output.c (output_gram, output): Clean up.
7802
7803 2001-12-10 Akim Demaille <akim@epita.fr>
7804
7805 * src/lalr.c (initialize_lookaheads): New. Extracted from...
7806 * src/LR0.c (set_state_table): here.
7807 * src/lalr.c (lalr): Call it.
7808
7809 2001-12-10 Akim Demaille <akim@epita.fr>
7810
7811 * src/state.h (shifts): Remove the `number' member: shifts are
7812 attached to state, hence no longer need to be labelled with a
7813 state number.
7814
7815 2001-12-10 Akim Demaille <akim@epita.fr>
7816
7817 Now that states have a complete set of members, the linked list of
7818 shifts is useless: just fill directly the state's shifts member.
7819
7820 * src/state.h (shifts): Remove the `next' member.
7821 * src/LR0.c (first_state, last_state): Remove.
7822 Adjust the callers.
7823 (augment_automaton): Don't look for the shifts that must be added
7824 a shift on EOF: it is those of the state we looked for! But now,
7825 since shifts are attached, it is no longer needed to looking
7826 merely by its id: its number.
7827
7828 2001-12-10 Akim Demaille <akim@epita.fr>
7829
7830 * src/LR0.c (augment_automaton): Better variable locality.
7831 Remove an impossible branch: if there is a state corresponding to
7832 the start symbol being shifted, then there is shift for the start
7833 symbol from the initial state.
7834
7835 2001-12-10 Akim Demaille <akim@epita.fr>
7836
7837 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
7838 only when appropriate: when insert_start_shifting_state' is not
7839 invoked.
7840 * tests/regression.at (Rule Line Numbers): Adjust.
7841
7842 2001-12-10 Akim Demaille <akim@epita.fr>
7843
7844 * src/LR0.c (augment_automaton): Now that all states have shifts,
7845 merge the two cases addition shifts to the initial state.
7846
7847 2001-12-10 Akim Demaille <akim@epita.fr>
7848
7849 * src/lalr.c (set_state_table): Move to...
7850 * src/LR0.c: here.
7851 * src/lalr.c (lalr): Don't call it...
7852 * src/LR0.c (generate_states): do it.
7853 * src/LR0.h (first_state): Remove, only the table is used.
7854
7855 2001-12-10 Akim Demaille <akim@epita.fr>
7856
7857 * src/LR0.h (first_shift, first_reduction): Remove.
7858 * src/lalr.c: Don't use first_shift: find shifts through the
7859 states.
7860
7861 2001-12-10 Akim Demaille <akim@epita.fr>
7862
7863 * src/LR0.c: Attach shifts to states as soon as they are
7864 computed.
7865 * src/lalr.c (set_state_table): Instead of assigning shifts to
7866 state, just assert that the mapping was properly done.
7867
7868 2001-12-10 Akim Demaille <akim@epita.fr>
7869
7870 * src/LR0.c (insert_start_shift): Rename as...
7871 (insert_start_shifting_state): this.
7872 (insert_eof_shifting_state, insert_accepting_state): New.
7873 (augment_automaton): Adjust.
7874 Better locality of the variables.
7875 When looking if the start_symbol is shifted from the initial
7876 state, using `while (... symbol != start_symbol ...)' sounds
7877 better than `while (... symbol < start_symbol ...)': If fail
7878 to see how the order between symbols could be relevant!
7879
7880 2001-12-10 Akim Demaille <akim@epita.fr>
7881
7882 * src/getargs.h: Don't declare `spec_name_prefix' and
7883 `spec_file_prefix', declared by src/files.h.
7884 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
7885 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
7886 * src/output.c (prepare): Adjust.
7887 * src/reader.c (symbols_output): Likewise.
7888 * src/vmsgetargs.c: Vaguely adjust, but who cares?
7889
7890 2001-12-10 Akim Demaille <akim@epita.fr>
7891
7892 * src/muscle_tab.c (muscle_init): NULL is a better default than
7893 `"0"'.
7894
7895 2001-12-10 Akim Demaille <akim@epita.fr>
7896
7897 * src/reader.c (reader): Calling symbols_output once is enough.
7898
7899 2001-12-10 Akim Demaille <akim@epita.fr>
7900
7901 Now that states have a complete set of members, the linked list of
7902 reductions is useless: just fill directly the state's reductions
7903 member.
7904
7905 * src/state.h (struct reductions): Remove member `number' and
7906 `next'.
7907 * src/LR0.c (first_reduction, last_reduction): Remove.
7908 (save_reductions): Don't link the new reductions, store them in
7909 this_state.
7910 * src/lalr.c (set_state_table): No need to attach reductions to
7911 states, it's already done.
7912 * src/output.c (output_actions): No longer free the shifts, then
7913 the reductions, then the states: free all the states and their
7914 members.
7915
7916 2001-12-10 Akim Demaille <akim@epita.fr>
7917
7918 * src/options.c (OPTN, DRTV, BOTH): New.
7919 (option_table): Use them.
7920
7921 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
7922 the job of system.h.
7923 * src/options.c: Don't include stdio.h and xalloc.h for the same
7924 reasons.
7925
7926 2001-12-10 Akim Demaille <akim@epita.fr>
7927
7928 * src/output.c (output, prepare): Make sure the values of the
7929 muscles `action' and `prologue' are 0-terminated.
7930
7931 2001-12-10 Akim Demaille <akim@epita.fr>
7932
7933 Clean up GCC warnings.
7934
7935 * src/reader.c (copy_action): `buf' is not used.
7936 (parse_skel_decl): Be static.
7937 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
7938 * src/options.h (create_long_option_table): Have a real prototype.
7939 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
7940 (hash_delete_at): Return const void *.
7941 Adjust casts to preserve the const.
7942
7943 2001-12-10 Akim Demaille <akim@epita.fr>
7944
7945 * configure.in: Require 2.52g.
7946 M4 is not needed, but AUTOM4TE is.
7947 * m4/m4.m4: Remove.
7948 * tests/Makefile.am: Adjust.
7949
7950 2001-12-10 Akim Demaille <akim@epita.fr>
7951
7952 One structure for states is enough, even though theoretically
7953 there are LR(0) states and LALR(1) states.
7954
7955 * src/lalr.h (state_t): Remove.
7956 (state_table): Be state_t **, not state_t *.
7957 * src/state.h (core, CORE_ALLOC): Rename as...
7958 (state_t, STATE_ALLOC): this.
7959 Add the LALR(1) members: shifts, reductions, errs.
7960 * src/LR0.c (state_table): Rename as...
7961 (state_hash): this, to avoid name clashes with the global
7962 `state_table'.
7963 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
7964 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
7965
7966 2001-12-10 Akim Demaille <akim@epita.fr>
7967
7968 Bison dumps core on bash.y.
7969 Reported by Pascal Bart.
7970
7971 * src/warshall.c (bitmatrix_print): New.
7972 (TC): Use it.
7973 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
7974 j must be the outer loop.
7975 * tests/regression.at (Broken Closure): New.
7976
7977 2001-12-05 Akim Demaille <akim@epita.fr>
7978
7979 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
7980 its argument.
7981 Reported by Peter Hamorsky.
7982
7983 2001-12-05 Akim Demaille <akim@epita.fr>
7984
7985 * src/conflicts.c (err_table): Remove.
7986 (resolve_sr_conflict): Adjust.
7987 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
7988 Rename as...
7989 (state_t.reductions, state_t.shifts): this.
7990
7991 2001-12-05 Akim Demaille <akim@epita.fr>
7992
7993 * src/reduce.c (reduce_grammar_tables): No longer disable the
7994 removal of useless rules via CPP but via `if (0)', so that the
7995 compiler still check the code is valid.
7996 For instance, it should have noticed `rline' no longer exists: use
7997 the `line' member of rule_t.
7998 * src/gram.c (dummy, rline): Remove, unused.
7999
8000 2001-12-05 Akim Demaille <akim@epita.fr>
8001
8002 * src/output.c (pack_vector): Use assert, not berror.
8003 * src/main.c (berror): Remove, unused.
8004
8005 2001-12-05 Akim Demaille <akim@epita.fr>
8006
8007 New experimental feature: if --verbose --trace output all the
8008 items of a state, not only its kernel.
8009
8010 * src/print.c (print_core): If `trace_flag', then invoke closure
8011 before outputting the items of the state (print_core is no longer
8012 a correct name them).
8013 (print_results): Invoke new_closure/free_closure if needed.
8014
8015 2001-12-05 Akim Demaille <akim@epita.fr>
8016
8017 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
8018 * src/closure.c, src/closure.h (itemsetsize): Rename as...
8019 (nitemset): for consistency with the rest of the project.
8020
8021 2001-12-05 Akim Demaille <akim@epita.fr>
8022
8023 * src/closure.c (print_closure): Improve.
8024 (closure): Use it for printing input and output.
8025
8026 2001-12-05 Akim Demaille <akim@epita.fr>
8027
8028 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
8029 indexed by nonterminals.
8030
8031 2001-12-05 Akim Demaille <akim@epita.fr>
8032
8033 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
8034 what it was!).
8035 * src/warshall.h: Remove accidental duplication of the content.
8036
8037 2001-12-05 Akim Demaille <akim@epita.fr>
8038
8039 * src/closure.c (set_fderives): De-obfuscate.
8040
8041 2001-12-05 Akim Demaille <akim@epita.fr>
8042
8043 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
8044
8045 2001-12-05 Akim Demaille <akim@epita.fr>
8046
8047 * src/closure.c (set_firsts): De-obfuscate.
8048
8049 2001-12-05 Akim Demaille <akim@epita.fr>
8050
8051 * src/output.c (action_row): De-obfuscate
8052 using the good o' techniques: arrays not pointers, variable
8053 locality, BITISSET, RESETBIT etc.
8054
8055 2001-12-05 Akim Demaille <akim@epita.fr>
8056
8057 Pessimize the code to simplify it: from now on, all the states
8058 have a valid SHIFTS, which NSHIFTS is possibly 0.
8059
8060 * src/LR0.c (shifts_new): Be global and move to..
8061 * src/state.c, src/state.h: here.
8062 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
8063 * src/print_graph: Adjust.
8064
8065 2001-12-05 Akim Demaille <akim@epita.fr>
8066
8067 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
8068 * src/conflicts.c: Use it.
8069 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
8070 incorrectly ``simplified''.
8071
8072 2001-12-05 Akim Demaille <akim@epita.fr>
8073
8074 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
8075 using the good o' techniques: arrays not pointers, variable
8076 locality, BITISSET, RESETBIT etc.
8077
8078 2001-12-05 Akim Demaille <akim@epita.fr>
8079
8080 * src/state.h (SHIFT_SYMBOL): New.
8081 * src/conflicts.c: Use it to deobfuscate.
8082
8083 2001-12-05 Akim Demaille <akim@epita.fr>
8084
8085 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
8086 (print_reductions): De-obfuscate using the good o' techniques:
8087 arrays not pointers, variable locality, BITISSET.
8088
8089 2001-12-05 Akim Demaille <akim@epita.fr>
8090
8091 * src/conflicts.c (print_reductions): Arrays, not pointers.
8092 Use BITISSET.
8093
8094 2001-12-05 Akim Demaille <akim@epita.fr>
8095
8096 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8097
8098 2001-12-05 Akim Demaille <akim@epita.fr>
8099
8100 * src/conflicts.c (print_reductions): Improve variable locality.
8101
8102 2001-12-05 Akim Demaille <akim@epita.fr>
8103
8104 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8105
8106 2001-12-05 Akim Demaille <akim@epita.fr>
8107
8108 * src/conflicts.c (print_reductions): Improve variable locality.
8109
8110 2001-12-05 Akim Demaille <akim@epita.fr>
8111
8112 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
8113 * src/lalr.c: Use them.
8114
8115 2001-12-05 Akim Demaille <akim@epita.fr>
8116
8117 * src/LR0.c (augment_automaton): Formatting changes.
8118 Better variable locality.
8119
8120 2001-12-05 Akim Demaille <akim@epita.fr>
8121
8122 * src/lalr.c (matrix_print): New.
8123 (transpose): Use it.
8124 Use arrays instead of pointers.
8125
8126 2001-12-05 Akim Demaille <akim@epita.fr>
8127
8128 * src/lalr.c (maxrhs): Move to...
8129 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
8130 * src/lalr.c (build_relations): Adjust.
8131
8132 2001-12-05 Akim Demaille <akim@epita.fr>
8133
8134 * src/lalr.c (transpose): Free the memory allocated to the
8135 argument, as it is replaced by the results by the unique caller.
8136 (build_relations): Merely invoke transpose: it handles the memory
8137 deallocation.
8138 Improve variable locality.
8139 Avoid variables used as mere abbreviations.
8140 (compute_lookaheads): Use arrays instead of pointers.
8141
8142 2001-12-05 Akim Demaille <akim@epita.fr>
8143
8144 * src/lalr.c (initialize_F): Improve variable locality.
8145 Avoid variables used as mere abbreviations.
8146
8147 2001-12-05 Akim Demaille <akim@epita.fr>
8148
8149 * src/derives.c (print_derives): Display the ruleno.
8150 * src/lalr.c (initialize_F, transpose): Better variable locality
8151 to improve readability.
8152 Avoid variables used as mere abbreviations.
8153
8154 2001-12-05 Akim Demaille <akim@epita.fr>
8155
8156 * src/lalr.c (traverse): Use arrays instead of pointers.
8157
8158 2001-12-05 Akim Demaille <akim@epita.fr>
8159
8160 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
8161 the handling of squeue.
8162 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8163
8164 2001-12-05 Akim Demaille <akim@epita.fr>
8165
8166 Because useless nonterminals are now kept alive (instead of being
8167 `destroyed'), we now sometimes examine them, and store information
8168 related to them. Hence we need to know their number, and adjust
8169 memory allocations.
8170
8171 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
8172 static.
8173 * src/LR0.c (allocate_itemsets): The memory allocated to
8174 `symbol_count' was used for two different purpose: once to count
8175 the number of occurrences of each symbol, and later reassigned to
8176 `shift_symbol', containing the symbol that can be shifted from a
8177 given state.
8178 Deobfuscate, i.e., allocate, use and free `symbol_count' here
8179 only, and...
8180 (new_itemsets): Allocate `shift_symbol' here.
8181 (allocate_itemsets): symbol_count includes useless nonterminals.
8182 Make room for them.
8183 (free_storage): Use `free', not `XFREE', for pointers that cannot
8184 be null.
8185
8186 2001-12-05 Akim Demaille <akim@epita.fr>
8187
8188 * src/nullable.c (set_nullable): Deobfuscate the handling of
8189 ritem.
8190 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8191
8192 2001-12-05 Akim Demaille <akim@epita.fr>
8193
8194 * src/gram.c, src/gram.h (ritem_print): New.
8195 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
8196 (This useless function was defined only to work around VMS linkers
8197 that can't handle compilation units with variables only).
8198 * src/reduce.c (dump_grammar): Use it to trace the construction of
8199 ritem.
8200
8201 2001-12-04 Paul Eggert <eggert@twinsun.com>
8202
8203 * src/bison.simple (union yyalloc): Change member names
8204 to be the same as the stack names.
8205 (yyparse): yyptr is now union yyalloc *, not char *.
8206 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
8207 and may generate better code on some machines.
8208 (yystpcpy): Use prototype if __STDC__ is defined, not just
8209 if __cplusplus is defined.
8210
8211 2001-11-30 Akim Demaille <akim@epita.fr>
8212
8213 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
8214 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
8215 Gettext doesn't compile cleanly, and dies with -Werror.
8216 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
8217 Include WARNING_CFLAGS here.
8218 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
8219 before being defined.
8220
8221 2001-11-27 Paul Eggert <eggert@twinsun.com>
8222
8223 * lib/quotearg.h (quotearg_n, quotearg_n_style):
8224 First arg is int, not unsigned.
8225 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
8226 (SIZE_MAX, UINT_MAX): New macros.
8227 (quotearg_n_options): Abort if N is negative.
8228 Avoid overflow check on hosts where size_t is 64 bits and int
8229 is 32 bits, as overflow is impossible there.
8230 Fix off-by-one typo that caused unnecessary reallocation.
8231
8232 2001-11-29 Paul Eggert <eggert@twinsun.com>
8233
8234 Name space cleanup in generated parser.
8235
8236 * doc/bison.texinfo (Bison Parser): Discuss system headers
8237 and their effect on the user name space.
8238
8239 * src/bison.simple:
8240 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
8241 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
8242 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
8243
8244 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
8245 on user names when possible.
8246
8247 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
8248 Simplify test for whather <alloca.h> exists.
8249
8250 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
8251
8252 (<stdio.h>): Include if YYDEBUG.
8253
8254 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
8255 ! defined (yyoverflow) && ! defined (yymemcpy).
8256
8257 (yymemcpy, yyparse): Rename local variables as needed so that
8258 they all begin with 'yy'.
8259
8260 (yystrlen, yystpcpy): New functions.
8261
8262 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
8263 All uses changed.
8264
8265 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
8266 instead of relying on string.h functions. Use YYSTACK_ALLOC
8267 and YYSTACK_FREE instead of malloc and free.
8268
8269 2001-11-30 Akim Demaille <akim@epita.fr>
8270
8271 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
8272 before their first uses.
8273 (YYBISON, YYPURE): Move to the top of the output.
8274
8275 2001-11-30 Akim Demaille <akim@epita.fr>
8276
8277 * tests/reduce.at (Useless Nonterminals): Fix.
8278
8279 2001-11-30 Akim Demaille <akim@epita.fr>
8280
8281 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
8282 if body instead of `;' to pacify GCC's warnings.
8283
8284 2001-11-30 Akim Demaille <akim@epita.fr>
8285
8286 Instead of mapping the LHS of unused rules to -1, keep the LHS
8287 valid, but flag the rules as invalid.
8288
8289 * src/gram.h (rule_t): `useful' is a new member.
8290 * src/print.c (print_grammar): Adjust.
8291 * src/derives.c (set_derives): Likewise.
8292 * src/reader.c (packgram, reduce_output): Likewise.
8293 * src/reduce.c (reduce_grammar_tables): Likewise.
8294 * tests/reduce.at (Underivable Rules, Useless Rules): New.
8295
8296 2001-11-30 Akim Demaille <akim@epita.fr>
8297
8298 * src/reduce.c (reduce_output): Formatting changes.
8299 * src/print.c (print_results, print_grammar): Likewise.
8300 * tests/regression.at (Rule Line Numbers)
8301 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
8302
8303 2001-11-30 Akim Demaille <akim@epita.fr>
8304
8305 * src/reduce.c (nonterminals_reduce): Instead of throwing away
8306 useless nonterminals, move them at the end of the symbol arrays.
8307 (reduce_output): Adjust.
8308 * tests/reduce.at (Useless Nonterminals): Adjust.
8309
8310 2001-11-30 Akim Demaille <akim@epita.fr>
8311
8312 * src/reduce.c: Various comment/formatting changes.
8313 (nonterminals_reduce): New, extracted from...
8314 (reduce_grammar_tables): here.
8315 (reduce_grammar): Call nonterminals_reduce.
8316
8317 2001-11-29 Paul Eggert <eggert@twinsun.com>
8318
8319 * src/bison.simple (YYSTACK_REALLOC): Remove.
8320 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
8321 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
8322 New macros.
8323 (union yyalloc): New type.
8324 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
8325 an arbitrary restriction on hosts where size_t is wider than int.
8326
8327 (yyparse): Don't dump core if alloca or malloc fails; instead, report
8328 a parser stack overflow. Allocate just one block of memory for all
8329 three stacks, instead of allocating three blocks; this typically is
8330 faster and reduces fragmentation.
8331
8332 Do not limit the number of items in the stack to a value that fits
8333 in 'int', as this is an arbitrary limit on hosts with 64-bit
8334 size_t and 32-bit int.
8335
8336 2001-11-29 Marc Autret <autret_m@epita.fr>
8337
8338 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
8339 of defining YYERROR_VERBOSE.
8340 [AT_DATA]: $4 is now out of C declarations in the prologue.
8341
8342 2001-11-28 Marc Autret <autret_m@epita.fr>
8343
8344 * src/reader.c (parse_dquoted_param): New.
8345 (parse_skel_decl): Use it.
8346 * src/lex.h: Add its prototype.
8347 * src/lex.c (literalchar): Become not static.
8348
8349 2001-11-28 Marc Autret <autret_m@epita.fr>
8350
8351 * src/output.h: And put its extern declaration here.
8352 * src/output.c (error_verbose): Define here.
8353 (prepare): Echo name modification.
8354 * src/getargs.h: Clean its extern declaration.
8355 * src/getargs.c (error_verbose_flag): Remove.
8356 (getargs): Remove case 'e'.
8357 * src/options.c (option_table): 'error-verbose' is now seen as simple
8358 percent option.
8359 Include output.h.
8360
8361 * src/reader.c (read_declarations): Remove case tok_include.
8362 (parse_include_decl): Remove.
8363 * src/lex.h (token_t): Remove tok_include.
8364 * src/options.c (option_table): 'include' is now a simple command line
8365 option.
8366
8367 2001-11-28 Marc Autret <autret_m@epita.fr>
8368
8369 * src/bison.simple: Adjust muscle names.
8370 * src/muscle_tab.c (muscle_init): Also rename the muscles.
8371 * src/output.c (prepare): s/_/-/ for the muscles names.
8372 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
8373
8374 2001-11-28 Marc Autret <autret_m@epita.fr>
8375
8376 * src/bison.simple: Fix debug.
8377 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
8378
8379 2001-11-28 Akim Demaille <akim@epita.fr>
8380
8381 * src/LR0.c (shifts_new): New.
8382 (save_shifts, insert_start_shift, augment_automaton): Use it.
8383
8384 2001-11-28 Akim Demaille <akim@epita.fr>
8385
8386 * src/closure.c (closure): `b' and `ruleno' denote the same value:
8387 keep ruleno only.
8388
8389 2001-11-28 Akim Demaille <akim@epita.fr>
8390
8391 * src/closure.c (closure): Instead of looping over word in array
8392 then bits in words, loop over bits in array.
8393
8394 2001-11-28 Akim Demaille <akim@epita.fr>
8395
8396 * src/closure.c (closure): No longer optimize the special case
8397 where all the bits of `ruleset[r]' are set to 0, to make the code
8398 clearer.
8399
8400 2001-11-28 Akim Demaille <akim@epita.fr>
8401
8402 * src/closure.c (closure): `r' and `c' are new variables, used to
8403 de-obfuscate accesses to RULESET and CORE.
8404
8405 2001-11-28 Akim Demaille <akim@epita.fr>
8406
8407 * src/reduce.c (reduce_print): Use ngettext.
8408 (dump_grammar): Improve the trace accuracy.
8409
8410 2001-11-28 Akim Demaille <akim@epita.fr>
8411
8412 * src/reduce.c (dump_grammar): Don't translate trace messages.
8413
8414 2001-11-28 Akim Demaille <akim@epita.fr>
8415
8416 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
8417 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
8418 as all tags are free'ed afterwards.
8419 From Enrico Scholz.
8420
8421 2001-11-27 Paul Eggert <eggert@twinsun.com>
8422
8423 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
8424 use alloca when we didn't want to, and vice versa.
8425
8426 2001-11-27 Marc Autret <autret_m@epita.fr>
8427
8428 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
8429 initialization.
8430 * src/output.c (prepare): Remove its update.
8431
8432 2001-11-27 Marc Autret <autret_m@epita.fr>
8433
8434 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
8435 Use %error-verbose.
8436
8437 2001-11-27 Marc Autret <autret_m@epita.fr>
8438
8439 * src/bison.simple: Remove YYERROR_VERBOSE using.
8440 Use %%error_verbose.
8441 (yyparse): Likewise.
8442 * src/output.c (prepare): Give its final value.
8443 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
8444 * src/getargs.h: Add its extern declaration.
8445 * src/getargs.c (error_verbose_flag): New int.
8446 (getargs): Update to catch new case.
8447 * src/options.c (option_table): 'error-verbose' is a new option.
8448 (shortopts): Update.
8449
8450 2001-11-27 Akim Demaille <akim@epita.fr>
8451
8452 * src/system.h: Use intl/libgettext.h.
8453 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
8454
8455 2001-11-27 Akim Demaille <akim@epita.fr>
8456
8457 * tests/torture.at (Exploding the Stack Size with Malloc):
8458 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
8459
8460 2001-11-27 Akim Demaille <akim@epita.fr>
8461
8462 * src/files.c: Include error.h.
8463 Reported by Hans Aberg.
8464
8465 2001-11-26 Marc Autret <autret_m@epita.fr>
8466
8467 * src/reader.c (parse_include_decl): New, not yet implemented.
8468 (read_declarations): Add case tok_include.
8469 * src/getargs.h (include): Add its extern definition.
8470 * src/getargs.c (include): New const char *.
8471 (getargs): Add case '-I'.
8472 * src/options.c (option_table): Add include as command line and
8473 percent option.
8474 * src/lex.h (token_t): Add tok_include.
8475
8476 2001-11-26 Akim Demaille <akim@epita.fr>
8477
8478 * src/reader.c (readgram): Make sure rules for mid-rule actions
8479 have a lineno equal to that of their host rule.
8480 Reported by Hans Aberg.
8481 * tests/regression.at (Rule Line Numbers): New.
8482
8483 2001-11-26 Akim Demaille <akim@epita.fr>
8484
8485 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
8486 size_ts.
8487
8488 2001-11-26 Akim Demaille <akim@epita.fr>
8489
8490 * src/complain.c, src/complain.h (error): Remove, provided by
8491 lib/error.[ch].
8492
8493 2001-11-26 Akim Demaille <akim@epita.fr>
8494
8495 * src/reader.c (read_declarations): Don't abort on tok_illegal,
8496 issue an error message.
8497 * tests/regression.at (Invalid %directive): New.
8498 Reported by Hans Aberg.
8499
8500 2001-11-26 Akim Demaille <akim@epita.fr>
8501
8502 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
8503 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8504
8505 2001-11-26 Akim Demaille <akim@epita.fr>
8506
8507 * src/conflicts.c (conflicts_print): Don't complain at all when
8508 there are no reduce/reduce conflicts, and as many shift/reduce
8509 conflicts as expected.
8510 * tests/regression.at (%expect right): Adjust.
8511
8512 2001-11-23 Akim Demaille <akim@epita.fr>
8513
8514 * lib/alloca.c: Update, from fileutils.
8515
8516 2001-11-23 Akim Demaille <akim@epita.fr>
8517
8518 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
8519
8520 2001-11-23 Akim Demaille <akim@epita.fr>
8521
8522 * src/system.h: Include alloca.h.
8523 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
8524
8525 2001-11-23 Akim Demaille <akim@epita.fr>
8526
8527 * src/print_graph.c (print_actions): Remove `rule', unused.
8528 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
8529 pacify GCC's signed < unsigned warnings.
8530 * src/closure.c (itemsetsize): Likewise.
8531 * src/reader.c (symbol_list_new): Static.
8532
8533 2001-11-23 Akim Demaille <akim@epita.fr>
8534
8535 Attaching lineno to buckets is stupid, since only one copy of each
8536 symbol is kept, only the line of the first occurrence is kept too.
8537
8538 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
8539 * src/reader.c (rline_allocated): Remove, unused.
8540 (symbol_list): Have a `line' member.
8541 (symbol_list_new): New.
8542 (readgram): Use it.
8543 * src/print.c (print_grammar): Output the rule line numbers.
8544 * tests/regression.at (Solved SR Conflicts)
8545 (Unresolved SR Conflicts): Adjust.
8546 Reported by Hans Aberg.
8547
8548 2001-11-22 Marc Autret <autret_m@epita.fr>
8549
8550 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
8551
8552 2001-11-22 Marc Autret <autret_m@epita.fr>
8553
8554 * src/muscle_tab.c (muscle_init): Remove initialization of
8555 skeleton muscle.
8556 * src/output.c (output_master_parser): Do it here.
8557
8558 2001-11-20 Akim Demaille <akim@epita.fr>
8559
8560 * po/sv.po: New.
8561 * configure.in (ALL_LINGUAS): Adjust.
8562 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
8563 longer contains strings to translate.
8564
8565 2001-11-19 Akim Demaille <akim@epita.fr>
8566
8567 * src/conflicts.c (conflicts_print): Add a missing \n.
8568
8569 2001-11-19 Akim Demaille <akim@epita.fr>
8570
8571 * src/nullable.c (nullable_print): New.
8572 (set_nullable): Call it when tracing.
8573 Better locality of variables.
8574
8575 2001-11-19 Akim Demaille <akim@epita.fr>
8576
8577 * src/print.c (print_actions): Better locality of variables.
8578
8579 2001-11-19 Akim Demaille <akim@epita.fr>
8580
8581 * src/derives.c (print_derives): Fix and enrich.
8582 * src/closure.c (print_fderives): Likewise.
8583
8584 2001-11-19 Akim Demaille <akim@epita.fr>
8585
8586 * src/closure.c (itemsetend): Remove, replaced with...
8587 (itemsetsize): new.
8588
8589 2001-11-19 Akim Demaille <akim@epita.fr>
8590
8591 * src/LR0.c (kernel_end): Remove, replaced with...
8592 (kernel_size): new.
8593
8594 2001-11-19 Akim Demaille <akim@epita.fr>
8595
8596 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
8597 to clarify.
8598
8599 2001-11-19 Akim Demaille <akim@epita.fr>
8600
8601 * src/closure.c (closure): Use arrays instead of pointers to clarify.
8602
8603 2001-11-19 Akim Demaille <akim@epita.fr>
8604
8605 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
8606 trace messages.
8607 * src/LR0.c: Likewise.
8608 (allocate_itemsets): Use arrays instead of pointers to clarify.
8609
8610 2001-11-19 Akim Demaille <akim@epita.fr>
8611
8612 * src/getargs.c (statistics_flag): Replace with...
8613 (trace_flag): New.
8614 (longopts): Accept --trace instead of --statistics.
8615 * src/getargs.h, src/options.c: Adjust.
8616 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
8617 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
8618
8619 2001-11-19 Akim Demaille <akim@epita.fr>
8620
8621 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
8622 pointers to clarify the code.
8623 (save_reductions, save_shifts): Factor common parts of alternatives.
8624
8625 2001-11-19 Akim Demaille <akim@epita.fr>
8626
8627 * src/LR0.c (new_state, get_state): Complete TRACE code.
8628 * src/closure.c: Include `reader.h' to get `tags', needed by the
8629 trace code.
8630 Rename the conditional DEBUG as TRACE.
8631 Output consistently TRACEs to stderr, not stdout.
8632 * src/derives.c: Likewise.
8633 * src/reduce.c: (inaccessable_symbols): Using if is better style
8634 than goto.
8635 Use `#if TRACE' instead of `#if 0' for tracing code.
8636
8637 2001-11-19 Akim Demaille <akim@epita.fr>
8638
8639 * src/system.h (LIST_FREE, shortcpy): New.
8640 * src/LR0.c: Use them.
8641 * src/output.c (free_itemsets, free_reductions, free_shifts):
8642 Remove, replaced by LIST_FREE.
8643
8644 2001-11-19 Akim Demaille <akim@epita.fr>
8645
8646 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8647 (REDUCTIONS_ALLOC): New.
8648 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8649 allocation.
8650
8651 2001-11-19 Akim Demaille <akim@epita.fr>
8652
8653 * src/LR0.c (new_state): Complete trace code.
8654 * src/nullable.c (set_nullable): Don't translate traces.
8655
8656 2001-11-19 Akim Demaille <akim@epita.fr>
8657
8658 * src/print_graph.c (print_core): Better locality of variables.
8659 * src/print.c (print_core): Likewise.
8660
8661 2001-11-19 Akim Demaille <akim@epita.fr>
8662
8663 * src/vcg.c: You do the output, so you are responsible of the
8664 handling of VCG syntax, in particular: use quotearg.
8665 * src/print_graph.c: Don't.
8666 (print_actions): Don't output the actions as part of the nodes,
8667 since that's the job of the edges.
8668 (print_state): Don't output by hand: fill the node description,
8669 and ask for its output.
8670
8671 2001-11-19 Akim Demaille <akim@epita.fr>
8672
8673 * src/bison.simple (yyparse): When verbosely reporting an error,
8674 no longer put additional quotes around token names.
8675 * tests/calc.at: Adjust.
8676
8677 2001-11-19 Akim Demaille <akim@epita.fr>
8678
8679 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8680 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8681 * src/output.c: Adjust.
8682
8683 2001-11-19 Akim Demaille <akim@epita.fr>
8684
8685 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8686 (rule_t): this.
8687 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8688
8689 2001-11-19 Akim Demaille <akim@epita.fr>
8690
8691 * src/gram.h (rule_t): New.
8692 (rule_table): New.
8693 (rrhs, rlhs): Remove, part of state_t.
8694 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8695 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8696 * src/reader.c, src/reduce.c: Adjust.
8697
8698 2001-11-19 Akim Demaille <akim@epita.fr>
8699
8700 * src/reader.c (symbols_output): New, extracted from...
8701 (packsymbols): Here.
8702 (reader): Call it.
8703
8704 2001-11-19 Akim Demaille <akim@epita.fr>
8705
8706 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8707 (maxrhs): this new function.
8708
8709 2001-11-19 Akim Demaille <akim@epita.fr>
8710
8711 * src/lalr.c (F): New macro to access the variable F.
8712 Adjust.
8713
8714 2001-11-19 Akim Demaille <akim@epita.fr>
8715
8716 * src/lalr.h (LA): New macro to access the variable LA.
8717 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8718 * src/lalr.c: Adjust.
8719
8720 2001-11-19 Akim Demaille <akim@epita.fr>
8721
8722 * src/lalr.c (initialize_LA): Only initialize LA. Let...
8723 (set_state_table): handle the `lookaheads' members.
8724
8725 2001-11-19 Akim Demaille <akim@epita.fr>
8726
8727 * src/lalr.h (lookaheads): Removed array, whose contents is now
8728 a member of...
8729 (state_t): this structure.
8730 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8731 Adjust.
8732
8733 2001-11-19 Akim Demaille <akim@epita.fr>
8734
8735 * src/lalr.h (consistent): Removed array, whose contents is now
8736 a member of...
8737 (state_t): this structure.
8738 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8739 Adjust.
8740
8741 2001-11-19 Akim Demaille <akim@epita.fr>
8742
8743 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
8744 contents are now members of...
8745 (state_t): this structure.
8746 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8747 Adjust.
8748
8749 2001-11-19 Akim Demaille <akim@epita.fr>
8750
8751 * src/lalr.h (state_t): New.
8752 (state_table): Be a state_t * instead of a core **.
8753 (accessing_symbol): Remove, part of state_t.
8754 * src/lalr.c: Adjust.
8755 (set_accessing_symbol): Merge into...
8756 (set_state_table): this.
8757 * src/print_graph.c, src/conflicts.c: Adjust.
8758
8759 2001-11-14 Akim Demaille <akim@epita.fr>
8760
8761 * tests/calc.at, tests/output.at, tests/regression.at,
8762 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
8763 now the tests are run in private dirs, therefore AC_CLEANUP and
8764 family can be simplified to 0-ary.
8765 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
8766 use abs. path to find config.h.
8767 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
8768 stderr, there can be way too much random noise.
8769 Instead pass -Werror to GCC and rely on the exit status.
8770 Reported by Wolfram Wagner.
8771
8772 2001-11-14 Akim Demaille <akim@epita.fr>
8773
8774 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
8775 defined only if yyoverflow is defined, to avoid `warning: unused
8776 variable `yyvs1''.
8777 Reported by The Test Suite.
8778
8779 2001-11-14 Akim Demaille <akim@epita.fr>
8780
8781 * src/print.c: Include reduce.h.
8782 Reported by Hans Aberg.
8783
8784 2001-11-14 Akim Demaille <akim@epita.fr>
8785
8786 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
8787 Revert a previous patch: these are really const.
8788 * src/conflicts.c (conflict_report): Additional useless pair of
8789 braces to pacify GCC's warnings for `if () if () {} else {}'.
8790 * src/lex.c (parse_percent_token): Replace equal_offset with
8791 arg_offset.
8792 arg is const.
8793 Be sure to strdup `arg' when used, since there is no reason for
8794 token_buffer not to change.
8795
8796 2001-11-14 Akim Demaille <akim@epita.fr>
8797
8798 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
8799 definition.
8800 * src/main.c (main): Use them.
8801 Suggested by Hans Aberg.
8802
8803 2001-11-12 Akim Demaille <akim@epita.fr>
8804
8805 * src/system.h (ngettext): Now that we use ngettext, be sure to
8806 provide a default definition when NLS are not used.
8807
8808 2001-11-12 Akim Demaille <akim@epita.fr>
8809
8810 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
8811 Use @kbd to denote user input.
8812 (Language and Grammar): ANSIfy the example.
8813 Adjust its layout for info/notinfo.
8814 (Location Tracking Calc): Output error messages to stderr.
8815 Output locations in a more GNUtically correct way.
8816 Fix a couple of Englishos.
8817 Adjust @group/@end group pairs.
8818
8819 2001-11-12 Akim Demaille <akim@epita.fr>
8820
8821 %expect was not functioning at all.
8822
8823 * src/conflicts.c (expected_conflicts): Set to -1.
8824 (conflict_report): Use ngettext.
8825 (conflicts_print): Check %expect and make its violation an error.
8826 * doc/bison.texinfo (Expect Decl): Adjust.
8827 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
8828 * tests/regression.at (%expect not enough, %expect right)
8829 (%expect too much): New.
8830
8831 2001-11-12 Akim Demaille <akim@epita.fr>
8832
8833 * tests/regression.at (Conflicts): Rename as...
8834 (Unresolved SR Conflicts): this.
8835 (Solved SR Conflicts): New.
8836
8837 2001-11-12 Akim Demaille <akim@epita.fr>
8838
8839 * src/reduce.c (print_results): Rename as...
8840 (reduce_output): This.
8841 Output to OUT, passed as argument, instead of output_obstack.
8842 (dump_grammar): Likewise.
8843 (reduce_free): New.
8844 Also free V1.
8845 (reduce_grammar): No longer call reduce_output, since...
8846 * src/print.c (print_results): do it.
8847 * src/main.c (main): Call reduce_free;
8848
8849 2001-11-12 Akim Demaille <akim@epita.fr>
8850
8851 * src/conflicts.c (print_reductions): Accept OUT as argument.
8852 Output to it, not to output_obstack.
8853 * src/print.c (print_actions): Adjust.
8854
8855 2001-11-12 Akim Demaille <akim@epita.fr>
8856
8857 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
8858 the result instead of using...
8859 (src_total, rrc_total, src_count, rrc_count): Remove.
8860 (any_conflicts): Remove.
8861 (print_conflicts): Split into...
8862 (conflicts_print, conflicts_output): New.
8863 * src/conflicts.h: Adjust.
8864 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
8865 * src/print.c (print_grammar): Issue `\n' between two rules.
8866 * tests/regression.at (Conflicts): New.
8867 Reported by Tom Lane.
8868
8869 2001-11-12 Akim Demaille <akim@epita.fr>
8870
8871 * tests/regression.at (Invalid input): Remove, duplicate with
8872 ``Invalid input: 1''.
8873
8874 2001-11-12 Akim Demaille <akim@epita.fr>
8875
8876 * tests/torture.at (AT_DATA_STACK_TORTURE)
8877 (Exploding the Stack Size with Alloca)
8878 (Exploding the Stack Size with Malloc): New.
8879
8880 2001-11-12 Akim Demaille <akim@epita.fr>
8881
8882 * src/bison.simple (YYSTACK_REALLOC): New.
8883 (yyparse) [!yyoverflow]: Use it and free the old stack.
8884 Reported by Per Allansson.
8885
8886 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
8887
8888 * src/bison.simple: Define type yystype instead of YYSTYPE, and
8889 define CPP macro, which substitute YYSTYPE by yystype.
8890 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
8891 with yyltype/YYLTYPE. This allows inclusion of the generated
8892 header within the parser if the compiler, such as GGC, accepts
8893 multiple equivalent #defines.
8894 From Akim.
8895
8896 2001-11-05 Akim Demaille <akim@epita.fr>
8897
8898 * src/reader.c (symbols_output): New, extracted from...
8899 (packsymbols): here.
8900 (reader): Adjust.
8901
8902 2001-11-05 Akim Demaille <akim@epita.fr>
8903
8904 * src/lex.c (parse_percent_token): s/quotearg/quote/.
8905
8906 2001-11-05 Akim Demaille <akim@epita.fr>
8907
8908 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
8909 pattern.
8910
8911 2001-11-05 Akim Demaille <akim@epita.fr>
8912
8913 * src/options.h (struct option_table_struct): set_flags is void*.
8914 * src/options.c (longopts): Support `--output' and `%output'.
8915 (usage): Adjust.
8916 * src/lex.h (tok_setopt): Remove, replaced with...
8917 (tok_intopt, tok_stropt): these new guys.
8918 * src/lex.c (getopt.h): Not needed.
8919 (token_buffer, unlexed_token_buffer): Not const.
8920 (percent_table): Promote `-' over `_' in directive names.
8921 Active `%name-prefix', `file-prefix', and `output'.
8922 (parse_percent_token): Accept possible arguments to directives.
8923 Promote `-' over `_' in directive names.
8924
8925 2001-11-04 Akim Demaille <akim@epita.fr>
8926
8927 * doc/bison.texinfo (Decl Summary): Split the list into
8928 `directives for grammars' and `directives for bison'.
8929 Sort'em.
8930 Add description of `%name-prefix', `file-prefix', and `output'.
8931 Promote `-' over `_' in directive names.
8932 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
8933 Simplify the description of `--name-prefix'.
8934 Promote `-' over `_' in directive names.
8935 Promote `--output' over `--output-file'.
8936 Fix the description of `--defines'.
8937 * tests/output.at: Exercise %file-prefix and %output.
8938
8939 2001-11-02 Akim Demaille <akim@epita.fr>
8940
8941 * doc/refcard.tex: Update.
8942
8943 2001-11-02 Akim Demaille <akim@epita.fr>
8944
8945 * src/symtab.h (SUNDEF): New.
8946 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
8947 stand for `uninitialized', instead of 0.
8948 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
8949 * src/lex.c (lex): Adjust.
8950
8951 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
8952 Number it 0.
8953 Let yylex return it instead of a plain 0.
8954 Reported by Dick Streefland.
8955
8956 2001-11-02 Akim Demaille <akim@epita.fr>
8957
8958 * tests/regression.at (Mixing %token styles): New test.
8959
8960 2001-11-02 Akim Demaille <akim@epita.fr>
8961
8962 * src/reader.c (parse_thong_decl): Formatting changes.
8963 (token_translations_init): New, extracted from...
8964 (packsymbols): Here.
8965 Adjust.
8966
8967 2001-11-01 Akim Demaille <akim@epita.fr>
8968
8969 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
8970 Check that `9foo.y' produces correct cpp guards.
8971 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
8972 guards.
8973 Reported by Wwp.
8974
8975 2001-11-01 Akim Demaille <akim@epita.fr>
8976
8977 * tests/regression.at (Invalid input: 2): New.
8978 * src/lex.c (unlexed_token_buffer): New.
8979 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
8980 too.
8981 Reported by Wwp.
8982
8983 2001-11-01 Akim Demaille <akim@epita.fr>
8984
8985 * tests/calc.at: Catch up with 1.30.
8986 * configure.in: Bump to 1.49a.
8987 Adjust to newer Autotest.
8988
8989 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
8990
8991 * src/conflicts.c: Move global variables rrc_total and src_total ...
8992 (print_conflicts): here.
8993 * src/output.c (output): Free global variable user_toknums.
8994 * src/lex.c (token_obstack): Become static.
8995
8996 2001-10-18 Akim Demaille <akim@epita.fr>
8997
8998 * tests/atlocal.in (GCC): Add.
8999 * tests/calc.at: s/m4_match/m4_bmatch/.
9000 s/m4_patsubst/m4_bpatsubst/.
9001 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
9002 * configure.in: AC_SUBST(GCC).
9003
9004 2001-10-14 Marc Autret <autret_m@epita.fr>
9005
9006 * src/options.c (create_long_option_table): Fix.
9007
9008 2001-10-10 Akim Demaille <akim@epita.fr>
9009
9010 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
9011
9012 2001-10-04 Akim Demaille <akim@epita.fr>
9013
9014 * src/reader.c (parse_union_decl): Push the caracters in
9015 union_obstack, not attrs_obstack.
9016
9017 2001-10-04 Akim Demaille <akim@epita.fr>
9018
9019 Merge in the branch 1.29.
9020
9021 * src/reader.c (packsymbols): Use a temporary obstack for
9022 `%%tokendef', since output_stack is already used elsewhere.
9023
9024 2001-10-02 Akim Demaille <akim@epita.fr>
9025
9026 Bump 1.29d.
9027
9028 2001-10-02 Akim Demaille <akim@epita.fr>
9029
9030 Version 1.29c.
9031
9032 2001-10-02 Akim Demaille <akim@epita.fr>
9033
9034 * tests/regression.at (Invalid CPP headers): New.
9035 From Alexander Belopolsky.
9036 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
9037
9038 2001-10-02 Akim Demaille <akim@epita.fr>
9039
9040 * tests/regression.at (Invalid input): New.
9041 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
9042 Reported by Shura.
9043
9044 2001-10-02 Akim Demaille <akim@epita.fr>
9045
9046 * tests/calc.at: Now that --debug works, the tests must be adjusted.
9047
9048 2001-10-02 Akim Demaille <akim@epita.fr>
9049
9050 * src/output.c (output_parser): Assert `skeleton'.
9051 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
9052 systems.
9053 From Shura.
9054
9055 2001-10-01 Marc Autret <autret_m@epita.fr>
9056
9057 * src/lex.h: Echo modifications.
9058 * src/lex.c (unlex): Parameter is now token_t.
9059 From Hans Aberg.
9060
9061 2001-10-01 Marc Autret <autret_m@epita.fr>
9062
9063 * src/main.c: Include lex.h.
9064 From Hans Aberg.
9065
9066 2001-09-29 Akim Demaille <akim@epita.fr>
9067
9068 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
9069
9070 2001-09-28 Akim Demaille <akim@epita.fr>
9071
9072 * tests/testsuite.at: Update to newer Autotest.
9073 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
9074
9075 2001-09-27 Akim Demaille <akim@epita.fr>
9076
9077 Position independent wrapper.
9078
9079 * tests/bison: Remove.
9080 * tests/bison.in: New.
9081 * configure.in: Adjust.
9082
9083 2001-09-27 Paul Eggert <eggert@twinsun.com>
9084
9085 Port quotearg fixes from tar 1.13.24.
9086
9087 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
9088 tm to be declared.
9089 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
9090 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
9091
9092 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
9093 * m4/mbrtowc.m4: New file.
9094 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
9095 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
9096
9097 2001-09-27 Akim Demaille <akim@epita.fr>
9098
9099 Bump to 1.29c.
9100
9101 2001-09-27 Akim Demaille <akim@epita.fr>
9102
9103 Version 1.29b.
9104
9105 2001-09-25 Akim Demaille <akim@epita.fr>
9106
9107 * src/system.h: Include `xalloc.h'.
9108 Remove it from the C files.
9109 * src/files.c (output_files): Free the obstacks.
9110 * src/lex.c (init_lex): Rename as...
9111 (lex_init): this.
9112 (lex_free): New.
9113 * src/main.c (main): Use it.
9114
9115 2001-09-24 Marc Autret <autret_m@epita.fr>
9116
9117 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
9118 to output informations in fout (FILE*).
9119 (open_graph, close_graph): Likewise.
9120 (output_graph, output_edge, output_node): Likewise.
9121 * src/vcg.h: Update function prototypes.
9122 * src/print_graph.c (print_graph): Open output graph file.
9123 (print_actions): Adjust.
9124 * src/files.h: Remove extern declaration.
9125 * src/files.c: Remove graph_obstack declaration.
9126 (open_files): Remove graph_obstack initialization.
9127 (output_files): Remove graph_obstack saving.
9128
9129 2001-09-24 Marc Autret <autret_m@epita.fr>
9130
9131 * src/files.c (compute_output_file_names): Fix.
9132
9133 2001-09-24 Marc Autret <autret_m@epita.fr>,
9134 Akim Demaille <akim@epita.fr>
9135
9136 * src/reader.c (reader): Remove call to free_symtab ().
9137 * src/main.c (main): Call it here.
9138 Include symtab.h.
9139 * src/conflicts.c (initialize_conflicts): Rename as...
9140 (solve_conflicts): this.
9141 * src/print.c (print_core, print_actions, print_state)
9142 (print_grammar): Dump to a file instead a `output_obstack'.
9143 (print_results): Dump `output_obstack', and then proceed with the
9144 FILE *.
9145 * src/files.c (compute_output_file_names, close_files): New.
9146 (output_files): Adjust.
9147 * src/main.c (main): Adjust.
9148
9149 2001-09-23 Marc Autret <autret_m@epita.fr>
9150
9151 * src/files.c (compute_header_macro): Computes header macro name
9152 from spec_defines_file when given.
9153
9154 2001-09-23 Marc Autret <autret_m@epita.fr>
9155
9156 * src/files.c (output_files): Add default extensions.
9157
9158 2001-09-22 Akim Demaille <akim@epita.fr>
9159
9160 * src/conflicts.c (finalize_conflicts): Rename as...
9161 (free_conflicts): this.
9162
9163 2001-09-22 Akim Demaille <akim@epita.fr>
9164
9165 * src/gram.c (gram_free): Rename back as...
9166 (dummy): this.
9167 (output_token_translations): Free `token_translations'.
9168 * src/symtab.c (free_symtab): Free the tag field.
9169
9170 2001-09-22 Akim Demaille <akim@epita.fr>
9171
9172 Remove `translations' as it is always set to true.
9173
9174 * src/gram.h: Adjust.
9175 * src/reader.c (packsymbols, parse_token_decl): Adjust
9176 * src/print.c (print_grammar): Adjust.
9177 * src/output.c (output_token_translations): Adjust.
9178 * src/lex.c (lex): Adjust.
9179 * src/gram.c: Be sure the set pointers to NULL.
9180 (dummy): Rename as...
9181 (gram_free): this.
9182
9183 2001-09-22 Akim Demaille <akim@epita.fr>
9184
9185 * configure.in: Invoke AM_LIB_DMALLOC.
9186 * src/system.h: Use dmalloc.
9187 * src/LR0.c: Be sure to have pointers initialized to NULL.
9188 (allocate_itemsets): Allocate kernel_items only if needed.
9189
9190 2001-09-22 Akim Demaille <akim@epita.fr>
9191
9192 * configure.in: Bump to 1.29b.
9193 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
9194 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
9195 need xmalloc.c in calc.y.
9196 From Pascal Bart.
9197
9198 2001-09-21 Akim Demaille <akim@epita.fr>
9199
9200 Version 1.29a.
9201 * Makefile.maint, config/config.guess, config/config.sub,
9202 * config/missing: Update from masters.
9203 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
9204 upon package.m4.
9205 * configure.in (ALL_LINGUAS): Add `tr'.
9206
9207 2001-09-21 Akim Demaille <akim@epita.fr>
9208
9209 * tests/Makefile.am (package.m4): Move to...
9210 ($(srcdir)/$(TESTSUITE)): here.
9211
9212 2001-09-20 Akim Demaille <akim@epita.fr>
9213
9214 * src/complain.c: No longer try to be standalone: use system.h.
9215 Don't assume __STDC__ is defined to 1. Just test if it is defined.
9216 * src/complain.h: Likewise.
9217 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
9218 Remove the unused variable `n'.
9219 From Albert Chin-A-Young.
9220
9221 2001-09-18 Marc Autret <autret_m@epita.fr>
9222
9223 * doc/bison.1: Update.
9224 * doc/bison.texinfo (Bison Options): Update --defines and --graph
9225 descriptions.
9226 (Option Cross Key): Update.
9227 Add --graph.
9228
9229 2001-09-18 Marc Autret <autret_m@epita.fr>
9230
9231 * tests/regression.at: New test (comment in %union).
9232
9233 2001-09-18 Marc Autret <autret_m@epita.fr>
9234
9235 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
9236 do that.
9237 Reported by Keith Browne.
9238
9239 2001-09-18 Marc Autret <autret_m@epita.fr>
9240
9241 * tests/output.at: Add tests for --defines and --graph.
9242
9243 2001-09-18 Marc Autret <autret_m@epita.fr>
9244
9245 * tests/output.at: Removes tests of %{header,src}_extension features.
9246
9247 2001-09-18 Akim Demaille <akim@epita.fr>
9248
9249 * tests/Makefile.am (package.m4): New.
9250 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
9251 (_AT_CHECK_CALC_ERROR): Likewise.
9252 Factor the `, ' part of verbose error messages.
9253
9254 2001-09-18 Marc Autret <autret_m@epita.fr>
9255
9256 * src/getargs.c (longopts): Declare --defines and --graph as options
9257 with optional arguments.
9258 * src/files.h: Add extern declarations.
9259 * src/files.c (spec_graph_file, spec_defines_file): New.
9260 (output_files): Update.
9261 Remove CPP-outed code.
9262
9263 2001-09-18 Marc Autret <autret_m@epita.fr>
9264
9265 Turn off %{source,header}_extension feature.
9266
9267 * src/files.c (compute_exts_from_gf): Update.
9268 (compute_exts_from_src): Update.
9269 (output_files): CPP-out useless code.
9270 * src/files.h: Remove {header,source}_extension extern declarations.
9271 * src/reader.c (parse_dquoted_param): CPP-out.
9272 (parse_header_extension_decl): Remove.
9273 (parse_source_extension_decl): Remove.
9274 (read_declarations): Remove cases tok_{hdrext,srcext}.
9275 * src/lex.c (percent_table): Remove {header,source}_extension entries.
9276 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
9277
9278 2001-09-10 Akim Demaille <akim@epita.fr>
9279
9280 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
9281 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
9282 (AT_CHECK_OUTPUT): this.
9283 Merely check ls' exit status, its output is useless.
9284
9285 2001-09-10 Akim Demaille <akim@epita.fr>
9286
9287 * tests/calc.at: Use m4_match.
9288 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
9289
9290 2001-09-10 Marc Autret <autret_m@epita.fr>,
9291 Akim Demaille <akim@epita.fr>
9292
9293 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
9294 enum color_e.
9295 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
9296 to `normal'.
9297 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
9298 * src/lex.h: Adjust prototype.
9299 (token_t): Add `tok_undef'.
9300 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
9301 (parse_percent_token): Now returns token_t.
9302 Add default statement in switch.
9303 (lex): Separate `c' as an input variable, from the token_t result
9304 part.
9305 (unlexed): Is a token_t.
9306
9307 2001-09-10 Akim Demaille <akim@epita.fr>
9308
9309 * configure.in: Bump to 1.29a.
9310
9311 2001-09-07 Akim Demaille <akim@epita.fr>
9312
9313 Version 1.29.
9314
9315 2001-08-30 Akim Demaille <akim@epita.fr>
9316
9317 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
9318 * m4/atconfig.m4: Remove.
9319 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
9320 * tests/bison: New.
9321 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
9322 m4_if, m4_patsubst, and m4_regexp.
9323 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
9324 `input' file instead of echo.
9325
9326 2001-08-29 Akim Demaille <akim@epita.fr>
9327
9328 Bump to 1.28e.
9329
9330 2001-08-29 Akim Demaille <akim@epita.fr>
9331
9332 Version 1.28d.
9333
9334 2001-08-29 Paul Eggert <eggert@twinsun.com>
9335
9336 * src/bison.simple (yyparse): Don't take the address of an
9337 item before the start of an array, as that doesn't conform to
9338 the C Standard.
9339
9340 2001-08-29 Robert Anisko <anisko_r@epita.fr>
9341
9342 * doc/bison.texinfo (Location Tracking Calc): New node.
9343
9344 2001-08-29 Paul Eggert <eggert@twinsun.com>
9345
9346 * src/output.c (output): Do not define const, as this now
9347 causes more problems than it cures.
9348
9349 2001-08-29 Akim Demaille <akim@epita.fr>
9350
9351 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
9352 the nodes.
9353 Be sure to tag the `detailmenu'.
9354
9355 2001-08-29 Akim Demaille <akim@epita.fr>
9356
9357 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
9358 download in a tmp dir.
9359
9360 2001-08-28 Marc Autret <autret_m@epita.fr>
9361
9362 * config/depcomp: New file.
9363
9364 2001-08-28 Marc Autret <autret_m@epita.fr>
9365
9366 * doc/bison.1 (mandoc): Adjust.
9367 From Juan Manuel Guerrero.
9368
9369 2001-08-28 Marc Autret <autret_m@epita.fr>
9370
9371 * src/print_graph.c (print_state): Fix.
9372
9373 2001-08-27 Marc Autret <autret_m@epita.fr>
9374
9375 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
9376 char * members.
9377 Echo modifications to the functions prototypes.
9378 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
9379
9380 2001-08-27 Marc Autret <autret_m@epita.fr>
9381
9382 * src/vcg.c: Include `xalloc.h'.
9383 (add_colorentry): New.
9384 (add_classname): New.
9385 (add_infoname): New.
9386 * src/vcg.h: Add new prototypes.
9387
9388 2001-08-27 Akim Demaille <akim@epita.fr>
9389
9390 * Makefile.maint: Sync. again with CVS Autoconf.
9391
9392 2001-08-27 Akim Demaille <akim@epita.fr>
9393
9394 * Makefile.maint: Formatting changes.
9395 (po-update, cvs-update, update): New targets.
9396 (AMTAR): Remove.
9397
9398 2001-08-27 Akim Demaille <akim@epita.fr>
9399
9400 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9401 * Makefile.maint: Sync. with CVS Autoconf.
9402
9403 2001-08-27 Marc Autret <autret_m@epita.fr>
9404
9405 * src/vcg.h (struct infoname_s): New.
9406 (struct colorentry_s): New.
9407 (graph_s): New fields {vertical,horizontal}_order in structure.
9408 Add `infoname' field.
9409 Add `colorentry' field;
9410 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
9411 (G_HORIZONTAL_ORDER): New.
9412 (G_INFONAME): New.
9413 (G_COLORENTRY): New.
9414 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
9415 Add output of `infoname'.
9416 Add output of `colorentry'.
9417
9418 2001-08-27 Marc Autret <autret_m@epita.fr>
9419
9420 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
9421 This one shadowed a global parameter.
9422
9423 2001-08-24 Marc Autret <autret_m@epita.fr>
9424
9425 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
9426 instead of `unsigned'.
9427 (print_state): Do not call obstack_object_size () in obstack_grow ()
9428 to avoid macro variables shadowing.
9429
9430 2001-08-23 Marc Autret <autret_m@epita.fr>
9431
9432 * src/lex.c (percent_table): Typo: s/naem/name/.
9433 Add graph option.
9434 Normalize new options declarations.
9435
9436 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
9437
9438 * tests/suite.at: Exercise %header_extension and %source_extension.
9439
9440 2001-08-16 Marc Autret <autret_m@epita.fr>
9441
9442 * src/reader.c (parse_dquoted_param): New.
9443 (parse_header_extension_decl): Use it.
9444 (parse_source_extension_decl): Likewise.
9445
9446 2001-08-16 Marc Autret <autret_m@epita.fr>
9447
9448 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
9449 (get_xxxx_str): Use assert () instead of complain ().
9450 Remove return invokations in default cases.
9451 (get_decision_str): Modify default behaviour. Remove second argument.
9452 Echo modifications on calls.
9453 (output_graph): Fix.
9454
9455 2001-08-16 Marc Autret <autret_m@epita.fr>
9456
9457 * src/getargs.c (usage): Update with ``-g, --graph''.
9458
9459 2001-08-16 Marc Autret <autret_m@epita.fr>
9460
9461 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
9462 (Option Cross Key): Likewise.
9463 * doc/bison.1: Update.
9464
9465 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
9466
9467 * src/output.c (output_master_parser): Don't finish action_obstack.
9468 (output_parser): Don't care about the muscle action, here.
9469 (prepare): Copy the action_obstack in the action muscle.
9470 (output): Free action_obstack.
9471
9472 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9473
9474 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
9475 will contain `%union' declaration.
9476 (parse_union_decl): Delete #line directive output.
9477 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
9478 informations about %union.
9479 (parse_union_decl): Copy the union_obstack in the muscle stype.
9480 * src/bison.simple: Add new #line directive.
9481 Add typdef %%stype YYSTYPE.
9482
9483 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9484
9485 * src/bison.simple: Add new `#line' directive.
9486
9487 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
9488
9489 * src/bison.simple: New `#line' directive.
9490 * src/output.c (output_parser): Support new dynamic muscle input_line.
9491
9492 2001-09-22 Marc Autret <autret_m@epita.fr>
9493
9494 * src/output.c (output_master_parser): New.
9495 (output_parser): Be more re-entrant.
9496
9497 2001-09-21 Marc Autret <autret_m@epita.fr>
9498
9499 * src/reader.c (copy_definition, parse_union_decl): Update and use
9500 `linef' muscle.
9501 (copy_action): Likewise.
9502 Use obstack_1grow ().
9503 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
9504
9505 2001-09-21 Marc Autret <autret_m@epita.fr>
9506
9507 * src/options.c (option_table): Adjust.
9508 * src/lex.c (parse_percent_token): Fix.
9509
9510 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9511
9512 * src/options.c (symtab.h): Include it, need by lex.h.
9513
9514 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9515
9516 * src/lex.c (parse_percent_token): Change type of variable `tx', which
9517 is now an option_table_struct*.
9518 (option_strcmp): New function option_strcmp.
9519 (parse_percent_token): Call option_strcmp.
9520 * src/getargs.c (xalloc.h, options.h): Include it.
9521 (getargs): Call create_long_option_table.
9522 (getargs): Free longopts at the end of the function.
9523 (shortopts): Move in options.c.
9524 * src/options.c (create_long_option_table): New function. Convert
9525 information from option_table to option structure.
9526 * src/reader.c (options.h): Include it.
9527
9528 * src/Makefile.am: Adjust.
9529 * src/options.c (option_table): Create from longopts and percent_table.
9530 * src/getargs.c (longopts): Delete.
9531 * src/lex.c (struct percent_table_struct): Delete.
9532 (percent_table): Delete.
9533 (options.h): Include it.
9534 * src/options.c: Create.
9535 * src/options.h: Create.
9536 Declare enum opt_access_e.
9537 Define struct option_table_struct.
9538
9539 2001-09-20 Marc Autret <autret_m@epita.fr>
9540
9541 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
9542 sections of Bison.
9543
9544 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
9545
9546 * src/bison.simple: s/%%filename/%%skeleton.
9547 * src/muscle_tab.c (getargs.h): Include it.
9548 (muscle_init): Insert new muscle skeleton.
9549
9550 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
9551
9552 * src/output.c (output_parser): Delete unused variable actions_dumped.
9553
9554 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
9555
9556 * src/output.c (output): Delete call to reader_output_yylsp.
9557 * src/reader.c (reader): Likewise.
9558 * src/reader.h: Delete declaration of reader_output_yylsp.
9559
9560 2001-09-02 Marc Autret <autret_m@epita.fr>
9561
9562 * src/reader.c: Include muscle_tab.h.
9563 (parse_union_decl): Update.
9564 (parse_macro_decl): Rename parse_muscle_decl.
9565 Update to use renamed functions and variable.
9566 (read_declarations, copy_action, read_additionnal_code, : Updated
9567 with correct variables and functions names.
9568 (packsymbols, reader): Likewise.
9569
9570 * src/reader.h (muscle_obstack): Extern declaration update.
9571
9572 * src/output.c: Include muscle_tab.h
9573 In all functions using macro_insert, change by using muscle_insert ().
9574 (macro_obstack): Rename muscle_obstack.
9575 Echo modifications in the whole file.
9576 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
9577 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
9578 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
9579
9580 * src/muscle_tab.h: Update double inclusion macros.
9581 (macro_entry_s): Rename muscle_entry_s.
9582 Update prototypes.
9583
9584 * src/muscle_tab.c: Include muscle_tab.h.
9585 Rename macro_tabble to muscle_table.
9586 (mhash1, mhash2, mcmp): Use muscle_entry.
9587 (macro_init): Rename muscle_init. Update.
9588 (macro_insert): Rename muscle_insert. Update.
9589 (macro_find): Rename muscle_find. Update.
9590
9591 * src/main.c: Include muscle_tab.h.
9592 (main): Call muscle_init ().
9593 * src/Makefile.am (bison_SOURCES): Echo modifications.
9594
9595 2001-09-02 Marc Autret <autret_m@epita.fr>
9596
9597 Now the files macro_tab.[ch] are named muscle_tab.[ch].
9598
9599 * src/muscle_tab.c, src/muscle_tab.h: Add files.
9600
9601 2001-09-02 Marc Autret <autret_m@epita.fr>
9602
9603 * src/macrotab.c, src/macrotab.h: Remove.
9604
9605 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
9606
9607 * src/reader.c (copy_guard): Use muscle to specify the `#line'
9608 filename.
9609
9610 2001-09-01 Marc Autret <autret_m@epita.fr>
9611
9612 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
9613 to an explicit value to activate the feature. We do it here.
9614
9615 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9616
9617 * src/output.c (prepare): Delete the `filename' muscule insertion.
9618 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
9619 (parse_union_decl): Likewise.
9620 * src/macrotab.c (macro_init): Initialize filename by infile.
9621
9622 2001-08-31 Marc Autret <autret_m@epita.fr>
9623
9624 * src/bison.simple (YYLSP_NEEDED): New definition.
9625 * src/output.c (prepare): Add macro insertion of `locations_flag'
9626
9627 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9628
9629 * src/output.c (prepare): Delete insertion of previous muscles,
9630 and insert the `prefix' muscles.
9631 * src/macrotab.c (macro_init): Likewise.
9632 (macro_init): Initialization prefix directive by `yy'.
9633 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
9634 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9635 yylval, yydebug, yyerror, yynerrs and yyparse.
9636 New directive `#define' to substitute yydebug, ... with option
9637 name_prefix.
9638
9639 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9640
9641 * src/main.c (main): Standardize.
9642 * src/output.c (output_table_data, output_parser): Likewise.
9643 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9644
9645 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9646
9647 * src/reader.c (read_additionnal_code): Rename %%user_code to
9648 %%epilogue.
9649 * src/output.c (output): Rename %%declarations to %%prologue.
9650 * src/bison.simple: Echo modifications.
9651
9652 2001-08-31 Marc Autret <autret_m@epita.fr>
9653
9654 * src/reader.c (readgram): CleanUp.
9655 (output_token_defines): Likewise.
9656 (packsymbols): Likewise.
9657 (reader): Likewise.
9658 * src/output.c (output): CPP-out useless code.
9659
9660 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9661
9662 * src/reader.c (reader): Delete obsolete call to function
9663 output_trailers and output_headers.
9664 * src/output.h: Remove obsolete functions prototypes of output_headers
9665 and output_trailers.
9666
9667 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
9668
9669 * src/main.c: Include macrotab.h.
9670 * src/macrotab.h (macro_entry_s): Constify fields.
9671 Adjust functions prototypes.
9672 * src/macrotab.c (macro_insert): Constify key and value.
9673 (macro_find): Constify key.
9674 (macro_insert): Include 'xalloc.h'
9675 (macro_insert): Use XMALLOC.
9676 (macro_find): Constify return value.
9677 * src/output.c (output_table_data): Rename table to table_data.
9678 (output_parser): Constify macro_key, macro_value.
9679
9680 2001-08-30 Marc Autret <autret_m@epita.fr>
9681
9682 * src/reader.c (parse_skel_decl): New.
9683 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
9684 * src/lex.h (token_t): New token `tok_skel'.
9685 * src/lex.c (percent_table): Add skeleton option entry.
9686 Standardize.
9687
9688 2001-08-29 Marc Autret <autret_m@epita.fr>
9689
9690 * src/bison.simple: Add %%user_code directive at the end.
9691 * src/reader.c (read_additionnal_code): New.
9692 (reader): Use it.
9693 * src/output.c (output_program): Remove.
9694 (output): Update.
9695
9696 2001-08-28 Marc Autret <autret_m@epita.fr>
9697
9698 * src/output.c (output_actions): Clean up.
9699 (output_gram): CPP-out useless code.
9700 * src/reader.c (reader): Clean up, CPP-out useless code.
9701
9702 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
9703
9704 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
9705 directive.
9706 * src/bison.simple: Add `%%definitions'.
9707
9708 2001-08-28 Marc Autret <autret_m@epita.fr>
9709
9710 * config/depcomp: New file.
9711
9712 2001-08-27 Paul Eggert <eggert@twinsun.com>
9713
9714 * src/bison.simple (yyparse): Don't take the address of an
9715 item before the start of an array, as that doesn't conform to
9716 the C Standard.
9717
9718 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9719
9720 * src/output.c (output): Remove the initialization of the macro
9721 obstack. It was done too late here.
9722
9723 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
9724 completely wrong.
9725 (reader): Initialize the macro obstack here, since we need it to grow
9726 '%define' directives.
9727
9728 * src/reader.h: Declare the macro obstack as extern.
9729
9730 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9731
9732 * src/output.c (output_parser): Fix. Store single '%' characters in
9733 the output obstack instead of throwing them away.
9734
9735 2001-08-27 Akim Demaille <akim@epita.fr>
9736
9737 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9738
9739 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9740
9741 * lib/Makefile.am: Adjust.
9742
9743 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9744
9745 * src/bison.simple: Update and add '%%' directives.
9746
9747 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9748
9749 * src/reader.c (reader): Remove calls to 'output_headers' and
9750 'output_trailers'. Remove some C output.
9751 (readgram): Disable a piece of code that was writing a default
9752 definition for 'YYSTYPE'.
9753 (reader_output_yylsp): Remove.
9754 (packsymbols): Output token defintions to a macro.
9755 (copy_definition): Disable C output.
9756
9757 * src/reader.c (parse_macro_decl): New function used to parse macro
9758 declarations.
9759 (copy_string2): Put the body of copy_string into this new function.
9760 Add a parameter to let the caller choose whether he wants to copy the
9761 string delimiters or not.
9762 (copy_string): Be a simple call to copy_string2 with the last argument
9763 bound to true.
9764 (read_declarations): Add case for macro definition.
9765 (copy_identifier): New.
9766 (parse_macro_decl): Read macro identifiers using copy_identifier
9767 rather than lex.
9768
9769 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9770
9771 * src/output.c (prepare): Add prefixed names.
9772 (output_parser): Output semantic actions.
9773 (output_parser): Fix bug on '%%line' directives.
9774
9775 * src/output.c (output_headers): Remove. The C code printed by this
9776 function should now be in the skeletons.
9777 (output_trailers): Remove.
9778 (output): Disable call to 'reader_output_yylsp'.
9779 (output_rule_data): Do not output tables to the table obstack.
9780
9781 * src/output.c: Remove some C dedicated output.
9782 Improve the use of macro and output obstacks.
9783 (output_defines): Remove.
9784
9785 * src/output.c (output_token_translations): Associate 'translate'
9786 table with a macro. No output to the table obstack.
9787 (output_gram): Same for 'rhs' and 'prhs'.
9788 (output_stos): Same for 'stos'.
9789 (output_rule_data): Same for 'r1' and 'r2'.
9790 (token_actions): Same for 'defact'.
9791 (goto_actions): Same for 'defgoto'.
9792 (output_base): Same for 'pact' and 'pgoto'.
9793 (output_table): Same for 'table'.
9794 (output_check): Same for 'check'.
9795
9796 * src/output.c (output_table_data): New function.
9797 (output_short_table): Remove.
9798 (output_short_or_char_table): Remove.
9799
9800 * src/output.c (output_parser): Replace most of the skeleton copy code
9801 with something new. Skeletons are now processed character by character
9802 rather than line by line, and Bison looks for '%%' macros. This is the
9803 first step in making Bison's output process (a lot) more flexible.
9804 (output_parser): Use the macro table.
9805
9806 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9807
9808 * src/main.c (main): Initialize the macro table.
9809
9810 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9811
9812 * src/lex.c (percent_table): Add tok_define.
9813 * src/lex.h: Add tok_define.
9814
9815 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9816
9817 * src/macrotab.c: New file.
9818 * src/macrotab.h: New file.
9819 * src/Makefile.am: Update.
9820
9821 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9822
9823 * lib/hash.c: New file.
9824 * lib/hash.h: New file.
9825 * lib/Makefile.am: Update.
9826
9827 2001-08-15 Akim Demaille <akim@epita.fr>
9828
9829 Version 1.28c.
9830
9831 2001-08-15 Marc Autret <autret_m@epita.fr>
9832
9833 * src/reader.c (readgram): Indent output macro YYSTYPE.
9834 (packsymbols): Likewise.
9835 (output_token_defines): Likewise.
9836 * src/files.c: Standardize.
9837 (compute_header_macro): New.
9838 (defines_obstack_save): New. Use compute_header_macro.
9839 (output_files): Update. Use defines_obstack_save.
9840
9841 2001-08-15 Akim Demaille <akim@epita.fr>
9842
9843 * doc/bison.texinfo (Table of Symbols): Document
9844 YYSTACK_USE_ALLOCA.
9845
9846 2001-08-15 Akim Demaille <akim@epita.fr>
9847
9848 * missing: Update from CVS Automake.
9849 * config/config.guess, config/config.sub, config/texinfo.tex:
9850 Update from gnu.org.
9851
9852 2001-08-15 Akim Demaille <akim@epita.fr>
9853
9854 * Makefile.maint: Sync with CVS Autoconf.
9855
9856 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
9857
9858 * doc/bison.texinfo: Include GNU Free Documentation License from
9859 `fdl.texi'.
9860 * doc/fdl.texi: Add to package.
9861
9862 2001-08-14 Marc Autret <autret_m@epita.fr>
9863
9864 Turn on %{source,header}_extension features.
9865
9866 * src/lex.c (percent_table): Un-CPP out header_extension and
9867 source_extension.
9868 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
9869 (compute_exts_from_src): Remove conditions. It restores priorities
9870 between options.
9871
9872 2001-08-14 Marc Autret <autret_m@epita.fr>
9873
9874 * src/files.c (compute_base_names): Add extensions computing when
9875 `--file-prefix' used.
9876 Standardize function calls.
9877
9878 2001-08-13 Marc Autret <autret_m@epita.fr>
9879
9880 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
9881 defining it (defined but null disables alloca).
9882
9883 2001-08-13 Marc Autret <autret_m@epita.fr>
9884
9885 * src/bison.simple (_yy_memcpy): CPP reformat.
9886
9887 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
9888
9889 * tests/atconfig.in (CPPFLAGS): Fix.
9890
9891 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
9892
9893 * doc/bison.texinfo: Include GNU General Public License from
9894 `gpl.texi'.
9895 * doc/gpl.texi: Add to package.
9896
9897 2001-08-10 Marc Autret <autret_m@epita.fr>
9898
9899 * src/print_graph.h: Fix.
9900 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
9901
9902 2001-08-10 Akim Demaille <akim@epita.fr>
9903
9904 * src/system.h: Provide default declarations for stpcpy, strndup,
9905 and strnlen.
9906
9907 2001-08-10 Robert Anisko <anisko_r@epita.fr>
9908
9909 * doc/bison.texinfo (Locations): Update @$ stuff.
9910
9911 2001-08-09 Robert Anisko <anisko_r@epita.fr>
9912
9913 * src/bison.simple (YYLLOC_DEFAULT): Update.
9914 (yyparse): Adjust.
9915
9916 2001-08-08 Marc Autret <autret_m@epita.fr>
9917
9918 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
9919 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
9920 Reported by Fabrice Bauzac.
9921
9922 2001-08-08 Marc Autret <autret_m@epita.fr>
9923
9924 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
9925 * src/vcg.c (output_node): Fix.
9926 * src/vcg.h: Cleanup.
9927 * src/print_graph.c: Add comments.
9928 (node_output_size): New global variable. Simplify the formatting of
9929 the VCG graph output.
9930 (print_actions): Unused code is now used. It notifies the final state
9931 and no action states in the VCG graph. It also give the reduce actions.
9932 The `shift and goto' edges are red and the `go to state' edges are
9933 blue.
9934 Get the current node name and node_obstack by argument.
9935 (node_obstack): New variable.
9936 (print_state): Manage node_obstack.
9937 (print_core): Use node_obstack given by argument.
9938 A node is not only computed here but in print_actions also.
9939 (print_graph): CPP out useless code instead of commenting it.
9940
9941 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
9942
9943 * tests/atconfig.in (CPPFLAGS): Fix.
9944
9945 2001-08-07 Akim Demaille <akim@epita.fr>
9946
9947 * src/print_graph.c (quote): New.
9948 (print_core): Use it.
9949
9950 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
9951
9952 * src/vcg.c (complain.h): Include it.
9953 Unepitaize `return' invocations.
9954 [NDEBUG] (main): Remove.
9955 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
9956 * src/files.c (open_files): Initialize graph_obstack.
9957 * src/print_graph.c (print_actions): CPP out useless code.
9958 (print_core): Don't output the last `\n' in labels.
9959 Use `quote'.
9960 * src/files.c (output_files): Output the VCG file.
9961 * src/main.c (main): Invoke print_graph ();
9962
9963 2001-08-06 Marc Autret <autret_m@epita.fr>
9964
9965 Automaton VCG graph output.
9966 Using option ``-g'' or long option ``--graph'', you can generate
9967 a gram_filename.vcg file containing a VCG description of the LALR (1)
9968 automaton of your grammar.
9969
9970 * src/main.c: Call to print_graph() function.
9971 * src/getargs.h: Update.
9972 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
9973 (graph_flag): New flag.
9974 (longopts): Update.
9975 (getargs): Add case `g'.
9976 * src/files.c (graph_obstack): New obstack struct.
9977 (open_files): Initialize new obstack.
9978 (output_files): Saves graph_obstack if required.
9979 * src/files.h (graph_obstack): New extern declaration.
9980 * src/Makefile.am: Add new source files.
9981
9982 2001-08-06 Marc Autret <autret_m@epita.fr>
9983
9984 * src/print_graph.c, src/print_graph.h (graph): New.
9985 * src/vcg.h: New file.
9986 * src/vcg.c: New file, VCG graph handling.
9987
9988 2001-08-06 Marc Autret <autret_m@epita.fr>
9989
9990 Add of %source_extension and %header_extension which specify
9991 the source or/and the header output file extension.
9992
9993 * src/files.c (compute_base_names): Remove initialisation of
9994 src_extension and header_extension.
9995 (compute_exts_from_gf): Update.
9996 (compute_exts_from_src): Update.
9997 (output_files): Update.
9998 * src/reader.c (parse_header_extension_decl): New.
9999 (parse_source_extension_decl): New.
10000 (read_declarations): New case statements for the new tokens.
10001 * src/lex.c (percent_table): Add entries for %source_extension
10002 and %header_extension.
10003 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
10004
10005 2001-08-06 Marc Autret <autret_m@epita.fr>
10006
10007 * configure.in: Bump to 1.28c.
10008 * doc/bison.texinfo: Texinfo thingies.
10009
10010 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
10011
10012 * tests/atconfig.in (CPPFLAGS): Add.
10013 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
10014
10015 2001-08-03 Akim Demaille <akim@epita.fr>
10016
10017 Version 1.28b.
10018
10019 2001-08-03 Akim Demaille <akim@epita.fr>
10020
10021 * tests/Makefile.am (check-local): Ship testsuite.
10022 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
10023 Include `string.h'.
10024
10025 2001-08-03 Akim Demaille <akim@epita.fr>
10026
10027 * configure.in: Try using -Wformat when compiling.
10028
10029 2001-08-03 Akim Demaille <akim@epita.fr>
10030
10031 * configure.in: Bump to 1.28b.
10032
10033 2001-08-03 Akim Demaille <akim@epita.fr>
10034
10035 * src/complain.c: Adjust strerror_r portability issues.
10036
10037 2001-08-03 Akim Demaille <akim@epita.fr>
10038
10039 Version 1.28a.
10040
10041 2001-08-03 Akim Demaille <akim@epita.fr>
10042
10043 * src/getargs.c, src/getarg.h (skeleton)): Constify.
10044 * src/lex.c (literalchar): Avoid name clashes on `buf'.
10045 * src/getargs.c: Include complain.h.
10046 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
10047 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
10048
10049 2001-08-03 Akim Demaille <akim@epita.fr>
10050
10051 * src/reader.c (readgram): Display hidden chars in error messages.
10052
10053 2001-08-03 Akim Demaille <akim@epita.fr>
10054
10055 Update to gettext 0.10.39.
10056
10057 2001-08-03 Akim Demaille <akim@epita.fr>
10058
10059 * lib/strspn.c: New.
10060
10061 2001-08-01 Marc Autret <autret_m@epita.fr>
10062
10063 * doc/bison.texinfo: Update.
10064 * doc/bison.1 (mandoc): Update.
10065 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
10066 * src/files.c: Support output files extensions computing.
10067 (src_extension): New static variable.
10068 (header_extension): New static variable.
10069 (tr): New function.
10070 (get_extension_index): New function, gets the index of an extension
10071 filename in a string.
10072 (compute_exts_from_gf): New function, computes extensions from the
10073 grammar file extension.
10074 (compute_exts_from_src): New functions, computes extensions from the
10075 C source file extension, file given by ``-o'' option.
10076 (compute_base_names): Update.
10077 (output_files): Update.
10078
10079 2001-08-01 Robert Anisko <anisko_r@epita.fr>
10080
10081 * doc/bison.texi: Document @$.
10082 (Locations): New section.
10083
10084 2001-07-18 Akim Demaille <akim@epita.fr>
10085
10086 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
10087 * config/prev-version.txt, config/move-if-change: New.
10088 * Makefile.am: Adjust.
10089
10090 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
10091
10092 * src/bison.simple (yyparse): Suppress warning `comparaison
10093 between signed and unsigned'.
10094
10095 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
10096
10097 * src/getargs.h (raw_flag): Remove.
10098 * src/getargs.c: Die on `-r'/`--raw'.
10099 * src/lex.c (parse_percent_token): Die on `%raw'.
10100 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
10101 * tests/calc.at: Suppress test with option `--raw'.
10102
10103 2001-07-14 Akim Demaille <akim@epita.fr>
10104
10105 * config/: New.
10106 * configure.in: Require Autoconf 2.50.
10107 Update to gettext 0.10.38.
10108
10109 2001-03-16 Akim Demaille <akim@epita.fr>
10110
10111 * doc/bison.texinfo: ANSIfy the examples.
10112
10113 2001-03-16 Akim Demaille <akim@epita.fr>
10114
10115 * getargs.c (skeleton): New variable.
10116 (longopts): --skeleton is a new option.
10117 (shortopts, getargs): -S is a new option.
10118 * getargs.h: Declare skeleton.
10119 * output.c (output_parser): Use it.
10120
10121 2001-03-16 Akim Demaille <akim@epita.fr>
10122
10123 * m4/strerror_r.m4: New.
10124 * m4/error.m4: Run AC_FUNC_STRERROR_R.
10125 * lib/error.h, lib/error.c: Update.
10126
10127 2001-03-16 Akim Demaille <akim@epita.fr>
10128
10129 * src/getargs.c (longopts): Clean up.
10130
10131 2001-02-21 Akim Demaille <akim@epita.fr>
10132
10133 * src/reader.c (gensym): `gensym_count' is your own.
10134 Use a static buf to create the symbol name, as token_buffer is no
10135 longer a buffer.
10136
10137 2001-02-08 Akim Demaille <akim@epita.fr>
10138
10139 * src/conflicts.c (conflict_report): Be sure not to append to res
10140 between two calls, which could happen if both first sprintf were
10141 skipped, but not the first cp += strlen.
10142
10143 2001-02-08 Akim Demaille <akim@epita.fr>
10144
10145 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
10146 New, from fileutils 4.0.37.
10147 * configure.in: Require Autoconf 2.49c. I took some time before
10148 making this decision. This is the only way out for portability
10149 issues in Bison, it would mean way too much duplicate effort to
10150 import in Bison features implemented in 2.49c since 2.13.
10151 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
10152
10153 2001-02-02 Akim Demaille <akim@epita.fr>
10154
10155 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
10156 * lib/xalloc.h, lib/xmalloc.c: Update.
10157
10158 2001-01-19 Akim Demaille <akim@epita.fr>
10159
10160 Get rid of the ad hoc handling of token_buffer in the scanner: use
10161 the obstacks.
10162
10163 * src/lex.c (token_obstack): New.
10164 (init_lex): Initialize it. No longer call...
10165 (grow_token_buffer): this. Remove it.
10166 Adjust all the places which used it to use the obstack.
10167
10168 2001-01-19 Akim Demaille <akim@epita.fr>
10169
10170 * src/lex.h: Rename all the tokens:
10171 s/\bENDFILE\b/tok_eof/g;
10172 s/\bIDENTIFIER\b/tok_identifier/g;
10173 etc.
10174 Let them be enums, not #define, to ease debugging.
10175 Adjust all the code.
10176
10177 2001-01-18 Akim Demaille <akim@epita.fr>
10178
10179 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
10180 * src/lex.c (maxtoken, grow_token_buffer): Static.
10181
10182 2001-01-18 Akim Demaille <akim@epita.fr>
10183
10184 Since we now use obstacks, more % directives can be enabled.
10185
10186 * src/lex.c (percent_table): Also accept `%yacc',
10187 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
10188 `%debug'.
10189 Handle the actions for `%semantic_parser' and `%pure_parser' here,
10190 instead of returning a token.
10191 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
10192 * src/reader.c (read_declarations): Adjust.
10193 * src/files.c (open_files): Don't call `compute_base_names', don't
10194 compute `attrsfile' since they depend upon data which might be
10195 *in* the input file now.
10196 (output_files): Do it here.
10197 * src/output.c (output_headers): Document the fact that this patch
10198 introduces a guaranteed SEGV for semantic parsers.
10199 * doc/bison.texinfo: Document them.
10200 * tests/suite.at: Exercise these %options.
10201
10202 2000-12-20 Akim Demaille <akim@epita.fr>
10203
10204 Also handle the output file (--verbose) with obstacks.
10205
10206 * files.c (foutput): Remove.
10207 (output_obstack): New.
10208 Adjust all dependencies.
10209 * src/conflicts.c: Return a string.
10210 * src/system.h (obstack_grow_string): Rename as...
10211 (obstack_sgrow): this. Be ready to work with non literals.
10212 (obstack_fgrow4): New.
10213
10214 2000-12-20 Akim Demaille <akim@epita.fr>
10215
10216 * src/files.c (open_files): Fix the computation of short_base_name
10217 in the case of `-o foo.tab.c'.
10218
10219 2000-12-20 Akim Demaille <akim@epita.fr>
10220
10221 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
10222 (copy_dollar): Now that everything uses obstacks, get rid of the
10223 FILE * parameters.
10224
10225 2000-12-20 Akim Demaille <akim@epita.fr>
10226
10227 * src/files.c (open_files): Actually the `.output' file is based
10228 on the short_base_name, not base_name.
10229 * tests/suite.at (Checking output file names): Adjust.
10230
10231 2000-12-20 Akim Demaille <akim@epita.fr>
10232
10233 * src/bison.s1: Remove, we now use directly...
10234 * src/bison.simple: this.
10235 * src/Makefile.am: Use pkgdata instead of data.
10236
10237 2000-12-20 Akim Demaille <akim@epita.fr>
10238
10239 * src/files.c (guard_obstack): New.
10240 (open_files): Initialize it.
10241 (output_files): Dump it...
10242 * src/files.h: Export it.
10243 * src/reader.c (copy_guard): Use it.
10244
10245 2000-12-19 Akim Demaille <akim@epita.fr>
10246
10247 * src/files.c (outfile, defsfile, actfile): Removed as global
10248 vars.
10249 (open_files): Don't compute them.
10250 (output_files): Adjust.
10251 (base_name, short_base_name): Be global.
10252 Adjust dependencies.
10253
10254 2000-12-19 Akim Demaille <akim@epita.fr>
10255
10256 * src/files.c (strsuffix): New.
10257 (stringappend): Be just like strcat but allocate.
10258 (base_names): Eve out from open_files.
10259 Try to simplify the rather hairy computation of base_name and
10260 short_base_name.
10261 (open_files): Use it.
10262 * tests/suite.at (Checking output file names): New test.
10263
10264 2000-12-19 Akim Demaille <akim@epita.fr>
10265
10266 * src/system.h (obstack_grow_literal_string): Rename as...
10267 (obstack_grow_string): this.
10268 * src/output.c (output_parser): Recognize `%% actions' instead of
10269 `$'.
10270 * src/bison.s1: s/$/%% actions/.
10271 * src/bison.hairy: Likewise.
10272
10273 2000-12-19 Akim Demaille <akim@epita.fr>
10274
10275 * src/output.c (output_parser): Compute the `#line' lines when
10276 there are.
10277 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
10278 Suggested by Hans Aberg.
10279
10280 2000-12-19 Akim Demaille <akim@epita.fr>
10281
10282 Let the handling of the skeleton files be local to the procedures
10283 that use it.
10284
10285 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
10286 longer static.
10287 (fparser, open_extra_files): Remove.
10288 (open_files, output_files): Don't take care of fparser.
10289 * src/files.h: Adjust.
10290 * src/output.c (output_parser): Open and close the file to the
10291 skeleton.
10292 * src/reader.c (read_declarations): When %semantic_parser, open
10293 fguard.
10294
10295 2000-12-19 Akim Demaille <akim@epita.fr>
10296
10297 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
10298 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
10299
10300 2000-12-19 Akim Demaille <akim@epita.fr>
10301
10302 * src/files.c (open_files): Yipee! We no longer need all the code
10303 looking for `/tmp' since we have no tmp file.
10304
10305 2000-12-19 Akim Demaille <akim@epita.fr>
10306
10307 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
10308 New macros.
10309 * src/files.c (open_files): Less dependency on MSDOS etc.
10310
10311 2000-12-14 Akim Demaille <akim@epita.fr>
10312
10313 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
10314 Provide a default definition.
10315 Use it when executing the default @ action.
10316 * src/reader.c (reader_output_yylsp): No longer include
10317 `timestamp' and `text' in the default YYLTYPE.
10318
10319 2000-12-12 Akim Demaille <akim@epita.fr>
10320
10321 * src/reader.c (copy_definition, parse_union_decl, copy_action)
10322 (copy_guard): Quote the file names.
10323 Reported by Laurent Mascherpa.
10324
10325 2000-12-12 Akim Demaille <akim@epita.fr>
10326
10327 * src/output.c (output_headers, output_program, output): Be sure
10328 to escape special characters when outputting filenames.
10329 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
10330 (output_headers): Don't depend on them, Use ACTSTR.
10331
10332 2000-11-17 Akim Demaille <akim@epita.fr>
10333
10334 * lib/obstack.h: Formatting changes.
10335 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
10336 prevents type checking.
10337 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
10338 cast the value to (void *): assigning a `foo *' to a `void *'
10339 variable is valid.
10340 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
10341 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
10342 append characters.
10343
10344 2000-11-17 Akim Demaille <akim@epita.fr>
10345
10346 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
10347 as...
10348 (suite.m4, regression.m4, calc.m4): these.
10349 * tests/atgeneral.m4: Update from CVS Autoconf.
10350
10351 2000-11-17 Akim Demaille <akim@epita.fr>
10352
10353 * tests/regression.m4 (%union and --defines): New test,
10354 demonstrating a current bug in the obstack implementation.
10355
10356 2000-11-17 Akim Demaille <akim@epita.fr>
10357
10358 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
10359 macros.
10360 Use them to declare the variables which are global or local to
10361 `yyparse'.
10362
10363 2000-11-17 Akim Demaille <akim@epita.fr>
10364
10365 * acconfig.h: Remove, no longer used.
10366
10367 2000-11-07 Akim Demaille <akim@epita.fr>
10368
10369 * src: s/Copyright (C)/Copyright/g.
10370
10371 2000-11-07 Akim Demaille <akim@epita.fr>
10372
10373 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
10374 defining.
10375 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
10376
10377 2000-11-07 Akim Demaille <akim@epita.fr>
10378
10379 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
10380 Merge in a single CPP if/else.
10381
10382 2000-11-07 Akim Demaille <akim@epita.fr>
10383
10384 * src/output.c (output): Remove useless variables.
10385 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
10386 argument `data' for consistency with the prototypes.
10387 Qualify it `const'.
10388 (obstack_copy, obstack_copy0): Rename the second argument as
10389 `address' for consistency. Qualify it `const'.
10390 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
10391 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
10392 `const' their input argument (`data' or `address').
10393 Adjust the corresponding macros to include `const' in casts.
10394
10395 2000-11-03 Akim Demaille <akim@epita.fr>
10396
10397 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
10398 s/PFILE1/BISON_HAIRY/.
10399 Adjust dependencies.
10400
10401 2000-11-03 Akim Demaille <akim@epita.fr>
10402
10403 For some reason, this was not applied.
10404
10405 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10406 `unlink': it's no longer used.
10407
10408 2000-11-03 Akim Demaille <akim@epita.fr>
10409
10410 * src/files.c (skeleton_find): New function, eved out of...
10411 (open_files, open_extra_files): here.
10412
10413 2000-11-03 Akim Demaille <akim@epita.fr>
10414
10415 Don't use `atexit'.
10416
10417 * src/files.c (obstack_save): New function.
10418 (done): Rename as...
10419 (output_files): this.
10420 Use `obstack_save'.
10421 * src/main.c (main): Don't use `atexit' to register `done', since
10422 it no longer has to remove tmp files, just call `output_files'
10423 when there are no errors.
10424
10425 2000-11-02 Akim Demaille <akim@epita.fr>
10426
10427 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10428 `unlink': it's no longer used.
10429 * src/files.h: Formatting changes.
10430
10431 2000-11-02 Akim Demaille <akim@epita.fr>
10432
10433 Remove the last uses of mktemp and unlink/delete.
10434
10435 * src/files.c (fdefines, ftable): Removed.
10436 (defines_ostack, table_obstack): New.
10437 Adjust dependencies of the former into uses of the latter.
10438 * src/output.c (output_short_or_char_table, output_short_table):
10439 Convert to using obstacks.
10440 * src/reader.c (copy_comment2): Accept one FILE * and two
10441 obstacks.
10442 (output_token_defines, reader_output_yylsp): Use obstacks.
10443 * src/system.h (obstack_fgrow3): New.
10444 * po/POTFILES.in: Adjust.
10445
10446 2000-11-01 Akim Demaille <akim@epita.fr>
10447
10448 Change each use of `fattrs' into a use of `attrs_obstack'.
10449
10450 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
10451 * src/files.c (fattrs): Remove.
10452 (attrs_obstack): New.
10453 Adjust all dependencies.
10454 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
10455
10456 2000-11-01 Akim Demaille <akim@epita.fr>
10457
10458 Introduce obstacks.
10459 Change each use of `faction' into a use of `action_obstack'.
10460
10461 * lib/obstack.h, lib/obstack.c: New files.
10462 * src/files.c (faction): Remove.
10463 (action_obstack): New.
10464 Adjust all dependencies.
10465
10466 2000-10-20 Akim Demaille <akim@epita.fr>
10467
10468 * lib/quote.h (PARAMS): New macro. Use it.
10469
10470 2000-10-16 Akim Demaille <akim@epita.fr>
10471
10472 * src/output.c (output_short_or_char_table): New function.
10473 (output_short_table, output_token_translations): Use it.
10474 (goto_actions): Use output_short_table.
10475
10476 2000-10-16 Akim Demaille <akim@epita.fr>
10477
10478 * src/symtab.c (bucket_new): New function.
10479 (getsym): Use it.
10480
10481 * src/output.c (output_short_table): New argument to display the
10482 comment associated with the table.
10483 Adjust dependencies.
10484 (output_gram): Use it.
10485 (output_rule_data): Nicer output layout for YYTNAME.
10486
10487 2000-10-16 Akim Demaille <akim@epita.fr>
10488
10489 * src/lex.c (read_typename): New function.
10490 (lex): Use it.
10491 * src/reader.c (copy_dollar): Likewise.
10492
10493 2000-10-16 Akim Demaille <akim@epita.fr>
10494
10495 * src/reader.c (copy_comment2): Expect the input stream to be on
10496 the `/' which is suspected to open a comment, instead of being
10497 called after `//' or `/*' was read.
10498 (copy_comment, copy_definition, parse_union_decl, copy_action)
10499 (copy_guard): Adjust.
10500
10501 2000-10-16 Akim Demaille <akim@epita.fr>
10502
10503 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
10504 `read_signed_integer'.
10505
10506 2000-10-16 Akim Demaille <akim@epita.fr>
10507
10508 * src/reader.c (copy_dollar): New function.
10509 (copy_guard, copy_action): Use it.
10510
10511 2000-10-16 Akim Demaille <akim@epita.fr>
10512
10513 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
10514 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
10515 New files, from Fileutils 4.0.27.
10516 * src/main.c (printable_version): Remove.
10517 * src/lex.c, src/reader.c: Use `quote'.
10518
10519 2000-10-04 Akim Demaille <akim@epita.fr>
10520
10521 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
10522
10523 2000-10-04 Akim Demaille <akim@epita.fr>
10524
10525 * doc/bison.texinfo: Various typos spotted by Neil Booth.
10526
10527 2000-10-04 Akim Demaille <akim@epita.fr>
10528
10529 When a literal string is used to define two different tokens,
10530 `bison -v' segfaults.
10531 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
10532
10533 * tests/regression.m4: New file.
10534 Include the core of the sample provided by Piotr Gackiewicz.
10535 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
10536 properly.
10537
10538 2000-10-04 Akim Demaille <akim@epita.fr>
10539
10540 * src/reader.c (parse_expect_decl): Keep `count' within the size
10541 of `buffer'.
10542 From Neil Booth.
10543
10544 2000-10-02 Paul Eggert <eggert@twinsun.com>
10545
10546 * bison.s1 (yyparse): Assign the default value
10547 unconditionally, to avoid a GCC warning and make the parser a
10548 tad smaller.
10549
10550 2000-10-02 Akim Demaille <akim@epita.fr>
10551
10552 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
10553 options.
10554
10555 2000-10-02 Akim Demaille <akim@epita.fr>
10556
10557 * src/derives.c, src/print.c, src/reduce.c: To ease the
10558 translation, move some `\n' out of the translated strings.
10559
10560 2000-10-02 Akim Demaille <akim@epita.fr>
10561
10562 The location tracking mechanism is precious for parse error
10563 messages. Nevertheless, it is enabled only when `@n' is used in
10564 the grammar, which is a different issue (you can use it in error
10565 message, but not in the grammar per se). Therefore, there should
10566 be another means to enable it.
10567
10568 * src/getargs.c (getargs): Support `--locations'.
10569 (usage): Report it.
10570 * src/getargs.h (locationsflag): Export it.
10571 * src/lex.c (percent_table): Support `%locations'.
10572 * src/reader.c (yylsp_needed): Remove this variable, now replaced
10573 with `locationsflag'.
10574 * doc/bison.texinfo: Document `--locations' and `%locations'.
10575 Sort the options.
10576 * tests/calc.m4: Test it.
10577
10578 For regularity of the names, replace each
10579 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
10580 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
10581 In addition replace each `flag' with `_flag'.
10582
10583 2000-10-02 Akim Demaille <akim@epita.fr>
10584
10585 Also test parse error messages, including with YYERROR_VERBOSE.
10586
10587 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
10588 associative).
10589 Use it to check the computations.
10590 Use it to check `nonassoc' is honored.
10591 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
10592 `--yyerror-verbose'.
10593 (_AT_CHECK_CALC): Adjust to this option.
10594 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
10595
10596 2000-10-02 Akim Demaille <akim@epita.fr>
10597
10598 Test also `--verbose', `--defines' and `--name-prefix'. Testing
10599 the latter demonstrates a flaw in the handling of non debugging
10600 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
10601 was used in order to simplify:
10602
10603 #if YYDEBUG
10604 if (yydebug)
10605 {
10606 ...
10607 }
10608 #endif
10609
10610 into
10611
10612 if (yydebug)
10613 {
10614 ...
10615 }
10616
10617 unfortunately this leads to a CPP conflict when
10618 `--name-prefix=foo' is used since it produces `#define yydebug
10619 foodebug'.
10620
10621 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
10622 (YYDPRINTF): New macro.
10623 Spread its use.
10624 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10625 the bison options.
10626 Also test `--verbose', `--defines' and `--name-prefix'.
10627
10628 2000-10-02 Akim Demaille <akim@epita.fr>
10629
10630 Improve the readability of the produced parsers.
10631
10632 * src/bison.s1: Formatting changes.
10633 Improve the comment related to the `$' mark.
10634 (yydefault): Don't fall through to `yyresume': `goto' there.
10635 * src/output.c (output_parser): When the `$' is met, skip the end
10636 of its line.
10637 New variable, `number_of_dollar_signs', to check there's exactly
10638 one `$' in the parser skeleton.
10639
10640 2000-10-02 Akim Demaille <akim@epita.fr>
10641
10642 * lib/xstrdup.c: New file, from the fileutils.
10643 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10644 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10645 instead of strlen + xmalloc + strcpy.
10646 * src/symtab.c (copys): Remove, use xstrdup instead.
10647
10648 2000-10-02 Akim Demaille <akim@epita.fr>
10649
10650 * src/gram.h (associativity): New enum type which replaces the
10651 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10652 `right_assoc', `left_assoc' and `non_assoc'.
10653 Adjust all dependencies.
10654 * src/reader.c: Formatting changes.
10655 (LTYPESTR): Don't define it, use it as a literal in
10656 `reader_output_yylsp'.
10657 * src/symtab.h (symbol_class): New enum type which replaces the
10658 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10659 `sunknown', `stoken and `snterm'.
10660
10661 2000-10-02 Akim Demaille <akim@epita.fr>
10662
10663 * src/getargs.c (fixed_outfiles): Rename as...
10664 (yaccflag): for consistency and accuracy.
10665 Adjust dependencies.
10666
10667 2000-10-02 Akim Demaille <akim@epita.fr>
10668
10669 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10670 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10671 difficult and introduced a lot of core dump. It turns out that
10672 Bison used an implementation of `xmalloc' based on `calloc', and
10673 at various places it does depend upon the initialization to 0. I
10674 have not tried to isolate the pertinent places, and all the former
10675 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10676 someone should address this issue.
10677
10678 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10679 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10680 files.
10681 Adjust dependencies.
10682 * src/warshall.h: New file.
10683 Propagate.
10684
10685 2000-10-02 Akim Demaille <akim@epita.fr>
10686
10687 Various anti-`extern in *.c' changes.
10688
10689 * src/system.h: Include `assert.h'.
10690
10691 2000-10-02 Akim Demaille <akim@epita.fr>
10692
10693 * src/state.h (nstates, final_state, first_state, first_shift)
10694 (first_reduction): Move their exportation from here...
10695 * src/LR0.h: to here.
10696 Adjust dependencies.
10697 * src/getargs.c (statisticsflag): New variable.
10698 Add support for `--statistics'.
10699 Adjust dependencies.
10700
10701 Remove a lot of now useless `extern' statements in most files.
10702
10703 2000-10-02 Akim Demaille <akim@epita.fr>
10704
10705 * src/LR0.h: New file.
10706 Propagate its use.
10707
10708 2000-10-02 Akim Demaille <akim@epita.fr>
10709
10710 * src/print.h: New file.
10711 Propagate its use.
10712 * src/print.c: Formatting and ordering changes.
10713 (verbose, terse): Replace with...
10714 (print_results): this new function.
10715 Adjust dependencies.
10716
10717 2000-10-02 Akim Demaille <akim@epita.fr>
10718
10719 * src/conflicts.c (conflict_report): New function.
10720 (conflict_log, verbose_conflict_log): Replace with...
10721 (print_conflicts): this function.
10722 Adjust dependencies.
10723 * src/conflicts.h: New file.
10724 Propagate its inclusion.
10725
10726 2000-10-02 Akim Demaille <akim@epita.fr>
10727
10728 * src/nullable.h: New file.
10729 Propagate its inclusion.
10730 * src/nullable.c: Formatting changes.
10731
10732 2000-10-02 Akim Demaille <akim@epita.fr>
10733
10734 * src/reduce.h: New file.
10735 Propagate its inclusion.
10736 * src/reduce.c: Topological sort and other formatting changes.
10737 (bool, TRUE, FALSE): Move their definition to...
10738 * src/system.h: here.
10739
10740 2000-10-02 Akim Demaille <akim@epita.fr>
10741
10742 * src/files.c: Formatting changes.
10743 (tryopen, tryclose, openfiles): Rename as...
10744 (xfopen, xfclose, open_files): this.
10745 (stringappend): static.
10746 * src/files.h: Complete the list of exported symbols.
10747 Propagate its use.
10748
10749 2000-10-02 Akim Demaille <akim@epita.fr>
10750
10751 * src/reader.h: New file.
10752 Propagate its use instead of tedious list of `extern' and
10753 prototypes.
10754 * src/reader.c: Formatting changes, topological sort,
10755 s/register//.
10756
10757 2000-10-02 Akim Demaille <akim@epita.fr>
10758
10759 * src/lex.h: Prototype `lex.c' exported functions.
10760 * src/reader.c: Adjust.
10761 * src/lex.c: Formatting changes.
10762 (safegetc): Rename as...
10763 (xgetc): this.
10764
10765 2000-10-02 Akim Demaille <akim@epita.fr>
10766
10767 * src/lalr.h: New file.
10768 Propagate its inclusion instead of prototypes and `extern'.
10769 * src/lalr.c: Formatting changes, topological sorting etc.
10770
10771 2000-10-02 Akim Demaille <akim@epita.fr>
10772
10773 * src/output.c (token_actions): Introduce a temporary array,
10774 YYDEFACT, that makes it possible for this function to use
10775 output_short_table.
10776
10777 2000-10-02 Akim Demaille <akim@epita.fr>
10778
10779 `user_toknums' is output as a `short[]' in `output.c', while it is
10780 defined as a `int[]' in `reader.c'. For consistency with the
10781 other output tables, `user_toknums' is now defined as a table of
10782 shorts.
10783
10784 * src/reader.c (user_toknums): Be a short table instead of an int
10785 table.
10786 Adjust dependencies.
10787
10788 Factor the short table outputs.
10789
10790 * src/output.c (output_short_table): New function.
10791 * src/output.c (output_gram, output_stos, output_rule_data)
10792 (output_base, output_table, output_check): Use it.
10793
10794 2000-10-02 Akim Demaille <akim@epita.fr>
10795
10796 * src/output.c (output): Topological sort of the functions, in
10797 order to get rid of the `static' prototypes.
10798 No longer use `register'.
10799 * src/output.h: New file.
10800 Propagate its inclusion in files explicitly prototyping functions
10801 from output.c.
10802
10803 2000-09-21 Akim Demaille <akim@epita.fr>
10804
10805 * src/atgeneral.m4: Update from Autoconf.
10806
10807 2000-09-21 Akim Demaille <akim@epita.fr>
10808
10809 * src/closure.h: New file.
10810 * src/closure.c: Formatting changes, topological sort over the
10811 functions, use of closure.h.
10812 (initialize_closure, finalize_closure): Rename as...
10813 (new_closure, free_closure): these. Adjust dependencies.
10814 * src/LR0.c: Formatting changes, topological sort, use of
10815 cloture.h.
10816 (initialize_states): Rename as...
10817 (new_states): this.
10818 * src/Makefile.am (noinst_HEADERS): Adjust.
10819
10820 2000-09-20 Akim Demaille <akim@epita.fr>
10821
10822 * src/acconfig.h: Don't protect config.h against multiple
10823 inclusion.
10824 Don't define PARAMS.
10825 * src/system.h: Define PARAMS.
10826 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
10827 purpose of config.h. system.h must not try to fix wrong
10828 definitions in config.h.
10829
10830 2000-09-20 Akim Demaille <akim@epita.fr>
10831
10832 * src/derives.h: New file.
10833 * src/main.c, src/derives.h: Use it.
10834 Formatting changes.
10835 * src/Makefile.am (noinst_HEADERS): Adjust.
10836
10837 2000-09-20 Akim Demaille <akim@epita.fr>
10838
10839 * tests/atgeneral.m4: Update from Autoconf.
10840 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
10841 (AT_CHECK_CALC): New macros.
10842 Use these macros to test bison with options `', `--raw',
10843 `--debug', `--yacc', `--yacc --debug'.
10844
10845 2000-09-19 Akim Demaille <akim@epita.fr>
10846
10847 * src/output.c: Formatting changes.
10848 * src/machine.h: Remove, leaving its contents in...
10849 * src/system.h: here.
10850 Include stdio.h.
10851 Adjust all dependencies on stdio.h and machine.h.
10852 * src/getargs.h: New file.
10853 Let all `extern' declarations about getargs.c be replaced with
10854 inclusion of `getargs.h'.
10855 * src/Makefile.am (noinst_HEADERS): Adjust.
10856
10857 * tests/calc.m4 (yyin): Be initialized in main, not on the global
10858 scope.
10859 (yyerror): Returns void, not int.
10860 * doc/bison.texinfo: Formatting changes.
10861
10862 2000-09-19 Akim Demaille <akim@epita.fr>
10863
10864 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
10865 portable.
10866
10867 2000-09-18 Akim Demaille <akim@epita.fr>
10868
10869 * configure.in: Append WARNING_CFLAGS to CFLAGS.
10870 * src/Makefile.am (INCLUDES): Don't.
10871 Be ready to fetch headers in lib/.
10872
10873 2000-09-18 Akim Demaille <akim@epita.fr>
10874
10875 * doc/bison.texinfo: Update the copyright.
10876 ANSIfy and GNUify the examples.
10877 Remove the old menu.
10878
10879 2000-09-18 Akim Demaille <akim@epita.fr>
10880
10881 First set of tests: use the `calc' example from the documentation.
10882
10883 * src/bison.s1 (yyparse): Condition the code using `yytname' which
10884 is defined only when YYDEBUG is.
10885 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
10886 * src/files.c (tryopen, tryclose): Formatting changes.
10887 Move to the top and be static.
10888 * src/reader.c (read_signed_integer): Likewise.
10889 * tests/calc.m4: New file.
10890 * Makefile.am, suite.m4: Adjust.
10891 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
10892
10893 2000-09-18 Akim Demaille <akim@epita.fr>
10894
10895 Add support for an Autotest test suite for Bison.
10896
10897 * m4/m4.m4, m4/atconfig.m4: New files.
10898 * m4/Makefile.am (EXTRA_DIST): Adjust.
10899 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
10900 files.
10901 * src/getargs.c: Display a more standard --version message.
10902 * src/reader.c (reader): Formatting changes.
10903 No longer depend upon VERSION_STRING.
10904 * configure.in: No longer use `dnl'.
10905 Set up the test suite and the new directory `tests/.
10906 (VERSION_STRING): Remove.
10907
10908 2000-04-14 Akim Demaille <akim@epita.fr>
10909
10910 * src/reader.c (copy_comment2): New function, same as former
10911 `copy_comment', but outputs into two FILE *.
10912 (copy_comment): Use it.
10913 (parse_union_decl): Use it.
10914 (get_type, parse_start_decl): Use the same `invalid' message.
10915 (parse_start_decl, parse_union_decl): Use the same `multiple'
10916 message.
10917 (parse_union_decl, copy_guard, copy_action): Use the same
10918 `unmatched' message.
10919 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
10920
10921 2000-03-31 Akim Demaille <akim@epita.fr>
10922
10923 * src/files.c (tryopen, tryclose): Move to the top.
10924 Be static.
10925
10926 2000-03-31 Akim Demaille <akim@epita.fr>
10927
10928 * src/main.c (main): Don't call `done', exit does it.
10929
10930 2000-03-31 Akim Demaille <akim@epita.fr>
10931
10932 * allocate.c: s/return (foo)/return foo/.
10933 * lalr.c: Likewise.
10934 * LR0.c: Likewise.
10935 * output.c: Likewise.
10936 * reader.c: Likewise.
10937 * symtab.c: Likewise.
10938 * vmsgetargs.c: Likewise.
10939
10940 2000-03-31 Akim Demaille <akim@epita.fr>
10941
10942 Clean up the error reporting functions.
10943
10944 * src/report.c: New file.
10945 * src/report.h: Likewise.
10946 * src/Makefile.am: Adjust.
10947 * m4/error.m4: New file.
10948 * m4/Makefile.am: Adjust.
10949 * configure.in (jm_PREREQ_ERROR): Call it.
10950 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
10951 Remove.
10952 (fatal, fatals): Remove. All callers use complain.c::fatal.
10953 (warn, warni, warns, warnss, warnss): Remove. All callers use
10954 complain.c::complain.
10955 (toomany): Remove, use fatal instead.
10956 * src/files.c (done): No argument, use complain_message_count.
10957 * src/main.c (main): Register `done' to `atexit'.
10958
10959 * src/getargs.c (usage): More `fputs', less `fprintf'.
10960
10961 2000-03-28 Akim Demaille <akim@epita.fr>
10962
10963 * lib/: New directory.
10964 * Makefile.am (SUBDIRS): Adjust.
10965 * configure.in: Adjust.
10966 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
10967 useless.
10968 * src/alloca.c: Moved to lib/.
10969 * src/getopt.c: Likewise.
10970 * src/getopt1.c: Likewise.
10971 * src/getopt.h: Likewise.
10972 * src/ansi2knr.c: Likewise.
10973 * src/ansi2knr.1: Likewise.
10974 * src/Makefile.am: Adjust.
10975 * lib/Makefile.am: New file.
10976
10977 2000-03-28 Akim Demaille <akim@epita.fr>
10978
10979 * src/getargs.c (usage): Refresh the help message.
10980
10981 2000-03-17 Akim Demaille <akim@epita.fr>
10982
10983 * src/getopt1.c: Updated from textutils 2.0e
10984 * src/getopt.c: Likewise.
10985 * src/getopt.h: Likewise.
10986
10987 2000-03-17 Akim Demaille <akim@epita.fr>
10988
10989 * src/Makefile.am (bison.simple): Fix the awk program: quote only
10990 the file name, not the whole `#line LINE FILE'.
10991
10992 2000-03-17 Akim Demaille <akim@epita.fr>
10993
10994 On syntax errors, report the token on which we choked.
10995
10996 * src/bison.s1 (yyparse): In the label yyerrlab, when
10997 YYERROR_VERBOSE, add yychar in msg.
10998
10999 2000-03-17 Akim Demaille <akim@epita.fr>
11000
11001 * src/reader.c (copy_at): New function.
11002 (copy_guard): Use it.
11003 (copy_action): Use it.
11004
11005 2000-03-17 Akim Demaille <akim@epita.fr>
11006
11007 Be kind to translators, save some useless translations.
11008
11009 * src/main.c (banner): New function.
11010 (fatal_banner): Use it.
11011 (warn_banner): Use it.
11012
11013 2000-03-17 Akim Demaille <akim@epita.fr>
11014
11015 * src/reader.c (copy_definition): Use copy_string and
11016 copy_comment. Removed now unused `match', `ended',
11017 `cplus_comment'.
11018 (copy_comment, copy_string): Moved, to be visible from
11019 copy_definition.
11020
11021 2000-03-17 Akim Demaille <akim@epita.fr>
11022
11023 * src/reader.c (copy_string): Declare `static inline'. No
11024 problems with inline, since it is checked by configure.
11025 (copy_comment): Likewise.
11026
11027 2000-03-17 Akim Demaille <akim@epita.fr>
11028
11029 * src/reader.c (packsymbols): Formatting changes.
11030
11031 2000-03-17 Akim Demaille <akim@epita.fr>
11032
11033 * src/reader.c (copy_comment): New function, factored out from:
11034 (copy_action): Use it. Removed now unused `match', `ended',
11035 `cplus_comment'.
11036 (copy_guard): Likewise.
11037
11038 2000-03-17 Akim Demaille <akim@epita.fr>
11039
11040 * src/reader.c (copy_string): New function, factored out from:
11041 (copy_action): Use it.
11042 (copy_guard): Likewise.
11043
11044 2000-03-17 Akim Demaille <akim@epita.fr>
11045
11046 Change the handling of @s so that they behave exactly like $s.
11047 There is now a pseudo variable @$ (readble and writable), location
11048 of the lhs of the rule (by default ranging from the location of
11049 the first symbol of the rhs, to the location of the last symbol,
11050 or, if the rhs is empty, YYLLOC).
11051
11052 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
11053 yyval.
11054 (yyparse): When providing a default semantic action, provide a
11055 default location action.
11056 (after the $): No longer change `*YYLSP', just stack YYLOC the
11057 same way you stack YYVAL.
11058 * src/reader.c (read_declarations): Use warns.
11059 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
11060 (copy_action, case '@'): Likewise.
11061 Use a standard error message, to save useless work from
11062 translators.
11063
11064 2000-03-17 Akim Demaille <akim@epita.fr>
11065
11066 * src/bison.s1: Formatting and cosmetics changes.
11067 * src/reader.c: Likewise.
11068 Update the Copyright notice.
11069
11070 2000-03-17 Akim Demaille <akim@epita.fr>
11071
11072 * src/bison.s1 (#line): All set to `#line' only, since the
11073 Makefile now handles them.
11074
11075 2000-03-16 Akim Demaille <akim@epita.fr>
11076
11077 * src/output.c (output_rule_data): Output the documentation of
11078 some of the tables.
11079 (Copyright notice): Update.
11080 Formatting changes.
11081
11082 2000-03-16 Akim Demaille <akim@epita.fr>
11083
11084 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
11085 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
11086 One `#if YYDEBUG' remains, since it uses variables which are
11087 defined only if `YYDEBUG != 0'.
11088
11089 2000-03-16 Akim Demaille <akim@epita.fr>
11090
11091 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
11092 and related variables so that the similarities are highlighted.
11093
11094 2000-03-16 Akim Demaille <akim@epita.fr>
11095
11096 * src/bison.s1: Properly indent CPP directives.
11097
11098 2000-03-16 Akim Demaille <akim@epita.fr>
11099
11100 * src/bison.s1: Properly indent the `alloca' CPP section.
11101
11102 2000-03-16 Akim Demaille <akim@epita.fr>
11103
11104 Do not hard code values of directories in `configure.in'.
11105 Update the `configure' tool chain.
11106
11107 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
11108 src/makefile.am.
11109 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
11110 (AC_OUTPUT): Add m4/Makefile.
11111 Bump to bison 1.28a, 1.29 has never been released.
11112 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
11113 handled via src/Makefile.am.
11114 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
11115 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
11116 autoheader.
11117 * Makefile.am (SUBDIRS): Add m4.
11118 (ACLOCAL_AM_FLAGS): New variable.
11119 (AUTOMAKE_OPTIONS): Add check-news.
11120 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
11121 the proper line number and file name.
11122 (DEFS): Propagate the location of bison library files and of the
11123 locale files.
11124 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
11125 builddir.
11126 * acinclude.m4: Remove, replaced by the directory m4.
11127 * m4/Makefile.am (EXTRA_DIST): New variable.
11128 * m4/gettext.m4: New file, from the fileutils.
11129 * m4/lcmessage.m4: Likewise
11130 * m4/progtest.m4: Likewise.
11131 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
11132
11133 2000-03-10 Akim Demaille <akim@epita.fr>
11134
11135 * src/closure.c:
11136 Formatting changes of various comments.
11137 Respect the GNU coding standards at various places.
11138 Don't use `_()' when no translation is needed.
11139
11140 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11141
11142 * src/files.c:
11143 OS/2 honors TMPDIR environment variable.
11144
11145 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11146
11147 * doc/bison.texinfo: Tweaked spelling and grammar.
11148 Updated ISBN.
11149 Removed reference to price of printed copy.
11150 Mention BISON_SIMPLE and BISON_HAIRY.
11151
11152 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11153
11154 * configure.in, NEWS:
11155 Bison 1.29 released.
11156
11157 1999-10-27 Jesse Thilo <jthilo@gnu.org>
11158
11159 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
11160 Added reference card.
11161
11162 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11163
11164 * po/ru.po: Added Russian translation.
11165
11166 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11167
11168 * configure.in: Added Russian translation.
11169
11170 1999-07-06 Jesse Thilo <jthilo@gnu.org>
11171
11172 * configure.in, NEWS, README:
11173 Released version 1.28.
11174
11175 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11176
11177 * src/system.h:
11178 Squashed redefinition warning on some systems.
11179
11180 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
11181 Have configure build version string instead of relying on ANSI string
11182 concatentation.
11183
11184 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11185
11186 * po/POTFILES.in: Got rid of version.c.
11187
11188 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11189
11190 * acconfig.h, configure.in:
11191 Have configure build version string instead of relying on ANSI string
11192 concatentation.
11193
11194 1999-06-08 Jesse Thilo <jthilo@gnu.org>
11195
11196 * doc/bison.1:
11197 Dropped mention of `+' for long-named options.
11198
11199 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11200
11201 * src/files.c: Added <unistd.h> for unlink().
11202
11203 * src/Makefile.am, src/system.h:
11204 I18n fixes.
11205
11206 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11207
11208 * README: Added a FAQ list.
11209
11210 * configure.in, acconfig.h:
11211 I18n fixes.
11212
11213 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11214
11215 * doc/FAQ, doc/Makefile.am:
11216 Added a FAQ list.
11217
11218 1999-05-19 Jesse Thilo <jthilo@gnu.org>
11219
11220 * src/alloc.h, src/symtab.h, src/version.c:
11221 Protected inclusion of "config.h" with HAVE_CONFIG_H.
11222
11223 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11224
11225 * src/.cvsignore, src/Makefile.am:
11226 Reorganized: sources in `src', documentation in `doc'.
11227
11228 * src/lex.c (literalchar):
11229 fixed the code for escaping double quotes (thanks
11230 Jonathan Czisny.)
11231
11232 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11233
11234 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
11235 Adjusted paths to reflect directory reorganization.
11236
11237 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11238
11239 * doc/.cvsignore, doc/Makefile.am:
11240 Reorganized: sources in `src', documentation in `doc'.
11241
11242 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11243
11244 * configure.in:
11245 Updated AC_INIT file to reflect directory reorganization.
11246
11247 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
11248 Reorganized: sources in `src', documentation in `doc'.
11249
11250 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11251
11252 * src/allocate.c:
11253 Don't declare calloc() and realloc() if not necessary.
11254
11255 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11256
11257 * configure.in, acconfig.h, acinclude.m4:
11258 Don't declare calloc() and realloc() if not necessary.
11259
11260 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11261
11262 * po/.cvsignore: Added i18n support.
11263
11264 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11265
11266 * acconfig.h, configure.in, Makefile.am:
11267 Added i18n support.
11268
11269 1999-03-22 Jesse Thilo <jthilo@gnu.org>
11270
11271 * src/bison.s1: Fixed #line numbers.
11272
11273 1999-03-15 Jesse Thilo <jthilo@gnu.org>
11274
11275 * po/es.po, po/fr.po, po/nl.po, po/de.po:
11276 Added PO files from Translation Project.
11277
11278 1999-03-03 Jesse Thilo <jthilo@gnu.org>
11279
11280 * Makefile.am:
11281 Added support for non-ANSI compilers (ansi2knr).
11282
11283 1999-02-16 Jesse Thilo <jthilo@gnu.org>
11284
11285 * configure.in: Bumped version number to 1.27.
11286
11287 * Makefile.am:
11288 Added `bison.simple' to list of files removed by `make distclean'.
11289
11290 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11291
11292 * src/files.c, src/files.h:
11293 Defined locations of parser files in config.h instead of Makefile.
11294
11295 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11296
11297 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
11298 Defined locations of parser files in config.h instead of Makefile.
11299
11300 1999-02-09 Jesse Thilo <jthilo@gnu.org>
11301
11302 * Makefile.am:
11303 Removed inappropriate use of $< macro.
11304
11305 1999-02-05 Jesse Thilo <jthilo@gnu.org>
11306
11307 * po/Makefile.in.in, po/POTFILES.in:
11308 Add `po' directory skeleton.
11309
11310 1999-01-27 Jesse Thilo <jthilo@gnu.org>
11311
11312 * README: Document help-bison list.
11313
11314 * configure.in: Add check for mkstemp().
11315
11316 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11317
11318 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
11319 Hush a few compiler warnings.
11320
11321 * src/files.c:
11322 Add tryclose(), which verifies that fclose was successful.
11323 Hush a couple of compiler warnings.
11324
11325 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11326
11327 * Makefile.am, OChangeLog:
11328 ChangeLog is now automatically generated. Include the old version as
11329 OChangeLog.
11330
11331 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11332
11333 * 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:
11334 Update FSF address.
11335
11336 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11337
11338 * doc/bison.texinfo: Fix formatting glitch.
11339
11340 * doc/bison.texinfo: Update FSF address.
11341
11342 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11343
11344 * acconfig.h: Update FSF address.
11345
11346 1999-01-08 Jesse Thilo <jthilo@gnu.org>
11347
11348 * src/system.h:
11349 Don't define PACKAGE here, since config.h defines it.
11350
11351 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11352
11353 * src/reader.c: Update copyright date.
11354
11355 * src/main.c:
11356 Ditch sprintf to statically-sized buffers in fatal/warn functions in
11357 favor of output directly to stderr (avoids buffer overruns).
11358
11359 * src/reader.c: Some checks for premature EOF.
11360
11361 * 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:
11362 Use prototypes if the compiler understands them.
11363
11364 * src/files.c: Honor TMPDIR on Unix hosts.
11365 Use prototypes if the compiler understands them.
11366
11367 * src/reader.c:
11368 Fix a couple of buffer overrun bugs.
11369 Use prototypes if the compiler understands them.
11370
11371 * src/system.h: Include unistd.h and ctype.h.
11372 Use #ifdef instead of #if for NLS symbols.
11373
11374 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11375
11376 * doc/bison.texinfo:
11377 Delete comment "consider using @set for edition number, etc..." since
11378 we now are doing so.
11379
11380 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11381
11382 * configure.in:
11383 Use prototypes if the compiler understands them.
11384
11385 * NEWS: Document 1.26 highlights.
11386
11387 * Makefile.am: Require Automake 1.3 or later.
11388
11389 * acconfig.h:
11390 Use prototypes if the compiler understands them.
11391
11392 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11393
11394 * src/version.c:
11395 Use VERSION symbol from automake for version number.
11396
11397 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11398
11399 * acconfig.h, configure.in, version.cin:
11400 Use VERSION symbol from automake for version number.
11401
11402 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11403
11404 * Makefile.am:
11405 Distribute original version of simple parser (bison.s1), not built
11406 version (bison.simple).
11407
11408 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11409
11410 * doc/bison.texinfo: Add info dir entry.
11411
11412 * doc/bison.texinfo:
11413 Let automake put version number into documentation.
11414
11415 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11416
11417 * src/bison.cld, src/build.com, src/vmshlp.mar:
11418 Add non-RCS files from /gd/gnu/bison.
11419
11420 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11421
11422 * doc/bison.1:
11423 Document the BISON_HAIRY and BISON_SIMPLE variables.
11424
11425 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11426
11427 * src/version.c: Build version.c automatically.
11428
11429 * src/reader.c:
11430 Fix token numbering (used to start at 258, not 257).
11431
11432 * src/system.h: Include config.h.
11433
11434 * src/getargs.c: Update bug report address.
11435
11436 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
11437 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
11438
11439 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11440
11441 * Makefile.am:
11442 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11443
11444 * configure.in, version.cin:
11445 Build version.c automatically.
11446
11447 * AUTHORS: Add AUTHORS file.
11448
11449 * README: Update bug report address.
11450
11451 * bison.simple:
11452 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11453
11454 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
11455 Add automake stuff.
11456
11457 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11458
11459 * doc/bison.texinfo: Clean up some formatting.
11460
11461 1998-05-05 Richard Stallman <rms@gnu.org>
11462
11463 * doc/bison.texinfo:
11464 Explain better why to make a pure parser.
11465
11466 1998-01-05 Richard Stallman <rms@gnu.org>
11467
11468 * src/files.c (openfiles):
11469 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
11470 find a temporary directory, if possible. Do not unlink files while
11471 they are open.
11472
11473 1997-08-25 Richard Stallman <rms@gnu.org>
11474
11475 * src/reader.c (stack_offset;):
11476 Change some warni to warns.
11477
11478 * src/lex.c (literalchar): Use warns, not warni.
11479
11480 1997-06-28 Richard Stallman <rms@gnu.org>
11481
11482 * src/bison.s1: Add a Bison version comment.
11483
11484 * src/main.c (fatal, warn, berror):
11485 Use program_name.
11486
11487 1997-06-28 Richard Stallman <rms@gnu.org>
11488
11489 * Makefile.in (bison_version): New variable.
11490 (dist): Use that variable.
11491 (bison.s1): Substitute the Bison version into bison.simple.
11492
11493 * bison.simple: Add a Bison version comment.
11494
11495 1997-06-18 Richard Stallman <rms@gnu.org>
11496
11497 * src/main.c (fatal, warn, berror):
11498 Make error messages standard.
11499 (toomany): Improve error message text.
11500
11501 * 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:
11502 new.h renamed to alloc.h.
11503
11504 1997-06-18 Richard Stallman <rms@gnu.org>
11505
11506 * Makefile.in: new.h renamed to alloc.h.
11507
11508 1997-05-24 Richard Stallman <rms@gnu.org>
11509
11510 * src/lex.c (literalchar):
11511 Fix the code for escaping \, " and '.
11512
11513 (lex): Avoid trouble when there are many chars
11514 to discard in a char literal with just several chars in it.
11515
11516 1997-05-17 Richard Stallman <rms@gnu.org>
11517
11518 * src/bison.s1:
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-05-17 Richard Stallman <rms@gnu.org>
11527
11528 * bison.simple:
11529 Use malloc, if using alloca is troublesome.
11530 (YYSTACK_USE_ALLOCA): New flag macro.
11531 Define it for some systems and compilers.
11532 (YYSTACK_ALLOC): New macro.
11533 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11534 If it was malloc'd, free it.
11535
11536 1997-04-23 Richard Stallman <rms@gnu.org>
11537
11538 * src/bison.s1:
11539 (alloca) [__hpux]: Always define as __builtin_alloca.
11540
11541 1997-04-23 Richard Stallman <rms@gnu.org>
11542
11543 * bison.simple:
11544 (alloca) [__hpux]: Always define as __builtin_alloca.
11545
11546 1997-04-22 Richard Stallman <rms@gnu.org>
11547
11548 * src/bison.s1:
11549 [__hpux]: Include alloca.h (right for HPUX 10)
11550 instead of declaring alloca (right for HPUX 9).
11551
11552 * src/bison.s1 (__yy_memcpy):
11553 Declare arg `count' as unsigned int.
11554 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11555
11556 1997-04-22 Richard Stallman <rms@gnu.org>
11557
11558 * bison.simple:
11559 [__hpux]: Include alloca.h (right for HPUX 10)
11560 instead of declaring alloca (right for HPUX 9).
11561
11562 * bison.simple (__yy_memcpy):
11563 Declare arg `count' as unsigned int.
11564 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11565
11566 1997-01-03 Richard Stallman <rms@gnu.org>
11567
11568 * src/allocate.c: [__STDC__ or _MSC_VER]:
11569 Declare calloc and realloc to return void *.
11570
11571 1997-01-02 Richard Stallman <rms@gnu.org>
11572
11573 * src/system.h:
11574 [_MSC_VER]: Include stdlib.h and process.h.
11575 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
11576
11577 * src/main.c (main): Return FAILURE as a value.
11578 (printable_version): Declare arg as int, not char.
11579
11580 1997-01-02 Richard Stallman <rms@gnu.org>
11581
11582 * Makefile.in (dist):
11583 Explicitly check for symlinks, and copy them.
11584
11585 1996-12-19 Richard Stallman <rms@gnu.org>
11586
11587 * src/files.c:
11588 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
11589
11590 1996-12-18 Paul Eggert <eggert@gnu.org>
11591
11592 * src/bison.s1 (yyparse):
11593 If __GNUC__ and YYPARSE_PARAM are both defined,
11594 declare yyparse to have a void * argument.
11595
11596 1996-12-18 Paul Eggert <eggert@gnu.org>
11597
11598 * bison.simple (yyparse):
11599 If __GNUC__ and YYPARSE_PARAM are both defined,
11600 declare yyparse to have a void * argument.
11601
11602 1996-12-17 Richard Stallman <rms@gnu.org>
11603
11604 * src/reduce.c (nbits): Add some casts.
11605
11606 1996-08-12 Richard Stallman <rms@gnu.org>
11607
11608 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
11609
11610 1996-08-12 Richard Stallman <rms@gnu.org>
11611
11612 * bison.simple: Test _MSDOS as well as _MSDOS_.
11613
11614 1996-07-31 Richard Stallman <rms@gnu.org>
11615
11616 * src/bison.s1:
11617 [__sun && __i386]: Include alloca.h.
11618
11619 1996-07-31 Richard Stallman <rms@gnu.org>
11620
11621 * bison.simple:
11622 [__sun && __i386]: Include alloca.h.
11623
11624 1996-07-30 Richard Stallman <rms@gnu.org>
11625
11626 * src/bison.s1: Comment change.
11627
11628 * src/bison.s1: Test _MSDOS_, not MSDOS.
11629
11630 1996-07-30 Richard Stallman <rms@gnu.org>
11631
11632 * bison.simple: Comment change.
11633
11634 * bison.simple: Test _MSDOS_, not MSDOS.
11635
11636 1996-06-01 Richard Stallman <rms@gnu.org>
11637
11638 * 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:
11639 Insert `_' macro around many string constants.
11640
11641 * src/main.c:
11642 Insert `_' macro around many string constants.
11643
11644 (main): Call setlocale, bindtextdomain and textdomain.
11645
11646 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11647 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11648 [ENABLE_NLS]: Include libintl.h.
11649 [ENABLE_NLS] (gettext): Define.
11650 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11651 (N_, PACKAGE, LOCALEDIR): New macros.
11652
11653 1996-06-01 Richard Stallman <rms@gnu.org>
11654
11655 * POTFILES.in: New file.
11656
11657 * Makefile.in (allocate.o):
11658 Define target explicitly.
11659
11660 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11661 (LDFLAGS): Set to @LDFLAGS@.
11662 (configure): Run autoconf only if preceding `cd' succeeds.
11663 (bison.s1): Redirect output to temporary file then move the
11664 temporary to the target, rather than redirecting directly to bison.s1.
11665 (clean): Remove config.status and config.log.
11666 (distclean): Don't remove config.status here.
11667
11668 1996-05-12 Richard Stallman <rms@gnu.org>
11669
11670 * src/bison.s1:
11671 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11672
11673 1996-05-12 Richard Stallman <rms@gnu.org>
11674
11675 * bison.simple:
11676 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11677
11678 1996-05-11 Richard Stallman <rms@gnu.org>
11679
11680 * src/bison.s1 (__yy_memcpy):
11681 Really reorder the args, as was supposedly done on Feb 14 1995.
11682 (yyparse): Calls changed accordingly.
11683
11684 1996-05-11 Richard Stallman <rms@gnu.org>
11685
11686 * Makefile.in (dist): Don't use $(srcdir).
11687
11688 * bison.simple (__yy_memcpy):
11689 Really reorder the args, as was supposedly done on Feb 14 1995.
11690 (yyparse): Calls changed accordingly.
11691
11692 1996-01-27 Richard Stallman <rms@gnu.org>
11693
11694 * src/output.c (output_rule_data):
11695 Test YYERROR_VERBOSE in the conditional
11696 around the definition of ttyname.
11697
11698 1995-12-29 Richard Stallman <rms@gnu.org>
11699
11700 * src/bison.s1:
11701 Fix line numbers in #line commands.
11702
11703 1995-12-29 Richard Stallman <rms@gnu.org>
11704
11705 * bison.simple:
11706 Fix line numbers in #line commands.
11707
11708 1995-12-27 Richard Stallman <rms@gnu.org>
11709
11710 * src/bison.s1 (YYPARSE_PARAM_DECL):
11711 In C++, make it always null.
11712 (YYPARSE_PARAM_ARG): New macro.
11713 (yyparse): Use YYPARSE_PARAM_ARG.
11714
11715 1995-12-27 Richard Stallman <rms@gnu.org>
11716
11717 * bison.simple (YYPARSE_PARAM_DECL):
11718 In C++, make it always null.
11719 (YYPARSE_PARAM_ARG): New macro.
11720 (yyparse): Use YYPARSE_PARAM_ARG.
11721
11722 1995-11-29 Richard Stallman <rms@gnu.org>
11723
11724 * doc/bison.texinfo:
11725 Describe literal string tokens, %raw, %no_lines, %token_table.
11726
11727 1995-11-29 Daniel Hagerty <hag@gnu.org>
11728
11729 * doc/bison.texinfo: Fixed update date
11730
11731 1995-10-16 Richard Stallman <rms@gnu.org>
11732
11733 * src/version.c: Version 1.25.
11734
11735 1995-10-16 Richard Stallman <rms@gnu.org>
11736
11737 * NEWS: *** empty log message ***
11738
11739 1995-10-16 Richard Stallman <rms@gnu.org>
11740
11741 * doc/bison.1, doc/bison.rnh:
11742 Add new options.
11743
11744 1995-10-15 Richard Stallman <rms@gnu.org>
11745
11746 * src/vmsgetargs.c, src/getargs.c:
11747 Added -n, -k, and -raw switches.
11748 (noparserflag, toknumflag, rawtoknumflag): New variables.
11749
11750 * src/symtab.h (SALIAS):
11751 New #define for adding aliases to %token.
11752 (struct bucket): Added `alias' field.
11753
11754 * src/reduce.c (reduce_grammar):
11755 Revise error message.
11756 (print_notices): Remove final `.' from error message.
11757
11758 * src/reader.c (reader_output_yylsp):
11759 New function.
11760 (readgram): Use `#if 0' around code that accepted %command
11761 inside grammar rules: The documentation doesn't allow it,
11762 and it will fail since the %command processors scan for the next %.
11763 (parse_token_decl): Extended the %token
11764 declaration to allow a multi-character symbol as an alias.
11765 (parse_thong_decl): New function.
11766 (read_declarations): Added %thong declarations.
11767 (read_declarations): Handle NOOP to deal with allowing
11768 % declarations as another means to specify the flags.
11769 (readgram): Allow %prec prior to semantics embedded in a rule.
11770 (skip_to_char, read_declarations, copy_definition)
11771 (parse_token_decl, parse_start_decl, parse_type_decl)
11772 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
11773 (get_type_name, copy_guard, copy_action, readgram)
11774 (get_type, packsymbols): Revised most error messages.
11775 Changed `fatal' to `warnxxx' to avoid aborting for error.
11776 Revised and use multiple warnxxx functions to avoid using VARARGS1.
11777 (read_declarations): Improve the error message for
11778 an invalid character. Do not abort.
11779 (read_declarations, copy_guard, copy_action): Use
11780 printable_version to avoid unprintable characters in printed output.
11781 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
11782 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
11783 Allow the type of a non-terminal can be given
11784 more than once, as long as all specifications give the same type.
11785
11786 * src/output.c:
11787 (output_headers, output_trailers, output, output_gram)
11788 (output_rule_data): Implement noparserflag variable.
11789 Implement toknumflag variable.
11790 (output): Call reader_output_yylsp to output LTYPESTR.
11791
11792 * src/main.c (main):
11793 If reader sees an error, don't process the grammar.
11794 (fatals): Updated to not use VARARGS1.
11795 (printable_version, int_to_string, warn, warni, warns, warnss)
11796 (warnsss): New error reporting functions. Avoid abort for error.
11797
11798 * src/lex.h:
11799 Added THONG and NOOP for alias processing.
11800 Added SETOPT for the new code that allows setting options with %flags.
11801
11802 * src/lex.c:
11803 Include getopt.h. Add some extern decls.
11804 (safegetc): New function to deal with EOF gracefully.
11805 (literalchar); new function to deal with reading \ escapes.
11806 (lex): Use literalchar.
11807 (lex): Implemented "..." tokens.
11808 (literalchar, lex, parse_percent_token): Made tokenbuffer
11809 always contain the token. This includes growing the token
11810 buffer while reading an integer.
11811 (parse_percent_token): Replaced if-else statement with percent_table.
11812 (parse_percent_token): Added % declarations as another
11813 way to specify the flags -n, -l, and -r. Also added hooks for
11814 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
11815 major changes to files.c.
11816 (lex) Retain in the incoming stream a character following
11817 an incorrect '/'.
11818 (skip_white_space, lex): Revised most error messages
11819 and changed fatal to warn to avoid aborting.
11820 (percent_table): Added %thong declarations.
11821
11822 * src/gram.h: Comment changes.
11823
11824 * src/files.c (openfiles, open_extra_files, done):
11825 Add faction flag
11826 and actfile file. Handle noparserflag. Both for -n switch.
11827
11828 * src/conflicts.c (resolve_sr_conflict):
11829 Remove use of alloca.
11830
11831 1995-06-01 Jim Meyering <meyering@gnu.org>
11832
11833 * doc/bison.texinfo: *** empty log message ***
11834
11835 1995-05-06 Richard Stallman <rms@gnu.org>
11836
11837 * src/bison.s1: Comment change.
11838
11839 1995-05-06 Richard Stallman <rms@gnu.org>
11840
11841 * bison.simple: Comment change.
11842
11843 1995-05-03 Richard Stallman <rms@gnu.org>
11844
11845 * src/version.c: Version now 1.24.
11846
11847 * src/bison.s1: Change distribution terms.
11848
11849 * src/version.c: Version now 1.23.
11850
11851 1995-05-03 Richard Stallman <rms@gnu.org>
11852
11853 * doc/bison.texinfo:
11854 Rewrite "Conditions for Using Bison".
11855 Update version to 1.24.
11856
11857 1995-05-03 Richard Stallman <rms@gnu.org>
11858
11859 * bison.simple: Change distribution terms.
11860
11861 1995-02-23 Richard Stallman <rms@gnu.org>
11862
11863 * src/files.c: Test __VMS_POSIX as well as VMS.
11864
11865 1995-02-14 Jim Meyering <meyering@gnu.org>
11866
11867 * src/bison.s1 (__yy_memcpy):
11868 Renamed from __yy_bcopy to avoid
11869 confusion. Reverse FROM and TO arguments to be consistent with
11870 those of memcpy.
11871
11872 1995-02-14 Jim Meyering <meyering@gnu.org>
11873
11874 * bison.simple (__yy_memcpy):
11875 Renamed from __yy_bcopy to avoid
11876 confusion. Reverse FROM and TO arguments to be consistent with
11877 those of memcpy.
11878
11879 1994-11-10 David J. MacKenzie <djm@gnu.org>
11880
11881 * NEWS: reformat
11882
11883 * NEWS: New file.
11884
11885 * Makefile.in (DISTFILES): Include NEWS.
11886
11887 * Makefile.in (DISTFILES):
11888 Include install-sh, not install.sh.
11889
11890 * configure.in: Update to Autoconf v2 macro names.
11891
11892 1994-10-05 David J. MacKenzie <djm@gnu.org>
11893
11894 * Makefile.in: fix typo
11895
11896 * Makefile.in (prefix, exec_prefix):
11897 Let configure set them.
11898
11899 1994-09-28 David J. MacKenzie <djm@gnu.org>
11900
11901 * Makefile.in: Set datadir to $(prefix)/share.
11902
11903 1994-09-15 Richard Stallman <rms@gnu.org>
11904
11905 * src/bison.s1:
11906 Update copyright notice and GPL version.
11907
11908 1994-09-15 Richard Stallman <rms@gnu.org>
11909
11910 * bison.simple:
11911 Update copyright notice and GPL version.
11912
11913 1994-07-12 Richard Stallman <rms@gnu.org>
11914
11915 * src/reduce.c, src/reader.c:
11916 entered into RCS
11917
11918 1994-05-05 David J. MacKenzie <djm@gnu.org>
11919
11920 * Makefile.in: entered into RCS
11921
11922 1994-03-26 Richard Stallman <rms@gnu.org>
11923
11924 * src/bison.s1: entered into RCS
11925
11926 1994-03-26 Richard Stallman <rms@gnu.org>
11927
11928 * bison.simple: entered into RCS
11929
11930 1994-03-25 Richard Stallman <rms@gnu.org>
11931
11932 * src/main.c: entered into RCS
11933
11934 1994-03-24 Richard Stallman <rms@gnu.org>
11935
11936 * src/conflicts.c: entered into RCS
11937
11938 1994-01-02 Richard Stallman <rms@gnu.org>
11939
11940 * Makefile.in: *** empty log message ***
11941
11942 1993-11-21 Richard Stallman <rms@gnu.org>
11943
11944 * src/bison.s1: *** empty log message ***
11945
11946 1993-11-21 Richard Stallman <rms@gnu.org>
11947
11948 * doc/bison.texinfo: entered into RCS
11949
11950 * doc/bison.texinfo: *** empty log message ***
11951
11952 1993-11-21 Richard Stallman <rms@gnu.org>
11953
11954 * bison.simple: *** empty log message ***
11955
11956 1993-10-25 David J. MacKenzie <djm@gnu.org>
11957
11958 * doc/bison.texinfo: *** empty log message ***
11959
11960 1993-10-19 Richard Stallman <rms@gnu.org>
11961
11962 * src/bison.s1: *** empty log message ***
11963
11964 1993-10-19 Richard Stallman <rms@gnu.org>
11965
11966 * bison.simple: *** empty log message ***
11967
11968 1993-10-14 Richard Stallman <rms@gnu.org>
11969
11970 * src/bison.s1: *** empty log message ***
11971
11972 1993-10-14 Richard Stallman <rms@gnu.org>
11973
11974 * bison.simple: *** empty log message ***
11975
11976 1993-09-14 David J. MacKenzie <djm@gnu.org>
11977
11978 * doc/bison.texinfo: *** empty log message ***
11979
11980 1993-09-13 Noah Friedman <friedman@gnu.org>
11981
11982 * Makefile.in: *** empty log message ***
11983
11984 1993-09-10 Richard Stallman <rms@gnu.org>
11985
11986 * src/conflicts.c: *** empty log message ***
11987
11988 * src/system.h: entered into RCS
11989
11990 1993-09-10 Richard Stallman <rms@gnu.org>
11991
11992 * doc/bison.1: entered into RCS
11993
11994 1993-09-06 Noah Friedman <friedman@gnu.org>
11995
11996 * src/version.c: entered into RCS
11997
11998 1993-09-06 Noah Friedman <friedman@gnu.org>
11999
12000 * Makefile.in: *** empty log message ***
12001
12002 1993-07-30 David J. MacKenzie <djm@gnu.org>
12003
12004 * Makefile.in: *** empty log message ***
12005
12006 1993-07-24 Richard Stallman <rms@gnu.org>
12007
12008 * src/bison.s1: *** empty log message ***
12009
12010 1993-07-24 Richard Stallman <rms@gnu.org>
12011
12012 * bison.simple: *** empty log message ***
12013
12014 1993-07-08 David J. MacKenzie <djm@gnu.org>
12015
12016 * Makefile.in: *** empty log message ***
12017
12018 1993-07-04 Richard Stallman <rms@gnu.org>
12019
12020 * src/bison.s1: *** empty log message ***
12021
12022 1993-07-04 Richard Stallman <rms@gnu.org>
12023
12024 * bison.simple: *** empty log message ***
12025
12026 1993-06-26 David J. MacKenzie <djm@gnu.org>
12027
12028 * src/getargs.c: entered into RCS
12029
12030 1993-06-26 David J. MacKenzie <djm@gnu.org>
12031
12032 * doc/bison.texinfo: *** empty log message ***
12033
12034 * doc/bison.1: New file.
12035
12036 1993-06-25 Richard Stallman <rms@gnu.org>
12037
12038 * src/getargs.c: New file.
12039
12040 1993-06-16 Richard Stallman <rms@gnu.org>
12041
12042 * src/bison.s1: *** empty log message ***
12043
12044 1993-06-16 Richard Stallman <rms@gnu.org>
12045
12046 * bison.simple: *** empty log message ***
12047
12048 1993-06-03 Richard Stallman <rms@gnu.org>
12049
12050 * src/bison.s1: New file.
12051
12052 1993-06-03 Richard Stallman <rms@gnu.org>
12053
12054 * doc/bison.texinfo: *** empty log message ***
12055
12056 1993-06-03 Richard Stallman <rms@gnu.org>
12057
12058 * bison.simple: New file.
12059
12060 1993-05-19 Richard Stallman <rms@gnu.org>
12061
12062 * doc/bison.texinfo: New file.
12063
12064 1993-05-07 Noah Friedman <friedman@gnu.org>
12065
12066 * Makefile.in: *** empty log message ***
12067
12068 1993-04-28 Noah Friedman <friedman@gnu.org>
12069
12070 * src/reader.c: *** empty log message ***
12071
12072 1993-04-23 Noah Friedman <friedman@gnu.org>
12073
12074 * src/alloc.h: entered into RCS
12075
12076 1993-04-20 David J. MacKenzie <djm@gnu.org>
12077
12078 * src/version.c: *** empty log message ***
12079
12080 * src/files.c, src/allocate.c:
12081 entered into RCS
12082
12083 * src/reader.c: *** empty log message ***
12084
12085 * src/lex.c: entered into RCS
12086
12087 * src/conflicts.c: New file.
12088
12089 * src/symtab.c: entered into RCS
12090
12091 * src/alloc.h: New file.
12092
12093 * src/LR0.c: entered into RCS
12094
12095 1993-04-18 Noah Friedman <friedman@gnu.org>
12096
12097 * src/reader.c: New file.
12098
12099 * src/version.c: *** empty log message ***
12100
12101 1993-04-18 Noah Friedman <friedman@gnu.org>
12102
12103 * Makefile.in: *** empty log message ***
12104
12105 1993-04-17 Noah Friedman <friedman@gnu.org>
12106
12107 * Makefile.in: *** empty log message ***
12108
12109 1993-04-15 Richard Stallman <rms@gnu.org>
12110
12111 * src/main.c, src/files.c:
12112 New file.
12113
12114 1993-04-15 Noah Friedman <friedman@gnu.org>
12115
12116 * configure.in: entered into RCS
12117
12118 * configure.in: *** empty log message ***
12119
12120 * configure.in: New file.
12121
12122 1993-04-14 Richard Stallman <rms@gnu.org>
12123
12124 * Makefile.in: New file.
12125
12126 1993-04-13 Richard Stallman <rms@gnu.org>
12127
12128 * src/version.c: New file.
12129
12130 1993-03-25 Richard Stallman <rms@gnu.org>
12131
12132 * src/output.c: entered into RCS
12133
12134 1992-09-25 Richard Stallman <rms@gnu.org>
12135
12136 * configure.bat: entered into RCS
12137
12138 1992-06-22 Richard Stallman <rms@gnu.org>
12139
12140 * src/vmsgetargs.c: entered into RCS
12141
12142 1992-06-22 Richard Stallman <rms@gnu.org>
12143
12144 * doc/bison.rnh: entered into RCS
12145
12146 1992-04-20 David J. MacKenzie <djm@gnu.org>
12147
12148 * README: entered into RCS
12149
12150 1992-01-22 Richard Stallman <rms@gnu.org>
12151
12152 * src/machine.h: entered into RCS
12153
12154 1991-12-21 Richard Stallman <rms@gnu.org>
12155
12156 * src/lalr.c, src/closure.c:
12157 entered into RCS
12158
12159 1991-12-20 Richard Stallman <rms@gnu.org>
12160
12161 * src/state.h: entered into RCS
12162
12163 1991-12-18 Richard Stallman <rms@gnu.org>
12164
12165 * src/print.c, src/nullable.c, src/derives.c:
12166 entered into RCS
12167
12168 1991-11-03 David J. MacKenzie <djm@gnu.org>
12169
12170 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
12171 entered into RCS
12172
12173 1988-09-09 Richard Stallman <rms@gnu.org>
12174
12175 * src/bison.hairy: entered into RCS
12176
12177 1987-12-16 Richard Stallman <rms@gnu.org>
12178
12179 * REFERENCES: entered into RCS
12180
12181 -----
12182
12183 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
12184 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
12185
12186 This file is part of Bison, the GNU Compiler Compiler.
12187
12188 Bison is free software; you can redistribute it and/or modify
12189 it under the terms of the GNU General Public License as published by
12190 the Free Software Foundation; either version 2, or (at your option)
12191 any later version.
12192
12193 Bison is distributed in the hope that it will be useful,
12194 but WITHOUT ANY WARRANTY; without even the implied warranty of
12195 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12196 GNU General Public License for more details.
12197
12198 You should have received a copy of the GNU General Public License
12199 along with Bison; see the file COPYING. If not, write to
12200 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
12201 Boston, MA 02111-1307, USA.