1 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
3 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
4 put into the -d output file, and mention what to do if YYSTYPE is
7 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
9 Undo change made earlier today: it caused autopoint to not bring
10 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13 * bootstrap: Check that gettext version matches what's in
14 configure.ac. Warn users to ignore robots.txt ERROR 404.
15 * bootstrap: Undo today's earlier change (logged below).
16 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
18 The gettext version checking is causing more trouble than it's
19 curing; remove it. Problem reported by Paul Hilfinger.
21 * bootstrap: Issue a warning that one can expect a message
22 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
23 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
25 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
27 Ensure that the C++ compiler used for testing actually works on a
28 simple test program; if not, skip the C++-related tests. Problem
29 reported by Vin Shelton in:
30 http://mail.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
32 * m4/cxx.m4: New file.
33 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
34 * tests/atlocal.in (BISON_CXX_WORKS): Add.
35 * tests/local.at (AT_COMPILE_CXX): Use it.
37 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
39 * data/glr.c (yylloc): Output this macro even if locations are not
40 being generated, as the GLR parser needs it even in that case.
41 Problem reported by Troy A. Johnson
42 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
44 * configure.ac (AC_INIT): Update to 1.875e.
46 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
48 * NEWS: Version 1.875d.
49 * configure.ac (AC_INIT): Likewise.
50 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
52 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
53 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
54 lalr1.cc runs afoul of the first, and the last two are no longer
55 supported by GCC 3.4.0.
56 * README: Mention GNU m4 1.4 or later; mention m4 patches.
57 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
59 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
61 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
62 unsigned int, for compatibility with latest gnulib hash module.
63 * src/state.c (state_hash, state_hasher): Likewise.
64 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
65 * src/uniqstr.c (hash_uniqstr): Likewise.
67 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
69 * NEWS: Unescaped newlines are no longer allowed in char & strings.
71 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
72 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
73 character and string literals.
74 (unexpected_end): New function.
75 (unexpected_eof): Use it.
76 (unexpected_newline): New function.
77 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
80 * NEWS: Document %expect-rr.
82 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
83 Fix typo by replacing $1 with $option.
84 Remove more 'intl'-related files.
85 Don't DEFUN AM_INTL_SUBDIR twice.
87 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
88 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
90 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
91 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
92 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
93 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
94 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
95 * src/.cvsignore: Add *.output.
97 * src/parse-gram.y: Put copyright notice inside %{ %} so it
98 gets copied to the output file.
100 2004-04-28 Paul Eggert <eggert@twinsun.com>
102 Get files from the gnulib and po repositories, instead of relying
103 on them being in our CVS. Upgrade to latest versions of gnulib
106 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
107 * bootstrap: Bootstrap from gnulib and po repositories.
108 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
109 * README-cvs: Document these changes. Remove version numbers from
110 mentions of build tools, since they change so often. Mention Flex.
112 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
113 (gl_USE_SYSTEM_EXTENSIONS): Add.
114 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
115 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
117 (AC_ISC_POSIX): Remove; we no longer support this
118 ancient OS, as it gets in the way of latest Autoconf & gnulib.
119 (AC_HEADER_STDC): Remove: we now assume C89 or better.
120 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
121 Do not check for C89 headers, except for locale.h which is used
122 by the Yacc library and must port to K&R hosts.
123 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
124 Do not check for C89 functions, except for setlocale which is
125 used by the Yacc library.
126 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
127 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
128 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
129 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
130 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
131 AM_GNU_GETTEXT): Remove; now done by:
132 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
133 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
136 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
137 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
138 Define to empty, as gnulib.mk will do the rest for us.
139 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
141 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
142 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
144 * src/files.c: Include gnulib's xstrndup.h.
146 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
147 (REALLOC): Use xnrealloc, for likewise.
148 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
149 (strnlen, memrchr): Remove decls; functions no longer used.
152 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
153 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
154 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
155 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
156 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
157 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
158 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
159 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
160 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
161 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
162 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
163 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
164 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
165 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
166 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
167 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
168 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
169 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
170 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
171 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
172 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
173 Remove, as these files are now generated automatically
174 by bootstrap or automake.
176 * po/ChangeLog: Remove: all but one entry was a duplicate
177 of this file, and I moved that 2000-11-02 entry here.
179 * config/.cvsignore: Add Makefile, depcomp, install-sh.
180 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
181 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
182 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
183 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
184 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
185 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
186 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
187 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
188 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
189 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
191 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
192 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
193 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
194 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
195 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
196 * src/.cvsignore: Remove *_.c.
199 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
200 support it. (The latest stable gzip doesn't.)
202 2004-04-27 Paul Eggert <eggert@twinsun.com>
204 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
205 case, as stos_ is now used by destructors due to the 2004-02-09
208 Remove more K&R C support.
209 * lib/libiberty.y (PARAMS): Remove. All uses removed.
210 * lib/subpipe.c (errno): Remove decl.
211 Include <stdlib.h> unconditionally.
212 (EXIT_FAILURE): Remove macro.
213 * src/complain.c (vfprintf, strerror): Remove.
214 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
216 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
217 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
218 (strchr, strspn, memchr): Remove decls.
219 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
220 unconditionally. Do not declare perror.
221 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
224 * src/complain.c (_): Remove useless defn, as system.h defines this.
226 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
227 with latest obstack.h.
228 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
229 to procedure types, as obstack.h now does that for us.
230 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
232 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
233 so that this include file can stand alone.
234 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
235 does this now. Include subpipe.h first after config.h, to
236 test whether it can stand alone.
238 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
239 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
242 * tests/synclines.at (%union synch line): Put a dummy member in
243 the union, because empty unions aren't allowed in C. Caught
246 2004-04-13 Jim Meyering <jim@meyering.net>
248 * src/conflicts.c (conflicts_print): Correct format string typo:
249 use `%%' to produce literal `%'. (trivial change)
251 2004-03-30 Paul Eggert <eggert@twinsun.com>
253 * src/getargs.c (version): Update copyright year to 2004.
255 * data/c.m4 (b4_int_type): Use 'short int' rather than
256 'short', and similarly for 'long', 'unsigned', etc.
257 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
258 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
259 yy_yypstack, yydumpstack): Likewise.
260 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
261 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
263 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
264 yy_stack_print, yyparse): Likewise.
265 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
266 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
267 * lib/bitset.c (bitset_print): Likewise.
268 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
269 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
270 * lib/bitsetv.c (bitsetv_dump): Likewise.
271 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
272 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
274 * src/LR0.c (allocate_itemsets): Likewise.
275 * src/gram.h (rule_number, rule): Likewise.
276 * src/lalr.h (goto_number): Likewise.
277 * src/nullable.c (nullable_compute): Likewise.
278 * src/output.c (prepare_rules): Likewise.
279 * src/relation.c (relation_print, relation_digraph): Likewise.
280 * src/relation.h (relation_node): Likewise.
281 * src/state.h (state_number, transitions, errs, reductions,
282 struct state): Likewise.
283 * src/symtab.h (symbol_number, struct symbol): Likewise.
284 * src/tables.c (vector_number, tally, action_number,
285 default_goto, goto_actions): Likewise.
286 * tests/existing.at (GNU Cim Grammar): Likewise.
287 * tests/regression.at (Web2c Actions): Likewise.
289 * src/output.c (muscle_insert_short_int_table): Renamed from
290 muscle_insert_short_table. All uses changed.
292 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
294 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
295 (declaration): Replace expected_conflicts with expected_sr_conflicts.
298 * src/scan-gram.l: Recognize %expect-rr.
300 * src/conflicts.h (expected_sr_conflicts): Rename from
302 (expected_rr_conflicts): Declare.
304 * src/conflicts.c (expected_sr_conflicts): Rename from
306 (expected_rr_conflicts): Define.
307 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
309 Use expected_sr_conflicts in place of expected_conflicts.
310 Warn if expected_rr_conflicts used in non-GLR parser.
312 * doc/bison.texinfo: Add documentation for %expect-rr.
314 2004-03-08 Paul Eggert <eggert@gnu.org>
316 Add support for hex token numbers. Suggested by Odd Arild Olsen in
317 <http://mail.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
319 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
321 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
322 * src/scan-gram.l (scan_integer): New function.
324 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
325 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
326 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
327 Say "long int", not "long", for uniformity with GNU style.
329 2004-02-25 Paul Eggert <eggert@twinsun.com>
331 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
332 compilers. This fixes a problem with Intel's C++ compiler being
333 chatty, reported by Guido Trentalancia in
334 <http://mail.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
336 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
338 Support %destructor and merge error locations in lalr1.cc.
340 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
341 (Parser::stos_): Define unconditionally.
342 (Parser::destruct_): New method. Generate its body with
343 b4_yydestruct_generate.
344 (Parser::error_start_): New attribute.
345 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
346 token which are discarded.
347 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
348 error_start_ when erroneous token are discarded.
349 (Parser::parse) <yyerrlab1>: Compute the location of the error
350 token so that it covers all the discarded tokens.
351 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
352 it can be called with `%skeleton "lalr1.cc"', and do that.
354 2004-02-02 Paul Eggert <eggert@twinsun.com>
356 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
357 $(top_srcdir)/lib and ../lib. This fixes a bug reported
358 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
359 There's no need to mention top_builddir since Automake does that
361 (INCLUDES): Remove, as Automake says it's obsolescent.
362 Contents migrated into AM_CPPFLAGS as described above.
363 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
365 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
367 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
368 (yyreportSyntaxError): Handle case where lookahead token is
371 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
373 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
374 resulting parsers are compilable with C++.
376 2003-12-23 Paul Eggert <eggert@twinsun.com>
378 * config/depcomp, config/install-sh: Sync with Automake 1.8.
379 * src/output.c (output_skeleton): Rename local var.
380 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
381 Bison tokens, as this runs afoul of the 2003-10-07 change that
382 disallowed NUL bytes in character constants or string literals.
384 * tests/local.at: Require Autoconf 2.59's Autotest.
385 * tests/testsuite.at: Don't include local.at, since we now assume
386 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
388 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
389 multiple inclusion warnings.
391 2003-12-02 Akim Demaille <akim@epita.fr>
393 * doc/bison.texinfo (How Can I Reset the Parser): More about start
397 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
399 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
401 2003-10-07 Paul Eggert <eggert@twinsun.com>
403 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
404 if testsuite doesn't exist.
406 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
407 literals, unfortunately.
408 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
409 Complain about NUL bytes in character constants or string literals.
411 2003-10-05 Paul Eggert <eggert@twinsun.com>
413 * NEWS: Don't document %no-default-prec, as it's still
415 * doc/bison.texinfo: Document %no-default-prec only if
416 the defaultprec flag is set. Normally it's not.
418 2003-10-04 Paul Eggert <eggert@twinsun.com>
420 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
421 non-modifiable lvalue, instead of a modifiable one.
422 * doc/bison.texinfo (Actions): Document that $$ can
423 be assigned to. Do not claim that $$ and $N are
424 array element references: user code should not rely on this.
426 2003-10-01 Paul Eggert <eggert@twinsun.com>
428 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
429 (grammar_declaration): Use it.
430 * src/scan-gram.l: New token %no-default-prec.
431 * tests/conflicts.at: Revamp tests to use %no-default-prec.
432 * NEWS, doc/bison.texinfo: Document the above.
434 2003-10-01 Akim Demaille <akim@epita.fr>
436 VCG no longer supports long_straight_phase.
438 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
439 * src/print_graph.c (print_graph): Adjust.
441 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
442 and Paul Eggert <eggert@twinsun.com>
444 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
445 Table of Symbols): Document %default-prec.
446 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
447 (grammar_declaration): Set default_prec on %default-prec.
448 * src/scan-gram.l (%default-prec): New token.
449 * src/reader.h (default_prec): New flag.
450 * src/reader.c: Likewise.
451 (packgram): Handle it.
452 * tests/conflicts.at (%default-prec without %prec,
453 %default-prec with %prec, %default-prec 1): New tests.
455 2003-09-30 Paul Eggert <eggert@twinsun.com>
457 * tests/testsuite.at: Include local.at, not input.at, fixing
458 a typo in the 2003-08-25 patch.
460 2003-08-27 Akim Demaille <akim@epita.fr>
462 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
465 2003-08-26 Akim Demaille <akim@epita.fr>
467 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
468 "<\#" to avoid magic from Gnus when posting parts of this script.
470 2003-08-26 Akim Demaille <akim@epita.fr>
472 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
473 (Parser::parse): here.
474 Adjust: nerrs and errstatus is now replaced by...
475 (Parser::nerrs_, Parser::errstatus_): New.
477 2003-08-25 Akim Demaille <akim@epita.fr>
479 * config/announce-gen, Makefile.cfg: New.
480 * Makefile.am: Adjust.
481 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
482 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
484 2003-08-25 Akim Demaille <akim@epita.fr>
486 When reducing initial empty rules, Bison parser read an initial
487 location that is not defined. This results in garbage, and that
488 affects Bison's own parser. Therefore we need (i) to extend Bison
489 to support a means to initialize this location, and (ii) to use
490 this CVS Bison to fix CVS Bison's parser.
492 * src/reader.h, reader.c (epilogue_augment): Remove, replace
494 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
495 * src/parse-gram.y: Adjust.
496 (%initial-action): New.
497 (%error-verbose): Since we require CVS Bison, there is no reason
499 * src/scan-gram.l: Adjust.
500 * src/Makefile.am (YACC): New, to make sure we use our own parser.
501 * data/yacc.c (yyparse): Use b4_initial_action.
503 2003-08-25 Akim Demaille <akim@epita.fr>
505 * doc/bison.texinfo: Don't promote stdout for error messages.
507 2003-08-25 Akim Demaille <akim@epita.fr>
509 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
510 From Alexandre Duret-Lutz.
512 2003-08-25 Akim Demaille <akim@epita.fr>
516 2003-08-25 Akim Demaille <akim@epita.fr>
518 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
521 2003-08-25 Akim Demaille <akim@epita.fr>
523 * data/lalr1.cc (Parser::reduce_print_): New.
526 2003-08-25 Akim Demaille <akim@epita.fr>
528 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
529 error recovery loops. This patch is based on
530 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
531 Also, augment the similarity between lalr1.cc and yacc.c.
532 Note: the locations of error recovery rules are not correct yet.
534 * data/lalr1.cc: Comment changes to augment the similarity between
536 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
537 (yyerrlab1): Remove, but where it used to be (now the bottom part of
538 yyerrlab), when hitting EOF, pop the whole stack here instead of
539 merely falling thru the default error handling mechanism.
540 (yyerrorlab): New label, with the old contents of YYERROR,
541 plus the following change: pop the stack of rhs corresponding
542 to the production that invoked YYERROR. That is how Yacc
543 behaves (required by POSIX).
544 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
547 2003-08-25 Akim Demaille <akim@epita.fr>
549 Tune local.at so that people can "autom4te -l autotest calc.at -o
550 calc" for instance, to extract a sub test suite.
552 * tests/testsuite.at: Move the initialization, Autotest version
553 requirement, and AT_TESTED invocation into...
554 * tests/local.at: here.
555 * tests/testsuite.at: Include it for compatibility with Autoconf
557 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
560 2003-08-04 Paul Eggert <eggert@twinsun.com>
562 Rework code slightly to avoid gcc -Wtraditional warnings.
563 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
564 The returned value is now stored in *YY0. All callers changed.
565 * src/output.c (merge_output): Adjust to the above change.
567 2003-07-26 Paul Eggert <eggert@twinsun.com>
569 * data/glr.c (YYASSERT): New macro.
570 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
571 yyresolveStates, yyprocessOneStack):
572 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
573 Derived from a suggestion by Frank Heckenbach.
575 2003-07-25 Paul Eggert <eggert@twinsun.com>
577 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
578 for portability to K&R C (after ansi2knr, presumably). See
579 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
580 by Frank Heckenbach, though I have omitted the structure-initialization
581 part of his glr-knr.diff patch since I recall that the Portable
582 C Compiler didn't require that change.
584 Let the user specify how to allocate and free memory.
585 Derived from a suggestion by Frank Heckenbach in
586 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
587 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
588 All uses of free, malloc, realloc changed to use these macros,
589 and unnecessary casts removed.
590 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
592 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
594 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
595 use s.empty() rather than s == "" to test for empty string; see
596 <http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
599 2003-06-25 Akim Demaille <akim@epita.fr>
601 * config/depcomp, config/install-sh: Update from masters.
603 2003-06-20 Paul Eggert <eggert@twinsun.com>
605 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
606 and return properly parenthesized result.
607 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
608 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
609 Remove unnecessary parentheses from uses.
610 * doc/bison.texinfo (Location Default Action): Describe the
611 conventions for parentheses.
613 2003-06-19 Paul Eggert <eggert@twinsun.com>
615 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
616 yyreportTree): Do not assume that size_t is the same width as int,
617 when printing sizes. Print sizes using an unsigned format.
618 Problem reported by Frank Heckenbach in
619 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
621 Port to Forte Developer 7 C compiler.
622 * data/glr.c (struct YYLTYPE): If locations are not being used,
623 declare a single dummy member, as empty structs do not conform
625 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
626 the Forte Developer 7 C compiler complains that end-of-loop
629 2003-06-17 Paul Eggert <eggert@twinsun.com>
631 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
632 avoid warnings from picky compilers about redefinition of PARAMS.
634 2003-06-17 Paul Eggert <eggert@twinsun.com>
638 * NEWS: Document 1.875b.
640 * lib/bbitset.h: Do not include config.h; that's the includer's job.
641 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
642 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
643 Don't use 'index' in comments, as it's a builtin fn on some hosts.
644 * lib/bitset_stats.c: Include gettext.h unconditionally, as
645 per recent gettext manual's suggestion.
646 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
647 Use prototypes, not old-style definitions.
648 * lib/lbitset.c (lbitset_unused_clear): Likewise.
649 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
650 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
651 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
652 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
653 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
654 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
655 vbitset_or_and_cmp, vbitset_copy): Likewise.
657 * lib/libiberty.h: Do not include config.h; that's the includer's job.
658 Do not include <stdlib.h>.
659 (PARAMS): Define unconditionally for C89.
660 (ATTRIBUTE_NORETURN): Remove.
661 (ATTRIBUTE_UNUSED): Define unconditionally.
663 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
664 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
665 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
666 * lib/vbitset.c, lib/vbitset.h: New files.
667 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
668 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
671 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
672 `How Can I Reset @code{yyparse}', since texinfo does not allow
673 arbitrary @ in node names.
675 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
676 shouldn't be needed according to the gettext 0.12.1 documentation
677 but which seem to be needed anyway: codeset.m4 glibc21.m4
678 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
679 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
680 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
682 * lib/.cvsignore: Add stdbool.h.
683 * m4/.cvsignore: Add nls.m4, po.m4.
685 Upgrade to CVS gnulib.
686 * stdbool_.h: File renamed from stdbool.h.in.
687 * configure.ac (AM_STDBOOL_H): Invoke this instead of
689 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
690 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
691 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
692 (MOSTLYCLEANFILES): New var.
693 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
694 (stdbool.h): New rule.
695 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
696 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
697 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
698 m4/quote.m4: Upgrade to today's gnulib.
700 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
701 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
703 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
704 yyerror are declared before use; C99 requires this.
706 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
708 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
710 (yyrecoverSyntaxError): Correct the logic for setting and testing
712 Correct comment on handling EOF.
713 Allow states with only a default reduction, rather than failing
714 (I can't quite reconstruct why these were not allowed before).
716 Fixes to avoid problem that $-N rules in GLR parsers can cause
717 buffer overruns, corrupting state.
719 * src/output.c (prepare_rules): Output max_left_semantic_context
721 * src/reader.h (max_left_semantic_context): New variable declaration.
722 * src/scan-gram.l (max_left_semantic_context): Define.
723 (handle_action_dollar): Update max_left_semantic_context.
724 * data/glr.c (YYMAXLEFT): New definition.
725 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
726 (yyresolveAction): Ditto.
728 Fixes to problems with location handling in GLR parsers reported by
729 Frank Heckenbach (2003/06/05).
731 * data/glr.c (YYLTYPE): Make trivial if locations not used.
732 (YYRHSLOC): Add parentheses, and define only if locations used.
733 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
735 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
736 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
738 * tests/cxx-type.at: Exercise location information; update tests
739 to differentiate output with and without locations.
740 Remove forward declarations of yylex and yyerror---caused errors
741 because default YYLTYPE not yet defined.
742 Change semantic actions to compute strings, rather than printing
743 them directly (to test proper passing of semantics values). Change
744 output to prefix notation and update test data and expected results.
745 (yylex): Track locations.
746 (stmtMerge): Return value rather than printing, and include arguments
749 2003-06-03 Paul Eggert <eggert@twinsun.com>
751 Avoid warnings generated by GCC 2.95.4 when Bison is
752 configured with --enable-gcc-warnings.
753 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
754 yy::]b4_parser_class_name[::translate_,
755 yy::Stack::operator[] (unsigned),
756 yy::Stack::operator[] (unsigned) const,
757 yy::Slice::operator[] (unsigned),
758 yy::Slice::operator[] (unsigned) const):
759 Rename local vars to avoid warnings.
760 * tests/glr-regression.at (Improper handling of embedded actions
761 and $-N in GLR parsers): Remove unused local variable from yylex.
762 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
763 (void) as arg when not pure, since we now assume C89 when building
764 Bison. Pacify GCC by using parameter.
766 2003-06-02 Paul Eggert <eggert@twinsun.com>
768 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
769 yy::Location::lines, yy::Location::columns): Rename arguments
770 to avoid shadowing; this removes a warning generated by GCC 3.3.
772 2003-06-01 Paul Eggert <eggert@twinsun.com>
774 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
775 to g++, as GCC 3.3 complains if you do it.
776 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
777 everything that WARNING_CFLAGS has, except omit warnings
778 not suitable for C++.
779 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
780 * tests/atlocal.in (CXXFLAGS): New var.
781 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
783 Fix a GLR parser bug I reported in February; see
784 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
785 The problem was that GLR parsers did not conform to the C standard,
786 because actions like { $1 = $2 + $3; } expanded to expressions
787 that invoked YYFILL in separate subexpressions, and YYFILL assigned
788 to a local variable. The C standard says that expressions
789 like (var = f ()) + (var = f ()) have undefined behavior.
790 Another problem was that GCC sometimes issues warnings that
791 yyfill and its parameters are unused.
793 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
795 (yyfill): New function.
797 (yyuserAction): Change type of yynormal to bool, so that it matches
798 the new yyfill signature. Mark it as possibly unused.
801 Follow up on a bug I reported in February, where a Bison-generated
802 parser can loop. Provide a test case and a fix for yacc.c. I
803 don't have a fix for lalr1.cc or for glr.c, unfortunately.
804 The original bug report is in:
805 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
807 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
808 macro's size was becoming unwieldy.
809 (yyerrlab): Do not discard an empty lookahead symbol, as this
810 might destroy garbage.
811 (yyerrorlab): New label, with the old contents of YYERROR,
812 plus the following change: pop the stack of rhs corresponding
813 to the production that invoked YYERROR. That is how Yacc
814 behaves, and POSIX requires this behavior.
815 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
816 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
817 Define 'alarm' to do nothing if unistd.h is not available.
818 Add a new rule "exp: '-' error;" to test the above change to
819 data/yacc.c. Use 'alarm' to abort any test taking longer than
820 10 seconds, as it's probably looping.
821 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
822 Also, the new yacc.c generates two fewer diagnostics for an
825 2003-05-24 Paul Eggert <eggert@twinsun.com>
827 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
828 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
829 This fixes a problem reported by John Bowman when the Compaq/HP
830 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
832 * data/yacc.c (union yyalloc): Likewise.
833 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
835 Switch from 'int' to 'bool' where that makes sense.
837 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
838 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
839 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
840 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
841 Return or accept bool, not int. All callers changed.
842 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
843 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
844 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
845 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
846 bitset_or_and_cmp_): Likewise.
847 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
848 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
849 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
850 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
851 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
852 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
853 bitset_stats_or_and_cmp): Likewise.
854 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
855 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
856 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
857 ebitset_xor_cmp): Likewise.
858 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
859 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
860 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
861 lbitset_xor_cmp): Likewise.
862 * lib/bbitset.h: Include <stdbool.h>.
863 (struct bitset_vtable): The following members now return bool, not
864 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
865 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
867 * src/conflicts.c (count_rr_conflicts): Likewise.
868 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
870 * lib/ebitset.c (ebitset_obstack_init): Likewise.
871 * lib/lbitset.c (lbitset_obstack_init): Likewise.
872 * src/getargs.c (debug_flag, defines_flag, locations_flag,
873 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
874 graph_flag): Likewise.
875 * src/getargs.h (debug_flag, defines_flag, locations_flag,
876 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
877 graph_flag): Likewise.
878 * src/output.c (error_verbose): Likewise.
879 * src/output.h (error_verbose): Likewise.
880 * src/reader.c (start_flag, typed): Likewise.
881 * src/reader.h (typed): Likewise.
882 * src/getargs.c (LOCATIONS_OPTION): New constant.
883 (long_options, getargs): Use it.
884 * src/lalr.c (build_relations): Use bool, not int.
885 * src/nullable.c (nullable_compute): Likewise.
886 * src/print.c (print_reductions): Likewise.
887 * src/tables.c (action_row, pack_vector): Likewise.
888 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
889 * src/output.c (prepare): Use it.
890 * src/output.c (token_definitions_output,
891 symbol_destructors_output, symbol_destructors_output): Use string,
892 not boolean integer, to keep track of whether to output separator.
893 * src/print_graph.c (print_core): Likewise.
894 * src/state.c (state_rule_lookaheads_print): Likewise.
896 * config/install-sh: Sync from automake 1.7.5.
898 2003-05-14 Paul Eggert <eggert@twinsun.com>
900 * src/parse-gram.y (rules_or_grammar_declaration): Require a
901 semicolon after a grammar declaration, in the interest of possible
902 future changes to the Bison input language.
903 Do not allow a stray semicolon at the start of the grammar.
904 (rhses.1): Allow one or more semicolons after any rule, including
905 just before "|" as required by POSIX.
906 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
909 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
911 %parse-param support for lalr1.cc.
913 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
914 b4_cc_constructor_calls, b4_cc_constructor_call,
915 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
917 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
918 parse-param arguments.
919 (yy::b4_parser_class_name): Declare instance variables to
920 hold parse-param arguments.
921 * tests/calc.at: s/value/semantic_value/ because value clashes
922 with a member of yy::b4_parser_class_name. Adjust C++ code
923 to handle %parse-param. Enable %parse-param test in C++.
925 2003-05-12 Paul Eggert <eggert@twinsun.com>
927 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
928 English a bit. Fix fclose typo. Change "const char" to "char
929 const", and use ANSI C rather than K&R for "main". Suggest
930 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
931 and suggest yy_switch_to_buffer.
933 2003-05-05 Paul Eggert <eggert@twinsun.com>
935 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
936 C89. This avoids a diagnostic on compilers that define __STDC__
937 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
938 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
940 2003-05-03 Paul Eggert <eggert@twinsun.com>
942 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
943 Do not overrun array bounds.
944 This should fix a bug reported today by Olatunji Oluwabukunmi in
945 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
947 2003-04-29 Akim Demaille <akim@epita.fr>
949 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
950 * src/getargs.c, src/getargs.h: here, as bool, not int.
951 (nondeterministic_parser): New.
952 * src/parse-gram.y, src/scan-gram.l: Support
953 %nondeterministic-parser.
954 * src/output.c (prepare): Use nondeterministic_parser instead
955 of glr_parser where appropriate.
956 * src/tables.c (conflict_row, action_row, save_row)
957 (token_actions, token_actions, pack_vector): Ditto.
959 2003-04-29 Akim Demaille <akim@epita.fr>
961 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
963 2003-04-29 Akim Demaille <akim@epita.fr>
965 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
966 with %pure-parser and %locations to exercise the patch from Yakov
969 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
971 * data/yacc.c: (b4_lex_param): Corrected for the case where
972 %lex-param is provided and %pure-parser isn't.
974 2003-04-27 Paul Eggert <eggert@twinsun.com>
976 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
977 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
978 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
979 if it is not defined.
980 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
982 2003-04-26 Paul Eggert <eggert@twinsun.com>
984 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
985 Declare to be of type suitable for the ninf value itself, not of
986 type suitable for the corresponding table, since the latter might
987 be unsigned but the ninf value might be negative. This fixes a
988 bug reported by Alexandre Duret-Lutz in
989 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
991 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
992 invokes it. We shouldn't invoke it twice because it will attempt
993 to put error.o in the archive twice. This fixes a glitch reported
995 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
997 2003-04-21 Paul Eggert <eggert@twinsun.com>
999 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
1002 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
1004 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
1005 Fix obvious typo that results in uncompilable GLR parsers
1006 when both %pure-parser and %locations are used. (trivial change)
1008 2003-04-17 Paul Eggert <eggert@twinsun.com>
1010 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
1011 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
1012 Do not insert the expected token via unput, as this runs afoul
1013 of a POSIX-compatibility bug in flex 2.5.31.
1014 All uses changed to BEGIN the parent state,
1015 since we no longer insert the expected token via unput.
1016 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
1017 that is no longer emitted after the above change.
1019 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
1020 the first one. This change is from Paul Hilfinger, and it fixes
1021 regression reported by Werner Lemberg in
1022 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1024 (resolve_sr_conflict): Don't invoke state_errs_set
1025 unless one or more tokens have been explicitly made errors.
1026 Otherwise, the above change causes Bison to abort.
1028 * tests/existing.at (GNU pic Grammar): New test case, taken from
1031 2003-03-31 Akim Demaille <akim@epita.fr>
1033 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
1035 2003-03-31 Akim Demaille <akim@epita.fr>
1037 * src/output.c (prepare_symbols): Avoid trailing spaces in the
1040 2003-03-31 Akim Demaille <akim@epita.fr>
1042 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
1043 From Paul Hilfinger.
1045 2003-03-29 Akim Demaille <akim@epita.fr>
1047 * m4/error.m4: Do not put under dynamic conditions some code which
1048 expansion is under static control.
1050 2003-03-29 Akim Demaille <akim@epita.fr>
1052 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
1054 2003-03-29 Akim Demaille <akim@epita.fr>
1056 * doc/bison.texinfo (Strings are Destroyed): New.
1058 2003-03-13 Paul Eggert <eggert@twinsun.com>
1060 * .cvsignore: Add configure.lineno.
1061 * src/.cvsignore: Add yacc.
1062 * tests/.cvsignore: Add testsuite.log.
1063 * doc/fdl.texi: Sync with latest FSF version.
1065 2003-03-12 Paul Eggert <eggert@twinsun.com>
1067 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
1068 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
1069 cursor, instead of leaving it undefined. This fixes a bug
1070 reported by Tim Van Holder in
1071 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
1072 * tests/input.at (Torturing the Scanner): Test the scanner on
1073 an empty input file, which was Tim Van Holder's test case.
1075 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
1076 <sys/resource.h> can be included, include sys/time.h and
1077 sys/times.h first, if available. This works around the SunOS
1078 4.1.4 porting bug reported by Bruce Becker in
1079 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
1081 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
1082 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
1085 Merge changes from gnulib. This was prompted because the CVS
1086 snapshot didn't build on Solaris 7 due to strnlen problems.
1088 These changes need to be merged back into gnulib:
1089 * lib/hash.c: Include <stdbool.h> unconditionally.
1090 * m4/onceonly.m4 (m4_quote): New macro.
1091 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
1092 Quote AC_FOREACH variable-expansions properly.
1093 The 2003-01-03 obstack.h change also needs merging.
1094 {end of changes requiring merging}
1096 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
1097 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
1098 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
1099 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
1100 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
1101 New files, imported from gnulib.
1102 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
1105 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
1106 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
1109 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
1111 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
1112 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
1113 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
1114 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
1115 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
1116 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
1117 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
1118 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
1119 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
1120 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
1121 (jm_PREREQ_ARGMATCH): Remove.
1122 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
1123 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
1125 * src/system.h: Include <stdbool.h> unconditionally.
1127 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
1128 assuming at least C89 in the bitset code for some time now.
1130 2003-03-03 Akim Demaille <akim@epita.fr>
1134 2003-03-02 Akim Demaille <akim@epita.fr>
1136 * doc/bison.texinfo (Table of Symbols): Reactivate the
1137 documentation for %lex-param, and %parse-param.
1139 2003-03-02 Akim Demaille <akim@epita.fr>
1141 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
1142 generate verbose error messages.
1143 Use the number of tokens as an upper bound in yytname, as it
1144 cannot be a non terminal.
1146 2003-03-02 Akim Demaille <akim@epita.fr>
1148 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
1151 2003-03-02 Akim Demaille <akim@epita.fr>
1153 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
1154 Use them to exercise yycheck overrun.
1155 Based on Andrew Suffield's grammar.
1157 2003-03-02 Akim Demaille <akim@epita.fr>
1159 Create tests/local.at for Bison generic testing macros.
1161 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
1162 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
1164 * tests/calc.at (AT_CHECK_CALC): Adjust.
1165 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
1166 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
1167 * tests/local.at: here.
1168 (AT_COMPILE_CXX): Tags the tests using it as c++.
1169 Ignore the test if CXX is not functional.
1171 2003-03-01 Paul Eggert <eggert@twinsun.com>
1173 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
1174 not loc->end, since loc->end might contain garbage and this leads
1175 to undefined behavior on some platforms.
1176 (id_loc, token_start): Use (IF_LINTed) initial values that do not
1177 depend on *loc, so that the reader doesn't give the the false
1178 impression that *loc is initialized.
1179 (<INITIAL>"%%"): Do not bother setting code_start, since its value
1180 does not survive the return.
1182 2003-03-01 Akim Demaille <akim@epita.fr>
1184 * src/scan-gram.l (code_start): Always initialize it when entering
1185 into yylex, as SC_EPILOGUE is activated *before* the corresponding
1186 yylex invocation. An alternative would be making it static, but
1187 then it starts with the second %%'s beginning, instead of its end.
1189 2003-02-28 Paul Eggert <eggert@twinsun.com>
1191 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
1192 around a UnixWare 7.1.1 porting bug reported by John Hughes in
1193 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
1195 2003-02-26 Paul Eggert <eggert@twinsun.com>
1197 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
1198 Remove Sequent/Pyramid discussion (nobody uses them any more).
1199 Merge VMS and MS-DOS discussion; these ports may well be dead
1200 but let's keep mentioning them for now. Put <> around email
1201 addresses. Add copyright notice.
1203 2003-02-24 Paul Eggert <eggert@twinsun.com>
1205 * data/glr.c (yy_reduce_print): yylineno -> yylno,
1206 to avoid collision with flex use of yylineno.
1207 Problem reported by Bruce Lilly in
1208 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
1209 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1210 * data/yacc.c (yy_reduce_print): Likewise.
1212 * config/depcomp: Sync with Automake 1.7.3.
1214 2003-02-21 Akim Demaille <akim@epita.fr>
1216 * data/lalr1.cc: Use temporary variables instead of casts to
1217 change integer types.
1218 Suggested by Paul Eggert.
1220 2003-02-21 Akim Demaille <akim@epita.fr>
1222 * doc/bison.texinfo: Use "location" consistently to refer to @n,
1223 to avoid confusions with lalr1.cc's notion of Position.
1224 Suggested by Paul Eggert.
1226 2003-02-20 Akim Demaille <akim@epita.fr>
1228 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
1229 before initial_columns.
1230 (location.hh): Use consistent variable names when defining the
1232 Use "last" so that we subtract from Positions, not from unsigned.
1234 2003-02-20 Akim Demaille <akim@epita.fr>
1236 * data/lalr1.cc (position.hh): New subfile, including the extended
1237 and Doxygen'ed documentation of class Position.
1238 (location.hh): Use it.
1239 Document a` la Doxygen.
1240 With the help of Benoit Perrot.
1242 2003-02-20 Akim Demaille <akim@epita.fr>
1244 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
1246 Redefine AT_YYERROR_SEES_LOC_IF using it.
1247 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
1249 Don't use the location in yy::Parser::error_ and
1250 yy::Parser::print_ when not %locations.
1251 Activate more lalr1.cc tests.
1253 2003-02-19 Akim Demaille <akim@epita.fr>
1255 * data/lalr1.cc: When displaying a line number, be sure to make it
1258 2003-02-19 Akim Demaille <akim@epita.fr>
1260 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
1262 (YYABORT, YYACCEPT, YYERROR): New.
1263 * tests/calc.at: Renable the lalr1.cc test.
1265 2003-02-19 Akim Demaille <akim@epita.fr>
1267 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
1268 error recovery, mixing with/without pops and discarding of the
1271 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
1273 2003-02-17 Paul Eggert <eggert@twinsun.com>
1275 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
1276 * tests/testsuite.at (AT_COMPILE): Use them.
1277 This fixes the testsuite problem reported by Robert Lentz in
1278 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
1280 2003-02-12 Paul Eggert <eggert@twinsun.com>
1282 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
1283 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
1284 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
1285 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
1286 Check for malloc failure, for consistency with yacc.c.
1287 (yytname_size): Remove, for consistency with yacc.c.
1289 The bug still remains in data/lalr1.cc, as I didn't have time
1292 2003-02-06 Akim Demaille <akim@epita.fr>
1294 * configure.ac (GXX): Rename as...
1295 (CXX): this, to keep the original Autoconf semantics.
1297 * data/lalr1.cc: Fix b4_copyright invocations.
1298 If YYDEBUG is not defined, don't depend upon name_ being defined.
1299 (location.hh): Include string and iostream.
1300 (Position::filename): New member.
1301 (Position::Position ()): New.
1302 (operator<< (Position)): New.
1303 (operator- (Position, int)): New.
1304 (Location::first, Location::last): Rename as...
1305 (Location::begin, Location::end): these, to mock the conventional
1307 (operator<< (Location)): New.
1308 * tests/atlocal.in (CXX): New.
1309 * tests/testsuite.at (AT_COMPILE_CXX): New.
1310 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
1311 locations in a more synthetic way.
1312 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
1314 Adjust the C locations to match those from Emacs: first column is
1316 Change all the expected results.
1317 Conform to the GCS: simplify the locations when applicable.
1318 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
1319 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
1320 these CPP macros with the m4 macros new defined by...
1321 (AT_CHECK_PUSHDEFS): this, i.e.:
1322 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
1323 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
1325 (AT_CHECK_POPDEFS): Undefine them.
1326 (AT_CHECK_CALC_LALR1_CC): New.
1327 Use it for the first lalr1.cc test.
1329 2003-02-04 Akim Demaille <akim@epita.fr>
1331 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
1332 Location as is defined.
1334 2003-02-04 Akim Demaille <akim@epita.fr>
1336 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
1337 name_ being defined.
1339 2003-02-03 Paul Eggert <eggert@twinsun.com>
1341 * src/gram.h (start_symbol): Remove unused decl.
1343 Use more-consistent naming conventions for local vars.
1345 * src/derives.c (derives_compute): Change type of local var from
1347 * src/gram.c (grammar_rules_partial_print): Likewise.
1348 * src/print.c (print_core): Likewise.
1349 * src/reduce.c (reduce_grammar_tables): Likewise.
1351 * src/gram.c (grammar_dump): Change name of item_number *
1352 local var from r to rp.
1353 * src/nullable.c (nullable_compute): Likewise.
1355 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
1357 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
1358 for symbol or symbol_number var.
1359 * src/reader.c (grammar_start_symbol_set): Likewise.
1360 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
1362 * src/state.c (transitions_to): Likewise.
1363 * src/state.h: Likewise.
1364 * src/tables.c (symbol_number_to_vector_number): Likewise.
1366 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
1369 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
1372 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
1375 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
1376 Use str, not s, for char * var. Use ch, not c, for character var.
1377 Use size for size var.
1379 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
1381 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
1383 * src/uniqstr.h: Likewise.
1385 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1386 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1387 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
1388 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
1389 param to have same name as that of enum, so that we don't use
1390 "s" to stand for a non-state.
1392 2003-02-02 Akim Demaille <akim@epita.fr>
1394 * src/scan-skel.l: Scan more than one inert character per yylex
1397 2003-02-01 Paul Eggert <eggert@twinsun.com>
1401 * po/LINGUAS: Add ms.
1403 2003-01-30 Akim Demaille <akim@epita.fr>
1405 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
1407 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1409 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
1412 Changes in response to error report by S. Eken: GLR mode does not
1413 handle negative $ indices or $ indices in embedded rules correctly.
1414 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
1416 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
1417 (b4_rhs_location): Ditto.
1418 (yyfill): New function to copy from stack tree into array
1420 (yyuserAction): Modify to allow incremental move of semantic values
1421 to rhs array when in GLR mode.
1422 Define YYFILL to use in user-defined actions to fill semantic array
1424 Remove dummy use of yystack, as there is now a guaranteed use.
1425 (yydoAction): Modify to allow incremental move of semantic values
1426 to rhs array when in GLR mode.
1427 (yyresolveAction): Ditto.
1428 (yyglrShiftDefer): Update comment.
1429 (yyresolveStates): Use X == NULL for pointers, not !X.
1430 (yyglrReduce): Ditto.
1433 * tests/glr-regr1.at: Rename to ...
1434 * tests/glr-regression.at: Add new regression test for the problems
1435 described above (adapted from S. Eken).
1436 Update copyright notice.
1437 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
1438 * tests/Makefile.am: Ditto.
1440 2003-01-28 Paul Eggert <eggert@twinsun.com>
1442 * data/lalr1.cc: Do not use @output_header_name@ unless
1443 b4_defines_flag is set. This fixes two bugs reported by
1445 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
1446 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
1448 2003-01-21 Paul Eggert <eggert@twinsun.com>
1450 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
1451 we don't need to worry about yyerrlab1 being reported as an
1452 "unused label" by non-GCC C compilers. The downside is that if
1453 locations are used then a couple of statements are duplicated each
1454 time YYERROR is invoked, but the upside is that the warnings
1456 (yyerrlab1): Move code to YERROR.
1457 (yyerrlab2): Remove. Change uses back to yyerrlab1.
1458 This reverts some of the 2002-12-27 change.
1460 2003-01-17 Paul Eggert <eggert@twinsun.com>
1462 * src/output.c (symbol_printers_output): Fix typo that led
1463 to core dump. Problem reported by Antonio Rus in
1464 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
1466 2003-01-13 Akim Demaille <akim@epita.fr>,
1467 Quoc Peyrot <chojin@lrde.epita.fr>,
1468 Robert Anisko <anisko_r@lrde.epita.fr>
1470 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
1471 when the stacks contain one element, as the loop would otherwise
1472 free the last state, and then use the top state (the one we just
1473 popped). This means that the initial elements will not be freed
1474 explicitly, as is the case in yacc.c; it is not a problem, as
1475 these elements have fake values.
1477 2003-01-11 Paul Eggert <eggert@twinsun.com>
1479 * NEWS: %expect-violations are now just warnings, reverting
1480 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
1481 bootstrapping problem reported by Matthias Klose; see
1482 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
1483 * src/conflicts.c (conflicts_print): Likewise.
1484 * tests/conflicts.at (%expect not enough, %expect too much,
1485 %expect with reduce conflicts): Likewise.
1486 * doc/bison.texinfo (Expect Decl): Document this. Also mention
1487 that the warning is enabled if the number of conflicts changes
1488 (not necessarily increases).
1490 * src/getargs.c (version): Update copyright year.
1492 2003-01-09 Akim Demaille <akim@epita.fr>
1494 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
1496 2003-01-08 Paul Eggert <eggert@twinsun.com>
1498 * Makefile.maint (WGETFLAGS):
1499 New macro, containing "-C off" to disable proxy caches.
1500 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
1501 (rel-check): Use $(WGET) instead of wget.
1503 2003-01-06 Paul Eggert <eggert@twinsun.com>
1505 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
1506 the GLR paper of Scott, Johnstone and Hussain.
1508 2003-01-04 Paul Eggert <eggert@twinsun.com>
1510 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
1511 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
1512 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
1513 (EXTRA_LIBRARIES): New var, for liby.a.
1514 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
1515 (EXTRA_SCRIPTS): New var, for yacc.
1517 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
1518 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
1519 Problem reported by Nelson H. F. Beebe.
1521 2003-01-03 Paul Eggert <eggert@twinsun.com>
1523 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
1524 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1525 when compiling Bison 1.875's `bitset bset = obstack_alloc
1526 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
1528 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
1529 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
1530 grow to a huge size with typical invocation.
1532 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
1533 Use the pattern recommended by Autoconf 2.57, except also protect
1534 against double-definition.
1535 * src/system.h: Likewise.
1536 Portability issues reported by Nelson H. F. Beebe.
1538 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
1539 All uses changed. Provide a definition in both C and C++.
1540 (yytrue, yyfalse): Define even if defined (__cplusplus).
1542 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
1543 Reported by Nelson H. F. Beebe.
1545 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
1547 2003-01-02 Paul Eggert <eggert@twinsun.com>
1549 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
1550 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
1551 Bug reported by Nelson H. F. Beebe.
1553 2003-01-01 Paul Eggert <eggert@twinsun.com>
1557 2002-12-30 Paul Eggert <eggert@twinsun.com>
1559 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
1561 (<INITIAL>","): Here. This causes stray "," to be treated
1564 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
1565 last brace in braced code when not in Yacc mode, for compatibility
1566 with Bison 1.35. This resurrects the 2001-12-15 patch to
1569 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
1570 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
1572 2002-12-28 Paul Eggert <eggert@twinsun.com>
1574 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
1575 that of SYM's type. This fixes Debian bug 168069, reported by
1578 2002-12-28 Paul Eggert <eggert@twinsun.com>
1582 Switch back to the Yacc style of conflict reports, undoing some
1583 of the 2002-07-30 change.
1584 * doc/bison.texinfo (Understanding): Use Yacc style for
1585 conflict reports. Also, use new way of locating rules.
1586 * src/conflicts.c (conflict_report):
1587 Renamed from conflict_report_yacc, removing the old
1588 'conflict_report'. Translate the entire conflict report at once,
1589 so that we don't assume that "," has the same interpretation in
1591 (conflicts_output): Use Yacc-style conflict report for each state,
1592 instead of our more-complicated style.
1593 (conflicts_print): Use Yacc-style conflict report, except print
1594 the input file name when not emulating Yacc.
1595 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
1596 Conflicted Reduction, %expect not enough, %expect too much,
1597 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
1598 * tests/existing.at (GNU Cim Grammar): Likewise.
1599 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
1601 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
1602 fatal): Don't invoke fflush; it's not needed and it might even be
1603 harmful for stdout, as stdout might not be open.
1604 * src/reduce.c (reduce_print): Likewise.
1606 2002-12-27 Paul Eggert <eggert@twinsun.com>
1608 Fix a bug where error locations were not being recorded correctly.
1609 This problem was originally reported by Paul Hilfinger in
1610 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
1612 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1613 top of the location stack's error locations.
1614 (yyerrlab): Set it. When discarding a token, push its location
1615 onto yylerrsp so that we don't lose track of the error's end.
1616 (yyerrlab1): Now is only the target of YYERROR, so that we can
1617 properly record the location of the action that failed. For GCC
1618 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1619 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1620 (yyerrlab2): New label, which yyerrlab now falls through to.
1621 Compute the error's location by applying YYLLOC_DEFAULT to
1622 the locations of all the symbols that went into the error.
1623 * doc/bison.texinfo (Location Default Action): Mention that
1624 YYLLOC_DEFAULT is also invoked for syntax errors.
1625 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1626 Error locations include the locations of all the tokens that were
1627 discarded, not just the last token.
1629 2002-12-26 Paul Eggert <eggert@twinsun.com>
1631 * src/files.c: Include quote.h.
1632 (compute_output_file_names): Warn if we detect conflicting
1633 outputs to the same file. This should catch the misunderstanding
1634 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1636 * src/conflicts.c (conflicts_print): If the user specifies
1637 "%expect N", report an error if there are any reduce/reduce
1638 conflicts. This is what the manual says should happen.
1639 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1640 * tests/conflicts.at (%expect with reduce conflicts): New test.
1642 Don't use m4_include on relative file names, as it doesn't work as
1643 desired if there happens to be a file with that name under ".".
1645 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1646 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1647 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1648 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1649 * src/output.c (output_skeleton): Use full path names when
1650 specifying a file to include; don't rely on include path, as
1651 it's unreliable when the working file contains a file with
1654 2002-12-25 Paul Eggert <eggert@twinsun.com>
1656 Remove obsolete references to bison.simple and bison.hairy.
1657 Problem mentioned by Aubin Mahe in
1658 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
1659 * data/glr.c: Comment fix.
1660 * doc/bison.1: Remove references. Also, mention "yacc".
1662 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1665 * src/parse-gram.y (declaration): Use enum "report_states" rather
1666 than its numeric value 1.
1668 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1669 opening a new one. This fixes Debian bug 165349, reported by
1672 2002-12-24 Paul Eggert <eggert@twinsun.com>
1676 * Makefile.maint (cvs-update): Don't assume that the shell
1677 supports $(...), as Solaris sh doesn't.
1679 * src/parse-gram.y (lloc_default): Remove test for empty
1680 nonterminals at the end, since it didn't change the result.
1682 2002-12-24 Paul Eggert <eggert@twinsun.com>
1684 If the user does not define YYSTYPE as a macro, Bison now declares it
1685 using typedef instead of defining it as a macro. POSIX requires this.
1686 For consistency, YYLTYPE is also declared instead of defined.
1688 %union directives can now have a tag before the `{', e.g., the
1689 directive `%union foo {...}' now generates the C code
1690 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1691 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1692 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1693 instead of `yyltype'.
1695 `yystype' and `yyltype' are now obsolescent macros instead of being
1696 typedefs or tags; they are no longer documented and will be
1697 withdrawn in a future release.
1699 * data/glr.c (b4_location_type): Remove.
1700 (YYSTYPE): Renamed from yystype.
1701 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
1702 (struct YYLTYPE): Renamed from struct yyltype.
1703 (YYLTYPE): Renamed from yyltype.
1704 (yyltype, yystype): New (and obsolescent) macros,
1705 for backward compatibility.
1706 * data/yacc.c: Likewise.
1708 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
1709 does not specify a union tag. This is for compatibility with
1712 * src/parse-gram.y (add_param): 2nd arg is now char * not char
1713 const *, since it is now modified by stripping surrounding { }.
1714 (current_braced_code): Remove.
1715 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
1716 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
1717 trailing " {...}". Now of type <chars>.
1718 (grammar_declaration): Adjust to bundled tokens.
1719 (code_content): Remove; stripping is now done by add_param.
1720 (print_token_value): Print contents of bundled tokens.
1721 (token_name): New function.
1723 * src/reader.h (braced_code, current_braced_code): Remove.
1724 (token_name): New decl.
1726 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
1727 token_type, not braced_code code_kind. All uses changed.
1728 (SC_PRE_CODE): New state, for scanning after a keyword that
1729 has (or usually has) an immediately-following braced code.
1730 (token_type): New local var, to keep track of which token type
1731 to return when scanning braced code.
1732 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
1733 <INITIAL>"%parse-param", <INITIAL>"%printer",
1734 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
1735 instead of returning a token type immediately.
1736 (<INITIAL>"{"): Set token type.
1737 (<SC_BRACED_CODE>"}"): Use it.
1738 (handle_action_dollar, handle_action_at): Now returns bool
1739 indicating success. Fail if ! current_rule; this prevents a core dump.
1740 (handle_symbol_code_dollar, handle_symbol_code_at):
1741 Remove; merge body into caller.
1742 (handle_dollar, handle_at): Complain in invalid contexts.
1744 * NEWS, doc/bison.texinfo: Document the above.
1745 * NEWS: Fix years and program names in copyright notice.
1747 2002-12-17 Paul Eggert <eggert@twinsun.com>
1749 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
1750 Reporting, Table of Symbols): Omit mentions of %lex-param and
1751 %parse-param from the documentation for now.
1753 2002-12-15 Paul Eggert <eggert@twinsun.com>
1755 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
1756 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
1757 lookahead symbol, and which sets yychar in parser actions) and it
1758 disagreed with the Bison documentation. Bug
1759 reported by Andrew Walrond.
1761 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
1762 as the caller now does that.
1763 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
1764 (YYEMPTY): Parenthesize right hand side, since others use it.
1765 (yyparse): Don't assume that our generated code is the only code
1768 2002-12-13 Paul Eggert <eggert@twinsun.com>
1772 POSIX requires a "yacc" command.
1773 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
1774 (MOSTLYCLEANFILES): Add yacc.
1776 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
1777 as an alias for bison y.
1779 * po/LINGUAS: Add da.
1781 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
1782 problem with latest <getopt.h>.
1783 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
1785 * doc/fdl.texi: Upgrade to 1.2.
1786 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
1787 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
1788 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
1790 * config/install-sh: Sync with autotools.
1792 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
1793 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1794 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
1795 locations are requested.
1796 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
1797 locations are requested.
1799 2002-12-12 Paul Eggert <eggert@twinsun.com>
1801 Remove unportable casts and storage allocation tricks.
1802 While we're at it, remove almost all casts, since they
1803 usually aren't needed and are a sign of trouble.
1805 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
1807 * src/derives.c (derives_compute): Do not subtract NTOKENS from
1808 the pointer DSET returned by malloc; this isn't portable.
1809 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
1810 Similarly for DERIVES.
1811 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
1812 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
1813 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
1815 * src/derives.c (derives_compute): Do not bother invoking
1816 int_of_rule_number, since rule numbers are integers.
1818 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
1819 rather than XMALLOC (char, N).
1821 * src/files.c (filename_split): Rewrite to avoid cast.
1823 * src/gram.h (symbol_number_as_item_number,
1824 item_number_as_symbol_number, rule_number_as_item_number,
1825 item_number_as_rule_number):
1826 Now inline functions rather than macros, to avoid casts.
1827 * src/state.h (state_number_as_int): Likewise.
1828 * src/tables.c (state_number_to_vector_number,
1829 symbol_number_to_vector_number): Likewise.
1831 * src/gram.h (int_of_rule_number): Remove; no longer used.
1833 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
1834 since the resulting storage is always stored into.
1836 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
1839 * src/muscle_tab.c (muscle_m4_output):
1840 Now inline. Return bool, not int.
1841 * src/state.c (state_compare): Likewise.
1842 * src/symtab.c (symbol_check_defined,
1843 symbol_check_alias_consistency, symbol_pack, symbol_translation,
1844 hash_compare_symbol, hash_symbol):
1846 * src/uniqstr.c (uniqstr_print): Likewise.
1847 * src/muscle_tab.c (muscle_m4_output_processor):
1848 New function, to avoid casts.
1849 * src/state.c (state_comparator, stage_hasher): Likewise.
1850 * src/symtab.c (symbol_check_defined_processor,
1851 symbol_check_alias_consistency_processor, symbol_pack_processor,
1852 symbol_translation_processor, hash_symbol_comparator,
1853 hash_symbol_hasher): Likewise.
1854 * src/uniqstr.c (uniqstr_print_processor): Likewise.
1855 * src/muscle_tab.c (muscles_m4_output):
1856 Use new functions instead of casting old functions unportably.
1857 * src/state.c (state_hash_new): Likewise.
1858 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
1859 symbols_token_translations_init):
1861 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
1863 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
1864 var instead of casting to long, to avoid casts.
1865 (prepare_states): Use MALLOC rather than alloca, so that we don't
1866 have to worry about alloca.
1867 * src/state.c (state_hash_lookup): Likewise.
1869 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
1870 local var instead of casting to unsigned char, to avoid casts.
1872 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
1873 STATE_ALLOC): Remove.
1874 (transitions_new, errs_new, reductions_new, state_new): Use malloc
1875 rather than calloc, and use offsetof to avoid allocating slightly
1877 (state_new): Initialize all members.
1879 * src/state.c (state_hash): Use unsigned accumulator, not signed.
1881 * src/symtab.c (symbol_free): Remove; unused.
1882 (symbol_get): Remove cast in lhs of assignment.
1883 (symbols_do): Now static. Accept generic arguments, not
1884 hashing-related ones.
1886 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
1887 (symbol_processor): Remove.
1888 (symbols_do): Remove decl; now static.
1890 * src/system.h (alloca): Remove; decl no longer needed.
1891 (<stddef.h>): Include, for offsetof.
1892 (<inttypes.>, <stdint.h>): Include if available.
1893 (uintptr_t): New type, if system lacks it.
1894 (CALLOC, MALLOC, REALLOC): New macros.
1895 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
1898 * src/tables.c (table_size): Now int, to pacify GCC.
1899 (table_grow, table_ninf_remap): Use signed table size.
1900 (save_row): Don't bother initializing locals when not needed.
1901 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
1902 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
1904 * src/vcg.h: Correct misspellings.
1906 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
1909 * src/getargs.c (getargs): Don't assume EOF == -1.
1911 2002-12-09 Paul Eggert <eggert@twinsun.com>
1913 Change identifier spellings to avoid collisions with names
1914 that are reserved by POSIX.
1916 Don't use names ending in _t, since POSIX reserves them.
1917 For consistency, remove _e and _s endings -- they're weren't
1918 needed to remove ambiguity. All uses changed.
1919 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
1920 turn was just renamed from struniq_t.
1921 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
1922 which in turn was just renamed from struniq_processor_t.
1923 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
1924 in turn was renamed from hash_compare_struniq_t.
1925 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
1926 (state_list): Renamed from state_list_t.
1927 * src/assoc.h (assoc): Renamed from assoc_t.
1928 * src/conflicts.c (enum conflict_resolution): Renamed from
1929 enum conflict_resolution_e.
1930 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
1931 (rule_list): Renamed from rule_list_t.
1932 * src/getargs.h (enum trace): Renamed from enum trace_e.
1933 (enum report): Renamed from enum report_e.
1934 * src/gram.h (item_number): Renamed from item_number_t.
1935 (rule_number): Renamed from rule_number_t.
1936 (struct rule_s): Remove the "rule_s" part; not used.
1937 (rule): Renamed from rule_t.
1938 (rule_filter): Renamed from rule_filter_t.
1939 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
1940 (goto_list): Renamed from goto_list_t.
1941 * src/lalr.h (goto_number): Renamed from goto_number_t.
1942 * src/location.h (location): Renamed from location_t.
1943 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
1944 and moved here from:
1945 * src/muscle_tab.h (muscle_entry_t): here.
1946 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
1947 (rule_list): Renamed from rule_list_t.
1948 * src/print_graph.c (static_graph): Renamed from graph.
1949 * src/reader.h (braced_code): Renamed from braced_code_t.
1950 Remove brace_code_e tag.
1951 * src/relation.h (relation_node): Renamed from relation_node_t.
1952 (relation_nodes): Renamed from relation_nodes_t.
1953 (relation): Renamed from relation_t.
1954 * src/state.h (state_number): Renamed from state_number_t.
1955 (struct state): Renamed from struct state_s.
1956 (state): Renamed from state_t.
1957 (transitions): Renamed from transitions_t. Unused (and
1958 misspelled) transtion_s tag removed.
1959 (errs): Renamed from errs_t. Unused errs_s tag removed.
1960 (reductions): Renamed from reductions_t. Unused tag
1961 reductions_s removed.
1962 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
1963 (struct symbol_list): Renamed from struct symbol_list_s.
1964 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
1965 (struct symbol): Renamed from struct symbol_s.
1966 (symbol): Renamed from symbol_t.
1967 * src/tables.c (vector_number): Renamed from vector_number_t.
1968 (action_number): Renamed from action_t.
1969 * src/tables.h (base_number): Renamed from base_t.
1970 * src/vcg.h (enum color): Renamed from enum color_e.
1971 (enum textmode): Renamed from enum textmode_e.
1972 (enum shape): Renamed from enum shape_e.
1973 (struct colorentry): Renamed from struct colorentry_s.
1974 (struct classname): Renamed from struct classname_s.
1975 (struct infoname): Renamed from struct infoname_s.
1976 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
1977 (enum decision): Renamed from enum decision_e.
1978 (enum orientation): Renamed from enum orientation_e.
1979 (enum alignment): Renamed from enum alignment_e.
1980 (enum arrow_mode): Renamed from enum arrow_mode_e.
1981 (enum crossing_type): Renamed from enum crossing_type_e.
1982 (enum view): Renamed from enum view_e.
1983 (struct node): Renamed from struct node_s.
1984 (node): Renamed from node_t.
1985 (enum linestyle): Renamed from enum linestyle_e.
1986 (enum arrowstyle): Renamed from enum arrowstyle_e.
1987 (struct edge): Renamed from struct edge.
1988 (edge): Renamed from edge_t.
1989 (struct graph): Renamed from struct graph_s.
1990 (graph): Renamed from graph_t.
1991 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
1992 Rename value_t -> value.
1993 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
1994 value_t_as_yystype -> value_as_yystype.
1996 Don't include <errno.h> in the mainstream code, since it
1997 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
1998 * lib/get-errno.c, lib/get-errno.h: New files.
1999 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
2001 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
2002 * src/output.c (output_skeleton): Likewise.
2003 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
2005 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
2007 (handle_action_dollar, handle_action_at): Likewise.
2008 * src/system.h: Do not include <errno.h>.
2009 (TAB_EXT): Renamed from EXT_TAB.
2010 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
2012 Avoid str[a-z]*, since <string.h> reserves that name space.
2013 Change all instances of "struniq" in names to "uniqstr", and
2014 likewise for "STRUNIQ" and "UNIQSTR".
2015 * src/uniqstr.c: Renamed from src/struniq.c.
2016 * src/uniqstr.h: Renamed from src/struniq.h.
2017 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
2018 * src/files.c (strsuffix): Remove; unused.
2019 (concat2): Renamed from stringappend. Now static.
2020 * src/files.h (strsuffix, stringappend): Remove; unused.
2021 * src/parse-gram.y (<chars>): Renamed from <string>.
2022 (<uniqstr>): Renamed from <struniq>.
2023 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
2024 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
2025 (struct graph_s.expand): Renamed from struct graph_s.stretch.
2026 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
2027 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
2028 (N_EXPAND): Renamed from N_STRETCH.
2030 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
2031 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
2032 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
2034 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
2035 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
2036 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
2037 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
2038 (BASE_MAXIMUM): Renamed from BASE_MAX.
2039 (BASE_MINIMUM): Renamed from BASE_MIN.
2040 (ACTION_MAX): Remove; unused.
2041 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
2042 Unnecessary casts removed from above defines.
2045 Fix misspelling in names.
2046 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
2047 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
2051 * lib/timevar.c (timevar_report): Renamed from time_report,
2052 for consistency with other names.
2053 * lib/timevar.h (timevar_report): New decl.
2054 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
2057 Sort include-file uses.
2059 Reorder all include files under src to be in the order "system.h".
2060 then the ../lib include files in angle brackets (alphabetized),
2061 then the . include files in double-quotes (alphabetized). Fix
2062 dependency breakages encountered in this process, as follows:
2063 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
2064 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
2065 * src/state.h: Include "symtab.h".
2067 2002-12-08 Paul Eggert <eggert@twinsun.com>
2069 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
2070 since this causes problems when __file__ contains character
2071 sequences like "@" that are treated specially by src/scan-skel.l.
2072 Instead, just use the file's basename. This fixes the bug
2073 reported by Martin Mokrejs in
2074 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
2076 2002-12-06 Paul Eggert <eggert@twinsun.com>
2078 Add support for rules that do not have trailing semicolons, as
2079 POSIX requires. Improve the quality of locations in Bison
2082 * src/location.c: Include <quotearg.h>.
2083 (empty_location): Now const.
2084 (location_print): New function. Follow the recommendation of the
2085 GNU Coding Standards for locations that span file boundaries.
2086 * src/location.h: Do not include <quotearg.h>; no longer needed.
2087 (boundary): New type.
2088 (location_t): Use it. This allows locations to span file boundaries.
2089 All member uses changed: file -> start.file or end.file (as needed),
2090 first_line -> start.line, first_column -> start.column,
2091 last_line -> end.line, last_column -> end.column.
2092 (equal_boundaries): New function.
2093 (LOCATION_RESET, LOCATION_STEP): Remove.
2094 (LOCATION_PRINT): Remove. All callers changed to use location_print.
2095 (empty_location): Now const.
2096 (location_print): New decl.
2097 * src/parse-gram.y (lloc_default): New function, which handles
2098 empty locations more accurately.
2099 (YYLLOC_DEFAULT): Use it.
2100 (%token COLON): Remove.
2101 (%token ID_COLON): New token.
2103 (declarations, rules): Remove trailing semicolon.
2104 (declaration, rules_or_grammar_declaration):
2105 Allow empty (";") declaration.
2106 (symbol_def): Remove empty actions; no longer needed.
2107 (rules_or_grammar_declaration): Remove trailing semicolon.
2108 (semi_colon.opt): Remove.
2109 * src/reader.h: Include location.h.
2110 (scanner_cursor): New decl.
2111 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
2113 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
2115 (STEP): Remove. No longer needed, now that adjust_location does
2116 the work. All uses removed.
2117 (scanner_cursor): New var.
2118 (adjust_location): Renamed from extend_location. It now sets
2119 *loc and adjusts the scanner cursor. All uses changed.
2120 Don't bother testing for CR.
2121 (handle_syncline): Remove location arg; now updates scanner cursor.
2122 All callers changed.
2123 (unexpected_end_of_file): Now accepts start boundary of token or
2124 comment, not location. All callers changed. Update scanner cursor,
2126 (SC_AFTER_IDENTIFIER): New state.
2127 (context_state): Renamed from c_context. All uses changed.
2128 (id_loc, code_start, token_start): New local vars.
2129 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
2130 processing of Yacc white space and equivalents here.
2131 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
2132 instead of returning ID immediately, since we need to search for
2134 (<INITIAL>"'", "\""): Save token_start.
2135 (<INITIAL>"%{", "{", "%%"): Save code_start.
2136 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
2137 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
2138 BEGIN context_state at end, not INITIAL.
2139 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
2140 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
2141 Return correct token start.
2142 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
2143 the start of a character, string or multiline comment is found.
2144 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
2145 Reduction): Adjust reported locations to match the more-precise
2146 results now expected.
2147 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
2148 * tests/reduce.at (Useless Rules, Reduced Automaton,
2149 Underivable Rules): Likewise.
2150 * tests/regression.at (Invalid inputs): No longer `expecting ";"
2151 or "|"' now that so many other tokens are allowed by the new grammar.
2153 * src/complain.h (current_file): Remove duplicate decl;
2154 current_file is now owned by files.h.
2155 * src/complain.c, src/scan-gram.l: Include files.h.
2157 2002-12-06 Paul Eggert <eggert@twinsun.com>
2159 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
2160 promotes to int; it might be unsigned int.
2161 * data/yacc.c (yy_reduce_print): Likewise.
2163 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
2164 be #defined in the prologue, not in the Bison declarations.
2165 This fixes Debian Bug 102878, reported by Shaul Karl.
2167 2002-12-02 Paul Eggert <eggert@twinsun.com>
2169 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
2170 * lib/strtoul.c: New file, from gnulib.
2171 This fixes a porting bug reported by Peter Klein in
2172 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
2174 2002-11-30 Paul Eggert <eggert@twinsun.com>
2176 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
2177 and put only a forward declaration in the prologue. This is for
2178 consistency with the other scanner helper functions.
2180 Type clashes now generate warnings, not errors, since it
2181 appears that POSIX may allow some grammars with type clashes.
2182 * src/reader.c (grammar_current_rule_check): Warn about
2183 type clashes instead of complaining.
2184 * tests/input.at (Type Clashes): Expect warnings, not complaints.
2186 Add Yacc library, since POSIX requires it.
2187 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
2188 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
2189 * lib/main.c, lib/yyerror.c: New files.
2191 gram_error can be static; it need not be extern.
2192 * src/reader.h (gram_error): Remove decl.
2193 * src/parse-gram.y (gram_error): Now static. Add static decl.
2194 (print_token_value): Omit parameter names from forward decl,
2197 2002-11-29 Paul Eggert <eggert@twinsun.com>
2199 * doc/bison.texinfo: Emphasize that yylex and yyerror must
2200 be declared before being used. E.g., one should typically
2201 declare them in the prologue. Use GNU coding style in examples.
2202 Put "const" consistently after the type it modifies. Mention
2203 that C99 supports "inline". Mention that yyerror traditionally
2206 %parse-param and %lex-param now take just one argument, the
2207 declaration; the argument name is deduced from the declaration.
2209 * doc/bison.texinfo (Parser Function, Pure Calling, Error
2210 Reporting, Table of Symbols): Document this.
2211 * src/parse-gram.y (add_param): New function.
2213 (declaration): Implement new rule for %parse-param and %lex-param.
2214 * src/scan-gram.l: "," now elicits a warning, rather than being
2215 a token; this is more compatible with byacc.
2216 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
2218 2002-11-27 Paul Eggert <eggert@twinsun.com>
2220 Rename identifiers to avoid real and potential collisions.
2222 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
2223 to avoid collision with lex macro described by Bruce Lilly in
2224 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
2225 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2226 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
2227 * src/parse-gram.y (print_token_value): Renamed from yyprint.
2229 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
2230 The name "yycontrol" violates the name space rules, and this stuff
2231 wasn't being used anyway.
2232 (input): Remove action; this stuff wasn't being used.
2233 (gram_error): Rename local variable yylloc -> loc.
2234 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
2235 (YY_DECL): Don't use "yy" at start of local variables.
2236 All uses changed, e.g., yylloc -> loc.
2237 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
2238 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
2239 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
2240 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
2242 * src/parse-gram.y (gram_error): loc is now const *.
2243 * src/reader.h (gram_error): Likewise.
2245 2002-11-24 Paul Eggert <eggert@twinsun.com>
2249 * tests/actions.at (Actions after errors): Use an output format
2250 more similar to that of the Printers and Destructors test.
2251 Test the position of the ';' token too.
2252 (Printers and Destructors): Likewise.
2253 (Printers and Destructors: %glr-parser): Remove for now, to avoid
2254 unnecessarily alarming people when the test fails.
2256 * data/yacc.c (yyerrlab1): Move this label down, so that the
2257 parser does not discard the lookahead token if the user code
2258 invokes YYERROR. This change is required for POSIX conformance.
2260 * lib/error.c: Sync with gnulib.
2262 2002-11-22 Paul Eggert <eggert@twinsun.com>
2264 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
2265 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
2266 * lib/xmalloc.c: Likewise.
2268 2002-11-20 Paul Eggert <eggert@twinsun.com>
2270 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
2272 2002-11-20 Paul Eggert <eggert@twinsun.com>
2274 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
2275 should use `if (! x) abort ();' rather than `assert (x);', and
2276 anyway it's one less thing to worry about configuring.
2278 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
2279 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
2280 and replace all instances of assert with abort.
2281 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2282 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
2284 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
2285 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
2286 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
2287 hash_find_entry, hash_rehash, hash_insert): Likewise.
2288 * src/conflicts.c (resolve_sr_conflict): Likewise.
2289 * src/lalr.c (set_goto_map, map_goto): Likewise.
2290 * src/nullable.c (nullable_compute): Likewise.
2291 * src/output.c (prepare_rules, token_definitions_output): Likewise.
2292 * src/reader.c (packgram, reader): Likewise.
2293 * src/state.c (state_new, state_free, state_transitions_set,
2294 state_reduction_find): Likewise.
2295 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
2296 symbol_pack): Likewise.
2297 * src/tables.c (conflict_row, pack_vector): Likewise.
2298 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
2299 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
2300 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
2301 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
2303 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
2304 (ARGMATCH_CONSTRAINT): New macro.
2305 (ARGMATCH_ASSERT): Use it.
2307 * src/system.h (verify): New macro.
2308 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
2310 * src/tables.c (tables_generate): Likewise.
2312 * src/struniq.c (struniq_assert): Now returns void, and aborts
2313 if the assertion is false.
2314 (struniq_assert_p): Remove.
2315 * src/struniq.h: Likewise.
2317 2002-11-18 Paul Eggert <eggert@twinsun.com>
2319 * data/glr.c (yygetLRActions): Replace `yyindex' with
2320 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
2321 This fixes the regression with Sun ONE Studio 7 cc that I reported in
2322 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
2324 2002-11-18 Akim Demaille <akim@epita.fr>
2326 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
2328 From Tim Van Holder.
2330 2002-11-17 Paul Eggert <eggert@twinsun.com>
2332 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
2333 to "SyntaxError" for consistency with my 2002-11-15 change.
2335 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
2336 not define to {}, since this breaks the common use of `YYDPRINTF
2337 ((...));' if a single statement is desired (e.g. before `else').
2338 Work around GCC warnings by surrounding corresponding calls with
2340 (yyhasResolvedValue): Remove unused function.
2341 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
2343 (yyreportSyntaxError): Renamed from yyreportParseError.
2344 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
2346 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
2347 extern when possible. Remove unused initializations.
2349 2002-11-16 Akim Demaille <akim@epita.fr>
2351 Augment the similarity between GLR and LALR traces.
2353 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
2354 (YY_REDUCE_PRINT): New.
2355 (yyparse): Use them.
2356 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
2358 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
2359 state reached after the reduction/recovery, since...
2360 (yyparse, yyprocessOneStack): Report the state we are entering in.
2362 2002-11-16 Akim Demaille <akim@epita.fr>
2364 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
2365 Add support for --trace=skeleton.
2366 * src/scan-skel.l: %option debug.
2367 Scan strings of non-@ or \n instead of character by character.
2368 (scan_skel): Handle trace_skeleton.
2370 (@output_parser_name@, @output_header_name@): ``Restore'' their
2371 support (used to be M4 macros).
2372 * data/yacc.c: Quote larger chunks, a la glr.c.
2373 * data/lalr1.cc: Likewise.
2374 The header guards are no longer available, so use some other
2375 string than `YYLSP_NEEDED'.
2377 2002-11-16 Akim Demaille <akim@epita.fr>
2379 Make the ``Printers and Destructors'' test more verbose, taking
2380 `yacc.c''s behavior as (possibly wrong) reference.
2382 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
2383 instead of fprint on stdout.
2384 Set and report the last_line of the symbols.
2385 Consistently display values and locations.
2387 2002-11-16 Paul Eggert <eggert@twinsun.com>
2389 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
2391 2002-11-15 Paul Eggert <eggert@twinsun.com>
2393 * tests/actions.at (Actions after errors): New test case.
2395 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
2396 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
2397 tests/action.at, tests/calc.at, tests/conflicts.at,
2398 tests/cxx-type.at, tests/regression.at:
2399 "parse error" -> "syntax error" for POSIX compatibility.
2400 "parsing stack overflow..." -> "parser stack overflow" so
2401 that code matches Bison documentation.
2403 2002-11-15 Akim Demaille <akim@epita.fr>
2405 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
2406 take two BRACED_CODE, not two string_content.
2407 Free the scanner's obstack when we are done.
2408 (code_content): New.
2409 * tests/calc.at: Adjust.
2410 * doc/bison.texinfo: Adjust.
2411 Also, make sure to include the `,' for these declarations.
2413 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
2415 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
2416 definition; avoids potential autoreconf problems.
2418 2002-11-15 Akim Demaille <akim@epita.fr>
2420 Always check the value returned by yyparse.
2422 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
2423 returned by yyparse.
2424 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
2426 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
2427 returned by yyparse.
2429 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2431 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
2434 2002-11-14 Paul Eggert <eggert@twinsun.com>
2436 * src/output.c (output_skeleton): Call xfopen instead of
2437 duplicating xfopen's body.
2439 Fix bugs reported by Nelson H. F. Beebe in
2440 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
2442 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
2443 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
2444 Group compiler. Instead, use "$CC -E bar.c". Include the .h
2445 file twice in the grammar, as an extra check.
2447 * tests/input.at (Torturing the Scanner): Surround the
2448 backslash-newline tests with "#if 0", to make it less likely that
2449 we'll run into compiler bugs. Bring back solitary \ inside
2450 comment, but add a closing comment to work around HP C bug. Don't
2451 test backslash-newline in C character constant.
2453 2002-11-14 Akim Demaille <akim@epita.fr>
2455 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
2456 status of the compiler.
2457 Calling `exit 1' is no longer needed.
2458 Reported by Nelson H. F. Beebe.
2460 2002-11-14 Akim Demaille <akim@epita.fr>
2462 * tests/atlocal.in (CPPFLAGS): We have config.h.
2463 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
2465 * tests/actions.at, tests/calc.at, tests/conflicts.at,
2466 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
2467 * tests/regression.at, tests/torture.at: Use them for all the
2468 grammars that are to be compiled.
2469 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
2470 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
2471 * doc/bison.texinfo (GLR Parsers): Document `inline'.
2473 2002-11-14 Akim Demaille <akim@epita.fr>
2475 * doc/bison.texinfo: Various formatting changes (alignments in
2476 samples, additional @group/@end group, GCS in samples.
2477 Use @deffn instead of simple @table to define the directives,
2478 macros, variables etc.
2480 2002-11-13 Paul Eggert <eggert@twinsun.com>
2482 Fix some bugs reported by Albert Chin-A-Young in
2483 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
2485 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
2486 -o c"; the HP C compiler chatters during compilation.
2487 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
2488 * tests/headers.at (export YYLTYPE): Likewise.
2490 * tests/input.at (Torturing the Scanner): Remove lines containing
2491 solitary backslashes, as they tickle a bug in the HP C compiler.
2493 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
2494 comments, since they're not portable. Use GNU coding style.
2496 2002-11-13 Akim Demaille <akim@epita.fr>
2498 * data/yacc.c: Leave bigger chunks of quoted text.
2499 (YYDSYMPRINTF): New.
2500 Use it to report symbol activities.
2501 * data/glr.c (YYDSYMPRINTF): New.
2504 2002-11-12 Paul Eggert <eggert@twinsun.com>
2508 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
2509 (yyglrReduce): Return yyok, not 0.
2510 This should avoid the enumerated-type warnings reported
2511 by Nelson H. F. Beebe in
2512 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
2514 * lib/bbitset.h (BITSET_INLINE): Remove.
2515 * lib/bitset.h [! BITSET_INLINE]: Remove.
2516 (bitset_set, bitset_reset, bitset_test): Rename local vars
2517 to avoid shadowing warnings by GCC.
2519 * data/glr.c (inline): Remove #define. It's the user's
2520 responsibility to #define it away, just like 'const'.
2521 This fixes one of the bugs reported by Nelson H. F. Beebe in
2522 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
2524 * Makefile.maint (po-check): Scan .l and .y files instead of the
2525 .c and the .h files that they generate. This fixes the bug
2526 reported by Tim Van Holder in:
2527 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
2528 Look for N_ as well as for _. Try to avoid matching #define for
2530 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
2531 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
2532 * src/scan-gram.l: Revamp regular expressions so that " and '
2533 do not confuse xgettext.
2535 * src/struniq.h (struniq_new): Do not declare the return type
2536 to be 'const'; this violates the C standard.
2537 * src/struniq.c (struniq_new): Likewise.
2539 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
2541 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
2542 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
2545 2002-11-12 Akim Demaille <akim@epita.fr>
2547 * Makefile.maint: Sync with Autoconf:
2548 (local_updates): New.
2550 2002-11-12 Akim Demaille <akim@epita.fr>
2552 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
2554 2002-11-12 Akim Demaille <akim@epita.fr>
2556 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
2559 2002-11-12 Akim Demaille <akim@epita.fr>
2561 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
2564 2002-11-12 Akim Demaille <akim@epita.fr>
2566 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
2567 Use it to test the GLR parser.
2569 2002-11-12 Akim Demaille <akim@epita.fr>
2571 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
2573 * data/glr.c (yystos): New.
2574 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
2576 (yyval): Don't define it, it is handled via M4.
2577 (yyrecoverParseError): Free verbosely the discarded symbols.
2578 * data/yacc.c (yysymprint): Remove, rather...
2579 (b4_yysymprint_generate): invoke.
2580 * data/c.m4 (b4_yysymprint_generate): New.
2581 Accept pointers as arguments, as opposed to the version from
2583 (b4_yydestruct_generate): Likewise.
2584 * tests/cations.at (Printers and Destructors): Use Bison directives
2585 instead of CPP macros.
2586 Don't rely on internal details.
2588 2002-11-12 Akim Demaille <akim@epita.fr>
2590 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
2591 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
2592 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
2593 it against YYEMPTY and so forth), work on yytoken (i.e., set
2594 it to YYEMPTY etc.).
2595 (yydestruct): Replace with a b4_yydestruct_generate invocation.
2596 (b4_symbol_actions): Remove.
2597 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
2598 for 0, end-of-input.
2600 2002-11-12 Akim Demaille <akim@epita.fr>
2602 * doc/bison.texinfo (Destructor Decl): New.
2604 2002-11-12 Akim Demaille <akim@epita.fr>
2606 * src/tables.c (tables_generate): Use free for pointers that
2607 cannot be NULL, not XFREE.
2608 (pack_vector): Use assert, not fatal, for bound violations.
2609 * src/state.c (state_new): Likewise.
2610 * src/reader.c (reader): Likewise.
2611 * src/lalr.c (set_goto_map): Likewise.
2612 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
2615 2002-11-12 Akim Demaille <akim@epita.fr>
2617 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2619 * src/scan-gram.l (last_string): Is global to the file, not to
2621 * src/parse-gram.y (input): Don't append the epilogue here,
2622 (epilogue.opt): do it here, and free the scanner's obstack.
2623 * src/reader.c (epilogue_set): Rename as...
2624 (epilogue_augment): this.
2625 * data/c.m4 (b4_epilogue): Defaults to empty.
2627 2002-11-12 Akim Demaille <akim@epita.fr>
2629 * src/getargs.c (long_options): Remove duplicates.
2630 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2632 * doc/bison.rnh: Remove.
2633 * doc/bison.texinfo (VMS Invocation): Remove.
2635 2002-11-12 Akim Demaille <akim@epita.fr>
2637 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2638 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2640 Use struniq for symbols.
2642 * src/symtab.h (symbol_t): The tag member is a struniq.
2643 (symbol_type_set): Adjust.
2644 * src/symtab.c (symbol_new): Takes a struniq.
2645 (symbol_free): Don't free the tag member.
2646 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2647 (hash_compare_symbol, hash_symbol): these.
2648 Use the fact that tags as struniqs.
2649 (symbol_get): Use struniq_new.
2650 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2652 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2653 and type members are struniqs.
2654 * src/reader.c (get_merge_function)
2655 (grammar_current_rule_merge_set): Adjust.
2656 (TYPE, current_type): Are struniq.
2658 Use struniq for file names.
2660 * src/files.h, src/files.c (infile): Split into...
2661 (grammar_file, current_file): these.
2662 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2663 * src/reduce.c (reduce_print): Likewise.
2664 * src/getargs.c (getargs): Likewise.
2665 * src/complain.h, src/complain.c: Likewise.
2666 * src/main.c (main): Call struniqs_new early enough to use it for
2668 Don't free the input file name.
2670 2002-11-12 Akim Demaille <akim@epita.fr>
2672 * src/symtab.c (symbol_free): Remove dead deactivated code:
2673 type_name are properly removed.
2674 Don't use XFREE to free items that cannot be NULL.
2675 * src/struniq.h, src/struniq.c: New.
2676 * src/main.c (main): Initialize/free struniqs.
2677 * src/parse-gram.y (%union): Add astruniq member.
2679 * src/scan-gram.l (<{tag}>): Return a struniq.
2680 Free the obstack bit that used to store it.
2681 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2683 2002-11-11 Paul Eggert <eggert@twinsun.com>
2685 Revamp to fix many (but not all) of the C- and M4-related quoting
2686 problems. Among other things, this fixes the Bison bug reported
2687 by Jan Hubicka when processing the Bash grammar; see:
2688 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
2690 Use new @ escapes consistently. Represent brackets with @{ and @}
2691 rather than @<:@ and @:>@, since this works a bit better with dumb
2692 editors like vi. Represent @ with @@, since @ is now consistently
2693 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2694 __ofile__, to avoid unexpected expansions. Similarly, use @output
2695 rather than #output.
2697 * data/c.m4 (b4_copyright): Omit file name from comment, since
2698 the file name could contain "*/".
2699 (b4_synclines_flag): Don't quote the 2nd argument; it should already
2700 be quoted. All uses changed.
2702 * data/glr.c: Use new @ escapes consistently.
2703 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
2704 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
2705 Remove, since they couldn't handle arbitrary characters in file
2707 * data/lalr1.cc: Likewise.
2708 * data/yacc.c: Likewise.
2710 * src/files.c (output_infix): Remove; all uses removed.
2711 * src/files.h: Likewise.
2713 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
2714 mishandled funny characters in file names, and anyway it isn't
2716 * data/yacc.c: Likewise.
2717 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
2719 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
2720 * data/yacc.c: Likewise.
2722 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
2724 (muscle_init): Quote filename as a C string.
2725 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
2726 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
2727 * src/output.c (escaped_file_name_output): New function.
2728 (prepare_symbols): Quote tokens for M4.
2729 (prepare): Don't insert output_infix, output_prefix,
2730 output_parser_name, output_header_name; this is now down by scan-skel.
2731 Insert skeleton as a C string.
2733 * src/output.c (user_actions_output, symbol_destructors_output,
2734 symbol_printers_output): Quote filenames for C and M4.
2735 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2737 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
2738 escapes other than \\ and \'; this simplifies the code.
2739 (<SC_STRING>): Likewise, for \\ and \".
2740 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
2741 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
2742 Use new escapes @{ and @} for [ and ].
2744 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
2745 them with auto vars.
2746 Switch to new escape scheme, where @ is the escape character uniformly.
2747 Abort if a stray escape character is found. Avoid unbounded input
2748 buffer when parsing non-escaped text.
2750 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
2751 __oline__, #output, $@, and @{ do not have unintended meanings.
2753 2002-11-09 Paul Eggert <eggert@twinsun.com>
2755 Fix the test failure due to GCC warnings described in
2756 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
2757 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
2758 evaluate to 0 if it's impossible for NINF to be in the respective
2760 (yygetLRActions, yyrecoverParseError): Use them.
2762 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
2763 counted in the token inserted at end of file. Now takes
2764 location_t *, not location_t, so that the location can be
2765 adjusted. All uses changed.
2767 * tests/regression.at (Invalid inputs): Adjust wording in
2768 diagnostic to match the new behavior.
2770 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
2771 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
2772 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
2773 abort ();'. This reduces the runtime of the "Many lookaheads"
2774 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
2777 2002-11-07 Paul Eggert <eggert@twinsun.com>
2779 * src/parse-gram.y (CHARACTER): Remove unused token.
2782 * src/scan-gram.l: Remove stack option. We no longer use the
2783 stack, since the stack was never deeper than 1; instead, use the
2784 new auto var c_context to record the stacked value.
2786 Remove nounput option. At an unexpected end of file, we now unput
2787 the minimal input necessary to end cleanly; this simplifies the
2790 Avoid unbounded token sizes where this is easy.
2792 (unexpected_end_of_file): New function.
2793 Use it to systematize the error message on unexpected EOF.
2794 (last-string): Now auto, not static.
2795 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
2796 (scanner_last_string_free): Remove; not used.
2797 (percent_percent_count): Move decl to just before use.
2798 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
2799 not the (never otherwised-used) CHARACTER.
2801 2002-11-07 Akim Demaille <akim@epita.fr>
2803 Let yyerror always receive the msg as last argument, so that
2804 yyerror can be variadic.
2806 * data/yacc.c (b4_yyerror_args): New.
2807 Use it when calling yyerror.
2808 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
2809 Use it when calling yyerror.
2810 * doc/bison.texinfo (Error Reporting): Adjust.
2811 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
2812 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
2814 2002-11-06 Akim Demaille <akim@epita.fr>
2816 #line should have quoted strings.
2817 Ideally, this should be done by m4_quotearg.
2819 * src/scan-skel.l: Include quotearg.h.
2821 * src/output.c (symbol_printers_output)
2822 (symbol_destructors_output): Quote the file name.
2824 2002-11-06 Akim Demaille <akim@epita.fr>
2826 * tests/regression.at (Invalid inputs): Adjust to the recent
2829 2002-11-06 Akim Demaille <akim@epita.fr>
2832 Reported by Jim Kent.
2834 * data/c.m4 (b4_syncline): New.
2835 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
2836 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
2837 * src/output.c (user_actions_output): Likewise.
2838 (prepare): Define 'b4_synclines_flag'.
2839 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
2841 2002-11-06 Akim Demaille <akim@epita.fr>
2843 * src/main.c (main): Free `infile'.
2844 * src/scan-gram.l (handle_syncline): New.
2846 * src/output.c (user_actions_output, symbol_destructors_output)
2847 (symbol_printers_output): Use the location's file name, not
2849 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2851 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2853 * src/tables.c (matching_state): Don't allow states to match if
2854 either has GLR conflict entries.
2856 2002-11-05 Paul Eggert <eggert@twinsun.com>
2858 * src/scan-gram.l: Use more accurate diagnostics, e.g.
2859 "integer out of range" rather than "invalid value".
2860 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
2863 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
2864 Also, remove one static variable in the scanner.
2866 * src/scan-gram.l (braces_level): Now auto, not static.
2867 Initialize to zero if the compiler is being picky.
2868 (INITIAL): Clear braces_level instead of incrementing it.
2869 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
2870 as POSIX 1003.1-2001 requires.
2871 * src/system.h (IF_LINT): New macro, taken from coreutils.
2872 * configure.ac: Define "lint" if --enable-gcc-warnings.
2874 2002-11-05 Akim Demaille <akim@epita.fr>
2876 * src/scan-gram.l: When it starts with `%', complain about the
2877 whole directive, not just that `invalid character: %'.
2879 2002-11-04 Akim Demaille <akim@epita.fr>
2881 * Makefile.maint: Update from Autoconf.
2882 (update, cvs-update, po-update, do-po-update): New.
2884 2002-11-04 Akim Demaille <akim@epita.fr>
2886 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
2888 Have yyerror `use' its arguments.
2889 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
2890 returns true when location & yacc & pure & parse-param.
2891 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
2893 2002-11-04 Akim Demaille <akim@epita.fr>
2895 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
2897 * src/scan-gram.l: Use [\'] instead of ['] to pacify
2900 Use quote, not quote_n since LOCATION_PRINT no longer uses the
2903 2002-11-03 Paul Eggert <eggert@twinsun.com>
2905 * src/reader.c (get_merge_function, grammar_current_rule_check):
2906 Use consistent diagnostics for reporting type name clashes.
2907 Quote the types with <>, for consistency with Yacc.
2908 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
2910 2002-11-03 Akim Demaille <akim@epita.fr>
2912 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
2914 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
2915 (b4_parse_param): Remove.
2916 Use b4_identification.
2917 Propagate b4_pure_args where needed to pass them to yyerror.
2918 * data/glr.m4 (b4_parse_param): Remove.
2919 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
2920 (b4_lpure_formals): New.
2921 Use b4_identification.
2922 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
2923 b4_user_formals and b4_user_args.
2924 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
2925 (yyreportAmbiguity): When using a pure parser, also need
2926 the location, and the parse-params.
2928 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
2929 When using a pure parser, also need the parse-params.
2931 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
2932 (%pure-parser + %parse-param) LALR and GLR parsers.
2933 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
2934 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
2935 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
2936 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
2937 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
2938 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
2939 * doc/bison.texinfo: Untabify the whole file.
2940 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
2941 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
2942 (Error Reporting): Adjust to these new directives.
2943 Document %error-verbose, deprecate YYERROR_VERBOSE.
2945 2002-11-03 Akim Demaille <akim@epita.fr>
2947 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
2948 AT_CHECK_CALC_GLR invocations to use % directives, instead of
2949 command line options.
2950 * tests/cxx-type.at: Formatting changes.
2952 2002-11-03 Paul Eggert <eggert@twinsun.com>
2954 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
2955 to count columns correctly, and to check for invalid inputs.
2957 Use mbsnwidth to count columns correctly. Account for tabs, too.
2959 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
2960 (extend_location): New function.
2963 Handle CRLF in C code rather than in Lex code.
2964 (YY_INPUT): New macro.
2965 (no_cr_read): New function.
2967 Scan UCNs, even though we don't fully handle them yet.
2968 (convert_ucn_to_byte): New function.
2970 Handle backslash-newline correctly in C code.
2971 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
2972 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
2974 (tag, splice): New EREs. Do not allow NUL or newline in tags.
2975 Use {splice} wherever C allows backslash-newline.
2976 YY_STEP after space, newline, vertical-tab.
2977 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
2979 (letter, id): Don't assume ASCII; e.g., spell out a-z.
2981 ({int}, handle_action_dollar, handle_action_at): Check for integer
2984 (YY_STEP): Omit trailing semicolon, so that it's more like C.
2986 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
2987 as well as \000. Check for UCHAR_MAX, not 255.
2988 Allow \x with an arbitrary positive number of digits, as in C.
2989 Check for overflow here.
2990 Allow \? and UCNs, for compatibility with C.
2992 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
2993 with quote slot used by complain_at.
2995 * tests/input.at: Add tests for backslash-newline, m4 quotes
2996 in symbols, long literals, and funny escapes in strings.
2998 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
2999 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
3000 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
3001 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
3002 * m4/mbswidth.m4: New file, from GNU coreutils.
3004 * doc/bison.texinfo (Grammar Outline): Document // comments.
3005 (Symbols): Document that trigraphs have no special meaning in Bison,
3006 nor is backslash-newline allowed.
3007 (Actions): Document that trigraphs have no special meaning.
3009 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
3012 2002-11-02 Paul Eggert <eggert@twinsun.com>
3014 * src/reader.c: Don't include quote.h; not needed.
3015 (get_merge_function): Reword warning to be consistent with
3016 type clash diagnostic in grammar_current_rule_check.
3018 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
3019 bug in trigraph handling.
3021 * src/output.c (prepare_symbols): When printing token names,
3022 escape "[" as "@<:@" and likewise for "]".
3024 * src/system.h (errno): Remove declaration, as we are now
3025 assuming C89 or better, and C89 guarantees errno.
3027 2002-10-30 Paul Eggert <eggert@twinsun.com>
3029 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
3030 Check for close failures.
3031 * src/files.h (xfclose): Return void, not int, since it always
3033 * src/files.c (xfclose): Likewise. Report I/O error if ferror
3035 * src/output.c (output_skeleton): Use xfclose rather than fclose
3036 and ferror. xfclose now checks ferror.
3038 * data/glr.c (YYLEFTMOST_STATE): Remove.
3039 (yyreportTree): Use a stack-based leftmost state. This avoids
3040 our continuing battles with bogus warnings about initializers.
3042 2002-10-30 Akim Demaille <akim@epita.fr>
3044 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
3047 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3049 * tests/glr-regr1.at: New test for reported regressions.
3050 * tests/testsuite.at: Add glr-regr1.at test.
3051 * tests/Makefile.am: Add glr-regr1.at test.
3053 2002-10-24 Paul Eggert <eggert@twinsun.com>
3057 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
3058 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
3059 we use malloc. Don't assume 'A' through 'Z' are contiguous.
3060 Don't assume strdup exists; POSIX says its an XSI extension.
3061 Check for buffer overflow on input.
3063 2002-10-24 Akim Demaille <akim@epita.fr>
3065 * src/output.c (output_skeleton): Don't disable M4sugar comments
3066 too soon: it results in comments being expanded.
3067 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
3070 2002-10-24 Akim Demaille <akim@epita.fr>
3072 * data/yacc.c (m4_int_type): New.
3073 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
3074 char' as only yacc.c wants K&R portability.
3075 * data/glr.c (yysigned_char): Remove.
3076 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
3077 Reported by Quoc Peyrot.
3079 2002-10-23 Paul Eggert <eggert@twinsun.com>
3081 * src/main.c (main): With --trace=time, report times even if a
3082 non-fatal error occurs. Formerly, the times were reported in some
3083 such cases but not in others.
3084 * src/reader.c (reader): Just return if a complaint has been issued,
3085 instead of exiting, so that 'main' can report times.
3087 2002-10-22 Akim Demaille <akim@epita.fr>
3089 * src/system.h: Include sys/types.
3090 Reported by Bert Deknuydt.
3092 2002-10-23 Paul Eggert <eggert@twinsun.com>
3094 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
3095 Suggested by Art Haas.
3097 2002-10-22 Paul Eggert <eggert@twinsun.com>
3099 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
3100 decl; not needed any more.
3101 * src/main.c (main): Use return to exit, undoing yesterday's change.
3102 The last OS that we could find where this wouldn't work is
3103 SunOS 3.5, and that's too old to worry about now.
3105 * data/glr.c (struct yyltype): Define members even when not
3106 doing locations. This is more consistent with yacc.c, and it
3107 works around the following bug reports:
3108 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
3109 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
3111 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
3112 @acronym consistently. Standardize on "Yacc" instead of "YACC",
3113 "Algol" instead of "ALGOL". Give a bit more history about BNF.
3115 2002-10-22 Akim Demaille <akim@epita.fr>
3119 2002-10-21 Paul Eggert <eggert@twinsun.com>
3121 Be consistent about 'bool'; the old code used an enum in one
3122 module and an int in another, and this violates the C standard.
3123 * m4/stdbool.m4: New file, from coreutils 4.5.3.
3124 * configure.ac (AC_HEADER_STDBOOL): Add.
3125 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
3126 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
3127 * src/symtab.c (hash_compare_symbol_t): Likewise.
3128 * src/system.h (bool, false, true): Use a definition consistent
3129 with ../lib/hash.c. All uses changed.
3131 * src/complain.c (warning_issued): Renamed from warn_message_count,
3132 so that we needn't worry about integer overflow (!).
3133 Now of type bool. All uses changed.
3134 (complaint_issued): Renamed from complain_message_count; likewise.
3136 * src/main.c (main): Use exit to exit with failure.
3138 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
3139 rather than 1 and 0.
3140 * src/main.c (main): Likewise.
3141 * src/getargs.c (getargs): Likewise.
3142 * src/reader.c (reader): Likewise.
3144 * src/getarg.c (getargs): Remove duplicate code for
3145 "Try `bison --help'".
3147 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
3148 What was that "2" for?
3150 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
3151 * src/getargs.c (usage): Likewise.
3153 * src/getargs.c (getargs): When there are too few operands, report
3154 the last one. When there are too many, report the first extra
3155 one. This is how diffutils does it.
3157 2002-10-20 Paul Eggert <eggert@twinsun.com>
3159 Remove K&R vestiges.
3160 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
3161 * src/complain.c (VA_START): Remove. Assume prototypes.
3162 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
3163 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
3164 fatal): Assume prototypes.
3165 * src/complain.h: Assume prototypes.
3166 * src/system.h (PARAMS): Remove.
3167 Include <limits.h> unconditionally, since it's guaranteeed even
3168 for a freestanding C89 compiler.
3169 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
3170 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
3172 2002-10-20 Akim Demaille <akim@epita.fr>
3174 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
3175 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
3176 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
3177 (yyresolveStates, yyresolveAction, yyresolveStack)
3178 (yyprocessOneStack): Use them.
3179 (yy_reduce_print): New.
3180 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
3182 2002-10-20 Akim Demaille <akim@epita.fr>
3184 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
3185 arguments and output `void'.
3186 (b4_c_function): Rename as...
3187 (b4_c_function_def): this.
3188 (b4_c_function_decl, b4_c_ansi_function_def)
3189 (b4_c_ansi_function_decl): New.
3190 Change the interpretation of the arguments: before `int, foo', now
3192 * data/yacc.c (yyparse): Prototype and define thanks to these.
3193 Adjust b4_c_function_def uses.
3194 * data/glr.c (yyparse): Likewise, but ANSI only.
3196 2002-10-20 Akim Demaille <akim@epita.fr>
3198 * src/output.c (prepare): Move the definition of `tokens_number',
3199 `nterms_number', `undef_token_number', `user_token_number_max'
3201 (prepare_tokens): Here.
3202 (prepare_tokens): Rename as...
3203 (prepare_symbols): this.
3204 (prepare): Move the definition of `rules_number' to...
3205 (prepare_rules): here.
3206 (prepare): Move the definition of `last', `final_state_number',
3207 `states_number' to...
3208 (prepare_states): here.
3209 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
3211 2002-10-20 Akim Demaille <akim@epita.fr>
3213 * src/tables.h, src/tables.c, src/output.c: Comment changes.
3215 2002-10-20 Akim Demaille <akim@epita.fr>
3217 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
3220 2002-10-20 Akim Demaille <akim@epita.fr>
3222 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
3223 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
3225 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
3227 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
3228 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
3231 2002-10-19 Paul Eggert <eggert@twinsun.com>
3233 Do not create a temporary file, as that involves security and
3234 cleanup headaches. Instead, use a pair of pipes.
3235 Derived from a suggestion by Florian Krohm.
3236 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
3237 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
3238 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
3239 (BISON_PREREQ_SUBPIPE): Add.
3240 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
3241 Add subpipe.h, subpipe.c.
3242 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
3243 * po/POTFILES.in: Add lib/subpipe.c.
3244 * src/output.c: Include "subpipe.h".
3245 (m4_invoke): Remove decl.
3246 (scan_skel): New decl.
3247 (output_skeleton): Use pipe rather than temporary file for m4 input.
3248 Check that m4sugar.m4 is readable, to avoid deadlock.
3249 Check for pipe I/O error.
3250 * src/scan-skel.l (readpipe): Remove decl.
3251 (scan_skel): New function, to be used in place of m4_invoke.
3252 Read from stream rather than file.
3254 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
3255 float, as this generates a warning on Solaris 8 + GCC 3.2 with
3256 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
3257 this generates a more-accurate value anyway.
3259 * lib/timevar.c (timervar_accumulate): Rename locals to
3260 avoid confusion with similarly-named more-global.
3261 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
3263 * src/output.c (prepare): Use xstrdup to convert char const *
3264 to char *, to avoid GCC warning.
3266 2002-10-19 Akim Demaille <akim@epita.fr>
3268 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
3269 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
3270 Use them to have `calc.y' ready for %pure-parser.
3271 * data/yacc.c (YYLEX): Pass a yylex return type to
3274 2002-10-19 Akim Demaille <akim@epita.fr>
3276 Prototype support of %lex-param and %parse-param.
3278 * src/parse-gram.y: Add the definition of the %lex-param and
3279 %parse-param tokens, plus their rules.
3280 Drop the `_' version of %glr-parser.
3282 * src/scan-gram.l (INITIAL): Scan them.
3283 * src/muscle_tab.c: Comment changes.
3284 (muscle_insert, muscle_find): Rename `pair' as `probe'.
3285 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
3286 (muscle_entry_s): The `value' member is no longer const.
3287 Adjust all dependencies.
3288 * src/muscle_tab.c (muscle_init): Adjust: use
3289 MUSCLE_INSERT_STRING.
3290 Initialize the obstack earlier.
3291 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
3292 (muscle_pair_list_grow): New.
3293 * data/c.m4 (b4_c_function_call, b4_c_args): New.
3294 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
3295 * tests/calc.at: Use %locations, not --locations.
3296 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
3298 2002-10-19 Akim Demaille <akim@epita.fr>
3300 * src/getargs.c (usage): Take status as argument and exit
3302 Report the traditional `Try ... --help' message when status != 0.
3303 (usage, version): Don't take a FILE * as arg, it is pointless.
3304 (getargs): When there is an incorrect number of arguments, make it
3305 an error, and report it GNUlically thanks to `usage ()'.
3307 2002-10-18 Paul Eggert <eggert@twinsun.com>
3309 * data/glr.c (yyreportParseError): Don't assume that sprintf
3310 yields the length of the printed string, as this is not true
3311 on SunOS 4.1.4. Reported by Peter Klein.
3313 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
3314 * tests/conflicts.at (%nonassoc and eof): Likewise.
3315 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
3317 2002-10-17 Akim Demaille <akim@epita.fr>
3319 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
3320 * src/getargs.c (trace_types, trace_args): Adjust.
3321 * src/reader.c (grammar_current_rule_prec_set)
3322 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
3323 Standardize error messages.
3325 (reader): Use trace_flag to enable scanner/parser debugging,
3326 instead of an adhoc scheme.
3327 * src/scan-gram.l: Remove trailing debugging code.
3329 2002-10-16 Paul Eggert <eggert@twinsun.com>
3331 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
3334 * NEWS: Officially drop support for building Bison with K&R C,
3335 since it didn't work anyway and it's not worth worrying about.
3336 * Makefile.maint (wget_files): Remove ansi2knr.c.
3337 (ansi2knr.c-url_prefix): Remove.
3338 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
3339 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3340 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3342 2002-10-15 Paul Eggert <eggert@twinsun.com>
3344 Stop using the "enum_" trick for K&R-style function definitions;
3345 it confused me, and I was the author! Instead, assume that people
3346 who want to use K&R C compilers (when using these modules in GCC,
3347 perhaps?) will run ansi2knr.
3349 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
3350 All uses of "enum_" changed to "enum ".
3351 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3352 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3354 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
3355 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
3356 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
3357 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
3358 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
3359 abitset_not, abitset_ones, abitset_or, abitset_or_and,
3360 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
3361 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
3362 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
3363 Use function prototypes; this removes the need for declaring
3364 static functions simply to provide their prototypes.
3365 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
3366 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
3367 bitset_count_, bitset_create, bitset_dump, bitset_first,
3368 bitset_free, bitset_init, bitset_last, bitset_next,
3369 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
3370 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
3371 bitset_print, bitset_release_memory, bitset_toggle_,
3372 bitset_type_choose, bitset_type_get, bitset_type_name_get,
3373 debug_bitset): Likewise.
3374 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
3375 * lib/bitset_stats.c (bitset_log_histogram_print,
3376 bitset_percent_histogram_print, bitset_stats_and,
3377 bitset_stats_and_cmp, bitset_stats_and_or,
3378 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
3379 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
3380 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
3381 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
3382 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
3383 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
3384 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
3385 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
3386 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
3387 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
3388 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
3389 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
3390 bitset_stats_zero): Likewise.
3391 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3392 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3393 bitsetv_dump, debug_bitsetv): Likewise.
3394 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
3395 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
3396 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
3397 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
3398 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
3399 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
3400 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
3401 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
3402 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
3403 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
3404 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
3406 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
3407 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
3408 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
3409 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
3410 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
3411 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
3412 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
3413 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
3414 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
3415 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
3416 lbitset_xor_cmp, lbitset_zero): Likewise.
3418 2002-10-14 Akim Demaille <akim@epita.fr>
3422 2002-10-14 Akim Demaille <akim@epita.fr>
3424 * tests/Makefile.am (maintainer-check-posix): New.
3426 2002-10-14 Akim Demaille <akim@epita.fr>
3428 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
3431 2002-10-14 Akim Demaille <akim@epita.fr>
3433 * src/tables.c (table_ninf_remap): base -> tab.
3434 Reported by Matt Rosing.
3436 2002-10-14 Paul Eggert <eggert@twinsun.com>
3438 * tests/action.at, tests/calc.at, tests/conflicts.at,
3439 tests/cxx-type.at, tests/headers.at, tests/input.at,
3440 tests/regression.at, tests/synclines.at, tests/torture.at:
3441 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
3442 so that the tests still work even if POSIXLY_CORRECT is set.
3443 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
3445 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
3446 for portability to K&R hosts. Fix typo: signed char is guaranteed
3447 only to 127, not to 128.
3448 * data/glr.c (yysigned_char): New type.
3449 * data/yacc.c (yysigned_char): Likewise.
3450 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
3452 2002-10-13 Paul Eggert <eggert@twinsun.com>
3454 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
3455 true due to limited range of data type" warning from GCC.
3457 * data/c.m4 (b4_token_defines): Protect against double-inclusion
3458 by wrapping enum yytokentype's definition inside #ifndef
3459 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
3461 2002-10-13 Akim Demaille <akim@epita.fr>
3463 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
3464 Un yy- yyrhs to avoid the name clash with the global YYRHS.
3466 2002-10-13 Akim Demaille <akim@epita.fr>
3468 * Makefile.maint: Update from Autoconf 2.54.
3469 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
3471 2002-10-13 Akim Demaille <akim@epita.fr>
3473 * src/print.c (print_state): Separate the list of solved conflicts
3474 from the other items.
3475 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
3477 2002-10-13 Akim Demaille <akim@epita.fr>
3479 Let nondeterministic skeletons be usable with deterministic
3482 With the patch, GAWK compiled by GCC without -O2 passes its test
3483 suite using a GLR parser driven by LALR tables. It fails with -O2
3484 because `struct stat' gives two different answers on my machine:
3485 88 (definition of an auto var) and later 96 (memset on this var).
3486 Hence the stack is badly corrumpted. The headers inclusion is to
3487 blame: if I move the awk.h inclusion before GLR's system header
3488 inclusion, the two struct stat have the same size.
3490 * src/tables.c (pack_table): Always create conflict_table.
3491 (token_actions): Always create conflict_list.
3492 * data/glr.c (YYFLAG): Remove, unused.
3494 2002-10-13 Akim Demaille <akim@epita.fr>
3496 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
3498 (VALGRIND, GXX): New.
3499 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
3500 * tests/bison.in: Run $PREBISON a pre-command.
3501 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
3502 (maintainer-check-g++): New.
3503 * Makefile.am (maintainer-check): New.
3505 2002-10-13 Akim Demaille <akim@epita.fr>
3507 * data/glr.c: Formatting changes.
3508 Tweak some trace messages to match yacc.c's.
3510 2002-10-13 Akim Demaille <akim@epita.fr>
3512 GLR parsers sometimes raise parse errors instead of performing the
3514 Reported by Charles-Henry de Boysson.
3516 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
3517 check the length of the traces when %glr.
3518 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
3520 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
3522 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
3523 (yyltype): Remove the yy prefix from the member names.
3524 (yytable): Complete its comment.
3525 (yygetLRActions): Map error action number from YYTABLE from
3527 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
3528 (which was a bug: it should have been YYTABEL_NINF, and yet it was
3529 not satisfying as we could compare an YYACTION computed from
3530 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
3531 only value for error actions.
3532 (yyreportParseError): In verbose parse error messages, don't issue
3533 `error' in the list of expected tokens.
3534 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
3535 next action to perform to match glr.c's decoding.
3536 (yytable): Complete its comment.
3538 2002-10-13 Paul Eggert <eggert@twinsun.com>
3540 Fix problem reported by Henrik Grubbstroem in
3541 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
3542 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
3543 because the Bison parser reads the second action before reducing
3545 * src/scan-gram.l (rule_length): New static var.
3546 Use it to keep track of the rule length in the scanner, since
3547 we can't expect the parser to be in lock-step sync with the scanner.
3548 (handle_action_dollar, handle_action_at): Use this var.
3549 * tests/actions.at (Exotic Dollars): Test for the problem.
3551 2002-10-12 Paul Eggert <eggert@twinsun.com>
3553 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
3554 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
3555 Include <sys/time.h> when checking for clock_t and struct tms.
3556 Use same include order as source.
3557 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
3558 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
3560 * lib/timevar.c: Update copyright date and clarify comments.
3561 (get_time) [IN_GCC]: Keep the GCC version for reference.
3563 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
3564 GCC version as of today, then merge Bison's changes.
3565 Change "GCC" to "Bison" in copyright notice. timevar.def's
3566 author is Akim, so change that too.
3568 * src/reader.c (grammar_current_rule_check):
3569 Don't worry about the default action if $$ is untyped.
3570 Prevents bogus warnings reported by Jim Gifford in
3571 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
3573 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
3574 * data/glr.c, data/lalr1.cc, data/yacc.c:
3575 Output token definitions before the first part of user declarations.
3576 Fixes compatibility problem reported by Jim Gifford for kbd in
3577 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
3579 2002-10-11 Paul Eggert <eggert@twinsun.com>
3581 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
3582 (yyparse): here. This undoes some of the 2002-07-25 change.
3583 Compatibility problem reported by Ralf S. Engelschall with
3584 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
3586 2002-10-11 Akim Demaille <akim@epita.fr>
3588 * tests/regression.at Characters Escapes): New.
3589 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
3591 Reported by Jan Nieuwenhuizen.
3593 2002-10-11 Akim Demaille <akim@epita.fr>
3597 2002-10-10 Paul Eggert <eggert@twinsun.com>
3599 Portability fixes for bitsets; this also avoids several GCC
3602 * lib/abitset.c: Include <stddef.h>, for offsetof.
3603 * lib/lbitset.c: Likewise.
3605 * lib/abitset.c (abitset_bytes): Return a size that is aligned
3606 properly for vectors of objects. Do not assume that adding a
3607 header size to a multiple of a word size yields a value that is
3608 properly aligned for the whole union.
3609 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3611 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3612 unique names for structures.
3613 * lib/ebitset.c (ebitset_bytes): Likewise.
3614 * lib/lbitset.c (lbitset_bytes): Likewise.
3616 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3617 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3618 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3619 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3620 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3621 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3622 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3623 to improve the type-checking that GCC can do.
3624 * lib/bitset.c (bitset_op4_cmp): Likewise.
3625 * lib/bitset_stats.c (bitset_stats_count,
3626 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3627 bitset_stats_copy, bitset_stats_disjoint_p,
3628 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3629 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3630 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3631 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3632 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3633 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3634 bitset_stats_or_and_cmp): Likewise.
3635 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3636 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3637 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3638 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3640 * lib/abitset.h: Include bitset.h, not bbitset.h.
3641 * lib/ebitset.h: Likewise.
3642 * lib/lbitset.h: Likewise.
3644 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3645 All instances of parameters of type enum bitset_opts are now of
3646 type enum_bitset_opts, to conform to the C Standard, and similarly
3647 for enum_bitset_type.
3648 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3649 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3651 Do not use "struct bitset_struct" to mean different things in
3652 different modules. Not only is this confusing, it violates
3653 the C Standard, which requires that structure types in different
3654 modules must be compatible if one is to be passed to the other.
3655 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3656 All instances of "struct bitset_struct *" replaced with "bitset".
3657 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3658 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3659 struct lbitset_struct, struct bitset_stats_struct): New types.
3660 All uses of struct bitset_struct changed to union bitset_union,
3662 * lib/abitset.c (struct abitset_struct, abitset,
3663 struct bitset_struct): Remove.
3664 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3665 struct bitset_struct): Remove.
3666 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3667 bitset_struct): Remove.
3668 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3671 Do not call a function of type T using a call that assumes the
3672 function is of a different type U. Standard C requires that a
3673 function must be called with a type that is compatible with its
3675 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3677 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3679 * lib/ebitset.c (PFV): Remove.
3680 * lib/lbitset.c (PFV): Likewise.
3681 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3682 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3684 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3685 (ebitset_vtable): Use them.
3686 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3687 lbitset_xor): New functions.
3688 (lbitset_vtable): Use them.
3690 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3693 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3695 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
3696 Use offsetof, for simplicity.
3698 2002-10-06 Paul Eggert <eggert@twinsun.com>
3700 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
3701 the same width as int. This reapplies a hunk of the 2002-08-12 patch
3702 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
3703 which was inadvertently undone by the 2002-09-30 patch.
3704 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
3705 the same width as int.
3707 2002-10-04 Paul Eggert <eggert@twinsun.com>
3711 * configure.ac (AC_INIT), NEWS: Increment version number.
3713 * doc/bison.texinfo: Minor spelling, grammar, and white space
3715 (Symbols): Mention that any negative value returned from yylex
3716 signifies end-of-input. Warn about negative chars. Mention
3717 the portable Standard C character set.
3719 The GNU coding standard says CFLAGS and YFLAGS are reserved
3720 for the installer to set.
3721 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
3722 * src/Makefile.am (AM_CFLAGS): Likewise.
3723 (AM_YFLAGS): Renamed from YFLAGS.
3725 Fix some MAX and MIN problems.
3726 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
3727 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
3728 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
3729 * src/reader.c (reader): Use it.
3731 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
3732 POSIX 1003.1-2001 has removed fgrep.
3734 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3736 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
3737 interpreted as signed.
3738 * lib/ebitset.c (ebitset_list): Fix bug.
3740 2002-10-01 Paul Eggert <eggert@twinsun.com>
3742 More fixes for 64-bit hosts and large bitsets.
3744 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
3745 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
3746 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
3747 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
3748 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
3749 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
3750 bitset_count_): Likewise.
3751 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
3752 bitset_first, bitset_last): Likewise.
3753 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
3754 bitset_stats_list_reverse, bitset_stats_size,
3755 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
3757 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3758 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3759 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3760 bitsetv_reflexive_transitive_closure): Likewise.
3761 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
3762 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
3764 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
3767 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
3768 Use size_t, not unsigned int, to count bytes.
3769 * lib/abitset.h (abitset_bytes): Likewise.
3770 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
3772 * lib/bitset.h (bitset_bytes): Likewise.
3773 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
3774 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
3775 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3776 * lib/ebitset.c (ebitset_bytes): Likewise.
3777 * lib/ebitset.h (ebitset_bytes): Likewise.
3778 * lib/lbitset.c (lbitset_bytes): Likewise.
3779 * lib/lbitset.h (lbitset_bytes): Likewise.
3781 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
3782 abitset_subset_p, abitset_disjoint_p, abitset_and,
3783 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
3784 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
3785 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
3786 abitset_or_and, abitset_or_and_cmp):
3787 Use bitset_windex instead of unsigned int.
3788 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3789 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
3790 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
3791 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
3793 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
3795 * lib/bitset.c (bitset_print):
3796 Use proper printf formats for widths of integer types.
3797 * lib/bitset_stats.c (bitset_percent_histogram_print,
3798 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
3799 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3800 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3801 * lib/lbitset.c (lbitset_bytes): Likewise.
3803 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
3804 BITSET_SIZE_MAX): New macros.
3805 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
3806 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
3807 to BITSET_WINDEX_MAX.
3809 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
3810 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
3811 since we now return the bitset_bindex type (not int).
3813 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
3814 when computing sizes.
3815 * lib/ebitset.c (ebitset_elts_grow): Likewise.
3817 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
3818 and avoid cast to unsigned.
3820 2002-09-30 Akim Demaille <akim@epita.fr>
3822 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3823 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
3824 Updates from Michael Hayes.
3826 2002-09-30 Art Haas <ahaas@neosoft.com>
3828 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
3830 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
3833 2002-09-27 Akim Demaille <akim@epita.fr>
3837 2002-09-27 Akim Demaille <akim@epita.fr>
3839 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
3840 (Because of AC_LIBSOURCE).
3842 2002-09-27 Akim Demaille <akim@epita.fr>
3844 Playing with Autoscan.
3846 * configure.ac: Remove the old LIBOBJ tweaks.
3847 (AC_REPLACE_FUNCS): Add strrchr and strtol.
3848 * lib/strrchr.c: New.
3849 * lib/strtol.c: New, from the Coreutils 4.5.1.
3851 2002-09-27 Akim Demaille <akim@epita.fr>
3853 Playing with Autoscan.
3855 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
3856 * lib/Makefile.am (libbison_a_SOURCES): No longer include
3857 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
3858 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
3861 2002-09-24 Akim Demaille <akim@epita.fr>
3863 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
3864 (Frequently Asked Questions, Parser Stack Overflow): New.
3866 2002-09-13 Akim Demaille <akim@epita.fr>
3868 Playing with autoscan.
3870 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
3871 * src/files.c (skeleton_find): Remove, unused.
3872 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
3873 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
3875 2002-09-13 Akim Demaille <akim@epita.fr>
3877 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
3878 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
3880 2002-09-13 Akim Demaille <akim@epita.fr>
3882 * configure.ac: Require 2.54.
3883 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
3884 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
3885 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
3886 Remove, provided by Autoconf macros.
3888 2002-09-12 Akim Demaille <akim@epita.fr>
3890 * m4/prereq.m4: Update, from Coreutils 4.5.1.
3892 2002-09-12 Akim Demaille <akim@epita.fr>
3894 * m4/prereq.m4: Update, from Fileutils 4.1.5.
3895 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
3896 Reported by Martin Mokrejs.
3898 2002-09-10 Akim Demaille <akim@epita.fr>
3900 * src/parse-gram.y: Associate a human readable string to each
3902 * tests/regression.at (Invalid inputs): Adjust.
3904 2002-09-10 Gary V. Vaughan <gary@gnu.org>
3906 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
3907 with an Autoconf-2.5x style configure.ac.
3909 2002-09-06 Paul Eggert <eggert@twinsun.com>
3911 * doc/bison.texinfo (Conditions): Make explicit that the GPL
3912 exception applies only to yacc.c. This is a modification of a
3913 patch originally suggested by Akim Demaille.
3915 2002-09-06 Akim Demaille <akim@epita.fr>
3917 * data/c.m4 (b4_copyright): Move the GPL exception comment from
3919 * data/yacc.c: here.
3921 * data/lalr1.cc (struct yyltype): Don't define it, since we use
3923 (b4_ltype): Default to yy::Location from location.hh.
3925 2002-09-04 Jim Meyering <jim@meyering.net>
3927 * data/yacc.c: Guard the declaration of yytoknum also with
3928 `#ifdef YYPRINT', so it is declared only when used.
3930 2002-09-04 Akim Demaille <akim@epita.fr>
3932 * configure.in: Rename as...
3933 * configure.ac: this.
3936 2002-09-04 Akim Demaille <akim@epita.fr>
3938 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
3939 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
3940 translate maintainer only messages.
3942 2002-08-12 Paul Eggert <eggert@twinsun.com>
3946 * Makefile.am (SUBDIRS): Remove intl.
3947 (DISTCLEANFILES): Remove.
3948 * NEWS: Mention that GNU M4 is now required. Clarify what is
3949 meant by "larger grammars". Mention the pt_BR translation.
3950 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
3951 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
3952 Bump version from 0.11.2 to 0.11.5.
3953 (BISON_PREREQ_STAGE): Remove.
3954 (AM_GNU_GETTEXT): Use external gettext.
3955 (AC_OUTPUT): Remove intl/Makefile.
3957 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
3959 * data/glr.c: Include string.h, for strlen.
3960 (yyreportParseError): Use size_t for yysize.
3961 (yy_yypstack): No longer nested inside yypstates, as nested
3962 functions are not portable. Do not assume size_t is the
3964 (yypstates): Do not assume that ptrdiff_t is the same width
3965 as int, and similarly for yyposn and YYINDEX.
3967 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
3969 * lib/Makefile.am (INCLUDES): Do not include from the intl
3970 directory, which has been removed.
3971 * src/Makefile.am (INCLUDES): Likewise.
3973 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
3974 (bitsets_sources, additional_bitsets_sources, timevars_sources):
3977 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
3978 * tests/Makefile.am (EXTRA_DIST): Likewise.
3980 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
3981 Do not assume that bitset_windex is the same width as unsigned.
3983 * lib/abitset.c (abitset_unused_clear): Do not assume that
3984 bitset_word is the same width as int.
3985 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
3986 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
3987 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
3988 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
3989 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
3991 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
3992 portability to one's complement hosts!).
3993 * lib/ebitset.c (ebitset_op1): Likewise.
3994 * lib/lbitset.c (lbitset_op1): Likewise.
3996 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
3997 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3998 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
3999 Sync with fileutils.
4000 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
4001 lib/gettext.h: Sync with diffutils.
4003 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
4004 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
4006 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
4007 PROTOTYPES to check for prototypes, and "defined __STDC__" to
4010 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
4011 size_t; the old version tried to do this but casted improperly.
4012 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
4013 (bitset_test): Now returns int, not unsigned long.
4015 * lib/bitset_stats.c: Include "gettext.h".
4017 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
4018 name locals "index", as it generates unnecessary warnings on some
4019 hosts that have an "index" function.
4021 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
4022 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
4023 they need translation.
4024 * src/LR0.c (state_list_append, new_itemsets, get_state,
4025 append_states, generate_states): Likewise.
4026 * src/assoc.c (assoc_to_string): Likewise.
4027 * src/closure.c (print_closure, set_firsts, closure): Likewise.
4028 * src/gram.c (grammar_dump): Likewise.
4029 * src/injections.c (injections_compute): Likewise.
4030 * src/lalr.c (lookaheads_print): Likewise.
4031 * src/relation.c (relation_transpose): Likewise.
4032 * src/scan-gram.l: Likewise.
4033 * src/tables.c (table_grow, pack_vector): Likewise.
4035 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
4036 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
4037 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
4038 * m4/mbstate_t.m4: Sync with fileutils.
4039 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
4041 * po/LINGUAS: Add pt_BR.
4042 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
4043 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
4045 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
4047 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
4049 * src/complain.c (strerror_r): Remove decl; not needed.
4050 (strerror): Use same pattern as ../lib/error.c.
4052 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
4054 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
4056 * src/main.c (main): Cast result of bindtextdomain and textdomain
4057 to void, to avoid a GCC warning when --disable-nls is in effect.
4059 * src/scan-gram.l: Use strings rather than escapes when possible,
4060 to minimize the number of warnings from xgettext.
4061 (handle_action_dollar, handle_action_at): Don't use isdigit,
4062 as it mishandles negative chars and it may not work as expected
4063 outside the C locale.
4065 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
4066 this is a GCC extension and is not portable to other compilers.
4068 * src/system.h (alloca): Use same pattern as ../lib/error.c.
4069 Do not include <ctype.h>; no longer needed.
4070 Do not include <malloc.h>; no longer needed (and generates
4071 warnings on OpenBSD 3.0).
4073 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
4076 * tests/regression.at: Do not use 'cc -c input.c -o input';
4077 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
4079 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
4080 exit status as failure, not just exit status 1. Sun C exits
4081 with status 2 sometimes.
4083 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
4084 Use it for the two large tests.
4086 2002-08-02 Akim Demaille <akim@epita.fr>
4088 * src/conflicts.c (conflicts_output): Don't output rules never
4089 reduced here, since anyway that computation doesn't work.
4090 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
4091 (rule_useless_p, rule_never_reduced_p): New.
4092 (grammar_rules_partial_print): Use a filter instead of a range.
4093 Display the title only if needed.
4094 (grammar_rules_print): Adjust.
4095 (grammar_rules_never_reduced_report): New.
4096 * src/tables.c (action_row): Move the computation of rules never
4098 (token_actions): here.
4099 * src/main.c (main): Make the parser before making the report, so
4100 that rules never reduced are computed.
4101 Call grammar_rules_never_reduced_report.
4102 * src/print.c (print_results): Report rules never reduced.
4103 * tests/conflicts.at, tests/reduce.at: Adjust.
4105 2002-08-01 Akim Demaille <akim@epita.fr>
4107 Instead of attaching lookaheads and duplicating the rules being
4108 reduced by a state, attach the lookaheads to the reductions.
4110 * src/state.h (state_t): Remove the `lookaheads',
4111 `lookaheads_rule' member.
4112 (reductions_t): Add a `lookaheads' member.
4113 Use a regular array for the `rules'.
4114 * src/state.c (reductions_new): Initialize the lookaheads member
4116 (state_rule_lookaheads_print): Adjust.
4117 * src/state.h, src/state.c (state_reductions_find): New.
4118 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
4119 (count_rr_conflicts): Adjust.
4120 * src/lalr.c (LArule): Remove.
4121 (add_lookback_edge): Adjust.
4122 (state_lookaheads_count): New.
4123 (states_lookaheads_initialize): Merge into...
4124 (initialize_LA): this.
4125 (lalr_free): Adjust.
4126 * src/main.c (main): Don't free nullable and derives too early: it
4127 is used by --verbose.
4128 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
4130 2002-08-01 Akim Demaille <akim@epita.fr>
4132 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
4134 (set_derives, free_derives): Rename as...
4135 (derives_compute, derives_free): this.
4136 Adjust all dependencies.
4137 * src/nullable.c (set_nullable, free_nullable): Rename as...
4138 (nullable_compute, nullable_free): these.
4139 (rule_list_t): Store rule_t *, not rule_number_t.
4140 * src/state.c (state_rule_lookaheads_print): Directly compare rule
4141 pointers, instead of their numbers.
4142 * src/main.c (main): Call nullable_free, and derives_free earlier,
4143 as they were lo longer used.
4145 2002-08-01 Akim Demaille <akim@epita.fr>
4147 * lib/timevar.c (get_time): Include children time.
4148 * src/lalr.h (LA, LArule): Don't export them: used with the
4150 * src/lalr.c (LA, LArule): Static.
4151 * src/lalr.h, src/lalr.c (lalr_free): New.
4152 * src/main.c (main): Call it.
4153 * src/tables.c (pack_vector): Check whether loc is >= to the
4155 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
4156 (tables_generate): do it, since that's also it which allocates
4158 Don't free LA and LArule, main does.
4160 2002-07-31 Akim Demaille <akim@epita.fr>
4162 Separate parser tables computation and output.
4164 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
4165 (conflict_list, conflict_list_cnt, table, check, table_ninf)
4166 (yydefgoto, yydefact, high): Move to...
4167 * src/tables.h, src/tables.c: here.
4168 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4169 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4170 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
4171 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
4172 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
4173 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
4174 (action_row, save_row, token_actions, save_column, default_goto)
4175 (goto_actions, sort_actions, matching_state, pack_vector)
4176 (table_ninf_remap, pack_table, prepare_actions): Move to...
4177 * src/tables.c: here.
4178 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
4179 * src/output.c (token_actions, output_base, output_conflicts)
4180 (output_check): Merge into...
4181 (prepare_actions): this.
4182 (actions_output): Rename as...
4183 (user_actions_output): this.
4184 * src/main.c (main): Call tables_generate and tables_free.
4186 2002-07-31 Akim Demaille <akim@epita.fr>
4188 Steal GCC's --time-report support.
4190 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
4191 stolen/adjusted from GCC.
4192 * m4/stage.m4: Remove time related checks.
4193 * m4/timevar.m4: New.
4194 * configure.in: Adjust.
4195 * src/system.h: Adjust to using timevar.h.
4196 * src/getargs.h, src/getargs.c: Support trace_time for
4198 * src/main.c (stage): Remove.
4199 (main): Replace `stage' invocations with timevar calls.
4200 * src/output.c: Insert pertinent timevar calls.
4202 2002-07-31 Akim Demaille <akim@epita.fr>
4204 Let --trace have arguments.
4206 * src/getargs.h (enum trace_e): New.
4207 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
4208 (long_options, short_options): --trace/-T takes an optional
4210 Change all the uses of trace_flag to reflect the new flags.
4211 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
4213 Strengthen `stage' portability.
4215 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
4216 * configure.in: Use it.
4217 Don't check for malloc.h and sys/times.h.
4218 * src/system.h: Include them when appropriate.
4219 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
4220 times and struct tms are available.
4222 2002-07-30 Akim Demaille <akim@epita.fr>
4224 In verbose parse error message, don't report `error' as an
4226 * tests/actions.at (Printers and Destructors): Adjust.
4227 * tests/calc.at (Calculator $1): Adjust.
4228 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
4229 error message, do not report the parser accepts the error token in
4232 2002-07-30 Akim Demaille <akim@epita.fr>
4234 Normalize conflict related messages.
4236 * src/complain.h, src/complain.c (warn, complain): New.
4237 * src/conflicts.c (conflicts_print): Use them.
4238 (conflict_report_yacc): New, extracted from...
4239 (conflicts_print): here.
4240 * tests/conflicts.at, tests/existing.at: Adjust.
4242 2002-07-30 Akim Demaille <akim@epita.fr>
4244 Report rules which are never reduced by the parser: those hidden
4247 * src/LR0.c (save_reductions): Don't make the final state too
4248 different: save its reduction (accept) instead of having a state
4249 without any action (no shift or goto, no reduce).
4250 Note: the final state is now a ``regular'' state, i.e., the
4251 parsers now contain `reduce 0' as default reduction.
4252 Nevertheless, since they decide to `accept' when yystate =
4253 final_state, they still will not reduce rule 0.
4254 * src/print.c (print_actions, print_reduction): Adjust.
4255 * src/output.c (action_row): Track reduced rules.
4256 (token_actions): Report rules never reduced.
4257 * tests/conflicts.at, tests/regression.at: Adjust.
4259 2002-07-30 Akim Demaille <akim@epita.fr>
4261 `stage' was accidently included in a previous patch.
4262 Initiate its autoconfiscation.
4264 * configure.in: Look for malloc.h and sys/times.h.
4265 * src/main.c (stage): Adjust.
4266 Report only when trace_flag.
4268 2002-07-29 Akim Demaille <akim@epita.fr>
4270 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
4272 (errs_t): symbol_t*, not symbol_number_t.
4273 (reductions_t): rule_t*, not rule_number_t.
4274 (FOR_EACH_SHIFT): New.
4275 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
4276 * src/print.c, src/print_graph.c: Adjust.
4278 2002-07-29 Akim Demaille <akim@epita.fr>
4280 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
4282 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
4283 (endtoken, accept): these.
4284 * src/reader.c (reader): Set endtoken's default tag to "$end".
4285 Set undeftoken's tag to "$undefined" instead of "$undefined.".
4286 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
4289 2002-07-29 Akim Demaille <akim@epita.fr>
4291 * src/reduce.c (reduce_grammar): When the language is empty,
4292 complain about the start symbol, not the axiom.
4294 * tests/reduce.at (Empty Language): New.
4296 2002-07-26 Akim Demaille <akim@epita.fr>
4298 * src/reader.h, src/reader.c (gram_error): ... can't get
4299 yycontrol without making too strong assumptions on the parser
4301 * src/output.c (prepare_tokens): Use the real 0th value of
4302 token_translations instead of `0'.
4303 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
4305 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
4306 for the time being: %locations ought to provide it to yyerror.
4308 2002-07-25 Akim Demaille <akim@epita.fr>
4310 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
4311 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
4312 * tests/regression.at (Web2c Actions): Adjust.
4314 2002-07-25 Akim Demaille <akim@epita.fr>
4316 Stop storing rules from 1 to nrules + 1.
4318 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
4319 * src/nullable.c, src/output.c, src/print.c, src/reader.c
4320 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
4321 Iterate from 0 to nrules.
4322 Use rule_number_as_item_number and item_number_as_rule_number.
4323 Adjust to `derive' now containing possibly 0.
4324 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
4325 Handle the `- 1' part in rule numbers from/to item numbers.
4326 * src/conflicts.c (log_resolution): Fix the message which reversed
4328 * src/output.c (action_row): Initialize default_rule to -1.
4329 (token_actions): Adjust.
4330 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
4332 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
4334 2002-07-25 Akim Demaille <akim@epita.fr>
4336 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
4337 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
4338 (b4_c_knr_arg_decl): New.
4339 * data/yacc.c: Use it to define yysymprint, yydestruct, and
4340 yyreport_parse_error.
4342 2002-07-25 Akim Demaille <akim@epita.fr>
4344 * data/yacc.c (yyreport_parse_error): New, extracted from...
4346 (yydestruct, yysymprint): Move above yyparse.
4349 2002-07-25 Akim Demaille <akim@epita.fr>
4351 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
4353 (b4_sint_type, b4_uint_type): these.
4354 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
4355 * tests/regression.at (Web2c Actions): Adjust.
4357 2002-07-25 Akim Demaille <akim@epita.fr>
4359 * src/gram.h (TIEM_NUMBER_MAX): New.
4360 (item_number_of_rule_number, rule_number_of_item_number): Rename
4362 (rule_number_as_item_number, item_number_as_rule_number): these.
4363 Adjust dependencies.
4364 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4365 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4366 (symbol_number_to_vector_number): New.
4367 (order): Of vector_number_t* type.
4368 (base_t, BASE_MAX, BASE_MIN): New.
4369 (froms, tos, width, pos, check): Of base_t type.
4370 (action_number_t, ACTION_MIN, ACTION_MAX): New.
4371 (actrow): Of action_number_t type.
4372 (conflrow): Of unsigned int type.
4373 (table_ninf, base_ninf): New.
4374 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
4375 (muscle_insert_int_table, muscle_insert_base_table)
4376 (muscle_insert_rule_number_table): New.
4377 (prepare_tokens): Output `toknum' as int_table.
4378 (action_row): Returns a rule_number_t.
4379 Use ACTION_MIN, not SHRT_MIN.
4380 (token_actions): yydefact is rule_number_t*.
4381 (table_ninf_remap): New.
4382 (pack_table): Use it for `base' and `table'.
4383 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
4385 (YYPACT_NINF, YYTABLE_NINF): these.
4386 (yypact, yytable): Compute their types instead of hard-coded
4388 * tests/regression.at (Web2c Actions): Adjust.
4390 2002-07-19 Akim Demaille <akim@epita.fr>
4392 * src/scan-gram.l (id): Can start with an underscore.
4394 2002-07-16 Akim Demaille <akim@epita.fr>
4396 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
4397 Adjust all former `associativity' dependencies.
4398 * src/symtab.c (symbol_new): Default associativity is `undef', not
4400 (symbol_check_alias_consistence): Adjust.
4402 2002-07-09 Akim Demaille <akim@epita.fr>
4404 * doc/bison.texinfo: Properly set the ``header'' part.
4405 Use @dircategory ``GNU programming tools'' as per Texinfo's
4409 2002-07-09 Akim Demaille <akim@epita.fr>
4411 * lib/quotearg.h: Protect against multiple inclusions.
4412 * src/location.h (location_t): Add a `file' member.
4413 (LOCATION_RESET, LOCATION_PRINT): Adjust.
4414 * src/complain.c (warn_at, complain_at, fatal_at): Drop
4415 `error_one_per_line' support.
4417 2002-07-09 Akim Demaille <akim@epita.fr>
4419 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
4420 * src/reader.c (lineno): Remove.
4421 Adjust all dependencies.
4422 (get_merge_function): Take a location and use complain_at.
4423 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
4424 * tests/regression.at (Invalid inputs, Mixing %token styles):
4427 2002-07-09 Akim Demaille <akim@epita.fr>
4429 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
4430 recovery rule, and forbid extensions when --yacc.
4431 (gram_error): Use complain_at.
4432 * src/reader.c (reader): Exit if there were parse errors.
4434 2002-07-09 Akim Demaille <akim@epita.fr>
4436 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
4437 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
4438 Reported by R Blake <blakers@mac.com>.
4440 2002-07-09 Akim Demaille <akim@epita.fr>
4442 * data/yacc.c: Output the copyright notive in the header.
4444 2002-07-03 Akim Demaille <akim@epita.fr>
4446 * src/output.c (froms, tos): Are state_number_t.
4447 (save_column): sp, sp1, and sp2 are state_number_t.
4448 (prepare): Rename `final' as `final_state_number', `nnts' as
4449 `nterms_number', `nrules' as `rules_number', `nstates' as
4450 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
4452 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
4453 * data/lalr1.cc (nsym_): Remove, unused.
4455 2002-07-03 Akim Demaille <akim@epita.fr>
4457 * src/lalr.h, src/lalr.c (goto_number_t): New.
4458 * src/lalr.c (goto_list_t): New.
4460 * src/nullable.c (rule_list_t): New.
4462 * src/types.h: Remove.
4464 2002-07-03 Akim Demaille <akim@epita.fr>
4466 * src/closure.c (print_fderives): Use rule_rhs_print.
4467 * src/derives.c (print_derives): Use rule_rhs_print.
4468 (rule_list_t): New, replaces `shorts'.
4469 (set_derives): Add comments.
4470 * tests/sets.at (Nullable, Firsts): Adjust.
4472 2002-07-03 Akim Demaille <akim@epita.fr>
4474 * src/output.c (prepare_actions): Free `tally' and `width'.
4475 (prepare_actions): Allocate and free `order'.
4476 * src/symtab.c (symbols_free): Free `symbols'.
4477 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
4478 * src/output.c (m4_invoke): Move to...
4479 * src/scan-skel.l: here.
4480 (<<EOF>>): Close yyout, and free its name.
4482 2002-07-03 Akim Demaille <akim@epita.fr>
4484 Fix some memory leaks, and fix a bug: state 0 was examined twice.
4486 * src/LR0.c (new_state): Merge into...
4487 (state_list_append): this.
4488 (new_states): Merge into...
4489 (generate_states): here.
4490 (set_states): Don't ensure a proper `errs' state member here, do it...
4491 * src/conflicts.c (conflicts_solve): here.
4492 * src/state.h, src/state.c: Comment changes.
4493 (state_t): Rename member `shifts' as `transitions'.
4494 Adjust all dependencies.
4495 (errs_new): For consistency, also take the values as argument.
4497 (state_errs_set): New.
4498 (state_reductions_set, state_transitions_set): Assert that no
4499 previous value was assigned.
4501 (states_free): Use it.
4502 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
4503 temporary storage: use `errs' and `nerrs' as elsewhere.
4504 (set_conflicts): Allocate and free this `errs'.
4506 2002-07-02 Akim Demaille <akim@epita.fr>
4508 * lib/libiberty.h: New.
4509 * lib: Update the bitset implementation from upstream.
4510 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
4511 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
4512 * src/main.c: Adjust bitset stats calls.
4514 2002-07-01 Paul Eggert <eggert@twinsun.com>
4516 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
4517 char, so that negative chars don't collide with $.
4519 2002-06-30 Akim Demaille <akim@epita.fr>
4521 Have the GLR tests be `warning' checked, and fix the warnings.
4523 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
4524 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
4525 (yyremoveDeletes): `yyi' and `yyj' are size_t.
4526 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
4527 (yyaddDeferredAction): static.
4528 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
4529 (yyreportParseError): yyprefix is const.
4530 yytokenp is used only when verbose.
4531 (yy__GNUC__): Replace with __GNUC__.
4532 (yypdumpstack): yyi is size_t.
4533 (yypreference): Un-yy local variables and arguments, to avoid
4534 clashes with `yyr1'. Anyway, we are not in the user name space.
4535 (yytname_size): be an int, as is compared with ints.
4536 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
4538 * tests/cxx-gram.at: Use quotation to protect $1.
4539 Use AT_COMPILE to enable warnings hunts.
4540 Prototype yylex and yyerror.
4542 Include `string.h', not `strings.h'.
4543 Produce and prototype stmtMerge only when used.
4544 yylex takes a location.
4546 2002-06-30 Akim Demaille <akim@epita.fr>
4548 We spend a lot of time in quotearg, in particular when --verbose.
4550 * src/symtab.c (symbol_get): Store a quoted version of the key.
4551 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
4554 2002-06-30 Akim Demaille <akim@epita.fr>
4556 * src/state.h (reductions_t): Rename member `nreds' as num.
4557 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
4558 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
4560 2002-06-30 Akim Demaille <akim@epita.fr>
4562 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
4563 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
4564 (shifts_to): Rename as...
4565 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
4566 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
4567 (TRANSITION_IS_DISABLED, transitions_to): these.
4569 2002-06-30 Akim Demaille <akim@epita.fr>
4571 * src/print.c (print_shifts, print_gotos): Merge into...
4572 (print_transitions): this.
4573 (print_transitions, print_errs, print_reductions): Align the
4575 (print_core, print_transitions, print_errs, print_state,
4576 print_grammar): Output empty lines separator before, not after.
4577 (state_default_rule_compute): Rename as...
4578 (state_default_rule): this.
4579 * tests/conflicts.at (Defaulted Conflicted Reduction),
4580 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
4581 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
4583 2002-06-30 Akim Demaille <akim@epita.fr>
4585 Display items as we display rules.
4587 * src/gram.h, src/gram.c (rule_lhs_print): New.
4588 * src/gram.c (grammar_rules_partial_print): Use it.
4589 * src/print.c (print_core): Likewise.
4590 * tests/conflicts.at (Defaulted Conflicted Reduction),
4591 (Unresolved SR Conflicts): Adjust.
4592 (Unresolved SR Conflicts): Adjust and rename as...
4593 (Resolved SR Conflicts): this, as was meant.
4594 * tests/regression.at (Web2c Report): Adjust.
4596 2002-06-30 Akim Demaille <akim@epita.fr>
4598 * src/print.c (state_default_rule_compute): New, extracted from...
4599 (print_reductions): here.
4600 Pessimize, but clarify the code.
4601 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
4603 2002-06-30 Akim Demaille <akim@epita.fr>
4605 * src/output.c (action_row): Let default_rule be always a rule
4608 2002-06-30 Akim Demaille <akim@epita.fr>
4610 * src/closure.c (print_firsts, print_fderives, closure):
4612 * src/lalr.c (lookaheads_print): Likewise.
4613 * src/state.c (state_rule_lookaheads_print): Likewise.
4614 * src/print_graph.c (print_core): Likewise.
4615 * src/print.c (print_reductions): Likewise.
4616 * src/output.c (action_row): Likewise.
4617 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4619 2002-06-30 Akim Demaille <akim@epita.fr>
4621 * src/print_graph.c: Use report_flag.
4623 2002-06-30 Akim Demaille <akim@epita.fr>
4625 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4627 * src/relation.h, src/relation.c (traverse, relation_digraph)
4628 (relation_print, relation_transpose): New.
4630 2002-06-30 Akim Demaille <akim@epita.fr>
4632 * src/state.h, src/state.c (shifts_to): New.
4633 * src/lalr.c (build_relations): Use it.
4635 2002-06-30 Akim Demaille <akim@epita.fr>
4637 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4638 (item_number_of_rule_number, rule_number_of_item_number): New.
4639 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4640 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4641 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4642 Propagate their use.
4643 Much remains to be done, in particular wrt `shorts' from types.h.
4645 2002-06-30 Akim Demaille <akim@epita.fr>
4647 * src/symtab.c (symbol_new): Initialize the `printer' member.
4649 2002-06-30 Akim Demaille <akim@epita.fr>
4651 * src/LR0.c (save_reductions): Remove, replaced by...
4652 * src/state.h, src/state.c (state_reductions_set): New.
4653 (reductions, errs): Rename as...
4654 (reductions_t, errs_t): these.
4655 Adjust all dependencies.
4657 2002-06-30 Akim Demaille <akim@epita.fr>
4659 * src/LR0.c (state_list_t, state_list_append): New.
4660 (first_state, last_state): Now symbol_list_t.
4661 (this_state): Remove.
4662 (new_itemsets, append_states, save_reductions): Take a state_t as
4664 (set_states, generate_states): Adjust.
4665 (save_shifts): Remove, replaced by...
4666 * src/state.h, src/state.c (state_shifts_set): New.
4667 (shifts): Rename as...
4669 Adjust all dependencies.
4670 * src/state.h (state_t): Remove the `next' member.
4672 2002-06-30 Akim Demaille <akim@epita.fr>
4674 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4677 2002-06-30 Akim Demaille <akim@epita.fr>
4679 Use hash.h for the state hash table.
4681 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4682 (allocate_storage): Use state_hash_new.
4683 (free_storage): Use state_hash_free.
4684 (new_state, get_state): Adjust.
4685 * src/lalr.h, src/lalr.c (states): Move to...
4686 * src/states.h (state_t): Remove the `link' member, no longer
4688 * src/states.h, src/states.c: here.
4689 (state_hash_new, state_hash_free, state_hash_lookup)
4690 (state_hash_insert, states_free): New.
4691 * src/states.c (state_table, state_compare, state_hash): New.
4692 * src/output.c (output_actions): Do not free states now, since we
4693 still need to know the final_state number in `prepare', called
4694 afterwards. Do it...
4695 * src/main.c (main): here: call states_free after `output'.
4697 2002-06-30 Akim Demaille <akim@epita.fr>
4699 * src/state.h, src/state.c (state_new): New, extracted from...
4700 * src/LR0.c (new_state): here.
4701 * src/state.h (STATE_ALLOC): Move to...
4702 * src/state.c: here.
4703 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
4704 * src/state.h, src/state.c: here.
4706 2002-06-30 Akim Demaille <akim@epita.fr>
4708 * src/reader.c (gensym): Rename as...
4709 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
4710 (getsym): Rename as...
4713 2002-06-30 Akim Demaille <akim@epita.fr>
4715 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
4716 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
4717 * src/output.c, src/print.c, src/print_graph.c: Propagate.
4718 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
4720 2002-06-30 Akim Demaille <akim@epita.fr>
4722 Make the test suite pass with warnings checked.
4724 * tests/actions.at (Printers and Destructors): Improve.
4725 Avoid unsigned vs. signed issues.
4726 * tests/calc.at: Don't exercise the scanner here, do it...
4727 * tests/input.at (Torturing the Scanner): here.
4729 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4731 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
4732 reorganize first lines parallel to yacc.c.
4734 2002-06-28 Akim Demaille <akim@epita.fr>
4736 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
4737 (b4_token_enum, b4_token_defines): New, factored from...
4738 * data/lalr1.cc, data/yacc.c, glr.c: here.
4740 2002-06-28 Akim Demaille <akim@epita.fr>
4742 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
4744 * src/output.c (merger_output): static.
4746 2002-06-28 Akim Demaille <akim@epita.fr>
4748 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
4749 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
4751 * src/output.c (save_row): Initialize all the variables to pacify GCC.
4753 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4755 Accumulated changelog for new GLR parsing features.
4757 * src/conflicts.c (count_total_conflicts): Change name to
4758 conflicts_total_count.
4759 * src/conflicts.h: Ditto.
4760 * src/output.c (token_actions): Use the new name.
4761 (output_conflicts): Change conflp => conflict_list_heads, and
4762 confl => conflict_list for better readability.
4763 * data/glr.c: Use the new names.
4764 * NEWS: Add self to GLR announcement.
4766 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
4768 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
4771 * data/bison.glr: Change name to glr.c
4772 * data/glr.c: Renamed from bison.glr.
4773 * data/Makefile.am: Add glr.c
4777 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
4778 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
4780 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4782 * data/bison.glr: Be sure to restore the
4783 current #line when returning to the skeleton contents after having
4784 exposed the input file's #line.
4786 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4788 * data/bison.glr: Bring up to date with changes to bison.simple.
4790 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4792 * data/bison.glr: Correct definitions that use b4_prefix.
4793 Various reformatting.
4794 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
4795 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
4796 yytokenp argument; now part of stack.
4797 (yychar): Define to behave as documented.
4800 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4802 * src/reader.h: Add declaration for free_merger_functions.
4804 * src/reader.c (merge_functions): New variable.
4805 (get_merge_function): New function.
4806 (free_merger_functions): New function.
4807 (readgram): Check for %prec that is not followed by a symbol.
4808 Handle %dprec and %merge declarations.
4809 (packgram): Initialize dprec and merger fields in rules array.
4811 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
4812 conflict_list_cnt, conflict_list_free): New variables.
4813 (table_grow): Also grow conflict_table.
4814 (prepare_rules): Output dprec and merger tables.
4815 (conflict_row): New function.
4816 (action_row): Output conflict lists for GLR parser. Don't use
4817 default reduction in conflicted states for GLR parser so that there
4818 are spaces for the conflict lists.
4819 (save_row): Also save conflict information.
4820 (token_actions): Allocate conflict list.
4821 (merger_output): New function.
4822 (pack_vector): Pack conflict table, too.
4823 (output_conflicts): New function to output yyconflp and yyconfl.
4824 (output_check): Allocate conflict_tos.
4825 (output_actions): Output conflict tables, also.
4826 (output_skeleton): Output b4_mergers definition.
4827 (prepare): Output b4_max_rhs_length definition.
4828 Use 'bison.glr' as default skeleton for GLR parsers.
4830 * src/gram.c (glr_parser): New flag.
4831 (grammar_free): Call free_merger_functions.
4833 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
4834 all pairs of conflicting reductions, rather than just all tokens
4835 causing conflicts. Needed to size conflict tables.
4836 (conflicts_output): Modify call to count_rr_conflicts for new
4838 (conflicts_print): Ditto.
4839 (count_total_conflicts): New function.
4841 * src/reader.h (merger_list): New type.
4842 (merge_functions): New variable.
4844 * src/lex.h (tok_dprec, tok_merge): New token types.
4846 * src/gram.h (rule_s): Add dprec and merger fields.
4847 (glr_parser): New flag.
4849 * src/conflicts.h (count_total_conflicts): New function.
4851 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
4853 * doc/bison.texinfo (Generalized LR Parsing): New section.
4854 (GLR Parsers): New section.
4855 (Language and Grammar): Mention GLR parsing.
4856 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
4857 Correct typo ("tge" -> "the").
4859 * data/bison.glr: New skeleton for GLR parsing.
4861 * tests/cxx-gram.at: New tests for GLR parsing.
4863 * tests/testsuite.at: Include cxx-gram.at.
4865 * tests/Makefile.am: Add cxx-gram.at.
4869 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
4871 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
4873 2002-06-27 Akim Demaille <akim@epita.fr>
4875 * src/options.h, src/options.c: Remove.
4876 * src/getargs.c (short_options, long_options): New.
4878 2002-06-27 Akim Demaille <akim@epita.fr>
4880 * data/bison.simple, data/bison.c++: Rename as...
4881 * data/yacc.c, data/lalr1.cc: these.
4882 * doc/bison.texinfo (Environment Variables): Remove.
4884 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
4886 * src/getargs.c (report_argmatch): Initialize strtok().
4888 2002-06-20 Akim Demaille <akim@epita.fr>
4890 * data/bison.simple (b4_symbol_actions): New, replaces...
4891 (b4_symbol_destructor, b4_symbol_printer): these.
4892 (yysymprint): Be sure to call YYPRINT only for tokens, and using
4895 2002-06-20 Akim Demaille <akim@epita.fr>
4897 * data/bison.simple (yydestructor): Rename as...
4900 2002-06-20 Akim Demaille <akim@epita.fr>
4902 * src/symtab.h, src/symtab.c (symbol_type_set)
4903 (symbol_destructor_set, symbol_precedence_set): The location is
4907 2002-06-20 Akim Demaille <akim@epita.fr>
4909 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
4911 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
4913 * src/symtab.h, src/symtab.c (symbol_class_set)
4914 (symbol_user_token_number_set): Likewise.
4916 Promote complain_at.
4917 * tests/input.at (Type Clashes): Adjust.
4919 2002-06-20 Akim Demaille <akim@epita.fr>
4921 * data/bison.simple (YYLEX): Fix the declaration when
4924 2002-06-20 Akim Demaille <akim@epita.fr>
4926 * data/bison.simple (yysymprint): Don't print the token number,
4928 * tests/actions.at (Destructors): Rename as...
4929 (Printers and Destructors): this.
4930 Also exercise %printer.
4932 2002-06-20 Akim Demaille <akim@epita.fr>
4934 * data/bison.simple (YYDSYMPRINT): New.
4935 Use it to remove many of the #if YYDEBUG/if (yydebug).
4937 2002-06-20 Akim Demaille <akim@epita.fr>
4939 * src/symtab.h, src/symtab.c (symbol_t): printer and
4940 printer_location are new members.
4941 (symbol_printer_set): New.
4942 * src/parse-gram.y (PERCENT_PRINTER): New token.
4943 Handle its associated rule.
4944 * src/scan-gram.l: Adjust.
4945 (handle_destructor_at, handle_destructor_dollar): Rename as...
4946 (handle_symbol_code_at, handle_symbol_code_dollar): these.
4947 * src/output.c (symbol_printers_output): New.
4948 (output_skeleton): Call it.
4949 * data/bison.simple (yysymprint): New. Cannot be named yyprint
4950 since there are already many grammar files with a user `yyprint'.
4951 Replace the calls to YYPRINT to calls to yysymprint.
4952 * tests/calc.at: Adjust.
4953 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
4954 taking advantage of parser very internal details (stack size!).
4956 2002-06-20 Akim Demaille <akim@epita.fr>
4958 * src/scan-gram.l: Complete the scanner with the missing patterns
4960 Use `quote' and `symbol_tag_get' where appropriate.
4962 2002-06-19 Akim Demaille <akim@epita.fr>
4964 * tests/actions.at (Destructors): Augment to test locations.
4965 * data/bison.simple (yydestructor): Pass it the current location
4966 if locations are enabled.
4967 Prototype only when __STDC__ or C++.
4968 Change the argument names to move into the yy name space: there is
4971 2002-06-19 Akim Demaille <akim@epita.fr>
4973 * data/bison.simple (b4_pure_if): New.
4974 Use it instead of #ifdef YYPURE.
4976 2002-06-19 Akim Demaille <akim@epita.fr>
4978 * data/bison.simple (b4_location_if): New.
4979 Use it instead of #ifdef YYLSP_NEEDED.
4981 2002-06-19 Akim Demaille <akim@epita.fr>
4983 Prepare @$ in %destructor, but currently don't bind it in the
4984 skeleton, as %location use is not cleaned up yet.
4986 * src/scan-gram.l (handle_dollar, handle_destructor_at)
4987 (handle_action_at): New.
4988 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
4989 a braced_code_t and a location as additional arguments.
4990 (handle_destructor_dollar): Instead of requiring `b4_eval', just
4991 unquote one when outputting `b4_dollar_dollar'.
4993 * data/bison.simple (b4_eval): Remove.
4994 (b4_symbol_destructor): Adjust.
4995 * tests/input.at (Invalid @n): Adjust.
4997 2002-06-19 Zack Weinberg <zack@codesourcery.com>
4999 * doc/bison.texinfo: Document ability to have multiple
5002 2002-06-18 Akim Demaille <akim@epita.fr>
5004 * src/files.c (compute_base_names): When computing the output file
5005 names from the input file name, strip the directory part.
5007 2002-06-18 Akim Demaille <akim@epita.fr>
5009 * data/bison.simple.new: Comment changes.
5010 Reported by Andreas Schwab.
5012 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
5014 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
5015 there are no `label `yyoverflowlab' defined but not used' warnings
5016 when yyoverflow is defined.
5018 2002-06-18 Akim Demaille <akim@epita.fr>
5020 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
5022 (symbol_destructor_set): Adjust.
5023 * src/output.c (symbol_destructors_output): Output the destructor
5025 Output the symbol name.
5026 * data/bison.simple (b4_symbol_destructor): Adjust.
5028 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
5029 and Akim Demaille <akim@epita.fr>
5031 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
5032 what's left on the stack when the error recovery hits EOF.
5033 * tests/actions.at (Destructors): Complete to exercise this case.
5035 2002-06-17 Akim Demaille <akim@epita.fr>
5037 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
5038 arguments is really empty, not only equal to `[]'.
5039 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
5041 (symbol_destructor_set): New.
5042 * src/output.c (symbol_destructors_output): New.
5043 * src/reader.h (brace_code_t, current_braced_code): New.
5044 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
5045 (handle_dollar): Rename as...
5046 (handle_action_dollar): this.
5047 (handle_destructor_dollar): New.
5048 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
5049 (grammar_declaration): Use it.
5050 * data/bison.simple (yystos): Is always defined.
5051 (yydestructor): New.
5052 * tests/actions.at (Destructors): New.
5053 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
5055 2002-06-17 Akim Demaille <akim@epita.fr>
5057 * src/symlist.h, src/symlist.c (symbol_list_length): New.
5058 * src/scan-gram.l (handle_dollar, handle_at): Compute the
5059 rule_length only when needed.
5060 * src/output.c (actions_output, token_definitions_output): Output
5062 * src/symtab.c: Don't access directly to the symbol tag, use
5064 * src/parse-gram.y: Use symbol_list_free.
5066 2002-06-17 Akim Demaille <akim@epita.fr>
5068 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
5069 (symbol_list_prepend, get_type_name): Move to...
5070 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
5071 (symbol_list_prepend, symbol_list_n_type_name_get): here.
5073 (symbol_list_free): New.
5074 * src/scan-gram.l (handle_dollar): Takes a location.
5075 * tests/input.at (Invalid $n): Adjust.
5077 2002-06-17 Akim Demaille <akim@epita.fr>
5079 * src/reader.h, src/reader.c (symbol_list_new): Export it.
5080 (symbol_list_prepend): New.
5081 * src/parse-gram.y (%union): `list' is a new member.
5082 (symbols.1): New, replaces...
5083 (terms_to_prec.1, nterms_to_type.1): these.
5084 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
5085 Take a location as additional argument.
5088 2002-06-15 Akim Demaille <akim@epita.fr>
5090 * src/parse-gram.y: Move %token in the declaration section so that
5091 we don't depend upon CVS Bison.
5093 2002-06-15 Akim Demaille <akim@epita.fr>
5095 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
5096 * src/print.c (print_core): Use it.
5098 2002-06-15 Akim Demaille <akim@epita.fr>
5100 * src/conflicts.c (log_resolution): Accept the rule involved in
5101 the sr conflicts instead of the lookahead number that points to
5103 (flush_reduce): Accept the current lookahead vector as argument,
5104 instead of the index in LA.
5105 (resolve_sr_conflict): Accept the current number of lookahead
5106 bitset to consider for the STATE, instead of the index in LA.
5107 (set_conflicts): Adjust.
5108 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
5110 2002-06-15 Akim Demaille <akim@epita.fr>
5112 * src/state.h (state_t): Replace the `lookaheadsp' member, a
5113 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
5114 Adjust all dependencies.
5115 * src/lalr.c (initialize_lookaheads): Split into...
5116 (states_lookaheads_count, states_lookaheads_initialize): these.
5119 2002-06-15 Akim Demaille <akim@epita.fr>
5121 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
5123 (grammar_rules_print): here.
5124 * src/reduce.c (reduce_output): Use it.
5125 * tests/reduce.at (Useless Rules, Reduced Automaton)
5126 (Underivable Rules): Adjust.
5128 2002-06-15 Akim Demaille <akim@epita.fr>
5130 Copy BYacc's nice way to report the grammar.
5132 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
5134 Don't print the rules' location, it is confusing and useless.
5135 (rule_print): Use grammar_rhs_print.
5136 * src/print.c (print_grammar): Use grammar_rules_print.
5138 2002-06-15 Akim Demaille <akim@epita.fr>
5140 Complete and rationalize `useless thing' warnings.
5142 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
5143 (symbol_tag_print): New.
5144 Use them everywhere in place of accessing directly the tag member.
5145 * src/gram.h, src/gram.c (rule_print): New.
5146 Use it where a rule used to be printed `by hand'.
5147 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
5148 (reduce_grammar_tables): Report the useless rules.
5149 (reduce_print): Useless things are a warning, not an error.
5151 * tests/reduce.at (Useless Nonterminals, Useless Rules):
5152 (Reduced Automaton, Underivable Rules): Adjust.
5153 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
5154 * tests/conflicts.at (Unresolved SR Conflicts)
5155 (Solved SR Conflicts): Adjust.
5157 2002-06-15 Akim Demaille <akim@epita.fr>
5159 Let symbols have a location.
5161 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
5164 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
5165 Use location_t, not int.
5166 * src/symtab.c (symbol_check_defined): Take advantage of the
5168 * tests/regression.at (Invalid inputs): Adjust.
5170 2002-06-15 Akim Demaille <akim@epita.fr>
5172 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
5173 (input): Don't try to initialize yylloc here, do it in the
5175 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
5176 * src/gram.h (rule_t): Change line and action_line into location
5177 and action_location, of location_t type.
5178 Adjust all dependencies.
5179 * src/location.h, src/location.c (empty_location): New.
5180 * src/reader.h, src/reader.c (grammar_start_symbol_set)
5181 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
5182 (grammar_current_rule_symbol_append)
5183 (grammar_current_rule_action_append): Expect a location as argument.
5184 * src/reader.c (grammar_midrule_action): Adjust to attach an
5185 action's location as dummy symbol location.
5186 * src/symtab.h, src/symtab.c (startsymbol_location): New.
5187 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
5190 2002-06-14 Akim Demaille <akim@epita.fr>
5192 Grammar declarations may be found in the grammar section.
5194 * src/parse-gram.y (rules_or_grammar_declaration): New.
5195 (declarations): Each declaration may end with a semicolon, not
5197 (grammar_declaration): `"%union"'.
5198 (grammar): Branch to rules_or_grammar_declaration.
5200 2002-06-14 Akim Demaille <akim@epita.fr>
5202 * src/main.c (main): Invoke scanner_free.
5204 2002-06-14 Akim Demaille <akim@epita.fr>
5206 * src/output.c (m4_invoke): Extracted from...
5207 (output_skeleton): here.
5210 2002-06-14 Akim Demaille <akim@epita.fr>
5212 * src/parse-gram.y (directives, directive, gram)
5213 (grammar_directives, precedence_directives, precedence_directive):
5215 (declarations, declaration, grammar, grammar_declaration)
5216 (precedence_declaration, precedence_declarator): these.
5217 (symbol_declaration): New.
5219 2002-06-14 Akim Demaille <akim@epita.fr>
5221 * src/files.c (action_obstack): Remove, unused.
5222 (output_obstack): Remove it, and all its dependencies, as it is no
5224 * src/reader.c (epilogue_set): Build the epilogue in the
5226 * src/output.h, src/output.c (muscle_obstack): Move to...
5227 * src/muscle_tab.h, src/muscle_tab.h: here.
5228 (muscle_init): Initialize muscle_obstack.
5230 * src/main.c (main): Call it.
5232 2002-06-14 Akim Demaille <akim@epita.fr>
5234 * src/location.h: New, extracted from...
5235 * src/reader.h: here.
5236 * src/Makefile.am (noinst_HEADERS): Merge into
5237 (bison_SOURCES): this.
5239 * src/parse-gram.y: Use location_t instead of Bison's.
5240 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
5241 Use location_t instead of ints.
5243 2002-06-14 Akim Demaille <akim@epita.fr>
5245 * data/bison.simple, data/bison.c++: Be sure to restore the
5246 current #line when returning to the skeleton contents after having
5247 exposed the input file's #line.
5249 2002-06-12 Akim Demaille <akim@epita.fr>
5251 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
5253 * tests/actions.at (Exotic Dollars): New.
5255 2002-06-12 Akim Demaille <akim@epita.fr>
5257 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
5259 * tests/input.at (Torturing the Scanner): New.
5261 2002-06-11 Akim Demaille <akim@epita.fr>
5263 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
5264 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
5265 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
5266 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
5267 * src/reader.c (reader): Use it.
5269 2002-06-11 Akim Demaille <akim@epita.fr>
5271 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
5273 (scanner_last_string_free): New.
5275 2002-06-11 Akim Demaille <akim@epita.fr>
5277 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
5278 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
5279 (last_string, YY_OBS_FREE): New.
5280 Use them when returning an ID.
5282 2002-06-11 Akim Demaille <akim@epita.fr>
5284 Have Bison grammars parsed by a Bison grammar.
5286 * src/reader.c, src/reader.h (prologue_augment): New.
5287 * src/reader.c (copy_definition): Remove.
5289 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
5290 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
5291 (grammar_current_rule_prec_set, grammar_current_rule_check)
5292 (grammar_current_rule_symbol_append)
5293 (grammar_current_rule_action_append): Export.
5294 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
5295 (symbol_list_action_append): Remove.
5296 Hook the routines from reader.
5297 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
5298 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
5300 * src/reader.c (read_declarations): Remove, unused.
5302 * src/parse-gram.y: Handle the epilogue.
5303 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
5304 (grammar_start_symbol_set): this.
5305 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
5306 * src/reader.c (readgram): Remove, unused.
5307 (reader): Adjust to insert eoftoken and axiom where appropriate.
5309 * src/reader.c (copy_dollar): Replace with...
5310 * src/scan-gram.h (handle_dollar): this.
5311 * src/parse-gram.y: Remove `%thong'.
5313 * src/reader.c (copy_at): Replace with...
5314 * src/scan-gram.h (handle_at): this.
5316 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
5319 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
5322 * src/reader.h, src/reader.c (grammar_rule_end): New.
5324 * src/parse.y (current_type, current_class): New.
5325 Implement `%nterm', `%token' support.
5326 Merge `%term' into `%token'.
5327 (string_as_id): New.
5328 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
5331 * src/parse-gram.y: Be sure to handle properly the beginning of
5334 * src/parse-gram.y: Handle %type.
5335 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
5337 * src/parse-gram.y: More directives support.
5338 * src/options.c: No longer handle source directives.
5340 * src/parse-gram.y: Fix %output.
5342 * src/parse-gram.y: Handle %union.
5343 Use the prologue locations.
5344 * src/reader.c (parse_union_decl): Remove.
5346 * src/reader.h, src/reader.c (epilogue_set): New.
5347 * src/parse-gram.y: Use it.
5349 * data/bison.simple, data/bison.c++: b4_stype is now either not
5350 defined, then default to int, or to the contents of %union,
5351 without `union' itself.
5353 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
5355 * src/output.c (actions_output): Don't output braces, as they are
5356 already handled by the scanner.
5358 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
5359 characters to themselves.
5361 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
5362 that the epilogue has a proper #line.
5364 * src/parse-gram.y: Handle precedence/associativity.
5366 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
5368 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
5369 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
5370 at all to define terminals that cannot be emitted.
5372 * src/scan-gram.l: Escape M4 characters.
5374 * src/scan-gram.l: Working properly with escapes in user
5377 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
5378 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
5380 Use more modest sizes, as for the time being the parser does not
5381 release memory, and therefore the process swallows a huge amount
5384 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
5385 stricter %token grammar.
5387 * src/symtab.h (associativity): Add `undef_assoc'.
5388 (symbol_precedence_set): Do nothing when passed an undef_assoc.
5389 * src/symtab.c (symbol_check_alias_consistence): Adjust.
5391 * tests/regression.at (Invalid %directive): Remove, as it is now
5393 (Invalid inputs): Adjust to the new error messages.
5394 (Token definitions): The new grammar doesn't allow too many
5397 * src/lex.h, src/lex.c: Remove.
5398 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
5399 (copy_character, copy_string2, copy_string, copy_identifier)
5400 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
5401 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
5402 (parse_action): Remove.
5403 * po/POTFILES.in: Adjust.
5405 2002-06-11 Akim Demaille <akim@epita.fr>
5407 * src/reader.c (parse_action): Don't store directly into the
5408 rule's action member: return the action as a string.
5409 Don't require `rule_length' as an argument: compute it.
5410 (grammar_current_rule_symbol_append)
5411 (grammar_current_rule_action_append): New, eved out from
5413 Remove `action_flag', `rulelength', unused now.
5415 2002-06-11 Akim Demaille <akim@epita.fr>
5417 * src/reader.c (grammar_current_rule_prec_set).
5418 (grammar_current_rule_check): New, eved out from...
5420 Remove `xaction', `first_rhs': useless.
5421 * tests/input.at (Type clashes): New.
5422 * tests/existing.at (GNU Cim Grammar): Adjust.
5424 2002-06-11 Akim Demaille <akim@epita.fr>
5426 * src/reader.c (grammar_midrule_action): New, Eved out from
5429 2002-06-11 Akim Demaille <akim@epita.fr>
5431 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
5433 (readgram): Use them as replacement of inlined code, crule and
5436 2002-06-11 Akim Demaille <akim@epita.fr>
5438 * src/reader.c (grammar_end, grammar_symbol_append): New.
5439 (readgram): Use them.
5440 Make the use of `p' as local as possible.
5442 2002-06-10 Akim Demaille <akim@epita.fr>
5444 GCJ's parser requires the tokens to be defined before the prologue.
5446 * data/bison.simple: Output the token definition before the user's
5448 * tests/regression.at (Braces parsing, Duplicate string)
5449 (Mixing %token styles): Check the output from bison.
5450 (Early token definitions): New.
5452 2002-06-10 Akim Demaille <akim@epita.fr>
5454 * src/symtab.c (symbol_user_token_number_set): Don't complain when
5455 assigning twice the same user number to a token, so that we can
5457 * src/lex.c (lex): here.
5458 Also use `symbol_class_set' instead of hand written code.
5459 * src/reader.c (parse_assoc_decl): Likewise.
5461 2002-06-10 Akim Demaille <akim@epita.fr>
5463 * src/symtab.c, src/symtab.c (symbol_class_set)
5464 (symbol_user_token_number_set): New.
5465 * src/reader.c (parse_token_decl): Use them.
5466 Use a switch instead of ifs.
5467 Use a single argument.
5469 2002-06-10 Akim Demaille <akim@epita.fr>
5471 Remove `%thong' support as it is undocumented, unused, duplicates
5472 `%token's job, and creates useless e-mail traffic with people who
5473 want to know what it is, why it is undocumented, unused, and
5474 duplicates `%token's job.
5476 * src/reader.c (parse_thong_decl): Remove.
5477 * src/options.c (option_table): Remove "thong".
5478 * src/lex.h (tok_thong): Remove.
5480 2002-06-10 Akim Demaille <akim@epita.fr>
5482 * src/symtab.c, src/symtab.c (symbol_type_set)
5483 (symbol_precedence_set): New.
5484 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
5485 (value_components_used): Remove, unused.
5487 2002-06-09 Akim Demaille <akim@epita.fr>
5489 Move symbols handling code out of the reader.
5491 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
5493 * src/symtab.h, src/symtab.c: here.
5495 * src/gram.c (start_symbol): Remove: use startsymbol->number.
5496 * src/reader.c (startval): Rename as...
5497 * src/symtab.h, src/symtab.c (startsymbol): this.
5498 * src/reader.c: Adjust.
5500 * src/reader.c (symbol_check_defined, symbol_make_alias)
5501 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5502 (token_translations_init)
5504 * src/symtab.c: here.
5505 * src/reader.c (packsymbols): Move to...
5506 * src/symtab.h, src/symtab.c (symbols_pack): here.
5507 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
5510 2002-06-03 Akim Demaille <akim@epita.fr>
5512 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
5515 2002-06-03 Akim Demaille <akim@epita.fr>
5517 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
5518 structs with non literals.
5519 * src/scan-skel.l: never-interactive.
5520 * src/conflicts.c (enum conflict_resolution_e): No trailing
5522 * src/getargs.c (usage): Split long literal strings.
5523 Reported by Hans Aberg.
5525 2002-05-28 Akim Demaille <akim@epita.fr>
5527 * data/bison.c++: Use C++ ostreams.
5528 (cdebug_): New member.
5530 2002-05-28 Akim Demaille <akim@epita.fr>
5532 * src/output.c (output_skeleton): Be sure to allocate enough room
5533 for `/' _and_ for `\0' in full_skeleton.
5535 2002-05-28 Akim Demaille <akim@epita.fr>
5537 * data/bison.c++: Catch up with bison.simple:
5538 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5539 and Paul Eggert <eggert@twinsun.com>: `error' handing.
5540 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
5543 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5545 * src/output.c (output_skeleton): Put an explicit path in front of
5546 the skeleton file name, rather than relying on the -I directory,
5547 to partially alleviate effects of having a skeleton file lying around
5548 in the current directory.
5550 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5552 * src/conflicts.c (log_resolution): Correct typo:
5553 obstack_printf should be obstack_fgrow1.
5555 2002-05-26 Akim Demaille <akim@epita.fr>
5557 * src/state.h (state_t): `solved_conflicts' is a new member.
5558 * src/LR0.c (new_state): Set it to 0.
5559 * src/conflicts.h, src/conflicts.c (print_conflicts)
5560 (free_conflicts, solve_conflicts): Rename as...
5561 (conflicts_print, conflicts_free, conflicts_solve): these.
5563 * src/conflicts.c (enum conflict_resolution_e)
5564 (solved_conflicts_obstack): New, used by...
5565 (log_resolution): this.
5566 Adjust to attach the conflict resolution to each state.
5567 Complete the description with the precedence/associativity
5569 (resolve_sr_conflict): Adjust.
5570 * src/print.c (print_state): Output its solved_conflicts.
5571 * tests/conflicts.at (Unresolved SR Conflicts)
5572 (Solved SR Conflicts): Exercise --report=all.
5574 2002-05-26 Akim Demaille <akim@epita.fr>
5576 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5577 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5578 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
5579 (token_number_t, item_number_as_token_number)
5580 (token_number_as_item_number, muscle_insert_token_number_table):
5582 (symbol_number_t, item_number_as_symbol_number)
5583 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
5584 these, since it is more appropriate.
5586 2002-05-26 Akim Demaille <akim@epita.fr>
5588 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
5590 * data/bison.simple (yystos) [YYDEBUG]: New.
5591 (yyparse) [YYDEBUG]: Display the symbols which are popped during
5593 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
5595 2002-05-25 Akim Demaille <akim@epita.fr>
5597 * doc/bison.texinfo (Debugging): Split into...
5598 (Tracing): this new section, its former contents, and...
5599 (Understanding): this new section.
5600 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
5602 (report_flag): this.
5603 Adjust all dependencies.
5604 (report_args, report_types, report_argmatch): New.
5605 (usage, getargs): Report/support -r, --report.
5607 (struct option_table_struct): Rename as..,
5608 (struct option_table_s): this.
5609 Rename the `set_flag' member to `flag' to match with getopt_long's
5611 * src/options.c (option_table): Split verbose into an entry for
5612 %verbose, and another for --verbose.
5613 Support --report/-r, so remove -r from the obsolete --raw.
5614 * src/print.c: Attach full item sets and lookaheads reports to
5615 report_flag instead of trace_flag.
5616 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5618 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5619 and Paul Eggert <eggert@twinsun.com>
5621 * data/bison.simple (yyparse): Correct error handling to conform to
5622 POSIX and yacc. Specifically, after syntax error is discovered,
5623 do not reduce further before shifting the error token.
5624 Clean up the code a bit by removing the labels yyerrdefault,
5625 yyerrhandle, yyerrpop.
5626 * NEWS: Document the above.
5628 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5630 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5631 type; it isn't always big enough, since it doesn't necessarily
5632 include non-terminals.
5633 (yytranslate): Expand definition of yy_token_number_type, so that
5634 the latter can be removed.
5635 (yy_token_number_type): Remove, only one use.
5636 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5637 don't use TokenNumberType as element type.
5639 * tests/regression.at: Modify expected output to agree with change
5640 to yyr1 and yytranslate.
5642 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5644 * src/reader.c (parse_action): Use copy_character instead of
5647 2002-05-13 Akim Demaille <akim@epita.fr>
5649 * tests/regression.at (Token definitions): Prototype yylex and
5652 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5654 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
5655 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5657 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5659 2002-05-07 Akim Demaille <akim@epita.fr>
5661 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5664 2002-05-07 Akim Demaille <akim@epita.fr>
5668 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5669 over the RHS of each rule.
5670 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5671 * src/state.h (state_t): Member `nitems' is unsigned short.
5672 * src/LR0.c (get_state): Adjust.
5673 * src/reader.c (packgram): Likewise.
5674 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5676 (muscle_insert_int_table): Remove, unused.
5677 (prepare_rules): Remove `max'.
5679 2002-05-06 Akim Demaille <akim@epita.fr>
5681 * src/closure.c (print_firsts): Display of the symbol tags.
5682 (bitmatrix_print): Move to...
5683 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5685 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5687 2002-05-06 Akim Demaille <akim@epita.fr>
5689 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5692 2002-05-06 Akim Demaille <akim@epita.fr>
5694 * src/LR0.c (new_state, get_state): Instead of using the global
5695 `kernel_size' and `kernel_base', have two new arguments:
5696 `core_size' and `core'.
5699 2002-05-06 Akim Demaille <akim@epita.fr>
5701 * src/reader.c (packgram): No longer end `ritem' with a 0
5702 sentinel: it is not used.
5704 2002-05-05 Akim Demaille <akim@epita.fr>
5706 New experimental feature: display the lookaheads in the report and
5709 * src/print (print_core): When --trace-flag, display the rules
5711 * src/print_graph.c (print_core): Likewise.
5715 2002-05-05 Akim Demaille <akim@epita.fr>
5717 * tests/torture.at (Many lookaheads): New test.
5719 2002-05-05 Akim Demaille <akim@epita.fr>
5721 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
5722 (GENERATE_MUSCLE_INSERT_TABLE): this.
5723 (output_int_table, output_unsigned_int_table, output_short_table)
5724 (output_token_number_table, output_item_number_table): Replace with...
5725 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
5726 (muscle_insert_short_table, muscle_insert_token_number_table)
5727 (muscle_insert_item_number_table): these.
5729 (prepare_tokens): Don't free `translations', since...
5730 * src/reader.h, src/reader.c (grammar_free): do it.
5732 * src/gram.h, src/gram.c (grammar_free): here.
5733 * data/bison.simple, data/bison.c++: b4_token_number_max is now
5736 2002-05-05 Akim Demaille <akim@epita.fr>
5738 * src/output.c (output_unsigned_int_table): New.
5739 (prepare_rules): `i' is unsigned.
5740 `prhs', `rline', `r2' are unsigned int.
5741 Rename muscle `rhs_number_max' as `rhs_max'.
5742 Output muscles `prhs_max', `rline_max', and `r2_max'.
5744 * data/bison.simple, data/bison.c++: Adjust to use these muscles
5745 to compute types instead of constant types.
5746 * tests/regression.at (Web2c Actions): Adjust.
5748 2002-05-04 Akim Demaille <akim@epita.fr>
5750 * src/symtab.h (SALIAS, SUNDEF): Rename as...
5751 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
5752 Adjust dependencies.
5753 * src/output.c (token_definitions_output): Be sure not to output a
5754 `#define 'a'' when fed with `%token 'a' "a"'.
5755 * tests/regression.at (Token definitions): New.
5757 2002-05-03 Paul Eggert <eggert@twinsun.com>
5759 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
5762 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
5764 * Makefile.am (SUBDIRS): Remove intl.
5765 (EXTRA_DIST): Add config/config.rpath.
5767 2002-05-03 Akim Demaille <akim@epita.fr>
5769 * data/bison.simple (m4_if): Don't output empty enums.
5770 And actually, output valid enum definitions :(.
5772 2002-05-03 Akim Demaille <akim@epita.fr>
5774 * configure.bat: Remove, completely obsolete.
5775 * Makefile.am (EXTRA_DIST): Adjust.
5776 Don't distribute config.rpath...
5777 * config/Makefile.am (EXTRA_DIST): Do it.
5779 2002-05-03 Akim Demaille <akim@epita.fr>
5781 * configure.in (GETTEXT_VERSION): New.
5782 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
5784 2002-05-03 Akim Demaille <akim@epita.fr>
5786 * data/bison.simple (b4_token_enum): New.
5787 (b4_token_defines): Use it to output tokens both as #define and
5789 Suggested by Paul Eggert.
5790 * src/output.c (token_definitions_output): Don't output spurious
5793 2002-05-03 Akim Demaille <akim@epita.fr>
5795 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5797 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
5799 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
5800 Update the stack class, give a try to deque as the default container.
5802 2002-05-02 Akim Demaille <akim@epita.fr>
5804 * data/bison.simple (yyparse): Do not implement @$ = @1.
5805 (YYLLOC_DEFAULT): Adjust to do it.
5806 * doc/bison.texinfo (Location Default Action): Fix.
5808 2002-05-02 Akim Demaille <akim@epita.fr>
5810 * src/reader.c (parse_braces): Merge into...
5811 (parse_action): this.
5813 2002-05-02 Akim Demaille <akim@epita.fr>
5815 * configure.in (ALL_LINGUAS): Remove.
5816 * po/LINGUAS, hr.po: New.
5818 2002-05-02 Akim Demaille <akim@epita.fr>
5820 Remove the so called hairy (semantic) parsers.
5822 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
5823 * src/gram.h, src/gram.c (semantic_parser): Remove.
5824 (rule_t): Remove the guard and guard_line members.
5825 * src/lex.h (token_t): remove tok_guard.
5826 * src/options.c (option_table): Remove %guard and %semantic_parser
5828 * src/output.c, src/output.h (guards_output): Remove.
5830 (token_definitions_output): Don't output the `T'
5832 (output_skeleton): Don't output the guards.
5833 * src/files.c, src/files.c (attrsfile): Remove.
5834 * src/reader.c (symbol_list): Remove the guard and guard_line
5836 Adjust dependencies.
5837 (parse_guard): Remove.
5838 * data/bison.hairy: Remove.
5839 * doc/bison.texinfo (Environment Variables): Remove occurrences of
5842 2002-05-02 Akim Demaille <akim@epita.fr>
5844 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
5845 (parse_guard): Rename the formal argument `stack_offset' as
5846 `rule_length', which is more readable.
5848 (copy_at, copy_dollar): Instead of outputting the hard coded
5849 values of $$, $n and so forth, output invocation to b4_lhs_value,
5850 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
5851 Note: this patch partially drops `semantic-parser' support: it
5852 always does `rule_length - n', where semantic parsers ought to
5854 * data/bison.simple, data/bison.c++ (b4_lhs_value)
5855 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
5857 2002-05-02 Akim Demaille <akim@epita.fr>
5859 * configure.in (AC_INIT): Bump to 1.49b.
5860 (AM_INIT_AUTOMAKE): Short invocation.
5862 2002-05-02 Akim Demaille <akim@epita.fr>
5866 2002-05-01 Akim Demaille <akim@epita.fr>
5868 * src/skeleton.h: Remove.
5870 2002-05-01 Akim Demaille <akim@epita.fr>
5872 * src/skeleton.h: Fix the #endif.
5873 Reported by Magnus Fromreide.
5875 2002-04-26 Paul Eggert <eggert@twinsun.com>
5877 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
5878 Define if we define YYSTYPE and YYLTYPE, respectively.
5879 (YYCOPY): Fix [] quoting problem in the non-GCC case.
5881 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
5883 * src/scan-skel.l: Postprocess quadrigraphs.
5885 * src/reader.c (copy_character): New function, used to output
5886 single characters while replacing `[' and `]' with quadrigraphs, to
5887 avoid troubles with M4 quotes.
5888 (copy_comment): Output characters with copy_character.
5889 (read_additionnal_code): Likewise.
5890 (copy_string2): Likewise.
5891 (copy_definition): Likewise.
5893 * tests/calc.at: Exercise M4 quoting.
5895 2002-04-25 Akim Demaille <akim@epita.fr>
5897 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
5898 between `!' and the command.
5899 Reported by Paul Eggert.
5901 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
5903 * tests/calc.at: Exercise prologue splitting.
5905 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
5906 `b4_post_prologue' instead of `b4_prologue'.
5908 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
5910 (output): Free pre_prologue_obstack and post_prologue_obstack.
5911 * src/files.h, src/files.c (attrs_obstack): Remove.
5912 (pre_prologue_obstack, post_prologue_obstack): New.
5913 * src/reader.c (copy_definition): Add a parameter to specify the
5914 obstack to fill, instead of using attrs_obstack unconditionally.
5915 (read_declarations): Pass pre_prologue_obstack to copy_definition if
5916 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
5918 2002-04-23 Paul Eggert <eggert@twinsun.com>
5920 * data/bison.simple: Remove unnecessary commentary and white
5921 space differences from 1_29-branch.
5922 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
5924 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
5925 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
5926 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
5927 constructors or destructors.
5929 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
5931 2002-04-23 Akim Demaille <akim@epita.fr>
5933 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
5934 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
5935 location with columns.
5936 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
5937 All reported by Paul Eggert.
5939 2002-04-22 Akim Demaille <akim@epita.fr>
5941 * src/reduce.c (dump_grammar): Move to...
5942 * src/gram.h, src/gram.c (grammar_dump): here.
5943 Be sure to separate long item numbers.
5944 Don't read the members of a rule's prec if its nil.
5946 2002-04-22 Akim Demaille <akim@epita.fr>
5948 * src/output.c (table_size, table_grow): New.
5949 (MAXTABLE): Remove, replace uses with table_size.
5950 (pack_vector): Instead of dying when the table is too big, grow it.
5952 2002-04-22 Akim Demaille <akim@epita.fr>
5954 * data/bison.simple (yyr1): Its type is that of a token number.
5955 * data/bison.c++ (r1_): Likewise.
5956 * tests/regression.at (Web2c Actions): Adjust.
5958 2002-04-22 Akim Demaille <akim@epita.fr>
5960 * src/reader.c (token_translations_init): 256 is now the default
5961 value for the error token, i.e., it will be assigned another
5962 number if the user assigned 256 to one of her tokens.
5963 (reader): Don't force 256 to error.
5964 * doc/bison.texinfo (Symbols): Adjust.
5965 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
5966 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
5967 etc. instead of 10, 20, 30 (which was used to `jump' over error
5968 (256) and undefined (2)).
5970 2002-04-22 Akim Demaille <akim@epita.fr>
5972 Propagate more token_number_t.
5974 * src/gram.h (token_number_as_item_number)
5975 (item_number_as_token_number): New.
5976 * src/output.c (GENERATE_OUTPUT_TABLE): New.
5977 Use it to create output_item_number_table and
5978 output_token_number_table.
5979 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5980 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
5981 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
5982 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
5984 2002-04-22 Akim Demaille <akim@epita.fr>
5986 * src/output.h, src/output.c (get_lines_number): Remove.
5988 2002-04-19 Akim Demaille <akim@epita.fr>
5990 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
5992 (Debugging): More details about enabling the debugging features.
5993 (Table of Symbols): Describe $$, $n, @$, and @n.
5994 Suggested by Tim Josling.
5996 2002-04-19 Akim Demaille <akim@epita.fr>
5998 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
6000 2002-04-10 Akim Demaille <akim@epita.fr>
6002 * src/system.h: Rely on HAVE_LIMITS_H.
6003 Suggested by Paul Eggert.
6005 2002-04-09 Akim Demaille <akim@epita.fr>
6007 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
6008 full stderr, and strip it according to the bison options, instead
6009 of composing the error message from different bits.
6010 This makes it easier to check for several error messages.
6011 Adjust all the invocations.
6012 Add an invocation exercising the error token.
6013 Add an invocation demonstrating a stupid error message.
6014 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
6016 Error message are for stderr, not stdout.
6018 2002-04-09 Akim Demaille <akim@epita.fr>
6020 * src/gram.h, src/gram.c (error_token_number): Remove, use
6022 * src/reader.c (reader): Don't specify the user token number (2)
6023 for $undefined, as it uselessly prevents using it.
6024 * src/gram.h (token_number_t): Move to...
6025 * src/symtab.h: here.
6026 (state_t.number): Is a token_number_t.
6027 * src/print.c, src/reader.c: Use undeftoken->number instead of
6029 (Even though this 2 is not the same as above: the number of the
6030 undeftoken remains being 2, it is its user token number which
6032 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
6033 `user_token_number_max'.
6034 Output `undef_token_number'.
6035 * data/bison.simple, data/bison.c++: Use them.
6036 Be sure to map invalid yylex return values to
6037 `undef_token_number'. This saves us from gratuitous SEGV.
6039 * tests/conflicts.at (Solved SR Conflicts)
6040 (Unresolved SR Conflicts): Adjust.
6041 * tests/regression.at (Web2c Actions): Adjust.
6043 2002-04-08 Akim Demaille <akim@epita.fr>
6045 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
6047 Remove the duplicate `typedefs'.
6048 (RhsNumberType): Fix the declaration and various other typos.
6050 * data/bison.simple: Use __ofile__.
6051 * src/scan-skel.l: Handle __ofile__.
6053 2002-04-08 Akim Demaille <akim@epita.fr>
6055 * src/gram.h (item_number_t): New, the type of item numbers in
6056 RITEM. Note that it must be able to code symbol numbers as
6057 positive number, and the negation of rule numbers as negative
6059 Adjust all dependencies (pretty many).
6060 * src/reduce.c (rule): Remove this `short *' pointer: use
6062 * src/system.h (MINSHORT, MAXSHORT): Remove.
6064 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
6066 (MAXTABLE): Move to...
6067 * src/output.c (MAXTABLE): here.
6068 (prepare_rules): Use output_int_table to output rhs.
6069 * data/bison.simple, data/bison.c++: Adjust.
6070 * tests/torture.at (Big triangle): Move the limit from 254 to
6072 * tests/regression.at (Web2c Actions): Ajust.
6074 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
6075 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
6076 passes, but produces negative #line number, once fixed, GCC is
6077 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
6079 * src/state.h (state_h): Code input lines on ints, not shorts.
6081 2002-04-08 Akim Demaille <akim@epita.fr>
6083 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
6084 and then the grammar.
6086 2002-04-08 Akim Demaille <akim@epita.fr>
6088 * src/system.h: No longer using strndup.
6090 2002-04-07 Akim Demaille <akim@epita.fr>
6092 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
6093 * src/output.c (output_table_data): Return the longest number.
6094 (prepare_tokens): Output `token_number_max').
6095 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
6097 Use them to define yy_token_number_type/TokenNumberType.
6098 Use this type for yytranslate.
6099 * tests/torture.at (Big triangle): Push the limit from 124 to
6101 * tests/regression.at (Web2c Actions): Adjust.
6103 2002-04-07 Akim Demaille <akim@epita.fr>
6105 * tests/torture.at (Big triangle): New.
6106 (GNU AWK Grammar, GNU Cim Grammar): Move to...
6107 * tests/existing.at: here.
6109 2002-04-07 Akim Demaille <akim@epita.fr>
6111 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
6113 Adjust dependencies.
6115 2002-04-07 Akim Demaille <akim@epita.fr>
6117 * src/reader.c: Normalize increments to prefix form.
6119 2002-04-07 Akim Demaille <akim@epita.fr>
6121 * src/reader.c, symtab.c: Remove debugging code.
6123 2002-04-07 Akim Demaille <akim@epita.fr>
6125 Rename all the `bucket's as `symbol_t'.
6127 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
6128 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
6129 * src/symtab.c, src/symtab.h (bucket): Rename as...
6131 (symbol_list_new, bucket_check_defined, bucket_make_alias)
6132 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
6133 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6134 (buckets_new, buckets_free, buckets_do): Rename as...
6135 (symbol_list_new, symbol_check_defined, symbol_make_alias)
6136 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
6137 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
6138 (symbols_new, symbols_free, symbols_do): these.
6140 2002-04-07 Akim Demaille <akim@epita.fr>
6142 Use lib/hash for the symbol table.
6144 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
6146 * src/lex.c (lex): Set the `number' member of new terminals.
6147 * src/reader.c (bucket_check_defined, bucket_make_alias)
6148 (bucket_check_alias_consistence, bucket_translation): New.
6149 (reader, grammar_free, readgram, token_translations_init)
6150 (packsymbols): Adjust.
6151 (reader): Number the predefined tokens.
6152 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
6153 for predefined tokens.
6154 * src/symtab.h (bucket): Remove all the hash table related
6156 * src/symtab.c (symtab): Replace by...
6157 (bucket_table): this.
6158 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6159 (buckets_new, buckets_do): New.
6161 2002-04-07 Akim Demaille <akim@epita.fr>
6163 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
6164 (start_symbol, max_user_token_number, semantic_parser)
6165 (error_token_number): Initialize.
6166 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
6169 (errtoken, eoftoken, undeftoken, axiom): Extern.
6171 2002-04-07 Akim Demaille <akim@epita.fr>
6173 * src/gram.h (rule_s): prec and precsym are now pointers
6174 to the bucket giving the priority/associativity.
6175 Member `associativity' removed: useless.
6176 * src/reduce.c, src/conflicts.c: Adjust.
6178 2002-04-07 Akim Demaille <akim@epita.fr>
6180 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
6181 Properly escape the symbols' TAG when outputting them.
6183 2002-04-07 Akim Demaille <akim@epita.fr>
6185 * src/lalr.h (LA): Is a bitsetv, not bitset*.
6187 2002-04-07 Akim Demaille <akim@epita.fr>
6189 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
6190 (LArule): this, which is an array to rule_t*.
6191 * src/print.c, src/conflicts.c: Adjust.
6193 2002-04-07 Akim Demaille <akim@epita.fr>
6195 * src/gram.h (rule_t): Rename `number' as `user_number'.
6196 `number' is a new member.
6197 Adjust dependencies.
6198 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
6200 2002-04-07 Akim Demaille <akim@epita.fr>
6202 As a result of the previous patch, it is no longer needed
6203 to reorder ritem itself.
6205 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
6207 2002-04-07 Akim Demaille <akim@epita.fr>
6209 Be sure never to walk through RITEMS, but use only data related to
6210 the rules themselves. RITEMS should be banished.
6212 * src/output.c (output_token_translations): Rename as...
6213 (prepare_tokens): this.
6214 In addition to `translate', prepare the muscles `tname' and
6215 `toknum', which were handled by...
6216 (output_rule_data): this.
6217 Remove, and move the remainder of its outputs into...
6218 (prepare_rules): this new routines, which also merges content from
6219 (output_gram): this.
6220 (prepare_rules): Be sure never to walk through RITEMS.
6221 (output_stos): Rename as...
6222 (prepare_stos): this.
6223 (output): Always invoke prepare_states, after all, just don't use it
6224 in the output if you don't need it.
6226 2002-04-07 Akim Demaille <akim@epita.fr>
6228 * src/LR0.c (new_state): Display `nstates' as the name of the
6229 newly created state.
6230 Adjust to initialize first_state and last_state if needed.
6231 Be sure to distinguish the initial from the final state.
6232 (new_states): Create the itemset of the initial state, and use
6234 * src/closure.c (closure): Now that the initial state has its
6235 items properly set, there is no need for a special case when
6238 As a result, now the rule 0, reducing to $axiom, is visible in the
6239 outputs. Adjust the test suite.
6241 * tests/conflicts.at (Solved SR Conflicts)
6242 (Unresolved SR Conflicts): Adjust.
6243 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
6244 * tests/conflicts.at (S/R in initial): New.
6246 2002-04-07 Akim Demaille <akim@epita.fr>
6248 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
6249 the RHS of the rules.
6250 * src/output.c (output_gram): Likewise.
6252 2002-04-07 Akim Demaille <akim@epita.fr>
6254 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
6256 Adjust all dependencies.
6257 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
6258 `number' of the buckets too.
6259 * src/gram.h: Include `symtab.h'.
6260 (associativity): Move to...
6261 * src/symtab.h: here.
6262 No longer include `gram.h'.
6264 2002-04-07 Akim Demaille <akim@epita.fr>
6266 * src/gram.h, src/gram.c (rules_rhs_length): New.
6267 (ritem_longest_rhs): Use it.
6268 * src/gram.h (rule_t): `number' is a new member.
6269 * src/reader.c (packgram): Set it.
6270 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
6271 the end of `rules', and count them out of `nrules'.
6272 (reduce_output, dump_grammar): Adjust.
6273 * src/print.c (print_grammar): It is no longer needed to check for
6274 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
6275 * tests/reduce.at (Reduced Automaton): New test.
6277 2002-04-07 Akim Demaille <akim@epita.fr>
6279 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
6280 lacking `+ 1' to nrules, Bison reported as useless a token if it
6281 was used solely to set the precedence of the last rule...
6283 2002-04-07 Akim Demaille <akim@epita.fr>
6285 * data/bison.c++, data/bison.simple: Don't output the current file
6286 name in #line, to avoid useless diffs between two identical
6287 outputs under different names.
6289 2002-04-07 Akim Demaille <akim@epita.fr>
6291 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
6292 Normalize loops to using `< nrules + 1', not `<= nrules'.
6294 2002-04-07 Akim Demaille <akim@epita.fr>
6298 2002-04-07 Akim Demaille <akim@epita.fr>
6300 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
6301 bucket.value as bucket.number.
6303 2002-04-07 Akim Demaille <akim@epita.fr>
6305 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
6306 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
6307 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
6308 RHS, instead of being an index in RITEMS.
6310 2002-04-04 Paul Eggert <eggert@twinsun.com>
6312 * doc/bison.texinfo: Update copyright date.
6313 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
6314 (Symbols): Warn about running Bison in one character set,
6315 but compiling and/or running in an incompatible one.
6316 Warn about character code 256, too.
6318 2002-04-03 Paul Eggert <eggert@twinsun.com>
6320 * src/bison.data (YYSTACK_ALLOC): Depend on whether
6321 YYERROR_VERBOSE is nonzero, not whether it is defined.
6323 Merge changes from bison-1_29-branch.
6325 2002-03-20 Paul Eggert <eggert@twinsun.com>
6327 Merge fixes from Debian bison_1.34-1.diff.
6329 * configure.in (AC_PREREQ): 2.53.
6331 2002-03-20 Akim Demaille <akim@epita.fr>
6333 * src/conflicts.c (log_resolution): Argument `resolution' is const.
6335 2002-03-19 Paul Eggert <eggert@twinsun.com>
6337 * src/bison.simple (YYCOPY): New macro.
6338 (YYSTACK_RELOCATE): Use it.
6339 Remove Type arg; no longer needed. All callers changed.
6340 (yymemcpy): Remove; no longer needed.
6342 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
6343 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6345 2002-03-19 Akim Demaille <akim@epita.fr>
6347 Test and fix the #line outputs.
6349 * tests/atlocal.at (GCC): New.
6350 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
6351 (Prologue synch line, ,%union synch line, Postprologue synch line)
6352 (Action synch line, Epilogue synch line): New tests.
6353 * src/reader.c (parse_union_decl): Define the muscle stype_line.
6354 * data/bison.simple, data/bison.c++: Use it.
6356 2002-03-19 Akim Demaille <akim@epita.fr>
6358 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
6359 (Solved SR Conflicts, %expect not enough, %expect right)
6360 (%expect too much): Move to...
6361 * tests/conflicts.at: this new file.
6363 2002-03-19 Akim Demaille <akim@epita.fr>
6365 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6366 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
6367 that we can move to enums for instance.
6368 * src/output.c (token_definitions_output): Output a list of
6369 `token-name, token-number' instead of the #define.
6370 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
6372 2002-03-14 Akim Demaille <akim@epita.fr>
6376 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
6378 * data/bison.c++: Make the user able to add members to the generated
6379 parser by subclassing.
6381 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
6383 * src/reader.c (read_additionnal_code): `c' should be an integer, not
6385 Reported by Nicolas Tisserand and Nicolas Burrus.
6387 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6389 * src/reader.c: Warn about lacking semi-colons, do not complain.
6391 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6393 * data/bison.c++: Remove a debug line.
6395 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6397 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
6398 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
6399 provide a default implementation.
6401 2002-03-04 Akim Demaille <akim@epita.fr>
6403 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
6404 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
6405 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
6406 * tests/semantic.at (Parsing Guards): Similarly.
6407 * src/reader.at (readgram): Complain if the last rule is not ended
6410 2002-03-04 Akim Demaille <akim@epita.fr>
6412 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
6413 * src/closure.c: here.
6414 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
6416 * src/warshall.h, src/warshall.c: Remove.
6417 * tests/sets.at (Broken Closure): Adjust.
6419 2002-03-04 Akim Demaille <akim@epita.fr>
6421 * src/output.c (output_skeleton): tempdir is const.
6422 bytes_read is unused.
6424 2002-03-04 Akim Demaille <akim@epita.fr>
6426 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6427 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
6431 2002-03-04 Akim Demaille <akim@epita.fr>
6433 * src/closure.c (closure): `r' is unused.
6435 2002-03-04 Akim Demaille <akim@epita.fr>
6437 * tests/sets.at (Broken Closure): Add the ending `;'.
6438 * src/reader.at (readgram): Complain if a rule is not ended with a
6441 2002-03-04 Akim Demaille <akim@epita.fr>
6443 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
6444 (count_sr_conflicts): Use bitset_count.
6445 * src/reduce.c (inaccessable_symbols): Ditto.
6446 (bits_size): Remove.
6447 * src/warshall.h, src/warshall.c: Convert to bitsetv.
6449 2002-03-04 Akim Demaille <akim@epita.fr>
6451 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
6452 * src/reduce.c: Remove the `bitset_zero's following the
6453 `bitset_create's, as now it is performed by the latter.
6455 2002-03-04 Akim Demaille <akim@epita.fr>
6457 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
6458 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
6459 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
6460 latest sources from Michael.
6462 2002-03-04 Akim Demaille <akim@epita.fr>
6464 * src/output.c (output): Don't free the grammar.
6465 * src/reader.c (grammar_free): New.
6466 * src/main.c (main): Call it and don't free symtab here.
6468 2002-03-04 Akim Demaille <akim@epita.fr>
6470 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
6472 Reported by Benoit Perrot.
6474 2002-03-04 Akim Demaille <akim@epita.fr>
6476 Use bitset operations when possible, not loops over bits.
6478 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
6480 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
6481 * src/reduce.c (useless_nonterminals): Formatting changes.
6482 * src/warshall.c (TC): Use bitset_or.
6484 2002-03-04 Akim Demaille <akim@epita.fr>
6486 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
6487 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
6490 2002-03-04 Akim Demaille <akim@epita.fr>
6492 * src/lalr.c (F): Now a bitset*.
6493 Adjust all dependencies.
6495 2002-03-04 Akim Demaille <akim@epita.fr>
6497 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
6498 Adjust all dependencies.
6500 2002-03-04 Akim Demaille <akim@epita.fr>
6502 * src/L0.c, src/LR0.h (nstates): Be size_t.
6503 Adjust comparisons (signed vs unsigned).
6504 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
6506 Adjust all dependencies.
6508 2002-03-04 Akim Demaille <akim@epita.fr>
6510 * src/closure.c (firsts): Now, also a bitset.
6511 Adjust all dependencies.
6512 (varsetsize): Remove, now unused.
6513 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
6515 2002-03-04 Akim Demaille <akim@epita.fr>
6517 * src/print.c: Convert to use bitset.h, not hand coded iterations
6520 2002-03-04 Akim Demaille <akim@epita.fr>
6522 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
6524 2002-03-04 Akim Demaille <akim@epita.fr>
6526 * src/closure.c (ruleset): Be a bitset.
6527 (rulesetsize): Remove.
6529 2002-03-04 Akim Demaille <akim@epita.fr>
6531 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6532 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
6533 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
6534 * src/closure.c (fderives): Be an array of bitsets.
6536 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
6538 * data/bison.c++: Merge the two generated headers. Insert a copyright
6539 notice in each output file.
6541 2002-02-28 Akim Demaille <akim@epita.fr>
6543 * data/bison.c++: Copy the prologue of bison.simple to fetch
6544 useful M4 definitions, such as b4_header_guard.
6546 2002-02-25 Akim Demaille <akim@epita.fr>
6548 * src/getargs.c (version): Give the name of the authors, and use a
6549 translator friendly scheme for the bgr
6552 2002-02-25 Akim Demaille <akim@epita.fr>
6554 * src/output.c (header_output): Remove, now handled completely via
6557 2002-02-25 Akim Demaille <akim@epita.fr>
6559 * m4/m4.m4: New, from CVS Autoconf.
6560 * configure.in: Invoke it.
6561 * src/output.c (output_skeleton): Use its result instead of the
6564 2002-02-25 Akim Demaille <akim@epita.fr>
6566 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
6568 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
6569 * src/output.c (output_skeleton): Use mkstemp to create a real
6571 Move the filling of `skeleton' and its muscle to...
6573 (output): Move the definition of the prologue muscle to...
6575 * src/system.h (DEFAULT_TMPDIR): New.
6577 2002-02-14 Paul Eggert <eggert@twinsun.com>
6579 Remove the support for C++ namespace cleanliness; it was
6580 causing more problems than it was curing, since it didn't work
6581 properly on some nonstandard C++ compilers. This can wait
6582 for a proper C++ parser.
6584 * NEWS: Document this.
6585 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
6586 of C++, as it's treated like C now.
6587 * src/bison.simple (YYSTD): Remove.
6588 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
6589 Treat C++ just like Standard C instead of trying to support
6590 namespace cleanliness.
6592 2002-02-14 Akim Demaille <akim@epita.fr>
6594 * tests/regression.at (else): Adjust to Andreas' change.
6596 2002-02-14 Akim Demaille <akim@epita.fr>
6598 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
6600 2002-02-13 Andreas Schwab <schwab@suse.de>
6602 * src/output.c (output_rule_data): Don't output NULL, it might
6605 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
6607 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6608 (Copyright notice): Update.
6610 2002-02-11 Akim Demaille <akim@epita.fr>
6612 * tests/regression.at (%nonassoc and eof): Don't include
6613 nonportable headers.
6615 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
6617 * data/bison.c++: Correct error recovery. Make the user able to
6618 initialize the starting location.
6620 2002-02-07 Akim Demaille <akim@epita.fr>
6622 * tests/input.at: New.
6624 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6626 * data/bison.c++: Replace some direct m4 expansions by constants. Be
6627 more consistent when naming methods and variables. Put preprocessor
6628 directives around tables only needed for debugging.
6630 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6632 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6634 (yy::b4_name::parse): Use print_.
6636 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6638 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6640 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6642 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6644 (yy::b4_name::parse): Build verbose error messages, and use error_.
6646 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6648 * data/bison.c++: Fix m4 quoting in comments.
6650 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6652 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6655 2002-02-05 Akim Demaille <akim@epita.fr>
6657 * data/bison.c++: Adjust to the M4 back end.
6658 More is certainly needed.
6660 2002-02-05 Akim Demaille <akim@epita.fr>
6662 Give a try to M4 as a back end.
6664 * lib/readpipe.c: New, from wdiff.
6665 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6667 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6668 specific values. Now it is m4 that performs the lookup.
6669 * src/parse-skel.y: Remove.
6670 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6671 * src/output.c (actions_output, guards_output)
6672 (token_definitions_output): No longer keeps track of the output
6673 line number, hence remove the second argument.
6674 (guards_output): Check against the guard member of a rule, not the
6677 (output_skeleton): Don't look for the skeleton location, let m4 do
6679 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6681 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6682 (prepare): Given that for the time being changesyntax is not
6683 usable in M4, rename the muscles using `-' to `_'.
6684 Define `defines_flag', `output_parser_name' and `output_header_name'.
6685 * src/output.h (actions_output, guards_output)
6686 (token_definitions_output): Adjust prototypes.
6687 * src/scan-skel.l: Instead of scanning the skeletons, it now
6688 processes the output of m4: `__oline__' and `#output'.
6689 * data/bison.simple: Adjust to be used by M4(sugar).
6690 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6692 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6693 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6694 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6695 shamelessly stolen from CVS Autoconf.
6697 2002-02-05 Akim Demaille <akim@epita.fr>
6699 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
6700 * configure.in: Check for the declarations of free and malloc.
6701 * src/muscle_tab.c: Adjust.
6703 2002-02-05 Akim Demaille <akim@epita.fr>
6705 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
6706 which have no values.
6708 2002-02-05 Akim Demaille <akim@epita.fr>
6710 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
6713 2002-01-29 Paul Eggert <eggert@twinsun.com>
6715 * src/bison.simple (YYSIZE_T): Do not define merely because
6716 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
6717 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6719 2002-01-27 Akim Demaille <akim@epita.fr>
6721 Fix `%nonassoc and eof'.
6723 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
6724 which were not properly copied! Replace
6725 memcpy (res->errs, src->errs, src->nerrs);
6727 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
6729 * tests/regression.at (%nonassoc and eof): Adjust to newest
6730 Autotest: `.' is not in the PATH.
6732 2002-01-27 Akim Demaille <akim@epita.fr>
6734 * tests/sets.at (AT_EXTRACT_SETS): New.
6738 2002-01-26 Akim Demaille <akim@epita.fr>
6740 * tests/actions.at, tests/calc.at, tests/headers.at,
6741 * tests/torture.at: Adjust to the newest Autotest which no longer
6742 forces `.' in the PATH.
6744 2002-01-25 Akim Demaille <akim@epita.fr>
6746 * tests/regression.at (%nonassoc and eof): New.
6747 Suggested by Robert Anisko.
6749 2002-01-24 Akim Demaille <akim@epita.fr>
6751 Bison dumps core when trying to complain about broken input files.
6752 Reported by Cris van Pelt.
6754 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
6755 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
6757 (Invalid inputs): Strengthen: exercise parse_percent_token.
6759 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
6761 * src/Makefile.am: Add bison.c++.
6762 * src/bison.c++: New skeleton.
6764 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
6768 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6770 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
6772 2002-01-20 Marc Autret <marc@gnu.org>
6774 * src/files.c (compute_output_file_names): Fix
6776 2002-01-20 Marc Autret <marc@gnu.org>
6778 * tests/output.at: New test.
6779 * src/files.c (compute_base_names): Don't map extensions when
6780 the YACC flag is set, use defaults.
6781 Reported by Evgeny Stambulchik.
6783 2002-01-20 Marc Autret <marc@gnu.org>
6785 * src/system.h: Need to define __attribute__ away for non-GCC
6786 compilers as well (i.e. the vendor C compiler).
6787 Suggested by Albert Chin-A-Young.
6789 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
6791 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
6792 canonical definition.
6793 * src/system.h: Use the canonical definition for PARAMS (avoids
6794 a conflict with the macro from lib/hash.h).
6796 2002-01-11 Akim Demaille <akim@epita.fr>
6798 * configure.in: Use AC_FUNC_STRNLEN.
6799 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
6801 2002-01-09 Akim Demaille <akim@epita.fr>
6803 * src/files.c, src/files.h (output_infix): New.
6804 (tab_extension): Remove.
6805 (compute_base_names): Compute the former, drop the latter.
6806 * src/output.c (prepare): Insert the muscles `output-infix', and
6808 * src/parse-skel.y (string, string.1): New.
6809 (section.header): Use it.
6810 (section.yacc): Remove.
6811 (prefix): Remove too.
6812 * src/scan-skel.l: Adjust.
6813 * src/bison.simple, src/bison.hairy: Adjust.
6815 2002-01-09 Akim Demaille <akim@epita.fr>
6817 * configure.in (WERROR_CFLAGS): Compute it.
6818 * src/Makefile.am (CFLAGS): Pass it.
6819 * tests/atlocal.in (CFLAGS): Idem.
6820 * src/files.c: Fix a few warnings.
6821 (get_extension_index): Remove, unused.
6823 2002-01-08 Akim Demaille <akim@epita.fr>
6825 * src/getargs.c (AS_FILE_NAME): New.
6826 (getargs): Use it to convert DOSish file names.
6827 * src/files.c (base_name): Rename as full_base_name to avoid
6828 clashes with `base_name ()'.
6829 (filename_split): New.
6830 (compute_base_names): N-th rewrite, using filename_split.
6832 2002-01-08 Akim Demaille <akim@epita.fr>
6834 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
6835 New, stolen from the Fileutils 4.1.
6836 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6837 * configure.in: Check for the presence of memrchr, and of its
6840 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
6842 * lib/hash.h (__P): Added definition for this macro.
6843 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
6844 BUILT_SOURCES, to ensure they are generated first.
6845 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
6846 %error-verbose to allow bootstrapping with bison 1.30x.
6848 2002-01-06 Akim Demaille <akim@epita.fr>
6850 * src/reader.c (parse_braces): Don't fetch the next char, the
6851 convention is to fetch on entry.
6852 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
6853 'switch' without a following semicolon.
6854 * tests/regression.at (braces parsing): New.
6856 2002-01-06 Akim Demaille <akim@epita.fr>
6858 Bison is dead wrong in its RR conflict reports.
6860 * tests/torture.at (GNU Cim Grammar): New.
6861 * src/conflicts.c (count_rr_conflicts): Fix.
6863 2002-01-06 Akim Demaille <akim@epita.fr>
6865 Creating package.m4 from configure.ac causes too many problems.
6867 * tests/Makefile.am (package.m4): Create it by hand,
6868 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
6870 2002-01-06 Akim Demaille <akim@epita.fr>
6872 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
6875 2002-01-04 Paul Eggert <eggert@twinsun.com>
6877 * doc/bison.texinfo (Debugging):
6878 Remove YYSTDERR; it's no longer defined or used.
6879 Also, s/cstdio.h/cstdio/.
6881 2002-01-03 Akim Demaille <akim@epita.fr>
6883 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
6885 2002-01-03 Akim Demaille <akim@epita.fr>
6887 * src/parse-skel.y (process_skeleton): Don't bind the parser's
6888 tracing code to --trace, wait for a better --trace option, with
6891 2002-01-03 Akim Demaille <akim@epita.fr>
6893 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
6894 The ISO C++ standard is extremely clear about it: stderr is
6895 considered a macro, not a regular symbol (see table 94 `Header
6896 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
6897 Therefore std:: does not apply to it. It still does with fprintf.
6898 Also, s/cstdio.h/cstdio/.
6900 2002-01-03 Akim Demaille <akim@epita.fr>
6902 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
6903 for non system headers.
6905 2002-01-02 Akim Demaille <akim@epita.fr>
6907 Equip the skeleton chain with location tracking, runtime trace,
6908 pure parser and scanner.
6910 * src/parse-skel.y: Request a pure parser, locations, and prefix
6912 (%union): Having several members with the same type does not help
6913 type mismatches, simplify.
6914 (YYPRINT, yyprint): New.
6915 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
6918 * src/scan-skel.l: Adjust to these changes.
6919 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
6920 (LOCATION_PRINT, skel_control_t): New.
6922 2001-12-30 Akim Demaille <akim@epita.fr>
6924 * src/parse-skel.y: Get rid of the shift/reduce conflict:
6925 replace `gb' with BLANKS.
6926 * src/scan-skel.l: Adjust.
6928 2001-12-30 Akim Demaille <akim@epita.fr>
6930 * src/system.h: We don't need nor want bcopy.
6931 Throw away MS-DOS crap: we don't need getpid.
6932 * configure.in: We don't need strndup. It was even causing
6933 problems: because Flex includes the headers *before* us,
6934 _GNU_SOURCE is not defined by config.h, and therefore strndup was
6936 * lib/xstrndup.c: New.
6937 * src/scan-skel.l: Use it.
6938 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
6939 * src/parse-skel.y: Use %directives instead of #defines.
6941 2001-12-30 Akim Demaille <akim@epita.fr>
6943 * src/skeleton.h: New.
6944 * src/output.c (output_parser, output_master_parser): Remove, dead
6946 * src/output.h (get_lines_number, actions_output, guards_output)
6947 (token_definitions_output): Prototype them.
6948 * src/parse-skel.y: Add the license notice.
6949 Include output.h and skeleton.h.
6950 (process_skeleton): Returns void, and takes a single parameter.
6951 * src/scan-skel.l: Add the license notice.
6953 Don't use %option yylineno: it seems that then Flex imagines
6954 REJECT has been used, and therefore it won't reallocate its
6955 buffers (which makes no other sense to me than a bug). It results
6956 in warnings for `unused: yy_flex_realloc'.
6958 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
6960 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6961 (MUSCLE_INSERT_PREFIX): ...to there.
6962 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6963 (MUSCLE_INSERT_PREFIX): Move from here...
6965 * src/bison.hairy: Add a section directive. Put braces around muscle
6966 names. This parser skeleton is still broken, but Bison should not
6967 choke on a bad muscle 'syntax'.
6968 * src/bison.simple: Add a section directive. Put braces around muscle
6971 * src/files.h (strsuffix, stringappend): Add declarations.
6972 (tab_extension): Add declaration.
6973 (short_base_name): Add declaration.
6975 * src/files.c (strsuffix, stringappend): No longer static. These
6976 functions are used in the skeleton parser.
6977 (tab_extension): New.
6978 (compute_base_names): Use the computations done in this function
6979 to guess if the generated parsers should have '.tab' in their
6981 (short_base_name): No longer static.
6983 * src/output.c (output_skeleton): New.
6984 (output): Disable call to output_master_parser, and give a try to
6985 a new skeleton handling system.
6986 (guards_output, actions_output): No longer static.
6987 (token_definitions_output, get_lines_number): No longer static.
6989 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
6991 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
6994 * src/parse-skel.y: New file.
6995 * src/scan-skel.l: New file.
6997 2001-12-29 Akim Demaille <akim@epita.fr>
6999 %name-prefix is broken.
7001 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
7002 Adjust all dependencies.
7003 * tests/headers.at (export YYLTYPE): Strengthen this test: use
7006 Renaming yylval but not yylloc is not consistent. Now we do.
7008 * src/bison.simple: Prefix yylloc if used.
7009 * doc/bison.texinfo (Decl Summary): Document that.
7011 2001-12-29 Akim Demaille <akim@epita.fr>
7013 * doc/bison.texinfo: Promote `%long-directive' over
7015 Remove all references to fixed-output-files, yacc is enough.
7017 2001-12-29 Akim Demaille <akim@epita.fr>
7019 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
7020 user prologue. These are defaults.
7021 * tests/actions.at (Mid-rule actions): Make sure the user can
7022 define YYDEBUG and YYERROR_VERBOSE.
7024 2001-12-29 Akim Demaille <akim@epita.fr>
7026 * src/output.c (header_output): Don't forget to export YYLTYPE and
7028 * tests/headers.at (export YYLTYPE): New, make sure it does.
7029 * tests/regression.at (%union and --defines, Invalid CPP headers):
7031 * tests/headers.at: here.
7033 2001-12-29 Akim Demaille <akim@epita.fr>
7035 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
7037 2001-12-29 Akim Demaille <akim@epita.fr>
7039 * tests/actions.at (Mid-rule actions): Output on a single line
7042 2001-12-29 Akim Demaille <akim@epita.fr>
7044 * doc/bison.texinfo: Formatting changes.
7046 2001-12-29 Akim Demaille <akim@epita.fr>
7048 Don't store the token defs in a muscle, just be ready to output it
7049 on command. Now possible via `symbols'. Fixes a memory leak.
7051 * src/output.c (token_definitions_output): New.
7052 (output_parser, header_output): Use it.
7053 * src/reader.c (symbols_save): Remove.
7055 2001-12-29 Akim Demaille <akim@epita.fr>
7057 * src/bison.simple: Do not provide a default for YYSTYPE and
7058 YYLTYPE before the user's prologue. Otherwise it's hardly... a
7061 2001-12-29 Akim Demaille <akim@epita.fr>
7063 Mid-rule actions are simply... ignored!
7065 * src/reader.c (readgram): Be sure to attach mid-rule actions to
7066 the empty-rule associated to the dummy symbol, not to the host
7068 * tests/actions.at (Mid-rule actions): New.
7070 2001-12-29 Akim Demaille <akim@epita.fr>
7074 * src/reader.c (reader): Free grammar.
7076 2001-12-29 Akim Demaille <akim@epita.fr>
7080 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
7081 since it allocates it for each state, although only one is needed.
7082 (allocate_storage): Do it here.
7084 2001-12-29 Akim Demaille <akim@epita.fr>
7086 * src/options.h, src/options.c (create_long_option_table): Rename
7088 (long_option_table_new): this, with a clearer prototype.
7089 (percent_table): Remove, unused,
7090 * src/getargs.c (getargs): Adjust.
7092 2001-12-29 Akim Demaille <akim@epita.fr>
7094 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
7095 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
7098 2001-12-29 Akim Demaille <akim@epita.fr>
7100 * src/lalr.c (build_relations): Rename `states' as `states1'.
7101 Sorry, I don't understand exactly what it is, no better name...
7103 2001-12-29 Akim Demaille <akim@epita.fr>
7105 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
7106 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
7107 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
7110 2001-12-29 Akim Demaille <akim@epita.fr>
7112 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
7115 2001-12-29 Akim Demaille <akim@epita.fr>
7117 * src/reader.c, src/reader.h (user_toknums): Remove.
7118 Adjust all users to use symbols[i]->user_token_number.
7120 2001-12-29 Akim Demaille <akim@epita.fr>
7122 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
7123 Adjust all users to use symbols[i]->prec or ->assoc.
7125 2001-12-29 Akim Demaille <akim@epita.fr>
7127 * src/reader.c, src/reader.h (tags): Remove.
7128 Adjust all users to use symbols[i]->tag.
7130 2001-12-29 Akim Demaille <akim@epita.fr>
7132 * src/gram.h, src/gram.c (symbols): New, similar to state_table
7134 * src/reader.c (packsymbols): Fill this table.
7136 * src/conflicts.c (resolve_sr_conflict): Adjust.
7137 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
7139 Use symbols[i]->tag instead of tags[i].
7141 2001-12-29 Akim Demaille <akim@epita.fr>
7143 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
7144 In addition, put a comment in there, to replace...
7145 * tests/regression.at (%union and C comments): Remove.
7147 2001-12-29 Akim Demaille <akim@epita.fr>
7149 * tests/regression.at (Web2c Actions): Blindly move the actual
7150 output as expected output. The contents *seem* right to me, but I
7151 can't pretend reading perfectly parser tables... Nonetheless, all
7152 the other tests pass correctly, the table look OK, even though the
7153 presence of `$axiom' is to be noted: AFAICS it is useless (but
7156 2001-12-29 Akim Demaille <akim@epita.fr>
7158 * src/reader.c (readgram): Don't add the rule 0 if there were no
7159 rules read. In other words, add it _after_ having performed
7160 grammar sanity checks.
7161 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
7163 2001-12-29 Akim Demaille <akim@epita.fr>
7165 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
7166 visible, and some states have now a different number.
7168 2001-12-29 Akim Demaille <akim@epita.fr>
7170 * src/reader.c (readgram): Bind the initial rule's lineno to that
7172 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
7173 (Solved SR Conflicts): Adjust rule 0's line number.
7175 2001-12-29 Akim Demaille <akim@epita.fr>
7177 Fix the `GAWK Grammar' failure.
7179 * src/LR0.c (final_state): Initialize to -1 so that we do compute
7180 the reductions of the first state which was mistakenly confused
7181 with the final state because precisely final_state was initialized
7183 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
7184 now noticed by Bison.
7185 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
7186 have a reduction on $default.
7188 2001-12-29 Akim Demaille <akim@epita.fr>
7190 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
7192 * src/closure.c (print_closure): Likewise.
7193 * src/derives.c (print_derives): Likewise.
7194 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
7197 2001-12-29 Akim Demaille <akim@epita.fr>
7199 * src/lalr.c (lookaheads_print): New.
7200 (lalr): Call it when --trace-flag.
7201 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
7204 2001-12-29 Akim Demaille <akim@epita.fr>
7206 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
7207 when walking through ritem, even via rule->rhs.
7208 * src/reduce.c (dump_grammar, useful_production, reduce_output)
7209 (useful_production, useless_nonterminals): Likewise.
7210 (reduce_grammar_tables): Likewise, plus update nritems.
7211 * src/nullable.c (set_nullable): Likewise.
7212 * src/lalr.c (build_relations): Likewise.
7213 * tests/sets.at (Nullable): Adjust.
7214 Fortunately, now, the $axiom is no longer nullable.
7216 2001-12-29 Akim Demaille <akim@epita.fr>
7218 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
7220 * src/gram.c (ritem_longest_rhs): Likewise.
7221 * src/reduce.c (nonterminals_reduce): Likewise.
7222 * src/print_graph.c (print_graph): Likewise.
7223 * src/output.c (output_rule_data): Likewise.
7224 * src/nullable.c (set_nullable): Likewise.
7226 2001-12-29 Akim Demaille <akim@epita.fr>
7228 * src/output.c: Comment changes.
7230 2001-12-27 Paul Eggert <eggert@twinsun.com>
7232 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
7233 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
7234 Sparc, as they were causing more porting problems than the
7235 (minor) performance improvement was worth.
7237 Also, catch up with 1.31's YYSTD.
7239 2001-12-27 Akim Demaille <akim@epita.fr>
7241 * src/output.c (output_gram): Rely on nritems, not the
7242 0-sentinel. See below.
7243 Use -1 as separator, not 0.
7244 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
7245 Rely on -1 as separator in yyrhs, instead of 0.
7246 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
7247 twice `Now at end of input', therefore there are two lines less to
7250 2001-12-27 Akim Demaille <akim@epita.fr>
7252 * tests/regression.at (Unresolved SR Conflicts):
7253 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
7256 2001-12-27 Akim Demaille <akim@epita.fr>
7258 * src/LR0.c (new_state): Recognize the final state by the fact it
7259 is reached by eoftoken.
7260 (insert_start_shifting_state, insert_eof_shifting_state)
7261 (insert_accepting_state, augment_automaton): Remove, since now
7262 these states are automatically computed from the initial state.
7263 (generate_states): Adjust.
7264 * src/print.c: When reporting a rule number to the user, substract
7265 1, so that the axiom rule is rule 0, and the first user rule is 1.
7266 * src/reduce.c: Likewise.
7267 * src/print_graph.c (print_core): For the time being, just as for
7268 the report, depend upon --trace-flags to dump the full set of
7270 * src/reader.c (readgram): Once the grammar read, insert the rule
7271 0: `$axiom: START-SYMBOL $'.
7272 * tests/set.at: Adjust: rule 0 is now displayed, and since the
7273 number of the states has changed (the final state is no longer
7274 necessarily the last), catch up.
7276 2001-12-27 Akim Demaille <akim@epita.fr>
7278 Try to make the use of the eoftoken valid. Given that its value
7279 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
7280 is used instead of > 0 where appropriate, (ii), depend upon nritems
7281 instead of the 0-sentinel.
7283 * src/gram.h, src/gram.c (nritems): New.
7284 Expected to be duplication of nitems, but for the time being...
7285 * src/reader.c (packgram): Assert nritems and nitems are equal.
7286 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
7287 * src/closure.c (print_closure, print_fderives): Likewise.
7288 * src/gram.c (ritem_print): Likewise.
7289 * src/print.c (print_core, print_grammar): Likewise.
7290 * src/print_graph.c: Likewise.
7292 2001-12-27 Akim Demaille <akim@epita.fr>
7294 * src/main.c (main): If there are complains after grammar
7295 reductions, then output the report anyway if requested, then die.
7296 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
7297 * src/reader.c (eoftoken): New.
7298 (parse_token_decl): If the token being defined has value `0', it
7300 (packsymbols): No longer hack `tags' to insert `$' by hand.
7301 Be sure to preserve the value of the eoftoken.
7302 (reader): Make sure eoftoken is defined.
7303 Initialize nsyms to 0: now eoftoken is created just like the others.
7304 * src/print.c (print_grammar): Don't special case the eof token.
7305 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
7306 lie anyway, albeit pleasant.
7307 * tests/calc.at: Exercise error messages with eoftoken.
7308 Change the grammar so that empty input is invalid.
7309 Adjust expectations.
7310 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
7312 2001-12-27 Akim Demaille <akim@epita.fr>
7314 * configure.in: Check the protos of strchr ans strspn.
7315 Replace strchr if needed.
7316 * src/system.h: Provide the protos of strchr, strspn and memchr if
7318 * lib/strchr.c: New.
7319 * src/reader.c (symbols_save): Use strchr.
7321 2001-12-27 Akim Demaille <akim@epita.fr>
7323 * src/print.c, src/print_graph.c (escape): New.
7324 Use it to quote the TAGS outputs.
7325 * src/print_graph.c (print_state): Now errors are in red, and
7326 reductions in green.
7327 Prefer high to wide: output the state number on a line of its own.
7329 2001-12-27 Akim Demaille <akim@epita.fr>
7331 * src/state.h, src/state.c (reductions_new): New.
7332 * src/LR0.c (set_state_table): Let all the states have a
7333 `reductions', even if reduced to 0.
7334 (save_reductions): Adjust.
7335 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
7336 * src/print.c (print_reductions, print_actions): Adjust.
7337 * src/output.c (action_row): Adjust.
7339 2001-12-27 Akim Demaille <akim@epita.fr>
7341 * src/state.h, src/state.c (errs_new, errs_dup): New.
7342 * src/LR0.c (set_state_table): Let all the states have an errs,
7343 even if reduced to 0.
7344 * src/print.c (print_errs, print_reductions): Adjust.
7345 * src/output.c (output_actions, action_row): Adjust.
7346 * src/conflicts.c (resolve_sr_conflict): Adjust.
7348 2001-12-27 Akim Demaille <akim@epita.fr>
7350 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
7352 2001-12-27 Akim Demaille <akim@epita.fr>
7354 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
7355 * src/print.c: here.
7356 (lookaheadset, shiftset): New, used as additional storage by
7358 (print_results): Adjust.
7359 (print_shifts, print_gotos, print_errs): New, extracted from...
7360 (print_actions): here.
7361 * src/print_graph.c (print_actions): Remove dead code.
7363 2001-12-27 Akim Demaille <akim@epita.fr>
7365 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
7368 2001-12-27 Akim Demaille <akim@epita.fr>
7370 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
7371 (build_relations): Adjust.
7373 2001-12-27 Akim Demaille <akim@epita.fr>
7375 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
7378 2001-12-27 Akim Demaille <akim@epita.fr>
7380 * src/reader.c (packgram): Catch nitems overflows.
7382 2001-12-27 Akim Demaille <akim@epita.fr>
7384 * src/files.c, src/files.h (guard_obstack): Remove.
7385 * src/output.c (output): Adjust.
7386 * src/reader.c (parse_braces): New, factoring...
7387 (copy_action, copy_guard): these two which are renamed as...
7388 (parse_action, parse_guard): these.
7389 As a voluntary consequence, using braces around guards is now
7392 2001-12-27 Akim Demaille <akim@epita.fr>
7394 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
7395 * src/reader.c (symbol_list): `guard' and `guard_line' are new
7397 (symbol_list_new): Adjust.
7398 (copy_action): action_line is the first line, not the last.
7399 (copy_guard): Just as for actions, store the `action' only, not
7400 the switch/case/break flesh.
7401 Don't parse the user action that might follow the guard, let...
7402 (readgram): do it, i.e., now, there can be an action after a
7404 In other words the guard is just explicitly optional.
7406 * src/output.c (guards_output): New.
7407 (output_parser): Call it when needed.
7408 (output): Also free the guard and attrs obstacks.
7409 * src/files.c, src/files.h (obstack_save): Remove.
7410 (output_files): Remove.
7411 As a result, if one needs the former `.act' file, using an
7412 appropriate skeleton which requires actions and guards is now
7414 * src/main.c (main): Adjust.
7415 * tests/semantic.at: New.
7416 * tests/regression.at: Use `input.y' as input file name.
7417 Avoid 8+3 problems by requiring input.c when the test needs the
7420 2001-12-27 Akim Demaille <akim@epita.fr>
7422 * src/reader.c (symbol_list_new): Be sure to initialize all the
7425 2001-12-27 Akim Demaille <akim@epita.fr>
7427 All the hacks using a final pseudo state are now useless.
7429 * src/LR0.c (set_state_table): state_table holds exactly nstates.
7430 * src/lalr.c (nLA): New.
7431 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
7432 instead of lookaheadsp from the pseudo state (nstate + 1).
7434 2001-12-27 Akim Demaille <akim@epita.fr>
7436 * src/output.c (action_row, token_actions): Use a state_t instead
7437 of a integer, and nlookaheads instead of the following state's
7440 2001-12-27 Akim Demaille <akim@epita.fr>
7442 * src/conflicts.c (log_resolution, flush_shift)
7443 (resolve_sr_conflict, set_conflicts, solve_conflicts)
7444 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
7445 (conflicts_print, print_reductions): Use a state_t instead of an
7446 integer when referring to a state.
7447 As much as possible, depend upon nlookaheads, instead of the
7448 `lookaheadsp' member of the following state (since lookaheads of
7449 successive states are successive, the difference between state n + 1
7450 and n served as the number of lookaheads for state n).
7451 * src/lalr.c (add_lookback_edge): Likewise.
7452 * src/print.c (print_core, print_actions, print_state)
7453 (print_results): Likewise.
7454 * src/print_graph.c (print_core, print_actions, print_state)
7455 (print_graph): Likewise.
7456 * src/conflicts.h: Adjust.
7458 2001-12-27 Akim Demaille <akim@epita.fr>
7460 * src/bison.hairy: Formatting/comment changes.
7462 Remove `register' indications.
7463 Add plenty of `static'.
7465 2001-12-27 Akim Demaille <akim@epita.fr>
7467 * src/output.c (prepare): Drop the muscle `ntbase' which
7469 * src/bison.simple: Formatting/comment changes.
7470 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
7471 is an undocumented synonym.
7473 2001-12-22 Akim Demaille <akim@epita.fr>
7475 * src/output.c (output_table_data): Change the prototype to use
7476 `int' for array ranges: some invocations do pass an int, not a
7478 Reported by Wayne Green.
7480 2001-12-22 Akim Demaille <akim@epita.fr>
7482 Some actions of web2c.y are improperly triggered.
7483 Reported by Mike Castle.
7485 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
7486 * tests/regression.at (Web2c): Rename as...
7487 (Web2c Report): this.
7488 (Web2c Actions): New.
7490 2001-12-22 Akim Demaille <akim@epita.fr>
7492 Reductions in web2c.y are improperly reported.
7493 Reported by Mike Castle.
7495 * src/conflicts.c (print_reductions): Fix.
7496 * tests/regression.at (Web2c): New.
7498 2001-12-18 Akim Demaille <akim@epita.fr>
7500 Some host fail on `assert (!"foo")', which expands to
7501 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
7502 Reported by Nelson Beebee.
7504 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
7505 `#define it_succeeded 0' and `assert (it_succeeded)'.
7507 2001-12-17 Marc Autret <autret_m@epita.fr>
7509 * src/bison.simple: Don't hard code the skeleton line and filename.
7510 * src/output.c (output_parser): Rename 'line' as 'output_line'.
7511 New line counter 'skeleton_line' (skeleton-line muscle).
7513 2001-12-17 Paul Eggert <eggert@twinsun.com>
7515 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
7516 YYDEBUG must be defined to a nonzero value.
7518 * src/bison.simple (yytname): Do not assume that the user defines
7519 YYDEBUG to a properly parenthesized expression.
7521 2001-12-17 Akim Demaille <akim@epita.fr>
7523 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
7524 nlookaheads is a new member.
7526 * src/lalr.h (nlookaheads): Remove this orphan declaration.
7527 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
7530 2001-12-17 Akim Demaille <akim@epita.fr>
7532 * src/files.h, src/files.c (open_files, close_files): Remove.
7533 * src/main.c (main): Don't open/close files, nor invoke lex_free,
7535 * src/reader.c (reader): Do it.
7537 2001-12-17 Akim Demaille <akim@epita.fr>
7539 * src/conflicts.c (print_reductions): Formatting changes.
7541 2001-12-17 Akim Demaille <akim@epita.fr>
7543 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
7544 (flush_reduce): New.
7545 (resolve_sr_conflict): Adjust.
7547 2001-12-17 Akim Demaille <akim@epita.fr>
7549 * src/output.c (output_obstack): Be static and rename as...
7550 (format_obstack): this, to avoid any confusion with files.c's
7552 * src/reader.h (muscle_obstack): Move to...
7553 * src/output.h: here, since it's defined in output.c.
7555 2001-12-17 Akim Demaille <akim@epita.fr>
7557 * src/output.c (action_row, save_column, default_goto)
7558 (sort_actions, matching_state, pack_vector): Better variable
7561 2001-12-17 Akim Demaille <akim@epita.fr>
7563 * src/output.c: Various formatting changes.
7565 2001-12-17 Akim Demaille <akim@epita.fr>
7567 * src/files.c (output_files): Free the output_obstack.
7568 * src/main.c (main): Call print and print_graph conditionally.
7569 * src/print.c (print): Work unconditionally.
7570 * src/print_graph.c (print_graph): Work unconditionally.
7571 * src/conflicts.c (log_resolution): Output only if verbose_flag.
7573 2001-12-16 Marc Autret <autret_m@epita.fr>
7575 * src/output.c (actions_output): Fix. When we use %no-lines,
7576 there is one less line per action.
7578 2001-12-16 Marc Autret <autret_m@epita.fr>
7580 * src/bison.simple: Remove a useless #line directive.
7581 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
7582 * src/output.c (get_lines_number): New.
7583 (output_parser): Adjust, now takes care about the lines of a
7586 (actions_output): Computes the number of lines taken by actions.
7587 (output_master_parser): Insert new skeleton which is the name of
7588 the output parser file name.
7590 2001-12-15 Marc Autret <autret_m@epita.fr>
7592 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
7594 2001-12-15 Marc Autret <autret_m@epita.fr>
7596 * src/output.c (output_gram): Keep track of the hairy one.
7598 2001-12-15 Akim Demaille <akim@epita.fr>
7600 Make `make distcheck' work.
7602 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
7603 system.h which uses libgettext.h.
7605 2001-12-15 Akim Demaille <akim@epita.fr>
7607 * src/nullable.c (set_nullable): Useless rules must be skipped,
7608 otherwise, since we range over their symbols, we might look at a
7609 nonterminal which no longer ``exists'', i.e., it is not counted in
7610 `nvars', hence we overflow our arrays.
7612 2001-12-15 Akim Demaille <akim@epita.fr>
7614 The header can also be produced directly, without any obstack!
7617 * src/files.c, src/files.h (defines_obstack): Remove.
7618 (compute_header_macro): Global.
7619 (defines_obstack_save): Remove.
7620 * src/reader.c (parse_union_decl): No longer output to
7621 defines_obstack: its content can be found in the `stype' muscle
7623 (output_token_translations): Merge into...
7624 (symbols_output): this.
7626 (symbols_save): this.
7628 * src/output.c (header_output): New.
7631 2001-12-15 Akim Demaille <akim@epita.fr>
7633 * src/reader.c (parse_union_decl): Instead of handling two obstack
7634 simultaneously, use one to define the `stype' muscle, and use the
7635 value of the latter to fill defines_obstack.
7636 (copy_comment): Remove.
7637 (copy_comment2): Work for a single obstack.
7639 (copy_comment): this.
7641 2001-12-15 Akim Demaille <akim@epita.fr>
7643 * src/lex.c, src/lex.h (xgetc): No longer static.
7644 * src/reader.c (parse_union_decl): Revamp.
7646 2001-12-15 Akim Demaille <akim@epita.fr>
7648 Still making progress in separating Bison into (i) input, (ii)
7649 process, (iii) output: now we can directly output the parser file
7650 without using table_obstack at all.
7652 * src/files.c, src/files.h (table_obstack): Bye bye.
7653 (parser_file_name): New.
7654 * src/files.c (compute_output_file_names): Compute it.
7655 * src/output.c (actions_output, output_parser)
7656 (output_master_parser): To a file instead of an obstack.
7658 2001-12-15 Akim Demaille <akim@epita.fr>
7660 Attach actions to rules, instead of pre-outputting them to
7663 * src/gram.h (rule_t): action and action_line are new members.
7664 * src/reader.c (symbol_list): Likewise.
7665 (copy_action): Save the actions within the rule.
7666 (packgram): Save them in rule_table.
7667 * src/output.c (actions_output): New.
7668 (output_parser): Use it on `%%actions'.
7669 (output_rule_data): Don't free rule_table.
7671 (prepare): Don't save the `action' muscle.
7672 * src/bison.simple: s/%%action/%%actions/.
7674 2001-12-15 Akim Demaille <akim@epita.fr>
7676 * src/reader.c (copy_action): When --yacc, don't append a `;'
7677 to the user action: let it fail if lacking.
7678 Suggested by Arnold Robbins and Tom Tromey.
7680 2001-12-14 Akim Demaille <akim@epita.fr>
7682 * src/lex.c (literalchar): Simply return the char you decoded, non
7683 longer mess around with obstacks and int pointers.
7686 2001-12-14 Akim Demaille <akim@epita.fr>
7688 * src/lex.c (literalchar): Don't escape the special characters,
7689 just decode them, and keep them as char (before, eol was output as
7690 the 2 char string `\n' etc.).
7691 * src/output.c (output_rule_data): Use quotearg to output the
7694 2001-12-13 Paul Eggert <eggert@twinsun.com>
7696 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
7697 Do not infringe on the global user namespace when using C++.
7698 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
7699 All uses of `fprintf' and `stderr' changed.
7701 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
7703 2001-12-13 Akim Demaille <akim@epita.fr>
7705 The computation of nullable is broken: it doesn't handle empty
7708 * tests/torture.at (GNU AWK Grammar): New.
7709 * tests/sets.at (Nullable): New.
7710 * src/nullable.c (set_nullable): Instead of blindly looping over
7711 `ritems', loop over the rules, and then over their rhs's.
7713 Work around Autotest bugs.
7715 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
7716 frame, because Autotest understand lines starting with a `+' as
7717 traces from the shell. Then, they are not processed properly.
7718 Admittedly an Autotest bug, but we don't have time to wait for
7719 Autotest to catch up.
7720 * tests/regression.at (Broken Closure): Adjust to the new table
7723 * tests/sets.at: here.
7725 2001-12-13 Akim Demaille <akim@epita.fr>
7727 * src/closure.c (closure): Use nrules instead of playing tricks
7730 2001-12-13 Akim Demaille <akim@epita.fr>
7732 * src/print.c (print_actions): Output the handling of `$' as the
7733 traces do: shifting the token EOF. Before EOF was treated as a
7735 * tests/regression.at: Adjust some tests.
7736 * src/print_graph.c (print_core): Complete the set of items via
7737 closure. The next-to-final and final states are still unsatisfying,
7738 but that's to be addressed elsewhere.
7739 No longer output the rule numbers, but do output the state number.
7740 A single loop for the shifts + gotos is enough, but picked a
7741 distinct color for each.
7742 (print_graph): Initialize and finalize closure.
7744 2001-12-13 Akim Demaille <akim@epita.fr>
7746 * src/reader.c (readgram): Remove dead code, an strip useless
7748 (get_type): Remove, unused.
7750 2001-12-12 Akim Demaille <akim@epita.fr>
7752 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
7753 on that of lib/error.c.
7755 2001-12-12 Akim Demaille <akim@epita.fr>
7757 Some hosts don't like `/' in includes.
7759 * src/system.h: Include libgettext.h without qualifying the path.
7760 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
7763 2001-12-11 Marc Autret <autret_m@epita.fr>
7765 * src/output.c (output_parser): Remove useless muscle.
7767 2001-12-11 Marc Autret <autret_m@epita.fr>
7769 * src/bison.simple: Remove #line just before %%epilogue. It
7770 is now handled in ...
7771 * src/reader.c (read_additionnal_code): Add the output of a
7772 #line for the epilogue.
7774 2001-12-10 Marc Autret <autret_m@epita.fr>
7776 * src/reader.c (copy_definition): Re-use CPP-outed code which
7777 replace precedent remove.
7778 * src/bison.simple: Remove #line before %%prologue because
7779 %%input-line is wrong at this time.
7781 2001-12-10 Marc Autret <autret_m@epita.fr>
7783 * src/reader.c (symbols_output): Clean up.
7784 * src/output.c (output_gram, output): Clean up.
7786 2001-12-10 Akim Demaille <akim@epita.fr>
7788 * src/lalr.c (initialize_lookaheads): New. Extracted from...
7789 * src/LR0.c (set_state_table): here.
7790 * src/lalr.c (lalr): Call it.
7792 2001-12-10 Akim Demaille <akim@epita.fr>
7794 * src/state.h (shifts): Remove the `number' member: shifts are
7795 attached to state, hence no longer need to be labelled with a
7798 2001-12-10 Akim Demaille <akim@epita.fr>
7800 Now that states have a complete set of members, the linked list of
7801 shifts is useless: just fill directly the state's shifts member.
7803 * src/state.h (shifts): Remove the `next' member.
7804 * src/LR0.c (first_state, last_state): Remove.
7806 (augment_automaton): Don't look for the shifts that must be added
7807 a shift on EOF: it is those of the state we looked for! But now,
7808 since shifts are attached, it is no longer needed to looking
7809 merely by its id: its number.
7811 2001-12-10 Akim Demaille <akim@epita.fr>
7813 * src/LR0.c (augment_automaton): Better variable locality.
7814 Remove an impossible branch: if there is a state corresponding to
7815 the start symbol being shifted, then there is shift for the start
7816 symbol from the initial state.
7818 2001-12-10 Akim Demaille <akim@epita.fr>
7820 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
7821 only when appropriate: when insert_start_shifting_state' is not
7823 * tests/regression.at (Rule Line Numbers): Adjust.
7825 2001-12-10 Akim Demaille <akim@epita.fr>
7827 * src/LR0.c (augment_automaton): Now that all states have shifts,
7828 merge the two cases addition shifts to the initial state.
7830 2001-12-10 Akim Demaille <akim@epita.fr>
7832 * src/lalr.c (set_state_table): Move to...
7834 * src/lalr.c (lalr): Don't call it...
7835 * src/LR0.c (generate_states): do it.
7836 * src/LR0.h (first_state): Remove, only the table is used.
7838 2001-12-10 Akim Demaille <akim@epita.fr>
7840 * src/LR0.h (first_shift, first_reduction): Remove.
7841 * src/lalr.c: Don't use first_shift: find shifts through the
7844 2001-12-10 Akim Demaille <akim@epita.fr>
7846 * src/LR0.c: Attach shifts to states as soon as they are
7848 * src/lalr.c (set_state_table): Instead of assigning shifts to
7849 state, just assert that the mapping was properly done.
7851 2001-12-10 Akim Demaille <akim@epita.fr>
7853 * src/LR0.c (insert_start_shift): Rename as...
7854 (insert_start_shifting_state): this.
7855 (insert_eof_shifting_state, insert_accepting_state): New.
7856 (augment_automaton): Adjust.
7857 Better locality of the variables.
7858 When looking if the start_symbol is shifted from the initial
7859 state, using `while (... symbol != start_symbol ...)' sounds
7860 better than `while (... symbol < start_symbol ...)': If fail
7861 to see how the order between symbols could be relevant!
7863 2001-12-10 Akim Demaille <akim@epita.fr>
7865 * src/getargs.h: Don't declare `spec_name_prefix' and
7866 `spec_file_prefix', declared by src/files.h.
7867 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
7868 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
7869 * src/output.c (prepare): Adjust.
7870 * src/reader.c (symbols_output): Likewise.
7871 * src/vmsgetargs.c: Vaguely adjust, but who cares?
7873 2001-12-10 Akim Demaille <akim@epita.fr>
7875 * src/muscle_tab.c (muscle_init): NULL is a better default than
7878 2001-12-10 Akim Demaille <akim@epita.fr>
7880 * src/reader.c (reader): Calling symbols_output once is enough.
7882 2001-12-10 Akim Demaille <akim@epita.fr>
7884 Now that states have a complete set of members, the linked list of
7885 reductions is useless: just fill directly the state's reductions
7888 * src/state.h (struct reductions): Remove member `number' and
7890 * src/LR0.c (first_reduction, last_reduction): Remove.
7891 (save_reductions): Don't link the new reductions, store them in
7893 * src/lalr.c (set_state_table): No need to attach reductions to
7894 states, it's already done.
7895 * src/output.c (output_actions): No longer free the shifts, then
7896 the reductions, then the states: free all the states and their
7899 2001-12-10 Akim Demaille <akim@epita.fr>
7901 * src/options.c (OPTN, DRTV, BOTH): New.
7902 (option_table): Use them.
7904 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
7905 the job of system.h.
7906 * src/options.c: Don't include stdio.h and xalloc.h for the same
7909 2001-12-10 Akim Demaille <akim@epita.fr>
7911 * src/output.c (output, prepare): Make sure the values of the
7912 muscles `action' and `prologue' are 0-terminated.
7914 2001-12-10 Akim Demaille <akim@epita.fr>
7916 Clean up GCC warnings.
7918 * src/reader.c (copy_action): `buf' is not used.
7919 (parse_skel_decl): Be static.
7920 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
7921 * src/options.h (create_long_option_table): Have a real prototype.
7922 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
7923 (hash_delete_at): Return const void *.
7924 Adjust casts to preserve the const.
7926 2001-12-10 Akim Demaille <akim@epita.fr>
7928 * configure.in: Require 2.52g.
7929 M4 is not needed, but AUTOM4TE is.
7931 * tests/Makefile.am: Adjust.
7933 2001-12-10 Akim Demaille <akim@epita.fr>
7935 One structure for states is enough, even though theoretically
7936 there are LR(0) states and LALR(1) states.
7938 * src/lalr.h (state_t): Remove.
7939 (state_table): Be state_t **, not state_t *.
7940 * src/state.h (core, CORE_ALLOC): Rename as...
7941 (state_t, STATE_ALLOC): this.
7942 Add the LALR(1) members: shifts, reductions, errs.
7943 * src/LR0.c (state_table): Rename as...
7944 (state_hash): this, to avoid name clashes with the global
7946 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
7947 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
7949 2001-12-10 Akim Demaille <akim@epita.fr>
7951 Bison dumps core on bash.y.
7952 Reported by Pascal Bart.
7954 * src/warshall.c (bitmatrix_print): New.
7956 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
7957 j must be the outer loop.
7958 * tests/regression.at (Broken Closure): New.
7960 2001-12-05 Akim Demaille <akim@epita.fr>
7962 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
7964 Reported by Peter Hamorsky.
7966 2001-12-05 Akim Demaille <akim@epita.fr>
7968 * src/conflicts.c (err_table): Remove.
7969 (resolve_sr_conflict): Adjust.
7970 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
7972 (state_t.reductions, state_t.shifts): this.
7974 2001-12-05 Akim Demaille <akim@epita.fr>
7976 * src/reduce.c (reduce_grammar_tables): No longer disable the
7977 removal of useless rules via CPP but via `if (0)', so that the
7978 compiler still check the code is valid.
7979 For instance, it should have noticed `rline' no longer exists: use
7980 the `line' member of rule_t.
7981 * src/gram.c (dummy, rline): Remove, unused.
7983 2001-12-05 Akim Demaille <akim@epita.fr>
7985 * src/output.c (pack_vector): Use assert, not berror.
7986 * src/main.c (berror): Remove, unused.
7988 2001-12-05 Akim Demaille <akim@epita.fr>
7990 New experimental feature: if --verbose --trace output all the
7991 items of a state, not only its kernel.
7993 * src/print.c (print_core): If `trace_flag', then invoke closure
7994 before outputting the items of the state (print_core is no longer
7995 a correct name them).
7996 (print_results): Invoke new_closure/free_closure if needed.
7998 2001-12-05 Akim Demaille <akim@epita.fr>
8000 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
8001 * src/closure.c, src/closure.h (itemsetsize): Rename as...
8002 (nitemset): for consistency with the rest of the project.
8004 2001-12-05 Akim Demaille <akim@epita.fr>
8006 * src/closure.c (print_closure): Improve.
8007 (closure): Use it for printing input and output.
8009 2001-12-05 Akim Demaille <akim@epita.fr>
8011 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
8012 indexed by nonterminals.
8014 2001-12-05 Akim Demaille <akim@epita.fr>
8016 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
8018 * src/warshall.h: Remove accidental duplication of the content.
8020 2001-12-05 Akim Demaille <akim@epita.fr>
8022 * src/closure.c (set_fderives): De-obfuscate.
8024 2001-12-05 Akim Demaille <akim@epita.fr>
8026 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
8028 2001-12-05 Akim Demaille <akim@epita.fr>
8030 * src/closure.c (set_firsts): De-obfuscate.
8032 2001-12-05 Akim Demaille <akim@epita.fr>
8034 * src/output.c (action_row): De-obfuscate
8035 using the good o' techniques: arrays not pointers, variable
8036 locality, BITISSET, RESETBIT etc.
8038 2001-12-05 Akim Demaille <akim@epita.fr>
8040 Pessimize the code to simplify it: from now on, all the states
8041 have a valid SHIFTS, which NSHIFTS is possibly 0.
8043 * src/LR0.c (shifts_new): Be global and move to..
8044 * src/state.c, src/state.h: here.
8045 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
8046 * src/print_graph: Adjust.
8048 2001-12-05 Akim Demaille <akim@epita.fr>
8050 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
8051 * src/conflicts.c: Use it.
8052 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
8053 incorrectly ``simplified''.
8055 2001-12-05 Akim Demaille <akim@epita.fr>
8057 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
8058 using the good o' techniques: arrays not pointers, variable
8059 locality, BITISSET, RESETBIT etc.
8061 2001-12-05 Akim Demaille <akim@epita.fr>
8063 * src/state.h (SHIFT_SYMBOL): New.
8064 * src/conflicts.c: Use it to deobfuscate.
8066 2001-12-05 Akim Demaille <akim@epita.fr>
8068 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
8069 (print_reductions): De-obfuscate using the good o' techniques:
8070 arrays not pointers, variable locality, BITISSET.
8072 2001-12-05 Akim Demaille <akim@epita.fr>
8074 * src/conflicts.c (print_reductions): Arrays, not pointers.
8077 2001-12-05 Akim Demaille <akim@epita.fr>
8079 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8081 2001-12-05 Akim Demaille <akim@epita.fr>
8083 * src/conflicts.c (print_reductions): Improve variable locality.
8085 2001-12-05 Akim Demaille <akim@epita.fr>
8087 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8089 2001-12-05 Akim Demaille <akim@epita.fr>
8091 * src/conflicts.c (print_reductions): Improve variable locality.
8093 2001-12-05 Akim Demaille <akim@epita.fr>
8095 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
8096 * src/lalr.c: Use them.
8098 2001-12-05 Akim Demaille <akim@epita.fr>
8100 * src/LR0.c (augment_automaton): Formatting changes.
8101 Better variable locality.
8103 2001-12-05 Akim Demaille <akim@epita.fr>
8105 * src/lalr.c (matrix_print): New.
8106 (transpose): Use it.
8107 Use arrays instead of pointers.
8109 2001-12-05 Akim Demaille <akim@epita.fr>
8111 * src/lalr.c (maxrhs): Move to...
8112 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
8113 * src/lalr.c (build_relations): Adjust.
8115 2001-12-05 Akim Demaille <akim@epita.fr>
8117 * src/lalr.c (transpose): Free the memory allocated to the
8118 argument, as it is replaced by the results by the unique caller.
8119 (build_relations): Merely invoke transpose: it handles the memory
8121 Improve variable locality.
8122 Avoid variables used as mere abbreviations.
8123 (compute_lookaheads): Use arrays instead of pointers.
8125 2001-12-05 Akim Demaille <akim@epita.fr>
8127 * src/lalr.c (initialize_F): Improve variable locality.
8128 Avoid variables used as mere abbreviations.
8130 2001-12-05 Akim Demaille <akim@epita.fr>
8132 * src/derives.c (print_derives): Display the ruleno.
8133 * src/lalr.c (initialize_F, transpose): Better variable locality
8134 to improve readability.
8135 Avoid variables used as mere abbreviations.
8137 2001-12-05 Akim Demaille <akim@epita.fr>
8139 * src/lalr.c (traverse): Use arrays instead of pointers.
8141 2001-12-05 Akim Demaille <akim@epita.fr>
8143 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
8144 the handling of squeue.
8145 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8147 2001-12-05 Akim Demaille <akim@epita.fr>
8149 Because useless nonterminals are now kept alive (instead of being
8150 `destroyed'), we now sometimes examine them, and store information
8151 related to them. Hence we need to know their number, and adjust
8154 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
8156 * src/LR0.c (allocate_itemsets): The memory allocated to
8157 `symbol_count' was used for two different purpose: once to count
8158 the number of occurrences of each symbol, and later reassigned to
8159 `shift_symbol', containing the symbol that can be shifted from a
8161 Deobfuscate, i.e., allocate, use and free `symbol_count' here
8163 (new_itemsets): Allocate `shift_symbol' here.
8164 (allocate_itemsets): symbol_count includes useless nonterminals.
8166 (free_storage): Use `free', not `XFREE', for pointers that cannot
8169 2001-12-05 Akim Demaille <akim@epita.fr>
8171 * src/nullable.c (set_nullable): Deobfuscate the handling of
8173 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8175 2001-12-05 Akim Demaille <akim@epita.fr>
8177 * src/gram.c, src/gram.h (ritem_print): New.
8178 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
8179 (This useless function was defined only to work around VMS linkers
8180 that can't handle compilation units with variables only).
8181 * src/reduce.c (dump_grammar): Use it to trace the construction of
8184 2001-12-04 Paul Eggert <eggert@twinsun.com>
8186 * src/bison.simple (union yyalloc): Change member names
8187 to be the same as the stack names.
8188 (yyparse): yyptr is now union yyalloc *, not char *.
8189 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
8190 and may generate better code on some machines.
8191 (yystpcpy): Use prototype if __STDC__ is defined, not just
8192 if __cplusplus is defined.
8194 2001-11-30 Akim Demaille <akim@epita.fr>
8196 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
8197 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
8198 Gettext doesn't compile cleanly, and dies with -Werror.
8199 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
8200 Include WARNING_CFLAGS here.
8201 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
8202 before being defined.
8204 2001-11-27 Paul Eggert <eggert@twinsun.com>
8206 * lib/quotearg.h (quotearg_n, quotearg_n_style):
8207 First arg is int, not unsigned.
8208 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
8209 (SIZE_MAX, UINT_MAX): New macros.
8210 (quotearg_n_options): Abort if N is negative.
8211 Avoid overflow check on hosts where size_t is 64 bits and int
8212 is 32 bits, as overflow is impossible there.
8213 Fix off-by-one typo that caused unnecessary reallocation.
8215 2001-11-29 Paul Eggert <eggert@twinsun.com>
8217 Name space cleanup in generated parser.
8219 * doc/bison.texinfo (Bison Parser): Discuss system headers
8220 and their effect on the user name space.
8223 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
8224 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
8225 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
8227 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
8228 on user names when possible.
8230 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
8231 Simplify test for whather <alloca.h> exists.
8233 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
8235 (<stdio.h>): Include if YYDEBUG.
8237 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
8238 ! defined (yyoverflow) && ! defined (yymemcpy).
8240 (yymemcpy, yyparse): Rename local variables as needed so that
8241 they all begin with 'yy'.
8243 (yystrlen, yystpcpy): New functions.
8245 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
8248 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
8249 instead of relying on string.h functions. Use YYSTACK_ALLOC
8250 and YYSTACK_FREE instead of malloc and free.
8252 2001-11-30 Akim Demaille <akim@epita.fr>
8254 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
8255 before their first uses.
8256 (YYBISON, YYPURE): Move to the top of the output.
8258 2001-11-30 Akim Demaille <akim@epita.fr>
8260 * tests/reduce.at (Useless Nonterminals): Fix.
8262 2001-11-30 Akim Demaille <akim@epita.fr>
8264 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
8265 if body instead of `;' to pacify GCC's warnings.
8267 2001-11-30 Akim Demaille <akim@epita.fr>
8269 Instead of mapping the LHS of unused rules to -1, keep the LHS
8270 valid, but flag the rules as invalid.
8272 * src/gram.h (rule_t): `useful' is a new member.
8273 * src/print.c (print_grammar): Adjust.
8274 * src/derives.c (set_derives): Likewise.
8275 * src/reader.c (packgram, reduce_output): Likewise.
8276 * src/reduce.c (reduce_grammar_tables): Likewise.
8277 * tests/reduce.at (Underivable Rules, Useless Rules): New.
8279 2001-11-30 Akim Demaille <akim@epita.fr>
8281 * src/reduce.c (reduce_output): Formatting changes.
8282 * src/print.c (print_results, print_grammar): Likewise.
8283 * tests/regression.at (Rule Line Numbers)
8284 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
8286 2001-11-30 Akim Demaille <akim@epita.fr>
8288 * src/reduce.c (nonterminals_reduce): Instead of throwing away
8289 useless nonterminals, move them at the end of the symbol arrays.
8290 (reduce_output): Adjust.
8291 * tests/reduce.at (Useless Nonterminals): Adjust.
8293 2001-11-30 Akim Demaille <akim@epita.fr>
8295 * src/reduce.c: Various comment/formatting changes.
8296 (nonterminals_reduce): New, extracted from...
8297 (reduce_grammar_tables): here.
8298 (reduce_grammar): Call nonterminals_reduce.
8300 2001-11-29 Paul Eggert <eggert@twinsun.com>
8302 * src/bison.simple (YYSTACK_REALLOC): Remove.
8303 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
8304 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
8306 (union yyalloc): New type.
8307 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
8308 an arbitrary restriction on hosts where size_t is wider than int.
8310 (yyparse): Don't dump core if alloca or malloc fails; instead, report
8311 a parser stack overflow. Allocate just one block of memory for all
8312 three stacks, instead of allocating three blocks; this typically is
8313 faster and reduces fragmentation.
8315 Do not limit the number of items in the stack to a value that fits
8316 in 'int', as this is an arbitrary limit on hosts with 64-bit
8317 size_t and 32-bit int.
8319 2001-11-29 Marc Autret <autret_m@epita.fr>
8321 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
8322 of defining YYERROR_VERBOSE.
8323 [AT_DATA]: $4 is now out of C declarations in the prologue.
8325 2001-11-28 Marc Autret <autret_m@epita.fr>
8327 * src/reader.c (parse_dquoted_param): New.
8328 (parse_skel_decl): Use it.
8329 * src/lex.h: Add its prototype.
8330 * src/lex.c (literalchar): Become not static.
8332 2001-11-28 Marc Autret <autret_m@epita.fr>
8334 * src/output.h: And put its extern declaration here.
8335 * src/output.c (error_verbose): Define here.
8336 (prepare): Echo name modification.
8337 * src/getargs.h: Clean its extern declaration.
8338 * src/getargs.c (error_verbose_flag): Remove.
8339 (getargs): Remove case 'e'.
8340 * src/options.c (option_table): 'error-verbose' is now seen as simple
8344 * src/reader.c (read_declarations): Remove case tok_include.
8345 (parse_include_decl): Remove.
8346 * src/lex.h (token_t): Remove tok_include.
8347 * src/options.c (option_table): 'include' is now a simple command line
8350 2001-11-28 Marc Autret <autret_m@epita.fr>
8352 * src/bison.simple: Adjust muscle names.
8353 * src/muscle_tab.c (muscle_init): Also rename the muscles.
8354 * src/output.c (prepare): s/_/-/ for the muscles names.
8355 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
8357 2001-11-28 Marc Autret <autret_m@epita.fr>
8359 * src/bison.simple: Fix debug.
8360 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
8362 2001-11-28 Akim Demaille <akim@epita.fr>
8364 * src/LR0.c (shifts_new): New.
8365 (save_shifts, insert_start_shift, augment_automaton): Use it.
8367 2001-11-28 Akim Demaille <akim@epita.fr>
8369 * src/closure.c (closure): `b' and `ruleno' denote the same value:
8372 2001-11-28 Akim Demaille <akim@epita.fr>
8374 * src/closure.c (closure): Instead of looping over word in array
8375 then bits in words, loop over bits in array.
8377 2001-11-28 Akim Demaille <akim@epita.fr>
8379 * src/closure.c (closure): No longer optimize the special case
8380 where all the bits of `ruleset[r]' are set to 0, to make the code
8383 2001-11-28 Akim Demaille <akim@epita.fr>
8385 * src/closure.c (closure): `r' and `c' are new variables, used to
8386 de-obfuscate accesses to RULESET and CORE.
8388 2001-11-28 Akim Demaille <akim@epita.fr>
8390 * src/reduce.c (reduce_print): Use ngettext.
8391 (dump_grammar): Improve the trace accuracy.
8393 2001-11-28 Akim Demaille <akim@epita.fr>
8395 * src/reduce.c (dump_grammar): Don't translate trace messages.
8397 2001-11-28 Akim Demaille <akim@epita.fr>
8399 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
8400 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
8401 as all tags are free'ed afterwards.
8404 2001-11-27 Paul Eggert <eggert@twinsun.com>
8406 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
8407 use alloca when we didn't want to, and vice versa.
8409 2001-11-27 Marc Autret <autret_m@epita.fr>
8411 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
8413 * src/output.c (prepare): Remove its update.
8415 2001-11-27 Marc Autret <autret_m@epita.fr>
8417 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
8420 2001-11-27 Marc Autret <autret_m@epita.fr>
8422 * src/bison.simple: Remove YYERROR_VERBOSE using.
8423 Use %%error_verbose.
8424 (yyparse): Likewise.
8425 * src/output.c (prepare): Give its final value.
8426 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
8427 * src/getargs.h: Add its extern declaration.
8428 * src/getargs.c (error_verbose_flag): New int.
8429 (getargs): Update to catch new case.
8430 * src/options.c (option_table): 'error-verbose' is a new option.
8431 (shortopts): Update.
8433 2001-11-27 Akim Demaille <akim@epita.fr>
8435 * src/system.h: Use intl/libgettext.h.
8436 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
8438 2001-11-27 Akim Demaille <akim@epita.fr>
8440 * tests/torture.at (Exploding the Stack Size with Malloc):
8441 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
8443 2001-11-27 Akim Demaille <akim@epita.fr>
8445 * src/files.c: Include error.h.
8446 Reported by Hans Aberg.
8448 2001-11-26 Marc Autret <autret_m@epita.fr>
8450 * src/reader.c (parse_include_decl): New, not yet implemented.
8451 (read_declarations): Add case tok_include.
8452 * src/getargs.h (include): Add its extern definition.
8453 * src/getargs.c (include): New const char *.
8454 (getargs): Add case '-I'.
8455 * src/options.c (option_table): Add include as command line and
8457 * src/lex.h (token_t): Add tok_include.
8459 2001-11-26 Akim Demaille <akim@epita.fr>
8461 * src/reader.c (readgram): Make sure rules for mid-rule actions
8462 have a lineno equal to that of their host rule.
8463 Reported by Hans Aberg.
8464 * tests/regression.at (Rule Line Numbers): New.
8466 2001-11-26 Akim Demaille <akim@epita.fr>
8468 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
8471 2001-11-26 Akim Demaille <akim@epita.fr>
8473 * src/complain.c, src/complain.h (error): Remove, provided by
8476 2001-11-26 Akim Demaille <akim@epita.fr>
8478 * src/reader.c (read_declarations): Don't abort on tok_illegal,
8479 issue an error message.
8480 * tests/regression.at (Invalid %directive): New.
8481 Reported by Hans Aberg.
8483 2001-11-26 Akim Demaille <akim@epita.fr>
8485 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
8486 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8488 2001-11-26 Akim Demaille <akim@epita.fr>
8490 * src/conflicts.c (conflicts_print): Don't complain at all when
8491 there are no reduce/reduce conflicts, and as many shift/reduce
8492 conflicts as expected.
8493 * tests/regression.at (%expect right): Adjust.
8495 2001-11-23 Akim Demaille <akim@epita.fr>
8497 * lib/alloca.c: Update, from fileutils.
8499 2001-11-23 Akim Demaille <akim@epita.fr>
8501 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
8503 2001-11-23 Akim Demaille <akim@epita.fr>
8505 * src/system.h: Include alloca.h.
8506 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
8508 2001-11-23 Akim Demaille <akim@epita.fr>
8510 * src/print_graph.c (print_actions): Remove `rule', unused.
8511 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
8512 pacify GCC's signed < unsigned warnings.
8513 * src/closure.c (itemsetsize): Likewise.
8514 * src/reader.c (symbol_list_new): Static.
8516 2001-11-23 Akim Demaille <akim@epita.fr>
8518 Attaching lineno to buckets is stupid, since only one copy of each
8519 symbol is kept, only the line of the first occurrence is kept too.
8521 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
8522 * src/reader.c (rline_allocated): Remove, unused.
8523 (symbol_list): Have a `line' member.
8524 (symbol_list_new): New.
8526 * src/print.c (print_grammar): Output the rule line numbers.
8527 * tests/regression.at (Solved SR Conflicts)
8528 (Unresolved SR Conflicts): Adjust.
8529 Reported by Hans Aberg.
8531 2001-11-22 Marc Autret <autret_m@epita.fr>
8533 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
8535 2001-11-22 Marc Autret <autret_m@epita.fr>
8537 * src/muscle_tab.c (muscle_init): Remove initialization of
8539 * src/output.c (output_master_parser): Do it here.
8541 2001-11-20 Akim Demaille <akim@epita.fr>
8544 * configure.in (ALL_LINGUAS): Adjust.
8545 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
8546 longer contains strings to translate.
8548 2001-11-19 Akim Demaille <akim@epita.fr>
8550 * src/conflicts.c (conflicts_print): Add a missing \n.
8552 2001-11-19 Akim Demaille <akim@epita.fr>
8554 * src/nullable.c (nullable_print): New.
8555 (set_nullable): Call it when tracing.
8556 Better locality of variables.
8558 2001-11-19 Akim Demaille <akim@epita.fr>
8560 * src/print.c (print_actions): Better locality of variables.
8562 2001-11-19 Akim Demaille <akim@epita.fr>
8564 * src/derives.c (print_derives): Fix and enrich.
8565 * src/closure.c (print_fderives): Likewise.
8567 2001-11-19 Akim Demaille <akim@epita.fr>
8569 * src/closure.c (itemsetend): Remove, replaced with...
8572 2001-11-19 Akim Demaille <akim@epita.fr>
8574 * src/LR0.c (kernel_end): Remove, replaced with...
8577 2001-11-19 Akim Demaille <akim@epita.fr>
8579 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
8582 2001-11-19 Akim Demaille <akim@epita.fr>
8584 * src/closure.c (closure): Use arrays instead of pointers to clarify.
8586 2001-11-19 Akim Demaille <akim@epita.fr>
8588 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
8590 * src/LR0.c: Likewise.
8591 (allocate_itemsets): Use arrays instead of pointers to clarify.
8593 2001-11-19 Akim Demaille <akim@epita.fr>
8595 * src/getargs.c (statistics_flag): Replace with...
8597 (longopts): Accept --trace instead of --statistics.
8598 * src/getargs.h, src/options.c: Adjust.
8599 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
8600 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
8602 2001-11-19 Akim Demaille <akim@epita.fr>
8604 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
8605 pointers to clarify the code.
8606 (save_reductions, save_shifts): Factor common parts of alternatives.
8608 2001-11-19 Akim Demaille <akim@epita.fr>
8610 * src/LR0.c (new_state, get_state): Complete TRACE code.
8611 * src/closure.c: Include `reader.h' to get `tags', needed by the
8613 Rename the conditional DEBUG as TRACE.
8614 Output consistently TRACEs to stderr, not stdout.
8615 * src/derives.c: Likewise.
8616 * src/reduce.c: (inaccessable_symbols): Using if is better style
8618 Use `#if TRACE' instead of `#if 0' for tracing code.
8620 2001-11-19 Akim Demaille <akim@epita.fr>
8622 * src/system.h (LIST_FREE, shortcpy): New.
8623 * src/LR0.c: Use them.
8624 * src/output.c (free_itemsets, free_reductions, free_shifts):
8625 Remove, replaced by LIST_FREE.
8627 2001-11-19 Akim Demaille <akim@epita.fr>
8629 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8630 (REDUCTIONS_ALLOC): New.
8631 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8634 2001-11-19 Akim Demaille <akim@epita.fr>
8636 * src/LR0.c (new_state): Complete trace code.
8637 * src/nullable.c (set_nullable): Don't translate traces.
8639 2001-11-19 Akim Demaille <akim@epita.fr>
8641 * src/print_graph.c (print_core): Better locality of variables.
8642 * src/print.c (print_core): Likewise.
8644 2001-11-19 Akim Demaille <akim@epita.fr>
8646 * src/vcg.c: You do the output, so you are responsible of the
8647 handling of VCG syntax, in particular: use quotearg.
8648 * src/print_graph.c: Don't.
8649 (print_actions): Don't output the actions as part of the nodes,
8650 since that's the job of the edges.
8651 (print_state): Don't output by hand: fill the node description,
8652 and ask for its output.
8654 2001-11-19 Akim Demaille <akim@epita.fr>
8656 * src/bison.simple (yyparse): When verbosely reporting an error,
8657 no longer put additional quotes around token names.
8658 * tests/calc.at: Adjust.
8660 2001-11-19 Akim Demaille <akim@epita.fr>
8662 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8663 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8664 * src/output.c: Adjust.
8666 2001-11-19 Akim Demaille <akim@epita.fr>
8668 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8670 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8672 2001-11-19 Akim Demaille <akim@epita.fr>
8674 * src/gram.h (rule_t): New.
8676 (rrhs, rlhs): Remove, part of state_t.
8677 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8678 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8679 * src/reader.c, src/reduce.c: Adjust.
8681 2001-11-19 Akim Demaille <akim@epita.fr>
8683 * src/reader.c (symbols_output): New, extracted from...
8684 (packsymbols): Here.
8687 2001-11-19 Akim Demaille <akim@epita.fr>
8689 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8690 (maxrhs): this new function.
8692 2001-11-19 Akim Demaille <akim@epita.fr>
8694 * src/lalr.c (F): New macro to access the variable F.
8697 2001-11-19 Akim Demaille <akim@epita.fr>
8699 * src/lalr.h (LA): New macro to access the variable LA.
8700 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8701 * src/lalr.c: Adjust.
8703 2001-11-19 Akim Demaille <akim@epita.fr>
8705 * src/lalr.c (initialize_LA): Only initialize LA. Let...
8706 (set_state_table): handle the `lookaheads' members.
8708 2001-11-19 Akim Demaille <akim@epita.fr>
8710 * src/lalr.h (lookaheads): Removed array, whose contents is now
8712 (state_t): this structure.
8713 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8716 2001-11-19 Akim Demaille <akim@epita.fr>
8718 * src/lalr.h (consistent): Removed array, whose contents is now
8720 (state_t): this structure.
8721 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8724 2001-11-19 Akim Demaille <akim@epita.fr>
8726 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
8727 contents are now members of...
8728 (state_t): this structure.
8729 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8732 2001-11-19 Akim Demaille <akim@epita.fr>
8734 * src/lalr.h (state_t): New.
8735 (state_table): Be a state_t * instead of a core **.
8736 (accessing_symbol): Remove, part of state_t.
8737 * src/lalr.c: Adjust.
8738 (set_accessing_symbol): Merge into...
8739 (set_state_table): this.
8740 * src/print_graph.c, src/conflicts.c: Adjust.
8742 2001-11-14 Akim Demaille <akim@epita.fr>
8744 * tests/calc.at, tests/output.at, tests/regression.at,
8745 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
8746 now the tests are run in private dirs, therefore AC_CLEANUP and
8747 family can be simplified to 0-ary.
8748 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
8749 use abs. path to find config.h.
8750 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
8751 stderr, there can be way too much random noise.
8752 Instead pass -Werror to GCC and rely on the exit status.
8753 Reported by Wolfram Wagner.
8755 2001-11-14 Akim Demaille <akim@epita.fr>
8757 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
8758 defined only if yyoverflow is defined, to avoid `warning: unused
8760 Reported by The Test Suite.
8762 2001-11-14 Akim Demaille <akim@epita.fr>
8764 * src/print.c: Include reduce.h.
8765 Reported by Hans Aberg.
8767 2001-11-14 Akim Demaille <akim@epita.fr>
8769 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
8770 Revert a previous patch: these are really const.
8771 * src/conflicts.c (conflict_report): Additional useless pair of
8772 braces to pacify GCC's warnings for `if () if () {} else {}'.
8773 * src/lex.c (parse_percent_token): Replace equal_offset with
8776 Be sure to strdup `arg' when used, since there is no reason for
8777 token_buffer not to change.
8779 2001-11-14 Akim Demaille <akim@epita.fr>
8781 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
8783 * src/main.c (main): Use them.
8784 Suggested by Hans Aberg.
8786 2001-11-12 Akim Demaille <akim@epita.fr>
8788 * src/system.h (ngettext): Now that we use ngettext, be sure to
8789 provide a default definition when NLS are not used.
8791 2001-11-12 Akim Demaille <akim@epita.fr>
8793 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
8794 Use @kbd to denote user input.
8795 (Language and Grammar): ANSIfy the example.
8796 Adjust its layout for info/notinfo.
8797 (Location Tracking Calc): Output error messages to stderr.
8798 Output locations in a more GNUtically correct way.
8799 Fix a couple of Englishos.
8800 Adjust @group/@end group pairs.
8802 2001-11-12 Akim Demaille <akim@epita.fr>
8804 %expect was not functioning at all.
8806 * src/conflicts.c (expected_conflicts): Set to -1.
8807 (conflict_report): Use ngettext.
8808 (conflicts_print): Check %expect and make its violation an error.
8809 * doc/bison.texinfo (Expect Decl): Adjust.
8810 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
8811 * tests/regression.at (%expect not enough, %expect right)
8812 (%expect too much): New.
8814 2001-11-12 Akim Demaille <akim@epita.fr>
8816 * tests/regression.at (Conflicts): Rename as...
8817 (Unresolved SR Conflicts): this.
8818 (Solved SR Conflicts): New.
8820 2001-11-12 Akim Demaille <akim@epita.fr>
8822 * src/reduce.c (print_results): Rename as...
8823 (reduce_output): This.
8824 Output to OUT, passed as argument, instead of output_obstack.
8825 (dump_grammar): Likewise.
8828 (reduce_grammar): No longer call reduce_output, since...
8829 * src/print.c (print_results): do it.
8830 * src/main.c (main): Call reduce_free;
8832 2001-11-12 Akim Demaille <akim@epita.fr>
8834 * src/conflicts.c (print_reductions): Accept OUT as argument.
8835 Output to it, not to output_obstack.
8836 * src/print.c (print_actions): Adjust.
8838 2001-11-12 Akim Demaille <akim@epita.fr>
8840 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
8841 the result instead of using...
8842 (src_total, rrc_total, src_count, rrc_count): Remove.
8843 (any_conflicts): Remove.
8844 (print_conflicts): Split into...
8845 (conflicts_print, conflicts_output): New.
8846 * src/conflicts.h: Adjust.
8847 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
8848 * src/print.c (print_grammar): Issue `\n' between two rules.
8849 * tests/regression.at (Conflicts): New.
8850 Reported by Tom Lane.
8852 2001-11-12 Akim Demaille <akim@epita.fr>
8854 * tests/regression.at (Invalid input): Remove, duplicate with
8855 ``Invalid input: 1''.
8857 2001-11-12 Akim Demaille <akim@epita.fr>
8859 * tests/torture.at (AT_DATA_STACK_TORTURE)
8860 (Exploding the Stack Size with Alloca)
8861 (Exploding the Stack Size with Malloc): New.
8863 2001-11-12 Akim Demaille <akim@epita.fr>
8865 * src/bison.simple (YYSTACK_REALLOC): New.
8866 (yyparse) [!yyoverflow]: Use it and free the old stack.
8867 Reported by Per Allansson.
8869 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
8871 * src/bison.simple: Define type yystype instead of YYSTYPE, and
8872 define CPP macro, which substitute YYSTYPE by yystype.
8873 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
8874 with yyltype/YYLTYPE. This allows inclusion of the generated
8875 header within the parser if the compiler, such as GGC, accepts
8876 multiple equivalent #defines.
8879 2001-11-05 Akim Demaille <akim@epita.fr>
8881 * src/reader.c (symbols_output): New, extracted from...
8882 (packsymbols): here.
8885 2001-11-05 Akim Demaille <akim@epita.fr>
8887 * src/lex.c (parse_percent_token): s/quotearg/quote/.
8889 2001-11-05 Akim Demaille <akim@epita.fr>
8891 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
8894 2001-11-05 Akim Demaille <akim@epita.fr>
8896 * src/options.h (struct option_table_struct): set_flags is void*.
8897 * src/options.c (longopts): Support `--output' and `%output'.
8899 * src/lex.h (tok_setopt): Remove, replaced with...
8900 (tok_intopt, tok_stropt): these new guys.
8901 * src/lex.c (getopt.h): Not needed.
8902 (token_buffer, unlexed_token_buffer): Not const.
8903 (percent_table): Promote `-' over `_' in directive names.
8904 Active `%name-prefix', `file-prefix', and `output'.
8905 (parse_percent_token): Accept possible arguments to directives.
8906 Promote `-' over `_' in directive names.
8908 2001-11-04 Akim Demaille <akim@epita.fr>
8910 * doc/bison.texinfo (Decl Summary): Split the list into
8911 `directives for grammars' and `directives for bison'.
8913 Add description of `%name-prefix', `file-prefix', and `output'.
8914 Promote `-' over `_' in directive names.
8915 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
8916 Simplify the description of `--name-prefix'.
8917 Promote `-' over `_' in directive names.
8918 Promote `--output' over `--output-file'.
8919 Fix the description of `--defines'.
8920 * tests/output.at: Exercise %file-prefix and %output.
8922 2001-11-02 Akim Demaille <akim@epita.fr>
8924 * doc/refcard.tex: Update.
8926 2001-11-02 Akim Demaille <akim@epita.fr>
8928 * src/symtab.h (SUNDEF): New.
8929 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
8930 stand for `uninitialized', instead of 0.
8931 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
8932 * src/lex.c (lex): Adjust.
8934 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
8936 Let yylex return it instead of a plain 0.
8937 Reported by Dick Streefland.
8939 2001-11-02 Akim Demaille <akim@epita.fr>
8941 * tests/regression.at (Mixing %token styles): New test.
8943 2001-11-02 Akim Demaille <akim@epita.fr>
8945 * src/reader.c (parse_thong_decl): Formatting changes.
8946 (token_translations_init): New, extracted from...
8947 (packsymbols): Here.
8950 2001-11-01 Akim Demaille <akim@epita.fr>
8952 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
8953 Check that `9foo.y' produces correct cpp guards.
8954 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
8958 2001-11-01 Akim Demaille <akim@epita.fr>
8960 * tests/regression.at (Invalid input: 2): New.
8961 * src/lex.c (unlexed_token_buffer): New.
8962 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
8966 2001-11-01 Akim Demaille <akim@epita.fr>
8968 * tests/calc.at: Catch up with 1.30.
8969 * configure.in: Bump to 1.49a.
8970 Adjust to newer Autotest.
8972 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
8974 * src/conflicts.c: Move global variables rrc_total and src_total ...
8975 (print_conflicts): here.
8976 * src/output.c (output): Free global variable user_toknums.
8977 * src/lex.c (token_obstack): Become static.
8979 2001-10-18 Akim Demaille <akim@epita.fr>
8981 * tests/atlocal.in (GCC): Add.
8982 * tests/calc.at: s/m4_match/m4_bmatch/.
8983 s/m4_patsubst/m4_bpatsubst/.
8984 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
8985 * configure.in: AC_SUBST(GCC).
8987 2001-10-14 Marc Autret <autret_m@epita.fr>
8989 * src/options.c (create_long_option_table): Fix.
8991 2001-10-10 Akim Demaille <akim@epita.fr>
8993 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
8995 2001-10-04 Akim Demaille <akim@epita.fr>
8997 * src/reader.c (parse_union_decl): Push the caracters in
8998 union_obstack, not attrs_obstack.
9000 2001-10-04 Akim Demaille <akim@epita.fr>
9002 Merge in the branch 1.29.
9004 * src/reader.c (packsymbols): Use a temporary obstack for
9005 `%%tokendef', since output_stack is already used elsewhere.
9007 2001-10-02 Akim Demaille <akim@epita.fr>
9011 2001-10-02 Akim Demaille <akim@epita.fr>
9015 2001-10-02 Akim Demaille <akim@epita.fr>
9017 * tests/regression.at (Invalid CPP headers): New.
9018 From Alexander Belopolsky.
9019 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
9021 2001-10-02 Akim Demaille <akim@epita.fr>
9023 * tests/regression.at (Invalid input): New.
9024 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
9027 2001-10-02 Akim Demaille <akim@epita.fr>
9029 * tests/calc.at: Now that --debug works, the tests must be adjusted.
9031 2001-10-02 Akim Demaille <akim@epita.fr>
9033 * src/output.c (output_parser): Assert `skeleton'.
9034 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
9038 2001-10-01 Marc Autret <autret_m@epita.fr>
9040 * src/lex.h: Echo modifications.
9041 * src/lex.c (unlex): Parameter is now token_t.
9044 2001-10-01 Marc Autret <autret_m@epita.fr>
9046 * src/main.c: Include lex.h.
9049 2001-09-29 Akim Demaille <akim@epita.fr>
9051 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
9053 2001-09-28 Akim Demaille <akim@epita.fr>
9055 * tests/testsuite.at: Update to newer Autotest.
9056 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
9058 2001-09-27 Akim Demaille <akim@epita.fr>
9060 Position independent wrapper.
9062 * tests/bison: Remove.
9063 * tests/bison.in: New.
9064 * configure.in: Adjust.
9066 2001-09-27 Paul Eggert <eggert@twinsun.com>
9068 Port quotearg fixes from tar 1.13.24.
9070 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
9072 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
9073 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
9075 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
9076 * m4/mbrtowc.m4: New file.
9077 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
9078 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
9080 2001-09-27 Akim Demaille <akim@epita.fr>
9084 2001-09-27 Akim Demaille <akim@epita.fr>
9088 2001-09-25 Akim Demaille <akim@epita.fr>
9090 * src/system.h: Include `xalloc.h'.
9091 Remove it from the C files.
9092 * src/files.c (output_files): Free the obstacks.
9093 * src/lex.c (init_lex): Rename as...
9096 * src/main.c (main): Use it.
9098 2001-09-24 Marc Autret <autret_m@epita.fr>
9100 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
9101 to output informations in fout (FILE*).
9102 (open_graph, close_graph): Likewise.
9103 (output_graph, output_edge, output_node): Likewise.
9104 * src/vcg.h: Update function prototypes.
9105 * src/print_graph.c (print_graph): Open output graph file.
9106 (print_actions): Adjust.
9107 * src/files.h: Remove extern declaration.
9108 * src/files.c: Remove graph_obstack declaration.
9109 (open_files): Remove graph_obstack initialization.
9110 (output_files): Remove graph_obstack saving.
9112 2001-09-24 Marc Autret <autret_m@epita.fr>
9114 * src/files.c (compute_output_file_names): Fix.
9116 2001-09-24 Marc Autret <autret_m@epita.fr>,
9117 Akim Demaille <akim@epita.fr>
9119 * src/reader.c (reader): Remove call to free_symtab ().
9120 * src/main.c (main): Call it here.
9122 * src/conflicts.c (initialize_conflicts): Rename as...
9123 (solve_conflicts): this.
9124 * src/print.c (print_core, print_actions, print_state)
9125 (print_grammar): Dump to a file instead a `output_obstack'.
9126 (print_results): Dump `output_obstack', and then proceed with the
9128 * src/files.c (compute_output_file_names, close_files): New.
9129 (output_files): Adjust.
9130 * src/main.c (main): Adjust.
9132 2001-09-23 Marc Autret <autret_m@epita.fr>
9134 * src/files.c (compute_header_macro): Computes header macro name
9135 from spec_defines_file when given.
9137 2001-09-23 Marc Autret <autret_m@epita.fr>
9139 * src/files.c (output_files): Add default extensions.
9141 2001-09-22 Akim Demaille <akim@epita.fr>
9143 * src/conflicts.c (finalize_conflicts): Rename as...
9144 (free_conflicts): this.
9146 2001-09-22 Akim Demaille <akim@epita.fr>
9148 * src/gram.c (gram_free): Rename back as...
9150 (output_token_translations): Free `token_translations'.
9151 * src/symtab.c (free_symtab): Free the tag field.
9153 2001-09-22 Akim Demaille <akim@epita.fr>
9155 Remove `translations' as it is always set to true.
9157 * src/gram.h: Adjust.
9158 * src/reader.c (packsymbols, parse_token_decl): Adjust
9159 * src/print.c (print_grammar): Adjust.
9160 * src/output.c (output_token_translations): Adjust.
9161 * src/lex.c (lex): Adjust.
9162 * src/gram.c: Be sure the set pointers to NULL.
9163 (dummy): Rename as...
9166 2001-09-22 Akim Demaille <akim@epita.fr>
9168 * configure.in: Invoke AM_LIB_DMALLOC.
9169 * src/system.h: Use dmalloc.
9170 * src/LR0.c: Be sure to have pointers initialized to NULL.
9171 (allocate_itemsets): Allocate kernel_items only if needed.
9173 2001-09-22 Akim Demaille <akim@epita.fr>
9175 * configure.in: Bump to 1.29b.
9176 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
9177 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
9178 need xmalloc.c in calc.y.
9181 2001-09-21 Akim Demaille <akim@epita.fr>
9184 * Makefile.maint, config/config.guess, config/config.sub,
9185 * config/missing: Update from masters.
9186 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
9188 * configure.in (ALL_LINGUAS): Add `tr'.
9190 2001-09-21 Akim Demaille <akim@epita.fr>
9192 * tests/Makefile.am (package.m4): Move to...
9193 ($(srcdir)/$(TESTSUITE)): here.
9195 2001-09-20 Akim Demaille <akim@epita.fr>
9197 * src/complain.c: No longer try to be standalone: use system.h.
9198 Don't assume __STDC__ is defined to 1. Just test if it is defined.
9199 * src/complain.h: Likewise.
9200 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
9201 Remove the unused variable `n'.
9202 From Albert Chin-A-Young.
9204 2001-09-18 Marc Autret <autret_m@epita.fr>
9206 * doc/bison.1: Update.
9207 * doc/bison.texinfo (Bison Options): Update --defines and --graph
9209 (Option Cross Key): Update.
9212 2001-09-18 Marc Autret <autret_m@epita.fr>
9214 * tests/regression.at: New test (comment in %union).
9216 2001-09-18 Marc Autret <autret_m@epita.fr>
9218 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
9220 Reported by Keith Browne.
9222 2001-09-18 Marc Autret <autret_m@epita.fr>
9224 * tests/output.at: Add tests for --defines and --graph.
9226 2001-09-18 Marc Autret <autret_m@epita.fr>
9228 * tests/output.at: Removes tests of %{header,src}_extension features.
9230 2001-09-18 Akim Demaille <akim@epita.fr>
9232 * tests/Makefile.am (package.m4): New.
9233 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
9234 (_AT_CHECK_CALC_ERROR): Likewise.
9235 Factor the `, ' part of verbose error messages.
9237 2001-09-18 Marc Autret <autret_m@epita.fr>
9239 * src/getargs.c (longopts): Declare --defines and --graph as options
9240 with optional arguments.
9241 * src/files.h: Add extern declarations.
9242 * src/files.c (spec_graph_file, spec_defines_file): New.
9243 (output_files): Update.
9244 Remove CPP-outed code.
9246 2001-09-18 Marc Autret <autret_m@epita.fr>
9248 Turn off %{source,header}_extension feature.
9250 * src/files.c (compute_exts_from_gf): Update.
9251 (compute_exts_from_src): Update.
9252 (output_files): CPP-out useless code.
9253 * src/files.h: Remove {header,source}_extension extern declarations.
9254 * src/reader.c (parse_dquoted_param): CPP-out.
9255 (parse_header_extension_decl): Remove.
9256 (parse_source_extension_decl): Remove.
9257 (read_declarations): Remove cases tok_{hdrext,srcext}.
9258 * src/lex.c (percent_table): Remove {header,source}_extension entries.
9259 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
9261 2001-09-10 Akim Demaille <akim@epita.fr>
9263 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
9264 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
9265 (AT_CHECK_OUTPUT): this.
9266 Merely check ls' exit status, its output is useless.
9268 2001-09-10 Akim Demaille <akim@epita.fr>
9270 * tests/calc.at: Use m4_match.
9271 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
9273 2001-09-10 Marc Autret <autret_m@epita.fr>,
9274 Akim Demaille <akim@epita.fr>
9276 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
9278 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
9280 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
9281 * src/lex.h: Adjust prototype.
9282 (token_t): Add `tok_undef'.
9283 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
9284 (parse_percent_token): Now returns token_t.
9285 Add default statement in switch.
9286 (lex): Separate `c' as an input variable, from the token_t result
9288 (unlexed): Is a token_t.
9290 2001-09-10 Akim Demaille <akim@epita.fr>
9292 * configure.in: Bump to 1.29a.
9294 2001-09-07 Akim Demaille <akim@epita.fr>
9298 2001-08-30 Akim Demaille <akim@epita.fr>
9300 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
9301 * m4/atconfig.m4: Remove.
9302 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
9304 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
9305 m4_if, m4_patsubst, and m4_regexp.
9306 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
9307 `input' file instead of echo.
9309 2001-08-29 Akim Demaille <akim@epita.fr>
9313 2001-08-29 Akim Demaille <akim@epita.fr>
9317 2001-08-29 Paul Eggert <eggert@twinsun.com>
9319 * src/bison.simple (yyparse): Don't take the address of an
9320 item before the start of an array, as that doesn't conform to
9323 2001-08-29 Robert Anisko <anisko_r@epita.fr>
9325 * doc/bison.texinfo (Location Tracking Calc): New node.
9327 2001-08-29 Paul Eggert <eggert@twinsun.com>
9329 * src/output.c (output): Do not define const, as this now
9330 causes more problems than it cures.
9332 2001-08-29 Akim Demaille <akim@epita.fr>
9334 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
9336 Be sure to tag the `detailmenu'.
9338 2001-08-29 Akim Demaille <akim@epita.fr>
9340 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
9341 download in a tmp dir.
9343 2001-08-28 Marc Autret <autret_m@epita.fr>
9345 * config/depcomp: New file.
9347 2001-08-28 Marc Autret <autret_m@epita.fr>
9349 * doc/bison.1 (mandoc): Adjust.
9350 From Juan Manuel Guerrero.
9352 2001-08-28 Marc Autret <autret_m@epita.fr>
9354 * src/print_graph.c (print_state): Fix.
9356 2001-08-27 Marc Autret <autret_m@epita.fr>
9358 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
9360 Echo modifications to the functions prototypes.
9361 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
9363 2001-08-27 Marc Autret <autret_m@epita.fr>
9365 * src/vcg.c: Include `xalloc.h'.
9366 (add_colorentry): New.
9367 (add_classname): New.
9368 (add_infoname): New.
9369 * src/vcg.h: Add new prototypes.
9371 2001-08-27 Akim Demaille <akim@epita.fr>
9373 * Makefile.maint: Sync. again with CVS Autoconf.
9375 2001-08-27 Akim Demaille <akim@epita.fr>
9377 * Makefile.maint: Formatting changes.
9378 (po-update, cvs-update, update): New targets.
9381 2001-08-27 Akim Demaille <akim@epita.fr>
9383 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9384 * Makefile.maint: Sync. with CVS Autoconf.
9386 2001-08-27 Marc Autret <autret_m@epita.fr>
9388 * src/vcg.h (struct infoname_s): New.
9389 (struct colorentry_s): New.
9390 (graph_s): New fields {vertical,horizontal}_order in structure.
9391 Add `infoname' field.
9392 Add `colorentry' field;
9393 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
9394 (G_HORIZONTAL_ORDER): New.
9396 (G_COLORENTRY): New.
9397 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
9398 Add output of `infoname'.
9399 Add output of `colorentry'.
9401 2001-08-27 Marc Autret <autret_m@epita.fr>
9403 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
9404 This one shadowed a global parameter.
9406 2001-08-24 Marc Autret <autret_m@epita.fr>
9408 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
9409 instead of `unsigned'.
9410 (print_state): Do not call obstack_object_size () in obstack_grow ()
9411 to avoid macro variables shadowing.
9413 2001-08-23 Marc Autret <autret_m@epita.fr>
9415 * src/lex.c (percent_table): Typo: s/naem/name/.
9417 Normalize new options declarations.
9419 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
9421 * tests/suite.at: Exercise %header_extension and %source_extension.
9423 2001-08-16 Marc Autret <autret_m@epita.fr>
9425 * src/reader.c (parse_dquoted_param): New.
9426 (parse_header_extension_decl): Use it.
9427 (parse_source_extension_decl): Likewise.
9429 2001-08-16 Marc Autret <autret_m@epita.fr>
9431 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
9432 (get_xxxx_str): Use assert () instead of complain ().
9433 Remove return invokations in default cases.
9434 (get_decision_str): Modify default behaviour. Remove second argument.
9435 Echo modifications on calls.
9436 (output_graph): Fix.
9438 2001-08-16 Marc Autret <autret_m@epita.fr>
9440 * src/getargs.c (usage): Update with ``-g, --graph''.
9442 2001-08-16 Marc Autret <autret_m@epita.fr>
9444 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
9445 (Option Cross Key): Likewise.
9446 * doc/bison.1: Update.
9448 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
9450 * src/output.c (output_master_parser): Don't finish action_obstack.
9451 (output_parser): Don't care about the muscle action, here.
9452 (prepare): Copy the action_obstack in the action muscle.
9453 (output): Free action_obstack.
9455 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9457 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
9458 will contain `%union' declaration.
9459 (parse_union_decl): Delete #line directive output.
9460 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
9461 informations about %union.
9462 (parse_union_decl): Copy the union_obstack in the muscle stype.
9463 * src/bison.simple: Add new #line directive.
9464 Add typdef %%stype YYSTYPE.
9466 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9468 * src/bison.simple: Add new `#line' directive.
9470 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
9472 * src/bison.simple: New `#line' directive.
9473 * src/output.c (output_parser): Support new dynamic muscle input_line.
9475 2001-09-22 Marc Autret <autret_m@epita.fr>
9477 * src/output.c (output_master_parser): New.
9478 (output_parser): Be more re-entrant.
9480 2001-09-21 Marc Autret <autret_m@epita.fr>
9482 * src/reader.c (copy_definition, parse_union_decl): Update and use
9484 (copy_action): Likewise.
9485 Use obstack_1grow ().
9486 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
9488 2001-09-21 Marc Autret <autret_m@epita.fr>
9490 * src/options.c (option_table): Adjust.
9491 * src/lex.c (parse_percent_token): Fix.
9493 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9495 * src/options.c (symtab.h): Include it, need by lex.h.
9497 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9499 * src/lex.c (parse_percent_token): Change type of variable `tx', which
9500 is now an option_table_struct*.
9501 (option_strcmp): New function option_strcmp.
9502 (parse_percent_token): Call option_strcmp.
9503 * src/getargs.c (xalloc.h, options.h): Include it.
9504 (getargs): Call create_long_option_table.
9505 (getargs): Free longopts at the end of the function.
9506 (shortopts): Move in options.c.
9507 * src/options.c (create_long_option_table): New function. Convert
9508 information from option_table to option structure.
9509 * src/reader.c (options.h): Include it.
9511 * src/Makefile.am: Adjust.
9512 * src/options.c (option_table): Create from longopts and percent_table.
9513 * src/getargs.c (longopts): Delete.
9514 * src/lex.c (struct percent_table_struct): Delete.
9515 (percent_table): Delete.
9516 (options.h): Include it.
9517 * src/options.c: Create.
9518 * src/options.h: Create.
9519 Declare enum opt_access_e.
9520 Define struct option_table_struct.
9522 2001-09-20 Marc Autret <autret_m@epita.fr>
9524 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
9527 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
9529 * src/bison.simple: s/%%filename/%%skeleton.
9530 * src/muscle_tab.c (getargs.h): Include it.
9531 (muscle_init): Insert new muscle skeleton.
9533 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
9535 * src/output.c (output_parser): Delete unused variable actions_dumped.
9537 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
9539 * src/output.c (output): Delete call to reader_output_yylsp.
9540 * src/reader.c (reader): Likewise.
9541 * src/reader.h: Delete declaration of reader_output_yylsp.
9543 2001-09-02 Marc Autret <autret_m@epita.fr>
9545 * src/reader.c: Include muscle_tab.h.
9546 (parse_union_decl): Update.
9547 (parse_macro_decl): Rename parse_muscle_decl.
9548 Update to use renamed functions and variable.
9549 (read_declarations, copy_action, read_additionnal_code, : Updated
9550 with correct variables and functions names.
9551 (packsymbols, reader): Likewise.
9553 * src/reader.h (muscle_obstack): Extern declaration update.
9555 * src/output.c: Include muscle_tab.h
9556 In all functions using macro_insert, change by using muscle_insert ().
9557 (macro_obstack): Rename muscle_obstack.
9558 Echo modifications in the whole file.
9559 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
9560 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
9561 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
9563 * src/muscle_tab.h: Update double inclusion macros.
9564 (macro_entry_s): Rename muscle_entry_s.
9567 * src/muscle_tab.c: Include muscle_tab.h.
9568 Rename macro_tabble to muscle_table.
9569 (mhash1, mhash2, mcmp): Use muscle_entry.
9570 (macro_init): Rename muscle_init. Update.
9571 (macro_insert): Rename muscle_insert. Update.
9572 (macro_find): Rename muscle_find. Update.
9574 * src/main.c: Include muscle_tab.h.
9575 (main): Call muscle_init ().
9576 * src/Makefile.am (bison_SOURCES): Echo modifications.
9578 2001-09-02 Marc Autret <autret_m@epita.fr>
9580 Now the files macro_tab.[ch] are named muscle_tab.[ch].
9582 * src/muscle_tab.c, src/muscle_tab.h: Add files.
9584 2001-09-02 Marc Autret <autret_m@epita.fr>
9586 * src/macrotab.c, src/macrotab.h: Remove.
9588 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
9590 * src/reader.c (copy_guard): Use muscle to specify the `#line'
9593 2001-09-01 Marc Autret <autret_m@epita.fr>
9595 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
9596 to an explicit value to activate the feature. We do it here.
9598 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9600 * src/output.c (prepare): Delete the `filename' muscule insertion.
9601 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
9602 (parse_union_decl): Likewise.
9603 * src/macrotab.c (macro_init): Initialize filename by infile.
9605 2001-08-31 Marc Autret <autret_m@epita.fr>
9607 * src/bison.simple (YYLSP_NEEDED): New definition.
9608 * src/output.c (prepare): Add macro insertion of `locations_flag'
9610 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9612 * src/output.c (prepare): Delete insertion of previous muscles,
9613 and insert the `prefix' muscles.
9614 * src/macrotab.c (macro_init): Likewise.
9615 (macro_init): Initialization prefix directive by `yy'.
9616 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
9617 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9618 yylval, yydebug, yyerror, yynerrs and yyparse.
9619 New directive `#define' to substitute yydebug, ... with option
9622 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9624 * src/main.c (main): Standardize.
9625 * src/output.c (output_table_data, output_parser): Likewise.
9626 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9628 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9630 * src/reader.c (read_additionnal_code): Rename %%user_code to
9632 * src/output.c (output): Rename %%declarations to %%prologue.
9633 * src/bison.simple: Echo modifications.
9635 2001-08-31 Marc Autret <autret_m@epita.fr>
9637 * src/reader.c (readgram): CleanUp.
9638 (output_token_defines): Likewise.
9639 (packsymbols): Likewise.
9641 * src/output.c (output): CPP-out useless code.
9643 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9645 * src/reader.c (reader): Delete obsolete call to function
9646 output_trailers and output_headers.
9647 * src/output.h: Remove obsolete functions prototypes of output_headers
9648 and output_trailers.
9650 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
9652 * src/main.c: Include macrotab.h.
9653 * src/macrotab.h (macro_entry_s): Constify fields.
9654 Adjust functions prototypes.
9655 * src/macrotab.c (macro_insert): Constify key and value.
9656 (macro_find): Constify key.
9657 (macro_insert): Include 'xalloc.h'
9658 (macro_insert): Use XMALLOC.
9659 (macro_find): Constify return value.
9660 * src/output.c (output_table_data): Rename table to table_data.
9661 (output_parser): Constify macro_key, macro_value.
9663 2001-08-30 Marc Autret <autret_m@epita.fr>
9665 * src/reader.c (parse_skel_decl): New.
9666 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
9667 * src/lex.h (token_t): New token `tok_skel'.
9668 * src/lex.c (percent_table): Add skeleton option entry.
9671 2001-08-29 Marc Autret <autret_m@epita.fr>
9673 * src/bison.simple: Add %%user_code directive at the end.
9674 * src/reader.c (read_additionnal_code): New.
9676 * src/output.c (output_program): Remove.
9679 2001-08-28 Marc Autret <autret_m@epita.fr>
9681 * src/output.c (output_actions): Clean up.
9682 (output_gram): CPP-out useless code.
9683 * src/reader.c (reader): Clean up, CPP-out useless code.
9685 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
9687 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
9689 * src/bison.simple: Add `%%definitions'.
9691 2001-08-28 Marc Autret <autret_m@epita.fr>
9693 * config/depcomp: New file.
9695 2001-08-27 Paul Eggert <eggert@twinsun.com>
9697 * src/bison.simple (yyparse): Don't take the address of an
9698 item before the start of an array, as that doesn't conform to
9701 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9703 * src/output.c (output): Remove the initialization of the macro
9704 obstack. It was done too late here.
9706 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
9708 (reader): Initialize the macro obstack here, since we need it to grow
9709 '%define' directives.
9711 * src/reader.h: Declare the macro obstack as extern.
9713 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9715 * src/output.c (output_parser): Fix. Store single '%' characters in
9716 the output obstack instead of throwing them away.
9718 2001-08-27 Akim Demaille <akim@epita.fr>
9720 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9722 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9724 * lib/Makefile.am: Adjust.
9726 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9728 * src/bison.simple: Update and add '%%' directives.
9730 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9732 * src/reader.c (reader): Remove calls to 'output_headers' and
9733 'output_trailers'. Remove some C output.
9734 (readgram): Disable a piece of code that was writing a default
9735 definition for 'YYSTYPE'.
9736 (reader_output_yylsp): Remove.
9737 (packsymbols): Output token defintions to a macro.
9738 (copy_definition): Disable C output.
9740 * src/reader.c (parse_macro_decl): New function used to parse macro
9742 (copy_string2): Put the body of copy_string into this new function.
9743 Add a parameter to let the caller choose whether he wants to copy the
9744 string delimiters or not.
9745 (copy_string): Be a simple call to copy_string2 with the last argument
9747 (read_declarations): Add case for macro definition.
9748 (copy_identifier): New.
9749 (parse_macro_decl): Read macro identifiers using copy_identifier
9752 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9754 * src/output.c (prepare): Add prefixed names.
9755 (output_parser): Output semantic actions.
9756 (output_parser): Fix bug on '%%line' directives.
9758 * src/output.c (output_headers): Remove. The C code printed by this
9759 function should now be in the skeletons.
9760 (output_trailers): Remove.
9761 (output): Disable call to 'reader_output_yylsp'.
9762 (output_rule_data): Do not output tables to the table obstack.
9764 * src/output.c: Remove some C dedicated output.
9765 Improve the use of macro and output obstacks.
9766 (output_defines): Remove.
9768 * src/output.c (output_token_translations): Associate 'translate'
9769 table with a macro. No output to the table obstack.
9770 (output_gram): Same for 'rhs' and 'prhs'.
9771 (output_stos): Same for 'stos'.
9772 (output_rule_data): Same for 'r1' and 'r2'.
9773 (token_actions): Same for 'defact'.
9774 (goto_actions): Same for 'defgoto'.
9775 (output_base): Same for 'pact' and 'pgoto'.
9776 (output_table): Same for 'table'.
9777 (output_check): Same for 'check'.
9779 * src/output.c (output_table_data): New function.
9780 (output_short_table): Remove.
9781 (output_short_or_char_table): Remove.
9783 * src/output.c (output_parser): Replace most of the skeleton copy code
9784 with something new. Skeletons are now processed character by character
9785 rather than line by line, and Bison looks for '%%' macros. This is the
9786 first step in making Bison's output process (a lot) more flexible.
9787 (output_parser): Use the macro table.
9789 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9791 * src/main.c (main): Initialize the macro table.
9793 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9795 * src/lex.c (percent_table): Add tok_define.
9796 * src/lex.h: Add tok_define.
9798 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9800 * src/macrotab.c: New file.
9801 * src/macrotab.h: New file.
9802 * src/Makefile.am: Update.
9804 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9806 * lib/hash.c: New file.
9807 * lib/hash.h: New file.
9808 * lib/Makefile.am: Update.
9810 2001-08-15 Akim Demaille <akim@epita.fr>
9814 2001-08-15 Marc Autret <autret_m@epita.fr>
9816 * src/reader.c (readgram): Indent output macro YYSTYPE.
9817 (packsymbols): Likewise.
9818 (output_token_defines): Likewise.
9819 * src/files.c: Standardize.
9820 (compute_header_macro): New.
9821 (defines_obstack_save): New. Use compute_header_macro.
9822 (output_files): Update. Use defines_obstack_save.
9824 2001-08-15 Akim Demaille <akim@epita.fr>
9826 * doc/bison.texinfo (Table of Symbols): Document
9829 2001-08-15 Akim Demaille <akim@epita.fr>
9831 * missing: Update from CVS Automake.
9832 * config/config.guess, config/config.sub, config/texinfo.tex:
9833 Update from gnu.org.
9835 2001-08-15 Akim Demaille <akim@epita.fr>
9837 * Makefile.maint: Sync with CVS Autoconf.
9839 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
9841 * doc/bison.texinfo: Include GNU Free Documentation License from
9843 * doc/fdl.texi: Add to package.
9845 2001-08-14 Marc Autret <autret_m@epita.fr>
9847 Turn on %{source,header}_extension features.
9849 * src/lex.c (percent_table): Un-CPP out header_extension and
9851 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
9852 (compute_exts_from_src): Remove conditions. It restores priorities
9855 2001-08-14 Marc Autret <autret_m@epita.fr>
9857 * src/files.c (compute_base_names): Add extensions computing when
9858 `--file-prefix' used.
9859 Standardize function calls.
9861 2001-08-13 Marc Autret <autret_m@epita.fr>
9863 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
9864 defining it (defined but null disables alloca).
9866 2001-08-13 Marc Autret <autret_m@epita.fr>
9868 * src/bison.simple (_yy_memcpy): CPP reformat.
9870 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
9872 * tests/atconfig.in (CPPFLAGS): Fix.
9874 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
9876 * doc/bison.texinfo: Include GNU General Public License from
9878 * doc/gpl.texi: Add to package.
9880 2001-08-10 Marc Autret <autret_m@epita.fr>
9882 * src/print_graph.h: Fix.
9883 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
9885 2001-08-10 Akim Demaille <akim@epita.fr>
9887 * src/system.h: Provide default declarations for stpcpy, strndup,
9890 2001-08-10 Robert Anisko <anisko_r@epita.fr>
9892 * doc/bison.texinfo (Locations): Update @$ stuff.
9894 2001-08-09 Robert Anisko <anisko_r@epita.fr>
9896 * src/bison.simple (YYLLOC_DEFAULT): Update.
9899 2001-08-08 Marc Autret <autret_m@epita.fr>
9901 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
9902 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
9903 Reported by Fabrice Bauzac.
9905 2001-08-08 Marc Autret <autret_m@epita.fr>
9907 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
9908 * src/vcg.c (output_node): Fix.
9909 * src/vcg.h: Cleanup.
9910 * src/print_graph.c: Add comments.
9911 (node_output_size): New global variable. Simplify the formatting of
9912 the VCG graph output.
9913 (print_actions): Unused code is now used. It notifies the final state
9914 and no action states in the VCG graph. It also give the reduce actions.
9915 The `shift and goto' edges are red and the `go to state' edges are
9917 Get the current node name and node_obstack by argument.
9918 (node_obstack): New variable.
9919 (print_state): Manage node_obstack.
9920 (print_core): Use node_obstack given by argument.
9921 A node is not only computed here but in print_actions also.
9922 (print_graph): CPP out useless code instead of commenting it.
9924 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
9926 * tests/atconfig.in (CPPFLAGS): Fix.
9928 2001-08-07 Akim Demaille <akim@epita.fr>
9930 * src/print_graph.c (quote): New.
9931 (print_core): Use it.
9933 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
9935 * src/vcg.c (complain.h): Include it.
9936 Unepitaize `return' invocations.
9937 [NDEBUG] (main): Remove.
9938 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
9939 * src/files.c (open_files): Initialize graph_obstack.
9940 * src/print_graph.c (print_actions): CPP out useless code.
9941 (print_core): Don't output the last `\n' in labels.
9943 * src/files.c (output_files): Output the VCG file.
9944 * src/main.c (main): Invoke print_graph ();
9946 2001-08-06 Marc Autret <autret_m@epita.fr>
9948 Automaton VCG graph output.
9949 Using option ``-g'' or long option ``--graph'', you can generate
9950 a gram_filename.vcg file containing a VCG description of the LALR (1)
9951 automaton of your grammar.
9953 * src/main.c: Call to print_graph() function.
9954 * src/getargs.h: Update.
9955 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
9956 (graph_flag): New flag.
9958 (getargs): Add case `g'.
9959 * src/files.c (graph_obstack): New obstack struct.
9960 (open_files): Initialize new obstack.
9961 (output_files): Saves graph_obstack if required.
9962 * src/files.h (graph_obstack): New extern declaration.
9963 * src/Makefile.am: Add new source files.
9965 2001-08-06 Marc Autret <autret_m@epita.fr>
9967 * src/print_graph.c, src/print_graph.h (graph): New.
9968 * src/vcg.h: New file.
9969 * src/vcg.c: New file, VCG graph handling.
9971 2001-08-06 Marc Autret <autret_m@epita.fr>
9973 Add of %source_extension and %header_extension which specify
9974 the source or/and the header output file extension.
9976 * src/files.c (compute_base_names): Remove initialisation of
9977 src_extension and header_extension.
9978 (compute_exts_from_gf): Update.
9979 (compute_exts_from_src): Update.
9980 (output_files): Update.
9981 * src/reader.c (parse_header_extension_decl): New.
9982 (parse_source_extension_decl): New.
9983 (read_declarations): New case statements for the new tokens.
9984 * src/lex.c (percent_table): Add entries for %source_extension
9985 and %header_extension.
9986 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
9988 2001-08-06 Marc Autret <autret_m@epita.fr>
9990 * configure.in: Bump to 1.28c.
9991 * doc/bison.texinfo: Texinfo thingies.
9993 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
9995 * tests/atconfig.in (CPPFLAGS): Add.
9996 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
9998 2001-08-03 Akim Demaille <akim@epita.fr>
10002 2001-08-03 Akim Demaille <akim@epita.fr>
10004 * tests/Makefile.am (check-local): Ship testsuite.
10005 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
10006 Include `string.h'.
10008 2001-08-03 Akim Demaille <akim@epita.fr>
10010 * configure.in: Try using -Wformat when compiling.
10012 2001-08-03 Akim Demaille <akim@epita.fr>
10014 * configure.in: Bump to 1.28b.
10016 2001-08-03 Akim Demaille <akim@epita.fr>
10018 * src/complain.c: Adjust strerror_r portability issues.
10020 2001-08-03 Akim Demaille <akim@epita.fr>
10024 2001-08-03 Akim Demaille <akim@epita.fr>
10026 * src/getargs.c, src/getarg.h (skeleton)): Constify.
10027 * src/lex.c (literalchar): Avoid name clashes on `buf'.
10028 * src/getargs.c: Include complain.h.
10029 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
10030 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
10032 2001-08-03 Akim Demaille <akim@epita.fr>
10034 * src/reader.c (readgram): Display hidden chars in error messages.
10036 2001-08-03 Akim Demaille <akim@epita.fr>
10038 Update to gettext 0.10.39.
10040 2001-08-03 Akim Demaille <akim@epita.fr>
10042 * lib/strspn.c: New.
10044 2001-08-01 Marc Autret <autret_m@epita.fr>
10046 * doc/bison.texinfo: Update.
10047 * doc/bison.1 (mandoc): Update.
10048 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
10049 * src/files.c: Support output files extensions computing.
10050 (src_extension): New static variable.
10051 (header_extension): New static variable.
10052 (tr): New function.
10053 (get_extension_index): New function, gets the index of an extension
10054 filename in a string.
10055 (compute_exts_from_gf): New function, computes extensions from the
10056 grammar file extension.
10057 (compute_exts_from_src): New functions, computes extensions from the
10058 C source file extension, file given by ``-o'' option.
10059 (compute_base_names): Update.
10060 (output_files): Update.
10062 2001-08-01 Robert Anisko <anisko_r@epita.fr>
10064 * doc/bison.texi: Document @$.
10065 (Locations): New section.
10067 2001-07-18 Akim Demaille <akim@epita.fr>
10069 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
10070 * config/prev-version.txt, config/move-if-change: New.
10071 * Makefile.am: Adjust.
10073 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
10075 * src/bison.simple (yyparse): Suppress warning `comparaison
10076 between signed and unsigned'.
10078 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
10080 * src/getargs.h (raw_flag): Remove.
10081 * src/getargs.c: Die on `-r'/`--raw'.
10082 * src/lex.c (parse_percent_token): Die on `%raw'.
10083 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
10084 * tests/calc.at: Suppress test with option `--raw'.
10086 2001-07-14 Akim Demaille <akim@epita.fr>
10089 * configure.in: Require Autoconf 2.50.
10090 Update to gettext 0.10.38.
10092 2001-03-16 Akim Demaille <akim@epita.fr>
10094 * doc/bison.texinfo: ANSIfy the examples.
10096 2001-03-16 Akim Demaille <akim@epita.fr>
10098 * getargs.c (skeleton): New variable.
10099 (longopts): --skeleton is a new option.
10100 (shortopts, getargs): -S is a new option.
10101 * getargs.h: Declare skeleton.
10102 * output.c (output_parser): Use it.
10104 2001-03-16 Akim Demaille <akim@epita.fr>
10106 * m4/strerror_r.m4: New.
10107 * m4/error.m4: Run AC_FUNC_STRERROR_R.
10108 * lib/error.h, lib/error.c: Update.
10110 2001-03-16 Akim Demaille <akim@epita.fr>
10112 * src/getargs.c (longopts): Clean up.
10114 2001-02-21 Akim Demaille <akim@epita.fr>
10116 * src/reader.c (gensym): `gensym_count' is your own.
10117 Use a static buf to create the symbol name, as token_buffer is no
10120 2001-02-08 Akim Demaille <akim@epita.fr>
10122 * src/conflicts.c (conflict_report): Be sure not to append to res
10123 between two calls, which could happen if both first sprintf were
10124 skipped, but not the first cp += strlen.
10126 2001-02-08 Akim Demaille <akim@epita.fr>
10128 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
10129 New, from fileutils 4.0.37.
10130 * configure.in: Require Autoconf 2.49c. I took some time before
10131 making this decision. This is the only way out for portability
10132 issues in Bison, it would mean way too much duplicate effort to
10133 import in Bison features implemented in 2.49c since 2.13.
10134 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
10136 2001-02-02 Akim Demaille <akim@epita.fr>
10138 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
10139 * lib/xalloc.h, lib/xmalloc.c: Update.
10141 2001-01-19 Akim Demaille <akim@epita.fr>
10143 Get rid of the ad hoc handling of token_buffer in the scanner: use
10146 * src/lex.c (token_obstack): New.
10147 (init_lex): Initialize it. No longer call...
10148 (grow_token_buffer): this. Remove it.
10149 Adjust all the places which used it to use the obstack.
10151 2001-01-19 Akim Demaille <akim@epita.fr>
10153 * src/lex.h: Rename all the tokens:
10154 s/\bENDFILE\b/tok_eof/g;
10155 s/\bIDENTIFIER\b/tok_identifier/g;
10157 Let them be enums, not #define, to ease debugging.
10158 Adjust all the code.
10160 2001-01-18 Akim Demaille <akim@epita.fr>
10162 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
10163 * src/lex.c (maxtoken, grow_token_buffer): Static.
10165 2001-01-18 Akim Demaille <akim@epita.fr>
10167 Since we now use obstacks, more % directives can be enabled.
10169 * src/lex.c (percent_table): Also accept `%yacc',
10170 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
10172 Handle the actions for `%semantic_parser' and `%pure_parser' here,
10173 instead of returning a token.
10174 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
10175 * src/reader.c (read_declarations): Adjust.
10176 * src/files.c (open_files): Don't call `compute_base_names', don't
10177 compute `attrsfile' since they depend upon data which might be
10178 *in* the input file now.
10179 (output_files): Do it here.
10180 * src/output.c (output_headers): Document the fact that this patch
10181 introduces a guaranteed SEGV for semantic parsers.
10182 * doc/bison.texinfo: Document them.
10183 * tests/suite.at: Exercise these %options.
10185 2000-12-20 Akim Demaille <akim@epita.fr>
10187 Also handle the output file (--verbose) with obstacks.
10189 * files.c (foutput): Remove.
10190 (output_obstack): New.
10191 Adjust all dependencies.
10192 * src/conflicts.c: Return a string.
10193 * src/system.h (obstack_grow_string): Rename as...
10194 (obstack_sgrow): this. Be ready to work with non literals.
10195 (obstack_fgrow4): New.
10197 2000-12-20 Akim Demaille <akim@epita.fr>
10199 * src/files.c (open_files): Fix the computation of short_base_name
10200 in the case of `-o foo.tab.c'.
10202 2000-12-20 Akim Demaille <akim@epita.fr>
10204 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
10205 (copy_dollar): Now that everything uses obstacks, get rid of the
10208 2000-12-20 Akim Demaille <akim@epita.fr>
10210 * src/files.c (open_files): Actually the `.output' file is based
10211 on the short_base_name, not base_name.
10212 * tests/suite.at (Checking output file names): Adjust.
10214 2000-12-20 Akim Demaille <akim@epita.fr>
10216 * src/bison.s1: Remove, we now use directly...
10217 * src/bison.simple: this.
10218 * src/Makefile.am: Use pkgdata instead of data.
10220 2000-12-20 Akim Demaille <akim@epita.fr>
10222 * src/files.c (guard_obstack): New.
10223 (open_files): Initialize it.
10224 (output_files): Dump it...
10225 * src/files.h: Export it.
10226 * src/reader.c (copy_guard): Use it.
10228 2000-12-19 Akim Demaille <akim@epita.fr>
10230 * src/files.c (outfile, defsfile, actfile): Removed as global
10232 (open_files): Don't compute them.
10233 (output_files): Adjust.
10234 (base_name, short_base_name): Be global.
10235 Adjust dependencies.
10237 2000-12-19 Akim Demaille <akim@epita.fr>
10239 * src/files.c (strsuffix): New.
10240 (stringappend): Be just like strcat but allocate.
10241 (base_names): Eve out from open_files.
10242 Try to simplify the rather hairy computation of base_name and
10244 (open_files): Use it.
10245 * tests/suite.at (Checking output file names): New test.
10247 2000-12-19 Akim Demaille <akim@epita.fr>
10249 * src/system.h (obstack_grow_literal_string): Rename as...
10250 (obstack_grow_string): this.
10251 * src/output.c (output_parser): Recognize `%% actions' instead of
10253 * src/bison.s1: s/$/%% actions/.
10254 * src/bison.hairy: Likewise.
10256 2000-12-19 Akim Demaille <akim@epita.fr>
10258 * src/output.c (output_parser): Compute the `#line' lines when
10260 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
10261 Suggested by Hans Aberg.
10263 2000-12-19 Akim Demaille <akim@epita.fr>
10265 Let the handling of the skeleton files be local to the procedures
10268 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
10270 (fparser, open_extra_files): Remove.
10271 (open_files, output_files): Don't take care of fparser.
10272 * src/files.h: Adjust.
10273 * src/output.c (output_parser): Open and close the file to the
10275 * src/reader.c (read_declarations): When %semantic_parser, open
10278 2000-12-19 Akim Demaille <akim@epita.fr>
10280 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
10281 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
10283 2000-12-19 Akim Demaille <akim@epita.fr>
10285 * src/files.c (open_files): Yipee! We no longer need all the code
10286 looking for `/tmp' since we have no tmp file.
10288 2000-12-19 Akim Demaille <akim@epita.fr>
10290 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
10292 * src/files.c (open_files): Less dependency on MSDOS etc.
10294 2000-12-14 Akim Demaille <akim@epita.fr>
10296 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
10297 Provide a default definition.
10298 Use it when executing the default @ action.
10299 * src/reader.c (reader_output_yylsp): No longer include
10300 `timestamp' and `text' in the default YYLTYPE.
10302 2000-12-12 Akim Demaille <akim@epita.fr>
10304 * src/reader.c (copy_definition, parse_union_decl, copy_action)
10305 (copy_guard): Quote the file names.
10306 Reported by Laurent Mascherpa.
10308 2000-12-12 Akim Demaille <akim@epita.fr>
10310 * src/output.c (output_headers, output_program, output): Be sure
10311 to escape special characters when outputting filenames.
10312 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
10313 (output_headers): Don't depend on them, Use ACTSTR.
10315 2000-11-17 Akim Demaille <akim@epita.fr>
10317 * lib/obstack.h: Formatting changes.
10318 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
10319 prevents type checking.
10320 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
10321 cast the value to (void *): assigning a `foo *' to a `void *'
10323 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
10324 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
10327 2000-11-17 Akim Demaille <akim@epita.fr>
10329 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
10331 (suite.m4, regression.m4, calc.m4): these.
10332 * tests/atgeneral.m4: Update from CVS Autoconf.
10334 2000-11-17 Akim Demaille <akim@epita.fr>
10336 * tests/regression.m4 (%union and --defines): New test,
10337 demonstrating a current bug in the obstack implementation.
10339 2000-11-17 Akim Demaille <akim@epita.fr>
10341 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
10343 Use them to declare the variables which are global or local to
10346 2000-11-17 Akim Demaille <akim@epita.fr>
10348 * acconfig.h: Remove, no longer used.
10350 2000-11-07 Akim Demaille <akim@epita.fr>
10352 * src: s/Copyright (C)/Copyright/g.
10354 2000-11-07 Akim Demaille <akim@epita.fr>
10356 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
10358 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
10360 2000-11-07 Akim Demaille <akim@epita.fr>
10362 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
10363 Merge in a single CPP if/else.
10365 2000-11-07 Akim Demaille <akim@epita.fr>
10367 * src/output.c (output): Remove useless variables.
10368 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
10369 argument `data' for consistency with the prototypes.
10370 Qualify it `const'.
10371 (obstack_copy, obstack_copy0): Rename the second argument as
10372 `address' for consistency. Qualify it `const'.
10373 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
10374 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
10375 `const' their input argument (`data' or `address').
10376 Adjust the corresponding macros to include `const' in casts.
10378 2000-11-03 Akim Demaille <akim@epita.fr>
10380 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
10381 s/PFILE1/BISON_HAIRY/.
10382 Adjust dependencies.
10384 2000-11-03 Akim Demaille <akim@epita.fr>
10386 For some reason, this was not applied.
10388 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10389 `unlink': it's no longer used.
10391 2000-11-03 Akim Demaille <akim@epita.fr>
10393 * src/files.c (skeleton_find): New function, eved out of...
10394 (open_files, open_extra_files): here.
10396 2000-11-03 Akim Demaille <akim@epita.fr>
10398 Don't use `atexit'.
10400 * src/files.c (obstack_save): New function.
10401 (done): Rename as...
10402 (output_files): this.
10403 Use `obstack_save'.
10404 * src/main.c (main): Don't use `atexit' to register `done', since
10405 it no longer has to remove tmp files, just call `output_files'
10406 when there are no errors.
10408 2000-11-02 Akim Demaille <akim@epita.fr>
10410 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10411 `unlink': it's no longer used.
10412 * src/files.h: Formatting changes.
10414 2000-11-02 Akim Demaille <akim@epita.fr>
10416 Remove the last uses of mktemp and unlink/delete.
10418 * src/files.c (fdefines, ftable): Removed.
10419 (defines_ostack, table_obstack): New.
10420 Adjust dependencies of the former into uses of the latter.
10421 * src/output.c (output_short_or_char_table, output_short_table):
10422 Convert to using obstacks.
10423 * src/reader.c (copy_comment2): Accept one FILE * and two
10425 (output_token_defines, reader_output_yylsp): Use obstacks.
10426 * src/system.h (obstack_fgrow3): New.
10427 * po/POTFILES.in: Adjust.
10429 2000-11-01 Akim Demaille <akim@epita.fr>
10431 Change each use of `fattrs' into a use of `attrs_obstack'.
10433 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
10434 * src/files.c (fattrs): Remove.
10435 (attrs_obstack): New.
10436 Adjust all dependencies.
10437 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
10439 2000-11-01 Akim Demaille <akim@epita.fr>
10441 Introduce obstacks.
10442 Change each use of `faction' into a use of `action_obstack'.
10444 * lib/obstack.h, lib/obstack.c: New files.
10445 * src/files.c (faction): Remove.
10446 (action_obstack): New.
10447 Adjust all dependencies.
10449 2000-10-20 Akim Demaille <akim@epita.fr>
10451 * lib/quote.h (PARAMS): New macro. Use it.
10453 2000-10-16 Akim Demaille <akim@epita.fr>
10455 * src/output.c (output_short_or_char_table): New function.
10456 (output_short_table, output_token_translations): Use it.
10457 (goto_actions): Use output_short_table.
10459 2000-10-16 Akim Demaille <akim@epita.fr>
10461 * src/symtab.c (bucket_new): New function.
10464 * src/output.c (output_short_table): New argument to display the
10465 comment associated with the table.
10466 Adjust dependencies.
10467 (output_gram): Use it.
10468 (output_rule_data): Nicer output layout for YYTNAME.
10470 2000-10-16 Akim Demaille <akim@epita.fr>
10472 * src/lex.c (read_typename): New function.
10474 * src/reader.c (copy_dollar): Likewise.
10476 2000-10-16 Akim Demaille <akim@epita.fr>
10478 * src/reader.c (copy_comment2): Expect the input stream to be on
10479 the `/' which is suspected to open a comment, instead of being
10480 called after `//' or `/*' was read.
10481 (copy_comment, copy_definition, parse_union_decl, copy_action)
10482 (copy_guard): Adjust.
10484 2000-10-16 Akim Demaille <akim@epita.fr>
10486 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
10487 `read_signed_integer'.
10489 2000-10-16 Akim Demaille <akim@epita.fr>
10491 * src/reader.c (copy_dollar): New function.
10492 (copy_guard, copy_action): Use it.
10494 2000-10-16 Akim Demaille <akim@epita.fr>
10496 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
10497 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
10498 New files, from Fileutils 4.0.27.
10499 * src/main.c (printable_version): Remove.
10500 * src/lex.c, src/reader.c: Use `quote'.
10502 2000-10-04 Akim Demaille <akim@epita.fr>
10504 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
10506 2000-10-04 Akim Demaille <akim@epita.fr>
10508 * doc/bison.texinfo: Various typos spotted by Neil Booth.
10510 2000-10-04 Akim Demaille <akim@epita.fr>
10512 When a literal string is used to define two different tokens,
10513 `bison -v' segfaults.
10514 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
10516 * tests/regression.m4: New file.
10517 Include the core of the sample provided by Piotr Gackiewicz.
10518 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
10521 2000-10-04 Akim Demaille <akim@epita.fr>
10523 * src/reader.c (parse_expect_decl): Keep `count' within the size
10527 2000-10-02 Paul Eggert <eggert@twinsun.com>
10529 * bison.s1 (yyparse): Assign the default value
10530 unconditionally, to avoid a GCC warning and make the parser a
10533 2000-10-02 Akim Demaille <akim@epita.fr>
10535 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
10538 2000-10-02 Akim Demaille <akim@epita.fr>
10540 * src/derives.c, src/print.c, src/reduce.c: To ease the
10541 translation, move some `\n' out of the translated strings.
10543 2000-10-02 Akim Demaille <akim@epita.fr>
10545 The location tracking mechanism is precious for parse error
10546 messages. Nevertheless, it is enabled only when `@n' is used in
10547 the grammar, which is a different issue (you can use it in error
10548 message, but not in the grammar per se). Therefore, there should
10549 be another means to enable it.
10551 * src/getargs.c (getargs): Support `--locations'.
10552 (usage): Report it.
10553 * src/getargs.h (locationsflag): Export it.
10554 * src/lex.c (percent_table): Support `%locations'.
10555 * src/reader.c (yylsp_needed): Remove this variable, now replaced
10556 with `locationsflag'.
10557 * doc/bison.texinfo: Document `--locations' and `%locations'.
10559 * tests/calc.m4: Test it.
10561 For regularity of the names, replace each
10562 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
10563 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
10564 In addition replace each `flag' with `_flag'.
10566 2000-10-02 Akim Demaille <akim@epita.fr>
10568 Also test parse error messages, including with YYERROR_VERBOSE.
10570 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
10572 Use it to check the computations.
10573 Use it to check `nonassoc' is honored.
10574 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
10575 `--yyerror-verbose'.
10576 (_AT_CHECK_CALC): Adjust to this option.
10577 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
10579 2000-10-02 Akim Demaille <akim@epita.fr>
10581 Test also `--verbose', `--defines' and `--name-prefix'. Testing
10582 the latter demonstrates a flaw in the handling of non debugging
10583 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
10584 was used in order to simplify:
10600 unfortunately this leads to a CPP conflict when
10601 `--name-prefix=foo' is used since it produces `#define yydebug
10604 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
10605 (YYDPRINTF): New macro.
10607 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10609 Also test `--verbose', `--defines' and `--name-prefix'.
10611 2000-10-02 Akim Demaille <akim@epita.fr>
10613 Improve the readability of the produced parsers.
10615 * src/bison.s1: Formatting changes.
10616 Improve the comment related to the `$' mark.
10617 (yydefault): Don't fall through to `yyresume': `goto' there.
10618 * src/output.c (output_parser): When the `$' is met, skip the end
10620 New variable, `number_of_dollar_signs', to check there's exactly
10621 one `$' in the parser skeleton.
10623 2000-10-02 Akim Demaille <akim@epita.fr>
10625 * lib/xstrdup.c: New file, from the fileutils.
10626 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10627 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10628 instead of strlen + xmalloc + strcpy.
10629 * src/symtab.c (copys): Remove, use xstrdup instead.
10631 2000-10-02 Akim Demaille <akim@epita.fr>
10633 * src/gram.h (associativity): New enum type which replaces the
10634 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10635 `right_assoc', `left_assoc' and `non_assoc'.
10636 Adjust all dependencies.
10637 * src/reader.c: Formatting changes.
10638 (LTYPESTR): Don't define it, use it as a literal in
10639 `reader_output_yylsp'.
10640 * src/symtab.h (symbol_class): New enum type which replaces the
10641 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10642 `sunknown', `stoken and `snterm'.
10644 2000-10-02 Akim Demaille <akim@epita.fr>
10646 * src/getargs.c (fixed_outfiles): Rename as...
10647 (yaccflag): for consistency and accuracy.
10648 Adjust dependencies.
10650 2000-10-02 Akim Demaille <akim@epita.fr>
10652 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10653 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10654 difficult and introduced a lot of core dump. It turns out that
10655 Bison used an implementation of `xmalloc' based on `calloc', and
10656 at various places it does depend upon the initialization to 0. I
10657 have not tried to isolate the pertinent places, and all the former
10658 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10659 someone should address this issue.
10661 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10662 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10664 Adjust dependencies.
10665 * src/warshall.h: New file.
10668 2000-10-02 Akim Demaille <akim@epita.fr>
10670 Various anti-`extern in *.c' changes.
10672 * src/system.h: Include `assert.h'.
10674 2000-10-02 Akim Demaille <akim@epita.fr>
10676 * src/state.h (nstates, final_state, first_state, first_shift)
10677 (first_reduction): Move their exportation from here...
10678 * src/LR0.h: to here.
10679 Adjust dependencies.
10680 * src/getargs.c (statisticsflag): New variable.
10681 Add support for `--statistics'.
10682 Adjust dependencies.
10684 Remove a lot of now useless `extern' statements in most files.
10686 2000-10-02 Akim Demaille <akim@epita.fr>
10688 * src/LR0.h: New file.
10691 2000-10-02 Akim Demaille <akim@epita.fr>
10693 * src/print.h: New file.
10695 * src/print.c: Formatting and ordering changes.
10696 (verbose, terse): Replace with...
10697 (print_results): this new function.
10698 Adjust dependencies.
10700 2000-10-02 Akim Demaille <akim@epita.fr>
10702 * src/conflicts.c (conflict_report): New function.
10703 (conflict_log, verbose_conflict_log): Replace with...
10704 (print_conflicts): this function.
10705 Adjust dependencies.
10706 * src/conflicts.h: New file.
10707 Propagate its inclusion.
10709 2000-10-02 Akim Demaille <akim@epita.fr>
10711 * src/nullable.h: New file.
10712 Propagate its inclusion.
10713 * src/nullable.c: Formatting changes.
10715 2000-10-02 Akim Demaille <akim@epita.fr>
10717 * src/reduce.h: New file.
10718 Propagate its inclusion.
10719 * src/reduce.c: Topological sort and other formatting changes.
10720 (bool, TRUE, FALSE): Move their definition to...
10721 * src/system.h: here.
10723 2000-10-02 Akim Demaille <akim@epita.fr>
10725 * src/files.c: Formatting changes.
10726 (tryopen, tryclose, openfiles): Rename as...
10727 (xfopen, xfclose, open_files): this.
10728 (stringappend): static.
10729 * src/files.h: Complete the list of exported symbols.
10732 2000-10-02 Akim Demaille <akim@epita.fr>
10734 * src/reader.h: New file.
10735 Propagate its use instead of tedious list of `extern' and
10737 * src/reader.c: Formatting changes, topological sort,
10740 2000-10-02 Akim Demaille <akim@epita.fr>
10742 * src/lex.h: Prototype `lex.c' exported functions.
10743 * src/reader.c: Adjust.
10744 * src/lex.c: Formatting changes.
10745 (safegetc): Rename as...
10748 2000-10-02 Akim Demaille <akim@epita.fr>
10750 * src/lalr.h: New file.
10751 Propagate its inclusion instead of prototypes and `extern'.
10752 * src/lalr.c: Formatting changes, topological sorting etc.
10754 2000-10-02 Akim Demaille <akim@epita.fr>
10756 * src/output.c (token_actions): Introduce a temporary array,
10757 YYDEFACT, that makes it possible for this function to use
10758 output_short_table.
10760 2000-10-02 Akim Demaille <akim@epita.fr>
10762 `user_toknums' is output as a `short[]' in `output.c', while it is
10763 defined as a `int[]' in `reader.c'. For consistency with the
10764 other output tables, `user_toknums' is now defined as a table of
10767 * src/reader.c (user_toknums): Be a short table instead of an int
10769 Adjust dependencies.
10771 Factor the short table outputs.
10773 * src/output.c (output_short_table): New function.
10774 * src/output.c (output_gram, output_stos, output_rule_data)
10775 (output_base, output_table, output_check): Use it.
10777 2000-10-02 Akim Demaille <akim@epita.fr>
10779 * src/output.c (output): Topological sort of the functions, in
10780 order to get rid of the `static' prototypes.
10781 No longer use `register'.
10782 * src/output.h: New file.
10783 Propagate its inclusion in files explicitly prototyping functions
10786 2000-09-21 Akim Demaille <akim@epita.fr>
10788 * src/atgeneral.m4: Update from Autoconf.
10790 2000-09-21 Akim Demaille <akim@epita.fr>
10792 * src/closure.h: New file.
10793 * src/closure.c: Formatting changes, topological sort over the
10794 functions, use of closure.h.
10795 (initialize_closure, finalize_closure): Rename as...
10796 (new_closure, free_closure): these. Adjust dependencies.
10797 * src/LR0.c: Formatting changes, topological sort, use of
10799 (initialize_states): Rename as...
10800 (new_states): this.
10801 * src/Makefile.am (noinst_HEADERS): Adjust.
10803 2000-09-20 Akim Demaille <akim@epita.fr>
10805 * src/acconfig.h: Don't protect config.h against multiple
10807 Don't define PARAMS.
10808 * src/system.h: Define PARAMS.
10809 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
10810 purpose of config.h. system.h must not try to fix wrong
10811 definitions in config.h.
10813 2000-09-20 Akim Demaille <akim@epita.fr>
10815 * src/derives.h: New file.
10816 * src/main.c, src/derives.h: Use it.
10817 Formatting changes.
10818 * src/Makefile.am (noinst_HEADERS): Adjust.
10820 2000-09-20 Akim Demaille <akim@epita.fr>
10822 * tests/atgeneral.m4: Update from Autoconf.
10823 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
10824 (AT_CHECK_CALC): New macros.
10825 Use these macros to test bison with options `', `--raw',
10826 `--debug', `--yacc', `--yacc --debug'.
10828 2000-09-19 Akim Demaille <akim@epita.fr>
10830 * src/output.c: Formatting changes.
10831 * src/machine.h: Remove, leaving its contents in...
10832 * src/system.h: here.
10834 Adjust all dependencies on stdio.h and machine.h.
10835 * src/getargs.h: New file.
10836 Let all `extern' declarations about getargs.c be replaced with
10837 inclusion of `getargs.h'.
10838 * src/Makefile.am (noinst_HEADERS): Adjust.
10840 * tests/calc.m4 (yyin): Be initialized in main, not on the global
10842 (yyerror): Returns void, not int.
10843 * doc/bison.texinfo: Formatting changes.
10845 2000-09-19 Akim Demaille <akim@epita.fr>
10847 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
10850 2000-09-18 Akim Demaille <akim@epita.fr>
10852 * configure.in: Append WARNING_CFLAGS to CFLAGS.
10853 * src/Makefile.am (INCLUDES): Don't.
10854 Be ready to fetch headers in lib/.
10856 2000-09-18 Akim Demaille <akim@epita.fr>
10858 * doc/bison.texinfo: Update the copyright.
10859 ANSIfy and GNUify the examples.
10860 Remove the old menu.
10862 2000-09-18 Akim Demaille <akim@epita.fr>
10864 First set of tests: use the `calc' example from the documentation.
10866 * src/bison.s1 (yyparse): Condition the code using `yytname' which
10867 is defined only when YYDEBUG is.
10868 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
10869 * src/files.c (tryopen, tryclose): Formatting changes.
10870 Move to the top and be static.
10871 * src/reader.c (read_signed_integer): Likewise.
10872 * tests/calc.m4: New file.
10873 * Makefile.am, suite.m4: Adjust.
10874 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
10876 2000-09-18 Akim Demaille <akim@epita.fr>
10878 Add support for an Autotest test suite for Bison.
10880 * m4/m4.m4, m4/atconfig.m4: New files.
10881 * m4/Makefile.am (EXTRA_DIST): Adjust.
10882 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
10884 * src/getargs.c: Display a more standard --version message.
10885 * src/reader.c (reader): Formatting changes.
10886 No longer depend upon VERSION_STRING.
10887 * configure.in: No longer use `dnl'.
10888 Set up the test suite and the new directory `tests/.
10889 (VERSION_STRING): Remove.
10891 2000-04-14 Akim Demaille <akim@epita.fr>
10893 * src/reader.c (copy_comment2): New function, same as former
10894 `copy_comment', but outputs into two FILE *.
10895 (copy_comment): Use it.
10896 (parse_union_decl): Use it.
10897 (get_type, parse_start_decl): Use the same `invalid' message.
10898 (parse_start_decl, parse_union_decl): Use the same `multiple'
10900 (parse_union_decl, copy_guard, copy_action): Use the same
10901 `unmatched' message.
10902 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
10904 2000-03-31 Akim Demaille <akim@epita.fr>
10906 * src/files.c (tryopen, tryclose): Move to the top.
10909 2000-03-31 Akim Demaille <akim@epita.fr>
10911 * src/main.c (main): Don't call `done', exit does it.
10913 2000-03-31 Akim Demaille <akim@epita.fr>
10915 * allocate.c: s/return (foo)/return foo/.
10916 * lalr.c: Likewise.
10918 * output.c: Likewise.
10919 * reader.c: Likewise.
10920 * symtab.c: Likewise.
10921 * vmsgetargs.c: Likewise.
10923 2000-03-31 Akim Demaille <akim@epita.fr>
10925 Clean up the error reporting functions.
10927 * src/report.c: New file.
10928 * src/report.h: Likewise.
10929 * src/Makefile.am: Adjust.
10930 * m4/error.m4: New file.
10931 * m4/Makefile.am: Adjust.
10932 * configure.in (jm_PREREQ_ERROR): Call it.
10933 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
10935 (fatal, fatals): Remove. All callers use complain.c::fatal.
10936 (warn, warni, warns, warnss, warnss): Remove. All callers use
10937 complain.c::complain.
10938 (toomany): Remove, use fatal instead.
10939 * src/files.c (done): No argument, use complain_message_count.
10940 * src/main.c (main): Register `done' to `atexit'.
10942 * src/getargs.c (usage): More `fputs', less `fprintf'.
10944 2000-03-28 Akim Demaille <akim@epita.fr>
10946 * lib/: New directory.
10947 * Makefile.am (SUBDIRS): Adjust.
10948 * configure.in: Adjust.
10949 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
10951 * src/alloca.c: Moved to lib/.
10952 * src/getopt.c: Likewise.
10953 * src/getopt1.c: Likewise.
10954 * src/getopt.h: Likewise.
10955 * src/ansi2knr.c: Likewise.
10956 * src/ansi2knr.1: Likewise.
10957 * src/Makefile.am: Adjust.
10958 * lib/Makefile.am: New file.
10960 2000-03-28 Akim Demaille <akim@epita.fr>
10962 * src/getargs.c (usage): Refresh the help message.
10964 2000-03-17 Akim Demaille <akim@epita.fr>
10966 * src/getopt1.c: Updated from textutils 2.0e
10967 * src/getopt.c: Likewise.
10968 * src/getopt.h: Likewise.
10970 2000-03-17 Akim Demaille <akim@epita.fr>
10972 * src/Makefile.am (bison.simple): Fix the awk program: quote only
10973 the file name, not the whole `#line LINE FILE'.
10975 2000-03-17 Akim Demaille <akim@epita.fr>
10977 On syntax errors, report the token on which we choked.
10979 * src/bison.s1 (yyparse): In the label yyerrlab, when
10980 YYERROR_VERBOSE, add yychar in msg.
10982 2000-03-17 Akim Demaille <akim@epita.fr>
10984 * src/reader.c (copy_at): New function.
10985 (copy_guard): Use it.
10986 (copy_action): Use it.
10988 2000-03-17 Akim Demaille <akim@epita.fr>
10990 Be kind to translators, save some useless translations.
10992 * src/main.c (banner): New function.
10993 (fatal_banner): Use it.
10994 (warn_banner): Use it.
10996 2000-03-17 Akim Demaille <akim@epita.fr>
10998 * src/reader.c (copy_definition): Use copy_string and
10999 copy_comment. Removed now unused `match', `ended',
11001 (copy_comment, copy_string): Moved, to be visible from
11004 2000-03-17 Akim Demaille <akim@epita.fr>
11006 * src/reader.c (copy_string): Declare `static inline'. No
11007 problems with inline, since it is checked by configure.
11008 (copy_comment): Likewise.
11010 2000-03-17 Akim Demaille <akim@epita.fr>
11012 * src/reader.c (packsymbols): Formatting changes.
11014 2000-03-17 Akim Demaille <akim@epita.fr>
11016 * src/reader.c (copy_comment): New function, factored out from:
11017 (copy_action): Use it. Removed now unused `match', `ended',
11019 (copy_guard): Likewise.
11021 2000-03-17 Akim Demaille <akim@epita.fr>
11023 * src/reader.c (copy_string): New function, factored out from:
11024 (copy_action): Use it.
11025 (copy_guard): Likewise.
11027 2000-03-17 Akim Demaille <akim@epita.fr>
11029 Change the handling of @s so that they behave exactly like $s.
11030 There is now a pseudo variable @$ (readble and writable), location
11031 of the lhs of the rule (by default ranging from the location of
11032 the first symbol of the rhs, to the location of the last symbol,
11033 or, if the rhs is empty, YYLLOC).
11035 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
11037 (yyparse): When providing a default semantic action, provide a
11038 default location action.
11039 (after the $): No longer change `*YYLSP', just stack YYLOC the
11040 same way you stack YYVAL.
11041 * src/reader.c (read_declarations): Use warns.
11042 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
11043 (copy_action, case '@'): Likewise.
11044 Use a standard error message, to save useless work from
11047 2000-03-17 Akim Demaille <akim@epita.fr>
11049 * src/bison.s1: Formatting and cosmetics changes.
11050 * src/reader.c: Likewise.
11051 Update the Copyright notice.
11053 2000-03-17 Akim Demaille <akim@epita.fr>
11055 * src/bison.s1 (#line): All set to `#line' only, since the
11056 Makefile now handles them.
11058 2000-03-16 Akim Demaille <akim@epita.fr>
11060 * src/output.c (output_rule_data): Output the documentation of
11061 some of the tables.
11062 (Copyright notice): Update.
11063 Formatting changes.
11065 2000-03-16 Akim Demaille <akim@epita.fr>
11067 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
11068 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
11069 One `#if YYDEBUG' remains, since it uses variables which are
11070 defined only if `YYDEBUG != 0'.
11072 2000-03-16 Akim Demaille <akim@epita.fr>
11074 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
11075 and related variables so that the similarities are highlighted.
11077 2000-03-16 Akim Demaille <akim@epita.fr>
11079 * src/bison.s1: Properly indent CPP directives.
11081 2000-03-16 Akim Demaille <akim@epita.fr>
11083 * src/bison.s1: Properly indent the `alloca' CPP section.
11085 2000-03-16 Akim Demaille <akim@epita.fr>
11087 Do not hard code values of directories in `configure.in'.
11088 Update the `configure' tool chain.
11090 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
11092 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
11093 (AC_OUTPUT): Add m4/Makefile.
11094 Bump to bison 1.28a, 1.29 has never been released.
11095 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
11096 handled via src/Makefile.am.
11097 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
11098 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
11100 * Makefile.am (SUBDIRS): Add m4.
11101 (ACLOCAL_AM_FLAGS): New variable.
11102 (AUTOMAKE_OPTIONS): Add check-news.
11103 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
11104 the proper line number and file name.
11105 (DEFS): Propagate the location of bison library files and of the
11107 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
11109 * acinclude.m4: Remove, replaced by the directory m4.
11110 * m4/Makefile.am (EXTRA_DIST): New variable.
11111 * m4/gettext.m4: New file, from the fileutils.
11112 * m4/lcmessage.m4: Likewise
11113 * m4/progtest.m4: Likewise.
11114 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
11116 2000-03-10 Akim Demaille <akim@epita.fr>
11119 Formatting changes of various comments.
11120 Respect the GNU coding standards at various places.
11121 Don't use `_()' when no translation is needed.
11123 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11126 OS/2 honors TMPDIR environment variable.
11128 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11130 * doc/bison.texinfo: Tweaked spelling and grammar.
11132 Removed reference to price of printed copy.
11133 Mention BISON_SIMPLE and BISON_HAIRY.
11135 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11137 * configure.in, NEWS:
11138 Bison 1.29 released.
11140 1999-10-27 Jesse Thilo <jthilo@gnu.org>
11142 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
11143 Added reference card.
11145 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11147 * po/ru.po: Added Russian translation.
11149 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11151 * configure.in: Added Russian translation.
11153 1999-07-06 Jesse Thilo <jthilo@gnu.org>
11155 * configure.in, NEWS, README:
11156 Released version 1.28.
11158 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11161 Squashed redefinition warning on some systems.
11163 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
11164 Have configure build version string instead of relying on ANSI string
11167 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11169 * po/POTFILES.in: Got rid of version.c.
11171 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11173 * acconfig.h, configure.in:
11174 Have configure build version string instead of relying on ANSI string
11177 1999-06-08 Jesse Thilo <jthilo@gnu.org>
11180 Dropped mention of `+' for long-named options.
11182 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11184 * src/files.c: Added <unistd.h> for unlink().
11186 * src/Makefile.am, src/system.h:
11189 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11191 * README: Added a FAQ list.
11193 * configure.in, acconfig.h:
11196 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11198 * doc/FAQ, doc/Makefile.am:
11201 1999-05-19 Jesse Thilo <jthilo@gnu.org>
11203 * src/alloc.h, src/symtab.h, src/version.c:
11204 Protected inclusion of "config.h" with HAVE_CONFIG_H.
11206 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11208 * src/.cvsignore, src/Makefile.am:
11209 Reorganized: sources in `src', documentation in `doc'.
11211 * src/lex.c (literalchar):
11212 fixed the code for escaping double quotes (thanks
11215 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11217 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
11218 Adjusted paths to reflect directory reorganization.
11220 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11222 * doc/.cvsignore, doc/Makefile.am:
11223 Reorganized: sources in `src', documentation in `doc'.
11225 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11228 Updated AC_INIT file to reflect directory reorganization.
11230 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
11231 Reorganized: sources in `src', documentation in `doc'.
11233 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11236 Don't declare calloc() and realloc() if not necessary.
11238 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11240 * configure.in, acconfig.h, acinclude.m4:
11241 Don't declare calloc() and realloc() if not necessary.
11243 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11245 * po/.cvsignore: Added i18n support.
11247 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11249 * acconfig.h, configure.in, Makefile.am:
11250 Added i18n support.
11252 1999-03-22 Jesse Thilo <jthilo@gnu.org>
11254 * src/bison.s1: Fixed #line numbers.
11256 1999-03-15 Jesse Thilo <jthilo@gnu.org>
11258 * po/es.po, po/fr.po, po/nl.po, po/de.po:
11259 Added PO files from Translation Project.
11261 1999-03-03 Jesse Thilo <jthilo@gnu.org>
11264 Added support for non-ANSI compilers (ansi2knr).
11266 1999-02-16 Jesse Thilo <jthilo@gnu.org>
11268 * configure.in: Bumped version number to 1.27.
11271 Added `bison.simple' to list of files removed by `make distclean'.
11273 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11275 * src/files.c, src/files.h:
11276 Defined locations of parser files in config.h instead of Makefile.
11278 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11280 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
11281 Defined locations of parser files in config.h instead of Makefile.
11283 1999-02-09 Jesse Thilo <jthilo@gnu.org>
11286 Removed inappropriate use of $< macro.
11288 1999-02-05 Jesse Thilo <jthilo@gnu.org>
11290 * po/Makefile.in.in, po/POTFILES.in:
11291 Add `po' directory skeleton.
11293 1999-01-27 Jesse Thilo <jthilo@gnu.org>
11295 * README: Document help-bison list.
11297 * configure.in: Add check for mkstemp().
11299 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11301 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
11302 Hush a few compiler warnings.
11305 Add tryclose(), which verifies that fclose was successful.
11306 Hush a couple of compiler warnings.
11308 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11310 * Makefile.am, OChangeLog:
11311 ChangeLog is now automatically generated. Include the old version as
11314 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11316 * 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:
11317 Update FSF address.
11319 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11321 * doc/bison.texinfo: Fix formatting glitch.
11323 * doc/bison.texinfo: Update FSF address.
11325 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11327 * acconfig.h: Update FSF address.
11329 1999-01-08 Jesse Thilo <jthilo@gnu.org>
11332 Don't define PACKAGE here, since config.h defines it.
11334 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11336 * src/reader.c: Update copyright date.
11339 Ditch sprintf to statically-sized buffers in fatal/warn functions in
11340 favor of output directly to stderr (avoids buffer overruns).
11342 * src/reader.c: Some checks for premature EOF.
11344 * 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:
11345 Use prototypes if the compiler understands them.
11347 * src/files.c: Honor TMPDIR on Unix hosts.
11348 Use prototypes if the compiler understands them.
11351 Fix a couple of buffer overrun bugs.
11352 Use prototypes if the compiler understands them.
11354 * src/system.h: Include unistd.h and ctype.h.
11355 Use #ifdef instead of #if for NLS symbols.
11357 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11359 * doc/bison.texinfo:
11360 Delete comment "consider using @set for edition number, etc..." since
11361 we now are doing so.
11363 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11366 Use prototypes if the compiler understands them.
11368 * NEWS: Document 1.26 highlights.
11370 * Makefile.am: Require Automake 1.3 or later.
11373 Use prototypes if the compiler understands them.
11375 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11378 Use VERSION symbol from automake for version number.
11380 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11382 * acconfig.h, configure.in, version.cin:
11383 Use VERSION symbol from automake for version number.
11385 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11388 Distribute original version of simple parser (bison.s1), not built
11389 version (bison.simple).
11391 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11393 * doc/bison.texinfo: Add info dir entry.
11395 * doc/bison.texinfo:
11396 Let automake put version number into documentation.
11398 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11400 * src/bison.cld, src/build.com, src/vmshlp.mar:
11401 Add non-RCS files from /gd/gnu/bison.
11403 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11406 Document the BISON_HAIRY and BISON_SIMPLE variables.
11408 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11410 * src/version.c: Build version.c automatically.
11413 Fix token numbering (used to start at 258, not 257).
11415 * src/system.h: Include config.h.
11417 * src/getargs.c: Update bug report address.
11419 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
11420 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
11422 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11425 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11427 * configure.in, version.cin:
11428 Build version.c automatically.
11430 * AUTHORS: Add AUTHORS file.
11432 * README: Update bug report address.
11435 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11437 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
11438 Add automake stuff.
11440 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11442 * doc/bison.texinfo: Clean up some formatting.
11444 1998-05-05 Richard Stallman <rms@gnu.org>
11446 * doc/bison.texinfo:
11447 Explain better why to make a pure parser.
11449 1998-01-05 Richard Stallman <rms@gnu.org>
11451 * src/files.c (openfiles):
11452 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
11453 find a temporary directory, if possible. Do not unlink files while
11456 1997-08-25 Richard Stallman <rms@gnu.org>
11458 * src/reader.c (stack_offset;):
11459 Change some warni to warns.
11461 * src/lex.c (literalchar): Use warns, not warni.
11463 1997-06-28 Richard Stallman <rms@gnu.org>
11465 * src/bison.s1: Add a Bison version comment.
11467 * src/main.c (fatal, warn, berror):
11470 1997-06-28 Richard Stallman <rms@gnu.org>
11472 * Makefile.in (bison_version): New variable.
11473 (dist): Use that variable.
11474 (bison.s1): Substitute the Bison version into bison.simple.
11476 * bison.simple: Add a Bison version comment.
11478 1997-06-18 Richard Stallman <rms@gnu.org>
11480 * src/main.c (fatal, warn, berror):
11481 Make error messages standard.
11482 (toomany): Improve error message text.
11484 * 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:
11485 new.h renamed to alloc.h.
11487 1997-06-18 Richard Stallman <rms@gnu.org>
11489 * Makefile.in: new.h renamed to alloc.h.
11491 1997-05-24 Richard Stallman <rms@gnu.org>
11493 * src/lex.c (literalchar):
11494 Fix the code for escaping \, " and '.
11496 (lex): Avoid trouble when there are many chars
11497 to discard in a char literal with just several chars in it.
11499 1997-05-17 Richard Stallman <rms@gnu.org>
11502 Use malloc, if using alloca is troublesome.
11503 (YYSTACK_USE_ALLOCA): New flag macro.
11504 Define it for some systems and compilers.
11505 (YYSTACK_ALLOC): New macro.
11506 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11507 If it was malloc'd, free it.
11509 1997-05-17 Richard Stallman <rms@gnu.org>
11512 Use malloc, if using alloca is troublesome.
11513 (YYSTACK_USE_ALLOCA): New flag macro.
11514 Define it for some systems and compilers.
11515 (YYSTACK_ALLOC): New macro.
11516 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11517 If it was malloc'd, free it.
11519 1997-04-23 Richard Stallman <rms@gnu.org>
11522 (alloca) [__hpux]: Always define as __builtin_alloca.
11524 1997-04-23 Richard Stallman <rms@gnu.org>
11527 (alloca) [__hpux]: Always define as __builtin_alloca.
11529 1997-04-22 Richard Stallman <rms@gnu.org>
11532 [__hpux]: Include alloca.h (right for HPUX 10)
11533 instead of declaring alloca (right for HPUX 9).
11535 * src/bison.s1 (__yy_memcpy):
11536 Declare arg `count' as unsigned int.
11537 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11539 1997-04-22 Richard Stallman <rms@gnu.org>
11542 [__hpux]: Include alloca.h (right for HPUX 10)
11543 instead of declaring alloca (right for HPUX 9).
11545 * bison.simple (__yy_memcpy):
11546 Declare arg `count' as unsigned int.
11547 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11549 1997-01-03 Richard Stallman <rms@gnu.org>
11551 * src/allocate.c: [__STDC__ or _MSC_VER]:
11552 Declare calloc and realloc to return void *.
11554 1997-01-02 Richard Stallman <rms@gnu.org>
11557 [_MSC_VER]: Include stdlib.h and process.h.
11558 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
11560 * src/main.c (main): Return FAILURE as a value.
11561 (printable_version): Declare arg as int, not char.
11563 1997-01-02 Richard Stallman <rms@gnu.org>
11565 * Makefile.in (dist):
11566 Explicitly check for symlinks, and copy them.
11568 1996-12-19 Richard Stallman <rms@gnu.org>
11571 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
11573 1996-12-18 Paul Eggert <eggert@gnu.org>
11575 * src/bison.s1 (yyparse):
11576 If __GNUC__ and YYPARSE_PARAM are both defined,
11577 declare yyparse to have a void * argument.
11579 1996-12-18 Paul Eggert <eggert@gnu.org>
11581 * bison.simple (yyparse):
11582 If __GNUC__ and YYPARSE_PARAM are both defined,
11583 declare yyparse to have a void * argument.
11585 1996-12-17 Richard Stallman <rms@gnu.org>
11587 * src/reduce.c (nbits): Add some casts.
11589 1996-08-12 Richard Stallman <rms@gnu.org>
11591 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
11593 1996-08-12 Richard Stallman <rms@gnu.org>
11595 * bison.simple: Test _MSDOS as well as _MSDOS_.
11597 1996-07-31 Richard Stallman <rms@gnu.org>
11600 [__sun && __i386]: Include alloca.h.
11602 1996-07-31 Richard Stallman <rms@gnu.org>
11605 [__sun && __i386]: Include alloca.h.
11607 1996-07-30 Richard Stallman <rms@gnu.org>
11609 * src/bison.s1: Comment change.
11611 * src/bison.s1: Test _MSDOS_, not MSDOS.
11613 1996-07-30 Richard Stallman <rms@gnu.org>
11615 * bison.simple: Comment change.
11617 * bison.simple: Test _MSDOS_, not MSDOS.
11619 1996-06-01 Richard Stallman <rms@gnu.org>
11621 * 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:
11622 Insert `_' macro around many string constants.
11625 Insert `_' macro around many string constants.
11627 (main): Call setlocale, bindtextdomain and textdomain.
11629 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11630 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11631 [ENABLE_NLS]: Include libintl.h.
11632 [ENABLE_NLS] (gettext): Define.
11633 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11634 (N_, PACKAGE, LOCALEDIR): New macros.
11636 1996-06-01 Richard Stallman <rms@gnu.org>
11638 * POTFILES.in: New file.
11640 * Makefile.in (allocate.o):
11641 Define target explicitly.
11643 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11644 (LDFLAGS): Set to @LDFLAGS@.
11645 (configure): Run autoconf only if preceding `cd' succeeds.
11646 (bison.s1): Redirect output to temporary file then move the
11647 temporary to the target, rather than redirecting directly to bison.s1.
11648 (clean): Remove config.status and config.log.
11649 (distclean): Don't remove config.status here.
11651 1996-05-12 Richard Stallman <rms@gnu.org>
11654 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11656 1996-05-12 Richard Stallman <rms@gnu.org>
11659 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11661 1996-05-11 Richard Stallman <rms@gnu.org>
11663 * src/bison.s1 (__yy_memcpy):
11664 Really reorder the args, as was supposedly done on Feb 14 1995.
11665 (yyparse): Calls changed accordingly.
11667 1996-05-11 Richard Stallman <rms@gnu.org>
11669 * Makefile.in (dist): Don't use $(srcdir).
11671 * bison.simple (__yy_memcpy):
11672 Really reorder the args, as was supposedly done on Feb 14 1995.
11673 (yyparse): Calls changed accordingly.
11675 1996-01-27 Richard Stallman <rms@gnu.org>
11677 * src/output.c (output_rule_data):
11678 Test YYERROR_VERBOSE in the conditional
11679 around the definition of ttyname.
11681 1995-12-29 Richard Stallman <rms@gnu.org>
11684 Fix line numbers in #line commands.
11686 1995-12-29 Richard Stallman <rms@gnu.org>
11689 Fix line numbers in #line commands.
11691 1995-12-27 Richard Stallman <rms@gnu.org>
11693 * src/bison.s1 (YYPARSE_PARAM_DECL):
11694 In C++, make it always null.
11695 (YYPARSE_PARAM_ARG): New macro.
11696 (yyparse): Use YYPARSE_PARAM_ARG.
11698 1995-12-27 Richard Stallman <rms@gnu.org>
11700 * bison.simple (YYPARSE_PARAM_DECL):
11701 In C++, make it always null.
11702 (YYPARSE_PARAM_ARG): New macro.
11703 (yyparse): Use YYPARSE_PARAM_ARG.
11705 1995-11-29 Richard Stallman <rms@gnu.org>
11707 * doc/bison.texinfo:
11708 Describe literal string tokens, %raw, %no_lines, %token_table.
11710 1995-11-29 Daniel Hagerty <hag@gnu.org>
11712 * doc/bison.texinfo: Fixed update date
11714 1995-10-16 Richard Stallman <rms@gnu.org>
11716 * src/version.c: Version 1.25.
11718 1995-10-16 Richard Stallman <rms@gnu.org>
11720 * NEWS: *** empty log message ***
11722 1995-10-16 Richard Stallman <rms@gnu.org>
11724 * doc/bison.1, doc/bison.rnh:
11727 1995-10-15 Richard Stallman <rms@gnu.org>
11729 * src/vmsgetargs.c, src/getargs.c:
11730 Added -n, -k, and -raw switches.
11731 (noparserflag, toknumflag, rawtoknumflag): New variables.
11733 * src/symtab.h (SALIAS):
11734 New #define for adding aliases to %token.
11735 (struct bucket): Added `alias' field.
11737 * src/reduce.c (reduce_grammar):
11738 Revise error message.
11739 (print_notices): Remove final `.' from error message.
11741 * src/reader.c (reader_output_yylsp):
11743 (readgram): Use `#if 0' around code that accepted %command
11744 inside grammar rules: The documentation doesn't allow it,
11745 and it will fail since the %command processors scan for the next %.
11746 (parse_token_decl): Extended the %token
11747 declaration to allow a multi-character symbol as an alias.
11748 (parse_thong_decl): New function.
11749 (read_declarations): Added %thong declarations.
11750 (read_declarations): Handle NOOP to deal with allowing
11751 % declarations as another means to specify the flags.
11752 (readgram): Allow %prec prior to semantics embedded in a rule.
11753 (skip_to_char, read_declarations, copy_definition)
11754 (parse_token_decl, parse_start_decl, parse_type_decl)
11755 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
11756 (get_type_name, copy_guard, copy_action, readgram)
11757 (get_type, packsymbols): Revised most error messages.
11758 Changed `fatal' to `warnxxx' to avoid aborting for error.
11759 Revised and use multiple warnxxx functions to avoid using VARARGS1.
11760 (read_declarations): Improve the error message for
11761 an invalid character. Do not abort.
11762 (read_declarations, copy_guard, copy_action): Use
11763 printable_version to avoid unprintable characters in printed output.
11764 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
11765 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
11766 Allow the type of a non-terminal can be given
11767 more than once, as long as all specifications give the same type.
11770 (output_headers, output_trailers, output, output_gram)
11771 (output_rule_data): Implement noparserflag variable.
11772 Implement toknumflag variable.
11773 (output): Call reader_output_yylsp to output LTYPESTR.
11775 * src/main.c (main):
11776 If reader sees an error, don't process the grammar.
11777 (fatals): Updated to not use VARARGS1.
11778 (printable_version, int_to_string, warn, warni, warns, warnss)
11779 (warnsss): New error reporting functions. Avoid abort for error.
11782 Added THONG and NOOP for alias processing.
11783 Added SETOPT for the new code that allows setting options with %flags.
11786 Include getopt.h. Add some extern decls.
11787 (safegetc): New function to deal with EOF gracefully.
11788 (literalchar); new function to deal with reading \ escapes.
11789 (lex): Use literalchar.
11790 (lex): Implemented "..." tokens.
11791 (literalchar, lex, parse_percent_token): Made tokenbuffer
11792 always contain the token. This includes growing the token
11793 buffer while reading an integer.
11794 (parse_percent_token): Replaced if-else statement with percent_table.
11795 (parse_percent_token): Added % declarations as another
11796 way to specify the flags -n, -l, and -r. Also added hooks for
11797 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
11798 major changes to files.c.
11799 (lex) Retain in the incoming stream a character following
11801 (skip_white_space, lex): Revised most error messages
11802 and changed fatal to warn to avoid aborting.
11803 (percent_table): Added %thong declarations.
11805 * src/gram.h: Comment changes.
11807 * src/files.c (openfiles, open_extra_files, done):
11809 and actfile file. Handle noparserflag. Both for -n switch.
11811 * src/conflicts.c (resolve_sr_conflict):
11812 Remove use of alloca.
11814 1995-06-01 Jim Meyering <meyering@gnu.org>
11816 * doc/bison.texinfo: *** empty log message ***
11818 1995-05-06 Richard Stallman <rms@gnu.org>
11820 * src/bison.s1: Comment change.
11822 1995-05-06 Richard Stallman <rms@gnu.org>
11824 * bison.simple: Comment change.
11826 1995-05-03 Richard Stallman <rms@gnu.org>
11828 * src/version.c: Version now 1.24.
11830 * src/bison.s1: Change distribution terms.
11832 * src/version.c: Version now 1.23.
11834 1995-05-03 Richard Stallman <rms@gnu.org>
11836 * doc/bison.texinfo:
11837 Rewrite "Conditions for Using Bison".
11838 Update version to 1.24.
11840 1995-05-03 Richard Stallman <rms@gnu.org>
11842 * bison.simple: Change distribution terms.
11844 1995-02-23 Richard Stallman <rms@gnu.org>
11846 * src/files.c: Test __VMS_POSIX as well as VMS.
11848 1995-02-14 Jim Meyering <meyering@gnu.org>
11850 * src/bison.s1 (__yy_memcpy):
11851 Renamed from __yy_bcopy to avoid
11852 confusion. Reverse FROM and TO arguments to be consistent with
11855 1995-02-14 Jim Meyering <meyering@gnu.org>
11857 * bison.simple (__yy_memcpy):
11858 Renamed from __yy_bcopy to avoid
11859 confusion. Reverse FROM and TO arguments to be consistent with
11862 1994-11-10 David J. MacKenzie <djm@gnu.org>
11868 * Makefile.in (DISTFILES): Include NEWS.
11870 * Makefile.in (DISTFILES):
11871 Include install-sh, not install.sh.
11873 * configure.in: Update to Autoconf v2 macro names.
11875 1994-10-05 David J. MacKenzie <djm@gnu.org>
11877 * Makefile.in: fix typo
11879 * Makefile.in (prefix, exec_prefix):
11880 Let configure set them.
11882 1994-09-28 David J. MacKenzie <djm@gnu.org>
11884 * Makefile.in: Set datadir to $(prefix)/share.
11886 1994-09-15 Richard Stallman <rms@gnu.org>
11889 Update copyright notice and GPL version.
11891 1994-09-15 Richard Stallman <rms@gnu.org>
11894 Update copyright notice and GPL version.
11896 1994-07-12 Richard Stallman <rms@gnu.org>
11898 * src/reduce.c, src/reader.c:
11901 1994-05-05 David J. MacKenzie <djm@gnu.org>
11903 * Makefile.in: entered into RCS
11905 1994-03-26 Richard Stallman <rms@gnu.org>
11907 * src/bison.s1: entered into RCS
11909 1994-03-26 Richard Stallman <rms@gnu.org>
11911 * bison.simple: entered into RCS
11913 1994-03-25 Richard Stallman <rms@gnu.org>
11915 * src/main.c: entered into RCS
11917 1994-03-24 Richard Stallman <rms@gnu.org>
11919 * src/conflicts.c: entered into RCS
11921 1994-01-02 Richard Stallman <rms@gnu.org>
11923 * Makefile.in: *** empty log message ***
11925 1993-11-21 Richard Stallman <rms@gnu.org>
11927 * src/bison.s1: *** empty log message ***
11929 1993-11-21 Richard Stallman <rms@gnu.org>
11931 * doc/bison.texinfo: entered into RCS
11933 * doc/bison.texinfo: *** empty log message ***
11935 1993-11-21 Richard Stallman <rms@gnu.org>
11937 * bison.simple: *** empty log message ***
11939 1993-10-25 David J. MacKenzie <djm@gnu.org>
11941 * doc/bison.texinfo: *** empty log message ***
11943 1993-10-19 Richard Stallman <rms@gnu.org>
11945 * src/bison.s1: *** empty log message ***
11947 1993-10-19 Richard Stallman <rms@gnu.org>
11949 * bison.simple: *** empty log message ***
11951 1993-10-14 Richard Stallman <rms@gnu.org>
11953 * src/bison.s1: *** empty log message ***
11955 1993-10-14 Richard Stallman <rms@gnu.org>
11957 * bison.simple: *** empty log message ***
11959 1993-09-14 David J. MacKenzie <djm@gnu.org>
11961 * doc/bison.texinfo: *** empty log message ***
11963 1993-09-13 Noah Friedman <friedman@gnu.org>
11965 * Makefile.in: *** empty log message ***
11967 1993-09-10 Richard Stallman <rms@gnu.org>
11969 * src/conflicts.c: *** empty log message ***
11971 * src/system.h: entered into RCS
11973 1993-09-10 Richard Stallman <rms@gnu.org>
11975 * doc/bison.1: entered into RCS
11977 1993-09-06 Noah Friedman <friedman@gnu.org>
11979 * src/version.c: entered into RCS
11981 1993-09-06 Noah Friedman <friedman@gnu.org>
11983 * Makefile.in: *** empty log message ***
11985 1993-07-30 David J. MacKenzie <djm@gnu.org>
11987 * Makefile.in: *** empty log message ***
11989 1993-07-24 Richard Stallman <rms@gnu.org>
11991 * src/bison.s1: *** empty log message ***
11993 1993-07-24 Richard Stallman <rms@gnu.org>
11995 * bison.simple: *** empty log message ***
11997 1993-07-08 David J. MacKenzie <djm@gnu.org>
11999 * Makefile.in: *** empty log message ***
12001 1993-07-04 Richard Stallman <rms@gnu.org>
12003 * src/bison.s1: *** empty log message ***
12005 1993-07-04 Richard Stallman <rms@gnu.org>
12007 * bison.simple: *** empty log message ***
12009 1993-06-26 David J. MacKenzie <djm@gnu.org>
12011 * src/getargs.c: entered into RCS
12013 1993-06-26 David J. MacKenzie <djm@gnu.org>
12015 * doc/bison.texinfo: *** empty log message ***
12017 * doc/bison.1: New file.
12019 1993-06-25 Richard Stallman <rms@gnu.org>
12021 * src/getargs.c: New file.
12023 1993-06-16 Richard Stallman <rms@gnu.org>
12025 * src/bison.s1: *** empty log message ***
12027 1993-06-16 Richard Stallman <rms@gnu.org>
12029 * bison.simple: *** empty log message ***
12031 1993-06-03 Richard Stallman <rms@gnu.org>
12033 * src/bison.s1: New file.
12035 1993-06-03 Richard Stallman <rms@gnu.org>
12037 * doc/bison.texinfo: *** empty log message ***
12039 1993-06-03 Richard Stallman <rms@gnu.org>
12041 * bison.simple: New file.
12043 1993-05-19 Richard Stallman <rms@gnu.org>
12045 * doc/bison.texinfo: New file.
12047 1993-05-07 Noah Friedman <friedman@gnu.org>
12049 * Makefile.in: *** empty log message ***
12051 1993-04-28 Noah Friedman <friedman@gnu.org>
12053 * src/reader.c: *** empty log message ***
12055 1993-04-23 Noah Friedman <friedman@gnu.org>
12057 * src/alloc.h: entered into RCS
12059 1993-04-20 David J. MacKenzie <djm@gnu.org>
12061 * src/version.c: *** empty log message ***
12063 * src/files.c, src/allocate.c:
12066 * src/reader.c: *** empty log message ***
12068 * src/lex.c: entered into RCS
12070 * src/conflicts.c: New file.
12072 * src/symtab.c: entered into RCS
12074 * src/alloc.h: New file.
12076 * src/LR0.c: entered into RCS
12078 1993-04-18 Noah Friedman <friedman@gnu.org>
12080 * src/reader.c: New file.
12082 * src/version.c: *** empty log message ***
12084 1993-04-18 Noah Friedman <friedman@gnu.org>
12086 * Makefile.in: *** empty log message ***
12088 1993-04-17 Noah Friedman <friedman@gnu.org>
12090 * Makefile.in: *** empty log message ***
12092 1993-04-15 Richard Stallman <rms@gnu.org>
12094 * src/main.c, src/files.c:
12097 1993-04-15 Noah Friedman <friedman@gnu.org>
12099 * configure.in: entered into RCS
12101 * configure.in: *** empty log message ***
12103 * configure.in: New file.
12105 1993-04-14 Richard Stallman <rms@gnu.org>
12107 * Makefile.in: New file.
12109 1993-04-13 Richard Stallman <rms@gnu.org>
12111 * src/version.c: New file.
12113 1993-03-25 Richard Stallman <rms@gnu.org>
12115 * src/output.c: entered into RCS
12117 1992-09-25 Richard Stallman <rms@gnu.org>
12119 * configure.bat: entered into RCS
12121 1992-06-22 Richard Stallman <rms@gnu.org>
12123 * src/vmsgetargs.c: entered into RCS
12125 1992-06-22 Richard Stallman <rms@gnu.org>
12127 * doc/bison.rnh: entered into RCS
12129 1992-04-20 David J. MacKenzie <djm@gnu.org>
12131 * README: entered into RCS
12133 1992-01-22 Richard Stallman <rms@gnu.org>
12135 * src/machine.h: entered into RCS
12137 1991-12-21 Richard Stallman <rms@gnu.org>
12139 * src/lalr.c, src/closure.c:
12142 1991-12-20 Richard Stallman <rms@gnu.org>
12144 * src/state.h: entered into RCS
12146 1991-12-18 Richard Stallman <rms@gnu.org>
12148 * src/print.c, src/nullable.c, src/derives.c:
12151 1991-11-03 David J. MacKenzie <djm@gnu.org>
12153 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
12156 1988-09-09 Richard Stallman <rms@gnu.org>
12158 * src/bison.hairy: entered into RCS
12160 1987-12-16 Richard Stallman <rms@gnu.org>
12162 * REFERENCES: entered into RCS
12166 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
12167 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
12169 This file is part of Bison, the GNU Compiler Compiler.
12171 Bison is free software; you can redistribute it and/or modify
12172 it under the terms of the GNU General Public License as published by
12173 the Free Software Foundation; either version 2, or (at your option)
12176 Bison is distributed in the hope that it will be useful,
12177 but WITHOUT ANY WARRANTY; without even the implied warranty of
12178 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12179 GNU General Public License for more details.
12181 You should have received a copy of the GNU General Public License
12182 along with Bison; see the file COPYING. If not, write to
12183 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
12184 Boston, MA 02111-1307, USA.