1 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
3 Ensure that the C++ compiler used for testing actually works on a
4 simple test program; if not, skip the C++-related tests. Problem
5 reported by Vin Shelton in:
6 http://mail.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
9 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
10 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11 * tests/local.at (AT_COMPILE_CXX): Use it.
13 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
15 * data/glr.c (yylloc): Output this macro even if locations are not
16 being generated, as the GLR parser needs it even in that case.
17 Problem reported by Troy A. Johnson
18 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
20 * configure.ac (AC_INIT): Update to 1.875e.
22 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
24 * NEWS: Version 1.875d.
25 * configure.ac (AC_INIT): Likewise.
26 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
28 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
29 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
30 lalr1.cc runs afoul of the first, and the last two are no longer
31 supported by GCC 3.4.0.
32 * README: Mention GNU m4 1.4 or later; mention m4 patches.
33 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
35 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
37 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
38 unsigned int, for compatibility with latest gnulib hash module.
39 * src/state.c (state_hash, state_hasher): Likewise.
40 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
41 * src/uniqstr.c (hash_uniqstr): Likewise.
43 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
45 * NEWS: Unescaped newlines are no longer allowed in char & strings.
47 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
48 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
49 character and string literals.
50 (unexpected_end): New function.
51 (unexpected_eof): Use it.
52 (unexpected_newline): New function.
53 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
56 * NEWS: Document %expect-rr.
58 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
59 Fix typo by replacing $1 with $option.
60 Remove more 'intl'-related files.
61 Don't DEFUN AM_INTL_SUBDIR twice.
63 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
64 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
66 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
67 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
68 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
69 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
70 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
71 * src/.cvsignore: Add *.output.
73 * src/parse-gram.y: Put copyright notice inside %{ %} so it
74 gets copied to the output file.
76 2004-04-28 Paul Eggert <eggert@twinsun.com>
78 Get files from the gnulib and po repositories, instead of relying
79 on them being in our CVS. Upgrade to latest versions of gnulib
82 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
83 * bootstrap: Bootstrap from gnulib and po repositories.
84 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
85 * README-cvs: Document these changes. Remove version numbers from
86 mentions of build tools, since they change so often. Mention Flex.
88 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
89 (gl_USE_SYSTEM_EXTENSIONS): Add.
90 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
91 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
93 (AC_ISC_POSIX): Remove; we no longer support this
94 ancient OS, as it gets in the way of latest Autoconf & gnulib.
95 (AC_HEADER_STDC): Remove: we now assume C89 or better.
96 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
97 Do not check for C89 headers, except for locale.h which is used
98 by the Yacc library and must port to K&R hosts.
99 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
100 Do not check for C89 functions, except for setlocale which is
101 used by the Yacc library.
102 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
103 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
104 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
105 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
106 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
107 AM_GNU_GETTEXT): Remove; now done by:
108 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
109 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
112 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
113 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
114 Define to empty, as gnulib.mk will do the rest for us.
115 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
117 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
118 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
120 * src/files.c: Include gnulib's xstrndup.h.
122 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
123 (REALLOC): Use xnrealloc, for likewise.
124 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
125 (strnlen, memrchr): Remove decls; functions no longer used.
128 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
129 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
130 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
131 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
132 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
133 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
134 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
135 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
136 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
137 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
138 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
139 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
140 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
141 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
142 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
143 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
144 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
145 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
146 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
147 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
148 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
149 Remove, as these files are now generated automatically
150 by bootstrap or automake.
152 * po/ChangeLog: Remove: all but one entry was a duplicate
153 of this file, and I moved that 2000-11-02 entry here.
155 * config/.cvsignore: Add Makefile, depcomp, install-sh.
156 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
157 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
158 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
159 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
160 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
161 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
162 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
163 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
164 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
165 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
167 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
168 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
169 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
170 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
171 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
172 * src/.cvsignore: Remove *_.c.
175 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
176 support it. (The latest stable gzip doesn't.)
178 2004-04-27 Paul Eggert <eggert@twinsun.com>
180 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
181 case, as stos_ is now used by destructors due to the 2004-02-09
184 Remove more K&R C support.
185 * lib/libiberty.y (PARAMS): Remove. All uses removed.
186 * lib/subpipe.c (errno): Remove decl.
187 Include <stdlib.h> unconditionally.
188 (EXIT_FAILURE): Remove macro.
189 * src/complain.c (vfprintf, strerror): Remove.
190 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
192 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
193 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
194 (strchr, strspn, memchr): Remove decls.
195 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
196 unconditionally. Do not declare perror.
197 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
200 * src/complain.c (_): Remove useless defn, as system.h defines this.
202 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
203 with latest obstack.h.
204 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
205 to procedure types, as obstack.h now does that for us.
206 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
208 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
209 so that this include file can stand alone.
210 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
211 does this now. Include subpipe.h first after config.h, to
212 test whether it can stand alone.
214 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
215 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
218 * tests/synclines.at (%union synch line): Put a dummy member in
219 the union, because empty unions aren't allowed in C. Caught
222 2004-04-13 Jim Meyering <jim@meyering.net>
224 * src/conflicts.c (conflicts_print): Correct format string typo:
225 use `%%' to produce literal `%'. (trivial change)
227 2004-03-30 Paul Eggert <eggert@twinsun.com>
229 * src/getargs.c (version): Update copyright year to 2004.
231 * data/c.m4 (b4_int_type): Use 'short int' rather than
232 'short', and similarly for 'long', 'unsigned', etc.
233 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
234 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
235 yy_yypstack, yydumpstack): Likewise.
236 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
237 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
239 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
240 yy_stack_print, yyparse): Likewise.
241 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
242 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
243 * lib/bitset.c (bitset_print): Likewise.
244 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
245 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
246 * lib/bitsetv.c (bitsetv_dump): Likewise.
247 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
248 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
250 * src/LR0.c (allocate_itemsets): Likewise.
251 * src/gram.h (rule_number, rule): Likewise.
252 * src/lalr.h (goto_number): Likewise.
253 * src/nullable.c (nullable_compute): Likewise.
254 * src/output.c (prepare_rules): Likewise.
255 * src/relation.c (relation_print, relation_digraph): Likewise.
256 * src/relation.h (relation_node): Likewise.
257 * src/state.h (state_number, transitions, errs, reductions,
258 struct state): Likewise.
259 * src/symtab.h (symbol_number, struct symbol): Likewise.
260 * src/tables.c (vector_number, tally, action_number,
261 default_goto, goto_actions): Likewise.
262 * tests/existing.at (GNU Cim Grammar): Likewise.
263 * tests/regression.at (Web2c Actions): Likewise.
265 * src/output.c (muscle_insert_short_int_table): Renamed from
266 muscle_insert_short_table. All uses changed.
268 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
270 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
271 (declaration): Replace expected_conflicts with expected_sr_conflicts.
274 * src/scan-gram.l: Recognize %expect-rr.
276 * src/conflicts.h (expected_sr_conflicts): Rename from
278 (expected_rr_conflicts): Declare.
280 * src/conflicts.c (expected_sr_conflicts): Rename from
282 (expected_rr_conflicts): Define.
283 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
285 Use expected_sr_conflicts in place of expected_conflicts.
286 Warn if expected_rr_conflicts used in non-GLR parser.
288 * doc/bison.texinfo: Add documentation for %expect-rr.
290 2004-03-08 Paul Eggert <eggert@gnu.org>
292 Add support for hex token numbers. Suggested by Odd Arild Olsen in
293 <http://mail.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
295 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
297 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
298 * src/scan-gram.l (scan_integer): New function.
300 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
301 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
302 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
303 Say "long int", not "long", for uniformity with GNU style.
305 2004-02-25 Paul Eggert <eggert@twinsun.com>
307 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
308 compilers. This fixes a problem with Intel's C++ compiler being
309 chatty, reported by Guido Trentalancia in
310 <http://mail.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
312 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
314 Support %destructor and merge error locations in lalr1.cc.
316 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
317 (Parser::stos_): Define unconditionally.
318 (Parser::destruct_): New method. Generate its body with
319 b4_yydestruct_generate.
320 (Parser::error_start_): New attribute.
321 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
322 token which are discarded.
323 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
324 error_start_ when erroneous token are discarded.
325 (Parser::parse) <yyerrlab1>: Compute the location of the error
326 token so that it covers all the discarded tokens.
327 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
328 it can be called with `%skeleton "lalr1.cc"', and do that.
330 2004-02-02 Paul Eggert <eggert@twinsun.com>
332 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
333 $(top_srcdir)/lib and ../lib. This fixes a bug reported
334 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
335 There's no need to mention top_builddir since Automake does that
337 (INCLUDES): Remove, as Automake says it's obsolescent.
338 Contents migrated into AM_CPPFLAGS as described above.
339 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
341 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
343 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
344 (yyreportSyntaxError): Handle case where lookahead token is
347 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
349 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
350 resulting parsers are compilable with C++.
352 2003-12-23 Paul Eggert <eggert@twinsun.com>
354 * config/depcomp, config/install-sh: Sync with Automake 1.8.
355 * src/output.c (output_skeleton): Rename local var.
356 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
357 Bison tokens, as this runs afoul of the 2003-10-07 change that
358 disallowed NUL bytes in character constants or string literals.
360 * tests/local.at: Require Autoconf 2.59's Autotest.
361 * tests/testsuite.at: Don't include local.at, since we now assume
362 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
364 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
365 multiple inclusion warnings.
367 2003-12-02 Akim Demaille <akim@epita.fr>
369 * doc/bison.texinfo (How Can I Reset the Parser): More about start
373 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
375 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
377 2003-10-07 Paul Eggert <eggert@twinsun.com>
379 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
380 if testsuite doesn't exist.
382 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
383 literals, unfortunately.
384 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
385 Complain about NUL bytes in character constants or string literals.
387 2003-10-05 Paul Eggert <eggert@twinsun.com>
389 * NEWS: Don't document %no-default-prec, as it's still
391 * doc/bison.texinfo: Document %no-default-prec only if
392 the defaultprec flag is set. Normally it's not.
394 2003-10-04 Paul Eggert <eggert@twinsun.com>
396 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
397 non-modifiable lvalue, instead of a modifiable one.
398 * doc/bison.texinfo (Actions): Document that $$ can
399 be assigned to. Do not claim that $$ and $N are
400 array element references: user code should not rely on this.
402 2003-10-01 Paul Eggert <eggert@twinsun.com>
404 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
405 (grammar_declaration): Use it.
406 * src/scan-gram.l: New token %no-default-prec.
407 * tests/conflicts.at: Revamp tests to use %no-default-prec.
408 * NEWS, doc/bison.texinfo: Document the above.
410 2003-10-01 Akim Demaille <akim@epita.fr>
412 VCG no longer supports long_straight_phase.
414 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
415 * src/print_graph.c (print_graph): Adjust.
417 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
418 and Paul Eggert <eggert@twinsun.com>
420 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
421 Table of Symbols): Document %default-prec.
422 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
423 (grammar_declaration): Set default_prec on %default-prec.
424 * src/scan-gram.l (%default-prec): New token.
425 * src/reader.h (default_prec): New flag.
426 * src/reader.c: Likewise.
427 (packgram): Handle it.
428 * tests/conflicts.at (%default-prec without %prec,
429 %default-prec with %prec, %default-prec 1): New tests.
431 2003-09-30 Paul Eggert <eggert@twinsun.com>
433 * tests/testsuite.at: Include local.at, not input.at, fixing
434 a typo in the 2003-08-25 patch.
436 2003-08-27 Akim Demaille <akim@epita.fr>
438 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
441 2003-08-26 Akim Demaille <akim@epita.fr>
443 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
444 "<\#" to avoid magic from Gnus when posting parts of this script.
446 2003-08-26 Akim Demaille <akim@epita.fr>
448 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
449 (Parser::parse): here.
450 Adjust: nerrs and errstatus is now replaced by...
451 (Parser::nerrs_, Parser::errstatus_): New.
453 2003-08-25 Akim Demaille <akim@epita.fr>
455 * config/announce-gen, Makefile.cfg: New.
456 * Makefile.am: Adjust.
457 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
458 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
460 2003-08-25 Akim Demaille <akim@epita.fr>
462 When reducing initial empty rules, Bison parser read an initial
463 location that is not defined. This results in garbage, and that
464 affects Bison's own parser. Therefore we need (i) to extend Bison
465 to support a means to initialize this location, and (ii) to use
466 this CVS Bison to fix CVS Bison's parser.
468 * src/reader.h, reader.c (epilogue_augment): Remove, replace
470 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
471 * src/parse-gram.y: Adjust.
472 (%initial-action): New.
473 (%error-verbose): Since we require CVS Bison, there is no reason
475 * src/scan-gram.l: Adjust.
476 * src/Makefile.am (YACC): New, to make sure we use our own parser.
477 * data/yacc.c (yyparse): Use b4_initial_action.
479 2003-08-25 Akim Demaille <akim@epita.fr>
481 * doc/bison.texinfo: Don't promote stdout for error messages.
483 2003-08-25 Akim Demaille <akim@epita.fr>
485 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
486 From Alexandre Duret-Lutz.
488 2003-08-25 Akim Demaille <akim@epita.fr>
492 2003-08-25 Akim Demaille <akim@epita.fr>
494 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
497 2003-08-25 Akim Demaille <akim@epita.fr>
499 * data/lalr1.cc (Parser::reduce_print_): New.
502 2003-08-25 Akim Demaille <akim@epita.fr>
504 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
505 error recovery loops. This patch is based on
506 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
507 Also, augment the similarity between lalr1.cc and yacc.c.
508 Note: the locations of error recovery rules are not correct yet.
510 * data/lalr1.cc: Comment changes to augment the similarity between
512 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
513 (yyerrlab1): Remove, but where it used to be (now the bottom part of
514 yyerrlab), when hitting EOF, pop the whole stack here instead of
515 merely falling thru the default error handling mechanism.
516 (yyerrorlab): New label, with the old contents of YYERROR,
517 plus the following change: pop the stack of rhs corresponding
518 to the production that invoked YYERROR. That is how Yacc
519 behaves (required by POSIX).
520 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
523 2003-08-25 Akim Demaille <akim@epita.fr>
525 Tune local.at so that people can "autom4te -l autotest calc.at -o
526 calc" for instance, to extract a sub test suite.
528 * tests/testsuite.at: Move the initialization, Autotest version
529 requirement, and AT_TESTED invocation into...
530 * tests/local.at: here.
531 * tests/testsuite.at: Include it for compatibility with Autoconf
533 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
536 2003-08-04 Paul Eggert <eggert@twinsun.com>
538 Rework code slightly to avoid gcc -Wtraditional warnings.
539 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
540 The returned value is now stored in *YY0. All callers changed.
541 * src/output.c (merge_output): Adjust to the above change.
543 2003-07-26 Paul Eggert <eggert@twinsun.com>
545 * data/glr.c (YYASSERT): New macro.
546 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
547 yyresolveStates, yyprocessOneStack):
548 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
549 Derived from a suggestion by Frank Heckenbach.
551 2003-07-25 Paul Eggert <eggert@twinsun.com>
553 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
554 for portability to K&R C (after ansi2knr, presumably). See
555 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
556 by Frank Heckenbach, though I have omitted the structure-initialization
557 part of his glr-knr.diff patch since I recall that the Portable
558 C Compiler didn't require that change.
560 Let the user specify how to allocate and free memory.
561 Derived from a suggestion by Frank Heckenbach in
562 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
563 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
564 All uses of free, malloc, realloc changed to use these macros,
565 and unnecessary casts removed.
566 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
568 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
570 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
571 use s.empty() rather than s == "" to test for empty string; see
572 <http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
575 2003-06-25 Akim Demaille <akim@epita.fr>
577 * config/depcomp, config/install-sh: Update from masters.
579 2003-06-20 Paul Eggert <eggert@twinsun.com>
581 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
582 and return properly parenthesized result.
583 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
584 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
585 Remove unnecessary parentheses from uses.
586 * doc/bison.texinfo (Location Default Action): Describe the
587 conventions for parentheses.
589 2003-06-19 Paul Eggert <eggert@twinsun.com>
591 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
592 yyreportTree): Do not assume that size_t is the same width as int,
593 when printing sizes. Print sizes using an unsigned format.
594 Problem reported by Frank Heckenbach in
595 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
597 Port to Forte Developer 7 C compiler.
598 * data/glr.c (struct YYLTYPE): If locations are not being used,
599 declare a single dummy member, as empty structs do not conform
601 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
602 the Forte Developer 7 C compiler complains that end-of-loop
605 2003-06-17 Paul Eggert <eggert@twinsun.com>
607 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
608 avoid warnings from picky compilers about redefinition of PARAMS.
610 2003-06-17 Paul Eggert <eggert@twinsun.com>
614 * NEWS: Document 1.875b.
616 * lib/bbitset.h: Do not include config.h; that's the includer's job.
617 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
618 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
619 Don't use 'index' in comments, as it's a builtin fn on some hosts.
620 * lib/bitset_stats.c: Include gettext.h unconditionally, as
621 per recent gettext manual's suggestion.
622 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
623 Use prototypes, not old-style definitions.
624 * lib/lbitset.c (lbitset_unused_clear): Likewise.
625 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
626 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
627 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
628 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
629 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
630 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
631 vbitset_or_and_cmp, vbitset_copy): Likewise.
633 * lib/libiberty.h: Do not include config.h; that's the includer's job.
634 Do not include <stdlib.h>.
635 (PARAMS): Define unconditionally for C89.
636 (ATTRIBUTE_NORETURN): Remove.
637 (ATTRIBUTE_UNUSED): Define unconditionally.
639 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
640 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
641 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
642 * lib/vbitset.c, lib/vbitset.h: New files.
643 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
644 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
647 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
648 `How Can I Reset @code{yyparse}', since texinfo does not allow
649 arbitrary @ in node names.
651 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
652 shouldn't be needed according to the gettext 0.12.1 documentation
653 but which seem to be needed anyway: codeset.m4 glibc21.m4
654 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
655 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
656 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
658 * lib/.cvsignore: Add stdbool.h.
659 * m4/.cvsignore: Add nls.m4, po.m4.
661 Upgrade to CVS gnulib.
662 * stdbool_.h: File renamed from stdbool.h.in.
663 * configure.ac (AM_STDBOOL_H): Invoke this instead of
665 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
666 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
667 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
668 (MOSTLYCLEANFILES): New var.
669 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
670 (stdbool.h): New rule.
671 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
672 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
673 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
674 m4/quote.m4: Upgrade to today's gnulib.
676 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
677 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
679 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
680 yyerror are declared before use; C99 requires this.
682 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
684 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
686 (yyrecoverSyntaxError): Correct the logic for setting and testing
688 Correct comment on handling EOF.
689 Allow states with only a default reduction, rather than failing
690 (I can't quite reconstruct why these were not allowed before).
692 Fixes to avoid problem that $-N rules in GLR parsers can cause
693 buffer overruns, corrupting state.
695 * src/output.c (prepare_rules): Output max_left_semantic_context
697 * src/reader.h (max_left_semantic_context): New variable declaration.
698 * src/scan-gram.l (max_left_semantic_context): Define.
699 (handle_action_dollar): Update max_left_semantic_context.
700 * data/glr.c (YYMAXLEFT): New definition.
701 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
702 (yyresolveAction): Ditto.
704 Fixes to problems with location handling in GLR parsers reported by
705 Frank Heckenbach (2003/06/05).
707 * data/glr.c (YYLTYPE): Make trivial if locations not used.
708 (YYRHSLOC): Add parentheses, and define only if locations used.
709 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
711 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
712 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
714 * tests/cxx-type.at: Exercise location information; update tests
715 to differentiate output with and without locations.
716 Remove forward declarations of yylex and yyerror---caused errors
717 because default YYLTYPE not yet defined.
718 Change semantic actions to compute strings, rather than printing
719 them directly (to test proper passing of semantics values). Change
720 output to prefix notation and update test data and expected results.
721 (yylex): Track locations.
722 (stmtMerge): Return value rather than printing, and include arguments
725 2003-06-03 Paul Eggert <eggert@twinsun.com>
727 Avoid warnings generated by GCC 2.95.4 when Bison is
728 configured with --enable-gcc-warnings.
729 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
730 yy::]b4_parser_class_name[::translate_,
731 yy::Stack::operator[] (unsigned),
732 yy::Stack::operator[] (unsigned) const,
733 yy::Slice::operator[] (unsigned),
734 yy::Slice::operator[] (unsigned) const):
735 Rename local vars to avoid warnings.
736 * tests/glr-regression.at (Improper handling of embedded actions
737 and $-N in GLR parsers): Remove unused local variable from yylex.
738 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
739 (void) as arg when not pure, since we now assume C89 when building
740 Bison. Pacify GCC by using parameter.
742 2003-06-02 Paul Eggert <eggert@twinsun.com>
744 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
745 yy::Location::lines, yy::Location::columns): Rename arguments
746 to avoid shadowing; this removes a warning generated by GCC 3.3.
748 2003-06-01 Paul Eggert <eggert@twinsun.com>
750 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
751 to g++, as GCC 3.3 complains if you do it.
752 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
753 everything that WARNING_CFLAGS has, except omit warnings
754 not suitable for C++.
755 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
756 * tests/atlocal.in (CXXFLAGS): New var.
757 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
759 Fix a GLR parser bug I reported in February; see
760 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
761 The problem was that GLR parsers did not conform to the C standard,
762 because actions like { $1 = $2 + $3; } expanded to expressions
763 that invoked YYFILL in separate subexpressions, and YYFILL assigned
764 to a local variable. The C standard says that expressions
765 like (var = f ()) + (var = f ()) have undefined behavior.
766 Another problem was that GCC sometimes issues warnings that
767 yyfill and its parameters are unused.
769 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
771 (yyfill): New function.
773 (yyuserAction): Change type of yynormal to bool, so that it matches
774 the new yyfill signature. Mark it as possibly unused.
777 Follow up on a bug I reported in February, where a Bison-generated
778 parser can loop. Provide a test case and a fix for yacc.c. I
779 don't have a fix for lalr1.cc or for glr.c, unfortunately.
780 The original bug report is in:
781 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
783 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
784 macro's size was becoming unwieldy.
785 (yyerrlab): Do not discard an empty lookahead symbol, as this
786 might destroy garbage.
787 (yyerrorlab): New label, with the old contents of YYERROR,
788 plus the following change: pop the stack of rhs corresponding
789 to the production that invoked YYERROR. That is how Yacc
790 behaves, and POSIX requires this behavior.
791 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
792 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
793 Define 'alarm' to do nothing if unistd.h is not available.
794 Add a new rule "exp: '-' error;" to test the above change to
795 data/yacc.c. Use 'alarm' to abort any test taking longer than
796 10 seconds, as it's probably looping.
797 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
798 Also, the new yacc.c generates two fewer diagnostics for an
801 2003-05-24 Paul Eggert <eggert@twinsun.com>
803 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
804 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
805 This fixes a problem reported by John Bowman when the Compaq/HP
806 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
808 * data/yacc.c (union yyalloc): Likewise.
809 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
811 Switch from 'int' to 'bool' where that makes sense.
813 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
814 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
815 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
816 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
817 Return or accept bool, not int. All callers changed.
818 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
819 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
820 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
821 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
822 bitset_or_and_cmp_): Likewise.
823 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
824 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
825 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
826 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
827 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
828 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
829 bitset_stats_or_and_cmp): Likewise.
830 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
831 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
832 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
833 ebitset_xor_cmp): Likewise.
834 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
835 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
836 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
837 lbitset_xor_cmp): Likewise.
838 * lib/bbitset.h: Include <stdbool.h>.
839 (struct bitset_vtable): The following members now return bool, not
840 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
841 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
843 * src/conflicts.c (count_rr_conflicts): Likewise.
844 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
846 * lib/ebitset.c (ebitset_obstack_init): Likewise.
847 * lib/lbitset.c (lbitset_obstack_init): Likewise.
848 * src/getargs.c (debug_flag, defines_flag, locations_flag,
849 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
850 graph_flag): Likewise.
851 * src/getargs.h (debug_flag, defines_flag, locations_flag,
852 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
853 graph_flag): Likewise.
854 * src/output.c (error_verbose): Likewise.
855 * src/output.h (error_verbose): Likewise.
856 * src/reader.c (start_flag, typed): Likewise.
857 * src/reader.h (typed): Likewise.
858 * src/getargs.c (LOCATIONS_OPTION): New constant.
859 (long_options, getargs): Use it.
860 * src/lalr.c (build_relations): Use bool, not int.
861 * src/nullable.c (nullable_compute): Likewise.
862 * src/print.c (print_reductions): Likewise.
863 * src/tables.c (action_row, pack_vector): Likewise.
864 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
865 * src/output.c (prepare): Use it.
866 * src/output.c (token_definitions_output,
867 symbol_destructors_output, symbol_destructors_output): Use string,
868 not boolean integer, to keep track of whether to output separator.
869 * src/print_graph.c (print_core): Likewise.
870 * src/state.c (state_rule_lookaheads_print): Likewise.
872 * config/install-sh: Sync from automake 1.7.5.
874 2003-05-14 Paul Eggert <eggert@twinsun.com>
876 * src/parse-gram.y (rules_or_grammar_declaration): Require a
877 semicolon after a grammar declaration, in the interest of possible
878 future changes to the Bison input language.
879 Do not allow a stray semicolon at the start of the grammar.
880 (rhses.1): Allow one or more semicolons after any rule, including
881 just before "|" as required by POSIX.
882 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
885 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
887 %parse-param support for lalr1.cc.
889 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
890 b4_cc_constructor_calls, b4_cc_constructor_call,
891 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
893 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
894 parse-param arguments.
895 (yy::b4_parser_class_name): Declare instance variables to
896 hold parse-param arguments.
897 * tests/calc.at: s/value/semantic_value/ because value clashes
898 with a member of yy::b4_parser_class_name. Adjust C++ code
899 to handle %parse-param. Enable %parse-param test in C++.
901 2003-05-12 Paul Eggert <eggert@twinsun.com>
903 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
904 English a bit. Fix fclose typo. Change "const char" to "char
905 const", and use ANSI C rather than K&R for "main". Suggest
906 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
907 and suggest yy_switch_to_buffer.
909 2003-05-05 Paul Eggert <eggert@twinsun.com>
911 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
912 C89. This avoids a diagnostic on compilers that define __STDC__
913 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
914 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
916 2003-05-03 Paul Eggert <eggert@twinsun.com>
918 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
919 Do not overrun array bounds.
920 This should fix a bug reported today by Olatunji Oluwabukunmi in
921 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
923 2003-04-29 Akim Demaille <akim@epita.fr>
925 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
926 * src/getargs.c, src/getargs.h: here, as bool, not int.
927 (nondeterministic_parser): New.
928 * src/parse-gram.y, src/scan-gram.l: Support
929 %nondeterministic-parser.
930 * src/output.c (prepare): Use nondeterministic_parser instead
931 of glr_parser where appropriate.
932 * src/tables.c (conflict_row, action_row, save_row)
933 (token_actions, token_actions, pack_vector): Ditto.
935 2003-04-29 Akim Demaille <akim@epita.fr>
937 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
939 2003-04-29 Akim Demaille <akim@epita.fr>
941 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
942 with %pure-parser and %locations to exercise the patch from Yakov
945 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
947 * data/yacc.c: (b4_lex_param): Corrected for the case where
948 %lex-param is provided and %pure-parser isn't.
950 2003-04-27 Paul Eggert <eggert@twinsun.com>
952 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
953 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
954 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
955 if it is not defined.
956 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
958 2003-04-26 Paul Eggert <eggert@twinsun.com>
960 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
961 Declare to be of type suitable for the ninf value itself, not of
962 type suitable for the corresponding table, since the latter might
963 be unsigned but the ninf value might be negative. This fixes a
964 bug reported by Alexandre Duret-Lutz in
965 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
967 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
968 invokes it. We shouldn't invoke it twice because it will attempt
969 to put error.o in the archive twice. This fixes a glitch reported
971 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
973 2003-04-21 Paul Eggert <eggert@twinsun.com>
975 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
978 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
980 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
981 Fix obvious typo that results in uncompilable GLR parsers
982 when both %pure-parser and %locations are used. (trivial change)
984 2003-04-17 Paul Eggert <eggert@twinsun.com>
986 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
987 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
988 Do not insert the expected token via unput, as this runs afoul
989 of a POSIX-compatibility bug in flex 2.5.31.
990 All uses changed to BEGIN the parent state,
991 since we no longer insert the expected token via unput.
992 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
993 that is no longer emitted after the above change.
995 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
996 the first one. This change is from Paul Hilfinger, and it fixes
997 regression reported by Werner Lemberg in
998 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1000 (resolve_sr_conflict): Don't invoke state_errs_set
1001 unless one or more tokens have been explicitly made errors.
1002 Otherwise, the above change causes Bison to abort.
1004 * tests/existing.at (GNU pic Grammar): New test case, taken from
1007 2003-03-31 Akim Demaille <akim@epita.fr>
1009 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
1011 2003-03-31 Akim Demaille <akim@epita.fr>
1013 * src/output.c (prepare_symbols): Avoid trailing spaces in the
1016 2003-03-31 Akim Demaille <akim@epita.fr>
1018 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
1019 From Paul Hilfinger.
1021 2003-03-29 Akim Demaille <akim@epita.fr>
1023 * m4/error.m4: Do not put under dynamic conditions some code which
1024 expansion is under static control.
1026 2003-03-29 Akim Demaille <akim@epita.fr>
1028 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
1030 2003-03-29 Akim Demaille <akim@epita.fr>
1032 * doc/bison.texinfo (Strings are Destroyed): New.
1034 2003-03-13 Paul Eggert <eggert@twinsun.com>
1036 * .cvsignore: Add configure.lineno.
1037 * src/.cvsignore: Add yacc.
1038 * tests/.cvsignore: Add testsuite.log.
1039 * doc/fdl.texi: Sync with latest FSF version.
1041 2003-03-12 Paul Eggert <eggert@twinsun.com>
1043 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
1044 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
1045 cursor, instead of leaving it undefined. This fixes a bug
1046 reported by Tim Van Holder in
1047 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
1048 * tests/input.at (Torturing the Scanner): Test the scanner on
1049 an empty input file, which was Tim Van Holder's test case.
1051 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
1052 <sys/resource.h> can be included, include sys/time.h and
1053 sys/times.h first, if available. This works around the SunOS
1054 4.1.4 porting bug reported by Bruce Becker in
1055 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
1057 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
1058 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
1061 Merge changes from gnulib. This was prompted because the CVS
1062 snapshot didn't build on Solaris 7 due to strnlen problems.
1064 These changes need to be merged back into gnulib:
1065 * lib/hash.c: Include <stdbool.h> unconditionally.
1066 * m4/onceonly.m4 (m4_quote): New macro.
1067 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
1068 Quote AC_FOREACH variable-expansions properly.
1069 The 2003-01-03 obstack.h change also needs merging.
1070 {end of changes requiring merging}
1072 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
1073 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
1074 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
1075 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
1076 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
1077 New files, imported from gnulib.
1078 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
1081 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
1082 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
1085 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
1087 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
1088 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
1089 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
1090 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
1091 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
1092 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
1093 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
1094 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
1095 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
1096 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
1097 (jm_PREREQ_ARGMATCH): Remove.
1098 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
1099 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
1101 * src/system.h: Include <stdbool.h> unconditionally.
1103 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
1104 assuming at least C89 in the bitset code for some time now.
1106 2003-03-03 Akim Demaille <akim@epita.fr>
1110 2003-03-02 Akim Demaille <akim@epita.fr>
1112 * doc/bison.texinfo (Table of Symbols): Reactivate the
1113 documentation for %lex-param, and %parse-param.
1115 2003-03-02 Akim Demaille <akim@epita.fr>
1117 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
1118 generate verbose error messages.
1119 Use the number of tokens as an upper bound in yytname, as it
1120 cannot be a non terminal.
1122 2003-03-02 Akim Demaille <akim@epita.fr>
1124 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
1127 2003-03-02 Akim Demaille <akim@epita.fr>
1129 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
1130 Use them to exercise yycheck overrun.
1131 Based on Andrew Suffield's grammar.
1133 2003-03-02 Akim Demaille <akim@epita.fr>
1135 Create tests/local.at for Bison generic testing macros.
1137 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
1138 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
1140 * tests/calc.at (AT_CHECK_CALC): Adjust.
1141 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
1142 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
1143 * tests/local.at: here.
1144 (AT_COMPILE_CXX): Tags the tests using it as c++.
1145 Ignore the test if CXX is not functional.
1147 2003-03-01 Paul Eggert <eggert@twinsun.com>
1149 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
1150 not loc->end, since loc->end might contain garbage and this leads
1151 to undefined behavior on some platforms.
1152 (id_loc, token_start): Use (IF_LINTed) initial values that do not
1153 depend on *loc, so that the reader doesn't give the the false
1154 impression that *loc is initialized.
1155 (<INITIAL>"%%"): Do not bother setting code_start, since its value
1156 does not survive the return.
1158 2003-03-01 Akim Demaille <akim@epita.fr>
1160 * src/scan-gram.l (code_start): Always initialize it when entering
1161 into yylex, as SC_EPILOGUE is activated *before* the corresponding
1162 yylex invocation. An alternative would be making it static, but
1163 then it starts with the second %%'s beginning, instead of its end.
1165 2003-02-28 Paul Eggert <eggert@twinsun.com>
1167 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
1168 around a UnixWare 7.1.1 porting bug reported by John Hughes in
1169 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
1171 2003-02-26 Paul Eggert <eggert@twinsun.com>
1173 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
1174 Remove Sequent/Pyramid discussion (nobody uses them any more).
1175 Merge VMS and MS-DOS discussion; these ports may well be dead
1176 but let's keep mentioning them for now. Put <> around email
1177 addresses. Add copyright notice.
1179 2003-02-24 Paul Eggert <eggert@twinsun.com>
1181 * data/glr.c (yy_reduce_print): yylineno -> yylno,
1182 to avoid collision with flex use of yylineno.
1183 Problem reported by Bruce Lilly in
1184 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
1185 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1186 * data/yacc.c (yy_reduce_print): Likewise.
1188 * config/depcomp: Sync with Automake 1.7.3.
1190 2003-02-21 Akim Demaille <akim@epita.fr>
1192 * data/lalr1.cc: Use temporary variables instead of casts to
1193 change integer types.
1194 Suggested by Paul Eggert.
1196 2003-02-21 Akim Demaille <akim@epita.fr>
1198 * doc/bison.texinfo: Use "location" consistently to refer to @n,
1199 to avoid confusions with lalr1.cc's notion of Position.
1200 Suggested by Paul Eggert.
1202 2003-02-20 Akim Demaille <akim@epita.fr>
1204 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
1205 before initial_columns.
1206 (location.hh): Use consistent variable names when defining the
1208 Use "last" so that we subtract from Positions, not from unsigned.
1210 2003-02-20 Akim Demaille <akim@epita.fr>
1212 * data/lalr1.cc (position.hh): New subfile, including the extended
1213 and Doxygen'ed documentation of class Position.
1214 (location.hh): Use it.
1215 Document a` la Doxygen.
1216 With the help of Benoit Perrot.
1218 2003-02-20 Akim Demaille <akim@epita.fr>
1220 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
1222 Redefine AT_YYERROR_SEES_LOC_IF using it.
1223 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
1225 Don't use the location in yy::Parser::error_ and
1226 yy::Parser::print_ when not %locations.
1227 Activate more lalr1.cc tests.
1229 2003-02-19 Akim Demaille <akim@epita.fr>
1231 * data/lalr1.cc: When displaying a line number, be sure to make it
1234 2003-02-19 Akim Demaille <akim@epita.fr>
1236 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
1238 (YYABORT, YYACCEPT, YYERROR): New.
1239 * tests/calc.at: Renable the lalr1.cc test.
1241 2003-02-19 Akim Demaille <akim@epita.fr>
1243 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
1244 error recovery, mixing with/without pops and discarding of the
1247 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
1249 2003-02-17 Paul Eggert <eggert@twinsun.com>
1251 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
1252 * tests/testsuite.at (AT_COMPILE): Use them.
1253 This fixes the testsuite problem reported by Robert Lentz in
1254 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
1256 2003-02-12 Paul Eggert <eggert@twinsun.com>
1258 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
1259 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
1260 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
1261 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
1262 Check for malloc failure, for consistency with yacc.c.
1263 (yytname_size): Remove, for consistency with yacc.c.
1265 The bug still remains in data/lalr1.cc, as I didn't have time
1268 2003-02-06 Akim Demaille <akim@epita.fr>
1270 * configure.ac (GXX): Rename as...
1271 (CXX): this, to keep the original Autoconf semantics.
1273 * data/lalr1.cc: Fix b4_copyright invocations.
1274 If YYDEBUG is not defined, don't depend upon name_ being defined.
1275 (location.hh): Include string and iostream.
1276 (Position::filename): New member.
1277 (Position::Position ()): New.
1278 (operator<< (Position)): New.
1279 (operator- (Position, int)): New.
1280 (Location::first, Location::last): Rename as...
1281 (Location::begin, Location::end): these, to mock the conventional
1283 (operator<< (Location)): New.
1284 * tests/atlocal.in (CXX): New.
1285 * tests/testsuite.at (AT_COMPILE_CXX): New.
1286 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
1287 locations in a more synthetic way.
1288 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
1290 Adjust the C locations to match those from Emacs: first column is
1292 Change all the expected results.
1293 Conform to the GCS: simplify the locations when applicable.
1294 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
1295 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
1296 these CPP macros with the m4 macros new defined by...
1297 (AT_CHECK_PUSHDEFS): this, i.e.:
1298 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
1299 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
1301 (AT_CHECK_POPDEFS): Undefine them.
1302 (AT_CHECK_CALC_LALR1_CC): New.
1303 Use it for the first lalr1.cc test.
1305 2003-02-04 Akim Demaille <akim@epita.fr>
1307 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
1308 Location as is defined.
1310 2003-02-04 Akim Demaille <akim@epita.fr>
1312 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
1313 name_ being defined.
1315 2003-02-03 Paul Eggert <eggert@twinsun.com>
1317 * src/gram.h (start_symbol): Remove unused decl.
1319 Use more-consistent naming conventions for local vars.
1321 * src/derives.c (derives_compute): Change type of local var from
1323 * src/gram.c (grammar_rules_partial_print): Likewise.
1324 * src/print.c (print_core): Likewise.
1325 * src/reduce.c (reduce_grammar_tables): Likewise.
1327 * src/gram.c (grammar_dump): Change name of item_number *
1328 local var from r to rp.
1329 * src/nullable.c (nullable_compute): Likewise.
1331 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
1333 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
1334 for symbol or symbol_number var.
1335 * src/reader.c (grammar_start_symbol_set): Likewise.
1336 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
1338 * src/state.c (transitions_to): Likewise.
1339 * src/state.h: Likewise.
1340 * src/tables.c (symbol_number_to_vector_number): Likewise.
1342 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
1345 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
1348 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
1351 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
1352 Use str, not s, for char * var. Use ch, not c, for character var.
1353 Use size for size var.
1355 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
1357 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
1359 * src/uniqstr.h: Likewise.
1361 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1362 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1363 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
1364 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
1365 param to have same name as that of enum, so that we don't use
1366 "s" to stand for a non-state.
1368 2003-02-02 Akim Demaille <akim@epita.fr>
1370 * src/scan-skel.l: Scan more than one inert character per yylex
1373 2003-02-01 Paul Eggert <eggert@twinsun.com>
1377 * po/LINGUAS: Add ms.
1379 2003-01-30 Akim Demaille <akim@epita.fr>
1381 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
1383 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1385 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
1388 Changes in response to error report by S. Eken: GLR mode does not
1389 handle negative $ indices or $ indices in embedded rules correctly.
1390 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
1392 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
1393 (b4_rhs_location): Ditto.
1394 (yyfill): New function to copy from stack tree into array
1396 (yyuserAction): Modify to allow incremental move of semantic values
1397 to rhs array when in GLR mode.
1398 Define YYFILL to use in user-defined actions to fill semantic array
1400 Remove dummy use of yystack, as there is now a guaranteed use.
1401 (yydoAction): Modify to allow incremental move of semantic values
1402 to rhs array when in GLR mode.
1403 (yyresolveAction): Ditto.
1404 (yyglrShiftDefer): Update comment.
1405 (yyresolveStates): Use X == NULL for pointers, not !X.
1406 (yyglrReduce): Ditto.
1409 * tests/glr-regr1.at: Rename to ...
1410 * tests/glr-regression.at: Add new regression test for the problems
1411 described above (adapted from S. Eken).
1412 Update copyright notice.
1413 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
1414 * tests/Makefile.am: Ditto.
1416 2003-01-28 Paul Eggert <eggert@twinsun.com>
1418 * data/lalr1.cc: Do not use @output_header_name@ unless
1419 b4_defines_flag is set. This fixes two bugs reported by
1421 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
1422 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
1424 2003-01-21 Paul Eggert <eggert@twinsun.com>
1426 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
1427 we don't need to worry about yyerrlab1 being reported as an
1428 "unused label" by non-GCC C compilers. The downside is that if
1429 locations are used then a couple of statements are duplicated each
1430 time YYERROR is invoked, but the upside is that the warnings
1432 (yyerrlab1): Move code to YERROR.
1433 (yyerrlab2): Remove. Change uses back to yyerrlab1.
1434 This reverts some of the 2002-12-27 change.
1436 2003-01-17 Paul Eggert <eggert@twinsun.com>
1438 * src/output.c (symbol_printers_output): Fix typo that led
1439 to core dump. Problem reported by Antonio Rus in
1440 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
1442 2003-01-13 Akim Demaille <akim@epita.fr>,
1443 Quoc Peyrot <chojin@lrde.epita.fr>,
1444 Robert Anisko <anisko_r@lrde.epita.fr>
1446 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
1447 when the stacks contain one element, as the loop would otherwise
1448 free the last state, and then use the top state (the one we just
1449 popped). This means that the initial elements will not be freed
1450 explicitly, as is the case in yacc.c; it is not a problem, as
1451 these elements have fake values.
1453 2003-01-11 Paul Eggert <eggert@twinsun.com>
1455 * NEWS: %expect-violations are now just warnings, reverting
1456 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
1457 bootstrapping problem reported by Matthias Klose; see
1458 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
1459 * src/conflicts.c (conflicts_print): Likewise.
1460 * tests/conflicts.at (%expect not enough, %expect too much,
1461 %expect with reduce conflicts): Likewise.
1462 * doc/bison.texinfo (Expect Decl): Document this. Also mention
1463 that the warning is enabled if the number of conflicts changes
1464 (not necessarily increases).
1466 * src/getargs.c (version): Update copyright year.
1468 2003-01-09 Akim Demaille <akim@epita.fr>
1470 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
1472 2003-01-08 Paul Eggert <eggert@twinsun.com>
1474 * Makefile.maint (WGETFLAGS):
1475 New macro, containing "-C off" to disable proxy caches.
1476 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
1477 (rel-check): Use $(WGET) instead of wget.
1479 2003-01-06 Paul Eggert <eggert@twinsun.com>
1481 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
1482 the GLR paper of Scott, Johnstone and Hussain.
1484 2003-01-04 Paul Eggert <eggert@twinsun.com>
1486 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
1487 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
1488 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
1489 (EXTRA_LIBRARIES): New var, for liby.a.
1490 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
1491 (EXTRA_SCRIPTS): New var, for yacc.
1493 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
1494 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
1495 Problem reported by Nelson H. F. Beebe.
1497 2003-01-03 Paul Eggert <eggert@twinsun.com>
1499 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
1500 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1501 when compiling Bison 1.875's `bitset bset = obstack_alloc
1502 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
1504 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
1505 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
1506 grow to a huge size with typical invocation.
1508 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
1509 Use the pattern recommended by Autoconf 2.57, except also protect
1510 against double-definition.
1511 * src/system.h: Likewise.
1512 Portability issues reported by Nelson H. F. Beebe.
1514 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
1515 All uses changed. Provide a definition in both C and C++.
1516 (yytrue, yyfalse): Define even if defined (__cplusplus).
1518 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
1519 Reported by Nelson H. F. Beebe.
1521 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
1523 2003-01-02 Paul Eggert <eggert@twinsun.com>
1525 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
1526 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
1527 Bug reported by Nelson H. F. Beebe.
1529 2003-01-01 Paul Eggert <eggert@twinsun.com>
1533 2002-12-30 Paul Eggert <eggert@twinsun.com>
1535 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
1537 (<INITIAL>","): Here. This causes stray "," to be treated
1540 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
1541 last brace in braced code when not in Yacc mode, for compatibility
1542 with Bison 1.35. This resurrects the 2001-12-15 patch to
1545 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
1546 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
1548 2002-12-28 Paul Eggert <eggert@twinsun.com>
1550 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
1551 that of SYM's type. This fixes Debian bug 168069, reported by
1554 2002-12-28 Paul Eggert <eggert@twinsun.com>
1558 Switch back to the Yacc style of conflict reports, undoing some
1559 of the 2002-07-30 change.
1560 * doc/bison.texinfo (Understanding): Use Yacc style for
1561 conflict reports. Also, use new way of locating rules.
1562 * src/conflicts.c (conflict_report):
1563 Renamed from conflict_report_yacc, removing the old
1564 'conflict_report'. Translate the entire conflict report at once,
1565 so that we don't assume that "," has the same interpretation in
1567 (conflicts_output): Use Yacc-style conflict report for each state,
1568 instead of our more-complicated style.
1569 (conflicts_print): Use Yacc-style conflict report, except print
1570 the input file name when not emulating Yacc.
1571 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
1572 Conflicted Reduction, %expect not enough, %expect too much,
1573 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
1574 * tests/existing.at (GNU Cim Grammar): Likewise.
1575 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
1577 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
1578 fatal): Don't invoke fflush; it's not needed and it might even be
1579 harmful for stdout, as stdout might not be open.
1580 * src/reduce.c (reduce_print): Likewise.
1582 2002-12-27 Paul Eggert <eggert@twinsun.com>
1584 Fix a bug where error locations were not being recorded correctly.
1585 This problem was originally reported by Paul Hilfinger in
1586 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
1588 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1589 top of the location stack's error locations.
1590 (yyerrlab): Set it. When discarding a token, push its location
1591 onto yylerrsp so that we don't lose track of the error's end.
1592 (yyerrlab1): Now is only the target of YYERROR, so that we can
1593 properly record the location of the action that failed. For GCC
1594 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1595 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1596 (yyerrlab2): New label, which yyerrlab now falls through to.
1597 Compute the error's location by applying YYLLOC_DEFAULT to
1598 the locations of all the symbols that went into the error.
1599 * doc/bison.texinfo (Location Default Action): Mention that
1600 YYLLOC_DEFAULT is also invoked for syntax errors.
1601 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1602 Error locations include the locations of all the tokens that were
1603 discarded, not just the last token.
1605 2002-12-26 Paul Eggert <eggert@twinsun.com>
1607 * src/files.c: Include quote.h.
1608 (compute_output_file_names): Warn if we detect conflicting
1609 outputs to the same file. This should catch the misunderstanding
1610 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1612 * src/conflicts.c (conflicts_print): If the user specifies
1613 "%expect N", report an error if there are any reduce/reduce
1614 conflicts. This is what the manual says should happen.
1615 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1616 * tests/conflicts.at (%expect with reduce conflicts): New test.
1618 Don't use m4_include on relative file names, as it doesn't work as
1619 desired if there happens to be a file with that name under ".".
1621 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1622 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1623 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1624 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1625 * src/output.c (output_skeleton): Use full path names when
1626 specifying a file to include; don't rely on include path, as
1627 it's unreliable when the working file contains a file with
1630 2002-12-25 Paul Eggert <eggert@twinsun.com>
1632 Remove obsolete references to bison.simple and bison.hairy.
1633 Problem mentioned by Aubin Mahe in
1634 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
1635 * data/glr.c: Comment fix.
1636 * doc/bison.1: Remove references. Also, mention "yacc".
1638 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1641 * src/parse-gram.y (declaration): Use enum "report_states" rather
1642 than its numeric value 1.
1644 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1645 opening a new one. This fixes Debian bug 165349, reported by
1648 2002-12-24 Paul Eggert <eggert@twinsun.com>
1652 * Makefile.maint (cvs-update): Don't assume that the shell
1653 supports $(...), as Solaris sh doesn't.
1655 * src/parse-gram.y (lloc_default): Remove test for empty
1656 nonterminals at the end, since it didn't change the result.
1658 2002-12-24 Paul Eggert <eggert@twinsun.com>
1660 If the user does not define YYSTYPE as a macro, Bison now declares it
1661 using typedef instead of defining it as a macro. POSIX requires this.
1662 For consistency, YYLTYPE is also declared instead of defined.
1664 %union directives can now have a tag before the `{', e.g., the
1665 directive `%union foo {...}' now generates the C code
1666 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1667 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1668 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1669 instead of `yyltype'.
1671 `yystype' and `yyltype' are now obsolescent macros instead of being
1672 typedefs or tags; they are no longer documented and will be
1673 withdrawn in a future release.
1675 * data/glr.c (b4_location_type): Remove.
1676 (YYSTYPE): Renamed from yystype.
1677 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
1678 (struct YYLTYPE): Renamed from struct yyltype.
1679 (YYLTYPE): Renamed from yyltype.
1680 (yyltype, yystype): New (and obsolescent) macros,
1681 for backward compatibility.
1682 * data/yacc.c: Likewise.
1684 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
1685 does not specify a union tag. This is for compatibility with
1688 * src/parse-gram.y (add_param): 2nd arg is now char * not char
1689 const *, since it is now modified by stripping surrounding { }.
1690 (current_braced_code): Remove.
1691 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
1692 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
1693 trailing " {...}". Now of type <chars>.
1694 (grammar_declaration): Adjust to bundled tokens.
1695 (code_content): Remove; stripping is now done by add_param.
1696 (print_token_value): Print contents of bundled tokens.
1697 (token_name): New function.
1699 * src/reader.h (braced_code, current_braced_code): Remove.
1700 (token_name): New decl.
1702 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
1703 token_type, not braced_code code_kind. All uses changed.
1704 (SC_PRE_CODE): New state, for scanning after a keyword that
1705 has (or usually has) an immediately-following braced code.
1706 (token_type): New local var, to keep track of which token type
1707 to return when scanning braced code.
1708 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
1709 <INITIAL>"%parse-param", <INITIAL>"%printer",
1710 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
1711 instead of returning a token type immediately.
1712 (<INITIAL>"{"): Set token type.
1713 (<SC_BRACED_CODE>"}"): Use it.
1714 (handle_action_dollar, handle_action_at): Now returns bool
1715 indicating success. Fail if ! current_rule; this prevents a core dump.
1716 (handle_symbol_code_dollar, handle_symbol_code_at):
1717 Remove; merge body into caller.
1718 (handle_dollar, handle_at): Complain in invalid contexts.
1720 * NEWS, doc/bison.texinfo: Document the above.
1721 * NEWS: Fix years and program names in copyright notice.
1723 2002-12-17 Paul Eggert <eggert@twinsun.com>
1725 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
1726 Reporting, Table of Symbols): Omit mentions of %lex-param and
1727 %parse-param from the documentation for now.
1729 2002-12-15 Paul Eggert <eggert@twinsun.com>
1731 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
1732 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
1733 lookahead symbol, and which sets yychar in parser actions) and it
1734 disagreed with the Bison documentation. Bug
1735 reported by Andrew Walrond.
1737 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
1738 as the caller now does that.
1739 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
1740 (YYEMPTY): Parenthesize right hand side, since others use it.
1741 (yyparse): Don't assume that our generated code is the only code
1744 2002-12-13 Paul Eggert <eggert@twinsun.com>
1748 POSIX requires a "yacc" command.
1749 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
1750 (MOSTLYCLEANFILES): Add yacc.
1752 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
1753 as an alias for bison y.
1755 * po/LINGUAS: Add da.
1757 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
1758 problem with latest <getopt.h>.
1759 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
1761 * doc/fdl.texi: Upgrade to 1.2.
1762 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
1763 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
1764 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
1766 * config/install-sh: Sync with autotools.
1768 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
1769 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1770 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
1771 locations are requested.
1772 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
1773 locations are requested.
1775 2002-12-12 Paul Eggert <eggert@twinsun.com>
1777 Remove unportable casts and storage allocation tricks.
1778 While we're at it, remove almost all casts, since they
1779 usually aren't needed and are a sign of trouble.
1781 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
1783 * src/derives.c (derives_compute): Do not subtract NTOKENS from
1784 the pointer DSET returned by malloc; this isn't portable.
1785 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
1786 Similarly for DERIVES.
1787 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
1788 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
1789 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
1791 * src/derives.c (derives_compute): Do not bother invoking
1792 int_of_rule_number, since rule numbers are integers.
1794 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
1795 rather than XMALLOC (char, N).
1797 * src/files.c (filename_split): Rewrite to avoid cast.
1799 * src/gram.h (symbol_number_as_item_number,
1800 item_number_as_symbol_number, rule_number_as_item_number,
1801 item_number_as_rule_number):
1802 Now inline functions rather than macros, to avoid casts.
1803 * src/state.h (state_number_as_int): Likewise.
1804 * src/tables.c (state_number_to_vector_number,
1805 symbol_number_to_vector_number): Likewise.
1807 * src/gram.h (int_of_rule_number): Remove; no longer used.
1809 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
1810 since the resulting storage is always stored into.
1812 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
1815 * src/muscle_tab.c (muscle_m4_output):
1816 Now inline. Return bool, not int.
1817 * src/state.c (state_compare): Likewise.
1818 * src/symtab.c (symbol_check_defined,
1819 symbol_check_alias_consistency, symbol_pack, symbol_translation,
1820 hash_compare_symbol, hash_symbol):
1822 * src/uniqstr.c (uniqstr_print): Likewise.
1823 * src/muscle_tab.c (muscle_m4_output_processor):
1824 New function, to avoid casts.
1825 * src/state.c (state_comparator, stage_hasher): Likewise.
1826 * src/symtab.c (symbol_check_defined_processor,
1827 symbol_check_alias_consistency_processor, symbol_pack_processor,
1828 symbol_translation_processor, hash_symbol_comparator,
1829 hash_symbol_hasher): Likewise.
1830 * src/uniqstr.c (uniqstr_print_processor): Likewise.
1831 * src/muscle_tab.c (muscles_m4_output):
1832 Use new functions instead of casting old functions unportably.
1833 * src/state.c (state_hash_new): Likewise.
1834 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
1835 symbols_token_translations_init):
1837 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
1839 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
1840 var instead of casting to long, to avoid casts.
1841 (prepare_states): Use MALLOC rather than alloca, so that we don't
1842 have to worry about alloca.
1843 * src/state.c (state_hash_lookup): Likewise.
1845 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
1846 local var instead of casting to unsigned char, to avoid casts.
1848 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
1849 STATE_ALLOC): Remove.
1850 (transitions_new, errs_new, reductions_new, state_new): Use malloc
1851 rather than calloc, and use offsetof to avoid allocating slightly
1853 (state_new): Initialize all members.
1855 * src/state.c (state_hash): Use unsigned accumulator, not signed.
1857 * src/symtab.c (symbol_free): Remove; unused.
1858 (symbol_get): Remove cast in lhs of assignment.
1859 (symbols_do): Now static. Accept generic arguments, not
1860 hashing-related ones.
1862 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
1863 (symbol_processor): Remove.
1864 (symbols_do): Remove decl; now static.
1866 * src/system.h (alloca): Remove; decl no longer needed.
1867 (<stddef.h>): Include, for offsetof.
1868 (<inttypes.>, <stdint.h>): Include if available.
1869 (uintptr_t): New type, if system lacks it.
1870 (CALLOC, MALLOC, REALLOC): New macros.
1871 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
1874 * src/tables.c (table_size): Now int, to pacify GCC.
1875 (table_grow, table_ninf_remap): Use signed table size.
1876 (save_row): Don't bother initializing locals when not needed.
1877 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
1878 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
1880 * src/vcg.h: Correct misspellings.
1882 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
1885 * src/getargs.c (getargs): Don't assume EOF == -1.
1887 2002-12-09 Paul Eggert <eggert@twinsun.com>
1889 Change identifier spellings to avoid collisions with names
1890 that are reserved by POSIX.
1892 Don't use names ending in _t, since POSIX reserves them.
1893 For consistency, remove _e and _s endings -- they're weren't
1894 needed to remove ambiguity. All uses changed.
1895 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
1896 turn was just renamed from struniq_t.
1897 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
1898 which in turn was just renamed from struniq_processor_t.
1899 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
1900 in turn was renamed from hash_compare_struniq_t.
1901 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
1902 (state_list): Renamed from state_list_t.
1903 * src/assoc.h (assoc): Renamed from assoc_t.
1904 * src/conflicts.c (enum conflict_resolution): Renamed from
1905 enum conflict_resolution_e.
1906 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
1907 (rule_list): Renamed from rule_list_t.
1908 * src/getargs.h (enum trace): Renamed from enum trace_e.
1909 (enum report): Renamed from enum report_e.
1910 * src/gram.h (item_number): Renamed from item_number_t.
1911 (rule_number): Renamed from rule_number_t.
1912 (struct rule_s): Remove the "rule_s" part; not used.
1913 (rule): Renamed from rule_t.
1914 (rule_filter): Renamed from rule_filter_t.
1915 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
1916 (goto_list): Renamed from goto_list_t.
1917 * src/lalr.h (goto_number): Renamed from goto_number_t.
1918 * src/location.h (location): Renamed from location_t.
1919 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
1920 and moved here from:
1921 * src/muscle_tab.h (muscle_entry_t): here.
1922 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
1923 (rule_list): Renamed from rule_list_t.
1924 * src/print_graph.c (static_graph): Renamed from graph.
1925 * src/reader.h (braced_code): Renamed from braced_code_t.
1926 Remove brace_code_e tag.
1927 * src/relation.h (relation_node): Renamed from relation_node_t.
1928 (relation_nodes): Renamed from relation_nodes_t.
1929 (relation): Renamed from relation_t.
1930 * src/state.h (state_number): Renamed from state_number_t.
1931 (struct state): Renamed from struct state_s.
1932 (state): Renamed from state_t.
1933 (transitions): Renamed from transitions_t. Unused (and
1934 misspelled) transtion_s tag removed.
1935 (errs): Renamed from errs_t. Unused errs_s tag removed.
1936 (reductions): Renamed from reductions_t. Unused tag
1937 reductions_s removed.
1938 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
1939 (struct symbol_list): Renamed from struct symbol_list_s.
1940 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
1941 (struct symbol): Renamed from struct symbol_s.
1942 (symbol): Renamed from symbol_t.
1943 * src/tables.c (vector_number): Renamed from vector_number_t.
1944 (action_number): Renamed from action_t.
1945 * src/tables.h (base_number): Renamed from base_t.
1946 * src/vcg.h (enum color): Renamed from enum color_e.
1947 (enum textmode): Renamed from enum textmode_e.
1948 (enum shape): Renamed from enum shape_e.
1949 (struct colorentry): Renamed from struct colorentry_s.
1950 (struct classname): Renamed from struct classname_s.
1951 (struct infoname): Renamed from struct infoname_s.
1952 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
1953 (enum decision): Renamed from enum decision_e.
1954 (enum orientation): Renamed from enum orientation_e.
1955 (enum alignment): Renamed from enum alignment_e.
1956 (enum arrow_mode): Renamed from enum arrow_mode_e.
1957 (enum crossing_type): Renamed from enum crossing_type_e.
1958 (enum view): Renamed from enum view_e.
1959 (struct node): Renamed from struct node_s.
1960 (node): Renamed from node_t.
1961 (enum linestyle): Renamed from enum linestyle_e.
1962 (enum arrowstyle): Renamed from enum arrowstyle_e.
1963 (struct edge): Renamed from struct edge.
1964 (edge): Renamed from edge_t.
1965 (struct graph): Renamed from struct graph_s.
1966 (graph): Renamed from graph_t.
1967 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
1968 Rename value_t -> value.
1969 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
1970 value_t_as_yystype -> value_as_yystype.
1972 Don't include <errno.h> in the mainstream code, since it
1973 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
1974 * lib/get-errno.c, lib/get-errno.h: New files.
1975 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
1977 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
1978 * src/output.c (output_skeleton): Likewise.
1979 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
1981 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
1983 (handle_action_dollar, handle_action_at): Likewise.
1984 * src/system.h: Do not include <errno.h>.
1985 (TAB_EXT): Renamed from EXT_TAB.
1986 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
1988 Avoid str[a-z]*, since <string.h> reserves that name space.
1989 Change all instances of "struniq" in names to "uniqstr", and
1990 likewise for "STRUNIQ" and "UNIQSTR".
1991 * src/uniqstr.c: Renamed from src/struniq.c.
1992 * src/uniqstr.h: Renamed from src/struniq.h.
1993 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
1994 * src/files.c (strsuffix): Remove; unused.
1995 (concat2): Renamed from stringappend. Now static.
1996 * src/files.h (strsuffix, stringappend): Remove; unused.
1997 * src/parse-gram.y (<chars>): Renamed from <string>.
1998 (<uniqstr>): Renamed from <struniq>.
1999 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
2000 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
2001 (struct graph_s.expand): Renamed from struct graph_s.stretch.
2002 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
2003 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
2004 (N_EXPAND): Renamed from N_STRETCH.
2006 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
2007 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
2008 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
2010 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
2011 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
2012 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
2013 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
2014 (BASE_MAXIMUM): Renamed from BASE_MAX.
2015 (BASE_MINIMUM): Renamed from BASE_MIN.
2016 (ACTION_MAX): Remove; unused.
2017 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
2018 Unnecessary casts removed from above defines.
2021 Fix misspelling in names.
2022 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
2023 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
2027 * lib/timevar.c (timevar_report): Renamed from time_report,
2028 for consistency with other names.
2029 * lib/timevar.h (timevar_report): New decl.
2030 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
2033 Sort include-file uses.
2035 Reorder all include files under src to be in the order "system.h".
2036 then the ../lib include files in angle brackets (alphabetized),
2037 then the . include files in double-quotes (alphabetized). Fix
2038 dependency breakages encountered in this process, as follows:
2039 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
2040 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
2041 * src/state.h: Include "symtab.h".
2043 2002-12-08 Paul Eggert <eggert@twinsun.com>
2045 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
2046 since this causes problems when __file__ contains character
2047 sequences like "@" that are treated specially by src/scan-skel.l.
2048 Instead, just use the file's basename. This fixes the bug
2049 reported by Martin Mokrejs in
2050 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
2052 2002-12-06 Paul Eggert <eggert@twinsun.com>
2054 Add support for rules that do not have trailing semicolons, as
2055 POSIX requires. Improve the quality of locations in Bison
2058 * src/location.c: Include <quotearg.h>.
2059 (empty_location): Now const.
2060 (location_print): New function. Follow the recommendation of the
2061 GNU Coding Standards for locations that span file boundaries.
2062 * src/location.h: Do not include <quotearg.h>; no longer needed.
2063 (boundary): New type.
2064 (location_t): Use it. This allows locations to span file boundaries.
2065 All member uses changed: file -> start.file or end.file (as needed),
2066 first_line -> start.line, first_column -> start.column,
2067 last_line -> end.line, last_column -> end.column.
2068 (equal_boundaries): New function.
2069 (LOCATION_RESET, LOCATION_STEP): Remove.
2070 (LOCATION_PRINT): Remove. All callers changed to use location_print.
2071 (empty_location): Now const.
2072 (location_print): New decl.
2073 * src/parse-gram.y (lloc_default): New function, which handles
2074 empty locations more accurately.
2075 (YYLLOC_DEFAULT): Use it.
2076 (%token COLON): Remove.
2077 (%token ID_COLON): New token.
2079 (declarations, rules): Remove trailing semicolon.
2080 (declaration, rules_or_grammar_declaration):
2081 Allow empty (";") declaration.
2082 (symbol_def): Remove empty actions; no longer needed.
2083 (rules_or_grammar_declaration): Remove trailing semicolon.
2084 (semi_colon.opt): Remove.
2085 * src/reader.h: Include location.h.
2086 (scanner_cursor): New decl.
2087 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
2089 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
2091 (STEP): Remove. No longer needed, now that adjust_location does
2092 the work. All uses removed.
2093 (scanner_cursor): New var.
2094 (adjust_location): Renamed from extend_location. It now sets
2095 *loc and adjusts the scanner cursor. All uses changed.
2096 Don't bother testing for CR.
2097 (handle_syncline): Remove location arg; now updates scanner cursor.
2098 All callers changed.
2099 (unexpected_end_of_file): Now accepts start boundary of token or
2100 comment, not location. All callers changed. Update scanner cursor,
2102 (SC_AFTER_IDENTIFIER): New state.
2103 (context_state): Renamed from c_context. All uses changed.
2104 (id_loc, code_start, token_start): New local vars.
2105 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
2106 processing of Yacc white space and equivalents here.
2107 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
2108 instead of returning ID immediately, since we need to search for
2110 (<INITIAL>"'", "\""): Save token_start.
2111 (<INITIAL>"%{", "{", "%%"): Save code_start.
2112 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
2113 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
2114 BEGIN context_state at end, not INITIAL.
2115 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
2116 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
2117 Return correct token start.
2118 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
2119 the start of a character, string or multiline comment is found.
2120 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
2121 Reduction): Adjust reported locations to match the more-precise
2122 results now expected.
2123 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
2124 * tests/reduce.at (Useless Rules, Reduced Automaton,
2125 Underivable Rules): Likewise.
2126 * tests/regression.at (Invalid inputs): No longer `expecting ";"
2127 or "|"' now that so many other tokens are allowed by the new grammar.
2129 * src/complain.h (current_file): Remove duplicate decl;
2130 current_file is now owned by files.h.
2131 * src/complain.c, src/scan-gram.l: Include files.h.
2133 2002-12-06 Paul Eggert <eggert@twinsun.com>
2135 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
2136 promotes to int; it might be unsigned int.
2137 * data/yacc.c (yy_reduce_print): Likewise.
2139 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
2140 be #defined in the prologue, not in the Bison declarations.
2141 This fixes Debian Bug 102878, reported by Shaul Karl.
2143 2002-12-02 Paul Eggert <eggert@twinsun.com>
2145 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
2146 * lib/strtoul.c: New file, from gnulib.
2147 This fixes a porting bug reported by Peter Klein in
2148 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
2150 2002-11-30 Paul Eggert <eggert@twinsun.com>
2152 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
2153 and put only a forward declaration in the prologue. This is for
2154 consistency with the other scanner helper functions.
2156 Type clashes now generate warnings, not errors, since it
2157 appears that POSIX may allow some grammars with type clashes.
2158 * src/reader.c (grammar_current_rule_check): Warn about
2159 type clashes instead of complaining.
2160 * tests/input.at (Type Clashes): Expect warnings, not complaints.
2162 Add Yacc library, since POSIX requires it.
2163 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
2164 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
2165 * lib/main.c, lib/yyerror.c: New files.
2167 gram_error can be static; it need not be extern.
2168 * src/reader.h (gram_error): Remove decl.
2169 * src/parse-gram.y (gram_error): Now static. Add static decl.
2170 (print_token_value): Omit parameter names from forward decl,
2173 2002-11-29 Paul Eggert <eggert@twinsun.com>
2175 * doc/bison.texinfo: Emphasize that yylex and yyerror must
2176 be declared before being used. E.g., one should typically
2177 declare them in the prologue. Use GNU coding style in examples.
2178 Put "const" consistently after the type it modifies. Mention
2179 that C99 supports "inline". Mention that yyerror traditionally
2182 %parse-param and %lex-param now take just one argument, the
2183 declaration; the argument name is deduced from the declaration.
2185 * doc/bison.texinfo (Parser Function, Pure Calling, Error
2186 Reporting, Table of Symbols): Document this.
2187 * src/parse-gram.y (add_param): New function.
2189 (declaration): Implement new rule for %parse-param and %lex-param.
2190 * src/scan-gram.l: "," now elicits a warning, rather than being
2191 a token; this is more compatible with byacc.
2192 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
2194 2002-11-27 Paul Eggert <eggert@twinsun.com>
2196 Rename identifiers to avoid real and potential collisions.
2198 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
2199 to avoid collision with lex macro described by Bruce Lilly in
2200 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
2201 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2202 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
2203 * src/parse-gram.y (print_token_value): Renamed from yyprint.
2205 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
2206 The name "yycontrol" violates the name space rules, and this stuff
2207 wasn't being used anyway.
2208 (input): Remove action; this stuff wasn't being used.
2209 (gram_error): Rename local variable yylloc -> loc.
2210 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
2211 (YY_DECL): Don't use "yy" at start of local variables.
2212 All uses changed, e.g., yylloc -> loc.
2213 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
2214 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
2215 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
2216 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
2218 * src/parse-gram.y (gram_error): loc is now const *.
2219 * src/reader.h (gram_error): Likewise.
2221 2002-11-24 Paul Eggert <eggert@twinsun.com>
2225 * tests/actions.at (Actions after errors): Use an output format
2226 more similar to that of the Printers and Destructors test.
2227 Test the position of the ';' token too.
2228 (Printers and Destructors): Likewise.
2229 (Printers and Destructors: %glr-parser): Remove for now, to avoid
2230 unnecessarily alarming people when the test fails.
2232 * data/yacc.c (yyerrlab1): Move this label down, so that the
2233 parser does not discard the lookahead token if the user code
2234 invokes YYERROR. This change is required for POSIX conformance.
2236 * lib/error.c: Sync with gnulib.
2238 2002-11-22 Paul Eggert <eggert@twinsun.com>
2240 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
2241 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
2242 * lib/xmalloc.c: Likewise.
2244 2002-11-20 Paul Eggert <eggert@twinsun.com>
2246 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
2248 2002-11-20 Paul Eggert <eggert@twinsun.com>
2250 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
2251 should use `if (! x) abort ();' rather than `assert (x);', and
2252 anyway it's one less thing to worry about configuring.
2254 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
2255 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
2256 and replace all instances of assert with abort.
2257 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2258 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
2260 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
2261 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
2262 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
2263 hash_find_entry, hash_rehash, hash_insert): Likewise.
2264 * src/conflicts.c (resolve_sr_conflict): Likewise.
2265 * src/lalr.c (set_goto_map, map_goto): Likewise.
2266 * src/nullable.c (nullable_compute): Likewise.
2267 * src/output.c (prepare_rules, token_definitions_output): Likewise.
2268 * src/reader.c (packgram, reader): Likewise.
2269 * src/state.c (state_new, state_free, state_transitions_set,
2270 state_reduction_find): Likewise.
2271 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
2272 symbol_pack): Likewise.
2273 * src/tables.c (conflict_row, pack_vector): Likewise.
2274 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
2275 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
2276 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
2277 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
2279 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
2280 (ARGMATCH_CONSTRAINT): New macro.
2281 (ARGMATCH_ASSERT): Use it.
2283 * src/system.h (verify): New macro.
2284 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
2286 * src/tables.c (tables_generate): Likewise.
2288 * src/struniq.c (struniq_assert): Now returns void, and aborts
2289 if the assertion is false.
2290 (struniq_assert_p): Remove.
2291 * src/struniq.h: Likewise.
2293 2002-11-18 Paul Eggert <eggert@twinsun.com>
2295 * data/glr.c (yygetLRActions): Replace `yyindex' with
2296 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
2297 This fixes the regression with Sun ONE Studio 7 cc that I reported in
2298 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
2300 2002-11-18 Akim Demaille <akim@epita.fr>
2302 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
2304 From Tim Van Holder.
2306 2002-11-17 Paul Eggert <eggert@twinsun.com>
2308 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
2309 to "SyntaxError" for consistency with my 2002-11-15 change.
2311 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
2312 not define to {}, since this breaks the common use of `YYDPRINTF
2313 ((...));' if a single statement is desired (e.g. before `else').
2314 Work around GCC warnings by surrounding corresponding calls with
2316 (yyhasResolvedValue): Remove unused function.
2317 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
2319 (yyreportSyntaxError): Renamed from yyreportParseError.
2320 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
2322 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
2323 extern when possible. Remove unused initializations.
2325 2002-11-16 Akim Demaille <akim@epita.fr>
2327 Augment the similarity between GLR and LALR traces.
2329 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
2330 (YY_REDUCE_PRINT): New.
2331 (yyparse): Use them.
2332 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
2334 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
2335 state reached after the reduction/recovery, since...
2336 (yyparse, yyprocessOneStack): Report the state we are entering in.
2338 2002-11-16 Akim Demaille <akim@epita.fr>
2340 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
2341 Add support for --trace=skeleton.
2342 * src/scan-skel.l: %option debug.
2343 Scan strings of non-@ or \n instead of character by character.
2344 (scan_skel): Handle trace_skeleton.
2346 (@output_parser_name@, @output_header_name@): ``Restore'' their
2347 support (used to be M4 macros).
2348 * data/yacc.c: Quote larger chunks, a la glr.c.
2349 * data/lalr1.cc: Likewise.
2350 The header guards are no longer available, so use some other
2351 string than `YYLSP_NEEDED'.
2353 2002-11-16 Akim Demaille <akim@epita.fr>
2355 Make the ``Printers and Destructors'' test more verbose, taking
2356 `yacc.c''s behavior as (possibly wrong) reference.
2358 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
2359 instead of fprint on stdout.
2360 Set and report the last_line of the symbols.
2361 Consistently display values and locations.
2363 2002-11-16 Paul Eggert <eggert@twinsun.com>
2365 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
2367 2002-11-15 Paul Eggert <eggert@twinsun.com>
2369 * tests/actions.at (Actions after errors): New test case.
2371 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
2372 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
2373 tests/action.at, tests/calc.at, tests/conflicts.at,
2374 tests/cxx-type.at, tests/regression.at:
2375 "parse error" -> "syntax error" for POSIX compatibility.
2376 "parsing stack overflow..." -> "parser stack overflow" so
2377 that code matches Bison documentation.
2379 2002-11-15 Akim Demaille <akim@epita.fr>
2381 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
2382 take two BRACED_CODE, not two string_content.
2383 Free the scanner's obstack when we are done.
2384 (code_content): New.
2385 * tests/calc.at: Adjust.
2386 * doc/bison.texinfo: Adjust.
2387 Also, make sure to include the `,' for these declarations.
2389 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
2391 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
2392 definition; avoids potential autoreconf problems.
2394 2002-11-15 Akim Demaille <akim@epita.fr>
2396 Always check the value returned by yyparse.
2398 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
2399 returned by yyparse.
2400 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
2402 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
2403 returned by yyparse.
2405 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2407 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
2410 2002-11-14 Paul Eggert <eggert@twinsun.com>
2412 * src/output.c (output_skeleton): Call xfopen instead of
2413 duplicating xfopen's body.
2415 Fix bugs reported by Nelson H. F. Beebe in
2416 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
2418 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
2419 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
2420 Group compiler. Instead, use "$CC -E bar.c". Include the .h
2421 file twice in the grammar, as an extra check.
2423 * tests/input.at (Torturing the Scanner): Surround the
2424 backslash-newline tests with "#if 0", to make it less likely that
2425 we'll run into compiler bugs. Bring back solitary \ inside
2426 comment, but add a closing comment to work around HP C bug. Don't
2427 test backslash-newline in C character constant.
2429 2002-11-14 Akim Demaille <akim@epita.fr>
2431 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
2432 status of the compiler.
2433 Calling `exit 1' is no longer needed.
2434 Reported by Nelson H. F. Beebe.
2436 2002-11-14 Akim Demaille <akim@epita.fr>
2438 * tests/atlocal.in (CPPFLAGS): We have config.h.
2439 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
2441 * tests/actions.at, tests/calc.at, tests/conflicts.at,
2442 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
2443 * tests/regression.at, tests/torture.at: Use them for all the
2444 grammars that are to be compiled.
2445 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
2446 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
2447 * doc/bison.texinfo (GLR Parsers): Document `inline'.
2449 2002-11-14 Akim Demaille <akim@epita.fr>
2451 * doc/bison.texinfo: Various formatting changes (alignments in
2452 samples, additional @group/@end group, GCS in samples.
2453 Use @deffn instead of simple @table to define the directives,
2454 macros, variables etc.
2456 2002-11-13 Paul Eggert <eggert@twinsun.com>
2458 Fix some bugs reported by Albert Chin-A-Young in
2459 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
2461 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
2462 -o c"; the HP C compiler chatters during compilation.
2463 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
2464 * tests/headers.at (export YYLTYPE): Likewise.
2466 * tests/input.at (Torturing the Scanner): Remove lines containing
2467 solitary backslashes, as they tickle a bug in the HP C compiler.
2469 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
2470 comments, since they're not portable. Use GNU coding style.
2472 2002-11-13 Akim Demaille <akim@epita.fr>
2474 * data/yacc.c: Leave bigger chunks of quoted text.
2475 (YYDSYMPRINTF): New.
2476 Use it to report symbol activities.
2477 * data/glr.c (YYDSYMPRINTF): New.
2480 2002-11-12 Paul Eggert <eggert@twinsun.com>
2484 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
2485 (yyglrReduce): Return yyok, not 0.
2486 This should avoid the enumerated-type warnings reported
2487 by Nelson H. F. Beebe in
2488 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
2490 * lib/bbitset.h (BITSET_INLINE): Remove.
2491 * lib/bitset.h [! BITSET_INLINE]: Remove.
2492 (bitset_set, bitset_reset, bitset_test): Rename local vars
2493 to avoid shadowing warnings by GCC.
2495 * data/glr.c (inline): Remove #define. It's the user's
2496 responsibility to #define it away, just like 'const'.
2497 This fixes one of the bugs reported by Nelson H. F. Beebe in
2498 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
2500 * Makefile.maint (po-check): Scan .l and .y files instead of the
2501 .c and the .h files that they generate. This fixes the bug
2502 reported by Tim Van Holder in:
2503 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
2504 Look for N_ as well as for _. Try to avoid matching #define for
2506 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
2507 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
2508 * src/scan-gram.l: Revamp regular expressions so that " and '
2509 do not confuse xgettext.
2511 * src/struniq.h (struniq_new): Do not declare the return type
2512 to be 'const'; this violates the C standard.
2513 * src/struniq.c (struniq_new): Likewise.
2515 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
2517 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
2518 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
2521 2002-11-12 Akim Demaille <akim@epita.fr>
2523 * Makefile.maint: Sync with Autoconf:
2524 (local_updates): New.
2526 2002-11-12 Akim Demaille <akim@epita.fr>
2528 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
2530 2002-11-12 Akim Demaille <akim@epita.fr>
2532 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
2535 2002-11-12 Akim Demaille <akim@epita.fr>
2537 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
2540 2002-11-12 Akim Demaille <akim@epita.fr>
2542 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
2543 Use it to test the GLR parser.
2545 2002-11-12 Akim Demaille <akim@epita.fr>
2547 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
2549 * data/glr.c (yystos): New.
2550 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
2552 (yyval): Don't define it, it is handled via M4.
2553 (yyrecoverParseError): Free verbosely the discarded symbols.
2554 * data/yacc.c (yysymprint): Remove, rather...
2555 (b4_yysymprint_generate): invoke.
2556 * data/c.m4 (b4_yysymprint_generate): New.
2557 Accept pointers as arguments, as opposed to the version from
2559 (b4_yydestruct_generate): Likewise.
2560 * tests/cations.at (Printers and Destructors): Use Bison directives
2561 instead of CPP macros.
2562 Don't rely on internal details.
2564 2002-11-12 Akim Demaille <akim@epita.fr>
2566 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
2567 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
2568 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
2569 it against YYEMPTY and so forth), work on yytoken (i.e., set
2570 it to YYEMPTY etc.).
2571 (yydestruct): Replace with a b4_yydestruct_generate invocation.
2572 (b4_symbol_actions): Remove.
2573 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
2574 for 0, end-of-input.
2576 2002-11-12 Akim Demaille <akim@epita.fr>
2578 * doc/bison.texinfo (Destructor Decl): New.
2580 2002-11-12 Akim Demaille <akim@epita.fr>
2582 * src/tables.c (tables_generate): Use free for pointers that
2583 cannot be NULL, not XFREE.
2584 (pack_vector): Use assert, not fatal, for bound violations.
2585 * src/state.c (state_new): Likewise.
2586 * src/reader.c (reader): Likewise.
2587 * src/lalr.c (set_goto_map): Likewise.
2588 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
2591 2002-11-12 Akim Demaille <akim@epita.fr>
2593 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2595 * src/scan-gram.l (last_string): Is global to the file, not to
2597 * src/parse-gram.y (input): Don't append the epilogue here,
2598 (epilogue.opt): do it here, and free the scanner's obstack.
2599 * src/reader.c (epilogue_set): Rename as...
2600 (epilogue_augment): this.
2601 * data/c.m4 (b4_epilogue): Defaults to empty.
2603 2002-11-12 Akim Demaille <akim@epita.fr>
2605 * src/getargs.c (long_options): Remove duplicates.
2606 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2608 * doc/bison.rnh: Remove.
2609 * doc/bison.texinfo (VMS Invocation): Remove.
2611 2002-11-12 Akim Demaille <akim@epita.fr>
2613 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2614 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2616 Use struniq for symbols.
2618 * src/symtab.h (symbol_t): The tag member is a struniq.
2619 (symbol_type_set): Adjust.
2620 * src/symtab.c (symbol_new): Takes a struniq.
2621 (symbol_free): Don't free the tag member.
2622 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2623 (hash_compare_symbol, hash_symbol): these.
2624 Use the fact that tags as struniqs.
2625 (symbol_get): Use struniq_new.
2626 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2628 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2629 and type members are struniqs.
2630 * src/reader.c (get_merge_function)
2631 (grammar_current_rule_merge_set): Adjust.
2632 (TYPE, current_type): Are struniq.
2634 Use struniq for file names.
2636 * src/files.h, src/files.c (infile): Split into...
2637 (grammar_file, current_file): these.
2638 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2639 * src/reduce.c (reduce_print): Likewise.
2640 * src/getargs.c (getargs): Likewise.
2641 * src/complain.h, src/complain.c: Likewise.
2642 * src/main.c (main): Call struniqs_new early enough to use it for
2644 Don't free the input file name.
2646 2002-11-12 Akim Demaille <akim@epita.fr>
2648 * src/symtab.c (symbol_free): Remove dead deactivated code:
2649 type_name are properly removed.
2650 Don't use XFREE to free items that cannot be NULL.
2651 * src/struniq.h, src/struniq.c: New.
2652 * src/main.c (main): Initialize/free struniqs.
2653 * src/parse-gram.y (%union): Add astruniq member.
2655 * src/scan-gram.l (<{tag}>): Return a struniq.
2656 Free the obstack bit that used to store it.
2657 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2659 2002-11-11 Paul Eggert <eggert@twinsun.com>
2661 Revamp to fix many (but not all) of the C- and M4-related quoting
2662 problems. Among other things, this fixes the Bison bug reported
2663 by Jan Hubicka when processing the Bash grammar; see:
2664 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
2666 Use new @ escapes consistently. Represent brackets with @{ and @}
2667 rather than @<:@ and @:>@, since this works a bit better with dumb
2668 editors like vi. Represent @ with @@, since @ is now consistently
2669 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2670 __ofile__, to avoid unexpected expansions. Similarly, use @output
2671 rather than #output.
2673 * data/c.m4 (b4_copyright): Omit file name from comment, since
2674 the file name could contain "*/".
2675 (b4_synclines_flag): Don't quote the 2nd argument; it should already
2676 be quoted. All uses changed.
2678 * data/glr.c: Use new @ escapes consistently.
2679 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
2680 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
2681 Remove, since they couldn't handle arbitrary characters in file
2683 * data/lalr1.cc: Likewise.
2684 * data/yacc.c: Likewise.
2686 * src/files.c (output_infix): Remove; all uses removed.
2687 * src/files.h: Likewise.
2689 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
2690 mishandled funny characters in file names, and anyway it isn't
2692 * data/yacc.c: Likewise.
2693 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
2695 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
2696 * data/yacc.c: Likewise.
2698 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
2700 (muscle_init): Quote filename as a C string.
2701 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
2702 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
2703 * src/output.c (escaped_file_name_output): New function.
2704 (prepare_symbols): Quote tokens for M4.
2705 (prepare): Don't insert output_infix, output_prefix,
2706 output_parser_name, output_header_name; this is now down by scan-skel.
2707 Insert skeleton as a C string.
2709 * src/output.c (user_actions_output, symbol_destructors_output,
2710 symbol_printers_output): Quote filenames for C and M4.
2711 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2713 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
2714 escapes other than \\ and \'; this simplifies the code.
2715 (<SC_STRING>): Likewise, for \\ and \".
2716 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
2717 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
2718 Use new escapes @{ and @} for [ and ].
2720 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
2721 them with auto vars.
2722 Switch to new escape scheme, where @ is the escape character uniformly.
2723 Abort if a stray escape character is found. Avoid unbounded input
2724 buffer when parsing non-escaped text.
2726 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
2727 __oline__, #output, $@, and @{ do not have unintended meanings.
2729 2002-11-09 Paul Eggert <eggert@twinsun.com>
2731 Fix the test failure due to GCC warnings described in
2732 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
2733 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
2734 evaluate to 0 if it's impossible for NINF to be in the respective
2736 (yygetLRActions, yyrecoverParseError): Use them.
2738 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
2739 counted in the token inserted at end of file. Now takes
2740 location_t *, not location_t, so that the location can be
2741 adjusted. All uses changed.
2743 * tests/regression.at (Invalid inputs): Adjust wording in
2744 diagnostic to match the new behavior.
2746 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
2747 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
2748 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
2749 abort ();'. This reduces the runtime of the "Many lookaheads"
2750 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
2753 2002-11-07 Paul Eggert <eggert@twinsun.com>
2755 * src/parse-gram.y (CHARACTER): Remove unused token.
2758 * src/scan-gram.l: Remove stack option. We no longer use the
2759 stack, since the stack was never deeper than 1; instead, use the
2760 new auto var c_context to record the stacked value.
2762 Remove nounput option. At an unexpected end of file, we now unput
2763 the minimal input necessary to end cleanly; this simplifies the
2766 Avoid unbounded token sizes where this is easy.
2768 (unexpected_end_of_file): New function.
2769 Use it to systematize the error message on unexpected EOF.
2770 (last-string): Now auto, not static.
2771 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
2772 (scanner_last_string_free): Remove; not used.
2773 (percent_percent_count): Move decl to just before use.
2774 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
2775 not the (never otherwised-used) CHARACTER.
2777 2002-11-07 Akim Demaille <akim@epita.fr>
2779 Let yyerror always receive the msg as last argument, so that
2780 yyerror can be variadic.
2782 * data/yacc.c (b4_yyerror_args): New.
2783 Use it when calling yyerror.
2784 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
2785 Use it when calling yyerror.
2786 * doc/bison.texinfo (Error Reporting): Adjust.
2787 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
2788 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
2790 2002-11-06 Akim Demaille <akim@epita.fr>
2792 #line should have quoted strings.
2793 Ideally, this should be done by m4_quotearg.
2795 * src/scan-skel.l: Include quotearg.h.
2797 * src/output.c (symbol_printers_output)
2798 (symbol_destructors_output): Quote the file name.
2800 2002-11-06 Akim Demaille <akim@epita.fr>
2802 * tests/regression.at (Invalid inputs): Adjust to the recent
2805 2002-11-06 Akim Demaille <akim@epita.fr>
2808 Reported by Jim Kent.
2810 * data/c.m4 (b4_syncline): New.
2811 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
2812 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
2813 * src/output.c (user_actions_output): Likewise.
2814 (prepare): Define 'b4_synclines_flag'.
2815 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
2817 2002-11-06 Akim Demaille <akim@epita.fr>
2819 * src/main.c (main): Free `infile'.
2820 * src/scan-gram.l (handle_syncline): New.
2822 * src/output.c (user_actions_output, symbol_destructors_output)
2823 (symbol_printers_output): Use the location's file name, not
2825 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2827 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2829 * src/tables.c (matching_state): Don't allow states to match if
2830 either has GLR conflict entries.
2832 2002-11-05 Paul Eggert <eggert@twinsun.com>
2834 * src/scan-gram.l: Use more accurate diagnostics, e.g.
2835 "integer out of range" rather than "invalid value".
2836 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
2839 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
2840 Also, remove one static variable in the scanner.
2842 * src/scan-gram.l (braces_level): Now auto, not static.
2843 Initialize to zero if the compiler is being picky.
2844 (INITIAL): Clear braces_level instead of incrementing it.
2845 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
2846 as POSIX 1003.1-2001 requires.
2847 * src/system.h (IF_LINT): New macro, taken from coreutils.
2848 * configure.ac: Define "lint" if --enable-gcc-warnings.
2850 2002-11-05 Akim Demaille <akim@epita.fr>
2852 * src/scan-gram.l: When it starts with `%', complain about the
2853 whole directive, not just that `invalid character: %'.
2855 2002-11-04 Akim Demaille <akim@epita.fr>
2857 * Makefile.maint: Update from Autoconf.
2858 (update, cvs-update, po-update, do-po-update): New.
2860 2002-11-04 Akim Demaille <akim@epita.fr>
2862 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
2864 Have yyerror `use' its arguments.
2865 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
2866 returns true when location & yacc & pure & parse-param.
2867 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
2869 2002-11-04 Akim Demaille <akim@epita.fr>
2871 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
2873 * src/scan-gram.l: Use [\'] instead of ['] to pacify
2876 Use quote, not quote_n since LOCATION_PRINT no longer uses the
2879 2002-11-03 Paul Eggert <eggert@twinsun.com>
2881 * src/reader.c (get_merge_function, grammar_current_rule_check):
2882 Use consistent diagnostics for reporting type name clashes.
2883 Quote the types with <>, for consistency with Yacc.
2884 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
2886 2002-11-03 Akim Demaille <akim@epita.fr>
2888 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
2890 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
2891 (b4_parse_param): Remove.
2892 Use b4_identification.
2893 Propagate b4_pure_args where needed to pass them to yyerror.
2894 * data/glr.m4 (b4_parse_param): Remove.
2895 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
2896 (b4_lpure_formals): New.
2897 Use b4_identification.
2898 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
2899 b4_user_formals and b4_user_args.
2900 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
2901 (yyreportAmbiguity): When using a pure parser, also need
2902 the location, and the parse-params.
2904 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
2905 When using a pure parser, also need the parse-params.
2907 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
2908 (%pure-parser + %parse-param) LALR and GLR parsers.
2909 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
2910 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
2911 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
2912 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
2913 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
2914 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
2915 * doc/bison.texinfo: Untabify the whole file.
2916 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
2917 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
2918 (Error Reporting): Adjust to these new directives.
2919 Document %error-verbose, deprecate YYERROR_VERBOSE.
2921 2002-11-03 Akim Demaille <akim@epita.fr>
2923 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
2924 AT_CHECK_CALC_GLR invocations to use % directives, instead of
2925 command line options.
2926 * tests/cxx-type.at: Formatting changes.
2928 2002-11-03 Paul Eggert <eggert@twinsun.com>
2930 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
2931 to count columns correctly, and to check for invalid inputs.
2933 Use mbsnwidth to count columns correctly. Account for tabs, too.
2935 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
2936 (extend_location): New function.
2939 Handle CRLF in C code rather than in Lex code.
2940 (YY_INPUT): New macro.
2941 (no_cr_read): New function.
2943 Scan UCNs, even though we don't fully handle them yet.
2944 (convert_ucn_to_byte): New function.
2946 Handle backslash-newline correctly in C code.
2947 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
2948 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
2950 (tag, splice): New EREs. Do not allow NUL or newline in tags.
2951 Use {splice} wherever C allows backslash-newline.
2952 YY_STEP after space, newline, vertical-tab.
2953 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
2955 (letter, id): Don't assume ASCII; e.g., spell out a-z.
2957 ({int}, handle_action_dollar, handle_action_at): Check for integer
2960 (YY_STEP): Omit trailing semicolon, so that it's more like C.
2962 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
2963 as well as \000. Check for UCHAR_MAX, not 255.
2964 Allow \x with an arbitrary positive number of digits, as in C.
2965 Check for overflow here.
2966 Allow \? and UCNs, for compatibility with C.
2968 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
2969 with quote slot used by complain_at.
2971 * tests/input.at: Add tests for backslash-newline, m4 quotes
2972 in symbols, long literals, and funny escapes in strings.
2974 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
2975 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
2976 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
2977 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
2978 * m4/mbswidth.m4: New file, from GNU coreutils.
2980 * doc/bison.texinfo (Grammar Outline): Document // comments.
2981 (Symbols): Document that trigraphs have no special meaning in Bison,
2982 nor is backslash-newline allowed.
2983 (Actions): Document that trigraphs have no special meaning.
2985 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
2988 2002-11-02 Paul Eggert <eggert@twinsun.com>
2990 * src/reader.c: Don't include quote.h; not needed.
2991 (get_merge_function): Reword warning to be consistent with
2992 type clash diagnostic in grammar_current_rule_check.
2994 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
2995 bug in trigraph handling.
2997 * src/output.c (prepare_symbols): When printing token names,
2998 escape "[" as "@<:@" and likewise for "]".
3000 * src/system.h (errno): Remove declaration, as we are now
3001 assuming C89 or better, and C89 guarantees errno.
3003 2002-10-30 Paul Eggert <eggert@twinsun.com>
3005 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
3006 Check for close failures.
3007 * src/files.h (xfclose): Return void, not int, since it always
3009 * src/files.c (xfclose): Likewise. Report I/O error if ferror
3011 * src/output.c (output_skeleton): Use xfclose rather than fclose
3012 and ferror. xfclose now checks ferror.
3014 * data/glr.c (YYLEFTMOST_STATE): Remove.
3015 (yyreportTree): Use a stack-based leftmost state. This avoids
3016 our continuing battles with bogus warnings about initializers.
3018 2002-10-30 Akim Demaille <akim@epita.fr>
3020 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
3023 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3025 * tests/glr-regr1.at: New test for reported regressions.
3026 * tests/testsuite.at: Add glr-regr1.at test.
3027 * tests/Makefile.am: Add glr-regr1.at test.
3029 2002-10-24 Paul Eggert <eggert@twinsun.com>
3033 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
3034 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
3035 we use malloc. Don't assume 'A' through 'Z' are contiguous.
3036 Don't assume strdup exists; POSIX says its an XSI extension.
3037 Check for buffer overflow on input.
3039 2002-10-24 Akim Demaille <akim@epita.fr>
3041 * src/output.c (output_skeleton): Don't disable M4sugar comments
3042 too soon: it results in comments being expanded.
3043 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
3046 2002-10-24 Akim Demaille <akim@epita.fr>
3048 * data/yacc.c (m4_int_type): New.
3049 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
3050 char' as only yacc.c wants K&R portability.
3051 * data/glr.c (yysigned_char): Remove.
3052 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
3053 Reported by Quoc Peyrot.
3055 2002-10-23 Paul Eggert <eggert@twinsun.com>
3057 * src/main.c (main): With --trace=time, report times even if a
3058 non-fatal error occurs. Formerly, the times were reported in some
3059 such cases but not in others.
3060 * src/reader.c (reader): Just return if a complaint has been issued,
3061 instead of exiting, so that 'main' can report times.
3063 2002-10-22 Akim Demaille <akim@epita.fr>
3065 * src/system.h: Include sys/types.
3066 Reported by Bert Deknuydt.
3068 2002-10-23 Paul Eggert <eggert@twinsun.com>
3070 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
3071 Suggested by Art Haas.
3073 2002-10-22 Paul Eggert <eggert@twinsun.com>
3075 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
3076 decl; not needed any more.
3077 * src/main.c (main): Use return to exit, undoing yesterday's change.
3078 The last OS that we could find where this wouldn't work is
3079 SunOS 3.5, and that's too old to worry about now.
3081 * data/glr.c (struct yyltype): Define members even when not
3082 doing locations. This is more consistent with yacc.c, and it
3083 works around the following bug reports:
3084 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
3085 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
3087 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
3088 @acronym consistently. Standardize on "Yacc" instead of "YACC",
3089 "Algol" instead of "ALGOL". Give a bit more history about BNF.
3091 2002-10-22 Akim Demaille <akim@epita.fr>
3095 2002-10-21 Paul Eggert <eggert@twinsun.com>
3097 Be consistent about 'bool'; the old code used an enum in one
3098 module and an int in another, and this violates the C standard.
3099 * m4/stdbool.m4: New file, from coreutils 4.5.3.
3100 * configure.ac (AC_HEADER_STDBOOL): Add.
3101 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
3102 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
3103 * src/symtab.c (hash_compare_symbol_t): Likewise.
3104 * src/system.h (bool, false, true): Use a definition consistent
3105 with ../lib/hash.c. All uses changed.
3107 * src/complain.c (warning_issued): Renamed from warn_message_count,
3108 so that we needn't worry about integer overflow (!).
3109 Now of type bool. All uses changed.
3110 (complaint_issued): Renamed from complain_message_count; likewise.
3112 * src/main.c (main): Use exit to exit with failure.
3114 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
3115 rather than 1 and 0.
3116 * src/main.c (main): Likewise.
3117 * src/getargs.c (getargs): Likewise.
3118 * src/reader.c (reader): Likewise.
3120 * src/getarg.c (getargs): Remove duplicate code for
3121 "Try `bison --help'".
3123 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
3124 What was that "2" for?
3126 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
3127 * src/getargs.c (usage): Likewise.
3129 * src/getargs.c (getargs): When there are too few operands, report
3130 the last one. When there are too many, report the first extra
3131 one. This is how diffutils does it.
3133 2002-10-20 Paul Eggert <eggert@twinsun.com>
3135 Remove K&R vestiges.
3136 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
3137 * src/complain.c (VA_START): Remove. Assume prototypes.
3138 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
3139 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
3140 fatal): Assume prototypes.
3141 * src/complain.h: Assume prototypes.
3142 * src/system.h (PARAMS): Remove.
3143 Include <limits.h> unconditionally, since it's guaranteeed even
3144 for a freestanding C89 compiler.
3145 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
3146 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
3148 2002-10-20 Akim Demaille <akim@epita.fr>
3150 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
3151 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
3152 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
3153 (yyresolveStates, yyresolveAction, yyresolveStack)
3154 (yyprocessOneStack): Use them.
3155 (yy_reduce_print): New.
3156 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
3158 2002-10-20 Akim Demaille <akim@epita.fr>
3160 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
3161 arguments and output `void'.
3162 (b4_c_function): Rename as...
3163 (b4_c_function_def): this.
3164 (b4_c_function_decl, b4_c_ansi_function_def)
3165 (b4_c_ansi_function_decl): New.
3166 Change the interpretation of the arguments: before `int, foo', now
3168 * data/yacc.c (yyparse): Prototype and define thanks to these.
3169 Adjust b4_c_function_def uses.
3170 * data/glr.c (yyparse): Likewise, but ANSI only.
3172 2002-10-20 Akim Demaille <akim@epita.fr>
3174 * src/output.c (prepare): Move the definition of `tokens_number',
3175 `nterms_number', `undef_token_number', `user_token_number_max'
3177 (prepare_tokens): Here.
3178 (prepare_tokens): Rename as...
3179 (prepare_symbols): this.
3180 (prepare): Move the definition of `rules_number' to...
3181 (prepare_rules): here.
3182 (prepare): Move the definition of `last', `final_state_number',
3183 `states_number' to...
3184 (prepare_states): here.
3185 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
3187 2002-10-20 Akim Demaille <akim@epita.fr>
3189 * src/tables.h, src/tables.c, src/output.c: Comment changes.
3191 2002-10-20 Akim Demaille <akim@epita.fr>
3193 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
3196 2002-10-20 Akim Demaille <akim@epita.fr>
3198 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
3199 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
3201 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
3203 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
3204 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
3207 2002-10-19 Paul Eggert <eggert@twinsun.com>
3209 Do not create a temporary file, as that involves security and
3210 cleanup headaches. Instead, use a pair of pipes.
3211 Derived from a suggestion by Florian Krohm.
3212 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
3213 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
3214 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
3215 (BISON_PREREQ_SUBPIPE): Add.
3216 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
3217 Add subpipe.h, subpipe.c.
3218 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
3219 * po/POTFILES.in: Add lib/subpipe.c.
3220 * src/output.c: Include "subpipe.h".
3221 (m4_invoke): Remove decl.
3222 (scan_skel): New decl.
3223 (output_skeleton): Use pipe rather than temporary file for m4 input.
3224 Check that m4sugar.m4 is readable, to avoid deadlock.
3225 Check for pipe I/O error.
3226 * src/scan-skel.l (readpipe): Remove decl.
3227 (scan_skel): New function, to be used in place of m4_invoke.
3228 Read from stream rather than file.
3230 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
3231 float, as this generates a warning on Solaris 8 + GCC 3.2 with
3232 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
3233 this generates a more-accurate value anyway.
3235 * lib/timevar.c (timervar_accumulate): Rename locals to
3236 avoid confusion with similarly-named more-global.
3237 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
3239 * src/output.c (prepare): Use xstrdup to convert char const *
3240 to char *, to avoid GCC warning.
3242 2002-10-19 Akim Demaille <akim@epita.fr>
3244 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
3245 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
3246 Use them to have `calc.y' ready for %pure-parser.
3247 * data/yacc.c (YYLEX): Pass a yylex return type to
3250 2002-10-19 Akim Demaille <akim@epita.fr>
3252 Prototype support of %lex-param and %parse-param.
3254 * src/parse-gram.y: Add the definition of the %lex-param and
3255 %parse-param tokens, plus their rules.
3256 Drop the `_' version of %glr-parser.
3258 * src/scan-gram.l (INITIAL): Scan them.
3259 * src/muscle_tab.c: Comment changes.
3260 (muscle_insert, muscle_find): Rename `pair' as `probe'.
3261 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
3262 (muscle_entry_s): The `value' member is no longer const.
3263 Adjust all dependencies.
3264 * src/muscle_tab.c (muscle_init): Adjust: use
3265 MUSCLE_INSERT_STRING.
3266 Initialize the obstack earlier.
3267 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
3268 (muscle_pair_list_grow): New.
3269 * data/c.m4 (b4_c_function_call, b4_c_args): New.
3270 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
3271 * tests/calc.at: Use %locations, not --locations.
3272 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
3274 2002-10-19 Akim Demaille <akim@epita.fr>
3276 * src/getargs.c (usage): Take status as argument and exit
3278 Report the traditional `Try ... --help' message when status != 0.
3279 (usage, version): Don't take a FILE * as arg, it is pointless.
3280 (getargs): When there is an incorrect number of arguments, make it
3281 an error, and report it GNUlically thanks to `usage ()'.
3283 2002-10-18 Paul Eggert <eggert@twinsun.com>
3285 * data/glr.c (yyreportParseError): Don't assume that sprintf
3286 yields the length of the printed string, as this is not true
3287 on SunOS 4.1.4. Reported by Peter Klein.
3289 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
3290 * tests/conflicts.at (%nonassoc and eof): Likewise.
3291 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
3293 2002-10-17 Akim Demaille <akim@epita.fr>
3295 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
3296 * src/getargs.c (trace_types, trace_args): Adjust.
3297 * src/reader.c (grammar_current_rule_prec_set)
3298 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
3299 Standardize error messages.
3301 (reader): Use trace_flag to enable scanner/parser debugging,
3302 instead of an adhoc scheme.
3303 * src/scan-gram.l: Remove trailing debugging code.
3305 2002-10-16 Paul Eggert <eggert@twinsun.com>
3307 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
3310 * NEWS: Officially drop support for building Bison with K&R C,
3311 since it didn't work anyway and it's not worth worrying about.
3312 * Makefile.maint (wget_files): Remove ansi2knr.c.
3313 (ansi2knr.c-url_prefix): Remove.
3314 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
3315 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3316 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3318 2002-10-15 Paul Eggert <eggert@twinsun.com>
3320 Stop using the "enum_" trick for K&R-style function definitions;
3321 it confused me, and I was the author! Instead, assume that people
3322 who want to use K&R C compilers (when using these modules in GCC,
3323 perhaps?) will run ansi2knr.
3325 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
3326 All uses of "enum_" changed to "enum ".
3327 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3328 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3330 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
3331 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
3332 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
3333 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
3334 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
3335 abitset_not, abitset_ones, abitset_or, abitset_or_and,
3336 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
3337 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
3338 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
3339 Use function prototypes; this removes the need for declaring
3340 static functions simply to provide their prototypes.
3341 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
3342 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
3343 bitset_count_, bitset_create, bitset_dump, bitset_first,
3344 bitset_free, bitset_init, bitset_last, bitset_next,
3345 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
3346 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
3347 bitset_print, bitset_release_memory, bitset_toggle_,
3348 bitset_type_choose, bitset_type_get, bitset_type_name_get,
3349 debug_bitset): Likewise.
3350 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
3351 * lib/bitset_stats.c (bitset_log_histogram_print,
3352 bitset_percent_histogram_print, bitset_stats_and,
3353 bitset_stats_and_cmp, bitset_stats_and_or,
3354 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
3355 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
3356 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
3357 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
3358 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
3359 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
3360 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
3361 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
3362 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
3363 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
3364 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
3365 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
3366 bitset_stats_zero): Likewise.
3367 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3368 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3369 bitsetv_dump, debug_bitsetv): Likewise.
3370 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
3371 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
3372 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
3373 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
3374 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
3375 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
3376 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
3377 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
3378 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
3379 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
3380 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
3382 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
3383 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
3384 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
3385 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
3386 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
3387 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
3388 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
3389 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
3390 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
3391 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
3392 lbitset_xor_cmp, lbitset_zero): Likewise.
3394 2002-10-14 Akim Demaille <akim@epita.fr>
3398 2002-10-14 Akim Demaille <akim@epita.fr>
3400 * tests/Makefile.am (maintainer-check-posix): New.
3402 2002-10-14 Akim Demaille <akim@epita.fr>
3404 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
3407 2002-10-14 Akim Demaille <akim@epita.fr>
3409 * src/tables.c (table_ninf_remap): base -> tab.
3410 Reported by Matt Rosing.
3412 2002-10-14 Paul Eggert <eggert@twinsun.com>
3414 * tests/action.at, tests/calc.at, tests/conflicts.at,
3415 tests/cxx-type.at, tests/headers.at, tests/input.at,
3416 tests/regression.at, tests/synclines.at, tests/torture.at:
3417 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
3418 so that the tests still work even if POSIXLY_CORRECT is set.
3419 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
3421 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
3422 for portability to K&R hosts. Fix typo: signed char is guaranteed
3423 only to 127, not to 128.
3424 * data/glr.c (yysigned_char): New type.
3425 * data/yacc.c (yysigned_char): Likewise.
3426 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
3428 2002-10-13 Paul Eggert <eggert@twinsun.com>
3430 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
3431 true due to limited range of data type" warning from GCC.
3433 * data/c.m4 (b4_token_defines): Protect against double-inclusion
3434 by wrapping enum yytokentype's definition inside #ifndef
3435 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
3437 2002-10-13 Akim Demaille <akim@epita.fr>
3439 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
3440 Un yy- yyrhs to avoid the name clash with the global YYRHS.
3442 2002-10-13 Akim Demaille <akim@epita.fr>
3444 * Makefile.maint: Update from Autoconf 2.54.
3445 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
3447 2002-10-13 Akim Demaille <akim@epita.fr>
3449 * src/print.c (print_state): Separate the list of solved conflicts
3450 from the other items.
3451 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
3453 2002-10-13 Akim Demaille <akim@epita.fr>
3455 Let nondeterministic skeletons be usable with deterministic
3458 With the patch, GAWK compiled by GCC without -O2 passes its test
3459 suite using a GLR parser driven by LALR tables. It fails with -O2
3460 because `struct stat' gives two different answers on my machine:
3461 88 (definition of an auto var) and later 96 (memset on this var).
3462 Hence the stack is badly corrumpted. The headers inclusion is to
3463 blame: if I move the awk.h inclusion before GLR's system header
3464 inclusion, the two struct stat have the same size.
3466 * src/tables.c (pack_table): Always create conflict_table.
3467 (token_actions): Always create conflict_list.
3468 * data/glr.c (YYFLAG): Remove, unused.
3470 2002-10-13 Akim Demaille <akim@epita.fr>
3472 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
3474 (VALGRIND, GXX): New.
3475 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
3476 * tests/bison.in: Run $PREBISON a pre-command.
3477 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
3478 (maintainer-check-g++): New.
3479 * Makefile.am (maintainer-check): New.
3481 2002-10-13 Akim Demaille <akim@epita.fr>
3483 * data/glr.c: Formatting changes.
3484 Tweak some trace messages to match yacc.c's.
3486 2002-10-13 Akim Demaille <akim@epita.fr>
3488 GLR parsers sometimes raise parse errors instead of performing the
3490 Reported by Charles-Henry de Boysson.
3492 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
3493 check the length of the traces when %glr.
3494 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
3496 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
3498 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
3499 (yyltype): Remove the yy prefix from the member names.
3500 (yytable): Complete its comment.
3501 (yygetLRActions): Map error action number from YYTABLE from
3503 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
3504 (which was a bug: it should have been YYTABEL_NINF, and yet it was
3505 not satisfying as we could compare an YYACTION computed from
3506 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
3507 only value for error actions.
3508 (yyreportParseError): In verbose parse error messages, don't issue
3509 `error' in the list of expected tokens.
3510 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
3511 next action to perform to match glr.c's decoding.
3512 (yytable): Complete its comment.
3514 2002-10-13 Paul Eggert <eggert@twinsun.com>
3516 Fix problem reported by Henrik Grubbstroem in
3517 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
3518 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
3519 because the Bison parser reads the second action before reducing
3521 * src/scan-gram.l (rule_length): New static var.
3522 Use it to keep track of the rule length in the scanner, since
3523 we can't expect the parser to be in lock-step sync with the scanner.
3524 (handle_action_dollar, handle_action_at): Use this var.
3525 * tests/actions.at (Exotic Dollars): Test for the problem.
3527 2002-10-12 Paul Eggert <eggert@twinsun.com>
3529 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
3530 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
3531 Include <sys/time.h> when checking for clock_t and struct tms.
3532 Use same include order as source.
3533 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
3534 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
3536 * lib/timevar.c: Update copyright date and clarify comments.
3537 (get_time) [IN_GCC]: Keep the GCC version for reference.
3539 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
3540 GCC version as of today, then merge Bison's changes.
3541 Change "GCC" to "Bison" in copyright notice. timevar.def's
3542 author is Akim, so change that too.
3544 * src/reader.c (grammar_current_rule_check):
3545 Don't worry about the default action if $$ is untyped.
3546 Prevents bogus warnings reported by Jim Gifford in
3547 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
3549 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
3550 * data/glr.c, data/lalr1.cc, data/yacc.c:
3551 Output token definitions before the first part of user declarations.
3552 Fixes compatibility problem reported by Jim Gifford for kbd in
3553 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
3555 2002-10-11 Paul Eggert <eggert@twinsun.com>
3557 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
3558 (yyparse): here. This undoes some of the 2002-07-25 change.
3559 Compatibility problem reported by Ralf S. Engelschall with
3560 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
3562 2002-10-11 Akim Demaille <akim@epita.fr>
3564 * tests/regression.at Characters Escapes): New.
3565 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
3567 Reported by Jan Nieuwenhuizen.
3569 2002-10-11 Akim Demaille <akim@epita.fr>
3573 2002-10-10 Paul Eggert <eggert@twinsun.com>
3575 Portability fixes for bitsets; this also avoids several GCC
3578 * lib/abitset.c: Include <stddef.h>, for offsetof.
3579 * lib/lbitset.c: Likewise.
3581 * lib/abitset.c (abitset_bytes): Return a size that is aligned
3582 properly for vectors of objects. Do not assume that adding a
3583 header size to a multiple of a word size yields a value that is
3584 properly aligned for the whole union.
3585 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3587 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3588 unique names for structures.
3589 * lib/ebitset.c (ebitset_bytes): Likewise.
3590 * lib/lbitset.c (lbitset_bytes): Likewise.
3592 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3593 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3594 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3595 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3596 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3597 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3598 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3599 to improve the type-checking that GCC can do.
3600 * lib/bitset.c (bitset_op4_cmp): Likewise.
3601 * lib/bitset_stats.c (bitset_stats_count,
3602 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3603 bitset_stats_copy, bitset_stats_disjoint_p,
3604 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3605 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3606 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3607 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3608 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3609 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3610 bitset_stats_or_and_cmp): Likewise.
3611 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3612 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3613 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3614 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3616 * lib/abitset.h: Include bitset.h, not bbitset.h.
3617 * lib/ebitset.h: Likewise.
3618 * lib/lbitset.h: Likewise.
3620 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3621 All instances of parameters of type enum bitset_opts are now of
3622 type enum_bitset_opts, to conform to the C Standard, and similarly
3623 for enum_bitset_type.
3624 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3625 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3627 Do not use "struct bitset_struct" to mean different things in
3628 different modules. Not only is this confusing, it violates
3629 the C Standard, which requires that structure types in different
3630 modules must be compatible if one is to be passed to the other.
3631 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3632 All instances of "struct bitset_struct *" replaced with "bitset".
3633 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3634 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3635 struct lbitset_struct, struct bitset_stats_struct): New types.
3636 All uses of struct bitset_struct changed to union bitset_union,
3638 * lib/abitset.c (struct abitset_struct, abitset,
3639 struct bitset_struct): Remove.
3640 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3641 struct bitset_struct): Remove.
3642 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3643 bitset_struct): Remove.
3644 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3647 Do not call a function of type T using a call that assumes the
3648 function is of a different type U. Standard C requires that a
3649 function must be called with a type that is compatible with its
3651 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3653 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3655 * lib/ebitset.c (PFV): Remove.
3656 * lib/lbitset.c (PFV): Likewise.
3657 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3658 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3660 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3661 (ebitset_vtable): Use them.
3662 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3663 lbitset_xor): New functions.
3664 (lbitset_vtable): Use them.
3666 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3669 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3671 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
3672 Use offsetof, for simplicity.
3674 2002-10-06 Paul Eggert <eggert@twinsun.com>
3676 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
3677 the same width as int. This reapplies a hunk of the 2002-08-12 patch
3678 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
3679 which was inadvertently undone by the 2002-09-30 patch.
3680 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
3681 the same width as int.
3683 2002-10-04 Paul Eggert <eggert@twinsun.com>
3687 * configure.ac (AC_INIT), NEWS: Increment version number.
3689 * doc/bison.texinfo: Minor spelling, grammar, and white space
3691 (Symbols): Mention that any negative value returned from yylex
3692 signifies end-of-input. Warn about negative chars. Mention
3693 the portable Standard C character set.
3695 The GNU coding standard says CFLAGS and YFLAGS are reserved
3696 for the installer to set.
3697 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
3698 * src/Makefile.am (AM_CFLAGS): Likewise.
3699 (AM_YFLAGS): Renamed from YFLAGS.
3701 Fix some MAX and MIN problems.
3702 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
3703 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
3704 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
3705 * src/reader.c (reader): Use it.
3707 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
3708 POSIX 1003.1-2001 has removed fgrep.
3710 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3712 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
3713 interpreted as signed.
3714 * lib/ebitset.c (ebitset_list): Fix bug.
3716 2002-10-01 Paul Eggert <eggert@twinsun.com>
3718 More fixes for 64-bit hosts and large bitsets.
3720 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
3721 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
3722 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
3723 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
3724 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
3725 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
3726 bitset_count_): Likewise.
3727 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
3728 bitset_first, bitset_last): Likewise.
3729 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
3730 bitset_stats_list_reverse, bitset_stats_size,
3731 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
3733 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3734 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3735 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3736 bitsetv_reflexive_transitive_closure): Likewise.
3737 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
3738 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
3740 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
3743 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
3744 Use size_t, not unsigned int, to count bytes.
3745 * lib/abitset.h (abitset_bytes): Likewise.
3746 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
3748 * lib/bitset.h (bitset_bytes): Likewise.
3749 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
3750 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
3751 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3752 * lib/ebitset.c (ebitset_bytes): Likewise.
3753 * lib/ebitset.h (ebitset_bytes): Likewise.
3754 * lib/lbitset.c (lbitset_bytes): Likewise.
3755 * lib/lbitset.h (lbitset_bytes): Likewise.
3757 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
3758 abitset_subset_p, abitset_disjoint_p, abitset_and,
3759 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
3760 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
3761 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
3762 abitset_or_and, abitset_or_and_cmp):
3763 Use bitset_windex instead of unsigned int.
3764 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3765 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
3766 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
3767 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
3769 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
3771 * lib/bitset.c (bitset_print):
3772 Use proper printf formats for widths of integer types.
3773 * lib/bitset_stats.c (bitset_percent_histogram_print,
3774 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
3775 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3776 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3777 * lib/lbitset.c (lbitset_bytes): Likewise.
3779 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
3780 BITSET_SIZE_MAX): New macros.
3781 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
3782 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
3783 to BITSET_WINDEX_MAX.
3785 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
3786 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
3787 since we now return the bitset_bindex type (not int).
3789 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
3790 when computing sizes.
3791 * lib/ebitset.c (ebitset_elts_grow): Likewise.
3793 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
3794 and avoid cast to unsigned.
3796 2002-09-30 Akim Demaille <akim@epita.fr>
3798 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3799 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
3800 Updates from Michael Hayes.
3802 2002-09-30 Art Haas <ahaas@neosoft.com>
3804 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
3806 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
3809 2002-09-27 Akim Demaille <akim@epita.fr>
3813 2002-09-27 Akim Demaille <akim@epita.fr>
3815 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
3816 (Because of AC_LIBSOURCE).
3818 2002-09-27 Akim Demaille <akim@epita.fr>
3820 Playing with Autoscan.
3822 * configure.ac: Remove the old LIBOBJ tweaks.
3823 (AC_REPLACE_FUNCS): Add strrchr and strtol.
3824 * lib/strrchr.c: New.
3825 * lib/strtol.c: New, from the Coreutils 4.5.1.
3827 2002-09-27 Akim Demaille <akim@epita.fr>
3829 Playing with Autoscan.
3831 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
3832 * lib/Makefile.am (libbison_a_SOURCES): No longer include
3833 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
3834 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
3837 2002-09-24 Akim Demaille <akim@epita.fr>
3839 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
3840 (Frequently Asked Questions, Parser Stack Overflow): New.
3842 2002-09-13 Akim Demaille <akim@epita.fr>
3844 Playing with autoscan.
3846 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
3847 * src/files.c (skeleton_find): Remove, unused.
3848 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
3849 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
3851 2002-09-13 Akim Demaille <akim@epita.fr>
3853 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
3854 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
3856 2002-09-13 Akim Demaille <akim@epita.fr>
3858 * configure.ac: Require 2.54.
3859 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
3860 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
3861 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
3862 Remove, provided by Autoconf macros.
3864 2002-09-12 Akim Demaille <akim@epita.fr>
3866 * m4/prereq.m4: Update, from Coreutils 4.5.1.
3868 2002-09-12 Akim Demaille <akim@epita.fr>
3870 * m4/prereq.m4: Update, from Fileutils 4.1.5.
3871 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
3872 Reported by Martin Mokrejs.
3874 2002-09-10 Akim Demaille <akim@epita.fr>
3876 * src/parse-gram.y: Associate a human readable string to each
3878 * tests/regression.at (Invalid inputs): Adjust.
3880 2002-09-10 Gary V. Vaughan <gary@gnu.org>
3882 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
3883 with an Autoconf-2.5x style configure.ac.
3885 2002-09-06 Paul Eggert <eggert@twinsun.com>
3887 * doc/bison.texinfo (Conditions): Make explicit that the GPL
3888 exception applies only to yacc.c. This is a modification of a
3889 patch originally suggested by Akim Demaille.
3891 2002-09-06 Akim Demaille <akim@epita.fr>
3893 * data/c.m4 (b4_copyright): Move the GPL exception comment from
3895 * data/yacc.c: here.
3897 * data/lalr1.cc (struct yyltype): Don't define it, since we use
3899 (b4_ltype): Default to yy::Location from location.hh.
3901 2002-09-04 Jim Meyering <jim@meyering.net>
3903 * data/yacc.c: Guard the declaration of yytoknum also with
3904 `#ifdef YYPRINT', so it is declared only when used.
3906 2002-09-04 Akim Demaille <akim@epita.fr>
3908 * configure.in: Rename as...
3909 * configure.ac: this.
3912 2002-09-04 Akim Demaille <akim@epita.fr>
3914 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
3915 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
3916 translate maintainer only messages.
3918 2002-08-12 Paul Eggert <eggert@twinsun.com>
3922 * Makefile.am (SUBDIRS): Remove intl.
3923 (DISTCLEANFILES): Remove.
3924 * NEWS: Mention that GNU M4 is now required. Clarify what is
3925 meant by "larger grammars". Mention the pt_BR translation.
3926 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
3927 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
3928 Bump version from 0.11.2 to 0.11.5.
3929 (BISON_PREREQ_STAGE): Remove.
3930 (AM_GNU_GETTEXT): Use external gettext.
3931 (AC_OUTPUT): Remove intl/Makefile.
3933 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
3935 * data/glr.c: Include string.h, for strlen.
3936 (yyreportParseError): Use size_t for yysize.
3937 (yy_yypstack): No longer nested inside yypstates, as nested
3938 functions are not portable. Do not assume size_t is the
3940 (yypstates): Do not assume that ptrdiff_t is the same width
3941 as int, and similarly for yyposn and YYINDEX.
3943 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
3945 * lib/Makefile.am (INCLUDES): Do not include from the intl
3946 directory, which has been removed.
3947 * src/Makefile.am (INCLUDES): Likewise.
3949 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
3950 (bitsets_sources, additional_bitsets_sources, timevars_sources):
3953 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
3954 * tests/Makefile.am (EXTRA_DIST): Likewise.
3956 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
3957 Do not assume that bitset_windex is the same width as unsigned.
3959 * lib/abitset.c (abitset_unused_clear): Do not assume that
3960 bitset_word is the same width as int.
3961 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
3962 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
3963 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
3964 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
3965 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
3967 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
3968 portability to one's complement hosts!).
3969 * lib/ebitset.c (ebitset_op1): Likewise.
3970 * lib/lbitset.c (lbitset_op1): Likewise.
3972 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
3973 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3974 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
3975 Sync with fileutils.
3976 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
3977 lib/gettext.h: Sync with diffutils.
3979 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
3980 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
3982 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
3983 PROTOTYPES to check for prototypes, and "defined __STDC__" to
3986 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
3987 size_t; the old version tried to do this but casted improperly.
3988 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
3989 (bitset_test): Now returns int, not unsigned long.
3991 * lib/bitset_stats.c: Include "gettext.h".
3993 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
3994 name locals "index", as it generates unnecessary warnings on some
3995 hosts that have an "index" function.
3997 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
3998 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
3999 they need translation.
4000 * src/LR0.c (state_list_append, new_itemsets, get_state,
4001 append_states, generate_states): Likewise.
4002 * src/assoc.c (assoc_to_string): Likewise.
4003 * src/closure.c (print_closure, set_firsts, closure): Likewise.
4004 * src/gram.c (grammar_dump): Likewise.
4005 * src/injections.c (injections_compute): Likewise.
4006 * src/lalr.c (lookaheads_print): Likewise.
4007 * src/relation.c (relation_transpose): Likewise.
4008 * src/scan-gram.l: Likewise.
4009 * src/tables.c (table_grow, pack_vector): Likewise.
4011 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
4012 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
4013 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
4014 * m4/mbstate_t.m4: Sync with fileutils.
4015 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
4017 * po/LINGUAS: Add pt_BR.
4018 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
4019 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
4021 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
4023 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
4025 * src/complain.c (strerror_r): Remove decl; not needed.
4026 (strerror): Use same pattern as ../lib/error.c.
4028 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
4030 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
4032 * src/main.c (main): Cast result of bindtextdomain and textdomain
4033 to void, to avoid a GCC warning when --disable-nls is in effect.
4035 * src/scan-gram.l: Use strings rather than escapes when possible,
4036 to minimize the number of warnings from xgettext.
4037 (handle_action_dollar, handle_action_at): Don't use isdigit,
4038 as it mishandles negative chars and it may not work as expected
4039 outside the C locale.
4041 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
4042 this is a GCC extension and is not portable to other compilers.
4044 * src/system.h (alloca): Use same pattern as ../lib/error.c.
4045 Do not include <ctype.h>; no longer needed.
4046 Do not include <malloc.h>; no longer needed (and generates
4047 warnings on OpenBSD 3.0).
4049 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
4052 * tests/regression.at: Do not use 'cc -c input.c -o input';
4053 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
4055 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
4056 exit status as failure, not just exit status 1. Sun C exits
4057 with status 2 sometimes.
4059 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
4060 Use it for the two large tests.
4062 2002-08-02 Akim Demaille <akim@epita.fr>
4064 * src/conflicts.c (conflicts_output): Don't output rules never
4065 reduced here, since anyway that computation doesn't work.
4066 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
4067 (rule_useless_p, rule_never_reduced_p): New.
4068 (grammar_rules_partial_print): Use a filter instead of a range.
4069 Display the title only if needed.
4070 (grammar_rules_print): Adjust.
4071 (grammar_rules_never_reduced_report): New.
4072 * src/tables.c (action_row): Move the computation of rules never
4074 (token_actions): here.
4075 * src/main.c (main): Make the parser before making the report, so
4076 that rules never reduced are computed.
4077 Call grammar_rules_never_reduced_report.
4078 * src/print.c (print_results): Report rules never reduced.
4079 * tests/conflicts.at, tests/reduce.at: Adjust.
4081 2002-08-01 Akim Demaille <akim@epita.fr>
4083 Instead of attaching lookaheads and duplicating the rules being
4084 reduced by a state, attach the lookaheads to the reductions.
4086 * src/state.h (state_t): Remove the `lookaheads',
4087 `lookaheads_rule' member.
4088 (reductions_t): Add a `lookaheads' member.
4089 Use a regular array for the `rules'.
4090 * src/state.c (reductions_new): Initialize the lookaheads member
4092 (state_rule_lookaheads_print): Adjust.
4093 * src/state.h, src/state.c (state_reductions_find): New.
4094 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
4095 (count_rr_conflicts): Adjust.
4096 * src/lalr.c (LArule): Remove.
4097 (add_lookback_edge): Adjust.
4098 (state_lookaheads_count): New.
4099 (states_lookaheads_initialize): Merge into...
4100 (initialize_LA): this.
4101 (lalr_free): Adjust.
4102 * src/main.c (main): Don't free nullable and derives too early: it
4103 is used by --verbose.
4104 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
4106 2002-08-01 Akim Demaille <akim@epita.fr>
4108 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
4110 (set_derives, free_derives): Rename as...
4111 (derives_compute, derives_free): this.
4112 Adjust all dependencies.
4113 * src/nullable.c (set_nullable, free_nullable): Rename as...
4114 (nullable_compute, nullable_free): these.
4115 (rule_list_t): Store rule_t *, not rule_number_t.
4116 * src/state.c (state_rule_lookaheads_print): Directly compare rule
4117 pointers, instead of their numbers.
4118 * src/main.c (main): Call nullable_free, and derives_free earlier,
4119 as they were lo longer used.
4121 2002-08-01 Akim Demaille <akim@epita.fr>
4123 * lib/timevar.c (get_time): Include children time.
4124 * src/lalr.h (LA, LArule): Don't export them: used with the
4126 * src/lalr.c (LA, LArule): Static.
4127 * src/lalr.h, src/lalr.c (lalr_free): New.
4128 * src/main.c (main): Call it.
4129 * src/tables.c (pack_vector): Check whether loc is >= to the
4131 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
4132 (tables_generate): do it, since that's also it which allocates
4134 Don't free LA and LArule, main does.
4136 2002-07-31 Akim Demaille <akim@epita.fr>
4138 Separate parser tables computation and output.
4140 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
4141 (conflict_list, conflict_list_cnt, table, check, table_ninf)
4142 (yydefgoto, yydefact, high): Move to...
4143 * src/tables.h, src/tables.c: here.
4144 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4145 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4146 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
4147 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
4148 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
4149 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
4150 (action_row, save_row, token_actions, save_column, default_goto)
4151 (goto_actions, sort_actions, matching_state, pack_vector)
4152 (table_ninf_remap, pack_table, prepare_actions): Move to...
4153 * src/tables.c: here.
4154 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
4155 * src/output.c (token_actions, output_base, output_conflicts)
4156 (output_check): Merge into...
4157 (prepare_actions): this.
4158 (actions_output): Rename as...
4159 (user_actions_output): this.
4160 * src/main.c (main): Call tables_generate and tables_free.
4162 2002-07-31 Akim Demaille <akim@epita.fr>
4164 Steal GCC's --time-report support.
4166 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
4167 stolen/adjusted from GCC.
4168 * m4/stage.m4: Remove time related checks.
4169 * m4/timevar.m4: New.
4170 * configure.in: Adjust.
4171 * src/system.h: Adjust to using timevar.h.
4172 * src/getargs.h, src/getargs.c: Support trace_time for
4174 * src/main.c (stage): Remove.
4175 (main): Replace `stage' invocations with timevar calls.
4176 * src/output.c: Insert pertinent timevar calls.
4178 2002-07-31 Akim Demaille <akim@epita.fr>
4180 Let --trace have arguments.
4182 * src/getargs.h (enum trace_e): New.
4183 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
4184 (long_options, short_options): --trace/-T takes an optional
4186 Change all the uses of trace_flag to reflect the new flags.
4187 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
4189 Strengthen `stage' portability.
4191 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
4192 * configure.in: Use it.
4193 Don't check for malloc.h and sys/times.h.
4194 * src/system.h: Include them when appropriate.
4195 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
4196 times and struct tms are available.
4198 2002-07-30 Akim Demaille <akim@epita.fr>
4200 In verbose parse error message, don't report `error' as an
4202 * tests/actions.at (Printers and Destructors): Adjust.
4203 * tests/calc.at (Calculator $1): Adjust.
4204 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
4205 error message, do not report the parser accepts the error token in
4208 2002-07-30 Akim Demaille <akim@epita.fr>
4210 Normalize conflict related messages.
4212 * src/complain.h, src/complain.c (warn, complain): New.
4213 * src/conflicts.c (conflicts_print): Use them.
4214 (conflict_report_yacc): New, extracted from...
4215 (conflicts_print): here.
4216 * tests/conflicts.at, tests/existing.at: Adjust.
4218 2002-07-30 Akim Demaille <akim@epita.fr>
4220 Report rules which are never reduced by the parser: those hidden
4223 * src/LR0.c (save_reductions): Don't make the final state too
4224 different: save its reduction (accept) instead of having a state
4225 without any action (no shift or goto, no reduce).
4226 Note: the final state is now a ``regular'' state, i.e., the
4227 parsers now contain `reduce 0' as default reduction.
4228 Nevertheless, since they decide to `accept' when yystate =
4229 final_state, they still will not reduce rule 0.
4230 * src/print.c (print_actions, print_reduction): Adjust.
4231 * src/output.c (action_row): Track reduced rules.
4232 (token_actions): Report rules never reduced.
4233 * tests/conflicts.at, tests/regression.at: Adjust.
4235 2002-07-30 Akim Demaille <akim@epita.fr>
4237 `stage' was accidently included in a previous patch.
4238 Initiate its autoconfiscation.
4240 * configure.in: Look for malloc.h and sys/times.h.
4241 * src/main.c (stage): Adjust.
4242 Report only when trace_flag.
4244 2002-07-29 Akim Demaille <akim@epita.fr>
4246 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
4248 (errs_t): symbol_t*, not symbol_number_t.
4249 (reductions_t): rule_t*, not rule_number_t.
4250 (FOR_EACH_SHIFT): New.
4251 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
4252 * src/print.c, src/print_graph.c: Adjust.
4254 2002-07-29 Akim Demaille <akim@epita.fr>
4256 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
4258 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
4259 (endtoken, accept): these.
4260 * src/reader.c (reader): Set endtoken's default tag to "$end".
4261 Set undeftoken's tag to "$undefined" instead of "$undefined.".
4262 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
4265 2002-07-29 Akim Demaille <akim@epita.fr>
4267 * src/reduce.c (reduce_grammar): When the language is empty,
4268 complain about the start symbol, not the axiom.
4270 * tests/reduce.at (Empty Language): New.
4272 2002-07-26 Akim Demaille <akim@epita.fr>
4274 * src/reader.h, src/reader.c (gram_error): ... can't get
4275 yycontrol without making too strong assumptions on the parser
4277 * src/output.c (prepare_tokens): Use the real 0th value of
4278 token_translations instead of `0'.
4279 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
4281 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
4282 for the time being: %locations ought to provide it to yyerror.
4284 2002-07-25 Akim Demaille <akim@epita.fr>
4286 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
4287 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
4288 * tests/regression.at (Web2c Actions): Adjust.
4290 2002-07-25 Akim Demaille <akim@epita.fr>
4292 Stop storing rules from 1 to nrules + 1.
4294 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
4295 * src/nullable.c, src/output.c, src/print.c, src/reader.c
4296 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
4297 Iterate from 0 to nrules.
4298 Use rule_number_as_item_number and item_number_as_rule_number.
4299 Adjust to `derive' now containing possibly 0.
4300 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
4301 Handle the `- 1' part in rule numbers from/to item numbers.
4302 * src/conflicts.c (log_resolution): Fix the message which reversed
4304 * src/output.c (action_row): Initialize default_rule to -1.
4305 (token_actions): Adjust.
4306 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
4308 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
4310 2002-07-25 Akim Demaille <akim@epita.fr>
4312 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
4313 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
4314 (b4_c_knr_arg_decl): New.
4315 * data/yacc.c: Use it to define yysymprint, yydestruct, and
4316 yyreport_parse_error.
4318 2002-07-25 Akim Demaille <akim@epita.fr>
4320 * data/yacc.c (yyreport_parse_error): New, extracted from...
4322 (yydestruct, yysymprint): Move above yyparse.
4325 2002-07-25 Akim Demaille <akim@epita.fr>
4327 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
4329 (b4_sint_type, b4_uint_type): these.
4330 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
4331 * tests/regression.at (Web2c Actions): Adjust.
4333 2002-07-25 Akim Demaille <akim@epita.fr>
4335 * src/gram.h (TIEM_NUMBER_MAX): New.
4336 (item_number_of_rule_number, rule_number_of_item_number): Rename
4338 (rule_number_as_item_number, item_number_as_rule_number): these.
4339 Adjust dependencies.
4340 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4341 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4342 (symbol_number_to_vector_number): New.
4343 (order): Of vector_number_t* type.
4344 (base_t, BASE_MAX, BASE_MIN): New.
4345 (froms, tos, width, pos, check): Of base_t type.
4346 (action_number_t, ACTION_MIN, ACTION_MAX): New.
4347 (actrow): Of action_number_t type.
4348 (conflrow): Of unsigned int type.
4349 (table_ninf, base_ninf): New.
4350 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
4351 (muscle_insert_int_table, muscle_insert_base_table)
4352 (muscle_insert_rule_number_table): New.
4353 (prepare_tokens): Output `toknum' as int_table.
4354 (action_row): Returns a rule_number_t.
4355 Use ACTION_MIN, not SHRT_MIN.
4356 (token_actions): yydefact is rule_number_t*.
4357 (table_ninf_remap): New.
4358 (pack_table): Use it for `base' and `table'.
4359 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
4361 (YYPACT_NINF, YYTABLE_NINF): these.
4362 (yypact, yytable): Compute their types instead of hard-coded
4364 * tests/regression.at (Web2c Actions): Adjust.
4366 2002-07-19 Akim Demaille <akim@epita.fr>
4368 * src/scan-gram.l (id): Can start with an underscore.
4370 2002-07-16 Akim Demaille <akim@epita.fr>
4372 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
4373 Adjust all former `associativity' dependencies.
4374 * src/symtab.c (symbol_new): Default associativity is `undef', not
4376 (symbol_check_alias_consistence): Adjust.
4378 2002-07-09 Akim Demaille <akim@epita.fr>
4380 * doc/bison.texinfo: Properly set the ``header'' part.
4381 Use @dircategory ``GNU programming tools'' as per Texinfo's
4385 2002-07-09 Akim Demaille <akim@epita.fr>
4387 * lib/quotearg.h: Protect against multiple inclusions.
4388 * src/location.h (location_t): Add a `file' member.
4389 (LOCATION_RESET, LOCATION_PRINT): Adjust.
4390 * src/complain.c (warn_at, complain_at, fatal_at): Drop
4391 `error_one_per_line' support.
4393 2002-07-09 Akim Demaille <akim@epita.fr>
4395 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
4396 * src/reader.c (lineno): Remove.
4397 Adjust all dependencies.
4398 (get_merge_function): Take a location and use complain_at.
4399 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
4400 * tests/regression.at (Invalid inputs, Mixing %token styles):
4403 2002-07-09 Akim Demaille <akim@epita.fr>
4405 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
4406 recovery rule, and forbid extensions when --yacc.
4407 (gram_error): Use complain_at.
4408 * src/reader.c (reader): Exit if there were parse errors.
4410 2002-07-09 Akim Demaille <akim@epita.fr>
4412 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
4413 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
4414 Reported by R Blake <blakers@mac.com>.
4416 2002-07-09 Akim Demaille <akim@epita.fr>
4418 * data/yacc.c: Output the copyright notive in the header.
4420 2002-07-03 Akim Demaille <akim@epita.fr>
4422 * src/output.c (froms, tos): Are state_number_t.
4423 (save_column): sp, sp1, and sp2 are state_number_t.
4424 (prepare): Rename `final' as `final_state_number', `nnts' as
4425 `nterms_number', `nrules' as `rules_number', `nstates' as
4426 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
4428 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
4429 * data/lalr1.cc (nsym_): Remove, unused.
4431 2002-07-03 Akim Demaille <akim@epita.fr>
4433 * src/lalr.h, src/lalr.c (goto_number_t): New.
4434 * src/lalr.c (goto_list_t): New.
4436 * src/nullable.c (rule_list_t): New.
4438 * src/types.h: Remove.
4440 2002-07-03 Akim Demaille <akim@epita.fr>
4442 * src/closure.c (print_fderives): Use rule_rhs_print.
4443 * src/derives.c (print_derives): Use rule_rhs_print.
4444 (rule_list_t): New, replaces `shorts'.
4445 (set_derives): Add comments.
4446 * tests/sets.at (Nullable, Firsts): Adjust.
4448 2002-07-03 Akim Demaille <akim@epita.fr>
4450 * src/output.c (prepare_actions): Free `tally' and `width'.
4451 (prepare_actions): Allocate and free `order'.
4452 * src/symtab.c (symbols_free): Free `symbols'.
4453 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
4454 * src/output.c (m4_invoke): Move to...
4455 * src/scan-skel.l: here.
4456 (<<EOF>>): Close yyout, and free its name.
4458 2002-07-03 Akim Demaille <akim@epita.fr>
4460 Fix some memory leaks, and fix a bug: state 0 was examined twice.
4462 * src/LR0.c (new_state): Merge into...
4463 (state_list_append): this.
4464 (new_states): Merge into...
4465 (generate_states): here.
4466 (set_states): Don't ensure a proper `errs' state member here, do it...
4467 * src/conflicts.c (conflicts_solve): here.
4468 * src/state.h, src/state.c: Comment changes.
4469 (state_t): Rename member `shifts' as `transitions'.
4470 Adjust all dependencies.
4471 (errs_new): For consistency, also take the values as argument.
4473 (state_errs_set): New.
4474 (state_reductions_set, state_transitions_set): Assert that no
4475 previous value was assigned.
4477 (states_free): Use it.
4478 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
4479 temporary storage: use `errs' and `nerrs' as elsewhere.
4480 (set_conflicts): Allocate and free this `errs'.
4482 2002-07-02 Akim Demaille <akim@epita.fr>
4484 * lib/libiberty.h: New.
4485 * lib: Update the bitset implementation from upstream.
4486 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
4487 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
4488 * src/main.c: Adjust bitset stats calls.
4490 2002-07-01 Paul Eggert <eggert@twinsun.com>
4492 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
4493 char, so that negative chars don't collide with $.
4495 2002-06-30 Akim Demaille <akim@epita.fr>
4497 Have the GLR tests be `warning' checked, and fix the warnings.
4499 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
4500 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
4501 (yyremoveDeletes): `yyi' and `yyj' are size_t.
4502 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
4503 (yyaddDeferredAction): static.
4504 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
4505 (yyreportParseError): yyprefix is const.
4506 yytokenp is used only when verbose.
4507 (yy__GNUC__): Replace with __GNUC__.
4508 (yypdumpstack): yyi is size_t.
4509 (yypreference): Un-yy local variables and arguments, to avoid
4510 clashes with `yyr1'. Anyway, we are not in the user name space.
4511 (yytname_size): be an int, as is compared with ints.
4512 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
4514 * tests/cxx-gram.at: Use quotation to protect $1.
4515 Use AT_COMPILE to enable warnings hunts.
4516 Prototype yylex and yyerror.
4518 Include `string.h', not `strings.h'.
4519 Produce and prototype stmtMerge only when used.
4520 yylex takes a location.
4522 2002-06-30 Akim Demaille <akim@epita.fr>
4524 We spend a lot of time in quotearg, in particular when --verbose.
4526 * src/symtab.c (symbol_get): Store a quoted version of the key.
4527 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
4530 2002-06-30 Akim Demaille <akim@epita.fr>
4532 * src/state.h (reductions_t): Rename member `nreds' as num.
4533 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
4534 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
4536 2002-06-30 Akim Demaille <akim@epita.fr>
4538 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
4539 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
4540 (shifts_to): Rename as...
4541 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
4542 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
4543 (TRANSITION_IS_DISABLED, transitions_to): these.
4545 2002-06-30 Akim Demaille <akim@epita.fr>
4547 * src/print.c (print_shifts, print_gotos): Merge into...
4548 (print_transitions): this.
4549 (print_transitions, print_errs, print_reductions): Align the
4551 (print_core, print_transitions, print_errs, print_state,
4552 print_grammar): Output empty lines separator before, not after.
4553 (state_default_rule_compute): Rename as...
4554 (state_default_rule): this.
4555 * tests/conflicts.at (Defaulted Conflicted Reduction),
4556 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
4557 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
4559 2002-06-30 Akim Demaille <akim@epita.fr>
4561 Display items as we display rules.
4563 * src/gram.h, src/gram.c (rule_lhs_print): New.
4564 * src/gram.c (grammar_rules_partial_print): Use it.
4565 * src/print.c (print_core): Likewise.
4566 * tests/conflicts.at (Defaulted Conflicted Reduction),
4567 (Unresolved SR Conflicts): Adjust.
4568 (Unresolved SR Conflicts): Adjust and rename as...
4569 (Resolved SR Conflicts): this, as was meant.
4570 * tests/regression.at (Web2c Report): Adjust.
4572 2002-06-30 Akim Demaille <akim@epita.fr>
4574 * src/print.c (state_default_rule_compute): New, extracted from...
4575 (print_reductions): here.
4576 Pessimize, but clarify the code.
4577 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
4579 2002-06-30 Akim Demaille <akim@epita.fr>
4581 * src/output.c (action_row): Let default_rule be always a rule
4584 2002-06-30 Akim Demaille <akim@epita.fr>
4586 * src/closure.c (print_firsts, print_fderives, closure):
4588 * src/lalr.c (lookaheads_print): Likewise.
4589 * src/state.c (state_rule_lookaheads_print): Likewise.
4590 * src/print_graph.c (print_core): Likewise.
4591 * src/print.c (print_reductions): Likewise.
4592 * src/output.c (action_row): Likewise.
4593 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4595 2002-06-30 Akim Demaille <akim@epita.fr>
4597 * src/print_graph.c: Use report_flag.
4599 2002-06-30 Akim Demaille <akim@epita.fr>
4601 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4603 * src/relation.h, src/relation.c (traverse, relation_digraph)
4604 (relation_print, relation_transpose): New.
4606 2002-06-30 Akim Demaille <akim@epita.fr>
4608 * src/state.h, src/state.c (shifts_to): New.
4609 * src/lalr.c (build_relations): Use it.
4611 2002-06-30 Akim Demaille <akim@epita.fr>
4613 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4614 (item_number_of_rule_number, rule_number_of_item_number): New.
4615 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4616 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4617 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4618 Propagate their use.
4619 Much remains to be done, in particular wrt `shorts' from types.h.
4621 2002-06-30 Akim Demaille <akim@epita.fr>
4623 * src/symtab.c (symbol_new): Initialize the `printer' member.
4625 2002-06-30 Akim Demaille <akim@epita.fr>
4627 * src/LR0.c (save_reductions): Remove, replaced by...
4628 * src/state.h, src/state.c (state_reductions_set): New.
4629 (reductions, errs): Rename as...
4630 (reductions_t, errs_t): these.
4631 Adjust all dependencies.
4633 2002-06-30 Akim Demaille <akim@epita.fr>
4635 * src/LR0.c (state_list_t, state_list_append): New.
4636 (first_state, last_state): Now symbol_list_t.
4637 (this_state): Remove.
4638 (new_itemsets, append_states, save_reductions): Take a state_t as
4640 (set_states, generate_states): Adjust.
4641 (save_shifts): Remove, replaced by...
4642 * src/state.h, src/state.c (state_shifts_set): New.
4643 (shifts): Rename as...
4645 Adjust all dependencies.
4646 * src/state.h (state_t): Remove the `next' member.
4648 2002-06-30 Akim Demaille <akim@epita.fr>
4650 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4653 2002-06-30 Akim Demaille <akim@epita.fr>
4655 Use hash.h for the state hash table.
4657 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4658 (allocate_storage): Use state_hash_new.
4659 (free_storage): Use state_hash_free.
4660 (new_state, get_state): Adjust.
4661 * src/lalr.h, src/lalr.c (states): Move to...
4662 * src/states.h (state_t): Remove the `link' member, no longer
4664 * src/states.h, src/states.c: here.
4665 (state_hash_new, state_hash_free, state_hash_lookup)
4666 (state_hash_insert, states_free): New.
4667 * src/states.c (state_table, state_compare, state_hash): New.
4668 * src/output.c (output_actions): Do not free states now, since we
4669 still need to know the final_state number in `prepare', called
4670 afterwards. Do it...
4671 * src/main.c (main): here: call states_free after `output'.
4673 2002-06-30 Akim Demaille <akim@epita.fr>
4675 * src/state.h, src/state.c (state_new): New, extracted from...
4676 * src/LR0.c (new_state): here.
4677 * src/state.h (STATE_ALLOC): Move to...
4678 * src/state.c: here.
4679 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
4680 * src/state.h, src/state.c: here.
4682 2002-06-30 Akim Demaille <akim@epita.fr>
4684 * src/reader.c (gensym): Rename as...
4685 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
4686 (getsym): Rename as...
4689 2002-06-30 Akim Demaille <akim@epita.fr>
4691 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
4692 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
4693 * src/output.c, src/print.c, src/print_graph.c: Propagate.
4694 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
4696 2002-06-30 Akim Demaille <akim@epita.fr>
4698 Make the test suite pass with warnings checked.
4700 * tests/actions.at (Printers and Destructors): Improve.
4701 Avoid unsigned vs. signed issues.
4702 * tests/calc.at: Don't exercise the scanner here, do it...
4703 * tests/input.at (Torturing the Scanner): here.
4705 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4707 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
4708 reorganize first lines parallel to yacc.c.
4710 2002-06-28 Akim Demaille <akim@epita.fr>
4712 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
4713 (b4_token_enum, b4_token_defines): New, factored from...
4714 * data/lalr1.cc, data/yacc.c, glr.c: here.
4716 2002-06-28 Akim Demaille <akim@epita.fr>
4718 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
4720 * src/output.c (merger_output): static.
4722 2002-06-28 Akim Demaille <akim@epita.fr>
4724 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
4725 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
4727 * src/output.c (save_row): Initialize all the variables to pacify GCC.
4729 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4731 Accumulated changelog for new GLR parsing features.
4733 * src/conflicts.c (count_total_conflicts): Change name to
4734 conflicts_total_count.
4735 * src/conflicts.h: Ditto.
4736 * src/output.c (token_actions): Use the new name.
4737 (output_conflicts): Change conflp => conflict_list_heads, and
4738 confl => conflict_list for better readability.
4739 * data/glr.c: Use the new names.
4740 * NEWS: Add self to GLR announcement.
4742 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
4744 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
4747 * data/bison.glr: Change name to glr.c
4748 * data/glr.c: Renamed from bison.glr.
4749 * data/Makefile.am: Add glr.c
4753 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
4754 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
4756 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4758 * data/bison.glr: Be sure to restore the
4759 current #line when returning to the skeleton contents after having
4760 exposed the input file's #line.
4762 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4764 * data/bison.glr: Bring up to date with changes to bison.simple.
4766 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4768 * data/bison.glr: Correct definitions that use b4_prefix.
4769 Various reformatting.
4770 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
4771 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
4772 yytokenp argument; now part of stack.
4773 (yychar): Define to behave as documented.
4776 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4778 * src/reader.h: Add declaration for free_merger_functions.
4780 * src/reader.c (merge_functions): New variable.
4781 (get_merge_function): New function.
4782 (free_merger_functions): New function.
4783 (readgram): Check for %prec that is not followed by a symbol.
4784 Handle %dprec and %merge declarations.
4785 (packgram): Initialize dprec and merger fields in rules array.
4787 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
4788 conflict_list_cnt, conflict_list_free): New variables.
4789 (table_grow): Also grow conflict_table.
4790 (prepare_rules): Output dprec and merger tables.
4791 (conflict_row): New function.
4792 (action_row): Output conflict lists for GLR parser. Don't use
4793 default reduction in conflicted states for GLR parser so that there
4794 are spaces for the conflict lists.
4795 (save_row): Also save conflict information.
4796 (token_actions): Allocate conflict list.
4797 (merger_output): New function.
4798 (pack_vector): Pack conflict table, too.
4799 (output_conflicts): New function to output yyconflp and yyconfl.
4800 (output_check): Allocate conflict_tos.
4801 (output_actions): Output conflict tables, also.
4802 (output_skeleton): Output b4_mergers definition.
4803 (prepare): Output b4_max_rhs_length definition.
4804 Use 'bison.glr' as default skeleton for GLR parsers.
4806 * src/gram.c (glr_parser): New flag.
4807 (grammar_free): Call free_merger_functions.
4809 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
4810 all pairs of conflicting reductions, rather than just all tokens
4811 causing conflicts. Needed to size conflict tables.
4812 (conflicts_output): Modify call to count_rr_conflicts for new
4814 (conflicts_print): Ditto.
4815 (count_total_conflicts): New function.
4817 * src/reader.h (merger_list): New type.
4818 (merge_functions): New variable.
4820 * src/lex.h (tok_dprec, tok_merge): New token types.
4822 * src/gram.h (rule_s): Add dprec and merger fields.
4823 (glr_parser): New flag.
4825 * src/conflicts.h (count_total_conflicts): New function.
4827 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
4829 * doc/bison.texinfo (Generalized LR Parsing): New section.
4830 (GLR Parsers): New section.
4831 (Language and Grammar): Mention GLR parsing.
4832 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
4833 Correct typo ("tge" -> "the").
4835 * data/bison.glr: New skeleton for GLR parsing.
4837 * tests/cxx-gram.at: New tests for GLR parsing.
4839 * tests/testsuite.at: Include cxx-gram.at.
4841 * tests/Makefile.am: Add cxx-gram.at.
4845 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
4847 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
4849 2002-06-27 Akim Demaille <akim@epita.fr>
4851 * src/options.h, src/options.c: Remove.
4852 * src/getargs.c (short_options, long_options): New.
4854 2002-06-27 Akim Demaille <akim@epita.fr>
4856 * data/bison.simple, data/bison.c++: Rename as...
4857 * data/yacc.c, data/lalr1.cc: these.
4858 * doc/bison.texinfo (Environment Variables): Remove.
4860 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
4862 * src/getargs.c (report_argmatch): Initialize strtok().
4864 2002-06-20 Akim Demaille <akim@epita.fr>
4866 * data/bison.simple (b4_symbol_actions): New, replaces...
4867 (b4_symbol_destructor, b4_symbol_printer): these.
4868 (yysymprint): Be sure to call YYPRINT only for tokens, and using
4871 2002-06-20 Akim Demaille <akim@epita.fr>
4873 * data/bison.simple (yydestructor): Rename as...
4876 2002-06-20 Akim Demaille <akim@epita.fr>
4878 * src/symtab.h, src/symtab.c (symbol_type_set)
4879 (symbol_destructor_set, symbol_precedence_set): The location is
4883 2002-06-20 Akim Demaille <akim@epita.fr>
4885 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
4887 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
4889 * src/symtab.h, src/symtab.c (symbol_class_set)
4890 (symbol_user_token_number_set): Likewise.
4892 Promote complain_at.
4893 * tests/input.at (Type Clashes): Adjust.
4895 2002-06-20 Akim Demaille <akim@epita.fr>
4897 * data/bison.simple (YYLEX): Fix the declaration when
4900 2002-06-20 Akim Demaille <akim@epita.fr>
4902 * data/bison.simple (yysymprint): Don't print the token number,
4904 * tests/actions.at (Destructors): Rename as...
4905 (Printers and Destructors): this.
4906 Also exercise %printer.
4908 2002-06-20 Akim Demaille <akim@epita.fr>
4910 * data/bison.simple (YYDSYMPRINT): New.
4911 Use it to remove many of the #if YYDEBUG/if (yydebug).
4913 2002-06-20 Akim Demaille <akim@epita.fr>
4915 * src/symtab.h, src/symtab.c (symbol_t): printer and
4916 printer_location are new members.
4917 (symbol_printer_set): New.
4918 * src/parse-gram.y (PERCENT_PRINTER): New token.
4919 Handle its associated rule.
4920 * src/scan-gram.l: Adjust.
4921 (handle_destructor_at, handle_destructor_dollar): Rename as...
4922 (handle_symbol_code_at, handle_symbol_code_dollar): these.
4923 * src/output.c (symbol_printers_output): New.
4924 (output_skeleton): Call it.
4925 * data/bison.simple (yysymprint): New. Cannot be named yyprint
4926 since there are already many grammar files with a user `yyprint'.
4927 Replace the calls to YYPRINT to calls to yysymprint.
4928 * tests/calc.at: Adjust.
4929 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
4930 taking advantage of parser very internal details (stack size!).
4932 2002-06-20 Akim Demaille <akim@epita.fr>
4934 * src/scan-gram.l: Complete the scanner with the missing patterns
4936 Use `quote' and `symbol_tag_get' where appropriate.
4938 2002-06-19 Akim Demaille <akim@epita.fr>
4940 * tests/actions.at (Destructors): Augment to test locations.
4941 * data/bison.simple (yydestructor): Pass it the current location
4942 if locations are enabled.
4943 Prototype only when __STDC__ or C++.
4944 Change the argument names to move into the yy name space: there is
4947 2002-06-19 Akim Demaille <akim@epita.fr>
4949 * data/bison.simple (b4_pure_if): New.
4950 Use it instead of #ifdef YYPURE.
4952 2002-06-19 Akim Demaille <akim@epita.fr>
4954 * data/bison.simple (b4_location_if): New.
4955 Use it instead of #ifdef YYLSP_NEEDED.
4957 2002-06-19 Akim Demaille <akim@epita.fr>
4959 Prepare @$ in %destructor, but currently don't bind it in the
4960 skeleton, as %location use is not cleaned up yet.
4962 * src/scan-gram.l (handle_dollar, handle_destructor_at)
4963 (handle_action_at): New.
4964 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
4965 a braced_code_t and a location as additional arguments.
4966 (handle_destructor_dollar): Instead of requiring `b4_eval', just
4967 unquote one when outputting `b4_dollar_dollar'.
4969 * data/bison.simple (b4_eval): Remove.
4970 (b4_symbol_destructor): Adjust.
4971 * tests/input.at (Invalid @n): Adjust.
4973 2002-06-19 Zack Weinberg <zack@codesourcery.com>
4975 * doc/bison.texinfo: Document ability to have multiple
4978 2002-06-18 Akim Demaille <akim@epita.fr>
4980 * src/files.c (compute_base_names): When computing the output file
4981 names from the input file name, strip the directory part.
4983 2002-06-18 Akim Demaille <akim@epita.fr>
4985 * data/bison.simple.new: Comment changes.
4986 Reported by Andreas Schwab.
4988 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
4990 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
4991 there are no `label `yyoverflowlab' defined but not used' warnings
4992 when yyoverflow is defined.
4994 2002-06-18 Akim Demaille <akim@epita.fr>
4996 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
4998 (symbol_destructor_set): Adjust.
4999 * src/output.c (symbol_destructors_output): Output the destructor
5001 Output the symbol name.
5002 * data/bison.simple (b4_symbol_destructor): Adjust.
5004 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
5005 and Akim Demaille <akim@epita.fr>
5007 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
5008 what's left on the stack when the error recovery hits EOF.
5009 * tests/actions.at (Destructors): Complete to exercise this case.
5011 2002-06-17 Akim Demaille <akim@epita.fr>
5013 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
5014 arguments is really empty, not only equal to `[]'.
5015 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
5017 (symbol_destructor_set): New.
5018 * src/output.c (symbol_destructors_output): New.
5019 * src/reader.h (brace_code_t, current_braced_code): New.
5020 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
5021 (handle_dollar): Rename as...
5022 (handle_action_dollar): this.
5023 (handle_destructor_dollar): New.
5024 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
5025 (grammar_declaration): Use it.
5026 * data/bison.simple (yystos): Is always defined.
5027 (yydestructor): New.
5028 * tests/actions.at (Destructors): New.
5029 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
5031 2002-06-17 Akim Demaille <akim@epita.fr>
5033 * src/symlist.h, src/symlist.c (symbol_list_length): New.
5034 * src/scan-gram.l (handle_dollar, handle_at): Compute the
5035 rule_length only when needed.
5036 * src/output.c (actions_output, token_definitions_output): Output
5038 * src/symtab.c: Don't access directly to the symbol tag, use
5040 * src/parse-gram.y: Use symbol_list_free.
5042 2002-06-17 Akim Demaille <akim@epita.fr>
5044 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
5045 (symbol_list_prepend, get_type_name): Move to...
5046 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
5047 (symbol_list_prepend, symbol_list_n_type_name_get): here.
5049 (symbol_list_free): New.
5050 * src/scan-gram.l (handle_dollar): Takes a location.
5051 * tests/input.at (Invalid $n): Adjust.
5053 2002-06-17 Akim Demaille <akim@epita.fr>
5055 * src/reader.h, src/reader.c (symbol_list_new): Export it.
5056 (symbol_list_prepend): New.
5057 * src/parse-gram.y (%union): `list' is a new member.
5058 (symbols.1): New, replaces...
5059 (terms_to_prec.1, nterms_to_type.1): these.
5060 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
5061 Take a location as additional argument.
5064 2002-06-15 Akim Demaille <akim@epita.fr>
5066 * src/parse-gram.y: Move %token in the declaration section so that
5067 we don't depend upon CVS Bison.
5069 2002-06-15 Akim Demaille <akim@epita.fr>
5071 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
5072 * src/print.c (print_core): Use it.
5074 2002-06-15 Akim Demaille <akim@epita.fr>
5076 * src/conflicts.c (log_resolution): Accept the rule involved in
5077 the sr conflicts instead of the lookahead number that points to
5079 (flush_reduce): Accept the current lookahead vector as argument,
5080 instead of the index in LA.
5081 (resolve_sr_conflict): Accept the current number of lookahead
5082 bitset to consider for the STATE, instead of the index in LA.
5083 (set_conflicts): Adjust.
5084 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
5086 2002-06-15 Akim Demaille <akim@epita.fr>
5088 * src/state.h (state_t): Replace the `lookaheadsp' member, a
5089 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
5090 Adjust all dependencies.
5091 * src/lalr.c (initialize_lookaheads): Split into...
5092 (states_lookaheads_count, states_lookaheads_initialize): these.
5095 2002-06-15 Akim Demaille <akim@epita.fr>
5097 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
5099 (grammar_rules_print): here.
5100 * src/reduce.c (reduce_output): Use it.
5101 * tests/reduce.at (Useless Rules, Reduced Automaton)
5102 (Underivable Rules): Adjust.
5104 2002-06-15 Akim Demaille <akim@epita.fr>
5106 Copy BYacc's nice way to report the grammar.
5108 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
5110 Don't print the rules' location, it is confusing and useless.
5111 (rule_print): Use grammar_rhs_print.
5112 * src/print.c (print_grammar): Use grammar_rules_print.
5114 2002-06-15 Akim Demaille <akim@epita.fr>
5116 Complete and rationalize `useless thing' warnings.
5118 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
5119 (symbol_tag_print): New.
5120 Use them everywhere in place of accessing directly the tag member.
5121 * src/gram.h, src/gram.c (rule_print): New.
5122 Use it where a rule used to be printed `by hand'.
5123 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
5124 (reduce_grammar_tables): Report the useless rules.
5125 (reduce_print): Useless things are a warning, not an error.
5127 * tests/reduce.at (Useless Nonterminals, Useless Rules):
5128 (Reduced Automaton, Underivable Rules): Adjust.
5129 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
5130 * tests/conflicts.at (Unresolved SR Conflicts)
5131 (Solved SR Conflicts): Adjust.
5133 2002-06-15 Akim Demaille <akim@epita.fr>
5135 Let symbols have a location.
5137 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
5140 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
5141 Use location_t, not int.
5142 * src/symtab.c (symbol_check_defined): Take advantage of the
5144 * tests/regression.at (Invalid inputs): Adjust.
5146 2002-06-15 Akim Demaille <akim@epita.fr>
5148 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
5149 (input): Don't try to initialize yylloc here, do it in the
5151 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
5152 * src/gram.h (rule_t): Change line and action_line into location
5153 and action_location, of location_t type.
5154 Adjust all dependencies.
5155 * src/location.h, src/location.c (empty_location): New.
5156 * src/reader.h, src/reader.c (grammar_start_symbol_set)
5157 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
5158 (grammar_current_rule_symbol_append)
5159 (grammar_current_rule_action_append): Expect a location as argument.
5160 * src/reader.c (grammar_midrule_action): Adjust to attach an
5161 action's location as dummy symbol location.
5162 * src/symtab.h, src/symtab.c (startsymbol_location): New.
5163 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
5166 2002-06-14 Akim Demaille <akim@epita.fr>
5168 Grammar declarations may be found in the grammar section.
5170 * src/parse-gram.y (rules_or_grammar_declaration): New.
5171 (declarations): Each declaration may end with a semicolon, not
5173 (grammar_declaration): `"%union"'.
5174 (grammar): Branch to rules_or_grammar_declaration.
5176 2002-06-14 Akim Demaille <akim@epita.fr>
5178 * src/main.c (main): Invoke scanner_free.
5180 2002-06-14 Akim Demaille <akim@epita.fr>
5182 * src/output.c (m4_invoke): Extracted from...
5183 (output_skeleton): here.
5186 2002-06-14 Akim Demaille <akim@epita.fr>
5188 * src/parse-gram.y (directives, directive, gram)
5189 (grammar_directives, precedence_directives, precedence_directive):
5191 (declarations, declaration, grammar, grammar_declaration)
5192 (precedence_declaration, precedence_declarator): these.
5193 (symbol_declaration): New.
5195 2002-06-14 Akim Demaille <akim@epita.fr>
5197 * src/files.c (action_obstack): Remove, unused.
5198 (output_obstack): Remove it, and all its dependencies, as it is no
5200 * src/reader.c (epilogue_set): Build the epilogue in the
5202 * src/output.h, src/output.c (muscle_obstack): Move to...
5203 * src/muscle_tab.h, src/muscle_tab.h: here.
5204 (muscle_init): Initialize muscle_obstack.
5206 * src/main.c (main): Call it.
5208 2002-06-14 Akim Demaille <akim@epita.fr>
5210 * src/location.h: New, extracted from...
5211 * src/reader.h: here.
5212 * src/Makefile.am (noinst_HEADERS): Merge into
5213 (bison_SOURCES): this.
5215 * src/parse-gram.y: Use location_t instead of Bison's.
5216 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
5217 Use location_t instead of ints.
5219 2002-06-14 Akim Demaille <akim@epita.fr>
5221 * data/bison.simple, data/bison.c++: Be sure to restore the
5222 current #line when returning to the skeleton contents after having
5223 exposed the input file's #line.
5225 2002-06-12 Akim Demaille <akim@epita.fr>
5227 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
5229 * tests/actions.at (Exotic Dollars): New.
5231 2002-06-12 Akim Demaille <akim@epita.fr>
5233 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
5235 * tests/input.at (Torturing the Scanner): New.
5237 2002-06-11 Akim Demaille <akim@epita.fr>
5239 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
5240 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
5241 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
5242 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
5243 * src/reader.c (reader): Use it.
5245 2002-06-11 Akim Demaille <akim@epita.fr>
5247 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
5249 (scanner_last_string_free): New.
5251 2002-06-11 Akim Demaille <akim@epita.fr>
5253 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
5254 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
5255 (last_string, YY_OBS_FREE): New.
5256 Use them when returning an ID.
5258 2002-06-11 Akim Demaille <akim@epita.fr>
5260 Have Bison grammars parsed by a Bison grammar.
5262 * src/reader.c, src/reader.h (prologue_augment): New.
5263 * src/reader.c (copy_definition): Remove.
5265 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
5266 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
5267 (grammar_current_rule_prec_set, grammar_current_rule_check)
5268 (grammar_current_rule_symbol_append)
5269 (grammar_current_rule_action_append): Export.
5270 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
5271 (symbol_list_action_append): Remove.
5272 Hook the routines from reader.
5273 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
5274 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
5276 * src/reader.c (read_declarations): Remove, unused.
5278 * src/parse-gram.y: Handle the epilogue.
5279 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
5280 (grammar_start_symbol_set): this.
5281 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
5282 * src/reader.c (readgram): Remove, unused.
5283 (reader): Adjust to insert eoftoken and axiom where appropriate.
5285 * src/reader.c (copy_dollar): Replace with...
5286 * src/scan-gram.h (handle_dollar): this.
5287 * src/parse-gram.y: Remove `%thong'.
5289 * src/reader.c (copy_at): Replace with...
5290 * src/scan-gram.h (handle_at): this.
5292 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
5295 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
5298 * src/reader.h, src/reader.c (grammar_rule_end): New.
5300 * src/parse.y (current_type, current_class): New.
5301 Implement `%nterm', `%token' support.
5302 Merge `%term' into `%token'.
5303 (string_as_id): New.
5304 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
5307 * src/parse-gram.y: Be sure to handle properly the beginning of
5310 * src/parse-gram.y: Handle %type.
5311 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
5313 * src/parse-gram.y: More directives support.
5314 * src/options.c: No longer handle source directives.
5316 * src/parse-gram.y: Fix %output.
5318 * src/parse-gram.y: Handle %union.
5319 Use the prologue locations.
5320 * src/reader.c (parse_union_decl): Remove.
5322 * src/reader.h, src/reader.c (epilogue_set): New.
5323 * src/parse-gram.y: Use it.
5325 * data/bison.simple, data/bison.c++: b4_stype is now either not
5326 defined, then default to int, or to the contents of %union,
5327 without `union' itself.
5329 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
5331 * src/output.c (actions_output): Don't output braces, as they are
5332 already handled by the scanner.
5334 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
5335 characters to themselves.
5337 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
5338 that the epilogue has a proper #line.
5340 * src/parse-gram.y: Handle precedence/associativity.
5342 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
5344 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
5345 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
5346 at all to define terminals that cannot be emitted.
5348 * src/scan-gram.l: Escape M4 characters.
5350 * src/scan-gram.l: Working properly with escapes in user
5353 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
5354 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
5356 Use more modest sizes, as for the time being the parser does not
5357 release memory, and therefore the process swallows a huge amount
5360 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
5361 stricter %token grammar.
5363 * src/symtab.h (associativity): Add `undef_assoc'.
5364 (symbol_precedence_set): Do nothing when passed an undef_assoc.
5365 * src/symtab.c (symbol_check_alias_consistence): Adjust.
5367 * tests/regression.at (Invalid %directive): Remove, as it is now
5369 (Invalid inputs): Adjust to the new error messages.
5370 (Token definitions): The new grammar doesn't allow too many
5373 * src/lex.h, src/lex.c: Remove.
5374 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
5375 (copy_character, copy_string2, copy_string, copy_identifier)
5376 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
5377 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
5378 (parse_action): Remove.
5379 * po/POTFILES.in: Adjust.
5381 2002-06-11 Akim Demaille <akim@epita.fr>
5383 * src/reader.c (parse_action): Don't store directly into the
5384 rule's action member: return the action as a string.
5385 Don't require `rule_length' as an argument: compute it.
5386 (grammar_current_rule_symbol_append)
5387 (grammar_current_rule_action_append): New, eved out from
5389 Remove `action_flag', `rulelength', unused now.
5391 2002-06-11 Akim Demaille <akim@epita.fr>
5393 * src/reader.c (grammar_current_rule_prec_set).
5394 (grammar_current_rule_check): New, eved out from...
5396 Remove `xaction', `first_rhs': useless.
5397 * tests/input.at (Type clashes): New.
5398 * tests/existing.at (GNU Cim Grammar): Adjust.
5400 2002-06-11 Akim Demaille <akim@epita.fr>
5402 * src/reader.c (grammar_midrule_action): New, Eved out from
5405 2002-06-11 Akim Demaille <akim@epita.fr>
5407 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
5409 (readgram): Use them as replacement of inlined code, crule and
5412 2002-06-11 Akim Demaille <akim@epita.fr>
5414 * src/reader.c (grammar_end, grammar_symbol_append): New.
5415 (readgram): Use them.
5416 Make the use of `p' as local as possible.
5418 2002-06-10 Akim Demaille <akim@epita.fr>
5420 GCJ's parser requires the tokens to be defined before the prologue.
5422 * data/bison.simple: Output the token definition before the user's
5424 * tests/regression.at (Braces parsing, Duplicate string)
5425 (Mixing %token styles): Check the output from bison.
5426 (Early token definitions): New.
5428 2002-06-10 Akim Demaille <akim@epita.fr>
5430 * src/symtab.c (symbol_user_token_number_set): Don't complain when
5431 assigning twice the same user number to a token, so that we can
5433 * src/lex.c (lex): here.
5434 Also use `symbol_class_set' instead of hand written code.
5435 * src/reader.c (parse_assoc_decl): Likewise.
5437 2002-06-10 Akim Demaille <akim@epita.fr>
5439 * src/symtab.c, src/symtab.c (symbol_class_set)
5440 (symbol_user_token_number_set): New.
5441 * src/reader.c (parse_token_decl): Use them.
5442 Use a switch instead of ifs.
5443 Use a single argument.
5445 2002-06-10 Akim Demaille <akim@epita.fr>
5447 Remove `%thong' support as it is undocumented, unused, duplicates
5448 `%token's job, and creates useless e-mail traffic with people who
5449 want to know what it is, why it is undocumented, unused, and
5450 duplicates `%token's job.
5452 * src/reader.c (parse_thong_decl): Remove.
5453 * src/options.c (option_table): Remove "thong".
5454 * src/lex.h (tok_thong): Remove.
5456 2002-06-10 Akim Demaille <akim@epita.fr>
5458 * src/symtab.c, src/symtab.c (symbol_type_set)
5459 (symbol_precedence_set): New.
5460 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
5461 (value_components_used): Remove, unused.
5463 2002-06-09 Akim Demaille <akim@epita.fr>
5465 Move symbols handling code out of the reader.
5467 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
5469 * src/symtab.h, src/symtab.c: here.
5471 * src/gram.c (start_symbol): Remove: use startsymbol->number.
5472 * src/reader.c (startval): Rename as...
5473 * src/symtab.h, src/symtab.c (startsymbol): this.
5474 * src/reader.c: Adjust.
5476 * src/reader.c (symbol_check_defined, symbol_make_alias)
5477 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5478 (token_translations_init)
5480 * src/symtab.c: here.
5481 * src/reader.c (packsymbols): Move to...
5482 * src/symtab.h, src/symtab.c (symbols_pack): here.
5483 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
5486 2002-06-03 Akim Demaille <akim@epita.fr>
5488 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
5491 2002-06-03 Akim Demaille <akim@epita.fr>
5493 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
5494 structs with non literals.
5495 * src/scan-skel.l: never-interactive.
5496 * src/conflicts.c (enum conflict_resolution_e): No trailing
5498 * src/getargs.c (usage): Split long literal strings.
5499 Reported by Hans Aberg.
5501 2002-05-28 Akim Demaille <akim@epita.fr>
5503 * data/bison.c++: Use C++ ostreams.
5504 (cdebug_): New member.
5506 2002-05-28 Akim Demaille <akim@epita.fr>
5508 * src/output.c (output_skeleton): Be sure to allocate enough room
5509 for `/' _and_ for `\0' in full_skeleton.
5511 2002-05-28 Akim Demaille <akim@epita.fr>
5513 * data/bison.c++: Catch up with bison.simple:
5514 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5515 and Paul Eggert <eggert@twinsun.com>: `error' handing.
5516 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
5519 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5521 * src/output.c (output_skeleton): Put an explicit path in front of
5522 the skeleton file name, rather than relying on the -I directory,
5523 to partially alleviate effects of having a skeleton file lying around
5524 in the current directory.
5526 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5528 * src/conflicts.c (log_resolution): Correct typo:
5529 obstack_printf should be obstack_fgrow1.
5531 2002-05-26 Akim Demaille <akim@epita.fr>
5533 * src/state.h (state_t): `solved_conflicts' is a new member.
5534 * src/LR0.c (new_state): Set it to 0.
5535 * src/conflicts.h, src/conflicts.c (print_conflicts)
5536 (free_conflicts, solve_conflicts): Rename as...
5537 (conflicts_print, conflicts_free, conflicts_solve): these.
5539 * src/conflicts.c (enum conflict_resolution_e)
5540 (solved_conflicts_obstack): New, used by...
5541 (log_resolution): this.
5542 Adjust to attach the conflict resolution to each state.
5543 Complete the description with the precedence/associativity
5545 (resolve_sr_conflict): Adjust.
5546 * src/print.c (print_state): Output its solved_conflicts.
5547 * tests/conflicts.at (Unresolved SR Conflicts)
5548 (Solved SR Conflicts): Exercise --report=all.
5550 2002-05-26 Akim Demaille <akim@epita.fr>
5552 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5553 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5554 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
5555 (token_number_t, item_number_as_token_number)
5556 (token_number_as_item_number, muscle_insert_token_number_table):
5558 (symbol_number_t, item_number_as_symbol_number)
5559 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
5560 these, since it is more appropriate.
5562 2002-05-26 Akim Demaille <akim@epita.fr>
5564 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
5566 * data/bison.simple (yystos) [YYDEBUG]: New.
5567 (yyparse) [YYDEBUG]: Display the symbols which are popped during
5569 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
5571 2002-05-25 Akim Demaille <akim@epita.fr>
5573 * doc/bison.texinfo (Debugging): Split into...
5574 (Tracing): this new section, its former contents, and...
5575 (Understanding): this new section.
5576 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
5578 (report_flag): this.
5579 Adjust all dependencies.
5580 (report_args, report_types, report_argmatch): New.
5581 (usage, getargs): Report/support -r, --report.
5583 (struct option_table_struct): Rename as..,
5584 (struct option_table_s): this.
5585 Rename the `set_flag' member to `flag' to match with getopt_long's
5587 * src/options.c (option_table): Split verbose into an entry for
5588 %verbose, and another for --verbose.
5589 Support --report/-r, so remove -r from the obsolete --raw.
5590 * src/print.c: Attach full item sets and lookaheads reports to
5591 report_flag instead of trace_flag.
5592 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5594 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5595 and Paul Eggert <eggert@twinsun.com>
5597 * data/bison.simple (yyparse): Correct error handling to conform to
5598 POSIX and yacc. Specifically, after syntax error is discovered,
5599 do not reduce further before shifting the error token.
5600 Clean up the code a bit by removing the labels yyerrdefault,
5601 yyerrhandle, yyerrpop.
5602 * NEWS: Document the above.
5604 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5606 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5607 type; it isn't always big enough, since it doesn't necessarily
5608 include non-terminals.
5609 (yytranslate): Expand definition of yy_token_number_type, so that
5610 the latter can be removed.
5611 (yy_token_number_type): Remove, only one use.
5612 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5613 don't use TokenNumberType as element type.
5615 * tests/regression.at: Modify expected output to agree with change
5616 to yyr1 and yytranslate.
5618 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5620 * src/reader.c (parse_action): Use copy_character instead of
5623 2002-05-13 Akim Demaille <akim@epita.fr>
5625 * tests/regression.at (Token definitions): Prototype yylex and
5628 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5630 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
5631 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5633 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5635 2002-05-07 Akim Demaille <akim@epita.fr>
5637 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5640 2002-05-07 Akim Demaille <akim@epita.fr>
5644 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5645 over the RHS of each rule.
5646 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5647 * src/state.h (state_t): Member `nitems' is unsigned short.
5648 * src/LR0.c (get_state): Adjust.
5649 * src/reader.c (packgram): Likewise.
5650 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5652 (muscle_insert_int_table): Remove, unused.
5653 (prepare_rules): Remove `max'.
5655 2002-05-06 Akim Demaille <akim@epita.fr>
5657 * src/closure.c (print_firsts): Display of the symbol tags.
5658 (bitmatrix_print): Move to...
5659 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5661 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5663 2002-05-06 Akim Demaille <akim@epita.fr>
5665 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5668 2002-05-06 Akim Demaille <akim@epita.fr>
5670 * src/LR0.c (new_state, get_state): Instead of using the global
5671 `kernel_size' and `kernel_base', have two new arguments:
5672 `core_size' and `core'.
5675 2002-05-06 Akim Demaille <akim@epita.fr>
5677 * src/reader.c (packgram): No longer end `ritem' with a 0
5678 sentinel: it is not used.
5680 2002-05-05 Akim Demaille <akim@epita.fr>
5682 New experimental feature: display the lookaheads in the report and
5685 * src/print (print_core): When --trace-flag, display the rules
5687 * src/print_graph.c (print_core): Likewise.
5691 2002-05-05 Akim Demaille <akim@epita.fr>
5693 * tests/torture.at (Many lookaheads): New test.
5695 2002-05-05 Akim Demaille <akim@epita.fr>
5697 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
5698 (GENERATE_MUSCLE_INSERT_TABLE): this.
5699 (output_int_table, output_unsigned_int_table, output_short_table)
5700 (output_token_number_table, output_item_number_table): Replace with...
5701 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
5702 (muscle_insert_short_table, muscle_insert_token_number_table)
5703 (muscle_insert_item_number_table): these.
5705 (prepare_tokens): Don't free `translations', since...
5706 * src/reader.h, src/reader.c (grammar_free): do it.
5708 * src/gram.h, src/gram.c (grammar_free): here.
5709 * data/bison.simple, data/bison.c++: b4_token_number_max is now
5712 2002-05-05 Akim Demaille <akim@epita.fr>
5714 * src/output.c (output_unsigned_int_table): New.
5715 (prepare_rules): `i' is unsigned.
5716 `prhs', `rline', `r2' are unsigned int.
5717 Rename muscle `rhs_number_max' as `rhs_max'.
5718 Output muscles `prhs_max', `rline_max', and `r2_max'.
5720 * data/bison.simple, data/bison.c++: Adjust to use these muscles
5721 to compute types instead of constant types.
5722 * tests/regression.at (Web2c Actions): Adjust.
5724 2002-05-04 Akim Demaille <akim@epita.fr>
5726 * src/symtab.h (SALIAS, SUNDEF): Rename as...
5727 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
5728 Adjust dependencies.
5729 * src/output.c (token_definitions_output): Be sure not to output a
5730 `#define 'a'' when fed with `%token 'a' "a"'.
5731 * tests/regression.at (Token definitions): New.
5733 2002-05-03 Paul Eggert <eggert@twinsun.com>
5735 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
5738 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
5740 * Makefile.am (SUBDIRS): Remove intl.
5741 (EXTRA_DIST): Add config/config.rpath.
5743 2002-05-03 Akim Demaille <akim@epita.fr>
5745 * data/bison.simple (m4_if): Don't output empty enums.
5746 And actually, output valid enum definitions :(.
5748 2002-05-03 Akim Demaille <akim@epita.fr>
5750 * configure.bat: Remove, completely obsolete.
5751 * Makefile.am (EXTRA_DIST): Adjust.
5752 Don't distribute config.rpath...
5753 * config/Makefile.am (EXTRA_DIST): Do it.
5755 2002-05-03 Akim Demaille <akim@epita.fr>
5757 * configure.in (GETTEXT_VERSION): New.
5758 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
5760 2002-05-03 Akim Demaille <akim@epita.fr>
5762 * data/bison.simple (b4_token_enum): New.
5763 (b4_token_defines): Use it to output tokens both as #define and
5765 Suggested by Paul Eggert.
5766 * src/output.c (token_definitions_output): Don't output spurious
5769 2002-05-03 Akim Demaille <akim@epita.fr>
5771 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5773 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
5775 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
5776 Update the stack class, give a try to deque as the default container.
5778 2002-05-02 Akim Demaille <akim@epita.fr>
5780 * data/bison.simple (yyparse): Do not implement @$ = @1.
5781 (YYLLOC_DEFAULT): Adjust to do it.
5782 * doc/bison.texinfo (Location Default Action): Fix.
5784 2002-05-02 Akim Demaille <akim@epita.fr>
5786 * src/reader.c (parse_braces): Merge into...
5787 (parse_action): this.
5789 2002-05-02 Akim Demaille <akim@epita.fr>
5791 * configure.in (ALL_LINGUAS): Remove.
5792 * po/LINGUAS, hr.po: New.
5794 2002-05-02 Akim Demaille <akim@epita.fr>
5796 Remove the so called hairy (semantic) parsers.
5798 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
5799 * src/gram.h, src/gram.c (semantic_parser): Remove.
5800 (rule_t): Remove the guard and guard_line members.
5801 * src/lex.h (token_t): remove tok_guard.
5802 * src/options.c (option_table): Remove %guard and %semantic_parser
5804 * src/output.c, src/output.h (guards_output): Remove.
5806 (token_definitions_output): Don't output the `T'
5808 (output_skeleton): Don't output the guards.
5809 * src/files.c, src/files.c (attrsfile): Remove.
5810 * src/reader.c (symbol_list): Remove the guard and guard_line
5812 Adjust dependencies.
5813 (parse_guard): Remove.
5814 * data/bison.hairy: Remove.
5815 * doc/bison.texinfo (Environment Variables): Remove occurrences of
5818 2002-05-02 Akim Demaille <akim@epita.fr>
5820 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
5821 (parse_guard): Rename the formal argument `stack_offset' as
5822 `rule_length', which is more readable.
5824 (copy_at, copy_dollar): Instead of outputting the hard coded
5825 values of $$, $n and so forth, output invocation to b4_lhs_value,
5826 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
5827 Note: this patch partially drops `semantic-parser' support: it
5828 always does `rule_length - n', where semantic parsers ought to
5830 * data/bison.simple, data/bison.c++ (b4_lhs_value)
5831 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
5833 2002-05-02 Akim Demaille <akim@epita.fr>
5835 * configure.in (AC_INIT): Bump to 1.49b.
5836 (AM_INIT_AUTOMAKE): Short invocation.
5838 2002-05-02 Akim Demaille <akim@epita.fr>
5842 2002-05-01 Akim Demaille <akim@epita.fr>
5844 * src/skeleton.h: Remove.
5846 2002-05-01 Akim Demaille <akim@epita.fr>
5848 * src/skeleton.h: Fix the #endif.
5849 Reported by Magnus Fromreide.
5851 2002-04-26 Paul Eggert <eggert@twinsun.com>
5853 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
5854 Define if we define YYSTYPE and YYLTYPE, respectively.
5855 (YYCOPY): Fix [] quoting problem in the non-GCC case.
5857 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
5859 * src/scan-skel.l: Postprocess quadrigraphs.
5861 * src/reader.c (copy_character): New function, used to output
5862 single characters while replacing `[' and `]' with quadrigraphs, to
5863 avoid troubles with M4 quotes.
5864 (copy_comment): Output characters with copy_character.
5865 (read_additionnal_code): Likewise.
5866 (copy_string2): Likewise.
5867 (copy_definition): Likewise.
5869 * tests/calc.at: Exercise M4 quoting.
5871 2002-04-25 Akim Demaille <akim@epita.fr>
5873 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
5874 between `!' and the command.
5875 Reported by Paul Eggert.
5877 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
5879 * tests/calc.at: Exercise prologue splitting.
5881 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
5882 `b4_post_prologue' instead of `b4_prologue'.
5884 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
5886 (output): Free pre_prologue_obstack and post_prologue_obstack.
5887 * src/files.h, src/files.c (attrs_obstack): Remove.
5888 (pre_prologue_obstack, post_prologue_obstack): New.
5889 * src/reader.c (copy_definition): Add a parameter to specify the
5890 obstack to fill, instead of using attrs_obstack unconditionally.
5891 (read_declarations): Pass pre_prologue_obstack to copy_definition if
5892 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
5894 2002-04-23 Paul Eggert <eggert@twinsun.com>
5896 * data/bison.simple: Remove unnecessary commentary and white
5897 space differences from 1_29-branch.
5898 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
5900 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
5901 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
5902 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
5903 constructors or destructors.
5905 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
5907 2002-04-23 Akim Demaille <akim@epita.fr>
5909 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
5910 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
5911 location with columns.
5912 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
5913 All reported by Paul Eggert.
5915 2002-04-22 Akim Demaille <akim@epita.fr>
5917 * src/reduce.c (dump_grammar): Move to...
5918 * src/gram.h, src/gram.c (grammar_dump): here.
5919 Be sure to separate long item numbers.
5920 Don't read the members of a rule's prec if its nil.
5922 2002-04-22 Akim Demaille <akim@epita.fr>
5924 * src/output.c (table_size, table_grow): New.
5925 (MAXTABLE): Remove, replace uses with table_size.
5926 (pack_vector): Instead of dying when the table is too big, grow it.
5928 2002-04-22 Akim Demaille <akim@epita.fr>
5930 * data/bison.simple (yyr1): Its type is that of a token number.
5931 * data/bison.c++ (r1_): Likewise.
5932 * tests/regression.at (Web2c Actions): Adjust.
5934 2002-04-22 Akim Demaille <akim@epita.fr>
5936 * src/reader.c (token_translations_init): 256 is now the default
5937 value for the error token, i.e., it will be assigned another
5938 number if the user assigned 256 to one of her tokens.
5939 (reader): Don't force 256 to error.
5940 * doc/bison.texinfo (Symbols): Adjust.
5941 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
5942 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
5943 etc. instead of 10, 20, 30 (which was used to `jump' over error
5944 (256) and undefined (2)).
5946 2002-04-22 Akim Demaille <akim@epita.fr>
5948 Propagate more token_number_t.
5950 * src/gram.h (token_number_as_item_number)
5951 (item_number_as_token_number): New.
5952 * src/output.c (GENERATE_OUTPUT_TABLE): New.
5953 Use it to create output_item_number_table and
5954 output_token_number_table.
5955 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5956 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
5957 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
5958 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
5960 2002-04-22 Akim Demaille <akim@epita.fr>
5962 * src/output.h, src/output.c (get_lines_number): Remove.
5964 2002-04-19 Akim Demaille <akim@epita.fr>
5966 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
5968 (Debugging): More details about enabling the debugging features.
5969 (Table of Symbols): Describe $$, $n, @$, and @n.
5970 Suggested by Tim Josling.
5972 2002-04-19 Akim Demaille <akim@epita.fr>
5974 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
5976 2002-04-10 Akim Demaille <akim@epita.fr>
5978 * src/system.h: Rely on HAVE_LIMITS_H.
5979 Suggested by Paul Eggert.
5981 2002-04-09 Akim Demaille <akim@epita.fr>
5983 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
5984 full stderr, and strip it according to the bison options, instead
5985 of composing the error message from different bits.
5986 This makes it easier to check for several error messages.
5987 Adjust all the invocations.
5988 Add an invocation exercising the error token.
5989 Add an invocation demonstrating a stupid error message.
5990 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
5992 Error message are for stderr, not stdout.
5994 2002-04-09 Akim Demaille <akim@epita.fr>
5996 * src/gram.h, src/gram.c (error_token_number): Remove, use
5998 * src/reader.c (reader): Don't specify the user token number (2)
5999 for $undefined, as it uselessly prevents using it.
6000 * src/gram.h (token_number_t): Move to...
6001 * src/symtab.h: here.
6002 (state_t.number): Is a token_number_t.
6003 * src/print.c, src/reader.c: Use undeftoken->number instead of
6005 (Even though this 2 is not the same as above: the number of the
6006 undeftoken remains being 2, it is its user token number which
6008 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
6009 `user_token_number_max'.
6010 Output `undef_token_number'.
6011 * data/bison.simple, data/bison.c++: Use them.
6012 Be sure to map invalid yylex return values to
6013 `undef_token_number'. This saves us from gratuitous SEGV.
6015 * tests/conflicts.at (Solved SR Conflicts)
6016 (Unresolved SR Conflicts): Adjust.
6017 * tests/regression.at (Web2c Actions): Adjust.
6019 2002-04-08 Akim Demaille <akim@epita.fr>
6021 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
6023 Remove the duplicate `typedefs'.
6024 (RhsNumberType): Fix the declaration and various other typos.
6026 * data/bison.simple: Use __ofile__.
6027 * src/scan-skel.l: Handle __ofile__.
6029 2002-04-08 Akim Demaille <akim@epita.fr>
6031 * src/gram.h (item_number_t): New, the type of item numbers in
6032 RITEM. Note that it must be able to code symbol numbers as
6033 positive number, and the negation of rule numbers as negative
6035 Adjust all dependencies (pretty many).
6036 * src/reduce.c (rule): Remove this `short *' pointer: use
6038 * src/system.h (MINSHORT, MAXSHORT): Remove.
6040 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
6042 (MAXTABLE): Move to...
6043 * src/output.c (MAXTABLE): here.
6044 (prepare_rules): Use output_int_table to output rhs.
6045 * data/bison.simple, data/bison.c++: Adjust.
6046 * tests/torture.at (Big triangle): Move the limit from 254 to
6048 * tests/regression.at (Web2c Actions): Ajust.
6050 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
6051 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
6052 passes, but produces negative #line number, once fixed, GCC is
6053 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
6055 * src/state.h (state_h): Code input lines on ints, not shorts.
6057 2002-04-08 Akim Demaille <akim@epita.fr>
6059 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
6060 and then the grammar.
6062 2002-04-08 Akim Demaille <akim@epita.fr>
6064 * src/system.h: No longer using strndup.
6066 2002-04-07 Akim Demaille <akim@epita.fr>
6068 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
6069 * src/output.c (output_table_data): Return the longest number.
6070 (prepare_tokens): Output `token_number_max').
6071 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
6073 Use them to define yy_token_number_type/TokenNumberType.
6074 Use this type for yytranslate.
6075 * tests/torture.at (Big triangle): Push the limit from 124 to
6077 * tests/regression.at (Web2c Actions): Adjust.
6079 2002-04-07 Akim Demaille <akim@epita.fr>
6081 * tests/torture.at (Big triangle): New.
6082 (GNU AWK Grammar, GNU Cim Grammar): Move to...
6083 * tests/existing.at: here.
6085 2002-04-07 Akim Demaille <akim@epita.fr>
6087 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
6089 Adjust dependencies.
6091 2002-04-07 Akim Demaille <akim@epita.fr>
6093 * src/reader.c: Normalize increments to prefix form.
6095 2002-04-07 Akim Demaille <akim@epita.fr>
6097 * src/reader.c, symtab.c: Remove debugging code.
6099 2002-04-07 Akim Demaille <akim@epita.fr>
6101 Rename all the `bucket's as `symbol_t'.
6103 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
6104 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
6105 * src/symtab.c, src/symtab.h (bucket): Rename as...
6107 (symbol_list_new, bucket_check_defined, bucket_make_alias)
6108 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
6109 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6110 (buckets_new, buckets_free, buckets_do): Rename as...
6111 (symbol_list_new, symbol_check_defined, symbol_make_alias)
6112 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
6113 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
6114 (symbols_new, symbols_free, symbols_do): these.
6116 2002-04-07 Akim Demaille <akim@epita.fr>
6118 Use lib/hash for the symbol table.
6120 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
6122 * src/lex.c (lex): Set the `number' member of new terminals.
6123 * src/reader.c (bucket_check_defined, bucket_make_alias)
6124 (bucket_check_alias_consistence, bucket_translation): New.
6125 (reader, grammar_free, readgram, token_translations_init)
6126 (packsymbols): Adjust.
6127 (reader): Number the predefined tokens.
6128 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
6129 for predefined tokens.
6130 * src/symtab.h (bucket): Remove all the hash table related
6132 * src/symtab.c (symtab): Replace by...
6133 (bucket_table): this.
6134 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6135 (buckets_new, buckets_do): New.
6137 2002-04-07 Akim Demaille <akim@epita.fr>
6139 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
6140 (start_symbol, max_user_token_number, semantic_parser)
6141 (error_token_number): Initialize.
6142 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
6145 (errtoken, eoftoken, undeftoken, axiom): Extern.
6147 2002-04-07 Akim Demaille <akim@epita.fr>
6149 * src/gram.h (rule_s): prec and precsym are now pointers
6150 to the bucket giving the priority/associativity.
6151 Member `associativity' removed: useless.
6152 * src/reduce.c, src/conflicts.c: Adjust.
6154 2002-04-07 Akim Demaille <akim@epita.fr>
6156 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
6157 Properly escape the symbols' TAG when outputting them.
6159 2002-04-07 Akim Demaille <akim@epita.fr>
6161 * src/lalr.h (LA): Is a bitsetv, not bitset*.
6163 2002-04-07 Akim Demaille <akim@epita.fr>
6165 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
6166 (LArule): this, which is an array to rule_t*.
6167 * src/print.c, src/conflicts.c: Adjust.
6169 2002-04-07 Akim Demaille <akim@epita.fr>
6171 * src/gram.h (rule_t): Rename `number' as `user_number'.
6172 `number' is a new member.
6173 Adjust dependencies.
6174 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
6176 2002-04-07 Akim Demaille <akim@epita.fr>
6178 As a result of the previous patch, it is no longer needed
6179 to reorder ritem itself.
6181 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
6183 2002-04-07 Akim Demaille <akim@epita.fr>
6185 Be sure never to walk through RITEMS, but use only data related to
6186 the rules themselves. RITEMS should be banished.
6188 * src/output.c (output_token_translations): Rename as...
6189 (prepare_tokens): this.
6190 In addition to `translate', prepare the muscles `tname' and
6191 `toknum', which were handled by...
6192 (output_rule_data): this.
6193 Remove, and move the remainder of its outputs into...
6194 (prepare_rules): this new routines, which also merges content from
6195 (output_gram): this.
6196 (prepare_rules): Be sure never to walk through RITEMS.
6197 (output_stos): Rename as...
6198 (prepare_stos): this.
6199 (output): Always invoke prepare_states, after all, just don't use it
6200 in the output if you don't need it.
6202 2002-04-07 Akim Demaille <akim@epita.fr>
6204 * src/LR0.c (new_state): Display `nstates' as the name of the
6205 newly created state.
6206 Adjust to initialize first_state and last_state if needed.
6207 Be sure to distinguish the initial from the final state.
6208 (new_states): Create the itemset of the initial state, and use
6210 * src/closure.c (closure): Now that the initial state has its
6211 items properly set, there is no need for a special case when
6214 As a result, now the rule 0, reducing to $axiom, is visible in the
6215 outputs. Adjust the test suite.
6217 * tests/conflicts.at (Solved SR Conflicts)
6218 (Unresolved SR Conflicts): Adjust.
6219 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
6220 * tests/conflicts.at (S/R in initial): New.
6222 2002-04-07 Akim Demaille <akim@epita.fr>
6224 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
6225 the RHS of the rules.
6226 * src/output.c (output_gram): Likewise.
6228 2002-04-07 Akim Demaille <akim@epita.fr>
6230 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
6232 Adjust all dependencies.
6233 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
6234 `number' of the buckets too.
6235 * src/gram.h: Include `symtab.h'.
6236 (associativity): Move to...
6237 * src/symtab.h: here.
6238 No longer include `gram.h'.
6240 2002-04-07 Akim Demaille <akim@epita.fr>
6242 * src/gram.h, src/gram.c (rules_rhs_length): New.
6243 (ritem_longest_rhs): Use it.
6244 * src/gram.h (rule_t): `number' is a new member.
6245 * src/reader.c (packgram): Set it.
6246 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
6247 the end of `rules', and count them out of `nrules'.
6248 (reduce_output, dump_grammar): Adjust.
6249 * src/print.c (print_grammar): It is no longer needed to check for
6250 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
6251 * tests/reduce.at (Reduced Automaton): New test.
6253 2002-04-07 Akim Demaille <akim@epita.fr>
6255 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
6256 lacking `+ 1' to nrules, Bison reported as useless a token if it
6257 was used solely to set the precedence of the last rule...
6259 2002-04-07 Akim Demaille <akim@epita.fr>
6261 * data/bison.c++, data/bison.simple: Don't output the current file
6262 name in #line, to avoid useless diffs between two identical
6263 outputs under different names.
6265 2002-04-07 Akim Demaille <akim@epita.fr>
6267 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
6268 Normalize loops to using `< nrules + 1', not `<= nrules'.
6270 2002-04-07 Akim Demaille <akim@epita.fr>
6274 2002-04-07 Akim Demaille <akim@epita.fr>
6276 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
6277 bucket.value as bucket.number.
6279 2002-04-07 Akim Demaille <akim@epita.fr>
6281 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
6282 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
6283 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
6284 RHS, instead of being an index in RITEMS.
6286 2002-04-04 Paul Eggert <eggert@twinsun.com>
6288 * doc/bison.texinfo: Update copyright date.
6289 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
6290 (Symbols): Warn about running Bison in one character set,
6291 but compiling and/or running in an incompatible one.
6292 Warn about character code 256, too.
6294 2002-04-03 Paul Eggert <eggert@twinsun.com>
6296 * src/bison.data (YYSTACK_ALLOC): Depend on whether
6297 YYERROR_VERBOSE is nonzero, not whether it is defined.
6299 Merge changes from bison-1_29-branch.
6301 2002-03-20 Paul Eggert <eggert@twinsun.com>
6303 Merge fixes from Debian bison_1.34-1.diff.
6305 * configure.in (AC_PREREQ): 2.53.
6307 2002-03-20 Akim Demaille <akim@epita.fr>
6309 * src/conflicts.c (log_resolution): Argument `resolution' is const.
6311 2002-03-19 Paul Eggert <eggert@twinsun.com>
6313 * src/bison.simple (YYCOPY): New macro.
6314 (YYSTACK_RELOCATE): Use it.
6315 Remove Type arg; no longer needed. All callers changed.
6316 (yymemcpy): Remove; no longer needed.
6318 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
6319 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6321 2002-03-19 Akim Demaille <akim@epita.fr>
6323 Test and fix the #line outputs.
6325 * tests/atlocal.at (GCC): New.
6326 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
6327 (Prologue synch line, ,%union synch line, Postprologue synch line)
6328 (Action synch line, Epilogue synch line): New tests.
6329 * src/reader.c (parse_union_decl): Define the muscle stype_line.
6330 * data/bison.simple, data/bison.c++: Use it.
6332 2002-03-19 Akim Demaille <akim@epita.fr>
6334 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
6335 (Solved SR Conflicts, %expect not enough, %expect right)
6336 (%expect too much): Move to...
6337 * tests/conflicts.at: this new file.
6339 2002-03-19 Akim Demaille <akim@epita.fr>
6341 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6342 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
6343 that we can move to enums for instance.
6344 * src/output.c (token_definitions_output): Output a list of
6345 `token-name, token-number' instead of the #define.
6346 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
6348 2002-03-14 Akim Demaille <akim@epita.fr>
6352 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
6354 * data/bison.c++: Make the user able to add members to the generated
6355 parser by subclassing.
6357 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
6359 * src/reader.c (read_additionnal_code): `c' should be an integer, not
6361 Reported by Nicolas Tisserand and Nicolas Burrus.
6363 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6365 * src/reader.c: Warn about lacking semi-colons, do not complain.
6367 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6369 * data/bison.c++: Remove a debug line.
6371 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6373 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
6374 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
6375 provide a default implementation.
6377 2002-03-04 Akim Demaille <akim@epita.fr>
6379 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
6380 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
6381 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
6382 * tests/semantic.at (Parsing Guards): Similarly.
6383 * src/reader.at (readgram): Complain if the last rule is not ended
6386 2002-03-04 Akim Demaille <akim@epita.fr>
6388 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
6389 * src/closure.c: here.
6390 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
6392 * src/warshall.h, src/warshall.c: Remove.
6393 * tests/sets.at (Broken Closure): Adjust.
6395 2002-03-04 Akim Demaille <akim@epita.fr>
6397 * src/output.c (output_skeleton): tempdir is const.
6398 bytes_read is unused.
6400 2002-03-04 Akim Demaille <akim@epita.fr>
6402 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6403 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
6407 2002-03-04 Akim Demaille <akim@epita.fr>
6409 * src/closure.c (closure): `r' is unused.
6411 2002-03-04 Akim Demaille <akim@epita.fr>
6413 * tests/sets.at (Broken Closure): Add the ending `;'.
6414 * src/reader.at (readgram): Complain if a rule is not ended with a
6417 2002-03-04 Akim Demaille <akim@epita.fr>
6419 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
6420 (count_sr_conflicts): Use bitset_count.
6421 * src/reduce.c (inaccessable_symbols): Ditto.
6422 (bits_size): Remove.
6423 * src/warshall.h, src/warshall.c: Convert to bitsetv.
6425 2002-03-04 Akim Demaille <akim@epita.fr>
6427 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
6428 * src/reduce.c: Remove the `bitset_zero's following the
6429 `bitset_create's, as now it is performed by the latter.
6431 2002-03-04 Akim Demaille <akim@epita.fr>
6433 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
6434 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
6435 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
6436 latest sources from Michael.
6438 2002-03-04 Akim Demaille <akim@epita.fr>
6440 * src/output.c (output): Don't free the grammar.
6441 * src/reader.c (grammar_free): New.
6442 * src/main.c (main): Call it and don't free symtab here.
6444 2002-03-04 Akim Demaille <akim@epita.fr>
6446 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
6448 Reported by Benoit Perrot.
6450 2002-03-04 Akim Demaille <akim@epita.fr>
6452 Use bitset operations when possible, not loops over bits.
6454 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
6456 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
6457 * src/reduce.c (useless_nonterminals): Formatting changes.
6458 * src/warshall.c (TC): Use bitset_or.
6460 2002-03-04 Akim Demaille <akim@epita.fr>
6462 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
6463 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
6466 2002-03-04 Akim Demaille <akim@epita.fr>
6468 * src/lalr.c (F): Now a bitset*.
6469 Adjust all dependencies.
6471 2002-03-04 Akim Demaille <akim@epita.fr>
6473 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
6474 Adjust all dependencies.
6476 2002-03-04 Akim Demaille <akim@epita.fr>
6478 * src/L0.c, src/LR0.h (nstates): Be size_t.
6479 Adjust comparisons (signed vs unsigned).
6480 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
6482 Adjust all dependencies.
6484 2002-03-04 Akim Demaille <akim@epita.fr>
6486 * src/closure.c (firsts): Now, also a bitset.
6487 Adjust all dependencies.
6488 (varsetsize): Remove, now unused.
6489 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
6491 2002-03-04 Akim Demaille <akim@epita.fr>
6493 * src/print.c: Convert to use bitset.h, not hand coded iterations
6496 2002-03-04 Akim Demaille <akim@epita.fr>
6498 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
6500 2002-03-04 Akim Demaille <akim@epita.fr>
6502 * src/closure.c (ruleset): Be a bitset.
6503 (rulesetsize): Remove.
6505 2002-03-04 Akim Demaille <akim@epita.fr>
6507 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6508 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
6509 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
6510 * src/closure.c (fderives): Be an array of bitsets.
6512 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
6514 * data/bison.c++: Merge the two generated headers. Insert a copyright
6515 notice in each output file.
6517 2002-02-28 Akim Demaille <akim@epita.fr>
6519 * data/bison.c++: Copy the prologue of bison.simple to fetch
6520 useful M4 definitions, such as b4_header_guard.
6522 2002-02-25 Akim Demaille <akim@epita.fr>
6524 * src/getargs.c (version): Give the name of the authors, and use a
6525 translator friendly scheme for the bgr
6528 2002-02-25 Akim Demaille <akim@epita.fr>
6530 * src/output.c (header_output): Remove, now handled completely via
6533 2002-02-25 Akim Demaille <akim@epita.fr>
6535 * m4/m4.m4: New, from CVS Autoconf.
6536 * configure.in: Invoke it.
6537 * src/output.c (output_skeleton): Use its result instead of the
6540 2002-02-25 Akim Demaille <akim@epita.fr>
6542 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
6544 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
6545 * src/output.c (output_skeleton): Use mkstemp to create a real
6547 Move the filling of `skeleton' and its muscle to...
6549 (output): Move the definition of the prologue muscle to...
6551 * src/system.h (DEFAULT_TMPDIR): New.
6553 2002-02-14 Paul Eggert <eggert@twinsun.com>
6555 Remove the support for C++ namespace cleanliness; it was
6556 causing more problems than it was curing, since it didn't work
6557 properly on some nonstandard C++ compilers. This can wait
6558 for a proper C++ parser.
6560 * NEWS: Document this.
6561 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
6562 of C++, as it's treated like C now.
6563 * src/bison.simple (YYSTD): Remove.
6564 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
6565 Treat C++ just like Standard C instead of trying to support
6566 namespace cleanliness.
6568 2002-02-14 Akim Demaille <akim@epita.fr>
6570 * tests/regression.at (else): Adjust to Andreas' change.
6572 2002-02-14 Akim Demaille <akim@epita.fr>
6574 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
6576 2002-02-13 Andreas Schwab <schwab@suse.de>
6578 * src/output.c (output_rule_data): Don't output NULL, it might
6581 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
6583 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6584 (Copyright notice): Update.
6586 2002-02-11 Akim Demaille <akim@epita.fr>
6588 * tests/regression.at (%nonassoc and eof): Don't include
6589 nonportable headers.
6591 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
6593 * data/bison.c++: Correct error recovery. Make the user able to
6594 initialize the starting location.
6596 2002-02-07 Akim Demaille <akim@epita.fr>
6598 * tests/input.at: New.
6600 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6602 * data/bison.c++: Replace some direct m4 expansions by constants. Be
6603 more consistent when naming methods and variables. Put preprocessor
6604 directives around tables only needed for debugging.
6606 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6608 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6610 (yy::b4_name::parse): Use print_.
6612 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6614 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6616 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6618 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6620 (yy::b4_name::parse): Build verbose error messages, and use error_.
6622 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6624 * data/bison.c++: Fix m4 quoting in comments.
6626 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6628 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6631 2002-02-05 Akim Demaille <akim@epita.fr>
6633 * data/bison.c++: Adjust to the M4 back end.
6634 More is certainly needed.
6636 2002-02-05 Akim Demaille <akim@epita.fr>
6638 Give a try to M4 as a back end.
6640 * lib/readpipe.c: New, from wdiff.
6641 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6643 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6644 specific values. Now it is m4 that performs the lookup.
6645 * src/parse-skel.y: Remove.
6646 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6647 * src/output.c (actions_output, guards_output)
6648 (token_definitions_output): No longer keeps track of the output
6649 line number, hence remove the second argument.
6650 (guards_output): Check against the guard member of a rule, not the
6653 (output_skeleton): Don't look for the skeleton location, let m4 do
6655 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6657 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6658 (prepare): Given that for the time being changesyntax is not
6659 usable in M4, rename the muscles using `-' to `_'.
6660 Define `defines_flag', `output_parser_name' and `output_header_name'.
6661 * src/output.h (actions_output, guards_output)
6662 (token_definitions_output): Adjust prototypes.
6663 * src/scan-skel.l: Instead of scanning the skeletons, it now
6664 processes the output of m4: `__oline__' and `#output'.
6665 * data/bison.simple: Adjust to be used by M4(sugar).
6666 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6668 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6669 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6670 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6671 shamelessly stolen from CVS Autoconf.
6673 2002-02-05 Akim Demaille <akim@epita.fr>
6675 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
6676 * configure.in: Check for the declarations of free and malloc.
6677 * src/muscle_tab.c: Adjust.
6679 2002-02-05 Akim Demaille <akim@epita.fr>
6681 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
6682 which have no values.
6684 2002-02-05 Akim Demaille <akim@epita.fr>
6686 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
6689 2002-01-29 Paul Eggert <eggert@twinsun.com>
6691 * src/bison.simple (YYSIZE_T): Do not define merely because
6692 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
6693 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6695 2002-01-27 Akim Demaille <akim@epita.fr>
6697 Fix `%nonassoc and eof'.
6699 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
6700 which were not properly copied! Replace
6701 memcpy (res->errs, src->errs, src->nerrs);
6703 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
6705 * tests/regression.at (%nonassoc and eof): Adjust to newest
6706 Autotest: `.' is not in the PATH.
6708 2002-01-27 Akim Demaille <akim@epita.fr>
6710 * tests/sets.at (AT_EXTRACT_SETS): New.
6714 2002-01-26 Akim Demaille <akim@epita.fr>
6716 * tests/actions.at, tests/calc.at, tests/headers.at,
6717 * tests/torture.at: Adjust to the newest Autotest which no longer
6718 forces `.' in the PATH.
6720 2002-01-25 Akim Demaille <akim@epita.fr>
6722 * tests/regression.at (%nonassoc and eof): New.
6723 Suggested by Robert Anisko.
6725 2002-01-24 Akim Demaille <akim@epita.fr>
6727 Bison dumps core when trying to complain about broken input files.
6728 Reported by Cris van Pelt.
6730 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
6731 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
6733 (Invalid inputs): Strengthen: exercise parse_percent_token.
6735 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
6737 * src/Makefile.am: Add bison.c++.
6738 * src/bison.c++: New skeleton.
6740 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
6744 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6746 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
6748 2002-01-20 Marc Autret <marc@gnu.org>
6750 * src/files.c (compute_output_file_names): Fix
6752 2002-01-20 Marc Autret <marc@gnu.org>
6754 * tests/output.at: New test.
6755 * src/files.c (compute_base_names): Don't map extensions when
6756 the YACC flag is set, use defaults.
6757 Reported by Evgeny Stambulchik.
6759 2002-01-20 Marc Autret <marc@gnu.org>
6761 * src/system.h: Need to define __attribute__ away for non-GCC
6762 compilers as well (i.e. the vendor C compiler).
6763 Suggested by Albert Chin-A-Young.
6765 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
6767 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
6768 canonical definition.
6769 * src/system.h: Use the canonical definition for PARAMS (avoids
6770 a conflict with the macro from lib/hash.h).
6772 2002-01-11 Akim Demaille <akim@epita.fr>
6774 * configure.in: Use AC_FUNC_STRNLEN.
6775 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
6777 2002-01-09 Akim Demaille <akim@epita.fr>
6779 * src/files.c, src/files.h (output_infix): New.
6780 (tab_extension): Remove.
6781 (compute_base_names): Compute the former, drop the latter.
6782 * src/output.c (prepare): Insert the muscles `output-infix', and
6784 * src/parse-skel.y (string, string.1): New.
6785 (section.header): Use it.
6786 (section.yacc): Remove.
6787 (prefix): Remove too.
6788 * src/scan-skel.l: Adjust.
6789 * src/bison.simple, src/bison.hairy: Adjust.
6791 2002-01-09 Akim Demaille <akim@epita.fr>
6793 * configure.in (WERROR_CFLAGS): Compute it.
6794 * src/Makefile.am (CFLAGS): Pass it.
6795 * tests/atlocal.in (CFLAGS): Idem.
6796 * src/files.c: Fix a few warnings.
6797 (get_extension_index): Remove, unused.
6799 2002-01-08 Akim Demaille <akim@epita.fr>
6801 * src/getargs.c (AS_FILE_NAME): New.
6802 (getargs): Use it to convert DOSish file names.
6803 * src/files.c (base_name): Rename as full_base_name to avoid
6804 clashes with `base_name ()'.
6805 (filename_split): New.
6806 (compute_base_names): N-th rewrite, using filename_split.
6808 2002-01-08 Akim Demaille <akim@epita.fr>
6810 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
6811 New, stolen from the Fileutils 4.1.
6812 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6813 * configure.in: Check for the presence of memrchr, and of its
6816 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
6818 * lib/hash.h (__P): Added definition for this macro.
6819 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
6820 BUILT_SOURCES, to ensure they are generated first.
6821 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
6822 %error-verbose to allow bootstrapping with bison 1.30x.
6824 2002-01-06 Akim Demaille <akim@epita.fr>
6826 * src/reader.c (parse_braces): Don't fetch the next char, the
6827 convention is to fetch on entry.
6828 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
6829 'switch' without a following semicolon.
6830 * tests/regression.at (braces parsing): New.
6832 2002-01-06 Akim Demaille <akim@epita.fr>
6834 Bison is dead wrong in its RR conflict reports.
6836 * tests/torture.at (GNU Cim Grammar): New.
6837 * src/conflicts.c (count_rr_conflicts): Fix.
6839 2002-01-06 Akim Demaille <akim@epita.fr>
6841 Creating package.m4 from configure.ac causes too many problems.
6843 * tests/Makefile.am (package.m4): Create it by hand,
6844 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
6846 2002-01-06 Akim Demaille <akim@epita.fr>
6848 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
6851 2002-01-04 Paul Eggert <eggert@twinsun.com>
6853 * doc/bison.texinfo (Debugging):
6854 Remove YYSTDERR; it's no longer defined or used.
6855 Also, s/cstdio.h/cstdio/.
6857 2002-01-03 Akim Demaille <akim@epita.fr>
6859 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
6861 2002-01-03 Akim Demaille <akim@epita.fr>
6863 * src/parse-skel.y (process_skeleton): Don't bind the parser's
6864 tracing code to --trace, wait for a better --trace option, with
6867 2002-01-03 Akim Demaille <akim@epita.fr>
6869 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
6870 The ISO C++ standard is extremely clear about it: stderr is
6871 considered a macro, not a regular symbol (see table 94 `Header
6872 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
6873 Therefore std:: does not apply to it. It still does with fprintf.
6874 Also, s/cstdio.h/cstdio/.
6876 2002-01-03 Akim Demaille <akim@epita.fr>
6878 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
6879 for non system headers.
6881 2002-01-02 Akim Demaille <akim@epita.fr>
6883 Equip the skeleton chain with location tracking, runtime trace,
6884 pure parser and scanner.
6886 * src/parse-skel.y: Request a pure parser, locations, and prefix
6888 (%union): Having several members with the same type does not help
6889 type mismatches, simplify.
6890 (YYPRINT, yyprint): New.
6891 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
6894 * src/scan-skel.l: Adjust to these changes.
6895 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
6896 (LOCATION_PRINT, skel_control_t): New.
6898 2001-12-30 Akim Demaille <akim@epita.fr>
6900 * src/parse-skel.y: Get rid of the shift/reduce conflict:
6901 replace `gb' with BLANKS.
6902 * src/scan-skel.l: Adjust.
6904 2001-12-30 Akim Demaille <akim@epita.fr>
6906 * src/system.h: We don't need nor want bcopy.
6907 Throw away MS-DOS crap: we don't need getpid.
6908 * configure.in: We don't need strndup. It was even causing
6909 problems: because Flex includes the headers *before* us,
6910 _GNU_SOURCE is not defined by config.h, and therefore strndup was
6912 * lib/xstrndup.c: New.
6913 * src/scan-skel.l: Use it.
6914 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
6915 * src/parse-skel.y: Use %directives instead of #defines.
6917 2001-12-30 Akim Demaille <akim@epita.fr>
6919 * src/skeleton.h: New.
6920 * src/output.c (output_parser, output_master_parser): Remove, dead
6922 * src/output.h (get_lines_number, actions_output, guards_output)
6923 (token_definitions_output): Prototype them.
6924 * src/parse-skel.y: Add the license notice.
6925 Include output.h and skeleton.h.
6926 (process_skeleton): Returns void, and takes a single parameter.
6927 * src/scan-skel.l: Add the license notice.
6929 Don't use %option yylineno: it seems that then Flex imagines
6930 REJECT has been used, and therefore it won't reallocate its
6931 buffers (which makes no other sense to me than a bug). It results
6932 in warnings for `unused: yy_flex_realloc'.
6934 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
6936 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6937 (MUSCLE_INSERT_PREFIX): ...to there.
6938 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6939 (MUSCLE_INSERT_PREFIX): Move from here...
6941 * src/bison.hairy: Add a section directive. Put braces around muscle
6942 names. This parser skeleton is still broken, but Bison should not
6943 choke on a bad muscle 'syntax'.
6944 * src/bison.simple: Add a section directive. Put braces around muscle
6947 * src/files.h (strsuffix, stringappend): Add declarations.
6948 (tab_extension): Add declaration.
6949 (short_base_name): Add declaration.
6951 * src/files.c (strsuffix, stringappend): No longer static. These
6952 functions are used in the skeleton parser.
6953 (tab_extension): New.
6954 (compute_base_names): Use the computations done in this function
6955 to guess if the generated parsers should have '.tab' in their
6957 (short_base_name): No longer static.
6959 * src/output.c (output_skeleton): New.
6960 (output): Disable call to output_master_parser, and give a try to
6961 a new skeleton handling system.
6962 (guards_output, actions_output): No longer static.
6963 (token_definitions_output, get_lines_number): No longer static.
6965 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
6967 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
6970 * src/parse-skel.y: New file.
6971 * src/scan-skel.l: New file.
6973 2001-12-29 Akim Demaille <akim@epita.fr>
6975 %name-prefix is broken.
6977 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
6978 Adjust all dependencies.
6979 * tests/headers.at (export YYLTYPE): Strengthen this test: use
6982 Renaming yylval but not yylloc is not consistent. Now we do.
6984 * src/bison.simple: Prefix yylloc if used.
6985 * doc/bison.texinfo (Decl Summary): Document that.
6987 2001-12-29 Akim Demaille <akim@epita.fr>
6989 * doc/bison.texinfo: Promote `%long-directive' over
6991 Remove all references to fixed-output-files, yacc is enough.
6993 2001-12-29 Akim Demaille <akim@epita.fr>
6995 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
6996 user prologue. These are defaults.
6997 * tests/actions.at (Mid-rule actions): Make sure the user can
6998 define YYDEBUG and YYERROR_VERBOSE.
7000 2001-12-29 Akim Demaille <akim@epita.fr>
7002 * src/output.c (header_output): Don't forget to export YYLTYPE and
7004 * tests/headers.at (export YYLTYPE): New, make sure it does.
7005 * tests/regression.at (%union and --defines, Invalid CPP headers):
7007 * tests/headers.at: here.
7009 2001-12-29 Akim Demaille <akim@epita.fr>
7011 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
7013 2001-12-29 Akim Demaille <akim@epita.fr>
7015 * tests/actions.at (Mid-rule actions): Output on a single line
7018 2001-12-29 Akim Demaille <akim@epita.fr>
7020 * doc/bison.texinfo: Formatting changes.
7022 2001-12-29 Akim Demaille <akim@epita.fr>
7024 Don't store the token defs in a muscle, just be ready to output it
7025 on command. Now possible via `symbols'. Fixes a memory leak.
7027 * src/output.c (token_definitions_output): New.
7028 (output_parser, header_output): Use it.
7029 * src/reader.c (symbols_save): Remove.
7031 2001-12-29 Akim Demaille <akim@epita.fr>
7033 * src/bison.simple: Do not provide a default for YYSTYPE and
7034 YYLTYPE before the user's prologue. Otherwise it's hardly... a
7037 2001-12-29 Akim Demaille <akim@epita.fr>
7039 Mid-rule actions are simply... ignored!
7041 * src/reader.c (readgram): Be sure to attach mid-rule actions to
7042 the empty-rule associated to the dummy symbol, not to the host
7044 * tests/actions.at (Mid-rule actions): New.
7046 2001-12-29 Akim Demaille <akim@epita.fr>
7050 * src/reader.c (reader): Free grammar.
7052 2001-12-29 Akim Demaille <akim@epita.fr>
7056 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
7057 since it allocates it for each state, although only one is needed.
7058 (allocate_storage): Do it here.
7060 2001-12-29 Akim Demaille <akim@epita.fr>
7062 * src/options.h, src/options.c (create_long_option_table): Rename
7064 (long_option_table_new): this, with a clearer prototype.
7065 (percent_table): Remove, unused,
7066 * src/getargs.c (getargs): Adjust.
7068 2001-12-29 Akim Demaille <akim@epita.fr>
7070 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
7071 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
7074 2001-12-29 Akim Demaille <akim@epita.fr>
7076 * src/lalr.c (build_relations): Rename `states' as `states1'.
7077 Sorry, I don't understand exactly what it is, no better name...
7079 2001-12-29 Akim Demaille <akim@epita.fr>
7081 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
7082 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
7083 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
7086 2001-12-29 Akim Demaille <akim@epita.fr>
7088 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
7091 2001-12-29 Akim Demaille <akim@epita.fr>
7093 * src/reader.c, src/reader.h (user_toknums): Remove.
7094 Adjust all users to use symbols[i]->user_token_number.
7096 2001-12-29 Akim Demaille <akim@epita.fr>
7098 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
7099 Adjust all users to use symbols[i]->prec or ->assoc.
7101 2001-12-29 Akim Demaille <akim@epita.fr>
7103 * src/reader.c, src/reader.h (tags): Remove.
7104 Adjust all users to use symbols[i]->tag.
7106 2001-12-29 Akim Demaille <akim@epita.fr>
7108 * src/gram.h, src/gram.c (symbols): New, similar to state_table
7110 * src/reader.c (packsymbols): Fill this table.
7112 * src/conflicts.c (resolve_sr_conflict): Adjust.
7113 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
7115 Use symbols[i]->tag instead of tags[i].
7117 2001-12-29 Akim Demaille <akim@epita.fr>
7119 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
7120 In addition, put a comment in there, to replace...
7121 * tests/regression.at (%union and C comments): Remove.
7123 2001-12-29 Akim Demaille <akim@epita.fr>
7125 * tests/regression.at (Web2c Actions): Blindly move the actual
7126 output as expected output. The contents *seem* right to me, but I
7127 can't pretend reading perfectly parser tables... Nonetheless, all
7128 the other tests pass correctly, the table look OK, even though the
7129 presence of `$axiom' is to be noted: AFAICS it is useless (but
7132 2001-12-29 Akim Demaille <akim@epita.fr>
7134 * src/reader.c (readgram): Don't add the rule 0 if there were no
7135 rules read. In other words, add it _after_ having performed
7136 grammar sanity checks.
7137 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
7139 2001-12-29 Akim Demaille <akim@epita.fr>
7141 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
7142 visible, and some states have now a different number.
7144 2001-12-29 Akim Demaille <akim@epita.fr>
7146 * src/reader.c (readgram): Bind the initial rule's lineno to that
7148 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
7149 (Solved SR Conflicts): Adjust rule 0's line number.
7151 2001-12-29 Akim Demaille <akim@epita.fr>
7153 Fix the `GAWK Grammar' failure.
7155 * src/LR0.c (final_state): Initialize to -1 so that we do compute
7156 the reductions of the first state which was mistakenly confused
7157 with the final state because precisely final_state was initialized
7159 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
7160 now noticed by Bison.
7161 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
7162 have a reduction on $default.
7164 2001-12-29 Akim Demaille <akim@epita.fr>
7166 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
7168 * src/closure.c (print_closure): Likewise.
7169 * src/derives.c (print_derives): Likewise.
7170 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
7173 2001-12-29 Akim Demaille <akim@epita.fr>
7175 * src/lalr.c (lookaheads_print): New.
7176 (lalr): Call it when --trace-flag.
7177 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
7180 2001-12-29 Akim Demaille <akim@epita.fr>
7182 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
7183 when walking through ritem, even via rule->rhs.
7184 * src/reduce.c (dump_grammar, useful_production, reduce_output)
7185 (useful_production, useless_nonterminals): Likewise.
7186 (reduce_grammar_tables): Likewise, plus update nritems.
7187 * src/nullable.c (set_nullable): Likewise.
7188 * src/lalr.c (build_relations): Likewise.
7189 * tests/sets.at (Nullable): Adjust.
7190 Fortunately, now, the $axiom is no longer nullable.
7192 2001-12-29 Akim Demaille <akim@epita.fr>
7194 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
7196 * src/gram.c (ritem_longest_rhs): Likewise.
7197 * src/reduce.c (nonterminals_reduce): Likewise.
7198 * src/print_graph.c (print_graph): Likewise.
7199 * src/output.c (output_rule_data): Likewise.
7200 * src/nullable.c (set_nullable): Likewise.
7202 2001-12-29 Akim Demaille <akim@epita.fr>
7204 * src/output.c: Comment changes.
7206 2001-12-27 Paul Eggert <eggert@twinsun.com>
7208 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
7209 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
7210 Sparc, as they were causing more porting problems than the
7211 (minor) performance improvement was worth.
7213 Also, catch up with 1.31's YYSTD.
7215 2001-12-27 Akim Demaille <akim@epita.fr>
7217 * src/output.c (output_gram): Rely on nritems, not the
7218 0-sentinel. See below.
7219 Use -1 as separator, not 0.
7220 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
7221 Rely on -1 as separator in yyrhs, instead of 0.
7222 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
7223 twice `Now at end of input', therefore there are two lines less to
7226 2001-12-27 Akim Demaille <akim@epita.fr>
7228 * tests/regression.at (Unresolved SR Conflicts):
7229 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
7232 2001-12-27 Akim Demaille <akim@epita.fr>
7234 * src/LR0.c (new_state): Recognize the final state by the fact it
7235 is reached by eoftoken.
7236 (insert_start_shifting_state, insert_eof_shifting_state)
7237 (insert_accepting_state, augment_automaton): Remove, since now
7238 these states are automatically computed from the initial state.
7239 (generate_states): Adjust.
7240 * src/print.c: When reporting a rule number to the user, substract
7241 1, so that the axiom rule is rule 0, and the first user rule is 1.
7242 * src/reduce.c: Likewise.
7243 * src/print_graph.c (print_core): For the time being, just as for
7244 the report, depend upon --trace-flags to dump the full set of
7246 * src/reader.c (readgram): Once the grammar read, insert the rule
7247 0: `$axiom: START-SYMBOL $'.
7248 * tests/set.at: Adjust: rule 0 is now displayed, and since the
7249 number of the states has changed (the final state is no longer
7250 necessarily the last), catch up.
7252 2001-12-27 Akim Demaille <akim@epita.fr>
7254 Try to make the use of the eoftoken valid. Given that its value
7255 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
7256 is used instead of > 0 where appropriate, (ii), depend upon nritems
7257 instead of the 0-sentinel.
7259 * src/gram.h, src/gram.c (nritems): New.
7260 Expected to be duplication of nitems, but for the time being...
7261 * src/reader.c (packgram): Assert nritems and nitems are equal.
7262 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
7263 * src/closure.c (print_closure, print_fderives): Likewise.
7264 * src/gram.c (ritem_print): Likewise.
7265 * src/print.c (print_core, print_grammar): Likewise.
7266 * src/print_graph.c: Likewise.
7268 2001-12-27 Akim Demaille <akim@epita.fr>
7270 * src/main.c (main): If there are complains after grammar
7271 reductions, then output the report anyway if requested, then die.
7272 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
7273 * src/reader.c (eoftoken): New.
7274 (parse_token_decl): If the token being defined has value `0', it
7276 (packsymbols): No longer hack `tags' to insert `$' by hand.
7277 Be sure to preserve the value of the eoftoken.
7278 (reader): Make sure eoftoken is defined.
7279 Initialize nsyms to 0: now eoftoken is created just like the others.
7280 * src/print.c (print_grammar): Don't special case the eof token.
7281 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
7282 lie anyway, albeit pleasant.
7283 * tests/calc.at: Exercise error messages with eoftoken.
7284 Change the grammar so that empty input is invalid.
7285 Adjust expectations.
7286 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
7288 2001-12-27 Akim Demaille <akim@epita.fr>
7290 * configure.in: Check the protos of strchr ans strspn.
7291 Replace strchr if needed.
7292 * src/system.h: Provide the protos of strchr, strspn and memchr if
7294 * lib/strchr.c: New.
7295 * src/reader.c (symbols_save): Use strchr.
7297 2001-12-27 Akim Demaille <akim@epita.fr>
7299 * src/print.c, src/print_graph.c (escape): New.
7300 Use it to quote the TAGS outputs.
7301 * src/print_graph.c (print_state): Now errors are in red, and
7302 reductions in green.
7303 Prefer high to wide: output the state number on a line of its own.
7305 2001-12-27 Akim Demaille <akim@epita.fr>
7307 * src/state.h, src/state.c (reductions_new): New.
7308 * src/LR0.c (set_state_table): Let all the states have a
7309 `reductions', even if reduced to 0.
7310 (save_reductions): Adjust.
7311 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
7312 * src/print.c (print_reductions, print_actions): Adjust.
7313 * src/output.c (action_row): Adjust.
7315 2001-12-27 Akim Demaille <akim@epita.fr>
7317 * src/state.h, src/state.c (errs_new, errs_dup): New.
7318 * src/LR0.c (set_state_table): Let all the states have an errs,
7319 even if reduced to 0.
7320 * src/print.c (print_errs, print_reductions): Adjust.
7321 * src/output.c (output_actions, action_row): Adjust.
7322 * src/conflicts.c (resolve_sr_conflict): Adjust.
7324 2001-12-27 Akim Demaille <akim@epita.fr>
7326 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
7328 2001-12-27 Akim Demaille <akim@epita.fr>
7330 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
7331 * src/print.c: here.
7332 (lookaheadset, shiftset): New, used as additional storage by
7334 (print_results): Adjust.
7335 (print_shifts, print_gotos, print_errs): New, extracted from...
7336 (print_actions): here.
7337 * src/print_graph.c (print_actions): Remove dead code.
7339 2001-12-27 Akim Demaille <akim@epita.fr>
7341 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
7344 2001-12-27 Akim Demaille <akim@epita.fr>
7346 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
7347 (build_relations): Adjust.
7349 2001-12-27 Akim Demaille <akim@epita.fr>
7351 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
7354 2001-12-27 Akim Demaille <akim@epita.fr>
7356 * src/reader.c (packgram): Catch nitems overflows.
7358 2001-12-27 Akim Demaille <akim@epita.fr>
7360 * src/files.c, src/files.h (guard_obstack): Remove.
7361 * src/output.c (output): Adjust.
7362 * src/reader.c (parse_braces): New, factoring...
7363 (copy_action, copy_guard): these two which are renamed as...
7364 (parse_action, parse_guard): these.
7365 As a voluntary consequence, using braces around guards is now
7368 2001-12-27 Akim Demaille <akim@epita.fr>
7370 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
7371 * src/reader.c (symbol_list): `guard' and `guard_line' are new
7373 (symbol_list_new): Adjust.
7374 (copy_action): action_line is the first line, not the last.
7375 (copy_guard): Just as for actions, store the `action' only, not
7376 the switch/case/break flesh.
7377 Don't parse the user action that might follow the guard, let...
7378 (readgram): do it, i.e., now, there can be an action after a
7380 In other words the guard is just explicitly optional.
7382 * src/output.c (guards_output): New.
7383 (output_parser): Call it when needed.
7384 (output): Also free the guard and attrs obstacks.
7385 * src/files.c, src/files.h (obstack_save): Remove.
7386 (output_files): Remove.
7387 As a result, if one needs the former `.act' file, using an
7388 appropriate skeleton which requires actions and guards is now
7390 * src/main.c (main): Adjust.
7391 * tests/semantic.at: New.
7392 * tests/regression.at: Use `input.y' as input file name.
7393 Avoid 8+3 problems by requiring input.c when the test needs the
7396 2001-12-27 Akim Demaille <akim@epita.fr>
7398 * src/reader.c (symbol_list_new): Be sure to initialize all the
7401 2001-12-27 Akim Demaille <akim@epita.fr>
7403 All the hacks using a final pseudo state are now useless.
7405 * src/LR0.c (set_state_table): state_table holds exactly nstates.
7406 * src/lalr.c (nLA): New.
7407 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
7408 instead of lookaheadsp from the pseudo state (nstate + 1).
7410 2001-12-27 Akim Demaille <akim@epita.fr>
7412 * src/output.c (action_row, token_actions): Use a state_t instead
7413 of a integer, and nlookaheads instead of the following state's
7416 2001-12-27 Akim Demaille <akim@epita.fr>
7418 * src/conflicts.c (log_resolution, flush_shift)
7419 (resolve_sr_conflict, set_conflicts, solve_conflicts)
7420 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
7421 (conflicts_print, print_reductions): Use a state_t instead of an
7422 integer when referring to a state.
7423 As much as possible, depend upon nlookaheads, instead of the
7424 `lookaheadsp' member of the following state (since lookaheads of
7425 successive states are successive, the difference between state n + 1
7426 and n served as the number of lookaheads for state n).
7427 * src/lalr.c (add_lookback_edge): Likewise.
7428 * src/print.c (print_core, print_actions, print_state)
7429 (print_results): Likewise.
7430 * src/print_graph.c (print_core, print_actions, print_state)
7431 (print_graph): Likewise.
7432 * src/conflicts.h: Adjust.
7434 2001-12-27 Akim Demaille <akim@epita.fr>
7436 * src/bison.hairy: Formatting/comment changes.
7438 Remove `register' indications.
7439 Add plenty of `static'.
7441 2001-12-27 Akim Demaille <akim@epita.fr>
7443 * src/output.c (prepare): Drop the muscle `ntbase' which
7445 * src/bison.simple: Formatting/comment changes.
7446 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
7447 is an undocumented synonym.
7449 2001-12-22 Akim Demaille <akim@epita.fr>
7451 * src/output.c (output_table_data): Change the prototype to use
7452 `int' for array ranges: some invocations do pass an int, not a
7454 Reported by Wayne Green.
7456 2001-12-22 Akim Demaille <akim@epita.fr>
7458 Some actions of web2c.y are improperly triggered.
7459 Reported by Mike Castle.
7461 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
7462 * tests/regression.at (Web2c): Rename as...
7463 (Web2c Report): this.
7464 (Web2c Actions): New.
7466 2001-12-22 Akim Demaille <akim@epita.fr>
7468 Reductions in web2c.y are improperly reported.
7469 Reported by Mike Castle.
7471 * src/conflicts.c (print_reductions): Fix.
7472 * tests/regression.at (Web2c): New.
7474 2001-12-18 Akim Demaille <akim@epita.fr>
7476 Some host fail on `assert (!"foo")', which expands to
7477 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
7478 Reported by Nelson Beebee.
7480 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
7481 `#define it_succeeded 0' and `assert (it_succeeded)'.
7483 2001-12-17 Marc Autret <autret_m@epita.fr>
7485 * src/bison.simple: Don't hard code the skeleton line and filename.
7486 * src/output.c (output_parser): Rename 'line' as 'output_line'.
7487 New line counter 'skeleton_line' (skeleton-line muscle).
7489 2001-12-17 Paul Eggert <eggert@twinsun.com>
7491 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
7492 YYDEBUG must be defined to a nonzero value.
7494 * src/bison.simple (yytname): Do not assume that the user defines
7495 YYDEBUG to a properly parenthesized expression.
7497 2001-12-17 Akim Demaille <akim@epita.fr>
7499 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
7500 nlookaheads is a new member.
7502 * src/lalr.h (nlookaheads): Remove this orphan declaration.
7503 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
7506 2001-12-17 Akim Demaille <akim@epita.fr>
7508 * src/files.h, src/files.c (open_files, close_files): Remove.
7509 * src/main.c (main): Don't open/close files, nor invoke lex_free,
7511 * src/reader.c (reader): Do it.
7513 2001-12-17 Akim Demaille <akim@epita.fr>
7515 * src/conflicts.c (print_reductions): Formatting changes.
7517 2001-12-17 Akim Demaille <akim@epita.fr>
7519 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
7520 (flush_reduce): New.
7521 (resolve_sr_conflict): Adjust.
7523 2001-12-17 Akim Demaille <akim@epita.fr>
7525 * src/output.c (output_obstack): Be static and rename as...
7526 (format_obstack): this, to avoid any confusion with files.c's
7528 * src/reader.h (muscle_obstack): Move to...
7529 * src/output.h: here, since it's defined in output.c.
7531 2001-12-17 Akim Demaille <akim@epita.fr>
7533 * src/output.c (action_row, save_column, default_goto)
7534 (sort_actions, matching_state, pack_vector): Better variable
7537 2001-12-17 Akim Demaille <akim@epita.fr>
7539 * src/output.c: Various formatting changes.
7541 2001-12-17 Akim Demaille <akim@epita.fr>
7543 * src/files.c (output_files): Free the output_obstack.
7544 * src/main.c (main): Call print and print_graph conditionally.
7545 * src/print.c (print): Work unconditionally.
7546 * src/print_graph.c (print_graph): Work unconditionally.
7547 * src/conflicts.c (log_resolution): Output only if verbose_flag.
7549 2001-12-16 Marc Autret <autret_m@epita.fr>
7551 * src/output.c (actions_output): Fix. When we use %no-lines,
7552 there is one less line per action.
7554 2001-12-16 Marc Autret <autret_m@epita.fr>
7556 * src/bison.simple: Remove a useless #line directive.
7557 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
7558 * src/output.c (get_lines_number): New.
7559 (output_parser): Adjust, now takes care about the lines of a
7562 (actions_output): Computes the number of lines taken by actions.
7563 (output_master_parser): Insert new skeleton which is the name of
7564 the output parser file name.
7566 2001-12-15 Marc Autret <autret_m@epita.fr>
7568 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
7570 2001-12-15 Marc Autret <autret_m@epita.fr>
7572 * src/output.c (output_gram): Keep track of the hairy one.
7574 2001-12-15 Akim Demaille <akim@epita.fr>
7576 Make `make distcheck' work.
7578 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
7579 system.h which uses libgettext.h.
7581 2001-12-15 Akim Demaille <akim@epita.fr>
7583 * src/nullable.c (set_nullable): Useless rules must be skipped,
7584 otherwise, since we range over their symbols, we might look at a
7585 nonterminal which no longer ``exists'', i.e., it is not counted in
7586 `nvars', hence we overflow our arrays.
7588 2001-12-15 Akim Demaille <akim@epita.fr>
7590 The header can also be produced directly, without any obstack!
7593 * src/files.c, src/files.h (defines_obstack): Remove.
7594 (compute_header_macro): Global.
7595 (defines_obstack_save): Remove.
7596 * src/reader.c (parse_union_decl): No longer output to
7597 defines_obstack: its content can be found in the `stype' muscle
7599 (output_token_translations): Merge into...
7600 (symbols_output): this.
7602 (symbols_save): this.
7604 * src/output.c (header_output): New.
7607 2001-12-15 Akim Demaille <akim@epita.fr>
7609 * src/reader.c (parse_union_decl): Instead of handling two obstack
7610 simultaneously, use one to define the `stype' muscle, and use the
7611 value of the latter to fill defines_obstack.
7612 (copy_comment): Remove.
7613 (copy_comment2): Work for a single obstack.
7615 (copy_comment): this.
7617 2001-12-15 Akim Demaille <akim@epita.fr>
7619 * src/lex.c, src/lex.h (xgetc): No longer static.
7620 * src/reader.c (parse_union_decl): Revamp.
7622 2001-12-15 Akim Demaille <akim@epita.fr>
7624 Still making progress in separating Bison into (i) input, (ii)
7625 process, (iii) output: now we can directly output the parser file
7626 without using table_obstack at all.
7628 * src/files.c, src/files.h (table_obstack): Bye bye.
7629 (parser_file_name): New.
7630 * src/files.c (compute_output_file_names): Compute it.
7631 * src/output.c (actions_output, output_parser)
7632 (output_master_parser): To a file instead of an obstack.
7634 2001-12-15 Akim Demaille <akim@epita.fr>
7636 Attach actions to rules, instead of pre-outputting them to
7639 * src/gram.h (rule_t): action and action_line are new members.
7640 * src/reader.c (symbol_list): Likewise.
7641 (copy_action): Save the actions within the rule.
7642 (packgram): Save them in rule_table.
7643 * src/output.c (actions_output): New.
7644 (output_parser): Use it on `%%actions'.
7645 (output_rule_data): Don't free rule_table.
7647 (prepare): Don't save the `action' muscle.
7648 * src/bison.simple: s/%%action/%%actions/.
7650 2001-12-15 Akim Demaille <akim@epita.fr>
7652 * src/reader.c (copy_action): When --yacc, don't append a `;'
7653 to the user action: let it fail if lacking.
7654 Suggested by Arnold Robbins and Tom Tromey.
7656 2001-12-14 Akim Demaille <akim@epita.fr>
7658 * src/lex.c (literalchar): Simply return the char you decoded, non
7659 longer mess around with obstacks and int pointers.
7662 2001-12-14 Akim Demaille <akim@epita.fr>
7664 * src/lex.c (literalchar): Don't escape the special characters,
7665 just decode them, and keep them as char (before, eol was output as
7666 the 2 char string `\n' etc.).
7667 * src/output.c (output_rule_data): Use quotearg to output the
7670 2001-12-13 Paul Eggert <eggert@twinsun.com>
7672 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
7673 Do not infringe on the global user namespace when using C++.
7674 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
7675 All uses of `fprintf' and `stderr' changed.
7677 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
7679 2001-12-13 Akim Demaille <akim@epita.fr>
7681 The computation of nullable is broken: it doesn't handle empty
7684 * tests/torture.at (GNU AWK Grammar): New.
7685 * tests/sets.at (Nullable): New.
7686 * src/nullable.c (set_nullable): Instead of blindly looping over
7687 `ritems', loop over the rules, and then over their rhs's.
7689 Work around Autotest bugs.
7691 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
7692 frame, because Autotest understand lines starting with a `+' as
7693 traces from the shell. Then, they are not processed properly.
7694 Admittedly an Autotest bug, but we don't have time to wait for
7695 Autotest to catch up.
7696 * tests/regression.at (Broken Closure): Adjust to the new table
7699 * tests/sets.at: here.
7701 2001-12-13 Akim Demaille <akim@epita.fr>
7703 * src/closure.c (closure): Use nrules instead of playing tricks
7706 2001-12-13 Akim Demaille <akim@epita.fr>
7708 * src/print.c (print_actions): Output the handling of `$' as the
7709 traces do: shifting the token EOF. Before EOF was treated as a
7711 * tests/regression.at: Adjust some tests.
7712 * src/print_graph.c (print_core): Complete the set of items via
7713 closure. The next-to-final and final states are still unsatisfying,
7714 but that's to be addressed elsewhere.
7715 No longer output the rule numbers, but do output the state number.
7716 A single loop for the shifts + gotos is enough, but picked a
7717 distinct color for each.
7718 (print_graph): Initialize and finalize closure.
7720 2001-12-13 Akim Demaille <akim@epita.fr>
7722 * src/reader.c (readgram): Remove dead code, an strip useless
7724 (get_type): Remove, unused.
7726 2001-12-12 Akim Demaille <akim@epita.fr>
7728 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
7729 on that of lib/error.c.
7731 2001-12-12 Akim Demaille <akim@epita.fr>
7733 Some hosts don't like `/' in includes.
7735 * src/system.h: Include libgettext.h without qualifying the path.
7736 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
7739 2001-12-11 Marc Autret <autret_m@epita.fr>
7741 * src/output.c (output_parser): Remove useless muscle.
7743 2001-12-11 Marc Autret <autret_m@epita.fr>
7745 * src/bison.simple: Remove #line just before %%epilogue. It
7746 is now handled in ...
7747 * src/reader.c (read_additionnal_code): Add the output of a
7748 #line for the epilogue.
7750 2001-12-10 Marc Autret <autret_m@epita.fr>
7752 * src/reader.c (copy_definition): Re-use CPP-outed code which
7753 replace precedent remove.
7754 * src/bison.simple: Remove #line before %%prologue because
7755 %%input-line is wrong at this time.
7757 2001-12-10 Marc Autret <autret_m@epita.fr>
7759 * src/reader.c (symbols_output): Clean up.
7760 * src/output.c (output_gram, output): Clean up.
7762 2001-12-10 Akim Demaille <akim@epita.fr>
7764 * src/lalr.c (initialize_lookaheads): New. Extracted from...
7765 * src/LR0.c (set_state_table): here.
7766 * src/lalr.c (lalr): Call it.
7768 2001-12-10 Akim Demaille <akim@epita.fr>
7770 * src/state.h (shifts): Remove the `number' member: shifts are
7771 attached to state, hence no longer need to be labelled with a
7774 2001-12-10 Akim Demaille <akim@epita.fr>
7776 Now that states have a complete set of members, the linked list of
7777 shifts is useless: just fill directly the state's shifts member.
7779 * src/state.h (shifts): Remove the `next' member.
7780 * src/LR0.c (first_state, last_state): Remove.
7782 (augment_automaton): Don't look for the shifts that must be added
7783 a shift on EOF: it is those of the state we looked for! But now,
7784 since shifts are attached, it is no longer needed to looking
7785 merely by its id: its number.
7787 2001-12-10 Akim Demaille <akim@epita.fr>
7789 * src/LR0.c (augment_automaton): Better variable locality.
7790 Remove an impossible branch: if there is a state corresponding to
7791 the start symbol being shifted, then there is shift for the start
7792 symbol from the initial state.
7794 2001-12-10 Akim Demaille <akim@epita.fr>
7796 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
7797 only when appropriate: when insert_start_shifting_state' is not
7799 * tests/regression.at (Rule Line Numbers): Adjust.
7801 2001-12-10 Akim Demaille <akim@epita.fr>
7803 * src/LR0.c (augment_automaton): Now that all states have shifts,
7804 merge the two cases addition shifts to the initial state.
7806 2001-12-10 Akim Demaille <akim@epita.fr>
7808 * src/lalr.c (set_state_table): Move to...
7810 * src/lalr.c (lalr): Don't call it...
7811 * src/LR0.c (generate_states): do it.
7812 * src/LR0.h (first_state): Remove, only the table is used.
7814 2001-12-10 Akim Demaille <akim@epita.fr>
7816 * src/LR0.h (first_shift, first_reduction): Remove.
7817 * src/lalr.c: Don't use first_shift: find shifts through the
7820 2001-12-10 Akim Demaille <akim@epita.fr>
7822 * src/LR0.c: Attach shifts to states as soon as they are
7824 * src/lalr.c (set_state_table): Instead of assigning shifts to
7825 state, just assert that the mapping was properly done.
7827 2001-12-10 Akim Demaille <akim@epita.fr>
7829 * src/LR0.c (insert_start_shift): Rename as...
7830 (insert_start_shifting_state): this.
7831 (insert_eof_shifting_state, insert_accepting_state): New.
7832 (augment_automaton): Adjust.
7833 Better locality of the variables.
7834 When looking if the start_symbol is shifted from the initial
7835 state, using `while (... symbol != start_symbol ...)' sounds
7836 better than `while (... symbol < start_symbol ...)': If fail
7837 to see how the order between symbols could be relevant!
7839 2001-12-10 Akim Demaille <akim@epita.fr>
7841 * src/getargs.h: Don't declare `spec_name_prefix' and
7842 `spec_file_prefix', declared by src/files.h.
7843 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
7844 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
7845 * src/output.c (prepare): Adjust.
7846 * src/reader.c (symbols_output): Likewise.
7847 * src/vmsgetargs.c: Vaguely adjust, but who cares?
7849 2001-12-10 Akim Demaille <akim@epita.fr>
7851 * src/muscle_tab.c (muscle_init): NULL is a better default than
7854 2001-12-10 Akim Demaille <akim@epita.fr>
7856 * src/reader.c (reader): Calling symbols_output once is enough.
7858 2001-12-10 Akim Demaille <akim@epita.fr>
7860 Now that states have a complete set of members, the linked list of
7861 reductions is useless: just fill directly the state's reductions
7864 * src/state.h (struct reductions): Remove member `number' and
7866 * src/LR0.c (first_reduction, last_reduction): Remove.
7867 (save_reductions): Don't link the new reductions, store them in
7869 * src/lalr.c (set_state_table): No need to attach reductions to
7870 states, it's already done.
7871 * src/output.c (output_actions): No longer free the shifts, then
7872 the reductions, then the states: free all the states and their
7875 2001-12-10 Akim Demaille <akim@epita.fr>
7877 * src/options.c (OPTN, DRTV, BOTH): New.
7878 (option_table): Use them.
7880 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
7881 the job of system.h.
7882 * src/options.c: Don't include stdio.h and xalloc.h for the same
7885 2001-12-10 Akim Demaille <akim@epita.fr>
7887 * src/output.c (output, prepare): Make sure the values of the
7888 muscles `action' and `prologue' are 0-terminated.
7890 2001-12-10 Akim Demaille <akim@epita.fr>
7892 Clean up GCC warnings.
7894 * src/reader.c (copy_action): `buf' is not used.
7895 (parse_skel_decl): Be static.
7896 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
7897 * src/options.h (create_long_option_table): Have a real prototype.
7898 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
7899 (hash_delete_at): Return const void *.
7900 Adjust casts to preserve the const.
7902 2001-12-10 Akim Demaille <akim@epita.fr>
7904 * configure.in: Require 2.52g.
7905 M4 is not needed, but AUTOM4TE is.
7907 * tests/Makefile.am: Adjust.
7909 2001-12-10 Akim Demaille <akim@epita.fr>
7911 One structure for states is enough, even though theoretically
7912 there are LR(0) states and LALR(1) states.
7914 * src/lalr.h (state_t): Remove.
7915 (state_table): Be state_t **, not state_t *.
7916 * src/state.h (core, CORE_ALLOC): Rename as...
7917 (state_t, STATE_ALLOC): this.
7918 Add the LALR(1) members: shifts, reductions, errs.
7919 * src/LR0.c (state_table): Rename as...
7920 (state_hash): this, to avoid name clashes with the global
7922 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
7923 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
7925 2001-12-10 Akim Demaille <akim@epita.fr>
7927 Bison dumps core on bash.y.
7928 Reported by Pascal Bart.
7930 * src/warshall.c (bitmatrix_print): New.
7932 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
7933 j must be the outer loop.
7934 * tests/regression.at (Broken Closure): New.
7936 2001-12-05 Akim Demaille <akim@epita.fr>
7938 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
7940 Reported by Peter Hamorsky.
7942 2001-12-05 Akim Demaille <akim@epita.fr>
7944 * src/conflicts.c (err_table): Remove.
7945 (resolve_sr_conflict): Adjust.
7946 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
7948 (state_t.reductions, state_t.shifts): this.
7950 2001-12-05 Akim Demaille <akim@epita.fr>
7952 * src/reduce.c (reduce_grammar_tables): No longer disable the
7953 removal of useless rules via CPP but via `if (0)', so that the
7954 compiler still check the code is valid.
7955 For instance, it should have noticed `rline' no longer exists: use
7956 the `line' member of rule_t.
7957 * src/gram.c (dummy, rline): Remove, unused.
7959 2001-12-05 Akim Demaille <akim@epita.fr>
7961 * src/output.c (pack_vector): Use assert, not berror.
7962 * src/main.c (berror): Remove, unused.
7964 2001-12-05 Akim Demaille <akim@epita.fr>
7966 New experimental feature: if --verbose --trace output all the
7967 items of a state, not only its kernel.
7969 * src/print.c (print_core): If `trace_flag', then invoke closure
7970 before outputting the items of the state (print_core is no longer
7971 a correct name them).
7972 (print_results): Invoke new_closure/free_closure if needed.
7974 2001-12-05 Akim Demaille <akim@epita.fr>
7976 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
7977 * src/closure.c, src/closure.h (itemsetsize): Rename as...
7978 (nitemset): for consistency with the rest of the project.
7980 2001-12-05 Akim Demaille <akim@epita.fr>
7982 * src/closure.c (print_closure): Improve.
7983 (closure): Use it for printing input and output.
7985 2001-12-05 Akim Demaille <akim@epita.fr>
7987 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
7988 indexed by nonterminals.
7990 2001-12-05 Akim Demaille <akim@epita.fr>
7992 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
7994 * src/warshall.h: Remove accidental duplication of the content.
7996 2001-12-05 Akim Demaille <akim@epita.fr>
7998 * src/closure.c (set_fderives): De-obfuscate.
8000 2001-12-05 Akim Demaille <akim@epita.fr>
8002 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
8004 2001-12-05 Akim Demaille <akim@epita.fr>
8006 * src/closure.c (set_firsts): De-obfuscate.
8008 2001-12-05 Akim Demaille <akim@epita.fr>
8010 * src/output.c (action_row): De-obfuscate
8011 using the good o' techniques: arrays not pointers, variable
8012 locality, BITISSET, RESETBIT etc.
8014 2001-12-05 Akim Demaille <akim@epita.fr>
8016 Pessimize the code to simplify it: from now on, all the states
8017 have a valid SHIFTS, which NSHIFTS is possibly 0.
8019 * src/LR0.c (shifts_new): Be global and move to..
8020 * src/state.c, src/state.h: here.
8021 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
8022 * src/print_graph: Adjust.
8024 2001-12-05 Akim Demaille <akim@epita.fr>
8026 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
8027 * src/conflicts.c: Use it.
8028 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
8029 incorrectly ``simplified''.
8031 2001-12-05 Akim Demaille <akim@epita.fr>
8033 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
8034 using the good o' techniques: arrays not pointers, variable
8035 locality, BITISSET, RESETBIT etc.
8037 2001-12-05 Akim Demaille <akim@epita.fr>
8039 * src/state.h (SHIFT_SYMBOL): New.
8040 * src/conflicts.c: Use it to deobfuscate.
8042 2001-12-05 Akim Demaille <akim@epita.fr>
8044 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
8045 (print_reductions): De-obfuscate using the good o' techniques:
8046 arrays not pointers, variable locality, BITISSET.
8048 2001-12-05 Akim Demaille <akim@epita.fr>
8050 * src/conflicts.c (print_reductions): Arrays, not pointers.
8053 2001-12-05 Akim Demaille <akim@epita.fr>
8055 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8057 2001-12-05 Akim Demaille <akim@epita.fr>
8059 * src/conflicts.c (print_reductions): Improve variable locality.
8061 2001-12-05 Akim Demaille <akim@epita.fr>
8063 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8065 2001-12-05 Akim Demaille <akim@epita.fr>
8067 * src/conflicts.c (print_reductions): Improve variable locality.
8069 2001-12-05 Akim Demaille <akim@epita.fr>
8071 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
8072 * src/lalr.c: Use them.
8074 2001-12-05 Akim Demaille <akim@epita.fr>
8076 * src/LR0.c (augment_automaton): Formatting changes.
8077 Better variable locality.
8079 2001-12-05 Akim Demaille <akim@epita.fr>
8081 * src/lalr.c (matrix_print): New.
8082 (transpose): Use it.
8083 Use arrays instead of pointers.
8085 2001-12-05 Akim Demaille <akim@epita.fr>
8087 * src/lalr.c (maxrhs): Move to...
8088 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
8089 * src/lalr.c (build_relations): Adjust.
8091 2001-12-05 Akim Demaille <akim@epita.fr>
8093 * src/lalr.c (transpose): Free the memory allocated to the
8094 argument, as it is replaced by the results by the unique caller.
8095 (build_relations): Merely invoke transpose: it handles the memory
8097 Improve variable locality.
8098 Avoid variables used as mere abbreviations.
8099 (compute_lookaheads): Use arrays instead of pointers.
8101 2001-12-05 Akim Demaille <akim@epita.fr>
8103 * src/lalr.c (initialize_F): Improve variable locality.
8104 Avoid variables used as mere abbreviations.
8106 2001-12-05 Akim Demaille <akim@epita.fr>
8108 * src/derives.c (print_derives): Display the ruleno.
8109 * src/lalr.c (initialize_F, transpose): Better variable locality
8110 to improve readability.
8111 Avoid variables used as mere abbreviations.
8113 2001-12-05 Akim Demaille <akim@epita.fr>
8115 * src/lalr.c (traverse): Use arrays instead of pointers.
8117 2001-12-05 Akim Demaille <akim@epita.fr>
8119 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
8120 the handling of squeue.
8121 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8123 2001-12-05 Akim Demaille <akim@epita.fr>
8125 Because useless nonterminals are now kept alive (instead of being
8126 `destroyed'), we now sometimes examine them, and store information
8127 related to them. Hence we need to know their number, and adjust
8130 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
8132 * src/LR0.c (allocate_itemsets): The memory allocated to
8133 `symbol_count' was used for two different purpose: once to count
8134 the number of occurrences of each symbol, and later reassigned to
8135 `shift_symbol', containing the symbol that can be shifted from a
8137 Deobfuscate, i.e., allocate, use and free `symbol_count' here
8139 (new_itemsets): Allocate `shift_symbol' here.
8140 (allocate_itemsets): symbol_count includes useless nonterminals.
8142 (free_storage): Use `free', not `XFREE', for pointers that cannot
8145 2001-12-05 Akim Demaille <akim@epita.fr>
8147 * src/nullable.c (set_nullable): Deobfuscate the handling of
8149 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8151 2001-12-05 Akim Demaille <akim@epita.fr>
8153 * src/gram.c, src/gram.h (ritem_print): New.
8154 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
8155 (This useless function was defined only to work around VMS linkers
8156 that can't handle compilation units with variables only).
8157 * src/reduce.c (dump_grammar): Use it to trace the construction of
8160 2001-12-04 Paul Eggert <eggert@twinsun.com>
8162 * src/bison.simple (union yyalloc): Change member names
8163 to be the same as the stack names.
8164 (yyparse): yyptr is now union yyalloc *, not char *.
8165 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
8166 and may generate better code on some machines.
8167 (yystpcpy): Use prototype if __STDC__ is defined, not just
8168 if __cplusplus is defined.
8170 2001-11-30 Akim Demaille <akim@epita.fr>
8172 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
8173 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
8174 Gettext doesn't compile cleanly, and dies with -Werror.
8175 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
8176 Include WARNING_CFLAGS here.
8177 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
8178 before being defined.
8180 2001-11-27 Paul Eggert <eggert@twinsun.com>
8182 * lib/quotearg.h (quotearg_n, quotearg_n_style):
8183 First arg is int, not unsigned.
8184 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
8185 (SIZE_MAX, UINT_MAX): New macros.
8186 (quotearg_n_options): Abort if N is negative.
8187 Avoid overflow check on hosts where size_t is 64 bits and int
8188 is 32 bits, as overflow is impossible there.
8189 Fix off-by-one typo that caused unnecessary reallocation.
8191 2001-11-29 Paul Eggert <eggert@twinsun.com>
8193 Name space cleanup in generated parser.
8195 * doc/bison.texinfo (Bison Parser): Discuss system headers
8196 and their effect on the user name space.
8199 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
8200 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
8201 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
8203 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
8204 on user names when possible.
8206 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
8207 Simplify test for whather <alloca.h> exists.
8209 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
8211 (<stdio.h>): Include if YYDEBUG.
8213 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
8214 ! defined (yyoverflow) && ! defined (yymemcpy).
8216 (yymemcpy, yyparse): Rename local variables as needed so that
8217 they all begin with 'yy'.
8219 (yystrlen, yystpcpy): New functions.
8221 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
8224 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
8225 instead of relying on string.h functions. Use YYSTACK_ALLOC
8226 and YYSTACK_FREE instead of malloc and free.
8228 2001-11-30 Akim Demaille <akim@epita.fr>
8230 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
8231 before their first uses.
8232 (YYBISON, YYPURE): Move to the top of the output.
8234 2001-11-30 Akim Demaille <akim@epita.fr>
8236 * tests/reduce.at (Useless Nonterminals): Fix.
8238 2001-11-30 Akim Demaille <akim@epita.fr>
8240 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
8241 if body instead of `;' to pacify GCC's warnings.
8243 2001-11-30 Akim Demaille <akim@epita.fr>
8245 Instead of mapping the LHS of unused rules to -1, keep the LHS
8246 valid, but flag the rules as invalid.
8248 * src/gram.h (rule_t): `useful' is a new member.
8249 * src/print.c (print_grammar): Adjust.
8250 * src/derives.c (set_derives): Likewise.
8251 * src/reader.c (packgram, reduce_output): Likewise.
8252 * src/reduce.c (reduce_grammar_tables): Likewise.
8253 * tests/reduce.at (Underivable Rules, Useless Rules): New.
8255 2001-11-30 Akim Demaille <akim@epita.fr>
8257 * src/reduce.c (reduce_output): Formatting changes.
8258 * src/print.c (print_results, print_grammar): Likewise.
8259 * tests/regression.at (Rule Line Numbers)
8260 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
8262 2001-11-30 Akim Demaille <akim@epita.fr>
8264 * src/reduce.c (nonterminals_reduce): Instead of throwing away
8265 useless nonterminals, move them at the end of the symbol arrays.
8266 (reduce_output): Adjust.
8267 * tests/reduce.at (Useless Nonterminals): Adjust.
8269 2001-11-30 Akim Demaille <akim@epita.fr>
8271 * src/reduce.c: Various comment/formatting changes.
8272 (nonterminals_reduce): New, extracted from...
8273 (reduce_grammar_tables): here.
8274 (reduce_grammar): Call nonterminals_reduce.
8276 2001-11-29 Paul Eggert <eggert@twinsun.com>
8278 * src/bison.simple (YYSTACK_REALLOC): Remove.
8279 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
8280 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
8282 (union yyalloc): New type.
8283 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
8284 an arbitrary restriction on hosts where size_t is wider than int.
8286 (yyparse): Don't dump core if alloca or malloc fails; instead, report
8287 a parser stack overflow. Allocate just one block of memory for all
8288 three stacks, instead of allocating three blocks; this typically is
8289 faster and reduces fragmentation.
8291 Do not limit the number of items in the stack to a value that fits
8292 in 'int', as this is an arbitrary limit on hosts with 64-bit
8293 size_t and 32-bit int.
8295 2001-11-29 Marc Autret <autret_m@epita.fr>
8297 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
8298 of defining YYERROR_VERBOSE.
8299 [AT_DATA]: $4 is now out of C declarations in the prologue.
8301 2001-11-28 Marc Autret <autret_m@epita.fr>
8303 * src/reader.c (parse_dquoted_param): New.
8304 (parse_skel_decl): Use it.
8305 * src/lex.h: Add its prototype.
8306 * src/lex.c (literalchar): Become not static.
8308 2001-11-28 Marc Autret <autret_m@epita.fr>
8310 * src/output.h: And put its extern declaration here.
8311 * src/output.c (error_verbose): Define here.
8312 (prepare): Echo name modification.
8313 * src/getargs.h: Clean its extern declaration.
8314 * src/getargs.c (error_verbose_flag): Remove.
8315 (getargs): Remove case 'e'.
8316 * src/options.c (option_table): 'error-verbose' is now seen as simple
8320 * src/reader.c (read_declarations): Remove case tok_include.
8321 (parse_include_decl): Remove.
8322 * src/lex.h (token_t): Remove tok_include.
8323 * src/options.c (option_table): 'include' is now a simple command line
8326 2001-11-28 Marc Autret <autret_m@epita.fr>
8328 * src/bison.simple: Adjust muscle names.
8329 * src/muscle_tab.c (muscle_init): Also rename the muscles.
8330 * src/output.c (prepare): s/_/-/ for the muscles names.
8331 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
8333 2001-11-28 Marc Autret <autret_m@epita.fr>
8335 * src/bison.simple: Fix debug.
8336 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
8338 2001-11-28 Akim Demaille <akim@epita.fr>
8340 * src/LR0.c (shifts_new): New.
8341 (save_shifts, insert_start_shift, augment_automaton): Use it.
8343 2001-11-28 Akim Demaille <akim@epita.fr>
8345 * src/closure.c (closure): `b' and `ruleno' denote the same value:
8348 2001-11-28 Akim Demaille <akim@epita.fr>
8350 * src/closure.c (closure): Instead of looping over word in array
8351 then bits in words, loop over bits in array.
8353 2001-11-28 Akim Demaille <akim@epita.fr>
8355 * src/closure.c (closure): No longer optimize the special case
8356 where all the bits of `ruleset[r]' are set to 0, to make the code
8359 2001-11-28 Akim Demaille <akim@epita.fr>
8361 * src/closure.c (closure): `r' and `c' are new variables, used to
8362 de-obfuscate accesses to RULESET and CORE.
8364 2001-11-28 Akim Demaille <akim@epita.fr>
8366 * src/reduce.c (reduce_print): Use ngettext.
8367 (dump_grammar): Improve the trace accuracy.
8369 2001-11-28 Akim Demaille <akim@epita.fr>
8371 * src/reduce.c (dump_grammar): Don't translate trace messages.
8373 2001-11-28 Akim Demaille <akim@epita.fr>
8375 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
8376 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
8377 as all tags are free'ed afterwards.
8380 2001-11-27 Paul Eggert <eggert@twinsun.com>
8382 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
8383 use alloca when we didn't want to, and vice versa.
8385 2001-11-27 Marc Autret <autret_m@epita.fr>
8387 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
8389 * src/output.c (prepare): Remove its update.
8391 2001-11-27 Marc Autret <autret_m@epita.fr>
8393 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
8396 2001-11-27 Marc Autret <autret_m@epita.fr>
8398 * src/bison.simple: Remove YYERROR_VERBOSE using.
8399 Use %%error_verbose.
8400 (yyparse): Likewise.
8401 * src/output.c (prepare): Give its final value.
8402 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
8403 * src/getargs.h: Add its extern declaration.
8404 * src/getargs.c (error_verbose_flag): New int.
8405 (getargs): Update to catch new case.
8406 * src/options.c (option_table): 'error-verbose' is a new option.
8407 (shortopts): Update.
8409 2001-11-27 Akim Demaille <akim@epita.fr>
8411 * src/system.h: Use intl/libgettext.h.
8412 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
8414 2001-11-27 Akim Demaille <akim@epita.fr>
8416 * tests/torture.at (Exploding the Stack Size with Malloc):
8417 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
8419 2001-11-27 Akim Demaille <akim@epita.fr>
8421 * src/files.c: Include error.h.
8422 Reported by Hans Aberg.
8424 2001-11-26 Marc Autret <autret_m@epita.fr>
8426 * src/reader.c (parse_include_decl): New, not yet implemented.
8427 (read_declarations): Add case tok_include.
8428 * src/getargs.h (include): Add its extern definition.
8429 * src/getargs.c (include): New const char *.
8430 (getargs): Add case '-I'.
8431 * src/options.c (option_table): Add include as command line and
8433 * src/lex.h (token_t): Add tok_include.
8435 2001-11-26 Akim Demaille <akim@epita.fr>
8437 * src/reader.c (readgram): Make sure rules for mid-rule actions
8438 have a lineno equal to that of their host rule.
8439 Reported by Hans Aberg.
8440 * tests/regression.at (Rule Line Numbers): New.
8442 2001-11-26 Akim Demaille <akim@epita.fr>
8444 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
8447 2001-11-26 Akim Demaille <akim@epita.fr>
8449 * src/complain.c, src/complain.h (error): Remove, provided by
8452 2001-11-26 Akim Demaille <akim@epita.fr>
8454 * src/reader.c (read_declarations): Don't abort on tok_illegal,
8455 issue an error message.
8456 * tests/regression.at (Invalid %directive): New.
8457 Reported by Hans Aberg.
8459 2001-11-26 Akim Demaille <akim@epita.fr>
8461 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
8462 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8464 2001-11-26 Akim Demaille <akim@epita.fr>
8466 * src/conflicts.c (conflicts_print): Don't complain at all when
8467 there are no reduce/reduce conflicts, and as many shift/reduce
8468 conflicts as expected.
8469 * tests/regression.at (%expect right): Adjust.
8471 2001-11-23 Akim Demaille <akim@epita.fr>
8473 * lib/alloca.c: Update, from fileutils.
8475 2001-11-23 Akim Demaille <akim@epita.fr>
8477 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
8479 2001-11-23 Akim Demaille <akim@epita.fr>
8481 * src/system.h: Include alloca.h.
8482 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
8484 2001-11-23 Akim Demaille <akim@epita.fr>
8486 * src/print_graph.c (print_actions): Remove `rule', unused.
8487 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
8488 pacify GCC's signed < unsigned warnings.
8489 * src/closure.c (itemsetsize): Likewise.
8490 * src/reader.c (symbol_list_new): Static.
8492 2001-11-23 Akim Demaille <akim@epita.fr>
8494 Attaching lineno to buckets is stupid, since only one copy of each
8495 symbol is kept, only the line of the first occurrence is kept too.
8497 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
8498 * src/reader.c (rline_allocated): Remove, unused.
8499 (symbol_list): Have a `line' member.
8500 (symbol_list_new): New.
8502 * src/print.c (print_grammar): Output the rule line numbers.
8503 * tests/regression.at (Solved SR Conflicts)
8504 (Unresolved SR Conflicts): Adjust.
8505 Reported by Hans Aberg.
8507 2001-11-22 Marc Autret <autret_m@epita.fr>
8509 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
8511 2001-11-22 Marc Autret <autret_m@epita.fr>
8513 * src/muscle_tab.c (muscle_init): Remove initialization of
8515 * src/output.c (output_master_parser): Do it here.
8517 2001-11-20 Akim Demaille <akim@epita.fr>
8520 * configure.in (ALL_LINGUAS): Adjust.
8521 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
8522 longer contains strings to translate.
8524 2001-11-19 Akim Demaille <akim@epita.fr>
8526 * src/conflicts.c (conflicts_print): Add a missing \n.
8528 2001-11-19 Akim Demaille <akim@epita.fr>
8530 * src/nullable.c (nullable_print): New.
8531 (set_nullable): Call it when tracing.
8532 Better locality of variables.
8534 2001-11-19 Akim Demaille <akim@epita.fr>
8536 * src/print.c (print_actions): Better locality of variables.
8538 2001-11-19 Akim Demaille <akim@epita.fr>
8540 * src/derives.c (print_derives): Fix and enrich.
8541 * src/closure.c (print_fderives): Likewise.
8543 2001-11-19 Akim Demaille <akim@epita.fr>
8545 * src/closure.c (itemsetend): Remove, replaced with...
8548 2001-11-19 Akim Demaille <akim@epita.fr>
8550 * src/LR0.c (kernel_end): Remove, replaced with...
8553 2001-11-19 Akim Demaille <akim@epita.fr>
8555 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
8558 2001-11-19 Akim Demaille <akim@epita.fr>
8560 * src/closure.c (closure): Use arrays instead of pointers to clarify.
8562 2001-11-19 Akim Demaille <akim@epita.fr>
8564 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
8566 * src/LR0.c: Likewise.
8567 (allocate_itemsets): Use arrays instead of pointers to clarify.
8569 2001-11-19 Akim Demaille <akim@epita.fr>
8571 * src/getargs.c (statistics_flag): Replace with...
8573 (longopts): Accept --trace instead of --statistics.
8574 * src/getargs.h, src/options.c: Adjust.
8575 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
8576 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
8578 2001-11-19 Akim Demaille <akim@epita.fr>
8580 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
8581 pointers to clarify the code.
8582 (save_reductions, save_shifts): Factor common parts of alternatives.
8584 2001-11-19 Akim Demaille <akim@epita.fr>
8586 * src/LR0.c (new_state, get_state): Complete TRACE code.
8587 * src/closure.c: Include `reader.h' to get `tags', needed by the
8589 Rename the conditional DEBUG as TRACE.
8590 Output consistently TRACEs to stderr, not stdout.
8591 * src/derives.c: Likewise.
8592 * src/reduce.c: (inaccessable_symbols): Using if is better style
8594 Use `#if TRACE' instead of `#if 0' for tracing code.
8596 2001-11-19 Akim Demaille <akim@epita.fr>
8598 * src/system.h (LIST_FREE, shortcpy): New.
8599 * src/LR0.c: Use them.
8600 * src/output.c (free_itemsets, free_reductions, free_shifts):
8601 Remove, replaced by LIST_FREE.
8603 2001-11-19 Akim Demaille <akim@epita.fr>
8605 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8606 (REDUCTIONS_ALLOC): New.
8607 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8610 2001-11-19 Akim Demaille <akim@epita.fr>
8612 * src/LR0.c (new_state): Complete trace code.
8613 * src/nullable.c (set_nullable): Don't translate traces.
8615 2001-11-19 Akim Demaille <akim@epita.fr>
8617 * src/print_graph.c (print_core): Better locality of variables.
8618 * src/print.c (print_core): Likewise.
8620 2001-11-19 Akim Demaille <akim@epita.fr>
8622 * src/vcg.c: You do the output, so you are responsible of the
8623 handling of VCG syntax, in particular: use quotearg.
8624 * src/print_graph.c: Don't.
8625 (print_actions): Don't output the actions as part of the nodes,
8626 since that's the job of the edges.
8627 (print_state): Don't output by hand: fill the node description,
8628 and ask for its output.
8630 2001-11-19 Akim Demaille <akim@epita.fr>
8632 * src/bison.simple (yyparse): When verbosely reporting an error,
8633 no longer put additional quotes around token names.
8634 * tests/calc.at: Adjust.
8636 2001-11-19 Akim Demaille <akim@epita.fr>
8638 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8639 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8640 * src/output.c: Adjust.
8642 2001-11-19 Akim Demaille <akim@epita.fr>
8644 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8646 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8648 2001-11-19 Akim Demaille <akim@epita.fr>
8650 * src/gram.h (rule_t): New.
8652 (rrhs, rlhs): Remove, part of state_t.
8653 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8654 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8655 * src/reader.c, src/reduce.c: Adjust.
8657 2001-11-19 Akim Demaille <akim@epita.fr>
8659 * src/reader.c (symbols_output): New, extracted from...
8660 (packsymbols): Here.
8663 2001-11-19 Akim Demaille <akim@epita.fr>
8665 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8666 (maxrhs): this new function.
8668 2001-11-19 Akim Demaille <akim@epita.fr>
8670 * src/lalr.c (F): New macro to access the variable F.
8673 2001-11-19 Akim Demaille <akim@epita.fr>
8675 * src/lalr.h (LA): New macro to access the variable LA.
8676 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8677 * src/lalr.c: Adjust.
8679 2001-11-19 Akim Demaille <akim@epita.fr>
8681 * src/lalr.c (initialize_LA): Only initialize LA. Let...
8682 (set_state_table): handle the `lookaheads' members.
8684 2001-11-19 Akim Demaille <akim@epita.fr>
8686 * src/lalr.h (lookaheads): Removed array, whose contents is now
8688 (state_t): this structure.
8689 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8692 2001-11-19 Akim Demaille <akim@epita.fr>
8694 * src/lalr.h (consistent): Removed array, whose contents is now
8696 (state_t): this structure.
8697 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8700 2001-11-19 Akim Demaille <akim@epita.fr>
8702 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
8703 contents are now members of...
8704 (state_t): this structure.
8705 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8708 2001-11-19 Akim Demaille <akim@epita.fr>
8710 * src/lalr.h (state_t): New.
8711 (state_table): Be a state_t * instead of a core **.
8712 (accessing_symbol): Remove, part of state_t.
8713 * src/lalr.c: Adjust.
8714 (set_accessing_symbol): Merge into...
8715 (set_state_table): this.
8716 * src/print_graph.c, src/conflicts.c: Adjust.
8718 2001-11-14 Akim Demaille <akim@epita.fr>
8720 * tests/calc.at, tests/output.at, tests/regression.at,
8721 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
8722 now the tests are run in private dirs, therefore AC_CLEANUP and
8723 family can be simplified to 0-ary.
8724 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
8725 use abs. path to find config.h.
8726 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
8727 stderr, there can be way too much random noise.
8728 Instead pass -Werror to GCC and rely on the exit status.
8729 Reported by Wolfram Wagner.
8731 2001-11-14 Akim Demaille <akim@epita.fr>
8733 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
8734 defined only if yyoverflow is defined, to avoid `warning: unused
8736 Reported by The Test Suite.
8738 2001-11-14 Akim Demaille <akim@epita.fr>
8740 * src/print.c: Include reduce.h.
8741 Reported by Hans Aberg.
8743 2001-11-14 Akim Demaille <akim@epita.fr>
8745 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
8746 Revert a previous patch: these are really const.
8747 * src/conflicts.c (conflict_report): Additional useless pair of
8748 braces to pacify GCC's warnings for `if () if () {} else {}'.
8749 * src/lex.c (parse_percent_token): Replace equal_offset with
8752 Be sure to strdup `arg' when used, since there is no reason for
8753 token_buffer not to change.
8755 2001-11-14 Akim Demaille <akim@epita.fr>
8757 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
8759 * src/main.c (main): Use them.
8760 Suggested by Hans Aberg.
8762 2001-11-12 Akim Demaille <akim@epita.fr>
8764 * src/system.h (ngettext): Now that we use ngettext, be sure to
8765 provide a default definition when NLS are not used.
8767 2001-11-12 Akim Demaille <akim@epita.fr>
8769 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
8770 Use @kbd to denote user input.
8771 (Language and Grammar): ANSIfy the example.
8772 Adjust its layout for info/notinfo.
8773 (Location Tracking Calc): Output error messages to stderr.
8774 Output locations in a more GNUtically correct way.
8775 Fix a couple of Englishos.
8776 Adjust @group/@end group pairs.
8778 2001-11-12 Akim Demaille <akim@epita.fr>
8780 %expect was not functioning at all.
8782 * src/conflicts.c (expected_conflicts): Set to -1.
8783 (conflict_report): Use ngettext.
8784 (conflicts_print): Check %expect and make its violation an error.
8785 * doc/bison.texinfo (Expect Decl): Adjust.
8786 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
8787 * tests/regression.at (%expect not enough, %expect right)
8788 (%expect too much): New.
8790 2001-11-12 Akim Demaille <akim@epita.fr>
8792 * tests/regression.at (Conflicts): Rename as...
8793 (Unresolved SR Conflicts): this.
8794 (Solved SR Conflicts): New.
8796 2001-11-12 Akim Demaille <akim@epita.fr>
8798 * src/reduce.c (print_results): Rename as...
8799 (reduce_output): This.
8800 Output to OUT, passed as argument, instead of output_obstack.
8801 (dump_grammar): Likewise.
8804 (reduce_grammar): No longer call reduce_output, since...
8805 * src/print.c (print_results): do it.
8806 * src/main.c (main): Call reduce_free;
8808 2001-11-12 Akim Demaille <akim@epita.fr>
8810 * src/conflicts.c (print_reductions): Accept OUT as argument.
8811 Output to it, not to output_obstack.
8812 * src/print.c (print_actions): Adjust.
8814 2001-11-12 Akim Demaille <akim@epita.fr>
8816 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
8817 the result instead of using...
8818 (src_total, rrc_total, src_count, rrc_count): Remove.
8819 (any_conflicts): Remove.
8820 (print_conflicts): Split into...
8821 (conflicts_print, conflicts_output): New.
8822 * src/conflicts.h: Adjust.
8823 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
8824 * src/print.c (print_grammar): Issue `\n' between two rules.
8825 * tests/regression.at (Conflicts): New.
8826 Reported by Tom Lane.
8828 2001-11-12 Akim Demaille <akim@epita.fr>
8830 * tests/regression.at (Invalid input): Remove, duplicate with
8831 ``Invalid input: 1''.
8833 2001-11-12 Akim Demaille <akim@epita.fr>
8835 * tests/torture.at (AT_DATA_STACK_TORTURE)
8836 (Exploding the Stack Size with Alloca)
8837 (Exploding the Stack Size with Malloc): New.
8839 2001-11-12 Akim Demaille <akim@epita.fr>
8841 * src/bison.simple (YYSTACK_REALLOC): New.
8842 (yyparse) [!yyoverflow]: Use it and free the old stack.
8843 Reported by Per Allansson.
8845 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
8847 * src/bison.simple: Define type yystype instead of YYSTYPE, and
8848 define CPP macro, which substitute YYSTYPE by yystype.
8849 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
8850 with yyltype/YYLTYPE. This allows inclusion of the generated
8851 header within the parser if the compiler, such as GGC, accepts
8852 multiple equivalent #defines.
8855 2001-11-05 Akim Demaille <akim@epita.fr>
8857 * src/reader.c (symbols_output): New, extracted from...
8858 (packsymbols): here.
8861 2001-11-05 Akim Demaille <akim@epita.fr>
8863 * src/lex.c (parse_percent_token): s/quotearg/quote/.
8865 2001-11-05 Akim Demaille <akim@epita.fr>
8867 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
8870 2001-11-05 Akim Demaille <akim@epita.fr>
8872 * src/options.h (struct option_table_struct): set_flags is void*.
8873 * src/options.c (longopts): Support `--output' and `%output'.
8875 * src/lex.h (tok_setopt): Remove, replaced with...
8876 (tok_intopt, tok_stropt): these new guys.
8877 * src/lex.c (getopt.h): Not needed.
8878 (token_buffer, unlexed_token_buffer): Not const.
8879 (percent_table): Promote `-' over `_' in directive names.
8880 Active `%name-prefix', `file-prefix', and `output'.
8881 (parse_percent_token): Accept possible arguments to directives.
8882 Promote `-' over `_' in directive names.
8884 2001-11-04 Akim Demaille <akim@epita.fr>
8886 * doc/bison.texinfo (Decl Summary): Split the list into
8887 `directives for grammars' and `directives for bison'.
8889 Add description of `%name-prefix', `file-prefix', and `output'.
8890 Promote `-' over `_' in directive names.
8891 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
8892 Simplify the description of `--name-prefix'.
8893 Promote `-' over `_' in directive names.
8894 Promote `--output' over `--output-file'.
8895 Fix the description of `--defines'.
8896 * tests/output.at: Exercise %file-prefix and %output.
8898 2001-11-02 Akim Demaille <akim@epita.fr>
8900 * doc/refcard.tex: Update.
8902 2001-11-02 Akim Demaille <akim@epita.fr>
8904 * src/symtab.h (SUNDEF): New.
8905 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
8906 stand for `uninitialized', instead of 0.
8907 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
8908 * src/lex.c (lex): Adjust.
8910 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
8912 Let yylex return it instead of a plain 0.
8913 Reported by Dick Streefland.
8915 2001-11-02 Akim Demaille <akim@epita.fr>
8917 * tests/regression.at (Mixing %token styles): New test.
8919 2001-11-02 Akim Demaille <akim@epita.fr>
8921 * src/reader.c (parse_thong_decl): Formatting changes.
8922 (token_translations_init): New, extracted from...
8923 (packsymbols): Here.
8926 2001-11-01 Akim Demaille <akim@epita.fr>
8928 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
8929 Check that `9foo.y' produces correct cpp guards.
8930 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
8934 2001-11-01 Akim Demaille <akim@epita.fr>
8936 * tests/regression.at (Invalid input: 2): New.
8937 * src/lex.c (unlexed_token_buffer): New.
8938 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
8942 2001-11-01 Akim Demaille <akim@epita.fr>
8944 * tests/calc.at: Catch up with 1.30.
8945 * configure.in: Bump to 1.49a.
8946 Adjust to newer Autotest.
8948 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
8950 * src/conflicts.c: Move global variables rrc_total and src_total ...
8951 (print_conflicts): here.
8952 * src/output.c (output): Free global variable user_toknums.
8953 * src/lex.c (token_obstack): Become static.
8955 2001-10-18 Akim Demaille <akim@epita.fr>
8957 * tests/atlocal.in (GCC): Add.
8958 * tests/calc.at: s/m4_match/m4_bmatch/.
8959 s/m4_patsubst/m4_bpatsubst/.
8960 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
8961 * configure.in: AC_SUBST(GCC).
8963 2001-10-14 Marc Autret <autret_m@epita.fr>
8965 * src/options.c (create_long_option_table): Fix.
8967 2001-10-10 Akim Demaille <akim@epita.fr>
8969 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
8971 2001-10-04 Akim Demaille <akim@epita.fr>
8973 * src/reader.c (parse_union_decl): Push the caracters in
8974 union_obstack, not attrs_obstack.
8976 2001-10-04 Akim Demaille <akim@epita.fr>
8978 Merge in the branch 1.29.
8980 * src/reader.c (packsymbols): Use a temporary obstack for
8981 `%%tokendef', since output_stack is already used elsewhere.
8983 2001-10-02 Akim Demaille <akim@epita.fr>
8987 2001-10-02 Akim Demaille <akim@epita.fr>
8991 2001-10-02 Akim Demaille <akim@epita.fr>
8993 * tests/regression.at (Invalid CPP headers): New.
8994 From Alexander Belopolsky.
8995 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
8997 2001-10-02 Akim Demaille <akim@epita.fr>
8999 * tests/regression.at (Invalid input): New.
9000 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
9003 2001-10-02 Akim Demaille <akim@epita.fr>
9005 * tests/calc.at: Now that --debug works, the tests must be adjusted.
9007 2001-10-02 Akim Demaille <akim@epita.fr>
9009 * src/output.c (output_parser): Assert `skeleton'.
9010 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
9014 2001-10-01 Marc Autret <autret_m@epita.fr>
9016 * src/lex.h: Echo modifications.
9017 * src/lex.c (unlex): Parameter is now token_t.
9020 2001-10-01 Marc Autret <autret_m@epita.fr>
9022 * src/main.c: Include lex.h.
9025 2001-09-29 Akim Demaille <akim@epita.fr>
9027 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
9029 2001-09-28 Akim Demaille <akim@epita.fr>
9031 * tests/testsuite.at: Update to newer Autotest.
9032 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
9034 2001-09-27 Akim Demaille <akim@epita.fr>
9036 Position independent wrapper.
9038 * tests/bison: Remove.
9039 * tests/bison.in: New.
9040 * configure.in: Adjust.
9042 2001-09-27 Paul Eggert <eggert@twinsun.com>
9044 Port quotearg fixes from tar 1.13.24.
9046 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
9048 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
9049 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
9051 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
9052 * m4/mbrtowc.m4: New file.
9053 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
9054 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
9056 2001-09-27 Akim Demaille <akim@epita.fr>
9060 2001-09-27 Akim Demaille <akim@epita.fr>
9064 2001-09-25 Akim Demaille <akim@epita.fr>
9066 * src/system.h: Include `xalloc.h'.
9067 Remove it from the C files.
9068 * src/files.c (output_files): Free the obstacks.
9069 * src/lex.c (init_lex): Rename as...
9072 * src/main.c (main): Use it.
9074 2001-09-24 Marc Autret <autret_m@epita.fr>
9076 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
9077 to output informations in fout (FILE*).
9078 (open_graph, close_graph): Likewise.
9079 (output_graph, output_edge, output_node): Likewise.
9080 * src/vcg.h: Update function prototypes.
9081 * src/print_graph.c (print_graph): Open output graph file.
9082 (print_actions): Adjust.
9083 * src/files.h: Remove extern declaration.
9084 * src/files.c: Remove graph_obstack declaration.
9085 (open_files): Remove graph_obstack initialization.
9086 (output_files): Remove graph_obstack saving.
9088 2001-09-24 Marc Autret <autret_m@epita.fr>
9090 * src/files.c (compute_output_file_names): Fix.
9092 2001-09-24 Marc Autret <autret_m@epita.fr>,
9093 Akim Demaille <akim@epita.fr>
9095 * src/reader.c (reader): Remove call to free_symtab ().
9096 * src/main.c (main): Call it here.
9098 * src/conflicts.c (initialize_conflicts): Rename as...
9099 (solve_conflicts): this.
9100 * src/print.c (print_core, print_actions, print_state)
9101 (print_grammar): Dump to a file instead a `output_obstack'.
9102 (print_results): Dump `output_obstack', and then proceed with the
9104 * src/files.c (compute_output_file_names, close_files): New.
9105 (output_files): Adjust.
9106 * src/main.c (main): Adjust.
9108 2001-09-23 Marc Autret <autret_m@epita.fr>
9110 * src/files.c (compute_header_macro): Computes header macro name
9111 from spec_defines_file when given.
9113 2001-09-23 Marc Autret <autret_m@epita.fr>
9115 * src/files.c (output_files): Add default extensions.
9117 2001-09-22 Akim Demaille <akim@epita.fr>
9119 * src/conflicts.c (finalize_conflicts): Rename as...
9120 (free_conflicts): this.
9122 2001-09-22 Akim Demaille <akim@epita.fr>
9124 * src/gram.c (gram_free): Rename back as...
9126 (output_token_translations): Free `token_translations'.
9127 * src/symtab.c (free_symtab): Free the tag field.
9129 2001-09-22 Akim Demaille <akim@epita.fr>
9131 Remove `translations' as it is always set to true.
9133 * src/gram.h: Adjust.
9134 * src/reader.c (packsymbols, parse_token_decl): Adjust
9135 * src/print.c (print_grammar): Adjust.
9136 * src/output.c (output_token_translations): Adjust.
9137 * src/lex.c (lex): Adjust.
9138 * src/gram.c: Be sure the set pointers to NULL.
9139 (dummy): Rename as...
9142 2001-09-22 Akim Demaille <akim@epita.fr>
9144 * configure.in: Invoke AM_LIB_DMALLOC.
9145 * src/system.h: Use dmalloc.
9146 * src/LR0.c: Be sure to have pointers initialized to NULL.
9147 (allocate_itemsets): Allocate kernel_items only if needed.
9149 2001-09-22 Akim Demaille <akim@epita.fr>
9151 * configure.in: Bump to 1.29b.
9152 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
9153 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
9154 need xmalloc.c in calc.y.
9157 2001-09-21 Akim Demaille <akim@epita.fr>
9160 * Makefile.maint, config/config.guess, config/config.sub,
9161 * config/missing: Update from masters.
9162 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
9164 * configure.in (ALL_LINGUAS): Add `tr'.
9166 2001-09-21 Akim Demaille <akim@epita.fr>
9168 * tests/Makefile.am (package.m4): Move to...
9169 ($(srcdir)/$(TESTSUITE)): here.
9171 2001-09-20 Akim Demaille <akim@epita.fr>
9173 * src/complain.c: No longer try to be standalone: use system.h.
9174 Don't assume __STDC__ is defined to 1. Just test if it is defined.
9175 * src/complain.h: Likewise.
9176 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
9177 Remove the unused variable `n'.
9178 From Albert Chin-A-Young.
9180 2001-09-18 Marc Autret <autret_m@epita.fr>
9182 * doc/bison.1: Update.
9183 * doc/bison.texinfo (Bison Options): Update --defines and --graph
9185 (Option Cross Key): Update.
9188 2001-09-18 Marc Autret <autret_m@epita.fr>
9190 * tests/regression.at: New test (comment in %union).
9192 2001-09-18 Marc Autret <autret_m@epita.fr>
9194 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
9196 Reported by Keith Browne.
9198 2001-09-18 Marc Autret <autret_m@epita.fr>
9200 * tests/output.at: Add tests for --defines and --graph.
9202 2001-09-18 Marc Autret <autret_m@epita.fr>
9204 * tests/output.at: Removes tests of %{header,src}_extension features.
9206 2001-09-18 Akim Demaille <akim@epita.fr>
9208 * tests/Makefile.am (package.m4): New.
9209 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
9210 (_AT_CHECK_CALC_ERROR): Likewise.
9211 Factor the `, ' part of verbose error messages.
9213 2001-09-18 Marc Autret <autret_m@epita.fr>
9215 * src/getargs.c (longopts): Declare --defines and --graph as options
9216 with optional arguments.
9217 * src/files.h: Add extern declarations.
9218 * src/files.c (spec_graph_file, spec_defines_file): New.
9219 (output_files): Update.
9220 Remove CPP-outed code.
9222 2001-09-18 Marc Autret <autret_m@epita.fr>
9224 Turn off %{source,header}_extension feature.
9226 * src/files.c (compute_exts_from_gf): Update.
9227 (compute_exts_from_src): Update.
9228 (output_files): CPP-out useless code.
9229 * src/files.h: Remove {header,source}_extension extern declarations.
9230 * src/reader.c (parse_dquoted_param): CPP-out.
9231 (parse_header_extension_decl): Remove.
9232 (parse_source_extension_decl): Remove.
9233 (read_declarations): Remove cases tok_{hdrext,srcext}.
9234 * src/lex.c (percent_table): Remove {header,source}_extension entries.
9235 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
9237 2001-09-10 Akim Demaille <akim@epita.fr>
9239 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
9240 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
9241 (AT_CHECK_OUTPUT): this.
9242 Merely check ls' exit status, its output is useless.
9244 2001-09-10 Akim Demaille <akim@epita.fr>
9246 * tests/calc.at: Use m4_match.
9247 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
9249 2001-09-10 Marc Autret <autret_m@epita.fr>,
9250 Akim Demaille <akim@epita.fr>
9252 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
9254 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
9256 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
9257 * src/lex.h: Adjust prototype.
9258 (token_t): Add `tok_undef'.
9259 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
9260 (parse_percent_token): Now returns token_t.
9261 Add default statement in switch.
9262 (lex): Separate `c' as an input variable, from the token_t result
9264 (unlexed): Is a token_t.
9266 2001-09-10 Akim Demaille <akim@epita.fr>
9268 * configure.in: Bump to 1.29a.
9270 2001-09-07 Akim Demaille <akim@epita.fr>
9274 2001-08-30 Akim Demaille <akim@epita.fr>
9276 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
9277 * m4/atconfig.m4: Remove.
9278 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
9280 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
9281 m4_if, m4_patsubst, and m4_regexp.
9282 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
9283 `input' file instead of echo.
9285 2001-08-29 Akim Demaille <akim@epita.fr>
9289 2001-08-29 Akim Demaille <akim@epita.fr>
9293 2001-08-29 Paul Eggert <eggert@twinsun.com>
9295 * src/bison.simple (yyparse): Don't take the address of an
9296 item before the start of an array, as that doesn't conform to
9299 2001-08-29 Robert Anisko <anisko_r@epita.fr>
9301 * doc/bison.texinfo (Location Tracking Calc): New node.
9303 2001-08-29 Paul Eggert <eggert@twinsun.com>
9305 * src/output.c (output): Do not define const, as this now
9306 causes more problems than it cures.
9308 2001-08-29 Akim Demaille <akim@epita.fr>
9310 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
9312 Be sure to tag the `detailmenu'.
9314 2001-08-29 Akim Demaille <akim@epita.fr>
9316 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
9317 download in a tmp dir.
9319 2001-08-28 Marc Autret <autret_m@epita.fr>
9321 * config/depcomp: New file.
9323 2001-08-28 Marc Autret <autret_m@epita.fr>
9325 * doc/bison.1 (mandoc): Adjust.
9326 From Juan Manuel Guerrero.
9328 2001-08-28 Marc Autret <autret_m@epita.fr>
9330 * src/print_graph.c (print_state): Fix.
9332 2001-08-27 Marc Autret <autret_m@epita.fr>
9334 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
9336 Echo modifications to the functions prototypes.
9337 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
9339 2001-08-27 Marc Autret <autret_m@epita.fr>
9341 * src/vcg.c: Include `xalloc.h'.
9342 (add_colorentry): New.
9343 (add_classname): New.
9344 (add_infoname): New.
9345 * src/vcg.h: Add new prototypes.
9347 2001-08-27 Akim Demaille <akim@epita.fr>
9349 * Makefile.maint: Sync. again with CVS Autoconf.
9351 2001-08-27 Akim Demaille <akim@epita.fr>
9353 * Makefile.maint: Formatting changes.
9354 (po-update, cvs-update, update): New targets.
9357 2001-08-27 Akim Demaille <akim@epita.fr>
9359 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9360 * Makefile.maint: Sync. with CVS Autoconf.
9362 2001-08-27 Marc Autret <autret_m@epita.fr>
9364 * src/vcg.h (struct infoname_s): New.
9365 (struct colorentry_s): New.
9366 (graph_s): New fields {vertical,horizontal}_order in structure.
9367 Add `infoname' field.
9368 Add `colorentry' field;
9369 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
9370 (G_HORIZONTAL_ORDER): New.
9372 (G_COLORENTRY): New.
9373 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
9374 Add output of `infoname'.
9375 Add output of `colorentry'.
9377 2001-08-27 Marc Autret <autret_m@epita.fr>
9379 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
9380 This one shadowed a global parameter.
9382 2001-08-24 Marc Autret <autret_m@epita.fr>
9384 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
9385 instead of `unsigned'.
9386 (print_state): Do not call obstack_object_size () in obstack_grow ()
9387 to avoid macro variables shadowing.
9389 2001-08-23 Marc Autret <autret_m@epita.fr>
9391 * src/lex.c (percent_table): Typo: s/naem/name/.
9393 Normalize new options declarations.
9395 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
9397 * tests/suite.at: Exercise %header_extension and %source_extension.
9399 2001-08-16 Marc Autret <autret_m@epita.fr>
9401 * src/reader.c (parse_dquoted_param): New.
9402 (parse_header_extension_decl): Use it.
9403 (parse_source_extension_decl): Likewise.
9405 2001-08-16 Marc Autret <autret_m@epita.fr>
9407 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
9408 (get_xxxx_str): Use assert () instead of complain ().
9409 Remove return invokations in default cases.
9410 (get_decision_str): Modify default behaviour. Remove second argument.
9411 Echo modifications on calls.
9412 (output_graph): Fix.
9414 2001-08-16 Marc Autret <autret_m@epita.fr>
9416 * src/getargs.c (usage): Update with ``-g, --graph''.
9418 2001-08-16 Marc Autret <autret_m@epita.fr>
9420 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
9421 (Option Cross Key): Likewise.
9422 * doc/bison.1: Update.
9424 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
9426 * src/output.c (output_master_parser): Don't finish action_obstack.
9427 (output_parser): Don't care about the muscle action, here.
9428 (prepare): Copy the action_obstack in the action muscle.
9429 (output): Free action_obstack.
9431 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9433 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
9434 will contain `%union' declaration.
9435 (parse_union_decl): Delete #line directive output.
9436 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
9437 informations about %union.
9438 (parse_union_decl): Copy the union_obstack in the muscle stype.
9439 * src/bison.simple: Add new #line directive.
9440 Add typdef %%stype YYSTYPE.
9442 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9444 * src/bison.simple: Add new `#line' directive.
9446 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
9448 * src/bison.simple: New `#line' directive.
9449 * src/output.c (output_parser): Support new dynamic muscle input_line.
9451 2001-09-22 Marc Autret <autret_m@epita.fr>
9453 * src/output.c (output_master_parser): New.
9454 (output_parser): Be more re-entrant.
9456 2001-09-21 Marc Autret <autret_m@epita.fr>
9458 * src/reader.c (copy_definition, parse_union_decl): Update and use
9460 (copy_action): Likewise.
9461 Use obstack_1grow ().
9462 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
9464 2001-09-21 Marc Autret <autret_m@epita.fr>
9466 * src/options.c (option_table): Adjust.
9467 * src/lex.c (parse_percent_token): Fix.
9469 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9471 * src/options.c (symtab.h): Include it, need by lex.h.
9473 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9475 * src/lex.c (parse_percent_token): Change type of variable `tx', which
9476 is now an option_table_struct*.
9477 (option_strcmp): New function option_strcmp.
9478 (parse_percent_token): Call option_strcmp.
9479 * src/getargs.c (xalloc.h, options.h): Include it.
9480 (getargs): Call create_long_option_table.
9481 (getargs): Free longopts at the end of the function.
9482 (shortopts): Move in options.c.
9483 * src/options.c (create_long_option_table): New function. Convert
9484 information from option_table to option structure.
9485 * src/reader.c (options.h): Include it.
9487 * src/Makefile.am: Adjust.
9488 * src/options.c (option_table): Create from longopts and percent_table.
9489 * src/getargs.c (longopts): Delete.
9490 * src/lex.c (struct percent_table_struct): Delete.
9491 (percent_table): Delete.
9492 (options.h): Include it.
9493 * src/options.c: Create.
9494 * src/options.h: Create.
9495 Declare enum opt_access_e.
9496 Define struct option_table_struct.
9498 2001-09-20 Marc Autret <autret_m@epita.fr>
9500 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
9503 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
9505 * src/bison.simple: s/%%filename/%%skeleton.
9506 * src/muscle_tab.c (getargs.h): Include it.
9507 (muscle_init): Insert new muscle skeleton.
9509 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
9511 * src/output.c (output_parser): Delete unused variable actions_dumped.
9513 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
9515 * src/output.c (output): Delete call to reader_output_yylsp.
9516 * src/reader.c (reader): Likewise.
9517 * src/reader.h: Delete declaration of reader_output_yylsp.
9519 2001-09-02 Marc Autret <autret_m@epita.fr>
9521 * src/reader.c: Include muscle_tab.h.
9522 (parse_union_decl): Update.
9523 (parse_macro_decl): Rename parse_muscle_decl.
9524 Update to use renamed functions and variable.
9525 (read_declarations, copy_action, read_additionnal_code, : Updated
9526 with correct variables and functions names.
9527 (packsymbols, reader): Likewise.
9529 * src/reader.h (muscle_obstack): Extern declaration update.
9531 * src/output.c: Include muscle_tab.h
9532 In all functions using macro_insert, change by using muscle_insert ().
9533 (macro_obstack): Rename muscle_obstack.
9534 Echo modifications in the whole file.
9535 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
9536 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
9537 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
9539 * src/muscle_tab.h: Update double inclusion macros.
9540 (macro_entry_s): Rename muscle_entry_s.
9543 * src/muscle_tab.c: Include muscle_tab.h.
9544 Rename macro_tabble to muscle_table.
9545 (mhash1, mhash2, mcmp): Use muscle_entry.
9546 (macro_init): Rename muscle_init. Update.
9547 (macro_insert): Rename muscle_insert. Update.
9548 (macro_find): Rename muscle_find. Update.
9550 * src/main.c: Include muscle_tab.h.
9551 (main): Call muscle_init ().
9552 * src/Makefile.am (bison_SOURCES): Echo modifications.
9554 2001-09-02 Marc Autret <autret_m@epita.fr>
9556 Now the files macro_tab.[ch] are named muscle_tab.[ch].
9558 * src/muscle_tab.c, src/muscle_tab.h: Add files.
9560 2001-09-02 Marc Autret <autret_m@epita.fr>
9562 * src/macrotab.c, src/macrotab.h: Remove.
9564 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
9566 * src/reader.c (copy_guard): Use muscle to specify the `#line'
9569 2001-09-01 Marc Autret <autret_m@epita.fr>
9571 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
9572 to an explicit value to activate the feature. We do it here.
9574 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9576 * src/output.c (prepare): Delete the `filename' muscule insertion.
9577 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
9578 (parse_union_decl): Likewise.
9579 * src/macrotab.c (macro_init): Initialize filename by infile.
9581 2001-08-31 Marc Autret <autret_m@epita.fr>
9583 * src/bison.simple (YYLSP_NEEDED): New definition.
9584 * src/output.c (prepare): Add macro insertion of `locations_flag'
9586 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9588 * src/output.c (prepare): Delete insertion of previous muscles,
9589 and insert the `prefix' muscles.
9590 * src/macrotab.c (macro_init): Likewise.
9591 (macro_init): Initialization prefix directive by `yy'.
9592 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
9593 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9594 yylval, yydebug, yyerror, yynerrs and yyparse.
9595 New directive `#define' to substitute yydebug, ... with option
9598 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9600 * src/main.c (main): Standardize.
9601 * src/output.c (output_table_data, output_parser): Likewise.
9602 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9604 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9606 * src/reader.c (read_additionnal_code): Rename %%user_code to
9608 * src/output.c (output): Rename %%declarations to %%prologue.
9609 * src/bison.simple: Echo modifications.
9611 2001-08-31 Marc Autret <autret_m@epita.fr>
9613 * src/reader.c (readgram): CleanUp.
9614 (output_token_defines): Likewise.
9615 (packsymbols): Likewise.
9617 * src/output.c (output): CPP-out useless code.
9619 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9621 * src/reader.c (reader): Delete obsolete call to function
9622 output_trailers and output_headers.
9623 * src/output.h: Remove obsolete functions prototypes of output_headers
9624 and output_trailers.
9626 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
9628 * src/main.c: Include macrotab.h.
9629 * src/macrotab.h (macro_entry_s): Constify fields.
9630 Adjust functions prototypes.
9631 * src/macrotab.c (macro_insert): Constify key and value.
9632 (macro_find): Constify key.
9633 (macro_insert): Include 'xalloc.h'
9634 (macro_insert): Use XMALLOC.
9635 (macro_find): Constify return value.
9636 * src/output.c (output_table_data): Rename table to table_data.
9637 (output_parser): Constify macro_key, macro_value.
9639 2001-08-30 Marc Autret <autret_m@epita.fr>
9641 * src/reader.c (parse_skel_decl): New.
9642 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
9643 * src/lex.h (token_t): New token `tok_skel'.
9644 * src/lex.c (percent_table): Add skeleton option entry.
9647 2001-08-29 Marc Autret <autret_m@epita.fr>
9649 * src/bison.simple: Add %%user_code directive at the end.
9650 * src/reader.c (read_additionnal_code): New.
9652 * src/output.c (output_program): Remove.
9655 2001-08-28 Marc Autret <autret_m@epita.fr>
9657 * src/output.c (output_actions): Clean up.
9658 (output_gram): CPP-out useless code.
9659 * src/reader.c (reader): Clean up, CPP-out useless code.
9661 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
9663 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
9665 * src/bison.simple: Add `%%definitions'.
9667 2001-08-28 Marc Autret <autret_m@epita.fr>
9669 * config/depcomp: New file.
9671 2001-08-27 Paul Eggert <eggert@twinsun.com>
9673 * src/bison.simple (yyparse): Don't take the address of an
9674 item before the start of an array, as that doesn't conform to
9677 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9679 * src/output.c (output): Remove the initialization of the macro
9680 obstack. It was done too late here.
9682 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
9684 (reader): Initialize the macro obstack here, since we need it to grow
9685 '%define' directives.
9687 * src/reader.h: Declare the macro obstack as extern.
9689 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9691 * src/output.c (output_parser): Fix. Store single '%' characters in
9692 the output obstack instead of throwing them away.
9694 2001-08-27 Akim Demaille <akim@epita.fr>
9696 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9698 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9700 * lib/Makefile.am: Adjust.
9702 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9704 * src/bison.simple: Update and add '%%' directives.
9706 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9708 * src/reader.c (reader): Remove calls to 'output_headers' and
9709 'output_trailers'. Remove some C output.
9710 (readgram): Disable a piece of code that was writing a default
9711 definition for 'YYSTYPE'.
9712 (reader_output_yylsp): Remove.
9713 (packsymbols): Output token defintions to a macro.
9714 (copy_definition): Disable C output.
9716 * src/reader.c (parse_macro_decl): New function used to parse macro
9718 (copy_string2): Put the body of copy_string into this new function.
9719 Add a parameter to let the caller choose whether he wants to copy the
9720 string delimiters or not.
9721 (copy_string): Be a simple call to copy_string2 with the last argument
9723 (read_declarations): Add case for macro definition.
9724 (copy_identifier): New.
9725 (parse_macro_decl): Read macro identifiers using copy_identifier
9728 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9730 * src/output.c (prepare): Add prefixed names.
9731 (output_parser): Output semantic actions.
9732 (output_parser): Fix bug on '%%line' directives.
9734 * src/output.c (output_headers): Remove. The C code printed by this
9735 function should now be in the skeletons.
9736 (output_trailers): Remove.
9737 (output): Disable call to 'reader_output_yylsp'.
9738 (output_rule_data): Do not output tables to the table obstack.
9740 * src/output.c: Remove some C dedicated output.
9741 Improve the use of macro and output obstacks.
9742 (output_defines): Remove.
9744 * src/output.c (output_token_translations): Associate 'translate'
9745 table with a macro. No output to the table obstack.
9746 (output_gram): Same for 'rhs' and 'prhs'.
9747 (output_stos): Same for 'stos'.
9748 (output_rule_data): Same for 'r1' and 'r2'.
9749 (token_actions): Same for 'defact'.
9750 (goto_actions): Same for 'defgoto'.
9751 (output_base): Same for 'pact' and 'pgoto'.
9752 (output_table): Same for 'table'.
9753 (output_check): Same for 'check'.
9755 * src/output.c (output_table_data): New function.
9756 (output_short_table): Remove.
9757 (output_short_or_char_table): Remove.
9759 * src/output.c (output_parser): Replace most of the skeleton copy code
9760 with something new. Skeletons are now processed character by character
9761 rather than line by line, and Bison looks for '%%' macros. This is the
9762 first step in making Bison's output process (a lot) more flexible.
9763 (output_parser): Use the macro table.
9765 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9767 * src/main.c (main): Initialize the macro table.
9769 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9771 * src/lex.c (percent_table): Add tok_define.
9772 * src/lex.h: Add tok_define.
9774 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9776 * src/macrotab.c: New file.
9777 * src/macrotab.h: New file.
9778 * src/Makefile.am: Update.
9780 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9782 * lib/hash.c: New file.
9783 * lib/hash.h: New file.
9784 * lib/Makefile.am: Update.
9786 2001-08-15 Akim Demaille <akim@epita.fr>
9790 2001-08-15 Marc Autret <autret_m@epita.fr>
9792 * src/reader.c (readgram): Indent output macro YYSTYPE.
9793 (packsymbols): Likewise.
9794 (output_token_defines): Likewise.
9795 * src/files.c: Standardize.
9796 (compute_header_macro): New.
9797 (defines_obstack_save): New. Use compute_header_macro.
9798 (output_files): Update. Use defines_obstack_save.
9800 2001-08-15 Akim Demaille <akim@epita.fr>
9802 * doc/bison.texinfo (Table of Symbols): Document
9805 2001-08-15 Akim Demaille <akim@epita.fr>
9807 * missing: Update from CVS Automake.
9808 * config/config.guess, config/config.sub, config/texinfo.tex:
9809 Update from gnu.org.
9811 2001-08-15 Akim Demaille <akim@epita.fr>
9813 * Makefile.maint: Sync with CVS Autoconf.
9815 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
9817 * doc/bison.texinfo: Include GNU Free Documentation License from
9819 * doc/fdl.texi: Add to package.
9821 2001-08-14 Marc Autret <autret_m@epita.fr>
9823 Turn on %{source,header}_extension features.
9825 * src/lex.c (percent_table): Un-CPP out header_extension and
9827 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
9828 (compute_exts_from_src): Remove conditions. It restores priorities
9831 2001-08-14 Marc Autret <autret_m@epita.fr>
9833 * src/files.c (compute_base_names): Add extensions computing when
9834 `--file-prefix' used.
9835 Standardize function calls.
9837 2001-08-13 Marc Autret <autret_m@epita.fr>
9839 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
9840 defining it (defined but null disables alloca).
9842 2001-08-13 Marc Autret <autret_m@epita.fr>
9844 * src/bison.simple (_yy_memcpy): CPP reformat.
9846 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
9848 * tests/atconfig.in (CPPFLAGS): Fix.
9850 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
9852 * doc/bison.texinfo: Include GNU General Public License from
9854 * doc/gpl.texi: Add to package.
9856 2001-08-10 Marc Autret <autret_m@epita.fr>
9858 * src/print_graph.h: Fix.
9859 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
9861 2001-08-10 Akim Demaille <akim@epita.fr>
9863 * src/system.h: Provide default declarations for stpcpy, strndup,
9866 2001-08-10 Robert Anisko <anisko_r@epita.fr>
9868 * doc/bison.texinfo (Locations): Update @$ stuff.
9870 2001-08-09 Robert Anisko <anisko_r@epita.fr>
9872 * src/bison.simple (YYLLOC_DEFAULT): Update.
9875 2001-08-08 Marc Autret <autret_m@epita.fr>
9877 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
9878 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
9879 Reported by Fabrice Bauzac.
9881 2001-08-08 Marc Autret <autret_m@epita.fr>
9883 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
9884 * src/vcg.c (output_node): Fix.
9885 * src/vcg.h: Cleanup.
9886 * src/print_graph.c: Add comments.
9887 (node_output_size): New global variable. Simplify the formatting of
9888 the VCG graph output.
9889 (print_actions): Unused code is now used. It notifies the final state
9890 and no action states in the VCG graph. It also give the reduce actions.
9891 The `shift and goto' edges are red and the `go to state' edges are
9893 Get the current node name and node_obstack by argument.
9894 (node_obstack): New variable.
9895 (print_state): Manage node_obstack.
9896 (print_core): Use node_obstack given by argument.
9897 A node is not only computed here but in print_actions also.
9898 (print_graph): CPP out useless code instead of commenting it.
9900 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
9902 * tests/atconfig.in (CPPFLAGS): Fix.
9904 2001-08-07 Akim Demaille <akim@epita.fr>
9906 * src/print_graph.c (quote): New.
9907 (print_core): Use it.
9909 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
9911 * src/vcg.c (complain.h): Include it.
9912 Unepitaize `return' invocations.
9913 [NDEBUG] (main): Remove.
9914 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
9915 * src/files.c (open_files): Initialize graph_obstack.
9916 * src/print_graph.c (print_actions): CPP out useless code.
9917 (print_core): Don't output the last `\n' in labels.
9919 * src/files.c (output_files): Output the VCG file.
9920 * src/main.c (main): Invoke print_graph ();
9922 2001-08-06 Marc Autret <autret_m@epita.fr>
9924 Automaton VCG graph output.
9925 Using option ``-g'' or long option ``--graph'', you can generate
9926 a gram_filename.vcg file containing a VCG description of the LALR (1)
9927 automaton of your grammar.
9929 * src/main.c: Call to print_graph() function.
9930 * src/getargs.h: Update.
9931 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
9932 (graph_flag): New flag.
9934 (getargs): Add case `g'.
9935 * src/files.c (graph_obstack): New obstack struct.
9936 (open_files): Initialize new obstack.
9937 (output_files): Saves graph_obstack if required.
9938 * src/files.h (graph_obstack): New extern declaration.
9939 * src/Makefile.am: Add new source files.
9941 2001-08-06 Marc Autret <autret_m@epita.fr>
9943 * src/print_graph.c, src/print_graph.h (graph): New.
9944 * src/vcg.h: New file.
9945 * src/vcg.c: New file, VCG graph handling.
9947 2001-08-06 Marc Autret <autret_m@epita.fr>
9949 Add of %source_extension and %header_extension which specify
9950 the source or/and the header output file extension.
9952 * src/files.c (compute_base_names): Remove initialisation of
9953 src_extension and header_extension.
9954 (compute_exts_from_gf): Update.
9955 (compute_exts_from_src): Update.
9956 (output_files): Update.
9957 * src/reader.c (parse_header_extension_decl): New.
9958 (parse_source_extension_decl): New.
9959 (read_declarations): New case statements for the new tokens.
9960 * src/lex.c (percent_table): Add entries for %source_extension
9961 and %header_extension.
9962 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
9964 2001-08-06 Marc Autret <autret_m@epita.fr>
9966 * configure.in: Bump to 1.28c.
9967 * doc/bison.texinfo: Texinfo thingies.
9969 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
9971 * tests/atconfig.in (CPPFLAGS): Add.
9972 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
9974 2001-08-03 Akim Demaille <akim@epita.fr>
9978 2001-08-03 Akim Demaille <akim@epita.fr>
9980 * tests/Makefile.am (check-local): Ship testsuite.
9981 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
9984 2001-08-03 Akim Demaille <akim@epita.fr>
9986 * configure.in: Try using -Wformat when compiling.
9988 2001-08-03 Akim Demaille <akim@epita.fr>
9990 * configure.in: Bump to 1.28b.
9992 2001-08-03 Akim Demaille <akim@epita.fr>
9994 * src/complain.c: Adjust strerror_r portability issues.
9996 2001-08-03 Akim Demaille <akim@epita.fr>
10000 2001-08-03 Akim Demaille <akim@epita.fr>
10002 * src/getargs.c, src/getarg.h (skeleton)): Constify.
10003 * src/lex.c (literalchar): Avoid name clashes on `buf'.
10004 * src/getargs.c: Include complain.h.
10005 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
10006 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
10008 2001-08-03 Akim Demaille <akim@epita.fr>
10010 * src/reader.c (readgram): Display hidden chars in error messages.
10012 2001-08-03 Akim Demaille <akim@epita.fr>
10014 Update to gettext 0.10.39.
10016 2001-08-03 Akim Demaille <akim@epita.fr>
10018 * lib/strspn.c: New.
10020 2001-08-01 Marc Autret <autret_m@epita.fr>
10022 * doc/bison.texinfo: Update.
10023 * doc/bison.1 (mandoc): Update.
10024 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
10025 * src/files.c: Support output files extensions computing.
10026 (src_extension): New static variable.
10027 (header_extension): New static variable.
10028 (tr): New function.
10029 (get_extension_index): New function, gets the index of an extension
10030 filename in a string.
10031 (compute_exts_from_gf): New function, computes extensions from the
10032 grammar file extension.
10033 (compute_exts_from_src): New functions, computes extensions from the
10034 C source file extension, file given by ``-o'' option.
10035 (compute_base_names): Update.
10036 (output_files): Update.
10038 2001-08-01 Robert Anisko <anisko_r@epita.fr>
10040 * doc/bison.texi: Document @$.
10041 (Locations): New section.
10043 2001-07-18 Akim Demaille <akim@epita.fr>
10045 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
10046 * config/prev-version.txt, config/move-if-change: New.
10047 * Makefile.am: Adjust.
10049 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
10051 * src/bison.simple (yyparse): Suppress warning `comparaison
10052 between signed and unsigned'.
10054 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
10056 * src/getargs.h (raw_flag): Remove.
10057 * src/getargs.c: Die on `-r'/`--raw'.
10058 * src/lex.c (parse_percent_token): Die on `%raw'.
10059 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
10060 * tests/calc.at: Suppress test with option `--raw'.
10062 2001-07-14 Akim Demaille <akim@epita.fr>
10065 * configure.in: Require Autoconf 2.50.
10066 Update to gettext 0.10.38.
10068 2001-03-16 Akim Demaille <akim@epita.fr>
10070 * doc/bison.texinfo: ANSIfy the examples.
10072 2001-03-16 Akim Demaille <akim@epita.fr>
10074 * getargs.c (skeleton): New variable.
10075 (longopts): --skeleton is a new option.
10076 (shortopts, getargs): -S is a new option.
10077 * getargs.h: Declare skeleton.
10078 * output.c (output_parser): Use it.
10080 2001-03-16 Akim Demaille <akim@epita.fr>
10082 * m4/strerror_r.m4: New.
10083 * m4/error.m4: Run AC_FUNC_STRERROR_R.
10084 * lib/error.h, lib/error.c: Update.
10086 2001-03-16 Akim Demaille <akim@epita.fr>
10088 * src/getargs.c (longopts): Clean up.
10090 2001-02-21 Akim Demaille <akim@epita.fr>
10092 * src/reader.c (gensym): `gensym_count' is your own.
10093 Use a static buf to create the symbol name, as token_buffer is no
10096 2001-02-08 Akim Demaille <akim@epita.fr>
10098 * src/conflicts.c (conflict_report): Be sure not to append to res
10099 between two calls, which could happen if both first sprintf were
10100 skipped, but not the first cp += strlen.
10102 2001-02-08 Akim Demaille <akim@epita.fr>
10104 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
10105 New, from fileutils 4.0.37.
10106 * configure.in: Require Autoconf 2.49c. I took some time before
10107 making this decision. This is the only way out for portability
10108 issues in Bison, it would mean way too much duplicate effort to
10109 import in Bison features implemented in 2.49c since 2.13.
10110 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
10112 2001-02-02 Akim Demaille <akim@epita.fr>
10114 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
10115 * lib/xalloc.h, lib/xmalloc.c: Update.
10117 2001-01-19 Akim Demaille <akim@epita.fr>
10119 Get rid of the ad hoc handling of token_buffer in the scanner: use
10122 * src/lex.c (token_obstack): New.
10123 (init_lex): Initialize it. No longer call...
10124 (grow_token_buffer): this. Remove it.
10125 Adjust all the places which used it to use the obstack.
10127 2001-01-19 Akim Demaille <akim@epita.fr>
10129 * src/lex.h: Rename all the tokens:
10130 s/\bENDFILE\b/tok_eof/g;
10131 s/\bIDENTIFIER\b/tok_identifier/g;
10133 Let them be enums, not #define, to ease debugging.
10134 Adjust all the code.
10136 2001-01-18 Akim Demaille <akim@epita.fr>
10138 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
10139 * src/lex.c (maxtoken, grow_token_buffer): Static.
10141 2001-01-18 Akim Demaille <akim@epita.fr>
10143 Since we now use obstacks, more % directives can be enabled.
10145 * src/lex.c (percent_table): Also accept `%yacc',
10146 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
10148 Handle the actions for `%semantic_parser' and `%pure_parser' here,
10149 instead of returning a token.
10150 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
10151 * src/reader.c (read_declarations): Adjust.
10152 * src/files.c (open_files): Don't call `compute_base_names', don't
10153 compute `attrsfile' since they depend upon data which might be
10154 *in* the input file now.
10155 (output_files): Do it here.
10156 * src/output.c (output_headers): Document the fact that this patch
10157 introduces a guaranteed SEGV for semantic parsers.
10158 * doc/bison.texinfo: Document them.
10159 * tests/suite.at: Exercise these %options.
10161 2000-12-20 Akim Demaille <akim@epita.fr>
10163 Also handle the output file (--verbose) with obstacks.
10165 * files.c (foutput): Remove.
10166 (output_obstack): New.
10167 Adjust all dependencies.
10168 * src/conflicts.c: Return a string.
10169 * src/system.h (obstack_grow_string): Rename as...
10170 (obstack_sgrow): this. Be ready to work with non literals.
10171 (obstack_fgrow4): New.
10173 2000-12-20 Akim Demaille <akim@epita.fr>
10175 * src/files.c (open_files): Fix the computation of short_base_name
10176 in the case of `-o foo.tab.c'.
10178 2000-12-20 Akim Demaille <akim@epita.fr>
10180 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
10181 (copy_dollar): Now that everything uses obstacks, get rid of the
10184 2000-12-20 Akim Demaille <akim@epita.fr>
10186 * src/files.c (open_files): Actually the `.output' file is based
10187 on the short_base_name, not base_name.
10188 * tests/suite.at (Checking output file names): Adjust.
10190 2000-12-20 Akim Demaille <akim@epita.fr>
10192 * src/bison.s1: Remove, we now use directly...
10193 * src/bison.simple: this.
10194 * src/Makefile.am: Use pkgdata instead of data.
10196 2000-12-20 Akim Demaille <akim@epita.fr>
10198 * src/files.c (guard_obstack): New.
10199 (open_files): Initialize it.
10200 (output_files): Dump it...
10201 * src/files.h: Export it.
10202 * src/reader.c (copy_guard): Use it.
10204 2000-12-19 Akim Demaille <akim@epita.fr>
10206 * src/files.c (outfile, defsfile, actfile): Removed as global
10208 (open_files): Don't compute them.
10209 (output_files): Adjust.
10210 (base_name, short_base_name): Be global.
10211 Adjust dependencies.
10213 2000-12-19 Akim Demaille <akim@epita.fr>
10215 * src/files.c (strsuffix): New.
10216 (stringappend): Be just like strcat but allocate.
10217 (base_names): Eve out from open_files.
10218 Try to simplify the rather hairy computation of base_name and
10220 (open_files): Use it.
10221 * tests/suite.at (Checking output file names): New test.
10223 2000-12-19 Akim Demaille <akim@epita.fr>
10225 * src/system.h (obstack_grow_literal_string): Rename as...
10226 (obstack_grow_string): this.
10227 * src/output.c (output_parser): Recognize `%% actions' instead of
10229 * src/bison.s1: s/$/%% actions/.
10230 * src/bison.hairy: Likewise.
10232 2000-12-19 Akim Demaille <akim@epita.fr>
10234 * src/output.c (output_parser): Compute the `#line' lines when
10236 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
10237 Suggested by Hans Aberg.
10239 2000-12-19 Akim Demaille <akim@epita.fr>
10241 Let the handling of the skeleton files be local to the procedures
10244 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
10246 (fparser, open_extra_files): Remove.
10247 (open_files, output_files): Don't take care of fparser.
10248 * src/files.h: Adjust.
10249 * src/output.c (output_parser): Open and close the file to the
10251 * src/reader.c (read_declarations): When %semantic_parser, open
10254 2000-12-19 Akim Demaille <akim@epita.fr>
10256 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
10257 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
10259 2000-12-19 Akim Demaille <akim@epita.fr>
10261 * src/files.c (open_files): Yipee! We no longer need all the code
10262 looking for `/tmp' since we have no tmp file.
10264 2000-12-19 Akim Demaille <akim@epita.fr>
10266 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
10268 * src/files.c (open_files): Less dependency on MSDOS etc.
10270 2000-12-14 Akim Demaille <akim@epita.fr>
10272 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
10273 Provide a default definition.
10274 Use it when executing the default @ action.
10275 * src/reader.c (reader_output_yylsp): No longer include
10276 `timestamp' and `text' in the default YYLTYPE.
10278 2000-12-12 Akim Demaille <akim@epita.fr>
10280 * src/reader.c (copy_definition, parse_union_decl, copy_action)
10281 (copy_guard): Quote the file names.
10282 Reported by Laurent Mascherpa.
10284 2000-12-12 Akim Demaille <akim@epita.fr>
10286 * src/output.c (output_headers, output_program, output): Be sure
10287 to escape special characters when outputting filenames.
10288 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
10289 (output_headers): Don't depend on them, Use ACTSTR.
10291 2000-11-17 Akim Demaille <akim@epita.fr>
10293 * lib/obstack.h: Formatting changes.
10294 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
10295 prevents type checking.
10296 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
10297 cast the value to (void *): assigning a `foo *' to a `void *'
10299 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
10300 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
10303 2000-11-17 Akim Demaille <akim@epita.fr>
10305 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
10307 (suite.m4, regression.m4, calc.m4): these.
10308 * tests/atgeneral.m4: Update from CVS Autoconf.
10310 2000-11-17 Akim Demaille <akim@epita.fr>
10312 * tests/regression.m4 (%union and --defines): New test,
10313 demonstrating a current bug in the obstack implementation.
10315 2000-11-17 Akim Demaille <akim@epita.fr>
10317 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
10319 Use them to declare the variables which are global or local to
10322 2000-11-17 Akim Demaille <akim@epita.fr>
10324 * acconfig.h: Remove, no longer used.
10326 2000-11-07 Akim Demaille <akim@epita.fr>
10328 * src: s/Copyright (C)/Copyright/g.
10330 2000-11-07 Akim Demaille <akim@epita.fr>
10332 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
10334 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
10336 2000-11-07 Akim Demaille <akim@epita.fr>
10338 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
10339 Merge in a single CPP if/else.
10341 2000-11-07 Akim Demaille <akim@epita.fr>
10343 * src/output.c (output): Remove useless variables.
10344 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
10345 argument `data' for consistency with the prototypes.
10346 Qualify it `const'.
10347 (obstack_copy, obstack_copy0): Rename the second argument as
10348 `address' for consistency. Qualify it `const'.
10349 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
10350 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
10351 `const' their input argument (`data' or `address').
10352 Adjust the corresponding macros to include `const' in casts.
10354 2000-11-03 Akim Demaille <akim@epita.fr>
10356 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
10357 s/PFILE1/BISON_HAIRY/.
10358 Adjust dependencies.
10360 2000-11-03 Akim Demaille <akim@epita.fr>
10362 For some reason, this was not applied.
10364 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10365 `unlink': it's no longer used.
10367 2000-11-03 Akim Demaille <akim@epita.fr>
10369 * src/files.c (skeleton_find): New function, eved out of...
10370 (open_files, open_extra_files): here.
10372 2000-11-03 Akim Demaille <akim@epita.fr>
10374 Don't use `atexit'.
10376 * src/files.c (obstack_save): New function.
10377 (done): Rename as...
10378 (output_files): this.
10379 Use `obstack_save'.
10380 * src/main.c (main): Don't use `atexit' to register `done', since
10381 it no longer has to remove tmp files, just call `output_files'
10382 when there are no errors.
10384 2000-11-02 Akim Demaille <akim@epita.fr>
10386 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10387 `unlink': it's no longer used.
10388 * src/files.h: Formatting changes.
10390 2000-11-02 Akim Demaille <akim@epita.fr>
10392 Remove the last uses of mktemp and unlink/delete.
10394 * src/files.c (fdefines, ftable): Removed.
10395 (defines_ostack, table_obstack): New.
10396 Adjust dependencies of the former into uses of the latter.
10397 * src/output.c (output_short_or_char_table, output_short_table):
10398 Convert to using obstacks.
10399 * src/reader.c (copy_comment2): Accept one FILE * and two
10401 (output_token_defines, reader_output_yylsp): Use obstacks.
10402 * src/system.h (obstack_fgrow3): New.
10403 * po/POTFILES.in: Adjust.
10405 2000-11-01 Akim Demaille <akim@epita.fr>
10407 Change each use of `fattrs' into a use of `attrs_obstack'.
10409 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
10410 * src/files.c (fattrs): Remove.
10411 (attrs_obstack): New.
10412 Adjust all dependencies.
10413 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
10415 2000-11-01 Akim Demaille <akim@epita.fr>
10417 Introduce obstacks.
10418 Change each use of `faction' into a use of `action_obstack'.
10420 * lib/obstack.h, lib/obstack.c: New files.
10421 * src/files.c (faction): Remove.
10422 (action_obstack): New.
10423 Adjust all dependencies.
10425 2000-10-20 Akim Demaille <akim@epita.fr>
10427 * lib/quote.h (PARAMS): New macro. Use it.
10429 2000-10-16 Akim Demaille <akim@epita.fr>
10431 * src/output.c (output_short_or_char_table): New function.
10432 (output_short_table, output_token_translations): Use it.
10433 (goto_actions): Use output_short_table.
10435 2000-10-16 Akim Demaille <akim@epita.fr>
10437 * src/symtab.c (bucket_new): New function.
10440 * src/output.c (output_short_table): New argument to display the
10441 comment associated with the table.
10442 Adjust dependencies.
10443 (output_gram): Use it.
10444 (output_rule_data): Nicer output layout for YYTNAME.
10446 2000-10-16 Akim Demaille <akim@epita.fr>
10448 * src/lex.c (read_typename): New function.
10450 * src/reader.c (copy_dollar): Likewise.
10452 2000-10-16 Akim Demaille <akim@epita.fr>
10454 * src/reader.c (copy_comment2): Expect the input stream to be on
10455 the `/' which is suspected to open a comment, instead of being
10456 called after `//' or `/*' was read.
10457 (copy_comment, copy_definition, parse_union_decl, copy_action)
10458 (copy_guard): Adjust.
10460 2000-10-16 Akim Demaille <akim@epita.fr>
10462 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
10463 `read_signed_integer'.
10465 2000-10-16 Akim Demaille <akim@epita.fr>
10467 * src/reader.c (copy_dollar): New function.
10468 (copy_guard, copy_action): Use it.
10470 2000-10-16 Akim Demaille <akim@epita.fr>
10472 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
10473 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
10474 New files, from Fileutils 4.0.27.
10475 * src/main.c (printable_version): Remove.
10476 * src/lex.c, src/reader.c: Use `quote'.
10478 2000-10-04 Akim Demaille <akim@epita.fr>
10480 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
10482 2000-10-04 Akim Demaille <akim@epita.fr>
10484 * doc/bison.texinfo: Various typos spotted by Neil Booth.
10486 2000-10-04 Akim Demaille <akim@epita.fr>
10488 When a literal string is used to define two different tokens,
10489 `bison -v' segfaults.
10490 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
10492 * tests/regression.m4: New file.
10493 Include the core of the sample provided by Piotr Gackiewicz.
10494 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
10497 2000-10-04 Akim Demaille <akim@epita.fr>
10499 * src/reader.c (parse_expect_decl): Keep `count' within the size
10503 2000-10-02 Paul Eggert <eggert@twinsun.com>
10505 * bison.s1 (yyparse): Assign the default value
10506 unconditionally, to avoid a GCC warning and make the parser a
10509 2000-10-02 Akim Demaille <akim@epita.fr>
10511 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
10514 2000-10-02 Akim Demaille <akim@epita.fr>
10516 * src/derives.c, src/print.c, src/reduce.c: To ease the
10517 translation, move some `\n' out of the translated strings.
10519 2000-10-02 Akim Demaille <akim@epita.fr>
10521 The location tracking mechanism is precious for parse error
10522 messages. Nevertheless, it is enabled only when `@n' is used in
10523 the grammar, which is a different issue (you can use it in error
10524 message, but not in the grammar per se). Therefore, there should
10525 be another means to enable it.
10527 * src/getargs.c (getargs): Support `--locations'.
10528 (usage): Report it.
10529 * src/getargs.h (locationsflag): Export it.
10530 * src/lex.c (percent_table): Support `%locations'.
10531 * src/reader.c (yylsp_needed): Remove this variable, now replaced
10532 with `locationsflag'.
10533 * doc/bison.texinfo: Document `--locations' and `%locations'.
10535 * tests/calc.m4: Test it.
10537 For regularity of the names, replace each
10538 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
10539 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
10540 In addition replace each `flag' with `_flag'.
10542 2000-10-02 Akim Demaille <akim@epita.fr>
10544 Also test parse error messages, including with YYERROR_VERBOSE.
10546 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
10548 Use it to check the computations.
10549 Use it to check `nonassoc' is honored.
10550 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
10551 `--yyerror-verbose'.
10552 (_AT_CHECK_CALC): Adjust to this option.
10553 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
10555 2000-10-02 Akim Demaille <akim@epita.fr>
10557 Test also `--verbose', `--defines' and `--name-prefix'. Testing
10558 the latter demonstrates a flaw in the handling of non debugging
10559 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
10560 was used in order to simplify:
10576 unfortunately this leads to a CPP conflict when
10577 `--name-prefix=foo' is used since it produces `#define yydebug
10580 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
10581 (YYDPRINTF): New macro.
10583 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10585 Also test `--verbose', `--defines' and `--name-prefix'.
10587 2000-10-02 Akim Demaille <akim@epita.fr>
10589 Improve the readability of the produced parsers.
10591 * src/bison.s1: Formatting changes.
10592 Improve the comment related to the `$' mark.
10593 (yydefault): Don't fall through to `yyresume': `goto' there.
10594 * src/output.c (output_parser): When the `$' is met, skip the end
10596 New variable, `number_of_dollar_signs', to check there's exactly
10597 one `$' in the parser skeleton.
10599 2000-10-02 Akim Demaille <akim@epita.fr>
10601 * lib/xstrdup.c: New file, from the fileutils.
10602 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10603 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10604 instead of strlen + xmalloc + strcpy.
10605 * src/symtab.c (copys): Remove, use xstrdup instead.
10607 2000-10-02 Akim Demaille <akim@epita.fr>
10609 * src/gram.h (associativity): New enum type which replaces the
10610 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10611 `right_assoc', `left_assoc' and `non_assoc'.
10612 Adjust all dependencies.
10613 * src/reader.c: Formatting changes.
10614 (LTYPESTR): Don't define it, use it as a literal in
10615 `reader_output_yylsp'.
10616 * src/symtab.h (symbol_class): New enum type which replaces the
10617 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10618 `sunknown', `stoken and `snterm'.
10620 2000-10-02 Akim Demaille <akim@epita.fr>
10622 * src/getargs.c (fixed_outfiles): Rename as...
10623 (yaccflag): for consistency and accuracy.
10624 Adjust dependencies.
10626 2000-10-02 Akim Demaille <akim@epita.fr>
10628 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10629 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10630 difficult and introduced a lot of core dump. It turns out that
10631 Bison used an implementation of `xmalloc' based on `calloc', and
10632 at various places it does depend upon the initialization to 0. I
10633 have not tried to isolate the pertinent places, and all the former
10634 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10635 someone should address this issue.
10637 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10638 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10640 Adjust dependencies.
10641 * src/warshall.h: New file.
10644 2000-10-02 Akim Demaille <akim@epita.fr>
10646 Various anti-`extern in *.c' changes.
10648 * src/system.h: Include `assert.h'.
10650 2000-10-02 Akim Demaille <akim@epita.fr>
10652 * src/state.h (nstates, final_state, first_state, first_shift)
10653 (first_reduction): Move their exportation from here...
10654 * src/LR0.h: to here.
10655 Adjust dependencies.
10656 * src/getargs.c (statisticsflag): New variable.
10657 Add support for `--statistics'.
10658 Adjust dependencies.
10660 Remove a lot of now useless `extern' statements in most files.
10662 2000-10-02 Akim Demaille <akim@epita.fr>
10664 * src/LR0.h: New file.
10667 2000-10-02 Akim Demaille <akim@epita.fr>
10669 * src/print.h: New file.
10671 * src/print.c: Formatting and ordering changes.
10672 (verbose, terse): Replace with...
10673 (print_results): this new function.
10674 Adjust dependencies.
10676 2000-10-02 Akim Demaille <akim@epita.fr>
10678 * src/conflicts.c (conflict_report): New function.
10679 (conflict_log, verbose_conflict_log): Replace with...
10680 (print_conflicts): this function.
10681 Adjust dependencies.
10682 * src/conflicts.h: New file.
10683 Propagate its inclusion.
10685 2000-10-02 Akim Demaille <akim@epita.fr>
10687 * src/nullable.h: New file.
10688 Propagate its inclusion.
10689 * src/nullable.c: Formatting changes.
10691 2000-10-02 Akim Demaille <akim@epita.fr>
10693 * src/reduce.h: New file.
10694 Propagate its inclusion.
10695 * src/reduce.c: Topological sort and other formatting changes.
10696 (bool, TRUE, FALSE): Move their definition to...
10697 * src/system.h: here.
10699 2000-10-02 Akim Demaille <akim@epita.fr>
10701 * src/files.c: Formatting changes.
10702 (tryopen, tryclose, openfiles): Rename as...
10703 (xfopen, xfclose, open_files): this.
10704 (stringappend): static.
10705 * src/files.h: Complete the list of exported symbols.
10708 2000-10-02 Akim Demaille <akim@epita.fr>
10710 * src/reader.h: New file.
10711 Propagate its use instead of tedious list of `extern' and
10713 * src/reader.c: Formatting changes, topological sort,
10716 2000-10-02 Akim Demaille <akim@epita.fr>
10718 * src/lex.h: Prototype `lex.c' exported functions.
10719 * src/reader.c: Adjust.
10720 * src/lex.c: Formatting changes.
10721 (safegetc): Rename as...
10724 2000-10-02 Akim Demaille <akim@epita.fr>
10726 * src/lalr.h: New file.
10727 Propagate its inclusion instead of prototypes and `extern'.
10728 * src/lalr.c: Formatting changes, topological sorting etc.
10730 2000-10-02 Akim Demaille <akim@epita.fr>
10732 * src/output.c (token_actions): Introduce a temporary array,
10733 YYDEFACT, that makes it possible for this function to use
10734 output_short_table.
10736 2000-10-02 Akim Demaille <akim@epita.fr>
10738 `user_toknums' is output as a `short[]' in `output.c', while it is
10739 defined as a `int[]' in `reader.c'. For consistency with the
10740 other output tables, `user_toknums' is now defined as a table of
10743 * src/reader.c (user_toknums): Be a short table instead of an int
10745 Adjust dependencies.
10747 Factor the short table outputs.
10749 * src/output.c (output_short_table): New function.
10750 * src/output.c (output_gram, output_stos, output_rule_data)
10751 (output_base, output_table, output_check): Use it.
10753 2000-10-02 Akim Demaille <akim@epita.fr>
10755 * src/output.c (output): Topological sort of the functions, in
10756 order to get rid of the `static' prototypes.
10757 No longer use `register'.
10758 * src/output.h: New file.
10759 Propagate its inclusion in files explicitly prototyping functions
10762 2000-09-21 Akim Demaille <akim@epita.fr>
10764 * src/atgeneral.m4: Update from Autoconf.
10766 2000-09-21 Akim Demaille <akim@epita.fr>
10768 * src/closure.h: New file.
10769 * src/closure.c: Formatting changes, topological sort over the
10770 functions, use of closure.h.
10771 (initialize_closure, finalize_closure): Rename as...
10772 (new_closure, free_closure): these. Adjust dependencies.
10773 * src/LR0.c: Formatting changes, topological sort, use of
10775 (initialize_states): Rename as...
10776 (new_states): this.
10777 * src/Makefile.am (noinst_HEADERS): Adjust.
10779 2000-09-20 Akim Demaille <akim@epita.fr>
10781 * src/acconfig.h: Don't protect config.h against multiple
10783 Don't define PARAMS.
10784 * src/system.h: Define PARAMS.
10785 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
10786 purpose of config.h. system.h must not try to fix wrong
10787 definitions in config.h.
10789 2000-09-20 Akim Demaille <akim@epita.fr>
10791 * src/derives.h: New file.
10792 * src/main.c, src/derives.h: Use it.
10793 Formatting changes.
10794 * src/Makefile.am (noinst_HEADERS): Adjust.
10796 2000-09-20 Akim Demaille <akim@epita.fr>
10798 * tests/atgeneral.m4: Update from Autoconf.
10799 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
10800 (AT_CHECK_CALC): New macros.
10801 Use these macros to test bison with options `', `--raw',
10802 `--debug', `--yacc', `--yacc --debug'.
10804 2000-09-19 Akim Demaille <akim@epita.fr>
10806 * src/output.c: Formatting changes.
10807 * src/machine.h: Remove, leaving its contents in...
10808 * src/system.h: here.
10810 Adjust all dependencies on stdio.h and machine.h.
10811 * src/getargs.h: New file.
10812 Let all `extern' declarations about getargs.c be replaced with
10813 inclusion of `getargs.h'.
10814 * src/Makefile.am (noinst_HEADERS): Adjust.
10816 * tests/calc.m4 (yyin): Be initialized in main, not on the global
10818 (yyerror): Returns void, not int.
10819 * doc/bison.texinfo: Formatting changes.
10821 2000-09-19 Akim Demaille <akim@epita.fr>
10823 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
10826 2000-09-18 Akim Demaille <akim@epita.fr>
10828 * configure.in: Append WARNING_CFLAGS to CFLAGS.
10829 * src/Makefile.am (INCLUDES): Don't.
10830 Be ready to fetch headers in lib/.
10832 2000-09-18 Akim Demaille <akim@epita.fr>
10834 * doc/bison.texinfo: Update the copyright.
10835 ANSIfy and GNUify the examples.
10836 Remove the old menu.
10838 2000-09-18 Akim Demaille <akim@epita.fr>
10840 First set of tests: use the `calc' example from the documentation.
10842 * src/bison.s1 (yyparse): Condition the code using `yytname' which
10843 is defined only when YYDEBUG is.
10844 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
10845 * src/files.c (tryopen, tryclose): Formatting changes.
10846 Move to the top and be static.
10847 * src/reader.c (read_signed_integer): Likewise.
10848 * tests/calc.m4: New file.
10849 * Makefile.am, suite.m4: Adjust.
10850 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
10852 2000-09-18 Akim Demaille <akim@epita.fr>
10854 Add support for an Autotest test suite for Bison.
10856 * m4/m4.m4, m4/atconfig.m4: New files.
10857 * m4/Makefile.am (EXTRA_DIST): Adjust.
10858 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
10860 * src/getargs.c: Display a more standard --version message.
10861 * src/reader.c (reader): Formatting changes.
10862 No longer depend upon VERSION_STRING.
10863 * configure.in: No longer use `dnl'.
10864 Set up the test suite and the new directory `tests/.
10865 (VERSION_STRING): Remove.
10867 2000-04-14 Akim Demaille <akim@epita.fr>
10869 * src/reader.c (copy_comment2): New function, same as former
10870 `copy_comment', but outputs into two FILE *.
10871 (copy_comment): Use it.
10872 (parse_union_decl): Use it.
10873 (get_type, parse_start_decl): Use the same `invalid' message.
10874 (parse_start_decl, parse_union_decl): Use the same `multiple'
10876 (parse_union_decl, copy_guard, copy_action): Use the same
10877 `unmatched' message.
10878 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
10880 2000-03-31 Akim Demaille <akim@epita.fr>
10882 * src/files.c (tryopen, tryclose): Move to the top.
10885 2000-03-31 Akim Demaille <akim@epita.fr>
10887 * src/main.c (main): Don't call `done', exit does it.
10889 2000-03-31 Akim Demaille <akim@epita.fr>
10891 * allocate.c: s/return (foo)/return foo/.
10892 * lalr.c: Likewise.
10894 * output.c: Likewise.
10895 * reader.c: Likewise.
10896 * symtab.c: Likewise.
10897 * vmsgetargs.c: Likewise.
10899 2000-03-31 Akim Demaille <akim@epita.fr>
10901 Clean up the error reporting functions.
10903 * src/report.c: New file.
10904 * src/report.h: Likewise.
10905 * src/Makefile.am: Adjust.
10906 * m4/error.m4: New file.
10907 * m4/Makefile.am: Adjust.
10908 * configure.in (jm_PREREQ_ERROR): Call it.
10909 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
10911 (fatal, fatals): Remove. All callers use complain.c::fatal.
10912 (warn, warni, warns, warnss, warnss): Remove. All callers use
10913 complain.c::complain.
10914 (toomany): Remove, use fatal instead.
10915 * src/files.c (done): No argument, use complain_message_count.
10916 * src/main.c (main): Register `done' to `atexit'.
10918 * src/getargs.c (usage): More `fputs', less `fprintf'.
10920 2000-03-28 Akim Demaille <akim@epita.fr>
10922 * lib/: New directory.
10923 * Makefile.am (SUBDIRS): Adjust.
10924 * configure.in: Adjust.
10925 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
10927 * src/alloca.c: Moved to lib/.
10928 * src/getopt.c: Likewise.
10929 * src/getopt1.c: Likewise.
10930 * src/getopt.h: Likewise.
10931 * src/ansi2knr.c: Likewise.
10932 * src/ansi2knr.1: Likewise.
10933 * src/Makefile.am: Adjust.
10934 * lib/Makefile.am: New file.
10936 2000-03-28 Akim Demaille <akim@epita.fr>
10938 * src/getargs.c (usage): Refresh the help message.
10940 2000-03-17 Akim Demaille <akim@epita.fr>
10942 * src/getopt1.c: Updated from textutils 2.0e
10943 * src/getopt.c: Likewise.
10944 * src/getopt.h: Likewise.
10946 2000-03-17 Akim Demaille <akim@epita.fr>
10948 * src/Makefile.am (bison.simple): Fix the awk program: quote only
10949 the file name, not the whole `#line LINE FILE'.
10951 2000-03-17 Akim Demaille <akim@epita.fr>
10953 On syntax errors, report the token on which we choked.
10955 * src/bison.s1 (yyparse): In the label yyerrlab, when
10956 YYERROR_VERBOSE, add yychar in msg.
10958 2000-03-17 Akim Demaille <akim@epita.fr>
10960 * src/reader.c (copy_at): New function.
10961 (copy_guard): Use it.
10962 (copy_action): Use it.
10964 2000-03-17 Akim Demaille <akim@epita.fr>
10966 Be kind to translators, save some useless translations.
10968 * src/main.c (banner): New function.
10969 (fatal_banner): Use it.
10970 (warn_banner): Use it.
10972 2000-03-17 Akim Demaille <akim@epita.fr>
10974 * src/reader.c (copy_definition): Use copy_string and
10975 copy_comment. Removed now unused `match', `ended',
10977 (copy_comment, copy_string): Moved, to be visible from
10980 2000-03-17 Akim Demaille <akim@epita.fr>
10982 * src/reader.c (copy_string): Declare `static inline'. No
10983 problems with inline, since it is checked by configure.
10984 (copy_comment): Likewise.
10986 2000-03-17 Akim Demaille <akim@epita.fr>
10988 * src/reader.c (packsymbols): Formatting changes.
10990 2000-03-17 Akim Demaille <akim@epita.fr>
10992 * src/reader.c (copy_comment): New function, factored out from:
10993 (copy_action): Use it. Removed now unused `match', `ended',
10995 (copy_guard): Likewise.
10997 2000-03-17 Akim Demaille <akim@epita.fr>
10999 * src/reader.c (copy_string): New function, factored out from:
11000 (copy_action): Use it.
11001 (copy_guard): Likewise.
11003 2000-03-17 Akim Demaille <akim@epita.fr>
11005 Change the handling of @s so that they behave exactly like $s.
11006 There is now a pseudo variable @$ (readble and writable), location
11007 of the lhs of the rule (by default ranging from the location of
11008 the first symbol of the rhs, to the location of the last symbol,
11009 or, if the rhs is empty, YYLLOC).
11011 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
11013 (yyparse): When providing a default semantic action, provide a
11014 default location action.
11015 (after the $): No longer change `*YYLSP', just stack YYLOC the
11016 same way you stack YYVAL.
11017 * src/reader.c (read_declarations): Use warns.
11018 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
11019 (copy_action, case '@'): Likewise.
11020 Use a standard error message, to save useless work from
11023 2000-03-17 Akim Demaille <akim@epita.fr>
11025 * src/bison.s1: Formatting and cosmetics changes.
11026 * src/reader.c: Likewise.
11027 Update the Copyright notice.
11029 2000-03-17 Akim Demaille <akim@epita.fr>
11031 * src/bison.s1 (#line): All set to `#line' only, since the
11032 Makefile now handles them.
11034 2000-03-16 Akim Demaille <akim@epita.fr>
11036 * src/output.c (output_rule_data): Output the documentation of
11037 some of the tables.
11038 (Copyright notice): Update.
11039 Formatting changes.
11041 2000-03-16 Akim Demaille <akim@epita.fr>
11043 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
11044 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
11045 One `#if YYDEBUG' remains, since it uses variables which are
11046 defined only if `YYDEBUG != 0'.
11048 2000-03-16 Akim Demaille <akim@epita.fr>
11050 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
11051 and related variables so that the similarities are highlighted.
11053 2000-03-16 Akim Demaille <akim@epita.fr>
11055 * src/bison.s1: Properly indent CPP directives.
11057 2000-03-16 Akim Demaille <akim@epita.fr>
11059 * src/bison.s1: Properly indent the `alloca' CPP section.
11061 2000-03-16 Akim Demaille <akim@epita.fr>
11063 Do not hard code values of directories in `configure.in'.
11064 Update the `configure' tool chain.
11066 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
11068 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
11069 (AC_OUTPUT): Add m4/Makefile.
11070 Bump to bison 1.28a, 1.29 has never been released.
11071 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
11072 handled via src/Makefile.am.
11073 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
11074 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
11076 * Makefile.am (SUBDIRS): Add m4.
11077 (ACLOCAL_AM_FLAGS): New variable.
11078 (AUTOMAKE_OPTIONS): Add check-news.
11079 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
11080 the proper line number and file name.
11081 (DEFS): Propagate the location of bison library files and of the
11083 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
11085 * acinclude.m4: Remove, replaced by the directory m4.
11086 * m4/Makefile.am (EXTRA_DIST): New variable.
11087 * m4/gettext.m4: New file, from the fileutils.
11088 * m4/lcmessage.m4: Likewise
11089 * m4/progtest.m4: Likewise.
11090 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
11092 2000-03-10 Akim Demaille <akim@epita.fr>
11095 Formatting changes of various comments.
11096 Respect the GNU coding standards at various places.
11097 Don't use `_()' when no translation is needed.
11099 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11102 OS/2 honors TMPDIR environment variable.
11104 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11106 * doc/bison.texinfo: Tweaked spelling and grammar.
11108 Removed reference to price of printed copy.
11109 Mention BISON_SIMPLE and BISON_HAIRY.
11111 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11113 * configure.in, NEWS:
11114 Bison 1.29 released.
11116 1999-10-27 Jesse Thilo <jthilo@gnu.org>
11118 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
11119 Added reference card.
11121 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11123 * po/ru.po: Added Russian translation.
11125 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11127 * configure.in: Added Russian translation.
11129 1999-07-06 Jesse Thilo <jthilo@gnu.org>
11131 * configure.in, NEWS, README:
11132 Released version 1.28.
11134 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11137 Squashed redefinition warning on some systems.
11139 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
11140 Have configure build version string instead of relying on ANSI string
11143 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11145 * po/POTFILES.in: Got rid of version.c.
11147 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11149 * acconfig.h, configure.in:
11150 Have configure build version string instead of relying on ANSI string
11153 1999-06-08 Jesse Thilo <jthilo@gnu.org>
11156 Dropped mention of `+' for long-named options.
11158 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11160 * src/files.c: Added <unistd.h> for unlink().
11162 * src/Makefile.am, src/system.h:
11165 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11167 * README: Added a FAQ list.
11169 * configure.in, acconfig.h:
11172 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11174 * doc/FAQ, doc/Makefile.am:
11177 1999-05-19 Jesse Thilo <jthilo@gnu.org>
11179 * src/alloc.h, src/symtab.h, src/version.c:
11180 Protected inclusion of "config.h" with HAVE_CONFIG_H.
11182 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11184 * src/.cvsignore, src/Makefile.am:
11185 Reorganized: sources in `src', documentation in `doc'.
11187 * src/lex.c (literalchar):
11188 fixed the code for escaping double quotes (thanks
11191 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11193 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
11194 Adjusted paths to reflect directory reorganization.
11196 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11198 * doc/.cvsignore, doc/Makefile.am:
11199 Reorganized: sources in `src', documentation in `doc'.
11201 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11204 Updated AC_INIT file to reflect directory reorganization.
11206 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
11207 Reorganized: sources in `src', documentation in `doc'.
11209 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11212 Don't declare calloc() and realloc() if not necessary.
11214 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11216 * configure.in, acconfig.h, acinclude.m4:
11217 Don't declare calloc() and realloc() if not necessary.
11219 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11221 * po/.cvsignore: Added i18n support.
11223 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11225 * acconfig.h, configure.in, Makefile.am:
11226 Added i18n support.
11228 1999-03-22 Jesse Thilo <jthilo@gnu.org>
11230 * src/bison.s1: Fixed #line numbers.
11232 1999-03-15 Jesse Thilo <jthilo@gnu.org>
11234 * po/es.po, po/fr.po, po/nl.po, po/de.po:
11235 Added PO files from Translation Project.
11237 1999-03-03 Jesse Thilo <jthilo@gnu.org>
11240 Added support for non-ANSI compilers (ansi2knr).
11242 1999-02-16 Jesse Thilo <jthilo@gnu.org>
11244 * configure.in: Bumped version number to 1.27.
11247 Added `bison.simple' to list of files removed by `make distclean'.
11249 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11251 * src/files.c, src/files.h:
11252 Defined locations of parser files in config.h instead of Makefile.
11254 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11256 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
11257 Defined locations of parser files in config.h instead of Makefile.
11259 1999-02-09 Jesse Thilo <jthilo@gnu.org>
11262 Removed inappropriate use of $< macro.
11264 1999-02-05 Jesse Thilo <jthilo@gnu.org>
11266 * po/Makefile.in.in, po/POTFILES.in:
11267 Add `po' directory skeleton.
11269 1999-01-27 Jesse Thilo <jthilo@gnu.org>
11271 * README: Document help-bison list.
11273 * configure.in: Add check for mkstemp().
11275 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11277 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
11278 Hush a few compiler warnings.
11281 Add tryclose(), which verifies that fclose was successful.
11282 Hush a couple of compiler warnings.
11284 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11286 * Makefile.am, OChangeLog:
11287 ChangeLog is now automatically generated. Include the old version as
11290 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11292 * 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:
11293 Update FSF address.
11295 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11297 * doc/bison.texinfo: Fix formatting glitch.
11299 * doc/bison.texinfo: Update FSF address.
11301 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11303 * acconfig.h: Update FSF address.
11305 1999-01-08 Jesse Thilo <jthilo@gnu.org>
11308 Don't define PACKAGE here, since config.h defines it.
11310 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11312 * src/reader.c: Update copyright date.
11315 Ditch sprintf to statically-sized buffers in fatal/warn functions in
11316 favor of output directly to stderr (avoids buffer overruns).
11318 * src/reader.c: Some checks for premature EOF.
11320 * 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:
11321 Use prototypes if the compiler understands them.
11323 * src/files.c: Honor TMPDIR on Unix hosts.
11324 Use prototypes if the compiler understands them.
11327 Fix a couple of buffer overrun bugs.
11328 Use prototypes if the compiler understands them.
11330 * src/system.h: Include unistd.h and ctype.h.
11331 Use #ifdef instead of #if for NLS symbols.
11333 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11335 * doc/bison.texinfo:
11336 Delete comment "consider using @set for edition number, etc..." since
11337 we now are doing so.
11339 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11342 Use prototypes if the compiler understands them.
11344 * NEWS: Document 1.26 highlights.
11346 * Makefile.am: Require Automake 1.3 or later.
11349 Use prototypes if the compiler understands them.
11351 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11354 Use VERSION symbol from automake for version number.
11356 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11358 * acconfig.h, configure.in, version.cin:
11359 Use VERSION symbol from automake for version number.
11361 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11364 Distribute original version of simple parser (bison.s1), not built
11365 version (bison.simple).
11367 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11369 * doc/bison.texinfo: Add info dir entry.
11371 * doc/bison.texinfo:
11372 Let automake put version number into documentation.
11374 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11376 * src/bison.cld, src/build.com, src/vmshlp.mar:
11377 Add non-RCS files from /gd/gnu/bison.
11379 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11382 Document the BISON_HAIRY and BISON_SIMPLE variables.
11384 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11386 * src/version.c: Build version.c automatically.
11389 Fix token numbering (used to start at 258, not 257).
11391 * src/system.h: Include config.h.
11393 * src/getargs.c: Update bug report address.
11395 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
11396 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
11398 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11401 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11403 * configure.in, version.cin:
11404 Build version.c automatically.
11406 * AUTHORS: Add AUTHORS file.
11408 * README: Update bug report address.
11411 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11413 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
11414 Add automake stuff.
11416 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11418 * doc/bison.texinfo: Clean up some formatting.
11420 1998-05-05 Richard Stallman <rms@gnu.org>
11422 * doc/bison.texinfo:
11423 Explain better why to make a pure parser.
11425 1998-01-05 Richard Stallman <rms@gnu.org>
11427 * src/files.c (openfiles):
11428 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
11429 find a temporary directory, if possible. Do not unlink files while
11432 1997-08-25 Richard Stallman <rms@gnu.org>
11434 * src/reader.c (stack_offset;):
11435 Change some warni to warns.
11437 * src/lex.c (literalchar): Use warns, not warni.
11439 1997-06-28 Richard Stallman <rms@gnu.org>
11441 * src/bison.s1: Add a Bison version comment.
11443 * src/main.c (fatal, warn, berror):
11446 1997-06-28 Richard Stallman <rms@gnu.org>
11448 * Makefile.in (bison_version): New variable.
11449 (dist): Use that variable.
11450 (bison.s1): Substitute the Bison version into bison.simple.
11452 * bison.simple: Add a Bison version comment.
11454 1997-06-18 Richard Stallman <rms@gnu.org>
11456 * src/main.c (fatal, warn, berror):
11457 Make error messages standard.
11458 (toomany): Improve error message text.
11460 * 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:
11461 new.h renamed to alloc.h.
11463 1997-06-18 Richard Stallman <rms@gnu.org>
11465 * Makefile.in: new.h renamed to alloc.h.
11467 1997-05-24 Richard Stallman <rms@gnu.org>
11469 * src/lex.c (literalchar):
11470 Fix the code for escaping \, " and '.
11472 (lex): Avoid trouble when there are many chars
11473 to discard in a char literal with just several chars in it.
11475 1997-05-17 Richard Stallman <rms@gnu.org>
11478 Use malloc, if using alloca is troublesome.
11479 (YYSTACK_USE_ALLOCA): New flag macro.
11480 Define it for some systems and compilers.
11481 (YYSTACK_ALLOC): New macro.
11482 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11483 If it was malloc'd, free it.
11485 1997-05-17 Richard Stallman <rms@gnu.org>
11488 Use malloc, if using alloca is troublesome.
11489 (YYSTACK_USE_ALLOCA): New flag macro.
11490 Define it for some systems and compilers.
11491 (YYSTACK_ALLOC): New macro.
11492 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11493 If it was malloc'd, free it.
11495 1997-04-23 Richard Stallman <rms@gnu.org>
11498 (alloca) [__hpux]: Always define as __builtin_alloca.
11500 1997-04-23 Richard Stallman <rms@gnu.org>
11503 (alloca) [__hpux]: Always define as __builtin_alloca.
11505 1997-04-22 Richard Stallman <rms@gnu.org>
11508 [__hpux]: Include alloca.h (right for HPUX 10)
11509 instead of declaring alloca (right for HPUX 9).
11511 * src/bison.s1 (__yy_memcpy):
11512 Declare arg `count' as unsigned int.
11513 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11515 1997-04-22 Richard Stallman <rms@gnu.org>
11518 [__hpux]: Include alloca.h (right for HPUX 10)
11519 instead of declaring alloca (right for HPUX 9).
11521 * bison.simple (__yy_memcpy):
11522 Declare arg `count' as unsigned int.
11523 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11525 1997-01-03 Richard Stallman <rms@gnu.org>
11527 * src/allocate.c: [__STDC__ or _MSC_VER]:
11528 Declare calloc and realloc to return void *.
11530 1997-01-02 Richard Stallman <rms@gnu.org>
11533 [_MSC_VER]: Include stdlib.h and process.h.
11534 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
11536 * src/main.c (main): Return FAILURE as a value.
11537 (printable_version): Declare arg as int, not char.
11539 1997-01-02 Richard Stallman <rms@gnu.org>
11541 * Makefile.in (dist):
11542 Explicitly check for symlinks, and copy them.
11544 1996-12-19 Richard Stallman <rms@gnu.org>
11547 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
11549 1996-12-18 Paul Eggert <eggert@gnu.org>
11551 * src/bison.s1 (yyparse):
11552 If __GNUC__ and YYPARSE_PARAM are both defined,
11553 declare yyparse to have a void * argument.
11555 1996-12-18 Paul Eggert <eggert@gnu.org>
11557 * bison.simple (yyparse):
11558 If __GNUC__ and YYPARSE_PARAM are both defined,
11559 declare yyparse to have a void * argument.
11561 1996-12-17 Richard Stallman <rms@gnu.org>
11563 * src/reduce.c (nbits): Add some casts.
11565 1996-08-12 Richard Stallman <rms@gnu.org>
11567 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
11569 1996-08-12 Richard Stallman <rms@gnu.org>
11571 * bison.simple: Test _MSDOS as well as _MSDOS_.
11573 1996-07-31 Richard Stallman <rms@gnu.org>
11576 [__sun && __i386]: Include alloca.h.
11578 1996-07-31 Richard Stallman <rms@gnu.org>
11581 [__sun && __i386]: Include alloca.h.
11583 1996-07-30 Richard Stallman <rms@gnu.org>
11585 * src/bison.s1: Comment change.
11587 * src/bison.s1: Test _MSDOS_, not MSDOS.
11589 1996-07-30 Richard Stallman <rms@gnu.org>
11591 * bison.simple: Comment change.
11593 * bison.simple: Test _MSDOS_, not MSDOS.
11595 1996-06-01 Richard Stallman <rms@gnu.org>
11597 * 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:
11598 Insert `_' macro around many string constants.
11601 Insert `_' macro around many string constants.
11603 (main): Call setlocale, bindtextdomain and textdomain.
11605 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11606 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11607 [ENABLE_NLS]: Include libintl.h.
11608 [ENABLE_NLS] (gettext): Define.
11609 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11610 (N_, PACKAGE, LOCALEDIR): New macros.
11612 1996-06-01 Richard Stallman <rms@gnu.org>
11614 * POTFILES.in: New file.
11616 * Makefile.in (allocate.o):
11617 Define target explicitly.
11619 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11620 (LDFLAGS): Set to @LDFLAGS@.
11621 (configure): Run autoconf only if preceding `cd' succeeds.
11622 (bison.s1): Redirect output to temporary file then move the
11623 temporary to the target, rather than redirecting directly to bison.s1.
11624 (clean): Remove config.status and config.log.
11625 (distclean): Don't remove config.status here.
11627 1996-05-12 Richard Stallman <rms@gnu.org>
11630 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11632 1996-05-12 Richard Stallman <rms@gnu.org>
11635 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11637 1996-05-11 Richard Stallman <rms@gnu.org>
11639 * src/bison.s1 (__yy_memcpy):
11640 Really reorder the args, as was supposedly done on Feb 14 1995.
11641 (yyparse): Calls changed accordingly.
11643 1996-05-11 Richard Stallman <rms@gnu.org>
11645 * Makefile.in (dist): Don't use $(srcdir).
11647 * bison.simple (__yy_memcpy):
11648 Really reorder the args, as was supposedly done on Feb 14 1995.
11649 (yyparse): Calls changed accordingly.
11651 1996-01-27 Richard Stallman <rms@gnu.org>
11653 * src/output.c (output_rule_data):
11654 Test YYERROR_VERBOSE in the conditional
11655 around the definition of ttyname.
11657 1995-12-29 Richard Stallman <rms@gnu.org>
11660 Fix line numbers in #line commands.
11662 1995-12-29 Richard Stallman <rms@gnu.org>
11665 Fix line numbers in #line commands.
11667 1995-12-27 Richard Stallman <rms@gnu.org>
11669 * src/bison.s1 (YYPARSE_PARAM_DECL):
11670 In C++, make it always null.
11671 (YYPARSE_PARAM_ARG): New macro.
11672 (yyparse): Use YYPARSE_PARAM_ARG.
11674 1995-12-27 Richard Stallman <rms@gnu.org>
11676 * bison.simple (YYPARSE_PARAM_DECL):
11677 In C++, make it always null.
11678 (YYPARSE_PARAM_ARG): New macro.
11679 (yyparse): Use YYPARSE_PARAM_ARG.
11681 1995-11-29 Richard Stallman <rms@gnu.org>
11683 * doc/bison.texinfo:
11684 Describe literal string tokens, %raw, %no_lines, %token_table.
11686 1995-11-29 Daniel Hagerty <hag@gnu.org>
11688 * doc/bison.texinfo: Fixed update date
11690 1995-10-16 Richard Stallman <rms@gnu.org>
11692 * src/version.c: Version 1.25.
11694 1995-10-16 Richard Stallman <rms@gnu.org>
11696 * NEWS: *** empty log message ***
11698 1995-10-16 Richard Stallman <rms@gnu.org>
11700 * doc/bison.1, doc/bison.rnh:
11703 1995-10-15 Richard Stallman <rms@gnu.org>
11705 * src/vmsgetargs.c, src/getargs.c:
11706 Added -n, -k, and -raw switches.
11707 (noparserflag, toknumflag, rawtoknumflag): New variables.
11709 * src/symtab.h (SALIAS):
11710 New #define for adding aliases to %token.
11711 (struct bucket): Added `alias' field.
11713 * src/reduce.c (reduce_grammar):
11714 Revise error message.
11715 (print_notices): Remove final `.' from error message.
11717 * src/reader.c (reader_output_yylsp):
11719 (readgram): Use `#if 0' around code that accepted %command
11720 inside grammar rules: The documentation doesn't allow it,
11721 and it will fail since the %command processors scan for the next %.
11722 (parse_token_decl): Extended the %token
11723 declaration to allow a multi-character symbol as an alias.
11724 (parse_thong_decl): New function.
11725 (read_declarations): Added %thong declarations.
11726 (read_declarations): Handle NOOP to deal with allowing
11727 % declarations as another means to specify the flags.
11728 (readgram): Allow %prec prior to semantics embedded in a rule.
11729 (skip_to_char, read_declarations, copy_definition)
11730 (parse_token_decl, parse_start_decl, parse_type_decl)
11731 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
11732 (get_type_name, copy_guard, copy_action, readgram)
11733 (get_type, packsymbols): Revised most error messages.
11734 Changed `fatal' to `warnxxx' to avoid aborting for error.
11735 Revised and use multiple warnxxx functions to avoid using VARARGS1.
11736 (read_declarations): Improve the error message for
11737 an invalid character. Do not abort.
11738 (read_declarations, copy_guard, copy_action): Use
11739 printable_version to avoid unprintable characters in printed output.
11740 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
11741 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
11742 Allow the type of a non-terminal can be given
11743 more than once, as long as all specifications give the same type.
11746 (output_headers, output_trailers, output, output_gram)
11747 (output_rule_data): Implement noparserflag variable.
11748 Implement toknumflag variable.
11749 (output): Call reader_output_yylsp to output LTYPESTR.
11751 * src/main.c (main):
11752 If reader sees an error, don't process the grammar.
11753 (fatals): Updated to not use VARARGS1.
11754 (printable_version, int_to_string, warn, warni, warns, warnss)
11755 (warnsss): New error reporting functions. Avoid abort for error.
11758 Added THONG and NOOP for alias processing.
11759 Added SETOPT for the new code that allows setting options with %flags.
11762 Include getopt.h. Add some extern decls.
11763 (safegetc): New function to deal with EOF gracefully.
11764 (literalchar); new function to deal with reading \ escapes.
11765 (lex): Use literalchar.
11766 (lex): Implemented "..." tokens.
11767 (literalchar, lex, parse_percent_token): Made tokenbuffer
11768 always contain the token. This includes growing the token
11769 buffer while reading an integer.
11770 (parse_percent_token): Replaced if-else statement with percent_table.
11771 (parse_percent_token): Added % declarations as another
11772 way to specify the flags -n, -l, and -r. Also added hooks for
11773 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
11774 major changes to files.c.
11775 (lex) Retain in the incoming stream a character following
11777 (skip_white_space, lex): Revised most error messages
11778 and changed fatal to warn to avoid aborting.
11779 (percent_table): Added %thong declarations.
11781 * src/gram.h: Comment changes.
11783 * src/files.c (openfiles, open_extra_files, done):
11785 and actfile file. Handle noparserflag. Both for -n switch.
11787 * src/conflicts.c (resolve_sr_conflict):
11788 Remove use of alloca.
11790 1995-06-01 Jim Meyering <meyering@gnu.org>
11792 * doc/bison.texinfo: *** empty log message ***
11794 1995-05-06 Richard Stallman <rms@gnu.org>
11796 * src/bison.s1: Comment change.
11798 1995-05-06 Richard Stallman <rms@gnu.org>
11800 * bison.simple: Comment change.
11802 1995-05-03 Richard Stallman <rms@gnu.org>
11804 * src/version.c: Version now 1.24.
11806 * src/bison.s1: Change distribution terms.
11808 * src/version.c: Version now 1.23.
11810 1995-05-03 Richard Stallman <rms@gnu.org>
11812 * doc/bison.texinfo:
11813 Rewrite "Conditions for Using Bison".
11814 Update version to 1.24.
11816 1995-05-03 Richard Stallman <rms@gnu.org>
11818 * bison.simple: Change distribution terms.
11820 1995-02-23 Richard Stallman <rms@gnu.org>
11822 * src/files.c: Test __VMS_POSIX as well as VMS.
11824 1995-02-14 Jim Meyering <meyering@gnu.org>
11826 * src/bison.s1 (__yy_memcpy):
11827 Renamed from __yy_bcopy to avoid
11828 confusion. Reverse FROM and TO arguments to be consistent with
11831 1995-02-14 Jim Meyering <meyering@gnu.org>
11833 * bison.simple (__yy_memcpy):
11834 Renamed from __yy_bcopy to avoid
11835 confusion. Reverse FROM and TO arguments to be consistent with
11838 1994-11-10 David J. MacKenzie <djm@gnu.org>
11844 * Makefile.in (DISTFILES): Include NEWS.
11846 * Makefile.in (DISTFILES):
11847 Include install-sh, not install.sh.
11849 * configure.in: Update to Autoconf v2 macro names.
11851 1994-10-05 David J. MacKenzie <djm@gnu.org>
11853 * Makefile.in: fix typo
11855 * Makefile.in (prefix, exec_prefix):
11856 Let configure set them.
11858 1994-09-28 David J. MacKenzie <djm@gnu.org>
11860 * Makefile.in: Set datadir to $(prefix)/share.
11862 1994-09-15 Richard Stallman <rms@gnu.org>
11865 Update copyright notice and GPL version.
11867 1994-09-15 Richard Stallman <rms@gnu.org>
11870 Update copyright notice and GPL version.
11872 1994-07-12 Richard Stallman <rms@gnu.org>
11874 * src/reduce.c, src/reader.c:
11877 1994-05-05 David J. MacKenzie <djm@gnu.org>
11879 * Makefile.in: entered into RCS
11881 1994-03-26 Richard Stallman <rms@gnu.org>
11883 * src/bison.s1: entered into RCS
11885 1994-03-26 Richard Stallman <rms@gnu.org>
11887 * bison.simple: entered into RCS
11889 1994-03-25 Richard Stallman <rms@gnu.org>
11891 * src/main.c: entered into RCS
11893 1994-03-24 Richard Stallman <rms@gnu.org>
11895 * src/conflicts.c: entered into RCS
11897 1994-01-02 Richard Stallman <rms@gnu.org>
11899 * Makefile.in: *** empty log message ***
11901 1993-11-21 Richard Stallman <rms@gnu.org>
11903 * src/bison.s1: *** empty log message ***
11905 1993-11-21 Richard Stallman <rms@gnu.org>
11907 * doc/bison.texinfo: entered into RCS
11909 * doc/bison.texinfo: *** empty log message ***
11911 1993-11-21 Richard Stallman <rms@gnu.org>
11913 * bison.simple: *** empty log message ***
11915 1993-10-25 David J. MacKenzie <djm@gnu.org>
11917 * doc/bison.texinfo: *** empty log message ***
11919 1993-10-19 Richard Stallman <rms@gnu.org>
11921 * src/bison.s1: *** empty log message ***
11923 1993-10-19 Richard Stallman <rms@gnu.org>
11925 * bison.simple: *** empty log message ***
11927 1993-10-14 Richard Stallman <rms@gnu.org>
11929 * src/bison.s1: *** empty log message ***
11931 1993-10-14 Richard Stallman <rms@gnu.org>
11933 * bison.simple: *** empty log message ***
11935 1993-09-14 David J. MacKenzie <djm@gnu.org>
11937 * doc/bison.texinfo: *** empty log message ***
11939 1993-09-13 Noah Friedman <friedman@gnu.org>
11941 * Makefile.in: *** empty log message ***
11943 1993-09-10 Richard Stallman <rms@gnu.org>
11945 * src/conflicts.c: *** empty log message ***
11947 * src/system.h: entered into RCS
11949 1993-09-10 Richard Stallman <rms@gnu.org>
11951 * doc/bison.1: entered into RCS
11953 1993-09-06 Noah Friedman <friedman@gnu.org>
11955 * src/version.c: entered into RCS
11957 1993-09-06 Noah Friedman <friedman@gnu.org>
11959 * Makefile.in: *** empty log message ***
11961 1993-07-30 David J. MacKenzie <djm@gnu.org>
11963 * Makefile.in: *** empty log message ***
11965 1993-07-24 Richard Stallman <rms@gnu.org>
11967 * src/bison.s1: *** empty log message ***
11969 1993-07-24 Richard Stallman <rms@gnu.org>
11971 * bison.simple: *** empty log message ***
11973 1993-07-08 David J. MacKenzie <djm@gnu.org>
11975 * Makefile.in: *** empty log message ***
11977 1993-07-04 Richard Stallman <rms@gnu.org>
11979 * src/bison.s1: *** empty log message ***
11981 1993-07-04 Richard Stallman <rms@gnu.org>
11983 * bison.simple: *** empty log message ***
11985 1993-06-26 David J. MacKenzie <djm@gnu.org>
11987 * src/getargs.c: entered into RCS
11989 1993-06-26 David J. MacKenzie <djm@gnu.org>
11991 * doc/bison.texinfo: *** empty log message ***
11993 * doc/bison.1: New file.
11995 1993-06-25 Richard Stallman <rms@gnu.org>
11997 * src/getargs.c: New file.
11999 1993-06-16 Richard Stallman <rms@gnu.org>
12001 * src/bison.s1: *** empty log message ***
12003 1993-06-16 Richard Stallman <rms@gnu.org>
12005 * bison.simple: *** empty log message ***
12007 1993-06-03 Richard Stallman <rms@gnu.org>
12009 * src/bison.s1: New file.
12011 1993-06-03 Richard Stallman <rms@gnu.org>
12013 * doc/bison.texinfo: *** empty log message ***
12015 1993-06-03 Richard Stallman <rms@gnu.org>
12017 * bison.simple: New file.
12019 1993-05-19 Richard Stallman <rms@gnu.org>
12021 * doc/bison.texinfo: New file.
12023 1993-05-07 Noah Friedman <friedman@gnu.org>
12025 * Makefile.in: *** empty log message ***
12027 1993-04-28 Noah Friedman <friedman@gnu.org>
12029 * src/reader.c: *** empty log message ***
12031 1993-04-23 Noah Friedman <friedman@gnu.org>
12033 * src/alloc.h: entered into RCS
12035 1993-04-20 David J. MacKenzie <djm@gnu.org>
12037 * src/version.c: *** empty log message ***
12039 * src/files.c, src/allocate.c:
12042 * src/reader.c: *** empty log message ***
12044 * src/lex.c: entered into RCS
12046 * src/conflicts.c: New file.
12048 * src/symtab.c: entered into RCS
12050 * src/alloc.h: New file.
12052 * src/LR0.c: entered into RCS
12054 1993-04-18 Noah Friedman <friedman@gnu.org>
12056 * src/reader.c: New file.
12058 * src/version.c: *** empty log message ***
12060 1993-04-18 Noah Friedman <friedman@gnu.org>
12062 * Makefile.in: *** empty log message ***
12064 1993-04-17 Noah Friedman <friedman@gnu.org>
12066 * Makefile.in: *** empty log message ***
12068 1993-04-15 Richard Stallman <rms@gnu.org>
12070 * src/main.c, src/files.c:
12073 1993-04-15 Noah Friedman <friedman@gnu.org>
12075 * configure.in: entered into RCS
12077 * configure.in: *** empty log message ***
12079 * configure.in: New file.
12081 1993-04-14 Richard Stallman <rms@gnu.org>
12083 * Makefile.in: New file.
12085 1993-04-13 Richard Stallman <rms@gnu.org>
12087 * src/version.c: New file.
12089 1993-03-25 Richard Stallman <rms@gnu.org>
12091 * src/output.c: entered into RCS
12093 1992-09-25 Richard Stallman <rms@gnu.org>
12095 * configure.bat: entered into RCS
12097 1992-06-22 Richard Stallman <rms@gnu.org>
12099 * src/vmsgetargs.c: entered into RCS
12101 1992-06-22 Richard Stallman <rms@gnu.org>
12103 * doc/bison.rnh: entered into RCS
12105 1992-04-20 David J. MacKenzie <djm@gnu.org>
12107 * README: entered into RCS
12109 1992-01-22 Richard Stallman <rms@gnu.org>
12111 * src/machine.h: entered into RCS
12113 1991-12-21 Richard Stallman <rms@gnu.org>
12115 * src/lalr.c, src/closure.c:
12118 1991-12-20 Richard Stallman <rms@gnu.org>
12120 * src/state.h: entered into RCS
12122 1991-12-18 Richard Stallman <rms@gnu.org>
12124 * src/print.c, src/nullable.c, src/derives.c:
12127 1991-11-03 David J. MacKenzie <djm@gnu.org>
12129 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
12132 1988-09-09 Richard Stallman <rms@gnu.org>
12134 * src/bison.hairy: entered into RCS
12136 1987-12-16 Richard Stallman <rms@gnu.org>
12138 * REFERENCES: entered into RCS
12142 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
12143 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
12145 This file is part of Bison, the GNU Compiler Compiler.
12147 Bison is free software; you can redistribute it and/or modify
12148 it under the terms of the GNU General Public License as published by
12149 the Free Software Foundation; either version 2, or (at your option)
12152 Bison is distributed in the hope that it will be useful,
12153 but WITHOUT ANY WARRANTY; without even the implied warranty of
12154 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12155 GNU General Public License for more details.
12157 You should have received a copy of the GNU General Public License
12158 along with Bison; see the file COPYING. If not, write to
12159 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
12160 Boston, MA 02111-1307, USA.