]> git.saurik.com Git - bison.git/blob - ChangeLog
(b4_symbol_actions): Don't assume %union was used.
[bison.git] / ChangeLog
1 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2
3 * doc/bison.texinfo: Minor editorial changes, mostly to the new
4 GLR writeups. E.g., avoid frenchspacing and the future tense,
5 change "lookahead" to "look-ahead", and change "wrt" to "with
6 respect to".
7
8 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9
10 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11 New sections, split off from the GLR Parsers section. Put the new
12 Simple GLR Parser near the start of the GLR section, for clarity.
13 Rewrite connective text.
14
15 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
16
17 * doc/bison.texinfo (Simple GLR Parsers): New section.
18
19 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
20
21 * NEWS, TODO, doc/bison.texinfo:
22 Use "look-ahead" instead of "lookahead", to be consistent.
23 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
24 while we're fixing "look-ahead".
25 * src/conflicts.c (shift_set): Renamed from shiftset.
26 (look_ahead_set): Renamed from lookaheadset.
27 * src/print.c: Likewise.
28 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
29 name for "lookahead".
30 (report_types, usage): Likewise.
31 * src/getargs.h (report_look_ahead_tokens): Renamed from
32 report_lookaheads.
33 * src/lalr.c (compute_look_ahead_tokens): Renamed from
34 compute_lookaheads.
35 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
36 (look_ahead_tokens_print): Renamed from lookaheads_print.
37 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
38 state_rule_lookaheads_print.
39 * src/state.h: Likewise.
40 (reductions.look_ahead_tokens): Renamed from lookaheads.
41 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
42 AT_DATA_LOOKAHEADS_GRAMMAR.
43
44 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
45
46 * README: Update location of patched M4 distribution.
47
48 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
49
50 Don't assume the C++ compiler takes the same arguments as the C compiler
51 (trivial change).
52 * configure.ac (O0CXXFLAGS): New var.
53 * tests/atlocal.in (CXXFLAGS): Use it.
54
55 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
56
57 Fix some "make check" problems with C++ reported by
58 Albert Chin-A-Young for Tru64 C++ in this thread:
59 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
60
61 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
62 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
63 Output to a .cc file for C++, not to a .c file.
64 * tests/calc.at (AT_CHECK_CALC): Likewise.
65 * tests/regression.at (AT_CHECK_DANCER): Likewise.
66 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
67
68 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
69
70 * tests/calc.at, tests/actions.at: Workaround for SGI
71 C++ compiler. (trivial change)
72
73 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
74
75 Spent a few hours checking out which prerequisite versions the
76 current sources actually require. I went all the way back to
77 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
78 a seemingly endless set of combinations of versions more recent
79 than that. The bottom line is that the current sources require
80 fairly recent versions of the build tools, and it'll be some work
81 to change this.
82 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
83 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
84 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
85 Add comments explaining why those particular versions are
86 currently needed.
87
88 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
89 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
90 <http://mail.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
91
92 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
93 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
94
95 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
96
97 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
98 0.11.5. Suggested by Bruno Haible.
99 * bootstrap: Remove gettext version checking.
100
101 * doc/bison.texinfo (Decl Summary): Also mention that %union
102 can depend on prerequisite types. Problem reported by Tim
103 Van Holder.
104
105 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
106
107 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
108 * README-alpha: Don't tell people not to package this.
109
110 * bootstrap: Don't assume $(...) works; use `...` instead.
111 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
112 gettext better.
113
114 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
115 put into the -d output file, and mention what to do if YYSTYPE is
116 defined as a macro.
117
118 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
119
120 Undo change made earlier today: it caused autopoint to not bring
121 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
122 autopoint's.
123
124 * bootstrap: Check that gettext version matches what's in
125 configure.ac. Warn users to ignore robots.txt ERROR 404.
126 * bootstrap: Undo today's earlier change (logged below).
127 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
128
129 The gettext version checking is causing more trouble than it's
130 curing; remove it. Problem reported by Paul Hilfinger.
131
132 * bootstrap: Issue a warning that one can expect a message
133 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
134 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
135
136 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
137
138 Ensure that the C++ compiler used for testing actually works on a
139 simple test program; if not, skip the C++-related tests. Problem
140 reported by Vin Shelton in:
141 http://mail.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
142
143 * m4/cxx.m4: New file.
144 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
145 * tests/atlocal.in (BISON_CXX_WORKS): Add.
146 * tests/local.at (AT_COMPILE_CXX): Use it.
147
148 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
149
150 * data/glr.c (yylloc): Output this macro even if locations are not
151 being generated, as the GLR parser needs it even in that case.
152 Problem reported by Troy A. Johnson
153 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
154
155 * configure.ac (AC_INIT): Update to 1.875e.
156
157 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
158
159 * NEWS: Version 1.875d.
160 * configure.ac (AC_INIT): Likewise.
161 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
162
163 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
164 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
165 lalr1.cc runs afoul of the first, and the last two are no longer
166 supported by GCC 3.4.0.
167 * README: Mention GNU m4 1.4 or later; mention m4 patches.
168 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
169
170 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
171
172 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
173 unsigned int, for compatibility with latest gnulib hash module.
174 * src/state.c (state_hash, state_hasher): Likewise.
175 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
176 * src/uniqstr.c (hash_uniqstr): Likewise.
177
178 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
179
180 * NEWS: Unescaped newlines are no longer allowed in char & strings.
181
182 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
183 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
184 character and string literals.
185 (unexpected_end): New function.
186 (unexpected_eof): Use it.
187 (unexpected_newline): New function.
188 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
189 actions.
190
191 * NEWS: Document %expect-rr.
192
193 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
194 Fix typo by replacing $1 with $option.
195 Remove more 'intl'-related files.
196 Don't DEFUN AM_INTL_SUBDIR twice.
197
198 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
199 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
200 strtoul.c.
201 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
202 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
203 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
204 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
205 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
206 * src/.cvsignore: Add *.output.
207
208 * src/parse-gram.y: Put copyright notice inside %{ %} so it
209 gets copied to the output file.
210
211 2004-04-28 Paul Eggert <eggert@twinsun.com>
212
213 Get files from the gnulib and po repositories, instead of relying
214 on them being in our CVS. Upgrade to latest versions of gnulib
215 and Automake.
216
217 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
218 * bootstrap: Bootstrap from gnulib and po repositories.
219 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
220 * README-cvs: Document these changes. Remove version numbers from
221 mentions of build tools, since they change so often. Mention Flex.
222
223 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
224 (gl_USE_SYSTEM_EXTENSIONS): Add.
225 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
226 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
227 does this for us.
228 (AC_ISC_POSIX): Remove; we no longer support this
229 ancient OS, as it gets in the way of latest Autoconf & gnulib.
230 (AC_HEADER_STDC): Remove: we now assume C89 or better.
231 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
232 Do not check for C89 headers, except for locale.h which is used
233 by the Yacc library and must port to K&R hosts.
234 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
235 Do not check for C89 functions, except for setlocale which is
236 used by the Yacc library.
237 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
238 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
239 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
240 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
241 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
242 AM_GNU_GETTEXT): Remove; now done by:
243 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
244 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
245 for us.
246
247 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
248 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
249 Define to empty, as gnulib.mk will do the rest for us.
250 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
251 for us.
252 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
253 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
254
255 * src/files.c: Include gnulib's xstrndup.h.
256
257 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
258 (REALLOC): Use xnrealloc, for likewise.
259 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
260 (strnlen, memrchr): Remove decls; functions no longer used.
261 Include <stpcpy.h>.
262
263 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
264 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
265 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
266 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
267 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
268 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
269 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
270 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
271 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
272 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
273 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
274 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
275 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
276 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
277 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
278 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
279 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
280 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
281 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
282 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
283 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
284 Remove, as these files are now generated automatically
285 by bootstrap or automake.
286
287 * po/ChangeLog: Remove: all but one entry was a duplicate
288 of this file, and I moved that 2000-11-02 entry here.
289
290 * config/.cvsignore: Add Makefile, depcomp, install-sh.
291 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
292 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
293 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
294 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
295 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
296 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
297 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
298 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
299 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
300 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
301 xstrndup.h.
302 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
303 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
304 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
305 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
306 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
307 * src/.cvsignore: Remove *_.c.
308
309
310 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
311 support it. (The latest stable gzip doesn't.)
312
313 2004-04-27 Paul Eggert <eggert@twinsun.com>
314
315 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
316 case, as stos_ is now used by destructors due to the 2004-02-09
317 change.
318
319 Remove more K&R C support.
320 * lib/libiberty.y (PARAMS): Remove. All uses removed.
321 * lib/subpipe.c (errno): Remove decl.
322 Include <stdlib.h> unconditionally.
323 (EXIT_FAILURE): Remove macro.
324 * src/complain.c (vfprintf, strerror): Remove.
325 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
326 unconditionally.
327 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
328 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
329 (strchr, strspn, memchr): Remove decls.
330 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
331 unconditionally. Do not declare perror.
332 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
333 unconditionally.
334
335 * src/complain.c (_): Remove useless defn, as system.h defines this.
336
337 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
338 with latest obstack.h.
339 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
340 to procedure types, as obstack.h now does that for us.
341 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
342
343 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
344 so that this include file can stand alone.
345 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
346 does this now. Include subpipe.h first after config.h, to
347 test whether it can stand alone.
348
349 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
350 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
351 unused declaration.
352
353 * tests/synclines.at (%union synch line): Put a dummy member in
354 the union, because empty unions aren't allowed in C. Caught
355 by GCC 3.4.0.
356
357 2004-04-13 Jim Meyering <jim@meyering.net>
358
359 * src/conflicts.c (conflicts_print): Correct format string typo:
360 use `%%' to produce literal `%'. (trivial change)
361
362 2004-03-30 Paul Eggert <eggert@twinsun.com>
363
364 * src/getargs.c (version): Update copyright year to 2004.
365
366 * data/c.m4 (b4_int_type): Use 'short int' rather than
367 'short', and similarly for 'long', 'unsigned', etc.
368 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
369 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
370 yy_yypstack, yydumpstack): Likewise.
371 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
372 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
373 Likewise.
374 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
375 yy_stack_print, yyparse): Likewise.
376 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
377 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
378 * lib/bitset.c (bitset_print): Likewise.
379 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
380 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
381 * lib/bitsetv.c (bitsetv_dump): Likewise.
382 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
383 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
384 Likewise.
385 * src/LR0.c (allocate_itemsets): Likewise.
386 * src/gram.h (rule_number, rule): Likewise.
387 * src/lalr.h (goto_number): Likewise.
388 * src/nullable.c (nullable_compute): Likewise.
389 * src/output.c (prepare_rules): Likewise.
390 * src/relation.c (relation_print, relation_digraph): Likewise.
391 * src/relation.h (relation_node): Likewise.
392 * src/state.h (state_number, transitions, errs, reductions,
393 struct state): Likewise.
394 * src/symtab.h (symbol_number, struct symbol): Likewise.
395 * src/tables.c (vector_number, tally, action_number,
396 default_goto, goto_actions): Likewise.
397 * tests/existing.at (GNU Cim Grammar): Likewise.
398 * tests/regression.at (Web2c Actions): Likewise.
399
400 * src/output.c (muscle_insert_short_int_table): Renamed from
401 muscle_insert_short_table. All uses changed.
402
403 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
404
405 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
406 (declaration): Replace expected_conflicts with expected_sr_conflicts.
407 Add %expect-rr rule.
408
409 * src/scan-gram.l: Recognize %expect-rr.
410
411 * src/conflicts.h (expected_sr_conflicts): Rename from
412 expected_conflicts.
413 (expected_rr_conflicts): Declare.
414
415 * src/conflicts.c (expected_sr_conflicts): Rename from
416 expected_conflicts.
417 (expected_rr_conflicts): Define.
418 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
419 for GLR parsers.
420 Use expected_sr_conflicts in place of expected_conflicts.
421 Warn if expected_rr_conflicts used in non-GLR parser.
422
423 * doc/bison.texinfo: Add documentation for %expect-rr.
424
425 2004-03-08 Paul Eggert <eggert@gnu.org>
426
427 Add support for hex token numbers. Suggested by Odd Arild Olsen in
428 <http://mail.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
429
430 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
431 in lalr1.cc.
432 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
433 * src/scan-gram.l (scan_integer): New function.
434 ({int}): Use it.
435 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
436 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
437 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
438 Say "long int", not "long", for uniformity with GNU style.
439
440 2004-02-25 Paul Eggert <eggert@twinsun.com>
441
442 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
443 compilers. This fixes a problem with Intel's C++ compiler being
444 chatty, reported by Guido Trentalancia in
445 <http://mail.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
446
447 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
448
449 Support %destructor and merge error locations in lalr1.cc.
450
451 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
452 (Parser::stos_): Define unconditionally.
453 (Parser::destruct_): New method. Generate its body with
454 b4_yydestruct_generate.
455 (Parser::error_start_): New attribute.
456 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
457 token which are discarded.
458 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
459 error_start_ when erroneous token are discarded.
460 (Parser::parse) <yyerrlab1>: Compute the location of the error
461 token so that it covers all the discarded tokens.
462 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
463 it can be called with `%skeleton "lalr1.cc"', and do that.
464
465 2004-02-02 Paul Eggert <eggert@twinsun.com>
466
467 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
468 $(top_srcdir)/lib and ../lib. This fixes a bug reported
469 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
470 There's no need to mention top_builddir since Automake does that
471 for us.
472 (INCLUDES): Remove, as Automake says it's obsolescent.
473 Contents migrated into AM_CPPFLAGS as described above.
474 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
475
476 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
477
478 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
479 (yyreportSyntaxError): Handle case where lookahead token is
480 YYEMPTY.
481
482 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
483
484 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
485 resulting parsers are compilable with C++.
486
487 2003-12-23 Paul Eggert <eggert@twinsun.com>
488
489 * config/depcomp, config/install-sh: Sync with Automake 1.8.
490 * src/output.c (output_skeleton): Rename local var.
491 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
492 Bison tokens, as this runs afoul of the 2003-10-07 change that
493 disallowed NUL bytes in character constants or string literals.
494
495 * tests/local.at: Require Autoconf 2.59's Autotest.
496 * tests/testsuite.at: Don't include local.at, since we now assume
497 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
498 including it.
499 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
500 multiple inclusion warnings.
501
502 2003-12-02 Akim Demaille <akim@epita.fr>
503
504 * doc/bison.texinfo (How Can I Reset the Parser): More about start
505 conditions.
506 From Bruno Haible.
507
508 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
509
510 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
511
512 2003-10-07 Paul Eggert <eggert@twinsun.com>
513
514 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
515 if testsuite doesn't exist.
516
517 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
518 literals, unfortunately.
519 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
520 Complain about NUL bytes in character constants or string literals.
521
522 2003-10-05 Paul Eggert <eggert@twinsun.com>
523
524 * NEWS: Don't document %no-default-prec, as it's still
525 too experimental.
526 * doc/bison.texinfo: Document %no-default-prec only if
527 the defaultprec flag is set. Normally it's not.
528
529 2003-10-04 Paul Eggert <eggert@twinsun.com>
530
531 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
532 non-modifiable lvalue, instead of a modifiable one.
533 * doc/bison.texinfo (Actions): Document that $$ can
534 be assigned to. Do not claim that $$ and $N are
535 array element references: user code should not rely on this.
536
537 2003-10-01 Paul Eggert <eggert@twinsun.com>
538
539 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
540 (grammar_declaration): Use it.
541 * src/scan-gram.l: New token %no-default-prec.
542 * tests/conflicts.at: Revamp tests to use %no-default-prec.
543 * NEWS, doc/bison.texinfo: Document the above.
544
545 2003-10-01 Akim Demaille <akim@epita.fr>
546
547 VCG no longer supports long_straight_phase.
548
549 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
550 * src/print_graph.c (print_graph): Adjust.
551
552 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
553 and Paul Eggert <eggert@twinsun.com>
554
555 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
556 Table of Symbols): Document %default-prec.
557 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
558 (grammar_declaration): Set default_prec on %default-prec.
559 * src/scan-gram.l (%default-prec): New token.
560 * src/reader.h (default_prec): New flag.
561 * src/reader.c: Likewise.
562 (packgram): Handle it.
563 * tests/conflicts.at (%default-prec without %prec,
564 %default-prec with %prec, %default-prec 1): New tests.
565
566 2003-09-30 Paul Eggert <eggert@twinsun.com>
567
568 * tests/testsuite.at: Include local.at, not input.at, fixing
569 a typo in the 2003-08-25 patch.
570
571 2003-08-27 Akim Demaille <akim@epita.fr>
572
573 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
574 GCC warnings.
575
576 2003-08-26 Akim Demaille <akim@epita.fr>
577
578 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
579 "<\#" to avoid magic from Gnus when posting parts of this script.
580
581 2003-08-26 Akim Demaille <akim@epita.fr>
582
583 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
584 (Parser::parse): here.
585 Adjust: nerrs and errstatus is now replaced by...
586 (Parser::nerrs_, Parser::errstatus_): New.
587
588 2003-08-25 Akim Demaille <akim@epita.fr>
589
590 * config/announce-gen, Makefile.cfg: New.
591 * Makefile.am: Adjust.
592 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
593 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
594
595 2003-08-25 Akim Demaille <akim@epita.fr>
596
597 When reducing initial empty rules, Bison parser read an initial
598 location that is not defined. This results in garbage, and that
599 affects Bison's own parser. Therefore we need (i) to extend Bison
600 to support a means to initialize this location, and (ii) to use
601 this CVS Bison to fix CVS Bison's parser.
602
603 * src/reader.h, reader.c (epilogue_augment): Remove, replace
604 with...
605 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
606 * src/parse-gram.y: Adjust.
607 (%initial-action): New.
608 (%error-verbose): Since we require CVS Bison, there is no reason
609 not to use it.
610 * src/scan-gram.l: Adjust.
611 * src/Makefile.am (YACC): New, to make sure we use our own parser.
612 * data/yacc.c (yyparse): Use b4_initial_action.
613
614 2003-08-25 Akim Demaille <akim@epita.fr>
615
616 * doc/bison.texinfo: Don't promote stdout for error messages.
617
618 2003-08-25 Akim Demaille <akim@epita.fr>
619
620 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
621 From Alexandre Duret-Lutz.
622
623 2003-08-25 Akim Demaille <akim@epita.fr>
624
625 Version 1.875c.
626
627 2003-08-25 Akim Demaille <akim@epita.fr>
628
629 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
630 Use them.
631
632 2003-08-25 Akim Demaille <akim@epita.fr>
633
634 * data/lalr1.cc (Parser::reduce_print_): New.
635 Use it.
636
637 2003-08-25 Akim Demaille <akim@epita.fr>
638
639 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
640 error recovery loops. This patch is based on
641 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
642 Also, augment the similarity between lalr1.cc and yacc.c.
643 Note: the locations of error recovery rules are not correct yet.
644
645 * data/lalr1.cc: Comment changes to augment the similarity between
646 lalr1.cc and yacc.c.
647 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
648 (yyerrlab1): Remove, but where it used to be (now the bottom part of
649 yyerrlab), when hitting EOF, pop the whole stack here instead of
650 merely falling thru the default error handling mechanism.
651 (yyerrorlab): New label, with the old contents of YYERROR,
652 plus the following change: pop the stack of rhs corresponding
653 to the production that invoked YYERROR. That is how Yacc
654 behaves (required by POSIX).
655 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
656 fail.
657
658 2003-08-25 Akim Demaille <akim@epita.fr>
659
660 Tune local.at so that people can "autom4te -l autotest calc.at -o
661 calc" for instance, to extract a sub test suite.
662
663 * tests/testsuite.at: Move the initialization, Autotest version
664 requirement, and AT_TESTED invocation into...
665 * tests/local.at: here.
666 * tests/testsuite.at: Include it for compatibility with Autoconf
667 2.57.
668 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
669 be ignore.
670
671 2003-08-04 Paul Eggert <eggert@twinsun.com>
672
673 Rework code slightly to avoid gcc -Wtraditional warnings.
674 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
675 The returned value is now stored in *YY0. All callers changed.
676 * src/output.c (merge_output): Adjust to the above change.
677
678 2003-07-26 Paul Eggert <eggert@twinsun.com>
679
680 * data/glr.c (YYASSERT): New macro.
681 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
682 yyresolveStates, yyprocessOneStack):
683 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
684 Derived from a suggestion by Frank Heckenbach.
685
686 2003-07-25 Paul Eggert <eggert@twinsun.com>
687
688 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
689 for portability to K&R C (after ansi2knr, presumably). See
690 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
691 by Frank Heckenbach, though I have omitted the structure-initialization
692 part of his glr-knr.diff patch since I recall that the Portable
693 C Compiler didn't require that change.
694
695 Let the user specify how to allocate and free memory.
696 Derived from a suggestion by Frank Heckenbach in
697 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
698 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
699 All uses of free, malloc, realloc changed to use these macros,
700 and unnecessary casts removed.
701 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
702
703 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
704
705 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
706 use s.empty() rather than s == "" to test for empty string; see
707 <http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
708 (trivial change)
709
710 2003-06-25 Akim Demaille <akim@epita.fr>
711
712 * config/depcomp, config/install-sh: Update from masters.
713
714 2003-06-20 Paul Eggert <eggert@twinsun.com>
715
716 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
717 and return properly parenthesized result.
718 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
719 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
720 Remove unnecessary parentheses from uses.
721 * doc/bison.texinfo (Location Default Action): Describe the
722 conventions for parentheses.
723
724 2003-06-19 Paul Eggert <eggert@twinsun.com>
725
726 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
727 yyreportTree): Do not assume that size_t is the same width as int,
728 when printing sizes. Print sizes using an unsigned format.
729 Problem reported by Frank Heckenbach in
730 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
731
732 Port to Forte Developer 7 C compiler.
733 * data/glr.c (struct YYLTYPE): If locations are not being used,
734 declare a single dummy member, as empty structs do not conform
735 to the C standard.
736 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
737 the Forte Developer 7 C compiler complains that end-of-loop
738 code is not reached.
739
740 2003-06-17 Paul Eggert <eggert@twinsun.com>
741
742 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
743 avoid warnings from picky compilers about redefinition of PARAMS.
744
745 2003-06-17 Paul Eggert <eggert@twinsun.com>
746
747 Version 1.875b.
748
749 * NEWS: Document 1.875b.
750
751 * lib/bbitset.h: Do not include config.h; that's the includer's job.
752 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
753 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
754 Don't use 'index' in comments, as it's a builtin fn on some hosts.
755 * lib/bitset_stats.c: Include gettext.h unconditionally, as
756 per recent gettext manual's suggestion.
757 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
758 Use prototypes, not old-style definitions.
759 * lib/lbitset.c (lbitset_unused_clear): Likewise.
760 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
761 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
762 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
763 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
764 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
765 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
766 vbitset_or_and_cmp, vbitset_copy): Likewise.
767
768 * lib/libiberty.h: Do not include config.h; that's the includer's job.
769 Do not include <stdlib.h>.
770 (PARAMS): Define unconditionally for C89.
771 (ATTRIBUTE_NORETURN): Remove.
772 (ATTRIBUTE_UNUSED): Define unconditionally.
773
774 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
775 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
776 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
777 * lib/vbitset.c, lib/vbitset.h: New files.
778 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
779 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
780 from libbitset.
781
782 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
783 `How Can I Reset @code{yyparse}', since texinfo does not allow
784 arbitrary @ in node names.
785
786 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
787 shouldn't be needed according to the gettext 0.12.1 documentation
788 but which seem to be needed anyway: codeset.m4 glibc21.m4
789 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
790 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
791 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
792
793 * lib/.cvsignore: Add stdbool.h.
794 * m4/.cvsignore: Add nls.m4, po.m4.
795
796 Upgrade to CVS gnulib.
797 * stdbool_.h: File renamed from stdbool.h.in.
798 * configure.ac (AM_STDBOOL_H): Invoke this instead of
799 AC_HEADER_STDBOOL.
800 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
801 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
802 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
803 (MOSTLYCLEANFILES): New var.
804 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
805 (stdbool.h): New rule.
806 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
807 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
808 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
809 m4/quote.m4: Upgrade to today's gnulib.
810
811 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
812 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
813 the tests right now.
814 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
815 yyerror are declared before use; C99 requires this.
816
817 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
818
819 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
820 first.
821 (yyrecoverSyntaxError): Correct the logic for setting and testing
822 yyerrState.
823 Correct comment on handling EOF.
824 Allow states with only a default reduction, rather than failing
825 (I can't quite reconstruct why these were not allowed before).
826
827 Fixes to avoid problem that $-N rules in GLR parsers can cause
828 buffer overruns, corrupting state.
829
830 * src/output.c (prepare_rules): Output max_left_semantic_context
831 definition.
832 * src/reader.h (max_left_semantic_context): New variable declaration.
833 * src/scan-gram.l (max_left_semantic_context): Define.
834 (handle_action_dollar): Update max_left_semantic_context.
835 * data/glr.c (YYMAXLEFT): New definition.
836 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
837 (yyresolveAction): Ditto.
838
839 Fixes to problems with location handling in GLR parsers reported by
840 Frank Heckenbach (2003/06/05).
841
842 * data/glr.c (YYLTYPE): Make trivial if locations not used.
843 (YYRHSLOC): Add parentheses, and define only if locations used.
844 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
845 locations not used.
846 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
847 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
848
849 * tests/cxx-type.at: Exercise location information; update tests
850 to differentiate output with and without locations.
851 Remove forward declarations of yylex and yyerror---caused errors
852 because default YYLTYPE not yet defined.
853 Change semantic actions to compute strings, rather than printing
854 them directly (to test proper passing of semantics values). Change
855 output to prefix notation and update test data and expected results.
856 (yylex): Track locations.
857 (stmtMerge): Return value rather than printing, and include arguments
858 in value.
859
860 2003-06-03 Paul Eggert <eggert@twinsun.com>
861
862 Avoid warnings generated by GCC 2.95.4 when Bison is
863 configured with --enable-gcc-warnings.
864 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
865 yy::]b4_parser_class_name[::translate_,
866 yy::Stack::operator[] (unsigned),
867 yy::Stack::operator[] (unsigned) const,
868 yy::Slice::operator[] (unsigned),
869 yy::Slice::operator[] (unsigned) const):
870 Rename local vars to avoid warnings.
871 * tests/glr-regression.at (Improper handling of embedded actions
872 and $-N in GLR parsers): Remove unused local variable from yylex.
873 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
874 (void) as arg when not pure, since we now assume C89 when building
875 Bison. Pacify GCC by using parameter.
876
877 2003-06-02 Paul Eggert <eggert@twinsun.com>
878
879 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
880 yy::Location::lines, yy::Location::columns): Rename arguments
881 to avoid shadowing; this removes a warning generated by GCC 3.3.
882
883 2003-06-01 Paul Eggert <eggert@twinsun.com>
884
885 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
886 to g++, as GCC 3.3 complains if you do it.
887 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
888 everything that WARNING_CFLAGS has, except omit warnings
889 not suitable for C++.
890 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
891 * tests/atlocal.in (CXXFLAGS): New var.
892 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
893
894 Fix a GLR parser bug I reported in February; see
895 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
896 The problem was that GLR parsers did not conform to the C standard,
897 because actions like { $1 = $2 + $3; } expanded to expressions
898 that invoked YYFILL in separate subexpressions, and YYFILL assigned
899 to a local variable. The C standard says that expressions
900 like (var = f ()) + (var = f ()) have undefined behavior.
901 Another problem was that GCC sometimes issues warnings that
902 yyfill and its parameters are unused.
903
904 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
905 as possibly unused.
906 (yyfill): New function.
907 (YYFILL): Use it.
908 (yyuserAction): Change type of yynormal to bool, so that it matches
909 the new yyfill signature. Mark it as possibly unused.
910
911
912 Follow up on a bug I reported in February, where a Bison-generated
913 parser can loop. Provide a test case and a fix for yacc.c. I
914 don't have a fix for lalr1.cc or for glr.c, unfortunately.
915 The original bug report is in:
916 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
917
918 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
919 macro's size was becoming unwieldy.
920 (yyerrlab): Do not discard an empty lookahead symbol, as this
921 might destroy garbage.
922 (yyerrorlab): New label, with the old contents of YYERROR,
923 plus the following change: pop the stack of rhs corresponding
924 to the production that invoked YYERROR. That is how Yacc
925 behaves, and POSIX requires this behavior.
926 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
927 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
928 Define 'alarm' to do nothing if unistd.h is not available.
929 Add a new rule "exp: '-' error;" to test the above change to
930 data/yacc.c. Use 'alarm' to abort any test taking longer than
931 10 seconds, as it's probably looping.
932 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
933 Also, the new yacc.c generates two fewer diagnostics for an
934 existing test.
935
936 2003-05-24 Paul Eggert <eggert@twinsun.com>
937
938 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
939 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
940 This fixes a problem reported by John Bowman when the Compaq/HP
941 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
942 -ansi -Wall -gall).
943 * data/yacc.c (union yyalloc): Likewise.
944 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
945
946 Switch from 'int' to 'bool' where that makes sense.
947
948 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
949 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
950 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
951 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
952 Return or accept bool, not int. All callers changed.
953 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
954 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
955 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
956 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
957 bitset_or_and_cmp_): Likewise.
958 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
959 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
960 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
961 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
962 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
963 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
964 bitset_stats_or_and_cmp): Likewise.
965 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
966 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
967 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
968 ebitset_xor_cmp): Likewise.
969 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
970 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
971 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
972 lbitset_xor_cmp): Likewise.
973 * lib/bbitset.h: Include <stdbool.h>.
974 (struct bitset_vtable): The following members now return bool, not
975 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
976 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
977 or_and_cmp).
978 * src/conflicts.c (count_rr_conflicts): Likewise.
979 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
980 All uses changed.
981 * lib/ebitset.c (ebitset_obstack_init): Likewise.
982 * lib/lbitset.c (lbitset_obstack_init): Likewise.
983 * src/getargs.c (debug_flag, defines_flag, locations_flag,
984 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
985 graph_flag): Likewise.
986 * src/getargs.h (debug_flag, defines_flag, locations_flag,
987 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
988 graph_flag): Likewise.
989 * src/output.c (error_verbose): Likewise.
990 * src/output.h (error_verbose): Likewise.
991 * src/reader.c (start_flag, typed): Likewise.
992 * src/reader.h (typed): Likewise.
993 * src/getargs.c (LOCATIONS_OPTION): New constant.
994 (long_options, getargs): Use it.
995 * src/lalr.c (build_relations): Use bool, not int.
996 * src/nullable.c (nullable_compute): Likewise.
997 * src/print.c (print_reductions): Likewise.
998 * src/tables.c (action_row, pack_vector): Likewise.
999 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
1000 * src/output.c (prepare): Use it.
1001 * src/output.c (token_definitions_output,
1002 symbol_destructors_output, symbol_destructors_output): Use string,
1003 not boolean integer, to keep track of whether to output separator.
1004 * src/print_graph.c (print_core): Likewise.
1005 * src/state.c (state_rule_lookaheads_print): Likewise.
1006
1007 * config/install-sh: Sync from automake 1.7.5.
1008
1009 2003-05-14 Paul Eggert <eggert@twinsun.com>
1010
1011 * src/parse-gram.y (rules_or_grammar_declaration): Require a
1012 semicolon after a grammar declaration, in the interest of possible
1013 future changes to the Bison input language.
1014 Do not allow a stray semicolon at the start of the grammar.
1015 (rhses.1): Allow one or more semicolons after any rule, including
1016 just before "|" as required by POSIX.
1017 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
1018 grammar.
1019
1020 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
1021
1022 %parse-param support for lalr1.cc.
1023
1024 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
1025 b4_cc_constructor_calls, b4_cc_constructor_call,
1026 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
1027 definitions.
1028 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
1029 parse-param arguments.
1030 (yy::b4_parser_class_name): Declare instance variables to
1031 hold parse-param arguments.
1032 * tests/calc.at: s/value/semantic_value/ because value clashes
1033 with a member of yy::b4_parser_class_name. Adjust C++ code
1034 to handle %parse-param. Enable %parse-param test in C++.
1035
1036 2003-05-12 Paul Eggert <eggert@twinsun.com>
1037
1038 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
1039 English a bit. Fix fclose typo. Change "const char" to "char
1040 const", and use ANSI C rather than K&R for "main". Suggest
1041 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
1042 and suggest yy_switch_to_buffer.
1043
1044 2003-05-05 Paul Eggert <eggert@twinsun.com>
1045
1046 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
1047 C89. This avoids a diagnostic on compilers that define __STDC__
1048 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
1049 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
1050
1051 2003-05-03 Paul Eggert <eggert@twinsun.com>
1052
1053 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
1054 Do not overrun array bounds.
1055 This should fix a bug reported today by Olatunji Oluwabukunmi in
1056 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
1057
1058 2003-04-29 Akim Demaille <akim@epita.fr>
1059
1060 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
1061 * src/getargs.c, src/getargs.h: here, as bool, not int.
1062 (nondeterministic_parser): New.
1063 * src/parse-gram.y, src/scan-gram.l: Support
1064 %nondeterministic-parser.
1065 * src/output.c (prepare): Use nondeterministic_parser instead
1066 of glr_parser where appropriate.
1067 * src/tables.c (conflict_row, action_row, save_row)
1068 (token_actions, token_actions, pack_vector): Ditto.
1069
1070 2003-04-29 Akim Demaille <akim@epita.fr>
1071
1072 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
1073
1074 2003-04-29 Akim Demaille <akim@epita.fr>
1075
1076 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
1077 with %pure-parser and %locations to exercise the patch from Yakov
1078 Markovitch below.
1079
1080 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
1081
1082 * data/yacc.c: (b4_lex_param): Corrected for the case where
1083 %lex-param is provided and %pure-parser isn't.
1084
1085 2003-04-27 Paul Eggert <eggert@twinsun.com>
1086
1087 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
1088 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
1089 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
1090 if it is not defined.
1091 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
1092
1093 2003-04-26 Paul Eggert <eggert@twinsun.com>
1094
1095 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
1096 Declare to be of type suitable for the ninf value itself, not of
1097 type suitable for the corresponding table, since the latter might
1098 be unsigned but the ninf value might be negative. This fixes a
1099 bug reported by Alexandre Duret-Lutz in
1100 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
1101
1102 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
1103 invokes it. We shouldn't invoke it twice because it will attempt
1104 to put error.o in the archive twice. This fixes a glitch reported
1105 by Martin Mokrejs in
1106 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
1107
1108 2003-04-21 Paul Eggert <eggert@twinsun.com>
1109
1110 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
1111 to gnulib.
1112
1113 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
1114
1115 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
1116 Fix obvious typo that results in uncompilable GLR parsers
1117 when both %pure-parser and %locations are used. (trivial change)
1118
1119 2003-04-17 Paul Eggert <eggert@twinsun.com>
1120
1121 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
1122 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
1123 Do not insert the expected token via unput, as this runs afoul
1124 of a POSIX-compatibility bug in flex 2.5.31.
1125 All uses changed to BEGIN the parent state,
1126 since we no longer insert the expected token via unput.
1127 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
1128 that is no longer emitted after the above change.
1129
1130 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
1131 the first one. This change is from Paul Hilfinger, and it fixes
1132 regression reported by Werner Lemberg in
1133 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1134
1135 (resolve_sr_conflict): Don't invoke state_errs_set
1136 unless one or more tokens have been explicitly made errors.
1137 Otherwise, the above change causes Bison to abort.
1138
1139 * tests/existing.at (GNU pic Grammar): New test case, taken from
1140 Lemberg's email.
1141
1142 2003-03-31 Akim Demaille <akim@epita.fr>
1143
1144 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
1145
1146 2003-03-31 Akim Demaille <akim@epita.fr>
1147
1148 * src/output.c (prepare_symbols): Avoid trailing spaces in the
1149 output.
1150
1151 2003-03-31 Akim Demaille <akim@epita.fr>
1152
1153 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
1154 From Paul Hilfinger.
1155
1156 2003-03-29 Akim Demaille <akim@epita.fr>
1157
1158 * m4/error.m4: Do not put under dynamic conditions some code which
1159 expansion is under static control.
1160
1161 2003-03-29 Akim Demaille <akim@epita.fr>
1162
1163 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
1164
1165 2003-03-29 Akim Demaille <akim@epita.fr>
1166
1167 * doc/bison.texinfo (Strings are Destroyed): New.
1168
1169 2003-03-13 Paul Eggert <eggert@twinsun.com>
1170
1171 * .cvsignore: Add configure.lineno.
1172 * src/.cvsignore: Add yacc.
1173 * tests/.cvsignore: Add testsuite.log.
1174 * doc/fdl.texi: Sync with latest FSF version.
1175
1176 2003-03-12 Paul Eggert <eggert@twinsun.com>
1177
1178 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
1179 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
1180 cursor, instead of leaving it undefined. This fixes a bug
1181 reported by Tim Van Holder in
1182 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
1183 * tests/input.at (Torturing the Scanner): Test the scanner on
1184 an empty input file, which was Tim Van Holder's test case.
1185
1186 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
1187 <sys/resource.h> can be included, include sys/time.h and
1188 sys/times.h first, if available. This works around the SunOS
1189 4.1.4 porting bug reported by Bruce Becker in
1190 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
1191
1192 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
1193 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
1194 AC_HEADER_SYS_WAIT.
1195
1196 Merge changes from gnulib. This was prompted because the CVS
1197 snapshot didn't build on Solaris 7 due to strnlen problems.
1198
1199 These changes need to be merged back into gnulib:
1200 * lib/hash.c: Include <stdbool.h> unconditionally.
1201 * m4/onceonly.m4 (m4_quote): New macro.
1202 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
1203 Quote AC_FOREACH variable-expansions properly.
1204 The 2003-01-03 obstack.h change also needs merging.
1205 {end of changes requiring merging}
1206
1207 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
1208 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
1209 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
1210 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
1211 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
1212 New files, imported from gnulib.
1213 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
1214 above.
1215
1216 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
1217 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
1218 gnulib sources.
1219
1220 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
1221 Add.
1222 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
1223 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
1224 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
1225 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
1226 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
1227 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
1228 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
1229 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
1230 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
1231 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
1232 (jm_PREREQ_ARGMATCH): Remove.
1233 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
1234 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
1235
1236 * src/system.h: Include <stdbool.h> unconditionally.
1237
1238 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
1239 assuming at least C89 in the bitset code for some time now.
1240
1241 2003-03-03 Akim Demaille <akim@epita.fr>
1242
1243 * ro.po: New.
1244
1245 2003-03-02 Akim Demaille <akim@epita.fr>
1246
1247 * doc/bison.texinfo (Table of Symbols): Reactivate the
1248 documentation for %lex-param, and %parse-param.
1249
1250 2003-03-02 Akim Demaille <akim@epita.fr>
1251
1252 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
1253 generate verbose error messages.
1254 Use the number of tokens as an upper bound in yytname, as it
1255 cannot be a non terminal.
1256
1257 2003-03-02 Akim Demaille <akim@epita.fr>
1258
1259 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
1260 message.
1261
1262 2003-03-02 Akim Demaille <akim@epita.fr>
1263
1264 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
1265 Use them to exercise yycheck overrun.
1266 Based on Andrew Suffield's grammar.
1267
1268 2003-03-02 Akim Demaille <akim@epita.fr>
1269
1270 Create tests/local.at for Bison generic testing macros.
1271
1272 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
1273 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
1274 This new file.
1275 * tests/calc.at (AT_CHECK_CALC): Adjust.
1276 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
1277 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
1278 * tests/local.at: here.
1279 (AT_COMPILE_CXX): Tags the tests using it as c++.
1280 Ignore the test if CXX is not functional.
1281
1282 2003-03-01 Paul Eggert <eggert@twinsun.com>
1283
1284 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
1285 not loc->end, since loc->end might contain garbage and this leads
1286 to undefined behavior on some platforms.
1287 (id_loc, token_start): Use (IF_LINTed) initial values that do not
1288 depend on *loc, so that the reader doesn't give the the false
1289 impression that *loc is initialized.
1290 (<INITIAL>"%%"): Do not bother setting code_start, since its value
1291 does not survive the return.
1292
1293 2003-03-01 Akim Demaille <akim@epita.fr>
1294
1295 * src/scan-gram.l (code_start): Always initialize it when entering
1296 into yylex, as SC_EPILOGUE is activated *before* the corresponding
1297 yylex invocation. An alternative would be making it static, but
1298 then it starts with the second %%'s beginning, instead of its end.
1299
1300 2003-02-28 Paul Eggert <eggert@twinsun.com>
1301
1302 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
1303 around a UnixWare 7.1.1 porting bug reported by John Hughes in
1304 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
1305
1306 2003-02-26 Paul Eggert <eggert@twinsun.com>
1307
1308 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
1309 Remove Sequent/Pyramid discussion (nobody uses them any more).
1310 Merge VMS and MS-DOS discussion; these ports may well be dead
1311 but let's keep mentioning them for now. Put <> around email
1312 addresses. Add copyright notice.
1313
1314 2003-02-24 Paul Eggert <eggert@twinsun.com>
1315
1316 * data/glr.c (yy_reduce_print): yylineno -> yylno,
1317 to avoid collision with flex use of yylineno.
1318 Problem reported by Bruce Lilly in
1319 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
1320 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1321 * data/yacc.c (yy_reduce_print): Likewise.
1322
1323 * config/depcomp: Sync with Automake 1.7.3.
1324
1325 2003-02-21 Akim Demaille <akim@epita.fr>
1326
1327 * data/lalr1.cc: Use temporary variables instead of casts to
1328 change integer types.
1329 Suggested by Paul Eggert.
1330
1331 2003-02-21 Akim Demaille <akim@epita.fr>
1332
1333 * doc/bison.texinfo: Use "location" consistently to refer to @n,
1334 to avoid confusions with lalr1.cc's notion of Position.
1335 Suggested by Paul Eggert.
1336
1337 2003-02-20 Akim Demaille <akim@epita.fr>
1338
1339 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
1340 before initial_columns.
1341 (location.hh): Use consistent variable names when defining the
1342 operator<<.
1343 Use "last" so that we subtract from Positions, not from unsigned.
1344
1345 2003-02-20 Akim Demaille <akim@epita.fr>
1346
1347 * data/lalr1.cc (position.hh): New subfile, including the extended
1348 and Doxygen'ed documentation of class Position.
1349 (location.hh): Use it.
1350 Document a` la Doxygen.
1351 With the help of Benoit Perrot.
1352
1353 2003-02-20 Akim Demaille <akim@epita.fr>
1354
1355 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
1356 AT_YACC_IF.
1357 Redefine AT_YYERROR_SEES_LOC_IF using it.
1358 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
1359 not defined.
1360 Don't use the location in yy::Parser::error_ and
1361 yy::Parser::print_ when not %locations.
1362 Activate more lalr1.cc tests.
1363
1364 2003-02-19 Akim Demaille <akim@epita.fr>
1365
1366 * data/lalr1.cc: When displaying a line number, be sure to make it
1367 an int.
1368
1369 2003-02-19 Akim Demaille <akim@epita.fr>
1370
1371 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
1372 Remove, useless.
1373 (YYABORT, YYACCEPT, YYERROR): New.
1374 * tests/calc.at: Renable the lalr1.cc test.
1375
1376 2003-02-19 Akim Demaille <akim@epita.fr>
1377
1378 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
1379 error recovery, mixing with/without pops and discarding of the
1380 lookahead.
1381 Exercise YYERROR.
1382 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
1383
1384 2003-02-17 Paul Eggert <eggert@twinsun.com>
1385
1386 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
1387 * tests/testsuite.at (AT_COMPILE): Use them.
1388 This fixes the testsuite problem reported by Robert Lentz in
1389 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
1390
1391 2003-02-12 Paul Eggert <eggert@twinsun.com>
1392
1393 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
1394 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
1395 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
1396 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
1397 Check for malloc failure, for consistency with yacc.c.
1398 (yytname_size): Remove, for consistency with yacc.c.
1399
1400 The bug still remains in data/lalr1.cc, as I didn't have time
1401 to fix it there.
1402
1403 2003-02-06 Akim Demaille <akim@epita.fr>
1404
1405 * configure.ac (GXX): Rename as...
1406 (CXX): this, to keep the original Autoconf semantics.
1407 Require 2.57.
1408 * data/lalr1.cc: Fix b4_copyright invocations.
1409 If YYDEBUG is not defined, don't depend upon name_ being defined.
1410 (location.hh): Include string and iostream.
1411 (Position::filename): New member.
1412 (Position::Position ()): New.
1413 (operator<< (Position)): New.
1414 (operator- (Position, int)): New.
1415 (Location::first, Location::last): Rename as...
1416 (Location::begin, Location::end): these, to mock the conventional
1417 iterator names.
1418 (operator<< (Location)): New.
1419 * tests/atlocal.in (CXX): New.
1420 * tests/testsuite.at (AT_COMPILE_CXX): New.
1421 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
1422 locations in a more synthetic way.
1423 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
1424 lalr1.cc is used.
1425 Adjust the C locations to match those from Emacs: first column is
1426 column 0.
1427 Change all the expected results.
1428 Conform to the GCS: simplify the locations when applicable.
1429 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
1430 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
1431 these CPP macros with the m4 macros new defined by...
1432 (AT_CHECK_PUSHDEFS): this, i.e.:
1433 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
1434 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
1435 New macros.
1436 (AT_CHECK_POPDEFS): Undefine them.
1437 (AT_CHECK_CALC_LALR1_CC): New.
1438 Use it for the first lalr1.cc test.
1439
1440 2003-02-04 Akim Demaille <akim@epita.fr>
1441
1442 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
1443 Location as is defined.
1444
1445 2003-02-04 Akim Demaille <akim@epita.fr>
1446
1447 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
1448 name_ being defined.
1449
1450 2003-02-03 Paul Eggert <eggert@twinsun.com>
1451
1452 * src/gram.h (start_symbol): Remove unused decl.
1453
1454 Use more-consistent naming conventions for local vars.
1455
1456 * src/derives.c (derives_compute): Change type of local var from
1457 int to rule_number.
1458 * src/gram.c (grammar_rules_partial_print): Likewise.
1459 * src/print.c (print_core): Likewise.
1460 * src/reduce.c (reduce_grammar_tables): Likewise.
1461
1462 * src/gram.c (grammar_dump): Change name of item_number *
1463 local var from r to rp.
1464 * src/nullable.c (nullable_compute): Likewise.
1465
1466 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
1467
1468 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
1469 for symbol or symbol_number var.
1470 * src/reader.c (grammar_start_symbol_set): Likewise.
1471 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
1472 Likewise.
1473 * src/state.c (transitions_to): Likewise.
1474 * src/state.h: Likewise.
1475 * src/tables.c (symbol_number_to_vector_number): Likewise.
1476
1477 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
1478 char * var.
1479
1480 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
1481 var.
1482
1483 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
1484 var.
1485
1486 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
1487 Use str, not s, for char * var. Use ch, not c, for character var.
1488 Use size for size var.
1489
1490 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
1491 char * var.
1492 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
1493 uniqstr var.
1494 * src/uniqstr.h: Likewise.
1495
1496 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1497 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1498 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
1499 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
1500 param to have same name as that of enum, so that we don't use
1501 "s" to stand for a non-state.
1502
1503 2003-02-02 Akim Demaille <akim@epita.fr>
1504
1505 * src/scan-skel.l: Scan more than one inert character per yylex
1506 invocation.
1507
1508 2003-02-01 Paul Eggert <eggert@twinsun.com>
1509
1510 Version 1.875a.
1511
1512 * po/LINGUAS: Add ms.
1513
1514 2003-01-30 Akim Demaille <akim@epita.fr>
1515
1516 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
1517
1518 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1519
1520 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
1521 of $1.
1522
1523 Changes in response to error report by S. Eken: GLR mode does not
1524 handle negative $ indices or $ indices in embedded rules correctly.
1525 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
1526
1527 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
1528 (b4_rhs_location): Ditto.
1529 (yyfill): New function to copy from stack tree into array
1530 incrementally.
1531 (yyuserAction): Modify to allow incremental move of semantic values
1532 to rhs array when in GLR mode.
1533 Define YYFILL to use in user-defined actions to fill semantic array
1534 as needed.
1535 Remove dummy use of yystack, as there is now a guaranteed use.
1536 (yydoAction): Modify to allow incremental move of semantic values
1537 to rhs array when in GLR mode.
1538 (yyresolveAction): Ditto.
1539 (yyglrShiftDefer): Update comment.
1540 (yyresolveStates): Use X == NULL for pointers, not !X.
1541 (yyglrReduce): Ditto.
1542 (yydoAction): Ditto
1543
1544 * tests/glr-regr1.at: Rename to ...
1545 * tests/glr-regression.at: Add new regression test for the problems
1546 described above (adapted from S. Eken).
1547 Update copyright notice.
1548 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
1549 * tests/Makefile.am: Ditto.
1550
1551 2003-01-28 Paul Eggert <eggert@twinsun.com>
1552
1553 * data/lalr1.cc: Do not use @output_header_name@ unless
1554 b4_defines_flag is set. This fixes two bugs reported by
1555 Tim Van Holder in
1556 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
1557 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
1558
1559 2003-01-21 Paul Eggert <eggert@twinsun.com>
1560
1561 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
1562 we don't need to worry about yyerrlab1 being reported as an
1563 "unused label" by non-GCC C compilers. The downside is that if
1564 locations are used then a couple of statements are duplicated each
1565 time YYERROR is invoked, but the upside is that the warnings
1566 should vanish.
1567 (yyerrlab1): Move code to YERROR.
1568 (yyerrlab2): Remove. Change uses back to yyerrlab1.
1569 This reverts some of the 2002-12-27 change.
1570
1571 2003-01-17 Paul Eggert <eggert@twinsun.com>
1572
1573 * src/output.c (symbol_printers_output): Fix typo that led
1574 to core dump. Problem reported by Antonio Rus in
1575 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
1576
1577 2003-01-13 Akim Demaille <akim@epita.fr>,
1578 Quoc Peyrot <chojin@lrde.epita.fr>,
1579 Robert Anisko <anisko_r@lrde.epita.fr>
1580
1581 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
1582 when the stacks contain one element, as the loop would otherwise
1583 free the last state, and then use the top state (the one we just
1584 popped). This means that the initial elements will not be freed
1585 explicitly, as is the case in yacc.c; it is not a problem, as
1586 these elements have fake values.
1587
1588 2003-01-11 Paul Eggert <eggert@twinsun.com>
1589
1590 * NEWS: %expect-violations are now just warnings, reverting
1591 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
1592 bootstrapping problem reported by Matthias Klose; see
1593 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
1594 * src/conflicts.c (conflicts_print): Likewise.
1595 * tests/conflicts.at (%expect not enough, %expect too much,
1596 %expect with reduce conflicts): Likewise.
1597 * doc/bison.texinfo (Expect Decl): Document this. Also mention
1598 that the warning is enabled if the number of conflicts changes
1599 (not necessarily increases).
1600
1601 * src/getargs.c (version): Update copyright year.
1602
1603 2003-01-09 Akim Demaille <akim@epita.fr>
1604
1605 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
1606
1607 2003-01-08 Paul Eggert <eggert@twinsun.com>
1608
1609 * Makefile.maint (WGETFLAGS):
1610 New macro, containing "-C off" to disable proxy caches.
1611 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
1612 (rel-check): Use $(WGET) instead of wget.
1613
1614 2003-01-06 Paul Eggert <eggert@twinsun.com>
1615
1616 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
1617 the GLR paper of Scott, Johnstone and Hussain.
1618
1619 2003-01-04 Paul Eggert <eggert@twinsun.com>
1620
1621 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
1622 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
1623 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
1624 (EXTRA_LIBRARIES): New var, for liby.a.
1625 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
1626 (EXTRA_SCRIPTS): New var, for yacc.
1627
1628 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
1629 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
1630 Problem reported by Nelson H. F. Beebe.
1631
1632 2003-01-03 Paul Eggert <eggert@twinsun.com>
1633
1634 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
1635 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1636 when compiling Bison 1.875's `bitset bset = obstack_alloc
1637 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
1638
1639 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
1640 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
1641 grow to a huge size with typical invocation.
1642
1643 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
1644 Use the pattern recommended by Autoconf 2.57, except also protect
1645 against double-definition.
1646 * src/system.h: Likewise.
1647 Portability issues reported by Nelson H. F. Beebe.
1648
1649 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
1650 All uses changed. Provide a definition in both C and C++.
1651 (yytrue, yyfalse): Define even if defined (__cplusplus).
1652
1653 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
1654 Reported by Nelson H. F. Beebe.
1655
1656 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
1657
1658 2003-01-02 Paul Eggert <eggert@twinsun.com>
1659
1660 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
1661 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
1662 Bug reported by Nelson H. F. Beebe.
1663
1664 2003-01-01 Paul Eggert <eggert@twinsun.com>
1665
1666 * Version 1.875.
1667
1668 2002-12-30 Paul Eggert <eggert@twinsun.com>
1669
1670 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
1671 Moved here from...
1672 (<INITIAL>","): Here. This causes stray "," to be treated
1673 more uniformly.
1674
1675 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
1676 last brace in braced code when not in Yacc mode, for compatibility
1677 with Bison 1.35. This resurrects the 2001-12-15 patch to
1678 src/reader.c.
1679
1680 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
1681 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
1682
1683 2002-12-28 Paul Eggert <eggert@twinsun.com>
1684
1685 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
1686 that of SYM's type. This fixes Debian bug 168069, reported by
1687 Thomas Olsson.
1688
1689 2002-12-28 Paul Eggert <eggert@twinsun.com>
1690
1691 Version 1.75f.
1692
1693 Switch back to the Yacc style of conflict reports, undoing some
1694 of the 2002-07-30 change.
1695 * doc/bison.texinfo (Understanding): Use Yacc style for
1696 conflict reports. Also, use new way of locating rules.
1697 * src/conflicts.c (conflict_report):
1698 Renamed from conflict_report_yacc, removing the old
1699 'conflict_report'. Translate the entire conflict report at once,
1700 so that we don't assume that "," has the same interpretation in
1701 all languages.
1702 (conflicts_output): Use Yacc-style conflict report for each state,
1703 instead of our more-complicated style.
1704 (conflicts_print): Use Yacc-style conflict report, except print
1705 the input file name when not emulating Yacc.
1706 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
1707 Conflicted Reduction, %expect not enough, %expect too much,
1708 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
1709 * tests/existing.at (GNU Cim Grammar): Likewise.
1710 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
1711
1712 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
1713 fatal): Don't invoke fflush; it's not needed and it might even be
1714 harmful for stdout, as stdout might not be open.
1715 * src/reduce.c (reduce_print): Likewise.
1716
1717 2002-12-27 Paul Eggert <eggert@twinsun.com>
1718
1719 Fix a bug where error locations were not being recorded correctly.
1720 This problem was originally reported by Paul Hilfinger in
1721 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
1722
1723 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1724 top of the location stack's error locations.
1725 (yyerrlab): Set it. When discarding a token, push its location
1726 onto yylerrsp so that we don't lose track of the error's end.
1727 (yyerrlab1): Now is only the target of YYERROR, so that we can
1728 properly record the location of the action that failed. For GCC
1729 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1730 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1731 (yyerrlab2): New label, which yyerrlab now falls through to.
1732 Compute the error's location by applying YYLLOC_DEFAULT to
1733 the locations of all the symbols that went into the error.
1734 * doc/bison.texinfo (Location Default Action): Mention that
1735 YYLLOC_DEFAULT is also invoked for syntax errors.
1736 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1737 Error locations include the locations of all the tokens that were
1738 discarded, not just the last token.
1739
1740 2002-12-26 Paul Eggert <eggert@twinsun.com>
1741
1742 * src/files.c: Include quote.h.
1743 (compute_output_file_names): Warn if we detect conflicting
1744 outputs to the same file. This should catch the misunderstanding
1745 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1746
1747 * src/conflicts.c (conflicts_print): If the user specifies
1748 "%expect N", report an error if there are any reduce/reduce
1749 conflicts. This is what the manual says should happen.
1750 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1751 * tests/conflicts.at (%expect with reduce conflicts): New test.
1752
1753 Don't use m4_include on relative file names, as it doesn't work as
1754 desired if there happens to be a file with that name under ".".
1755
1756 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1757 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1758 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1759 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1760 * src/output.c (output_skeleton): Use full path names when
1761 specifying a file to include; don't rely on include path, as
1762 it's unreliable when the working file contains a file with
1763 that name.
1764
1765 2002-12-25 Paul Eggert <eggert@twinsun.com>
1766
1767 Remove obsolete references to bison.simple and bison.hairy.
1768 Problem mentioned by Aubin Mahe in
1769 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
1770 * data/glr.c: Comment fix.
1771 * doc/bison.1: Remove references. Also, mention "yacc".
1772
1773 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1774 with -g option.
1775
1776 * src/parse-gram.y (declaration): Use enum "report_states" rather
1777 than its numeric value 1.
1778
1779 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1780 opening a new one. This fixes Debian bug 165349, reported by
1781 Bruce Stephens.
1782
1783 2002-12-24 Paul Eggert <eggert@twinsun.com>
1784
1785 Version 1.75e.
1786
1787 * Makefile.maint (cvs-update): Don't assume that the shell
1788 supports $(...), as Solaris sh doesn't.
1789
1790 * src/parse-gram.y (lloc_default): Remove test for empty
1791 nonterminals at the end, since it didn't change the result.
1792
1793 2002-12-24 Paul Eggert <eggert@twinsun.com>
1794
1795 If the user does not define YYSTYPE as a macro, Bison now declares it
1796 using typedef instead of defining it as a macro. POSIX requires this.
1797 For consistency, YYLTYPE is also declared instead of defined.
1798
1799 %union directives can now have a tag before the `{', e.g., the
1800 directive `%union foo {...}' now generates the C code
1801 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1802 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1803 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1804 instead of `yyltype'.
1805
1806 `yystype' and `yyltype' are now obsolescent macros instead of being
1807 typedefs or tags; they are no longer documented and will be
1808 withdrawn in a future release.
1809
1810 * data/glr.c (b4_location_type): Remove.
1811 (YYSTYPE): Renamed from yystype.
1812 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
1813 (struct YYLTYPE): Renamed from struct yyltype.
1814 (YYLTYPE): Renamed from yyltype.
1815 (yyltype, yystype): New (and obsolescent) macros,
1816 for backward compatibility.
1817 * data/yacc.c: Likewise.
1818
1819 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
1820 does not specify a union tag. This is for compatibility with
1821 Solaris 9 yacc.
1822
1823 * src/parse-gram.y (add_param): 2nd arg is now char * not char
1824 const *, since it is now modified by stripping surrounding { }.
1825 (current_braced_code): Remove.
1826 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
1827 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
1828 trailing " {...}". Now of type <chars>.
1829 (grammar_declaration): Adjust to bundled tokens.
1830 (code_content): Remove; stripping is now done by add_param.
1831 (print_token_value): Print contents of bundled tokens.
1832 (token_name): New function.
1833
1834 * src/reader.h (braced_code, current_braced_code): Remove.
1835 (token_name): New decl.
1836
1837 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
1838 token_type, not braced_code code_kind. All uses changed.
1839 (SC_PRE_CODE): New state, for scanning after a keyword that
1840 has (or usually has) an immediately-following braced code.
1841 (token_type): New local var, to keep track of which token type
1842 to return when scanning braced code.
1843 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
1844 <INITIAL>"%parse-param", <INITIAL>"%printer",
1845 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
1846 instead of returning a token type immediately.
1847 (<INITIAL>"{"): Set token type.
1848 (<SC_BRACED_CODE>"}"): Use it.
1849 (handle_action_dollar, handle_action_at): Now returns bool
1850 indicating success. Fail if ! current_rule; this prevents a core dump.
1851 (handle_symbol_code_dollar, handle_symbol_code_at):
1852 Remove; merge body into caller.
1853 (handle_dollar, handle_at): Complain in invalid contexts.
1854
1855 * NEWS, doc/bison.texinfo: Document the above.
1856 * NEWS: Fix years and program names in copyright notice.
1857
1858 2002-12-17 Paul Eggert <eggert@twinsun.com>
1859
1860 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
1861 Reporting, Table of Symbols): Omit mentions of %lex-param and
1862 %parse-param from the documentation for now.
1863
1864 2002-12-15 Paul Eggert <eggert@twinsun.com>
1865
1866 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
1867 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
1868 lookahead symbol, and which sets yychar in parser actions) and it
1869 disagreed with the Bison documentation. Bug
1870 reported by Andrew Walrond.
1871
1872 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
1873 as the caller now does that.
1874 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
1875 (YYEMPTY): Parenthesize right hand side, since others use it.
1876 (yyparse): Don't assume that our generated code is the only code
1877 that sets yychar.
1878
1879 2002-12-13 Paul Eggert <eggert@twinsun.com>
1880
1881 Version 1.75d.
1882
1883 POSIX requires a "yacc" command.
1884 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
1885 (MOSTLYCLEANFILES): Add yacc.
1886 (yacc): New rule.
1887 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
1888 as an alias for bison y.
1889
1890 * po/LINGUAS: Add da.
1891
1892 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
1893 problem with latest <getopt.h>.
1894 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
1895
1896 * doc/fdl.texi: Upgrade to 1.2.
1897 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
1898 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
1899 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
1900 gnulib.
1901 * config/install-sh: Sync with autotools.
1902
1903 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
1904 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1905 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
1906 locations are requested.
1907 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
1908 locations are requested.
1909
1910 2002-12-12 Paul Eggert <eggert@twinsun.com>
1911
1912 Remove unportable casts and storage allocation tricks.
1913 While we're at it, remove almost all casts, since they
1914 usually aren't needed and are a sign of trouble.
1915
1916 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
1917
1918 * src/derives.c (derives_compute): Do not subtract NTOKENS from
1919 the pointer DSET returned by malloc; this isn't portable.
1920 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
1921 Similarly for DERIVES.
1922 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
1923 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
1924 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
1925
1926 * src/derives.c (derives_compute): Do not bother invoking
1927 int_of_rule_number, since rule numbers are integers.
1928
1929 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
1930 rather than XMALLOC (char, N).
1931
1932 * src/files.c (filename_split): Rewrite to avoid cast.
1933
1934 * src/gram.h (symbol_number_as_item_number,
1935 item_number_as_symbol_number, rule_number_as_item_number,
1936 item_number_as_rule_number):
1937 Now inline functions rather than macros, to avoid casts.
1938 * src/state.h (state_number_as_int): Likewise.
1939 * src/tables.c (state_number_to_vector_number,
1940 symbol_number_to_vector_number): Likewise.
1941
1942 * src/gram.h (int_of_rule_number): Remove; no longer used.
1943
1944 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
1945 since the resulting storage is always stored into.
1946
1947 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
1948 where it's needed.
1949
1950 * src/muscle_tab.c (muscle_m4_output):
1951 Now inline. Return bool, not int.
1952 * src/state.c (state_compare): Likewise.
1953 * src/symtab.c (symbol_check_defined,
1954 symbol_check_alias_consistency, symbol_pack, symbol_translation,
1955 hash_compare_symbol, hash_symbol):
1956 Likewise.
1957 * src/uniqstr.c (uniqstr_print): Likewise.
1958 * src/muscle_tab.c (muscle_m4_output_processor):
1959 New function, to avoid casts.
1960 * src/state.c (state_comparator, stage_hasher): Likewise.
1961 * src/symtab.c (symbol_check_defined_processor,
1962 symbol_check_alias_consistency_processor, symbol_pack_processor,
1963 symbol_translation_processor, hash_symbol_comparator,
1964 hash_symbol_hasher): Likewise.
1965 * src/uniqstr.c (uniqstr_print_processor): Likewise.
1966 * src/muscle_tab.c (muscles_m4_output):
1967 Use new functions instead of casting old functions unportably.
1968 * src/state.c (state_hash_new): Likewise.
1969 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
1970 symbols_token_translations_init):
1971 Likewise.
1972 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
1973
1974 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
1975 var instead of casting to long, to avoid casts.
1976 (prepare_states): Use MALLOC rather than alloca, so that we don't
1977 have to worry about alloca.
1978 * src/state.c (state_hash_lookup): Likewise.
1979
1980 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
1981 local var instead of casting to unsigned char, to avoid casts.
1982
1983 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
1984 STATE_ALLOC): Remove.
1985 (transitions_new, errs_new, reductions_new, state_new): Use malloc
1986 rather than calloc, and use offsetof to avoid allocating slightly
1987 too much storage.
1988 (state_new): Initialize all members.
1989
1990 * src/state.c (state_hash): Use unsigned accumulator, not signed.
1991
1992 * src/symtab.c (symbol_free): Remove; unused.
1993 (symbol_get): Remove cast in lhs of assignment.
1994 (symbols_do): Now static. Accept generic arguments, not
1995 hashing-related ones.
1996
1997 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
1998 (symbol_processor): Remove.
1999 (symbols_do): Remove decl; now static.
2000
2001 * src/system.h (alloca): Remove; decl no longer needed.
2002 (<stddef.h>): Include, for offsetof.
2003 (<inttypes.>, <stdint.h>): Include if available.
2004 (uintptr_t): New type, if system lacks it.
2005 (CALLOC, MALLOC, REALLOC): New macros.
2006 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
2007 new macros.
2008
2009 * src/tables.c (table_size): Now int, to pacify GCC.
2010 (table_grow, table_ninf_remap): Use signed table size.
2011 (save_row): Don't bother initializing locals when not needed.
2012 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
2013 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
2014
2015 * src/vcg.h: Correct misspellings.
2016
2017 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
2018
2019
2020 * src/getargs.c (getargs): Don't assume EOF == -1.
2021
2022 2002-12-09 Paul Eggert <eggert@twinsun.com>
2023
2024 Change identifier spellings to avoid collisions with names
2025 that are reserved by POSIX.
2026
2027 Don't use names ending in _t, since POSIX reserves them.
2028 For consistency, remove _e and _s endings -- they're weren't
2029 needed to remove ambiguity. All uses changed.
2030 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
2031 turn was just renamed from struniq_t.
2032 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
2033 which in turn was just renamed from struniq_processor_t.
2034 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
2035 in turn was renamed from hash_compare_struniq_t.
2036 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
2037 (state_list): Renamed from state_list_t.
2038 * src/assoc.h (assoc): Renamed from assoc_t.
2039 * src/conflicts.c (enum conflict_resolution): Renamed from
2040 enum conflict_resolution_e.
2041 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
2042 (rule_list): Renamed from rule_list_t.
2043 * src/getargs.h (enum trace): Renamed from enum trace_e.
2044 (enum report): Renamed from enum report_e.
2045 * src/gram.h (item_number): Renamed from item_number_t.
2046 (rule_number): Renamed from rule_number_t.
2047 (struct rule_s): Remove the "rule_s" part; not used.
2048 (rule): Renamed from rule_t.
2049 (rule_filter): Renamed from rule_filter_t.
2050 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
2051 (goto_list): Renamed from goto_list_t.
2052 * src/lalr.h (goto_number): Renamed from goto_number_t.
2053 * src/location.h (location): Renamed from location_t.
2054 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
2055 and moved here from:
2056 * src/muscle_tab.h (muscle_entry_t): here.
2057 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
2058 (rule_list): Renamed from rule_list_t.
2059 * src/print_graph.c (static_graph): Renamed from graph.
2060 * src/reader.h (braced_code): Renamed from braced_code_t.
2061 Remove brace_code_e tag.
2062 * src/relation.h (relation_node): Renamed from relation_node_t.
2063 (relation_nodes): Renamed from relation_nodes_t.
2064 (relation): Renamed from relation_t.
2065 * src/state.h (state_number): Renamed from state_number_t.
2066 (struct state): Renamed from struct state_s.
2067 (state): Renamed from state_t.
2068 (transitions): Renamed from transitions_t. Unused (and
2069 misspelled) transtion_s tag removed.
2070 (errs): Renamed from errs_t. Unused errs_s tag removed.
2071 (reductions): Renamed from reductions_t. Unused tag
2072 reductions_s removed.
2073 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
2074 (struct symbol_list): Renamed from struct symbol_list_s.
2075 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
2076 (struct symbol): Renamed from struct symbol_s.
2077 (symbol): Renamed from symbol_t.
2078 * src/tables.c (vector_number): Renamed from vector_number_t.
2079 (action_number): Renamed from action_t.
2080 * src/tables.h (base_number): Renamed from base_t.
2081 * src/vcg.h (enum color): Renamed from enum color_e.
2082 (enum textmode): Renamed from enum textmode_e.
2083 (enum shape): Renamed from enum shape_e.
2084 (struct colorentry): Renamed from struct colorentry_s.
2085 (struct classname): Renamed from struct classname_s.
2086 (struct infoname): Renamed from struct infoname_s.
2087 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
2088 (enum decision): Renamed from enum decision_e.
2089 (enum orientation): Renamed from enum orientation_e.
2090 (enum alignment): Renamed from enum alignment_e.
2091 (enum arrow_mode): Renamed from enum arrow_mode_e.
2092 (enum crossing_type): Renamed from enum crossing_type_e.
2093 (enum view): Renamed from enum view_e.
2094 (struct node): Renamed from struct node_s.
2095 (node): Renamed from node_t.
2096 (enum linestyle): Renamed from enum linestyle_e.
2097 (enum arrowstyle): Renamed from enum arrowstyle_e.
2098 (struct edge): Renamed from struct edge.
2099 (edge): Renamed from edge_t.
2100 (struct graph): Renamed from struct graph_s.
2101 (graph): Renamed from graph_t.
2102 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
2103 Rename value_t -> value.
2104 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
2105 value_t_as_yystype -> value_as_yystype.
2106
2107 Don't include <errno.h> in the mainstream code, since it
2108 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
2109 * lib/get-errno.c, lib/get-errno.h: New files.
2110 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
2111 get-errno.c.
2112 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
2113 * src/output.c (output_skeleton): Likewise.
2114 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
2115 instead of errno.
2116 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
2117 Likewise.
2118 (handle_action_dollar, handle_action_at): Likewise.
2119 * src/system.h: Do not include <errno.h>.
2120 (TAB_EXT): Renamed from EXT_TAB.
2121 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
2122
2123 Avoid str[a-z]*, since <string.h> reserves that name space.
2124 Change all instances of "struniq" in names to "uniqstr", and
2125 likewise for "STRUNIQ" and "UNIQSTR".
2126 * src/uniqstr.c: Renamed from src/struniq.c.
2127 * src/uniqstr.h: Renamed from src/struniq.h.
2128 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
2129 * src/files.c (strsuffix): Remove; unused.
2130 (concat2): Renamed from stringappend. Now static.
2131 * src/files.h (strsuffix, stringappend): Remove; unused.
2132 * src/parse-gram.y (<chars>): Renamed from <string>.
2133 (<uniqstr>): Renamed from <struniq>.
2134 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
2135 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
2136 (struct graph_s.expand): Renamed from struct graph_s.stretch.
2137 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
2138 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
2139 (N_EXPAND): Renamed from N_STRETCH.
2140
2141 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
2142 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
2143 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
2144 Remove; unused.
2145 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
2146 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
2147 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
2148 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
2149 (BASE_MAXIMUM): Renamed from BASE_MAX.
2150 (BASE_MINIMUM): Renamed from BASE_MIN.
2151 (ACTION_MAX): Remove; unused.
2152 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
2153 Unnecessary casts removed from above defines.
2154
2155
2156 Fix misspelling in names.
2157 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
2158 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
2159 G_NODE_ALIGNEMENT.
2160
2161
2162 * lib/timevar.c (timevar_report): Renamed from time_report,
2163 for consistency with other names.
2164 * lib/timevar.h (timevar_report): New decl.
2165 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
2166
2167
2168 Sort include-file uses.
2169
2170 Reorder all include files under src to be in the order "system.h".
2171 then the ../lib include files in angle brackets (alphabetized),
2172 then the . include files in double-quotes (alphabetized). Fix
2173 dependency breakages encountered in this process, as follows:
2174 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
2175 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
2176 * src/state.h: Include "symtab.h".
2177
2178 2002-12-08 Paul Eggert <eggert@twinsun.com>
2179
2180 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
2181 since this causes problems when __file__ contains character
2182 sequences like "@" that are treated specially by src/scan-skel.l.
2183 Instead, just use the file's basename. This fixes the bug
2184 reported by Martin Mokrejs in
2185 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
2186
2187 2002-12-06 Paul Eggert <eggert@twinsun.com>
2188
2189 Add support for rules that do not have trailing semicolons, as
2190 POSIX requires. Improve the quality of locations in Bison
2191 diagnostics.
2192
2193 * src/location.c: Include <quotearg.h>.
2194 (empty_location): Now const.
2195 (location_print): New function. Follow the recommendation of the
2196 GNU Coding Standards for locations that span file boundaries.
2197 * src/location.h: Do not include <quotearg.h>; no longer needed.
2198 (boundary): New type.
2199 (location_t): Use it. This allows locations to span file boundaries.
2200 All member uses changed: file -> start.file or end.file (as needed),
2201 first_line -> start.line, first_column -> start.column,
2202 last_line -> end.line, last_column -> end.column.
2203 (equal_boundaries): New function.
2204 (LOCATION_RESET, LOCATION_STEP): Remove.
2205 (LOCATION_PRINT): Remove. All callers changed to use location_print.
2206 (empty_location): Now const.
2207 (location_print): New decl.
2208 * src/parse-gram.y (lloc_default): New function, which handles
2209 empty locations more accurately.
2210 (YYLLOC_DEFAULT): Use it.
2211 (%token COLON): Remove.
2212 (%token ID_COLON): New token.
2213 (rules): Use it.
2214 (declarations, rules): Remove trailing semicolon.
2215 (declaration, rules_or_grammar_declaration):
2216 Allow empty (";") declaration.
2217 (symbol_def): Remove empty actions; no longer needed.
2218 (rules_or_grammar_declaration): Remove trailing semicolon.
2219 (semi_colon.opt): Remove.
2220 * src/reader.h: Include location.h.
2221 (scanner_cursor): New decl.
2222 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
2223 rolling our own.
2224 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
2225 of *loc.
2226 (STEP): Remove. No longer needed, now that adjust_location does
2227 the work. All uses removed.
2228 (scanner_cursor): New var.
2229 (adjust_location): Renamed from extend_location. It now sets
2230 *loc and adjusts the scanner cursor. All uses changed.
2231 Don't bother testing for CR.
2232 (handle_syncline): Remove location arg; now updates scanner cursor.
2233 All callers changed.
2234 (unexpected_end_of_file): Now accepts start boundary of token or
2235 comment, not location. All callers changed. Update scanner cursor,
2236 not the location.
2237 (SC_AFTER_IDENTIFIER): New state.
2238 (context_state): Renamed from c_context. All uses changed.
2239 (id_loc, code_start, token_start): New local vars.
2240 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
2241 processing of Yacc white space and equivalents here.
2242 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
2243 instead of returning ID immediately, since we need to search for
2244 a subsequent colon.
2245 (<INITIAL>"'", "\""): Save token_start.
2246 (<INITIAL>"%{", "{", "%%"): Save code_start.
2247 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
2248 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
2249 BEGIN context_state at end, not INITIAL.
2250 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
2251 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
2252 Return correct token start.
2253 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
2254 the start of a character, string or multiline comment is found.
2255 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
2256 Reduction): Adjust reported locations to match the more-precise
2257 results now expected.
2258 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
2259 * tests/reduce.at (Useless Rules, Reduced Automaton,
2260 Underivable Rules): Likewise.
2261 * tests/regression.at (Invalid inputs): No longer `expecting ";"
2262 or "|"' now that so many other tokens are allowed by the new grammar.
2263
2264 * src/complain.h (current_file): Remove duplicate decl;
2265 current_file is now owned by files.h.
2266 * src/complain.c, src/scan-gram.l: Include files.h.
2267
2268 2002-12-06 Paul Eggert <eggert@twinsun.com>
2269
2270 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
2271 promotes to int; it might be unsigned int.
2272 * data/yacc.c (yy_reduce_print): Likewise.
2273
2274 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
2275 be #defined in the prologue, not in the Bison declarations.
2276 This fixes Debian Bug 102878, reported by Shaul Karl.
2277
2278 2002-12-02 Paul Eggert <eggert@twinsun.com>
2279
2280 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
2281 * lib/strtoul.c: New file, from gnulib.
2282 This fixes a porting bug reported by Peter Klein in
2283 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
2284
2285 2002-11-30 Paul Eggert <eggert@twinsun.com>
2286
2287 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
2288 and put only a forward declaration in the prologue. This is for
2289 consistency with the other scanner helper functions.
2290
2291 Type clashes now generate warnings, not errors, since it
2292 appears that POSIX may allow some grammars with type clashes.
2293 * src/reader.c (grammar_current_rule_check): Warn about
2294 type clashes instead of complaining.
2295 * tests/input.at (Type Clashes): Expect warnings, not complaints.
2296
2297 Add Yacc library, since POSIX requires it.
2298 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
2299 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
2300 * lib/main.c, lib/yyerror.c: New files.
2301
2302 gram_error can be static; it need not be extern.
2303 * src/reader.h (gram_error): Remove decl.
2304 * src/parse-gram.y (gram_error): Now static. Add static decl.
2305 (print_token_value): Omit parameter names from forward decl,
2306 for consistency.
2307
2308 2002-11-29 Paul Eggert <eggert@twinsun.com>
2309
2310 * doc/bison.texinfo: Emphasize that yylex and yyerror must
2311 be declared before being used. E.g., one should typically
2312 declare them in the prologue. Use GNU coding style in examples.
2313 Put "const" consistently after the type it modifies. Mention
2314 that C99 supports "inline". Mention that yyerror traditionally
2315 returns "int".
2316
2317 %parse-param and %lex-param now take just one argument, the
2318 declaration; the argument name is deduced from the declaration.
2319
2320 * doc/bison.texinfo (Parser Function, Pure Calling, Error
2321 Reporting, Table of Symbols): Document this.
2322 * src/parse-gram.y (add_param): New function.
2323 (COMMA): Remove.
2324 (declaration): Implement new rule for %parse-param and %lex-param.
2325 * src/scan-gram.l: "," now elicits a warning, rather than being
2326 a token; this is more compatible with byacc.
2327 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
2328
2329 2002-11-27 Paul Eggert <eggert@twinsun.com>
2330
2331 Rename identifiers to avoid real and potential collisions.
2332
2333 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
2334 to avoid collision with lex macro described by Bruce Lilly in
2335 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
2336 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2337 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
2338 * src/parse-gram.y (print_token_value): Renamed from yyprint.
2339 All uses changed.
2340 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
2341 The name "yycontrol" violates the name space rules, and this stuff
2342 wasn't being used anyway.
2343 (input): Remove action; this stuff wasn't being used.
2344 (gram_error): Rename local variable yylloc -> loc.
2345 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
2346 (YY_DECL): Don't use "yy" at start of local variables.
2347 All uses changed, e.g., yylloc -> loc.
2348 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
2349 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
2350 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
2351 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
2352
2353 * src/parse-gram.y (gram_error): loc is now const *.
2354 * src/reader.h (gram_error): Likewise.
2355
2356 2002-11-24 Paul Eggert <eggert@twinsun.com>
2357
2358 Version 1.75c.
2359
2360 * tests/actions.at (Actions after errors): Use an output format
2361 more similar to that of the Printers and Destructors test.
2362 Test the position of the ';' token too.
2363 (Printers and Destructors): Likewise.
2364 (Printers and Destructors: %glr-parser): Remove for now, to avoid
2365 unnecessarily alarming people when the test fails.
2366
2367 * data/yacc.c (yyerrlab1): Move this label down, so that the
2368 parser does not discard the lookahead token if the user code
2369 invokes YYERROR. This change is required for POSIX conformance.
2370
2371 * lib/error.c: Sync with gnulib.
2372
2373 2002-11-22 Paul Eggert <eggert@twinsun.com>
2374
2375 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
2376 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
2377 * lib/xmalloc.c: Likewise.
2378
2379 2002-11-20 Paul Eggert <eggert@twinsun.com>
2380
2381 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
2382
2383 2002-11-20 Paul Eggert <eggert@twinsun.com>
2384
2385 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
2386 should use `if (! x) abort ();' rather than `assert (x);', and
2387 anyway it's one less thing to worry about configuring.
2388
2389 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
2390 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
2391 and replace all instances of assert with abort.
2392 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2393 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
2394
2395 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
2396 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
2397 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
2398 hash_find_entry, hash_rehash, hash_insert): Likewise.
2399 * src/conflicts.c (resolve_sr_conflict): Likewise.
2400 * src/lalr.c (set_goto_map, map_goto): Likewise.
2401 * src/nullable.c (nullable_compute): Likewise.
2402 * src/output.c (prepare_rules, token_definitions_output): Likewise.
2403 * src/reader.c (packgram, reader): Likewise.
2404 * src/state.c (state_new, state_free, state_transitions_set,
2405 state_reduction_find): Likewise.
2406 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
2407 symbol_pack): Likewise.
2408 * src/tables.c (conflict_row, pack_vector): Likewise.
2409 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
2410 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
2411 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
2412 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
2413
2414 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
2415 (ARGMATCH_CONSTRAINT): New macro.
2416 (ARGMATCH_ASSERT): Use it.
2417
2418 * src/system.h (verify): New macro.
2419 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
2420 rather than assert.
2421 * src/tables.c (tables_generate): Likewise.
2422
2423 * src/struniq.c (struniq_assert): Now returns void, and aborts
2424 if the assertion is false.
2425 (struniq_assert_p): Remove.
2426 * src/struniq.h: Likewise.
2427
2428 2002-11-18 Paul Eggert <eggert@twinsun.com>
2429
2430 * data/glr.c (yygetLRActions): Replace `yyindex' with
2431 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
2432 This fixes the regression with Sun ONE Studio 7 cc that I reported in
2433 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
2434
2435 2002-11-18 Akim Demaille <akim@epita.fr>
2436
2437 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
2438 space.
2439 From Tim Van Holder.
2440
2441 2002-11-17 Paul Eggert <eggert@twinsun.com>
2442
2443 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
2444 to "SyntaxError" for consistency with my 2002-11-15 change.
2445
2446 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
2447 not define to {}, since this breaks the common use of `YYDPRINTF
2448 ((...));' if a single statement is desired (e.g. before `else').
2449 Work around GCC warnings by surrounding corresponding calls with
2450 {} if needed.
2451 (yyhasResolvedValue): Remove unused function.
2452 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
2453 loop body.
2454 (yyreportSyntaxError): Renamed from yyreportParseError.
2455 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
2456 All uses changed.
2457 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
2458 extern when possible. Remove unused initializations.
2459
2460 2002-11-16 Akim Demaille <akim@epita.fr>
2461
2462 Augment the similarity between GLR and LALR traces.
2463
2464 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
2465 (YY_REDUCE_PRINT): New.
2466 (yyparse): Use them.
2467 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
2468 YYDPRINT here.
2469 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
2470 state reached after the reduction/recovery, since...
2471 (yyparse, yyprocessOneStack): Report the state we are entering in.
2472
2473 2002-11-16 Akim Demaille <akim@epita.fr>
2474
2475 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
2476 Add support for --trace=skeleton.
2477 * src/scan-skel.l: %option debug.
2478 Scan strings of non-@ or \n instead of character by character.
2479 (scan_skel): Handle trace_skeleton.
2480 (QPUTS): New.
2481 (@output_parser_name@, @output_header_name@): ``Restore'' their
2482 support (used to be M4 macros).
2483 * data/yacc.c: Quote larger chunks, a la glr.c.
2484 * data/lalr1.cc: Likewise.
2485 The header guards are no longer available, so use some other
2486 string than `YYLSP_NEEDED'.
2487
2488 2002-11-16 Akim Demaille <akim@epita.fr>
2489
2490 Make the ``Printers and Destructors'' test more verbose, taking
2491 `yacc.c''s behavior as (possibly wrong) reference.
2492
2493 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
2494 instead of fprint on stdout.
2495 Set and report the last_line of the symbols.
2496 Consistently display values and locations.
2497
2498 2002-11-16 Paul Eggert <eggert@twinsun.com>
2499
2500 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
2501
2502 2002-11-15 Paul Eggert <eggert@twinsun.com>
2503
2504 * tests/actions.at (Actions after errors): New test case.
2505
2506 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
2507 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
2508 tests/action.at, tests/calc.at, tests/conflicts.at,
2509 tests/cxx-type.at, tests/regression.at:
2510 "parse error" -> "syntax error" for POSIX compatibility.
2511 "parsing stack overflow..." -> "parser stack overflow" so
2512 that code matches Bison documentation.
2513
2514 2002-11-15 Akim Demaille <akim@epita.fr>
2515
2516 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
2517 take two BRACED_CODE, not two string_content.
2518 Free the scanner's obstack when we are done.
2519 (code_content): New.
2520 * tests/calc.at: Adjust.
2521 * doc/bison.texinfo: Adjust.
2522 Also, make sure to include the `,' for these declarations.
2523
2524 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
2525
2526 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
2527 definition; avoids potential autoreconf problems.
2528
2529 2002-11-15 Akim Demaille <akim@epita.fr>
2530
2531 Always check the value returned by yyparse.
2532
2533 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
2534 returned by yyparse.
2535 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
2536 Adjust calls.
2537 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
2538 returned by yyparse.
2539
2540 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2541
2542 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
2543 on input.at test.
2544
2545 2002-11-14 Paul Eggert <eggert@twinsun.com>
2546
2547 * src/output.c (output_skeleton): Call xfopen instead of
2548 duplicating xfopen's body.
2549
2550 Fix bugs reported by Nelson H. F. Beebe in
2551 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
2552
2553 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
2554 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
2555 Group compiler. Instead, use "$CC -E bar.c". Include the .h
2556 file twice in the grammar, as an extra check.
2557
2558 * tests/input.at (Torturing the Scanner): Surround the
2559 backslash-newline tests with "#if 0", to make it less likely that
2560 we'll run into compiler bugs. Bring back solitary \ inside
2561 comment, but add a closing comment to work around HP C bug. Don't
2562 test backslash-newline in C character constant.
2563
2564 2002-11-14 Akim Demaille <akim@epita.fr>
2565
2566 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
2567 status of the compiler.
2568 Calling `exit 1' is no longer needed.
2569 Reported by Nelson H. F. Beebe.
2570
2571 2002-11-14 Akim Demaille <akim@epita.fr>
2572
2573 * tests/atlocal.in (CPPFLAGS): We have config.h.
2574 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
2575 New.
2576 * tests/actions.at, tests/calc.at, tests/conflicts.at,
2577 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
2578 * tests/regression.at, tests/torture.at: Use them for all the
2579 grammars that are to be compiled.
2580 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
2581 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
2582 * doc/bison.texinfo (GLR Parsers): Document `inline'.
2583
2584 2002-11-14 Akim Demaille <akim@epita.fr>
2585
2586 * doc/bison.texinfo: Various formatting changes (alignments in
2587 samples, additional @group/@end group, GCS in samples.
2588 Use @deffn instead of simple @table to define the directives,
2589 macros, variables etc.
2590
2591 2002-11-13 Paul Eggert <eggert@twinsun.com>
2592
2593 Fix some bugs reported by Albert Chin-A-Young in
2594 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
2595
2596 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
2597 -o c"; the HP C compiler chatters during compilation.
2598 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
2599 * tests/headers.at (export YYLTYPE): Likewise.
2600
2601 * tests/input.at (Torturing the Scanner): Remove lines containing
2602 solitary backslashes, as they tickle a bug in the HP C compiler.
2603
2604 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
2605 comments, since they're not portable. Use GNU coding style.
2606
2607 2002-11-13 Akim Demaille <akim@epita.fr>
2608
2609 * data/yacc.c: Leave bigger chunks of quoted text.
2610 (YYDSYMPRINTF): New.
2611 Use it to report symbol activities.
2612 * data/glr.c (YYDSYMPRINTF): New.
2613 Use it.
2614
2615 2002-11-12 Paul Eggert <eggert@twinsun.com>
2616
2617 Version 1.75b.
2618
2619 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
2620 (yyglrReduce): Return yyok, not 0.
2621 This should avoid the enumerated-type warnings reported
2622 by Nelson H. F. Beebe in
2623 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
2624
2625 * lib/bbitset.h (BITSET_INLINE): Remove.
2626 * lib/bitset.h [! BITSET_INLINE]: Remove.
2627 (bitset_set, bitset_reset, bitset_test): Rename local vars
2628 to avoid shadowing warnings by GCC.
2629
2630 * data/glr.c (inline): Remove #define. It's the user's
2631 responsibility to #define it away, just like 'const'.
2632 This fixes one of the bugs reported by Nelson H. F. Beebe in
2633 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
2634
2635 * Makefile.maint (po-check): Scan .l and .y files instead of the
2636 .c and the .h files that they generate. This fixes the bug
2637 reported by Tim Van Holder in:
2638 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
2639 Look for N_ as well as for _. Try to avoid matching #define for
2640 N_ and _.
2641 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
2642 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
2643 * src/scan-gram.l: Revamp regular expressions so that " and '
2644 do not confuse xgettext.
2645
2646 * src/struniq.h (struniq_new): Do not declare the return type
2647 to be 'const'; this violates the C standard.
2648 * src/struniq.c (struniq_new): Likewise.
2649
2650 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
2651
2652 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
2653 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
2654 linker.
2655
2656 2002-11-12 Akim Demaille <akim@epita.fr>
2657
2658 * Makefile.maint: Sync with Autoconf:
2659 (local_updates): New.
2660
2661 2002-11-12 Akim Demaille <akim@epita.fr>
2662
2663 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
2664
2665 2002-11-12 Akim Demaille <akim@epita.fr>
2666
2667 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
2668 locations.
2669
2670 2002-11-12 Akim Demaille <akim@epita.fr>
2671
2672 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
2673 not yyvalue.
2674
2675 2002-11-12 Akim Demaille <akim@epita.fr>
2676
2677 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
2678 Use it to test the GLR parser.
2679
2680 2002-11-12 Akim Demaille <akim@epita.fr>
2681
2682 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
2683 defines it.
2684 * data/glr.c (yystos): New.
2685 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
2686 (YYDSYMPRINT): New.
2687 (yyval): Don't define it, it is handled via M4.
2688 (yyrecoverParseError): Free verbosely the discarded symbols.
2689 * data/yacc.c (yysymprint): Remove, rather...
2690 (b4_yysymprint_generate): invoke.
2691 * data/c.m4 (b4_yysymprint_generate): New.
2692 Accept pointers as arguments, as opposed to the version from
2693 yacc.c.
2694 (b4_yydestruct_generate): Likewise.
2695 * tests/cations.at (Printers and Destructors): Use Bison directives
2696 instead of CPP macros.
2697 Don't rely on internal details.
2698
2699 2002-11-12 Akim Demaille <akim@epita.fr>
2700
2701 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
2702 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
2703 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
2704 it against YYEMPTY and so forth), work on yytoken (i.e., set
2705 it to YYEMPTY etc.).
2706 (yydestruct): Replace with a b4_yydestruct_generate invocation.
2707 (b4_symbol_actions): Remove.
2708 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
2709 for 0, end-of-input.
2710
2711 2002-11-12 Akim Demaille <akim@epita.fr>
2712
2713 * doc/bison.texinfo (Destructor Decl): New.
2714
2715 2002-11-12 Akim Demaille <akim@epita.fr>
2716
2717 * src/tables.c (tables_generate): Use free for pointers that
2718 cannot be NULL, not XFREE.
2719 (pack_vector): Use assert, not fatal, for bound violations.
2720 * src/state.c (state_new): Likewise.
2721 * src/reader.c (reader): Likewise.
2722 * src/lalr.c (set_goto_map): Likewise.
2723 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
2724 the file name.
2725
2726 2002-11-12 Akim Demaille <akim@epita.fr>
2727
2728 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2729 Restore.
2730 * src/scan-gram.l (last_string): Is global to the file, not to
2731 yylex.
2732 * src/parse-gram.y (input): Don't append the epilogue here,
2733 (epilogue.opt): do it here, and free the scanner's obstack.
2734 * src/reader.c (epilogue_set): Rename as...
2735 (epilogue_augment): this.
2736 * data/c.m4 (b4_epilogue): Defaults to empty.
2737
2738 2002-11-12 Akim Demaille <akim@epita.fr>
2739
2740 * src/getargs.c (long_options): Remove duplicates.
2741 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2742 Remove.
2743 * doc/bison.rnh: Remove.
2744 * doc/bison.texinfo (VMS Invocation): Remove.
2745
2746 2002-11-12 Akim Demaille <akim@epita.fr>
2747
2748 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2749 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2750
2751 Use struniq for symbols.
2752
2753 * src/symtab.h (symbol_t): The tag member is a struniq.
2754 (symbol_type_set): Adjust.
2755 * src/symtab.c (symbol_new): Takes a struniq.
2756 (symbol_free): Don't free the tag member.
2757 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2758 (hash_compare_symbol, hash_symbol): these.
2759 Use the fact that tags as struniqs.
2760 (symbol_get): Use struniq_new.
2761 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2762 Returns a strniq.
2763 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2764 and type members are struniqs.
2765 * src/reader.c (get_merge_function)
2766 (grammar_current_rule_merge_set): Adjust.
2767 (TYPE, current_type): Are struniq.
2768
2769 Use struniq for file names.
2770
2771 * src/files.h, src/files.c (infile): Split into...
2772 (grammar_file, current_file): these.
2773 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2774 * src/reduce.c (reduce_print): Likewise.
2775 * src/getargs.c (getargs): Likewise.
2776 * src/complain.h, src/complain.c: Likewise.
2777 * src/main.c (main): Call struniqs_new early enough to use it for
2778 file names.
2779 Don't free the input file name.
2780
2781 2002-11-12 Akim Demaille <akim@epita.fr>
2782
2783 * src/symtab.c (symbol_free): Remove dead deactivated code:
2784 type_name are properly removed.
2785 Don't use XFREE to free items that cannot be NULL.
2786 * src/struniq.h, src/struniq.c: New.
2787 * src/main.c (main): Initialize/free struniqs.
2788 * src/parse-gram.y (%union): Add astruniq member.
2789 (yyprint): Adjust.
2790 * src/scan-gram.l (<{tag}>): Return a struniq.
2791 Free the obstack bit that used to store it.
2792 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2793
2794 2002-11-11 Paul Eggert <eggert@twinsun.com>
2795
2796 Revamp to fix many (but not all) of the C- and M4-related quoting
2797 problems. Among other things, this fixes the Bison bug reported
2798 by Jan Hubicka when processing the Bash grammar; see:
2799 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
2800
2801 Use new @ escapes consistently. Represent brackets with @{ and @}
2802 rather than @<:@ and @:>@, since this works a bit better with dumb
2803 editors like vi. Represent @ with @@, since @ is now consistently
2804 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2805 __ofile__, to avoid unexpected expansions. Similarly, use @output
2806 rather than #output.
2807
2808 * data/c.m4 (b4_copyright): Omit file name from comment, since
2809 the file name could contain "*/".
2810 (b4_synclines_flag): Don't quote the 2nd argument; it should already
2811 be quoted. All uses changed.
2812
2813 * data/glr.c: Use new @ escapes consistently.
2814 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
2815 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
2816 Remove, since they couldn't handle arbitrary characters in file
2817 names.
2818 * data/lalr1.cc: Likewise.
2819 * data/yacc.c: Likewise.
2820
2821 * src/files.c (output_infix): Remove; all uses removed.
2822 * src/files.h: Likewise.
2823
2824 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
2825 mishandled funny characters in file names, and anyway it isn't
2826 needed any more.
2827 * data/yacc.c: Likewise.
2828 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
2829
2830 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
2831 * data/yacc.c: Likewise.
2832
2833 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
2834 strings now.
2835 (muscle_init): Quote filename as a C string.
2836 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
2837 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
2838 * src/output.c (escaped_file_name_output): New function.
2839 (prepare_symbols): Quote tokens for M4.
2840 (prepare): Don't insert output_infix, output_prefix,
2841 output_parser_name, output_header_name; this is now down by scan-skel.
2842 Insert skeleton as a C string.
2843
2844 * src/output.c (user_actions_output, symbol_destructors_output,
2845 symbol_printers_output): Quote filenames for C and M4.
2846 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2847
2848 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
2849 escapes other than \\ and \'; this simplifies the code.
2850 (<SC_STRING>): Likewise, for \\ and \".
2851 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
2852 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
2853 Use new escapes @{ and @} for [ and ].
2854
2855 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
2856 them with auto vars.
2857 Switch to new escape scheme, where @ is the escape character uniformly.
2858 Abort if a stray escape character is found. Avoid unbounded input
2859 buffer when parsing non-escaped text.
2860
2861 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
2862 __oline__, #output, $@, and @{ do not have unintended meanings.
2863
2864 2002-11-09 Paul Eggert <eggert@twinsun.com>
2865
2866 Fix the test failure due to GCC warnings described in
2867 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
2868 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
2869 evaluate to 0 if it's impossible for NINF to be in the respective
2870 table.
2871 (yygetLRActions, yyrecoverParseError): Use them.
2872
2873 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
2874 counted in the token inserted at end of file. Now takes
2875 location_t *, not location_t, so that the location can be
2876 adjusted. All uses changed.
2877
2878 * tests/regression.at (Invalid inputs): Adjust wording in
2879 diagnostic to match the new behavior.
2880
2881 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
2882 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
2883 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
2884 abort ();'. This reduces the runtime of the "Many lookaheads"
2885 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
2886 GCC 3.2.
2887
2888 2002-11-07 Paul Eggert <eggert@twinsun.com>
2889
2890 * src/parse-gram.y (CHARACTER): Remove unused token.
2891 All uses removed.
2892
2893 * src/scan-gram.l: Remove stack option. We no longer use the
2894 stack, since the stack was never deeper than 1; instead, use the
2895 new auto var c_context to record the stacked value.
2896
2897 Remove nounput option. At an unexpected end of file, we now unput
2898 the minimal input necessary to end cleanly; this simplifies the
2899 code.
2900
2901 Avoid unbounded token sizes where this is easy.
2902
2903 (unexpected_end_of_file): New function.
2904 Use it to systematize the error message on unexpected EOF.
2905 (last-string): Now auto, not static.
2906 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
2907 (scanner_last_string_free): Remove; not used.
2908 (percent_percent_count): Move decl to just before use.
2909 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
2910 not the (never otherwised-used) CHARACTER.
2911
2912 2002-11-07 Akim Demaille <akim@epita.fr>
2913
2914 Let yyerror always receive the msg as last argument, so that
2915 yyerror can be variadic.
2916
2917 * data/yacc.c (b4_yyerror_args): New.
2918 Use it when calling yyerror.
2919 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
2920 Use it when calling yyerror.
2921 * doc/bison.texinfo (Error Reporting): Adjust.
2922 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
2923 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
2924
2925 2002-11-06 Akim Demaille <akim@epita.fr>
2926
2927 #line should have quoted strings.
2928 Ideally, this should be done by m4_quotearg.
2929
2930 * src/scan-skel.l: Include quotearg.h.
2931 Quote __ofile__.
2932 * src/output.c (symbol_printers_output)
2933 (symbol_destructors_output): Quote the file name.
2934
2935 2002-11-06 Akim Demaille <akim@epita.fr>
2936
2937 * tests/regression.at (Invalid inputs): Adjust to the recent
2938 messages.
2939
2940 2002-11-06 Akim Demaille <akim@epita.fr>
2941
2942 Restore --no-lines.
2943 Reported by Jim Kent.
2944
2945 * data/c.m4 (b4_syncline): New.
2946 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
2947 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
2948 * src/output.c (user_actions_output): Likewise.
2949 (prepare): Define 'b4_synclines_flag'.
2950 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
2951
2952 2002-11-06 Akim Demaille <akim@epita.fr>
2953
2954 * src/main.c (main): Free `infile'.
2955 * src/scan-gram.l (handle_syncline): New.
2956 Recognize `#line'.
2957 * src/output.c (user_actions_output, symbol_destructors_output)
2958 (symbol_printers_output): Use the location's file name, not
2959 infile.
2960 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2961
2962 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2963
2964 * src/tables.c (matching_state): Don't allow states to match if
2965 either has GLR conflict entries.
2966
2967 2002-11-05 Paul Eggert <eggert@twinsun.com>
2968
2969 * src/scan-gram.l: Use more accurate diagnostics, e.g.
2970 "integer out of range" rather than "invalid value".
2971 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
2972 accordingly.
2973
2974 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
2975 Also, remove one static variable in the scanner.
2976
2977 * src/scan-gram.l (braces_level): Now auto, not static.
2978 Initialize to zero if the compiler is being picky.
2979 (INITIAL): Clear braces_level instead of incrementing it.
2980 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
2981 as POSIX 1003.1-2001 requires.
2982 * src/system.h (IF_LINT): New macro, taken from coreutils.
2983 * configure.ac: Define "lint" if --enable-gcc-warnings.
2984
2985 2002-11-05 Akim Demaille <akim@epita.fr>
2986
2987 * src/scan-gram.l: When it starts with `%', complain about the
2988 whole directive, not just that `invalid character: %'.
2989
2990 2002-11-04 Akim Demaille <akim@epita.fr>
2991
2992 * Makefile.maint: Update from Autoconf.
2993 (update, cvs-update, po-update, do-po-update): New.
2994
2995 2002-11-04 Akim Demaille <akim@epita.fr>
2996
2997 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
2998 and yyerror.
2999 Have yyerror `use' its arguments.
3000 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
3001 returns true when location & yacc & pure & parse-param.
3002 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
3003
3004 2002-11-04 Akim Demaille <akim@epita.fr>
3005
3006 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
3007 clashes.
3008 * src/scan-gram.l: Use [\'] instead of ['] to pacify
3009 font-lock-mode.
3010 Use complain_at.
3011 Use quote, not quote_n since LOCATION_PRINT no longer uses the
3012 slot 0.
3013
3014 2002-11-03 Paul Eggert <eggert@twinsun.com>
3015
3016 * src/reader.c (get_merge_function, grammar_current_rule_check):
3017 Use consistent diagnostics for reporting type name clashes.
3018 Quote the types with <>, for consistency with Yacc.
3019 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
3020
3021 2002-11-03 Akim Demaille <akim@epita.fr>
3022
3023 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
3024 New.
3025 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
3026 (b4_parse_param): Remove.
3027 Use b4_identification.
3028 Propagate b4_pure_args where needed to pass them to yyerror.
3029 * data/glr.m4 (b4_parse_param): Remove.
3030 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
3031 (b4_lpure_formals): New.
3032 Use b4_identification.
3033 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
3034 b4_user_formals and b4_user_args.
3035 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
3036 (yyreportAmbiguity): When using a pure parser, also need
3037 the location, and the parse-params.
3038 Adjust callers.
3039 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
3040 When using a pure parser, also need the parse-params.
3041 Adjust callers.
3042 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
3043 (%pure-parser + %parse-param) LALR and GLR parsers.
3044 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
3045 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
3046 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
3047 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
3048 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
3049 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
3050 * doc/bison.texinfo: Untabify the whole file.
3051 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
3052 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
3053 (Error Reporting): Adjust to these new directives.
3054 Document %error-verbose, deprecate YYERROR_VERBOSE.
3055
3056 2002-11-03 Akim Demaille <akim@epita.fr>
3057
3058 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
3059 AT_CHECK_CALC_GLR invocations to use % directives, instead of
3060 command line options.
3061 * tests/cxx-type.at: Formatting changes.
3062
3063 2002-11-03 Paul Eggert <eggert@twinsun.com>
3064
3065 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
3066 to count columns correctly, and to check for invalid inputs.
3067
3068 Use mbsnwidth to count columns correctly. Account for tabs, too.
3069 Include mbswidth.h.
3070 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
3071 (extend_location): New function.
3072 (YY_LINES): Remove.
3073
3074 Handle CRLF in C code rather than in Lex code.
3075 (YY_INPUT): New macro.
3076 (no_cr_read): New function.
3077
3078 Scan UCNs, even though we don't fully handle them yet.
3079 (convert_ucn_to_byte): New function.
3080
3081 Handle backslash-newline correctly in C code.
3082 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
3083 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
3084 all uses changed.
3085 (tag, splice): New EREs. Do not allow NUL or newline in tags.
3086 Use {splice} wherever C allows backslash-newline.
3087 YY_STEP after space, newline, vertical-tab.
3088 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
3089
3090 (letter, id): Don't assume ASCII; e.g., spell out a-z.
3091
3092 ({int}, handle_action_dollar, handle_action_at): Check for integer
3093 overflow.
3094
3095 (YY_STEP): Omit trailing semicolon, so that it's more like C.
3096
3097 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
3098 as well as \000. Check for UCHAR_MAX, not 255.
3099 Allow \x with an arbitrary positive number of digits, as in C.
3100 Check for overflow here.
3101 Allow \? and UCNs, for compatibility with C.
3102
3103 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
3104 with quote slot used by complain_at.
3105
3106 * tests/input.at: Add tests for backslash-newline, m4 quotes
3107 in symbols, long literals, and funny escapes in strings.
3108
3109 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
3110 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
3111 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
3112 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
3113 * m4/mbswidth.m4: New file, from GNU coreutils.
3114
3115 * doc/bison.texinfo (Grammar Outline): Document // comments.
3116 (Symbols): Document that trigraphs have no special meaning in Bison,
3117 nor is backslash-newline allowed.
3118 (Actions): Document that trigraphs have no special meaning.
3119
3120 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
3121 no longer used.
3122
3123 2002-11-02 Paul Eggert <eggert@twinsun.com>
3124
3125 * src/reader.c: Don't include quote.h; not needed.
3126 (get_merge_function): Reword warning to be consistent with
3127 type clash diagnostic in grammar_current_rule_check.
3128
3129 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
3130 bug in trigraph handling.
3131
3132 * src/output.c (prepare_symbols): When printing token names,
3133 escape "[" as "@<:@" and likewise for "]".
3134
3135 * src/system.h (errno): Remove declaration, as we are now
3136 assuming C89 or better, and C89 guarantees errno.
3137
3138 2002-10-30 Paul Eggert <eggert@twinsun.com>
3139
3140 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
3141 Check for close failures.
3142 * src/files.h (xfclose): Return void, not int, since it always
3143 returned zero.
3144 * src/files.c (xfclose): Likewise. Report I/O error if ferror
3145 indicates one.
3146 * src/output.c (output_skeleton): Use xfclose rather than fclose
3147 and ferror. xfclose now checks ferror.
3148
3149 * data/glr.c (YYLEFTMOST_STATE): Remove.
3150 (yyreportTree): Use a stack-based leftmost state. This avoids
3151 our continuing battles with bogus warnings about initializers.
3152
3153 2002-10-30 Akim Demaille <akim@epita.fr>
3154
3155 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
3156 #if.
3157
3158 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3159
3160 * tests/glr-regr1.at: New test for reported regressions.
3161 * tests/testsuite.at: Add glr-regr1.at test.
3162 * tests/Makefile.am: Add glr-regr1.at test.
3163
3164 2002-10-24 Paul Eggert <eggert@twinsun.com>
3165
3166 Version 1.75a.
3167
3168 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
3169 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
3170 we use malloc. Don't assume 'A' through 'Z' are contiguous.
3171 Don't assume strdup exists; POSIX says its an XSI extension.
3172 Check for buffer overflow on input.
3173
3174 2002-10-24 Akim Demaille <akim@epita.fr>
3175
3176 * src/output.c (output_skeleton): Don't disable M4sugar comments
3177 too soon: it results in comments being expanded.
3178 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
3179 first output.
3180
3181 2002-10-24 Akim Demaille <akim@epita.fr>
3182
3183 * data/yacc.c (m4_int_type): New.
3184 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
3185 char' as only yacc.c wants K&R portability.
3186 * data/glr.c (yysigned_char): Remove.
3187 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
3188 Reported by Quoc Peyrot.
3189
3190 2002-10-23 Paul Eggert <eggert@twinsun.com>
3191
3192 * src/main.c (main): With --trace=time, report times even if a
3193 non-fatal error occurs. Formerly, the times were reported in some
3194 such cases but not in others.
3195 * src/reader.c (reader): Just return if a complaint has been issued,
3196 instead of exiting, so that 'main' can report times.
3197
3198 2002-10-22 Akim Demaille <akim@epita.fr>
3199
3200 * src/system.h: Include sys/types.
3201 Reported by Bert Deknuydt.
3202
3203 2002-10-23 Paul Eggert <eggert@twinsun.com>
3204
3205 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
3206 Suggested by Art Haas.
3207
3208 2002-10-22 Paul Eggert <eggert@twinsun.com>
3209
3210 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
3211 decl; not needed any more.
3212 * src/main.c (main): Use return to exit, undoing yesterday's change.
3213 The last OS that we could find where this wouldn't work is
3214 SunOS 3.5, and that's too old to worry about now.
3215
3216 * data/glr.c (struct yyltype): Define members even when not
3217 doing locations. This is more consistent with yacc.c, and it
3218 works around the following bug reports:
3219 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
3220 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
3221
3222 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
3223 @acronym consistently. Standardize on "Yacc" instead of "YACC",
3224 "Algol" instead of "ALGOL". Give a bit more history about BNF.
3225
3226 2002-10-22 Akim Demaille <akim@epita.fr>
3227
3228 * data/README: New.
3229
3230 2002-10-21 Paul Eggert <eggert@twinsun.com>
3231
3232 Be consistent about 'bool'; the old code used an enum in one
3233 module and an int in another, and this violates the C standard.
3234 * m4/stdbool.m4: New file, from coreutils 4.5.3.
3235 * configure.ac (AC_HEADER_STDBOOL): Add.
3236 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
3237 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
3238 * src/symtab.c (hash_compare_symbol_t): Likewise.
3239 * src/system.h (bool, false, true): Use a definition consistent
3240 with ../lib/hash.c. All uses changed.
3241
3242 * src/complain.c (warning_issued): Renamed from warn_message_count,
3243 so that we needn't worry about integer overflow (!).
3244 Now of type bool. All uses changed.
3245 (complaint_issued): Renamed from complain_message_count; likewise.
3246
3247 * src/main.c (main): Use exit to exit with failure.
3248
3249 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
3250 rather than 1 and 0.
3251 * src/main.c (main): Likewise.
3252 * src/getargs.c (getargs): Likewise.
3253 * src/reader.c (reader): Likewise.
3254
3255 * src/getarg.c (getargs): Remove duplicate code for
3256 "Try `bison --help'".
3257
3258 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
3259 What was that "2" for?
3260
3261 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
3262 * src/getargs.c (usage): Likewise.
3263
3264 * src/getargs.c (getargs): When there are too few operands, report
3265 the last one. When there are too many, report the first extra
3266 one. This is how diffutils does it.
3267
3268 2002-10-20 Paul Eggert <eggert@twinsun.com>
3269
3270 Remove K&R vestiges.
3271 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
3272 * src/complain.c (VA_START): Remove. Assume prototypes.
3273 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
3274 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
3275 fatal): Assume prototypes.
3276 * src/complain.h: Assume prototypes.
3277 * src/system.h (PARAMS): Remove.
3278 Include <limits.h> unconditionally, since it's guaranteeed even
3279 for a freestanding C89 compiler.
3280 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
3281 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
3282
3283 2002-10-20 Akim Demaille <akim@epita.fr>
3284
3285 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
3286 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
3287 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
3288 (yyresolveStates, yyresolveAction, yyresolveStack)
3289 (yyprocessOneStack): Use them.
3290 (yy_reduce_print): New.
3291 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
3292
3293 2002-10-20 Akim Demaille <akim@epita.fr>
3294
3295 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
3296 arguments and output `void'.
3297 (b4_c_function): Rename as...
3298 (b4_c_function_def): this.
3299 (b4_c_function_decl, b4_c_ansi_function_def)
3300 (b4_c_ansi_function_decl): New.
3301 Change the interpretation of the arguments: before `int, foo', now
3302 `int foo, foo'.
3303 * data/yacc.c (yyparse): Prototype and define thanks to these.
3304 Adjust b4_c_function_def uses.
3305 * data/glr.c (yyparse): Likewise, but ANSI only.
3306
3307 2002-10-20 Akim Demaille <akim@epita.fr>
3308
3309 * src/output.c (prepare): Move the definition of `tokens_number',
3310 `nterms_number', `undef_token_number', `user_token_number_max'
3311 to...
3312 (prepare_tokens): Here.
3313 (prepare_tokens): Rename as...
3314 (prepare_symbols): this.
3315 (prepare): Move the definition of `rules_number' to...
3316 (prepare_rules): here.
3317 (prepare): Move the definition of `last', `final_state_number',
3318 `states_number' to...
3319 (prepare_states): here.
3320 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
3321
3322 2002-10-20 Akim Demaille <akim@epita.fr>
3323
3324 * src/tables.h, src/tables.c, src/output.c: Comment changes.
3325
3326 2002-10-20 Akim Demaille <akim@epita.fr>
3327
3328 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
3329 * data/c.m4: here.
3330
3331 2002-10-20 Akim Demaille <akim@epita.fr>
3332
3333 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
3334 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
3335 `pair'.
3336 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
3337 `name' to...
3338 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
3339 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
3340 These.
3341
3342 2002-10-19 Paul Eggert <eggert@twinsun.com>
3343
3344 Do not create a temporary file, as that involves security and
3345 cleanup headaches. Instead, use a pair of pipes.
3346 Derived from a suggestion by Florian Krohm.
3347 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
3348 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
3349 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
3350 (BISON_PREREQ_SUBPIPE): Add.
3351 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
3352 Add subpipe.h, subpipe.c.
3353 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
3354 * po/POTFILES.in: Add lib/subpipe.c.
3355 * src/output.c: Include "subpipe.h".
3356 (m4_invoke): Remove decl.
3357 (scan_skel): New decl.
3358 (output_skeleton): Use pipe rather than temporary file for m4 input.
3359 Check that m4sugar.m4 is readable, to avoid deadlock.
3360 Check for pipe I/O error.
3361 * src/scan-skel.l (readpipe): Remove decl.
3362 (scan_skel): New function, to be used in place of m4_invoke.
3363 Read from stream rather than file.
3364
3365 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
3366 float, as this generates a warning on Solaris 8 + GCC 3.2 with
3367 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
3368 this generates a more-accurate value anyway.
3369
3370 * lib/timevar.c (timervar_accumulate): Rename locals to
3371 avoid confusion with similarly-named more-global.
3372 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
3373
3374 * src/output.c (prepare): Use xstrdup to convert char const *
3375 to char *, to avoid GCC warning.
3376
3377 2002-10-19 Akim Demaille <akim@epita.fr>
3378
3379 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
3380 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
3381 Use them to have `calc.y' ready for %pure-parser.
3382 * data/yacc.c (YYLEX): Pass a yylex return type to
3383 b4_c_function_call.
3384
3385 2002-10-19 Akim Demaille <akim@epita.fr>
3386
3387 Prototype support of %lex-param and %parse-param.
3388
3389 * src/parse-gram.y: Add the definition of the %lex-param and
3390 %parse-param tokens, plus their rules.
3391 Drop the `_' version of %glr-parser.
3392 Add the "," token.
3393 * src/scan-gram.l (INITIAL): Scan them.
3394 * src/muscle_tab.c: Comment changes.
3395 (muscle_insert, muscle_find): Rename `pair' as `probe'.
3396 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
3397 (muscle_entry_s): The `value' member is no longer const.
3398 Adjust all dependencies.
3399 * src/muscle_tab.c (muscle_init): Adjust: use
3400 MUSCLE_INSERT_STRING.
3401 Initialize the obstack earlier.
3402 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
3403 (muscle_pair_list_grow): New.
3404 * data/c.m4 (b4_c_function_call, b4_c_args): New.
3405 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
3406 * tests/calc.at: Use %locations, not --locations.
3407 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
3408
3409 2002-10-19 Akim Demaille <akim@epita.fr>
3410
3411 * src/getargs.c (usage): Take status as argument and exit
3412 accordingly.
3413 Report the traditional `Try ... --help' message when status != 0.
3414 (usage, version): Don't take a FILE * as arg, it is pointless.
3415 (getargs): When there is an incorrect number of arguments, make it
3416 an error, and report it GNUlically thanks to `usage ()'.
3417
3418 2002-10-18 Paul Eggert <eggert@twinsun.com>
3419
3420 * data/glr.c (yyreportParseError): Don't assume that sprintf
3421 yields the length of the printed string, as this is not true
3422 on SunOS 4.1.4. Reported by Peter Klein.
3423
3424 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
3425 * tests/conflicts.at (%nonassoc and eof): Likewise.
3426 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
3427
3428 2002-10-17 Akim Demaille <akim@epita.fr>
3429
3430 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
3431 * src/getargs.c (trace_types, trace_args): Adjust.
3432 * src/reader.c (grammar_current_rule_prec_set)
3433 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
3434 Standardize error messages.
3435 And s/@prec/%prec/!
3436 (reader): Use trace_flag to enable scanner/parser debugging,
3437 instead of an adhoc scheme.
3438 * src/scan-gram.l: Remove trailing debugging code.
3439
3440 2002-10-16 Paul Eggert <eggert@twinsun.com>
3441
3442 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
3443 MUSCLE_TAB_H.
3444
3445 * NEWS: Officially drop support for building Bison with K&R C,
3446 since it didn't work anyway and it's not worth worrying about.
3447 * Makefile.maint (wget_files): Remove ansi2knr.c.
3448 (ansi2knr.c-url_prefix): Remove.
3449 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
3450 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3451 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3452
3453 2002-10-15 Paul Eggert <eggert@twinsun.com>
3454
3455 Stop using the "enum_" trick for K&R-style function definitions;
3456 it confused me, and I was the author! Instead, assume that people
3457 who want to use K&R C compilers (when using these modules in GCC,
3458 perhaps?) will run ansi2knr.
3459
3460 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
3461 All uses of "enum_" changed to "enum ".
3462 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3463 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3464
3465 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
3466 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
3467 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
3468 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
3469 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
3470 abitset_not, abitset_ones, abitset_or, abitset_or_and,
3471 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
3472 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
3473 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
3474 Use function prototypes; this removes the need for declaring
3475 static functions simply to provide their prototypes.
3476 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
3477 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
3478 bitset_count_, bitset_create, bitset_dump, bitset_first,
3479 bitset_free, bitset_init, bitset_last, bitset_next,
3480 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
3481 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
3482 bitset_print, bitset_release_memory, bitset_toggle_,
3483 bitset_type_choose, bitset_type_get, bitset_type_name_get,
3484 debug_bitset): Likewise.
3485 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
3486 * lib/bitset_stats.c (bitset_log_histogram_print,
3487 bitset_percent_histogram_print, bitset_stats_and,
3488 bitset_stats_and_cmp, bitset_stats_and_or,
3489 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
3490 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
3491 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
3492 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
3493 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
3494 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
3495 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
3496 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
3497 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
3498 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
3499 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
3500 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
3501 bitset_stats_zero): Likewise.
3502 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3503 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3504 bitsetv_dump, debug_bitsetv): Likewise.
3505 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
3506 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
3507 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
3508 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
3509 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
3510 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
3511 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
3512 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
3513 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
3514 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
3515 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
3516 Likewise.
3517 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
3518 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
3519 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
3520 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
3521 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
3522 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
3523 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
3524 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
3525 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
3526 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
3527 lbitset_xor_cmp, lbitset_zero): Likewise.
3528
3529 2002-10-14 Akim Demaille <akim@epita.fr>
3530
3531 Version 1.75.
3532
3533 2002-10-14 Akim Demaille <akim@epita.fr>
3534
3535 * tests/Makefile.am (maintainer-check-posix): New.
3536
3537 2002-10-14 Akim Demaille <akim@epita.fr>
3538
3539 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
3540 member.
3541
3542 2002-10-14 Akim Demaille <akim@epita.fr>
3543
3544 * src/tables.c (table_ninf_remap): base -> tab.
3545 Reported by Matt Rosing.
3546
3547 2002-10-14 Paul Eggert <eggert@twinsun.com>
3548
3549 * tests/action.at, tests/calc.at, tests/conflicts.at,
3550 tests/cxx-type.at, tests/headers.at, tests/input.at,
3551 tests/regression.at, tests/synclines.at, tests/torture.at:
3552 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
3553 so that the tests still work even if POSIXLY_CORRECT is set.
3554 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
3555
3556 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
3557 for portability to K&R hosts. Fix typo: signed char is guaranteed
3558 only to 127, not to 128.
3559 * data/glr.c (yysigned_char): New type.
3560 * data/yacc.c (yysigned_char): Likewise.
3561 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
3562
3563 2002-10-13 Paul Eggert <eggert@twinsun.com>
3564
3565 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
3566 true due to limited range of data type" warning from GCC.
3567
3568 * data/c.m4 (b4_token_defines): Protect against double-inclusion
3569 by wrapping enum yytokentype's definition inside #ifndef
3570 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
3571
3572 2002-10-13 Akim Demaille <akim@epita.fr>
3573
3574 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
3575 Un yy- yyrhs to avoid the name clash with the global YYRHS.
3576
3577 2002-10-13 Akim Demaille <akim@epita.fr>
3578
3579 * Makefile.maint: Update from Autoconf 2.54.
3580 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
3581
3582 2002-10-13 Akim Demaille <akim@epita.fr>
3583
3584 * src/print.c (print_state): Separate the list of solved conflicts
3585 from the other items.
3586 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
3587
3588 2002-10-13 Akim Demaille <akim@epita.fr>
3589
3590 Let nondeterministic skeletons be usable with deterministic
3591 tables.
3592
3593 With the patch, GAWK compiled by GCC without -O2 passes its test
3594 suite using a GLR parser driven by LALR tables. It fails with -O2
3595 because `struct stat' gives two different answers on my machine:
3596 88 (definition of an auto var) and later 96 (memset on this var).
3597 Hence the stack is badly corrumpted. The headers inclusion is to
3598 blame: if I move the awk.h inclusion before GLR's system header
3599 inclusion, the two struct stat have the same size.
3600
3601 * src/tables.c (pack_table): Always create conflict_table.
3602 (token_actions): Always create conflict_list.
3603 * data/glr.c (YYFLAG): Remove, unused.
3604
3605 2002-10-13 Akim Demaille <akim@epita.fr>
3606
3607 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
3608 (O0FLAGS): New.
3609 (VALGRIND, GXX): New.
3610 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
3611 * tests/bison.in: Run $PREBISON a pre-command.
3612 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
3613 (maintainer-check-g++): New.
3614 * Makefile.am (maintainer-check): New.
3615
3616 2002-10-13 Akim Demaille <akim@epita.fr>
3617
3618 * data/glr.c: Formatting changes.
3619 Tweak some trace messages to match yacc.c's.
3620
3621 2002-10-13 Akim Demaille <akim@epita.fr>
3622
3623 GLR parsers sometimes raise parse errors instead of performing the
3624 default reduction.
3625 Reported by Charles-Henry de Boysson.
3626
3627 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
3628 check the length of the traces when %glr.
3629 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
3630 GLR's traces.
3631 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
3632 Test GLR parsers.
3633 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
3634 (yyltype): Remove the yy prefix from the member names.
3635 (yytable): Complete its comment.
3636 (yygetLRActions): Map error action number from YYTABLE from
3637 YYTABLE_NINF to 0.
3638 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
3639 (which was a bug: it should have been YYTABEL_NINF, and yet it was
3640 not satisfying as we could compare an YYACTION computed from
3641 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
3642 only value for error actions.
3643 (yyreportParseError): In verbose parse error messages, don't issue
3644 `error' in the list of expected tokens.
3645 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
3646 next action to perform to match glr.c's decoding.
3647 (yytable): Complete its comment.
3648
3649 2002-10-13 Paul Eggert <eggert@twinsun.com>
3650
3651 Fix problem reported by Henrik Grubbstroem in
3652 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
3653 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
3654 because the Bison parser reads the second action before reducing
3655 the first one.
3656 * src/scan-gram.l (rule_length): New static var.
3657 Use it to keep track of the rule length in the scanner, since
3658 we can't expect the parser to be in lock-step sync with the scanner.
3659 (handle_action_dollar, handle_action_at): Use this var.
3660 * tests/actions.at (Exotic Dollars): Test for the problem.
3661
3662 2002-10-12 Paul Eggert <eggert@twinsun.com>
3663
3664 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
3665 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
3666 Include <sys/time.h> when checking for clock_t and struct tms.
3667 Use same include order as source.
3668 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
3669 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
3670
3671 * lib/timevar.c: Update copyright date and clarify comments.
3672 (get_time) [IN_GCC]: Keep the GCC version for reference.
3673
3674 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
3675 GCC version as of today, then merge Bison's changes.
3676 Change "GCC" to "Bison" in copyright notice. timevar.def's
3677 author is Akim, so change that too.
3678
3679 * src/reader.c (grammar_current_rule_check):
3680 Don't worry about the default action if $$ is untyped.
3681 Prevents bogus warnings reported by Jim Gifford in
3682 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
3683
3684 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
3685 * data/glr.c, data/lalr1.cc, data/yacc.c:
3686 Output token definitions before the first part of user declarations.
3687 Fixes compatibility problem reported by Jim Gifford for kbd in
3688 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
3689
3690 2002-10-11 Paul Eggert <eggert@twinsun.com>
3691
3692 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
3693 (yyparse): here. This undoes some of the 2002-07-25 change.
3694 Compatibility problem reported by Ralf S. Engelschall with
3695 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
3696
3697 2002-10-11 Akim Demaille <akim@epita.fr>
3698
3699 * tests/regression.at Characters Escapes): New.
3700 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
3701 characters.
3702 Reported by Jan Nieuwenhuizen.
3703
3704 2002-10-11 Akim Demaille <akim@epita.fr>
3705
3706 * po/id.po: New.
3707
3708 2002-10-10 Paul Eggert <eggert@twinsun.com>
3709
3710 Portability fixes for bitsets; this also avoids several GCC
3711 warnings.
3712
3713 * lib/abitset.c: Include <stddef.h>, for offsetof.
3714 * lib/lbitset.c: Likewise.
3715
3716 * lib/abitset.c (abitset_bytes): Return a size that is aligned
3717 properly for vectors of objects. Do not assume that adding a
3718 header size to a multiple of a word size yields a value that is
3719 properly aligned for the whole union.
3720 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3721
3722 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3723 unique names for structures.
3724 * lib/ebitset.c (ebitset_bytes): Likewise.
3725 * lib/lbitset.c (lbitset_bytes): Likewise.
3726
3727 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3728 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3729 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3730 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3731 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3732 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3733 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3734 to improve the type-checking that GCC can do.
3735 * lib/bitset.c (bitset_op4_cmp): Likewise.
3736 * lib/bitset_stats.c (bitset_stats_count,
3737 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3738 bitset_stats_copy, bitset_stats_disjoint_p,
3739 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3740 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3741 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3742 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3743 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3744 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3745 bitset_stats_or_and_cmp): Likewise.
3746 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3747 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3748 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3749 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3750
3751 * lib/abitset.h: Include bitset.h, not bbitset.h.
3752 * lib/ebitset.h: Likewise.
3753 * lib/lbitset.h: Likewise.
3754
3755 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3756 All instances of parameters of type enum bitset_opts are now of
3757 type enum_bitset_opts, to conform to the C Standard, and similarly
3758 for enum_bitset_type.
3759 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3760 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3761
3762 Do not use "struct bitset_struct" to mean different things in
3763 different modules. Not only is this confusing, it violates
3764 the C Standard, which requires that structure types in different
3765 modules must be compatible if one is to be passed to the other.
3766 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3767 All instances of "struct bitset_struct *" replaced with "bitset".
3768 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3769 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3770 struct lbitset_struct, struct bitset_stats_struct): New types.
3771 All uses of struct bitset_struct changed to union bitset_union,
3772 etc.
3773 * lib/abitset.c (struct abitset_struct, abitset,
3774 struct bitset_struct): Remove.
3775 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3776 struct bitset_struct): Remove.
3777 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3778 bitset_struct): Remove.
3779 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3780 Likewise.
3781
3782 Do not call a function of type T using a call that assumes the
3783 function is of a different type U. Standard C requires that a
3784 function must be called with a type that is compatible with its
3785 definition.
3786 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3787 New decls.
3788 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3789 New functions.
3790 * lib/ebitset.c (PFV): Remove.
3791 * lib/lbitset.c (PFV): Likewise.
3792 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3793 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3794 decls.
3795 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3796 (ebitset_vtable): Use them.
3797 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3798 lbitset_xor): New functions.
3799 (lbitset_vtable): Use them.
3800
3801 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3802 Declare.
3803
3804 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3805 GCC warning.
3806 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
3807 Use offsetof, for simplicity.
3808
3809 2002-10-06 Paul Eggert <eggert@twinsun.com>
3810
3811 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
3812 the same width as int. This reapplies a hunk of the 2002-08-12 patch
3813 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
3814 which was inadvertently undone by the 2002-09-30 patch.
3815 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
3816 the same width as int.
3817
3818 2002-10-04 Paul Eggert <eggert@twinsun.com>
3819
3820 Version 1.50.
3821
3822 * configure.ac (AC_INIT), NEWS: Increment version number.
3823
3824 * doc/bison.texinfo: Minor spelling, grammar, and white space
3825 fixes.
3826 (Symbols): Mention that any negative value returned from yylex
3827 signifies end-of-input. Warn about negative chars. Mention
3828 the portable Standard C character set.
3829
3830 The GNU coding standard says CFLAGS and YFLAGS are reserved
3831 for the installer to set.
3832 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
3833 * src/Makefile.am (AM_CFLAGS): Likewise.
3834 (AM_YFLAGS): Renamed from YFLAGS.
3835
3836 Fix some MAX and MIN problems.
3837 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
3838 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
3839 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
3840 * src/reader.c (reader): Use it.
3841
3842 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
3843 POSIX 1003.1-2001 has removed fgrep.
3844
3845 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3846
3847 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
3848 interpreted as signed.
3849 * lib/ebitset.c (ebitset_list): Fix bug.
3850
3851 2002-10-01 Paul Eggert <eggert@twinsun.com>
3852
3853 More fixes for 64-bit hosts and large bitsets.
3854
3855 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
3856 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
3857 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
3858 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
3859 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
3860 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
3861 bitset_count_): Likewise.
3862 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
3863 bitset_first, bitset_last): Likewise.
3864 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
3865 bitset_stats_list_reverse, bitset_stats_size,
3866 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
3867 Likewise.
3868 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3869 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3870 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3871 bitsetv_reflexive_transitive_closure): Likewise.
3872 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
3873 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
3874 Likewise.
3875 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
3876 Likewise.
3877
3878 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
3879 Use size_t, not unsigned int, to count bytes.
3880 * lib/abitset.h (abitset_bytes): Likewise.
3881 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
3882 Likewise.
3883 * lib/bitset.h (bitset_bytes): Likewise.
3884 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
3885 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
3886 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3887 * lib/ebitset.c (ebitset_bytes): Likewise.
3888 * lib/ebitset.h (ebitset_bytes): Likewise.
3889 * lib/lbitset.c (lbitset_bytes): Likewise.
3890 * lib/lbitset.h (lbitset_bytes): Likewise.
3891
3892 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
3893 abitset_subset_p, abitset_disjoint_p, abitset_and,
3894 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
3895 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
3896 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
3897 abitset_or_and, abitset_or_and_cmp):
3898 Use bitset_windex instead of unsigned int.
3899 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3900 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
3901 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
3902 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
3903 Likewise.
3904 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
3905
3906 * lib/bitset.c (bitset_print):
3907 Use proper printf formats for widths of integer types.
3908 * lib/bitset_stats.c (bitset_percent_histogram_print,
3909 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
3910 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3911 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3912 * lib/lbitset.c (lbitset_bytes): Likewise.
3913
3914 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
3915 BITSET_SIZE_MAX): New macros.
3916 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
3917 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
3918 to BITSET_WINDEX_MAX.
3919
3920 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
3921 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
3922 since we now return the bitset_bindex type (not int).
3923
3924 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
3925 when computing sizes.
3926 * lib/ebitset.c (ebitset_elts_grow): Likewise.
3927
3928 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
3929 and avoid cast to unsigned.
3930
3931 2002-09-30 Akim Demaille <akim@epita.fr>
3932
3933 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3934 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
3935 Updates from Michael Hayes.
3936
3937 2002-09-30 Art Haas <ahaas@neosoft.com>
3938
3939 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
3940 invocations.
3941 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
3942 defined.
3943
3944 2002-09-27 Akim Demaille <akim@epita.fr>
3945
3946 Version 1.49c.
3947
3948 2002-09-27 Akim Demaille <akim@epita.fr>
3949
3950 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
3951 (Because of AC_LIBSOURCE).
3952
3953 2002-09-27 Akim Demaille <akim@epita.fr>
3954
3955 Playing with Autoscan.
3956
3957 * configure.ac: Remove the old LIBOBJ tweaks.
3958 (AC_REPLACE_FUNCS): Add strrchr and strtol.
3959 * lib/strrchr.c: New.
3960 * lib/strtol.c: New, from the Coreutils 4.5.1.
3961
3962 2002-09-27 Akim Demaille <akim@epita.fr>
3963
3964 Playing with Autoscan.
3965
3966 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
3967 * lib/Makefile.am (libbison_a_SOURCES): No longer include
3968 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
3969 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
3970 Coreutils 4.5.1.
3971
3972 2002-09-24 Akim Demaille <akim@epita.fr>
3973
3974 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
3975 (Frequently Asked Questions, Parser Stack Overflow): New.
3976
3977 2002-09-13 Akim Demaille <akim@epita.fr>
3978
3979 Playing with autoscan.
3980
3981 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
3982 * src/files.c (skeleton_find): Remove, unused.
3983 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
3984 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
3985
3986 2002-09-13 Akim Demaille <akim@epita.fr>
3987
3988 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
3989 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
3990
3991 2002-09-13 Akim Demaille <akim@epita.fr>
3992
3993 * configure.ac: Require 2.54.
3994 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
3995 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
3996 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
3997 Remove, provided by Autoconf macros.
3998
3999 2002-09-12 Akim Demaille <akim@epita.fr>
4000
4001 * m4/prereq.m4: Update, from Coreutils 4.5.1.
4002
4003 2002-09-12 Akim Demaille <akim@epita.fr>
4004
4005 * m4/prereq.m4: Update, from Fileutils 4.1.5.
4006 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
4007 Reported by Martin Mokrejs.
4008
4009 2002-09-10 Akim Demaille <akim@epita.fr>
4010
4011 * src/parse-gram.y: Associate a human readable string to each
4012 token type.
4013 * tests/regression.at (Invalid inputs): Adjust.
4014
4015 2002-09-10 Gary V. Vaughan <gary@gnu.org>
4016
4017 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
4018 with an Autoconf-2.5x style configure.ac.
4019
4020 2002-09-06 Paul Eggert <eggert@twinsun.com>
4021
4022 * doc/bison.texinfo (Conditions): Make explicit that the GPL
4023 exception applies only to yacc.c. This is a modification of a
4024 patch originally suggested by Akim Demaille.
4025
4026 2002-09-06 Akim Demaille <akim@epita.fr>
4027
4028 * data/c.m4 (b4_copyright): Move the GPL exception comment from
4029 here to...
4030 * data/yacc.c: here.
4031
4032 * data/lalr1.cc (struct yyltype): Don't define it, since we use
4033 LocationType.
4034 (b4_ltype): Default to yy::Location from location.hh.
4035
4036 2002-09-04 Jim Meyering <jim@meyering.net>
4037
4038 * data/yacc.c: Guard the declaration of yytoknum also with
4039 `#ifdef YYPRINT', so it is declared only when used.
4040
4041 2002-09-04 Akim Demaille <akim@epita.fr>
4042
4043 * configure.in: Rename as...
4044 * configure.ac: this.
4045 Bump to 1.49c.
4046
4047 2002-09-04 Akim Demaille <akim@epita.fr>
4048
4049 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
4050 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
4051 translate maintainer only messages.
4052
4053 2002-08-12 Paul Eggert <eggert@twinsun.com>
4054
4055 Version 1.49b.
4056
4057 * Makefile.am (SUBDIRS): Remove intl.
4058 (DISTCLEANFILES): Remove.
4059 * NEWS: Mention that GNU M4 is now required. Clarify what is
4060 meant by "larger grammars". Mention the pt_BR translation.
4061 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
4062 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
4063 Bump version from 0.11.2 to 0.11.5.
4064 (BISON_PREREQ_STAGE): Remove.
4065 (AM_GNU_GETTEXT): Use external gettext.
4066 (AC_OUTPUT): Remove intl/Makefile.
4067
4068 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
4069
4070 * data/glr.c: Include string.h, for strlen.
4071 (yyreportParseError): Use size_t for yysize.
4072 (yy_yypstack): No longer nested inside yypstates, as nested
4073 functions are not portable. Do not assume size_t is the
4074 same width as int.
4075 (yypstates): Do not assume that ptrdiff_t is the same width
4076 as int, and similarly for yyposn and YYINDEX.
4077
4078 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
4079
4080 * lib/Makefile.am (INCLUDES): Do not include from the intl
4081 directory, which has been removed.
4082 * src/Makefile.am (INCLUDES): Likewise.
4083
4084 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
4085 (bitsets_sources, additional_bitsets_sources, timevars_sources):
4086 New vars.
4087
4088 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
4089 * tests/Makefile.am (EXTRA_DIST): Likewise.
4090
4091 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
4092 Do not assume that bitset_windex is the same width as unsigned.
4093
4094 * lib/abitset.c (abitset_unused_clear): Do not assume that
4095 bitset_word is the same width as int.
4096 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
4097 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
4098 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
4099 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
4100 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
4101
4102 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
4103 portability to one's complement hosts!).
4104 * lib/ebitset.c (ebitset_op1): Likewise.
4105 * lib/lbitset.c (lbitset_op1): Likewise.
4106
4107 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
4108 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4109 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
4110 Sync with fileutils.
4111 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
4112 lib/gettext.h: Sync with diffutils.
4113
4114 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
4115 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
4116
4117 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
4118 PROTOTYPES to check for prototypes, and "defined __STDC__" to
4119 check for void *.
4120
4121 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
4122 size_t; the old version tried to do this but casted improperly.
4123 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
4124 (bitset_test): Now returns int, not unsigned long.
4125
4126 * lib/bitset_stats.c: Include "gettext.h".
4127 (_): New macro.
4128 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
4129 name locals "index", as it generates unnecessary warnings on some
4130 hosts that have an "index" function.
4131
4132 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
4133 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
4134 they need translation.
4135 * src/LR0.c (state_list_append, new_itemsets, get_state,
4136 append_states, generate_states): Likewise.
4137 * src/assoc.c (assoc_to_string): Likewise.
4138 * src/closure.c (print_closure, set_firsts, closure): Likewise.
4139 * src/gram.c (grammar_dump): Likewise.
4140 * src/injections.c (injections_compute): Likewise.
4141 * src/lalr.c (lookaheads_print): Likewise.
4142 * src/relation.c (relation_transpose): Likewise.
4143 * src/scan-gram.l: Likewise.
4144 * src/tables.c (table_grow, pack_vector): Likewise.
4145
4146 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
4147 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
4148 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
4149 * m4/mbstate_t.m4: Sync with fileutils.
4150 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
4151
4152 * po/LINGUAS: Add pt_BR.
4153 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
4154 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
4155 lib/timevar.c.
4156 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
4157 manual recommends.
4158 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
4159
4160 * src/complain.c (strerror_r): Remove decl; not needed.
4161 (strerror): Use same pattern as ../lib/error.c.
4162
4163 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
4164
4165 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
4166
4167 * src/main.c (main): Cast result of bindtextdomain and textdomain
4168 to void, to avoid a GCC warning when --disable-nls is in effect.
4169
4170 * src/scan-gram.l: Use strings rather than escapes when possible,
4171 to minimize the number of warnings from xgettext.
4172 (handle_action_dollar, handle_action_at): Don't use isdigit,
4173 as it mishandles negative chars and it may not work as expected
4174 outside the C locale.
4175
4176 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
4177 this is a GCC extension and is not portable to other compilers.
4178
4179 * src/system.h (alloca): Use same pattern as ../lib/error.c.
4180 Do not include <ctype.h>; no longer needed.
4181 Do not include <malloc.h>; no longer needed (and generates
4182 warnings on OpenBSD 3.0).
4183
4184 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
4185 it's not portable.
4186
4187 * tests/regression.at: Do not use 'cc -c input.c -o input';
4188 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
4189
4190 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
4191 exit status as failure, not just exit status 1. Sun C exits
4192 with status 2 sometimes.
4193
4194 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
4195 Use it for the two large tests.
4196
4197 2002-08-02 Akim Demaille <akim@epita.fr>
4198
4199 * src/conflicts.c (conflicts_output): Don't output rules never
4200 reduced here, since anyway that computation doesn't work.
4201 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
4202 (rule_useless_p, rule_never_reduced_p): New.
4203 (grammar_rules_partial_print): Use a filter instead of a range.
4204 Display the title only if needed.
4205 (grammar_rules_print): Adjust.
4206 (grammar_rules_never_reduced_report): New.
4207 * src/tables.c (action_row): Move the computation of rules never
4208 reduced to...
4209 (token_actions): here.
4210 * src/main.c (main): Make the parser before making the report, so
4211 that rules never reduced are computed.
4212 Call grammar_rules_never_reduced_report.
4213 * src/print.c (print_results): Report rules never reduced.
4214 * tests/conflicts.at, tests/reduce.at: Adjust.
4215
4216 2002-08-01 Akim Demaille <akim@epita.fr>
4217
4218 Instead of attaching lookaheads and duplicating the rules being
4219 reduced by a state, attach the lookaheads to the reductions.
4220
4221 * src/state.h (state_t): Remove the `lookaheads',
4222 `lookaheads_rule' member.
4223 (reductions_t): Add a `lookaheads' member.
4224 Use a regular array for the `rules'.
4225 * src/state.c (reductions_new): Initialize the lookaheads member
4226 to 0.
4227 (state_rule_lookaheads_print): Adjust.
4228 * src/state.h, src/state.c (state_reductions_find): New.
4229 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
4230 (count_rr_conflicts): Adjust.
4231 * src/lalr.c (LArule): Remove.
4232 (add_lookback_edge): Adjust.
4233 (state_lookaheads_count): New.
4234 (states_lookaheads_initialize): Merge into...
4235 (initialize_LA): this.
4236 (lalr_free): Adjust.
4237 * src/main.c (main): Don't free nullable and derives too early: it
4238 is used by --verbose.
4239 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
4240
4241 2002-08-01 Akim Demaille <akim@epita.fr>
4242
4243 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
4244 `rule_number_t**'.
4245 (set_derives, free_derives): Rename as...
4246 (derives_compute, derives_free): this.
4247 Adjust all dependencies.
4248 * src/nullable.c (set_nullable, free_nullable): Rename as...
4249 (nullable_compute, nullable_free): these.
4250 (rule_list_t): Store rule_t *, not rule_number_t.
4251 * src/state.c (state_rule_lookaheads_print): Directly compare rule
4252 pointers, instead of their numbers.
4253 * src/main.c (main): Call nullable_free, and derives_free earlier,
4254 as they were lo longer used.
4255
4256 2002-08-01 Akim Demaille <akim@epita.fr>
4257
4258 * lib/timevar.c (get_time): Include children time.
4259 * src/lalr.h (LA, LArule): Don't export them: used with the
4260 state_t.
4261 * src/lalr.c (LA, LArule): Static.
4262 * src/lalr.h, src/lalr.c (lalr_free): New.
4263 * src/main.c (main): Call it.
4264 * src/tables.c (pack_vector): Check whether loc is >= to the
4265 table_size, not >.
4266 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
4267 (tables_generate): do it, since that's also it which allocates
4268 them.
4269 Don't free LA and LArule, main does.
4270
4271 2002-07-31 Akim Demaille <akim@epita.fr>
4272
4273 Separate parser tables computation and output.
4274
4275 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
4276 (conflict_list, conflict_list_cnt, table, check, table_ninf)
4277 (yydefgoto, yydefact, high): Move to...
4278 * src/tables.h, src/tables.c: here.
4279 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4280 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4281 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
4282 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
4283 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
4284 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
4285 (action_row, save_row, token_actions, save_column, default_goto)
4286 (goto_actions, sort_actions, matching_state, pack_vector)
4287 (table_ninf_remap, pack_table, prepare_actions): Move to...
4288 * src/tables.c: here.
4289 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
4290 * src/output.c (token_actions, output_base, output_conflicts)
4291 (output_check): Merge into...
4292 (prepare_actions): this.
4293 (actions_output): Rename as...
4294 (user_actions_output): this.
4295 * src/main.c (main): Call tables_generate and tables_free.
4296
4297 2002-07-31 Akim Demaille <akim@epita.fr>
4298
4299 Steal GCC's --time-report support.
4300
4301 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
4302 stolen/adjusted from GCC.
4303 * m4/stage.m4: Remove time related checks.
4304 * m4/timevar.m4: New.
4305 * configure.in: Adjust.
4306 * src/system.h: Adjust to using timevar.h.
4307 * src/getargs.h, src/getargs.c: Support trace_time for
4308 --trace=time.
4309 * src/main.c (stage): Remove.
4310 (main): Replace `stage' invocations with timevar calls.
4311 * src/output.c: Insert pertinent timevar calls.
4312
4313 2002-07-31 Akim Demaille <akim@epita.fr>
4314
4315 Let --trace have arguments.
4316
4317 * src/getargs.h (enum trace_e): New.
4318 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
4319 (long_options, short_options): --trace/-T takes an optional
4320 argument.
4321 Change all the uses of trace_flag to reflect the new flags.
4322 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
4323
4324 Strengthen `stage' portability.
4325
4326 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
4327 * configure.in: Use it.
4328 Don't check for malloc.h and sys/times.h.
4329 * src/system.h: Include them when appropriate.
4330 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
4331 times and struct tms are available.
4332
4333 2002-07-30 Akim Demaille <akim@epita.fr>
4334
4335 In verbose parse error message, don't report `error' as an
4336 expected token.
4337 * tests/actions.at (Printers and Destructors): Adjust.
4338 * tests/calc.at (Calculator $1): Adjust.
4339 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
4340 error message, do not report the parser accepts the error token in
4341 that state.
4342
4343 2002-07-30 Akim Demaille <akim@epita.fr>
4344
4345 Normalize conflict related messages.
4346
4347 * src/complain.h, src/complain.c (warn, complain): New.
4348 * src/conflicts.c (conflicts_print): Use them.
4349 (conflict_report_yacc): New, extracted from...
4350 (conflicts_print): here.
4351 * tests/conflicts.at, tests/existing.at: Adjust.
4352
4353 2002-07-30 Akim Demaille <akim@epita.fr>
4354
4355 Report rules which are never reduced by the parser: those hidden
4356 by conflicts.
4357
4358 * src/LR0.c (save_reductions): Don't make the final state too
4359 different: save its reduction (accept) instead of having a state
4360 without any action (no shift or goto, no reduce).
4361 Note: the final state is now a ``regular'' state, i.e., the
4362 parsers now contain `reduce 0' as default reduction.
4363 Nevertheless, since they decide to `accept' when yystate =
4364 final_state, they still will not reduce rule 0.
4365 * src/print.c (print_actions, print_reduction): Adjust.
4366 * src/output.c (action_row): Track reduced rules.
4367 (token_actions): Report rules never reduced.
4368 * tests/conflicts.at, tests/regression.at: Adjust.
4369
4370 2002-07-30 Akim Demaille <akim@epita.fr>
4371
4372 `stage' was accidently included in a previous patch.
4373 Initiate its autoconfiscation.
4374
4375 * configure.in: Look for malloc.h and sys/times.h.
4376 * src/main.c (stage): Adjust.
4377 Report only when trace_flag.
4378
4379 2002-07-29 Akim Demaille <akim@epita.fr>
4380
4381 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
4382 state_number_t.
4383 (errs_t): symbol_t*, not symbol_number_t.
4384 (reductions_t): rule_t*, not rule_number_t.
4385 (FOR_EACH_SHIFT): New.
4386 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
4387 * src/print.c, src/print_graph.c: Adjust.
4388
4389 2002-07-29 Akim Demaille <akim@epita.fr>
4390
4391 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
4392
4393 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
4394 (endtoken, accept): these.
4395 * src/reader.c (reader): Set endtoken's default tag to "$end".
4396 Set undeftoken's tag to "$undefined" instead of "$undefined.".
4397 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
4398 Adjust.
4399
4400 2002-07-29 Akim Demaille <akim@epita.fr>
4401
4402 * src/reduce.c (reduce_grammar): When the language is empty,
4403 complain about the start symbol, not the axiom.
4404 Use its location.
4405 * tests/reduce.at (Empty Language): New.
4406
4407 2002-07-26 Akim Demaille <akim@epita.fr>
4408
4409 * src/reader.h, src/reader.c (gram_error): ... can't get
4410 yycontrol without making too strong assumptions on the parser
4411 itself.
4412 * src/output.c (prepare_tokens): Use the real 0th value of
4413 token_translations instead of `0'.
4414 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
4415 visible here.
4416 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
4417 for the time being: %locations ought to provide it to yyerror.
4418
4419 2002-07-25 Akim Demaille <akim@epita.fr>
4420
4421 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
4422 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
4423 * tests/regression.at (Web2c Actions): Adjust.
4424
4425 2002-07-25 Akim Demaille <akim@epita.fr>
4426
4427 Stop storing rules from 1 to nrules + 1.
4428
4429 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
4430 * src/nullable.c, src/output.c, src/print.c, src/reader.c
4431 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
4432 Iterate from 0 to nrules.
4433 Use rule_number_as_item_number and item_number_as_rule_number.
4434 Adjust to `derive' now containing possibly 0.
4435 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
4436 Handle the `- 1' part in rule numbers from/to item numbers.
4437 * src/conflicts.c (log_resolution): Fix the message which reversed
4438 shift and reduce.
4439 * src/output.c (action_row): Initialize default_rule to -1.
4440 (token_actions): Adjust.
4441 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
4442 expected output.
4443 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
4444
4445 2002-07-25 Akim Demaille <akim@epita.fr>
4446
4447 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
4448 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
4449 (b4_c_knr_arg_decl): New.
4450 * data/yacc.c: Use it to define yysymprint, yydestruct, and
4451 yyreport_parse_error.
4452
4453 2002-07-25 Akim Demaille <akim@epita.fr>
4454
4455 * data/yacc.c (yyreport_parse_error): New, extracted from...
4456 (yyparse): here.
4457 (yydestruct, yysymprint): Move above yyparse.
4458 Be K&R compliant.
4459
4460 2002-07-25 Akim Demaille <akim@epita.fr>
4461
4462 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
4463 replace...
4464 (b4_sint_type, b4_uint_type): these.
4465 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
4466 * tests/regression.at (Web2c Actions): Adjust.
4467
4468 2002-07-25 Akim Demaille <akim@epita.fr>
4469
4470 * src/gram.h (TIEM_NUMBER_MAX): New.
4471 (item_number_of_rule_number, rule_number_of_item_number): Rename
4472 as...
4473 (rule_number_as_item_number, item_number_as_rule_number): these.
4474 Adjust dependencies.
4475 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4476 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4477 (symbol_number_to_vector_number): New.
4478 (order): Of vector_number_t* type.
4479 (base_t, BASE_MAX, BASE_MIN): New.
4480 (froms, tos, width, pos, check): Of base_t type.
4481 (action_number_t, ACTION_MIN, ACTION_MAX): New.
4482 (actrow): Of action_number_t type.
4483 (conflrow): Of unsigned int type.
4484 (table_ninf, base_ninf): New.
4485 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
4486 (muscle_insert_int_table, muscle_insert_base_table)
4487 (muscle_insert_rule_number_table): New.
4488 (prepare_tokens): Output `toknum' as int_table.
4489 (action_row): Returns a rule_number_t.
4490 Use ACTION_MIN, not SHRT_MIN.
4491 (token_actions): yydefact is rule_number_t*.
4492 (table_ninf_remap): New.
4493 (pack_table): Use it for `base' and `table'.
4494 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
4495 replaced with...
4496 (YYPACT_NINF, YYTABLE_NINF): these.
4497 (yypact, yytable): Compute their types instead of hard-coded
4498 `short'.
4499 * tests/regression.at (Web2c Actions): Adjust.
4500
4501 2002-07-19 Akim Demaille <akim@epita.fr>
4502
4503 * src/scan-gram.l (id): Can start with an underscore.
4504
4505 2002-07-16 Akim Demaille <akim@epita.fr>
4506
4507 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
4508 Adjust all former `associativity' dependencies.
4509 * src/symtab.c (symbol_new): Default associativity is `undef', not
4510 `right'.
4511 (symbol_check_alias_consistence): Adjust.
4512
4513 2002-07-09 Akim Demaille <akim@epita.fr>
4514
4515 * doc/bison.texinfo: Properly set the ``header'' part.
4516 Use @dircategory ``GNU programming tools'' as per Texinfo's
4517 documentation.
4518 Use @copying.
4519
4520 2002-07-09 Akim Demaille <akim@epita.fr>
4521
4522 * lib/quotearg.h: Protect against multiple inclusions.
4523 * src/location.h (location_t): Add a `file' member.
4524 (LOCATION_RESET, LOCATION_PRINT): Adjust.
4525 * src/complain.c (warn_at, complain_at, fatal_at): Drop
4526 `error_one_per_line' support.
4527
4528 2002-07-09 Akim Demaille <akim@epita.fr>
4529
4530 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
4531 * src/reader.c (lineno): Remove.
4532 Adjust all dependencies.
4533 (get_merge_function): Take a location and use complain_at.
4534 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
4535 * tests/regression.at (Invalid inputs, Mixing %token styles):
4536 Adjust.
4537
4538 2002-07-09 Akim Demaille <akim@epita.fr>
4539
4540 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
4541 recovery rule, and forbid extensions when --yacc.
4542 (gram_error): Use complain_at.
4543 * src/reader.c (reader): Exit if there were parse errors.
4544
4545 2002-07-09 Akim Demaille <akim@epita.fr>
4546
4547 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
4548 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
4549 Reported by R Blake <blakers@mac.com>.
4550
4551 2002-07-09 Akim Demaille <akim@epita.fr>
4552
4553 * data/yacc.c: Output the copyright notive in the header.
4554
4555 2002-07-03 Akim Demaille <akim@epita.fr>
4556
4557 * src/output.c (froms, tos): Are state_number_t.
4558 (save_column): sp, sp1, and sp2 are state_number_t.
4559 (prepare): Rename `final' as `final_state_number', `nnts' as
4560 `nterms_number', `nrules' as `rules_number', `nstates' as
4561 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
4562 unused.
4563 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
4564 * data/lalr1.cc (nsym_): Remove, unused.
4565
4566 2002-07-03 Akim Demaille <akim@epita.fr>
4567
4568 * src/lalr.h, src/lalr.c (goto_number_t): New.
4569 * src/lalr.c (goto_list_t): New.
4570 Propagate them.
4571 * src/nullable.c (rule_list_t): New.
4572 Propagate.
4573 * src/types.h: Remove.
4574
4575 2002-07-03 Akim Demaille <akim@epita.fr>
4576
4577 * src/closure.c (print_fderives): Use rule_rhs_print.
4578 * src/derives.c (print_derives): Use rule_rhs_print.
4579 (rule_list_t): New, replaces `shorts'.
4580 (set_derives): Add comments.
4581 * tests/sets.at (Nullable, Firsts): Adjust.
4582
4583 2002-07-03 Akim Demaille <akim@epita.fr>
4584
4585 * src/output.c (prepare_actions): Free `tally' and `width'.
4586 (prepare_actions): Allocate and free `order'.
4587 * src/symtab.c (symbols_free): Free `symbols'.
4588 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
4589 * src/output.c (m4_invoke): Move to...
4590 * src/scan-skel.l: here.
4591 (<<EOF>>): Close yyout, and free its name.
4592
4593 2002-07-03 Akim Demaille <akim@epita.fr>
4594
4595 Fix some memory leaks, and fix a bug: state 0 was examined twice.
4596
4597 * src/LR0.c (new_state): Merge into...
4598 (state_list_append): this.
4599 (new_states): Merge into...
4600 (generate_states): here.
4601 (set_states): Don't ensure a proper `errs' state member here, do it...
4602 * src/conflicts.c (conflicts_solve): here.
4603 * src/state.h, src/state.c: Comment changes.
4604 (state_t): Rename member `shifts' as `transitions'.
4605 Adjust all dependencies.
4606 (errs_new): For consistency, also take the values as argument.
4607 (errs_dup): Remove.
4608 (state_errs_set): New.
4609 (state_reductions_set, state_transitions_set): Assert that no
4610 previous value was assigned.
4611 (state_free): New.
4612 (states_free): Use it.
4613 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
4614 temporary storage: use `errs' and `nerrs' as elsewhere.
4615 (set_conflicts): Allocate and free this `errs'.
4616
4617 2002-07-02 Akim Demaille <akim@epita.fr>
4618
4619 * lib/libiberty.h: New.
4620 * lib: Update the bitset implementation from upstream.
4621 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
4622 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
4623 * src/main.c: Adjust bitset stats calls.
4624
4625 2002-07-01 Paul Eggert <eggert@twinsun.com>
4626
4627 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
4628 char, so that negative chars don't collide with $.
4629
4630 2002-06-30 Akim Demaille <akim@epita.fr>
4631
4632 Have the GLR tests be `warning' checked, and fix the warnings.
4633
4634 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
4635 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
4636 (yyremoveDeletes): `yyi' and `yyj' are size_t.
4637 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
4638 (yyaddDeferredAction): static.
4639 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
4640 (yyreportParseError): yyprefix is const.
4641 yytokenp is used only when verbose.
4642 (yy__GNUC__): Replace with __GNUC__.
4643 (yypdumpstack): yyi is size_t.
4644 (yypreference): Un-yy local variables and arguments, to avoid
4645 clashes with `yyr1'. Anyway, we are not in the user name space.
4646 (yytname_size): be an int, as is compared with ints.
4647 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
4648 Use them.
4649 * tests/cxx-gram.at: Use quotation to protect $1.
4650 Use AT_COMPILE to enable warnings hunts.
4651 Prototype yylex and yyerror.
4652 `Use' argc.
4653 Include `string.h', not `strings.h'.
4654 Produce and prototype stmtMerge only when used.
4655 yylex takes a location.
4656
4657 2002-06-30 Akim Demaille <akim@epita.fr>
4658
4659 We spend a lot of time in quotearg, in particular when --verbose.
4660
4661 * src/symtab.c (symbol_get): Store a quoted version of the key.
4662 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
4663 Adjust all callers.
4664
4665 2002-06-30 Akim Demaille <akim@epita.fr>
4666
4667 * src/state.h (reductions_t): Rename member `nreds' as num.
4668 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
4669 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
4670
4671 2002-06-30 Akim Demaille <akim@epita.fr>
4672
4673 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
4674 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
4675 (shifts_to): Rename as...
4676 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
4677 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
4678 (TRANSITION_IS_DISABLED, transitions_to): these.
4679
4680 2002-06-30 Akim Demaille <akim@epita.fr>
4681
4682 * src/print.c (print_shifts, print_gotos): Merge into...
4683 (print_transitions): this.
4684 (print_transitions, print_errs, print_reductions): Align the
4685 lookaheads columns.
4686 (print_core, print_transitions, print_errs, print_state,
4687 print_grammar): Output empty lines separator before, not after.
4688 (state_default_rule_compute): Rename as...
4689 (state_default_rule): this.
4690 * tests/conflicts.at (Defaulted Conflicted Reduction),
4691 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
4692 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
4693
4694 2002-06-30 Akim Demaille <akim@epita.fr>
4695
4696 Display items as we display rules.
4697
4698 * src/gram.h, src/gram.c (rule_lhs_print): New.
4699 * src/gram.c (grammar_rules_partial_print): Use it.
4700 * src/print.c (print_core): Likewise.
4701 * tests/conflicts.at (Defaulted Conflicted Reduction),
4702 (Unresolved SR Conflicts): Adjust.
4703 (Unresolved SR Conflicts): Adjust and rename as...
4704 (Resolved SR Conflicts): this, as was meant.
4705 * tests/regression.at (Web2c Report): Adjust.
4706
4707 2002-06-30 Akim Demaille <akim@epita.fr>
4708
4709 * src/print.c (state_default_rule_compute): New, extracted from...
4710 (print_reductions): here.
4711 Pessimize, but clarify the code.
4712 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
4713
4714 2002-06-30 Akim Demaille <akim@epita.fr>
4715
4716 * src/output.c (action_row): Let default_rule be always a rule
4717 number.
4718
4719 2002-06-30 Akim Demaille <akim@epita.fr>
4720
4721 * src/closure.c (print_firsts, print_fderives, closure):
4722 Use BITSET_EXECUTE.
4723 * src/lalr.c (lookaheads_print): Likewise.
4724 * src/state.c (state_rule_lookaheads_print): Likewise.
4725 * src/print_graph.c (print_core): Likewise.
4726 * src/print.c (print_reductions): Likewise.
4727 * src/output.c (action_row): Likewise.
4728 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4729
4730 2002-06-30 Akim Demaille <akim@epita.fr>
4731
4732 * src/print_graph.c: Use report_flag.
4733
4734 2002-06-30 Akim Demaille <akim@epita.fr>
4735
4736 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4737 to...
4738 * src/relation.h, src/relation.c (traverse, relation_digraph)
4739 (relation_print, relation_transpose): New.
4740
4741 2002-06-30 Akim Demaille <akim@epita.fr>
4742
4743 * src/state.h, src/state.c (shifts_to): New.
4744 * src/lalr.c (build_relations): Use it.
4745
4746 2002-06-30 Akim Demaille <akim@epita.fr>
4747
4748 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4749 (item_number_of_rule_number, rule_number_of_item_number): New.
4750 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4751 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4752 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4753 Propagate their use.
4754 Much remains to be done, in particular wrt `shorts' from types.h.
4755
4756 2002-06-30 Akim Demaille <akim@epita.fr>
4757
4758 * src/symtab.c (symbol_new): Initialize the `printer' member.
4759
4760 2002-06-30 Akim Demaille <akim@epita.fr>
4761
4762 * src/LR0.c (save_reductions): Remove, replaced by...
4763 * src/state.h, src/state.c (state_reductions_set): New.
4764 (reductions, errs): Rename as...
4765 (reductions_t, errs_t): these.
4766 Adjust all dependencies.
4767
4768 2002-06-30 Akim Demaille <akim@epita.fr>
4769
4770 * src/LR0.c (state_list_t, state_list_append): New.
4771 (first_state, last_state): Now symbol_list_t.
4772 (this_state): Remove.
4773 (new_itemsets, append_states, save_reductions): Take a state_t as
4774 argument.
4775 (set_states, generate_states): Adjust.
4776 (save_shifts): Remove, replaced by...
4777 * src/state.h, src/state.c (state_shifts_set): New.
4778 (shifts): Rename as...
4779 (shifts_t): this.
4780 Adjust all dependencies.
4781 * src/state.h (state_t): Remove the `next' member.
4782
4783 2002-06-30 Akim Demaille <akim@epita.fr>
4784
4785 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4786 escaped in slot 0.
4787
4788 2002-06-30 Akim Demaille <akim@epita.fr>
4789
4790 Use hash.h for the state hash table.
4791
4792 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4793 (allocate_storage): Use state_hash_new.
4794 (free_storage): Use state_hash_free.
4795 (new_state, get_state): Adjust.
4796 * src/lalr.h, src/lalr.c (states): Move to...
4797 * src/states.h (state_t): Remove the `link' member, no longer
4798 used.
4799 * src/states.h, src/states.c: here.
4800 (state_hash_new, state_hash_free, state_hash_lookup)
4801 (state_hash_insert, states_free): New.
4802 * src/states.c (state_table, state_compare, state_hash): New.
4803 * src/output.c (output_actions): Do not free states now, since we
4804 still need to know the final_state number in `prepare', called
4805 afterwards. Do it...
4806 * src/main.c (main): here: call states_free after `output'.
4807
4808 2002-06-30 Akim Demaille <akim@epita.fr>
4809
4810 * src/state.h, src/state.c (state_new): New, extracted from...
4811 * src/LR0.c (new_state): here.
4812 * src/state.h (STATE_ALLOC): Move to...
4813 * src/state.c: here.
4814 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
4815 * src/state.h, src/state.c: here.
4816
4817 2002-06-30 Akim Demaille <akim@epita.fr>
4818
4819 * src/reader.c (gensym): Rename as...
4820 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
4821 (getsym): Rename as...
4822 (symbol_get): this.
4823
4824 2002-06-30 Akim Demaille <akim@epita.fr>
4825
4826 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
4827 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
4828 * src/output.c, src/print.c, src/print_graph.c: Propagate.
4829 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
4830
4831 2002-06-30 Akim Demaille <akim@epita.fr>
4832
4833 Make the test suite pass with warnings checked.
4834
4835 * tests/actions.at (Printers and Destructors): Improve.
4836 Avoid unsigned vs. signed issues.
4837 * tests/calc.at: Don't exercise the scanner here, do it...
4838 * tests/input.at (Torturing the Scanner): here.
4839
4840 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4841
4842 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
4843 reorganize first lines parallel to yacc.c.
4844
4845 2002-06-28 Akim Demaille <akim@epita.fr>
4846
4847 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
4848 (b4_token_enum, b4_token_defines): New, factored from...
4849 * data/lalr1.cc, data/yacc.c, glr.c: here.
4850
4851 2002-06-28 Akim Demaille <akim@epita.fr>
4852
4853 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
4854 unused variables.
4855 * src/output.c (merger_output): static.
4856
4857 2002-06-28 Akim Demaille <akim@epita.fr>
4858
4859 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
4860 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
4861 pacify GCC.
4862 * src/output.c (save_row): Initialize all the variables to pacify GCC.
4863
4864 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4865
4866 Accumulated changelog for new GLR parsing features.
4867
4868 * src/conflicts.c (count_total_conflicts): Change name to
4869 conflicts_total_count.
4870 * src/conflicts.h: Ditto.
4871 * src/output.c (token_actions): Use the new name.
4872 (output_conflicts): Change conflp => conflict_list_heads, and
4873 confl => conflict_list for better readability.
4874 * data/glr.c: Use the new names.
4875 * NEWS: Add self to GLR announcement.
4876
4877 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
4878
4879 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
4880 Akim Demaille.
4881
4882 * data/bison.glr: Change name to glr.c
4883 * data/glr.c: Renamed from bison.glr.
4884 * data/Makefile.am: Add glr.c
4885
4886 * src/getargs.c:
4887
4888 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
4889 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
4890
4891 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4892
4893 * data/bison.glr: Be sure to restore the
4894 current #line when returning to the skeleton contents after having
4895 exposed the input file's #line.
4896
4897 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4898
4899 * data/bison.glr: Bring up to date with changes to bison.simple.
4900
4901 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4902
4903 * data/bison.glr: Correct definitions that use b4_prefix.
4904 Various reformatting.
4905 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
4906 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
4907 yytokenp argument; now part of stack.
4908 (yychar): Define to behave as documented.
4909 (yyclearin): Ditto.
4910
4911 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4912
4913 * src/reader.h: Add declaration for free_merger_functions.
4914
4915 * src/reader.c (merge_functions): New variable.
4916 (get_merge_function): New function.
4917 (free_merger_functions): New function.
4918 (readgram): Check for %prec that is not followed by a symbol.
4919 Handle %dprec and %merge declarations.
4920 (packgram): Initialize dprec and merger fields in rules array.
4921
4922 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
4923 conflict_list_cnt, conflict_list_free): New variables.
4924 (table_grow): Also grow conflict_table.
4925 (prepare_rules): Output dprec and merger tables.
4926 (conflict_row): New function.
4927 (action_row): Output conflict lists for GLR parser. Don't use
4928 default reduction in conflicted states for GLR parser so that there
4929 are spaces for the conflict lists.
4930 (save_row): Also save conflict information.
4931 (token_actions): Allocate conflict list.
4932 (merger_output): New function.
4933 (pack_vector): Pack conflict table, too.
4934 (output_conflicts): New function to output yyconflp and yyconfl.
4935 (output_check): Allocate conflict_tos.
4936 (output_actions): Output conflict tables, also.
4937 (output_skeleton): Output b4_mergers definition.
4938 (prepare): Output b4_max_rhs_length definition.
4939 Use 'bison.glr' as default skeleton for GLR parsers.
4940
4941 * src/gram.c (glr_parser): New flag.
4942 (grammar_free): Call free_merger_functions.
4943
4944 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
4945 all pairs of conflicting reductions, rather than just all tokens
4946 causing conflicts. Needed to size conflict tables.
4947 (conflicts_output): Modify call to count_rr_conflicts for new
4948 interface.
4949 (conflicts_print): Ditto.
4950 (count_total_conflicts): New function.
4951
4952 * src/reader.h (merger_list): New type.
4953 (merge_functions): New variable.
4954
4955 * src/lex.h (tok_dprec, tok_merge): New token types.
4956
4957 * src/gram.h (rule_s): Add dprec and merger fields.
4958 (glr_parser): New flag.
4959
4960 * src/conflicts.h (count_total_conflicts): New function.
4961
4962 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
4963
4964 * doc/bison.texinfo (Generalized LR Parsing): New section.
4965 (GLR Parsers): New section.
4966 (Language and Grammar): Mention GLR parsing.
4967 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
4968 Correct typo ("tge" -> "the").
4969
4970 * data/bison.glr: New skeleton for GLR parsing.
4971
4972 * tests/cxx-gram.at: New tests for GLR parsing.
4973
4974 * tests/testsuite.at: Include cxx-gram.at.
4975
4976 * tests/Makefile.am: Add cxx-gram.at.
4977
4978 * src/parse-gram.y:
4979
4980 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
4981
4982 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
4983
4984 2002-06-27 Akim Demaille <akim@epita.fr>
4985
4986 * src/options.h, src/options.c: Remove.
4987 * src/getargs.c (short_options, long_options): New.
4988
4989 2002-06-27 Akim Demaille <akim@epita.fr>
4990
4991 * data/bison.simple, data/bison.c++: Rename as...
4992 * data/yacc.c, data/lalr1.cc: these.
4993 * doc/bison.texinfo (Environment Variables): Remove.
4994
4995 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
4996
4997 * src/getargs.c (report_argmatch): Initialize strtok().
4998
4999 2002-06-20 Akim Demaille <akim@epita.fr>
5000
5001 * data/bison.simple (b4_symbol_actions): New, replaces...
5002 (b4_symbol_destructor, b4_symbol_printer): these.
5003 (yysymprint): Be sure to call YYPRINT only for tokens, and using
5004 user token numbers.
5005
5006 2002-06-20 Akim Demaille <akim@epita.fr>
5007
5008 * data/bison.simple (yydestructor): Rename as...
5009 (yydestruct): this.
5010
5011 2002-06-20 Akim Demaille <akim@epita.fr>
5012
5013 * src/symtab.h, src/symtab.c (symbol_type_set)
5014 (symbol_destructor_set, symbol_precedence_set): The location is
5015 the last argument.
5016 Adjust all callers.
5017
5018 2002-06-20 Akim Demaille <akim@epita.fr>
5019
5020 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
5021 internals.
5022 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
5023 Takes a location.
5024 * src/symtab.h, src/symtab.c (symbol_class_set)
5025 (symbol_user_token_number_set): Likewise.
5026 Adjust all callers.
5027 Promote complain_at.
5028 * tests/input.at (Type Clashes): Adjust.
5029
5030 2002-06-20 Akim Demaille <akim@epita.fr>
5031
5032 * data/bison.simple (YYLEX): Fix the declaration when
5033 %pure-parser.
5034
5035 2002-06-20 Akim Demaille <akim@epita.fr>
5036
5037 * data/bison.simple (yysymprint): Don't print the token number,
5038 just its name.
5039 * tests/actions.at (Destructors): Rename as...
5040 (Printers and Destructors): this.
5041 Also exercise %printer.
5042
5043 2002-06-20 Akim Demaille <akim@epita.fr>
5044
5045 * data/bison.simple (YYDSYMPRINT): New.
5046 Use it to remove many of the #if YYDEBUG/if (yydebug).
5047
5048 2002-06-20 Akim Demaille <akim@epita.fr>
5049
5050 * src/symtab.h, src/symtab.c (symbol_t): printer and
5051 printer_location are new members.
5052 (symbol_printer_set): New.
5053 * src/parse-gram.y (PERCENT_PRINTER): New token.
5054 Handle its associated rule.
5055 * src/scan-gram.l: Adjust.
5056 (handle_destructor_at, handle_destructor_dollar): Rename as...
5057 (handle_symbol_code_at, handle_symbol_code_dollar): these.
5058 * src/output.c (symbol_printers_output): New.
5059 (output_skeleton): Call it.
5060 * data/bison.simple (yysymprint): New. Cannot be named yyprint
5061 since there are already many grammar files with a user `yyprint'.
5062 Replace the calls to YYPRINT to calls to yysymprint.
5063 * tests/calc.at: Adjust.
5064 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
5065 taking advantage of parser very internal details (stack size!).
5066
5067 2002-06-20 Akim Demaille <akim@epita.fr>
5068
5069 * src/scan-gram.l: Complete the scanner with the missing patterns
5070 to pacify Flex.
5071 Use `quote' and `symbol_tag_get' where appropriate.
5072
5073 2002-06-19 Akim Demaille <akim@epita.fr>
5074
5075 * tests/actions.at (Destructors): Augment to test locations.
5076 * data/bison.simple (yydestructor): Pass it the current location
5077 if locations are enabled.
5078 Prototype only when __STDC__ or C++.
5079 Change the argument names to move into the yy name space: there is
5080 user code here.
5081
5082 2002-06-19 Akim Demaille <akim@epita.fr>
5083
5084 * data/bison.simple (b4_pure_if): New.
5085 Use it instead of #ifdef YYPURE.
5086
5087 2002-06-19 Akim Demaille <akim@epita.fr>
5088
5089 * data/bison.simple (b4_location_if): New.
5090 Use it instead of #ifdef YYLSP_NEEDED.
5091
5092 2002-06-19 Akim Demaille <akim@epita.fr>
5093
5094 Prepare @$ in %destructor, but currently don't bind it in the
5095 skeleton, as %location use is not cleaned up yet.
5096
5097 * src/scan-gram.l (handle_dollar, handle_destructor_at)
5098 (handle_action_at): New.
5099 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
5100 a braced_code_t and a location as additional arguments.
5101 (handle_destructor_dollar): Instead of requiring `b4_eval', just
5102 unquote one when outputting `b4_dollar_dollar'.
5103 Adjust callers.
5104 * data/bison.simple (b4_eval): Remove.
5105 (b4_symbol_destructor): Adjust.
5106 * tests/input.at (Invalid @n): Adjust.
5107
5108 2002-06-19 Zack Weinberg <zack@codesourcery.com>
5109
5110 * doc/bison.texinfo: Document ability to have multiple
5111 prologue sections.
5112
5113 2002-06-18 Akim Demaille <akim@epita.fr>
5114
5115 * src/files.c (compute_base_names): When computing the output file
5116 names from the input file name, strip the directory part.
5117
5118 2002-06-18 Akim Demaille <akim@epita.fr>
5119
5120 * data/bison.simple.new: Comment changes.
5121 Reported by Andreas Schwab.
5122
5123 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
5124
5125 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
5126 there are no `label `yyoverflowlab' defined but not used' warnings
5127 when yyoverflow is defined.
5128
5129 2002-06-18 Akim Demaille <akim@epita.fr>
5130
5131 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
5132 new member.
5133 (symbol_destructor_set): Adjust.
5134 * src/output.c (symbol_destructors_output): Output the destructor
5135 locations.
5136 Output the symbol name.
5137 * data/bison.simple (b4_symbol_destructor): Adjust.
5138
5139 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
5140 and Akim Demaille <akim@epita.fr>
5141
5142 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
5143 what's left on the stack when the error recovery hits EOF.
5144 * tests/actions.at (Destructors): Complete to exercise this case.
5145
5146 2002-06-17 Akim Demaille <akim@epita.fr>
5147
5148 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
5149 arguments is really empty, not only equal to `[]'.
5150 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
5151 member.
5152 (symbol_destructor_set): New.
5153 * src/output.c (symbol_destructors_output): New.
5154 * src/reader.h (brace_code_t, current_braced_code): New.
5155 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
5156 (handle_dollar): Rename as...
5157 (handle_action_dollar): this.
5158 (handle_destructor_dollar): New.
5159 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
5160 (grammar_declaration): Use it.
5161 * data/bison.simple (yystos): Is always defined.
5162 (yydestructor): New.
5163 * tests/actions.at (Destructors): New.
5164 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
5165
5166 2002-06-17 Akim Demaille <akim@epita.fr>
5167
5168 * src/symlist.h, src/symlist.c (symbol_list_length): New.
5169 * src/scan-gram.l (handle_dollar, handle_at): Compute the
5170 rule_length only when needed.
5171 * src/output.c (actions_output, token_definitions_output): Output
5172 the full M4 block.
5173 * src/symtab.c: Don't access directly to the symbol tag, use
5174 symbol_tag_get.
5175 * src/parse-gram.y: Use symbol_list_free.
5176
5177 2002-06-17 Akim Demaille <akim@epita.fr>
5178
5179 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
5180 (symbol_list_prepend, get_type_name): Move to...
5181 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
5182 (symbol_list_prepend, symbol_list_n_type_name_get): here.
5183 Adjust all callers.
5184 (symbol_list_free): New.
5185 * src/scan-gram.l (handle_dollar): Takes a location.
5186 * tests/input.at (Invalid $n): Adjust.
5187
5188 2002-06-17 Akim Demaille <akim@epita.fr>
5189
5190 * src/reader.h, src/reader.c (symbol_list_new): Export it.
5191 (symbol_list_prepend): New.
5192 * src/parse-gram.y (%union): `list' is a new member.
5193 (symbols.1): New, replaces...
5194 (terms_to_prec.1, nterms_to_type.1): these.
5195 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
5196 Take a location as additional argument.
5197 Adjust all callers.
5198
5199 2002-06-15 Akim Demaille <akim@epita.fr>
5200
5201 * src/parse-gram.y: Move %token in the declaration section so that
5202 we don't depend upon CVS Bison.
5203
5204 2002-06-15 Akim Demaille <akim@epita.fr>
5205
5206 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
5207 * src/print.c (print_core): Use it.
5208
5209 2002-06-15 Akim Demaille <akim@epita.fr>
5210
5211 * src/conflicts.c (log_resolution): Accept the rule involved in
5212 the sr conflicts instead of the lookahead number that points to
5213 that rule.
5214 (flush_reduce): Accept the current lookahead vector as argument,
5215 instead of the index in LA.
5216 (resolve_sr_conflict): Accept the current number of lookahead
5217 bitset to consider for the STATE, instead of the index in LA.
5218 (set_conflicts): Adjust.
5219 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
5220
5221 2002-06-15 Akim Demaille <akim@epita.fr>
5222
5223 * src/state.h (state_t): Replace the `lookaheadsp' member, a
5224 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
5225 Adjust all dependencies.
5226 * src/lalr.c (initialize_lookaheads): Split into...
5227 (states_lookaheads_count, states_lookaheads_initialize): these.
5228 (lalr): Adjust.
5229
5230 2002-06-15 Akim Demaille <akim@epita.fr>
5231
5232 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
5233 out of...
5234 (grammar_rules_print): here.
5235 * src/reduce.c (reduce_output): Use it.
5236 * tests/reduce.at (Useless Rules, Reduced Automaton)
5237 (Underivable Rules): Adjust.
5238
5239 2002-06-15 Akim Demaille <akim@epita.fr>
5240
5241 Copy BYacc's nice way to report the grammar.
5242
5243 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
5244 New.
5245 Don't print the rules' location, it is confusing and useless.
5246 (rule_print): Use grammar_rhs_print.
5247 * src/print.c (print_grammar): Use grammar_rules_print.
5248
5249 2002-06-15 Akim Demaille <akim@epita.fr>
5250
5251 Complete and rationalize `useless thing' warnings.
5252
5253 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
5254 (symbol_tag_print): New.
5255 Use them everywhere in place of accessing directly the tag member.
5256 * src/gram.h, src/gram.c (rule_print): New.
5257 Use it where a rule used to be printed `by hand'.
5258 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
5259 (reduce_grammar_tables): Report the useless rules.
5260 (reduce_print): Useless things are a warning, not an error.
5261 Report it as such.
5262 * tests/reduce.at (Useless Nonterminals, Useless Rules):
5263 (Reduced Automaton, Underivable Rules): Adjust.
5264 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
5265 * tests/conflicts.at (Unresolved SR Conflicts)
5266 (Solved SR Conflicts): Adjust.
5267
5268 2002-06-15 Akim Demaille <akim@epita.fr>
5269
5270 Let symbols have a location.
5271
5272 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
5273 (getsym): Adjust.
5274 Adjust all callers.
5275 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
5276 Use location_t, not int.
5277 * src/symtab.c (symbol_check_defined): Take advantage of the
5278 location.
5279 * tests/regression.at (Invalid inputs): Adjust.
5280
5281 2002-06-15 Akim Demaille <akim@epita.fr>
5282
5283 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
5284 (input): Don't try to initialize yylloc here, do it in the
5285 scanner.
5286 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
5287 * src/gram.h (rule_t): Change line and action_line into location
5288 and action_location, of location_t type.
5289 Adjust all dependencies.
5290 * src/location.h, src/location.c (empty_location): New.
5291 * src/reader.h, src/reader.c (grammar_start_symbol_set)
5292 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
5293 (grammar_current_rule_symbol_append)
5294 (grammar_current_rule_action_append): Expect a location as argument.
5295 * src/reader.c (grammar_midrule_action): Adjust to attach an
5296 action's location as dummy symbol location.
5297 * src/symtab.h, src/symtab.c (startsymbol_location): New.
5298 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
5299 the line numbers.
5300
5301 2002-06-14 Akim Demaille <akim@epita.fr>
5302
5303 Grammar declarations may be found in the grammar section.
5304
5305 * src/parse-gram.y (rules_or_grammar_declaration): New.
5306 (declarations): Each declaration may end with a semicolon, not
5307 just...
5308 (grammar_declaration): `"%union"'.
5309 (grammar): Branch to rules_or_grammar_declaration.
5310
5311 2002-06-14 Akim Demaille <akim@epita.fr>
5312
5313 * src/main.c (main): Invoke scanner_free.
5314
5315 2002-06-14 Akim Demaille <akim@epita.fr>
5316
5317 * src/output.c (m4_invoke): Extracted from...
5318 (output_skeleton): here.
5319 Free tempfile.
5320
5321 2002-06-14 Akim Demaille <akim@epita.fr>
5322
5323 * src/parse-gram.y (directives, directive, gram)
5324 (grammar_directives, precedence_directives, precedence_directive):
5325 Rename as...
5326 (declarations, declaration, grammar, grammar_declaration)
5327 (precedence_declaration, precedence_declarator): these.
5328 (symbol_declaration): New.
5329
5330 2002-06-14 Akim Demaille <akim@epita.fr>
5331
5332 * src/files.c (action_obstack): Remove, unused.
5333 (output_obstack): Remove it, and all its dependencies, as it is no
5334 longer needed.
5335 * src/reader.c (epilogue_set): Build the epilogue in the
5336 muscle_obstack.
5337 * src/output.h, src/output.c (muscle_obstack): Move to...
5338 * src/muscle_tab.h, src/muscle_tab.h: here.
5339 (muscle_init): Initialize muscle_obstack.
5340 (muscle_free): New.
5341 * src/main.c (main): Call it.
5342
5343 2002-06-14 Akim Demaille <akim@epita.fr>
5344
5345 * src/location.h: New, extracted from...
5346 * src/reader.h: here.
5347 * src/Makefile.am (noinst_HEADERS): Merge into
5348 (bison_SOURCES): this.
5349 Add location.h.
5350 * src/parse-gram.y: Use location_t instead of Bison's.
5351 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
5352 Use location_t instead of ints.
5353
5354 2002-06-14 Akim Demaille <akim@epita.fr>
5355
5356 * data/bison.simple, data/bison.c++: Be sure to restore the
5357 current #line when returning to the skeleton contents after having
5358 exposed the input file's #line.
5359
5360 2002-06-12 Akim Demaille <akim@epita.fr>
5361
5362 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
5363 eager.
5364 * tests/actions.at (Exotic Dollars): New.
5365
5366 2002-06-12 Akim Demaille <akim@epita.fr>
5367
5368 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
5369 ['"/] too eagerly.
5370 * tests/input.at (Torturing the Scanner): New.
5371
5372 2002-06-11 Akim Demaille <akim@epita.fr>
5373
5374 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
5375 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
5376 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
5377 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
5378 * src/reader.c (reader): Use it.
5379
5380 2002-06-11 Akim Demaille <akim@epita.fr>
5381
5382 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
5383 Adjust all callers.
5384 (scanner_last_string_free): New.
5385
5386 2002-06-11 Akim Demaille <akim@epita.fr>
5387
5388 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
5389 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
5390 (last_string, YY_OBS_FREE): New.
5391 Use them when returning an ID.
5392
5393 2002-06-11 Akim Demaille <akim@epita.fr>
5394
5395 Have Bison grammars parsed by a Bison grammar.
5396
5397 * src/reader.c, src/reader.h (prologue_augment): New.
5398 * src/reader.c (copy_definition): Remove.
5399
5400 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
5401 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
5402 (grammar_current_rule_prec_set, grammar_current_rule_check)
5403 (grammar_current_rule_symbol_append)
5404 (grammar_current_rule_action_append): Export.
5405 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
5406 (symbol_list_action_append): Remove.
5407 Hook the routines from reader.
5408 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
5409 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
5410
5411 * src/reader.c (read_declarations): Remove, unused.
5412
5413 * src/parse-gram.y: Handle the epilogue.
5414 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
5415 (grammar_start_symbol_set): this.
5416 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
5417 * src/reader.c (readgram): Remove, unused.
5418 (reader): Adjust to insert eoftoken and axiom where appropriate.
5419
5420 * src/reader.c (copy_dollar): Replace with...
5421 * src/scan-gram.h (handle_dollar): this.
5422 * src/parse-gram.y: Remove `%thong'.
5423
5424 * src/reader.c (copy_at): Replace with...
5425 * src/scan-gram.h (handle_at): this.
5426
5427 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
5428 New.
5429
5430 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
5431 time being.
5432
5433 * src/reader.h, src/reader.c (grammar_rule_end): New.
5434
5435 * src/parse.y (current_type, current_class): New.
5436 Implement `%nterm', `%token' support.
5437 Merge `%term' into `%token'.
5438 (string_as_id): New.
5439 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
5440 type name.
5441
5442 * src/parse-gram.y: Be sure to handle properly the beginning of
5443 rules.
5444
5445 * src/parse-gram.y: Handle %type.
5446 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
5447
5448 * src/parse-gram.y: More directives support.
5449 * src/options.c: No longer handle source directives.
5450
5451 * src/parse-gram.y: Fix %output.
5452
5453 * src/parse-gram.y: Handle %union.
5454 Use the prologue locations.
5455 * src/reader.c (parse_union_decl): Remove.
5456
5457 * src/reader.h, src/reader.c (epilogue_set): New.
5458 * src/parse-gram.y: Use it.
5459
5460 * data/bison.simple, data/bison.c++: b4_stype is now either not
5461 defined, then default to int, or to the contents of %union,
5462 without `union' itself.
5463 Adjust.
5464 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
5465
5466 * src/output.c (actions_output): Don't output braces, as they are
5467 already handled by the scanner.
5468
5469 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
5470 characters to themselves.
5471
5472 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
5473 that the epilogue has a proper #line.
5474
5475 * src/parse-gram.y: Handle precedence/associativity.
5476
5477 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
5478 a terminal.
5479 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
5480 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
5481 at all to define terminals that cannot be emitted.
5482
5483 * src/scan-gram.l: Escape M4 characters.
5484
5485 * src/scan-gram.l: Working properly with escapes in user
5486 strings/characters.
5487
5488 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
5489 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
5490 grammar.
5491 Use more modest sizes, as for the time being the parser does not
5492 release memory, and therefore the process swallows a huge amount
5493 of memory.
5494
5495 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
5496 stricter %token grammar.
5497
5498 * src/symtab.h (associativity): Add `undef_assoc'.
5499 (symbol_precedence_set): Do nothing when passed an undef_assoc.
5500 * src/symtab.c (symbol_check_alias_consistence): Adjust.
5501
5502 * tests/regression.at (Invalid %directive): Remove, as it is now
5503 meaningless.
5504 (Invalid inputs): Adjust to the new error messages.
5505 (Token definitions): The new grammar doesn't allow too many
5506 eccentricities.
5507
5508 * src/lex.h, src/lex.c: Remove.
5509 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
5510 (copy_character, copy_string2, copy_string, copy_identifier)
5511 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
5512 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
5513 (parse_action): Remove.
5514 * po/POTFILES.in: Adjust.
5515
5516 2002-06-11 Akim Demaille <akim@epita.fr>
5517
5518 * src/reader.c (parse_action): Don't store directly into the
5519 rule's action member: return the action as a string.
5520 Don't require `rule_length' as an argument: compute it.
5521 (grammar_current_rule_symbol_append)
5522 (grammar_current_rule_action_append): New, eved out from
5523 (readgram): here.
5524 Remove `action_flag', `rulelength', unused now.
5525
5526 2002-06-11 Akim Demaille <akim@epita.fr>
5527
5528 * src/reader.c (grammar_current_rule_prec_set).
5529 (grammar_current_rule_check): New, eved out from...
5530 (readgram): here.
5531 Remove `xaction', `first_rhs': useless.
5532 * tests/input.at (Type clashes): New.
5533 * tests/existing.at (GNU Cim Grammar): Adjust.
5534
5535 2002-06-11 Akim Demaille <akim@epita.fr>
5536
5537 * src/reader.c (grammar_midrule_action): New, Eved out from
5538 (readgram): here.
5539
5540 2002-06-11 Akim Demaille <akim@epita.fr>
5541
5542 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
5543 New.
5544 (readgram): Use them as replacement of inlined code, crule and
5545 crule1.
5546
5547 2002-06-11 Akim Demaille <akim@epita.fr>
5548
5549 * src/reader.c (grammar_end, grammar_symbol_append): New.
5550 (readgram): Use them.
5551 Make the use of `p' as local as possible.
5552
5553 2002-06-10 Akim Demaille <akim@epita.fr>
5554
5555 GCJ's parser requires the tokens to be defined before the prologue.
5556
5557 * data/bison.simple: Output the token definition before the user's
5558 prologue.
5559 * tests/regression.at (Braces parsing, Duplicate string)
5560 (Mixing %token styles): Check the output from bison.
5561 (Early token definitions): New.
5562
5563 2002-06-10 Akim Demaille <akim@epita.fr>
5564
5565 * src/symtab.c (symbol_user_token_number_set): Don't complain when
5566 assigning twice the same user number to a token, so that we can
5567 use it in...
5568 * src/lex.c (lex): here.
5569 Also use `symbol_class_set' instead of hand written code.
5570 * src/reader.c (parse_assoc_decl): Likewise.
5571
5572 2002-06-10 Akim Demaille <akim@epita.fr>
5573
5574 * src/symtab.c, src/symtab.c (symbol_class_set)
5575 (symbol_user_token_number_set): New.
5576 * src/reader.c (parse_token_decl): Use them.
5577 Use a switch instead of ifs.
5578 Use a single argument.
5579
5580 2002-06-10 Akim Demaille <akim@epita.fr>
5581
5582 Remove `%thong' support as it is undocumented, unused, duplicates
5583 `%token's job, and creates useless e-mail traffic with people who
5584 want to know what it is, why it is undocumented, unused, and
5585 duplicates `%token's job.
5586
5587 * src/reader.c (parse_thong_decl): Remove.
5588 * src/options.c (option_table): Remove "thong".
5589 * src/lex.h (tok_thong): Remove.
5590
5591 2002-06-10 Akim Demaille <akim@epita.fr>
5592
5593 * src/symtab.c, src/symtab.c (symbol_type_set)
5594 (symbol_precedence_set): New.
5595 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
5596 (value_components_used): Remove, unused.
5597
5598 2002-06-09 Akim Demaille <akim@epita.fr>
5599
5600 Move symbols handling code out of the reader.
5601
5602 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
5603 (axiom): Move to...
5604 * src/symtab.h, src/symtab.c: here.
5605
5606 * src/gram.c (start_symbol): Remove: use startsymbol->number.
5607 * src/reader.c (startval): Rename as...
5608 * src/symtab.h, src/symtab.c (startsymbol): this.
5609 * src/reader.c: Adjust.
5610
5611 * src/reader.c (symbol_check_defined, symbol_make_alias)
5612 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5613 (token_translations_init)
5614 Move to...
5615 * src/symtab.c: here.
5616 * src/reader.c (packsymbols): Move to...
5617 * src/symtab.h, src/symtab.c (symbols_pack): here.
5618 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
5619 argument.
5620
5621 2002-06-03 Akim Demaille <akim@epita.fr>
5622
5623 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
5624 then statements.
5625
5626 2002-06-03 Akim Demaille <akim@epita.fr>
5627
5628 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
5629 structs with non literals.
5630 * src/scan-skel.l: never-interactive.
5631 * src/conflicts.c (enum conflict_resolution_e): No trailing
5632 comma.
5633 * src/getargs.c (usage): Split long literal strings.
5634 Reported by Hans Aberg.
5635
5636 2002-05-28 Akim Demaille <akim@epita.fr>
5637
5638 * data/bison.c++: Use C++ ostreams.
5639 (cdebug_): New member.
5640
5641 2002-05-28 Akim Demaille <akim@epita.fr>
5642
5643 * src/output.c (output_skeleton): Be sure to allocate enough room
5644 for `/' _and_ for `\0' in full_skeleton.
5645
5646 2002-05-28 Akim Demaille <akim@epita.fr>
5647
5648 * data/bison.c++: Catch up with bison.simple:
5649 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5650 and Paul Eggert <eggert@twinsun.com>: `error' handing.
5651 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
5652 and popping traces.
5653
5654 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5655
5656 * src/output.c (output_skeleton): Put an explicit path in front of
5657 the skeleton file name, rather than relying on the -I directory,
5658 to partially alleviate effects of having a skeleton file lying around
5659 in the current directory.
5660
5661 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5662
5663 * src/conflicts.c (log_resolution): Correct typo:
5664 obstack_printf should be obstack_fgrow1.
5665
5666 2002-05-26 Akim Demaille <akim@epita.fr>
5667
5668 * src/state.h (state_t): `solved_conflicts' is a new member.
5669 * src/LR0.c (new_state): Set it to 0.
5670 * src/conflicts.h, src/conflicts.c (print_conflicts)
5671 (free_conflicts, solve_conflicts): Rename as...
5672 (conflicts_print, conflicts_free, conflicts_solve): these.
5673 Adjust callers.
5674 * src/conflicts.c (enum conflict_resolution_e)
5675 (solved_conflicts_obstack): New, used by...
5676 (log_resolution): this.
5677 Adjust to attach the conflict resolution to each state.
5678 Complete the description with the precedence/associativity
5679 information.
5680 (resolve_sr_conflict): Adjust.
5681 * src/print.c (print_state): Output its solved_conflicts.
5682 * tests/conflicts.at (Unresolved SR Conflicts)
5683 (Solved SR Conflicts): Exercise --report=all.
5684
5685 2002-05-26 Akim Demaille <akim@epita.fr>
5686
5687 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5688 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5689 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
5690 (token_number_t, item_number_as_token_number)
5691 (token_number_as_item_number, muscle_insert_token_number_table):
5692 Rename as...
5693 (symbol_number_t, item_number_as_symbol_number)
5694 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
5695 these, since it is more appropriate.
5696
5697 2002-05-26 Akim Demaille <akim@epita.fr>
5698
5699 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
5700 `Error:' lines.
5701 * data/bison.simple (yystos) [YYDEBUG]: New.
5702 (yyparse) [YYDEBUG]: Display the symbols which are popped during
5703 error recovery.
5704 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
5705
5706 2002-05-25 Akim Demaille <akim@epita.fr>
5707
5708 * doc/bison.texinfo (Debugging): Split into...
5709 (Tracing): this new section, its former contents, and...
5710 (Understanding): this new section.
5711 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
5712 by...
5713 (report_flag): this.
5714 Adjust all dependencies.
5715 (report_args, report_types, report_argmatch): New.
5716 (usage, getargs): Report/support -r, --report.
5717 * src/options.h
5718 (struct option_table_struct): Rename as..,
5719 (struct option_table_s): this.
5720 Rename the `set_flag' member to `flag' to match with getopt_long's
5721 struct.
5722 * src/options.c (option_table): Split verbose into an entry for
5723 %verbose, and another for --verbose.
5724 Support --report/-r, so remove -r from the obsolete --raw.
5725 * src/print.c: Attach full item sets and lookaheads reports to
5726 report_flag instead of trace_flag.
5727 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5728
5729 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5730 and Paul Eggert <eggert@twinsun.com>
5731
5732 * data/bison.simple (yyparse): Correct error handling to conform to
5733 POSIX and yacc. Specifically, after syntax error is discovered,
5734 do not reduce further before shifting the error token.
5735 Clean up the code a bit by removing the labels yyerrdefault,
5736 yyerrhandle, yyerrpop.
5737 * NEWS: Document the above.
5738
5739 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5740
5741 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5742 type; it isn't always big enough, since it doesn't necessarily
5743 include non-terminals.
5744 (yytranslate): Expand definition of yy_token_number_type, so that
5745 the latter can be removed.
5746 (yy_token_number_type): Remove, only one use.
5747 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5748 don't use TokenNumberType as element type.
5749
5750 * tests/regression.at: Modify expected output to agree with change
5751 to yyr1 and yytranslate.
5752
5753 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5754
5755 * src/reader.c (parse_action): Use copy_character instead of
5756 obstack_1grow.
5757
5758 2002-05-13 Akim Demaille <akim@epita.fr>
5759
5760 * tests/regression.at (Token definitions): Prototype yylex and
5761 yyerror.
5762
5763 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5764
5765 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
5766 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5767 32-bit arithmetic.
5768 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5769
5770 2002-05-07 Akim Demaille <akim@epita.fr>
5771
5772 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5773 avoid GCC warnings.
5774
5775 2002-05-07 Akim Demaille <akim@epita.fr>
5776
5777 Kill GCC warnings.
5778
5779 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5780 over the RHS of each rule.
5781 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5782 * src/state.h (state_t): Member `nitems' is unsigned short.
5783 * src/LR0.c (get_state): Adjust.
5784 * src/reader.c (packgram): Likewise.
5785 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5786 `Type'.
5787 (muscle_insert_int_table): Remove, unused.
5788 (prepare_rules): Remove `max'.
5789
5790 2002-05-06 Akim Demaille <akim@epita.fr>
5791
5792 * src/closure.c (print_firsts): Display of the symbol tags.
5793 (bitmatrix_print): Move to...
5794 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5795 here.
5796 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5797
5798 2002-05-06 Akim Demaille <akim@epita.fr>
5799
5800 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5801 hash_do_for_each.
5802
5803 2002-05-06 Akim Demaille <akim@epita.fr>
5804
5805 * src/LR0.c (new_state, get_state): Instead of using the global
5806 `kernel_size' and `kernel_base', have two new arguments:
5807 `core_size' and `core'.
5808 Adjust callers.
5809
5810 2002-05-06 Akim Demaille <akim@epita.fr>
5811
5812 * src/reader.c (packgram): No longer end `ritem' with a 0
5813 sentinel: it is not used.
5814
5815 2002-05-05 Akim Demaille <akim@epita.fr>
5816
5817 New experimental feature: display the lookaheads in the report and
5818 graph.
5819
5820 * src/print (print_core): When --trace-flag, display the rules
5821 lookaheads.
5822 * src/print_graph.c (print_core): Likewise.
5823 Swap the arguments.
5824 Adjust caller.
5825
5826 2002-05-05 Akim Demaille <akim@epita.fr>
5827
5828 * tests/torture.at (Many lookaheads): New test.
5829
5830 2002-05-05 Akim Demaille <akim@epita.fr>
5831
5832 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
5833 (GENERATE_MUSCLE_INSERT_TABLE): this.
5834 (output_int_table, output_unsigned_int_table, output_short_table)
5835 (output_token_number_table, output_item_number_table): Replace with...
5836 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
5837 (muscle_insert_short_table, muscle_insert_token_number_table)
5838 (muscle_insert_item_number_table): these.
5839 Adjust all callers.
5840 (prepare_tokens): Don't free `translations', since...
5841 * src/reader.h, src/reader.c (grammar_free): do it.
5842 Move to...
5843 * src/gram.h, src/gram.c (grammar_free): here.
5844 * data/bison.simple, data/bison.c++: b4_token_number_max is now
5845 b4_translate_max.
5846
5847 2002-05-05 Akim Demaille <akim@epita.fr>
5848
5849 * src/output.c (output_unsigned_int_table): New.
5850 (prepare_rules): `i' is unsigned.
5851 `prhs', `rline', `r2' are unsigned int.
5852 Rename muscle `rhs_number_max' as `rhs_max'.
5853 Output muscles `prhs_max', `rline_max', and `r2_max'.
5854 Free rline and r1.
5855 * data/bison.simple, data/bison.c++: Adjust to use these muscles
5856 to compute types instead of constant types.
5857 * tests/regression.at (Web2c Actions): Adjust.
5858
5859 2002-05-04 Akim Demaille <akim@epita.fr>
5860
5861 * src/symtab.h (SALIAS, SUNDEF): Rename as...
5862 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
5863 Adjust dependencies.
5864 * src/output.c (token_definitions_output): Be sure not to output a
5865 `#define 'a'' when fed with `%token 'a' "a"'.
5866 * tests/regression.at (Token definitions): New.
5867
5868 2002-05-03 Paul Eggert <eggert@twinsun.com>
5869
5870 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
5871 for K&R C.
5872
5873 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
5874
5875 * Makefile.am (SUBDIRS): Remove intl.
5876 (EXTRA_DIST): Add config/config.rpath.
5877
5878 2002-05-03 Akim Demaille <akim@epita.fr>
5879
5880 * data/bison.simple (m4_if): Don't output empty enums.
5881 And actually, output valid enum definitions :(.
5882
5883 2002-05-03 Akim Demaille <akim@epita.fr>
5884
5885 * configure.bat: Remove, completely obsolete.
5886 * Makefile.am (EXTRA_DIST): Adjust.
5887 Don't distribute config.rpath...
5888 * config/Makefile.am (EXTRA_DIST): Do it.
5889
5890 2002-05-03 Akim Demaille <akim@epita.fr>
5891
5892 * configure.in (GETTEXT_VERSION): New.
5893 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
5894
5895 2002-05-03 Akim Demaille <akim@epita.fr>
5896
5897 * data/bison.simple (b4_token_enum): New.
5898 (b4_token_defines): Use it to output tokens both as #define and
5899 enums.
5900 Suggested by Paul Eggert.
5901 * src/output.c (token_definitions_output): Don't output spurious
5902 white spaces.
5903
5904 2002-05-03 Akim Demaille <akim@epita.fr>
5905
5906 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5907
5908 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
5909
5910 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
5911 Update the stack class, give a try to deque as the default container.
5912
5913 2002-05-02 Akim Demaille <akim@epita.fr>
5914
5915 * data/bison.simple (yyparse): Do not implement @$ = @1.
5916 (YYLLOC_DEFAULT): Adjust to do it.
5917 * doc/bison.texinfo (Location Default Action): Fix.
5918
5919 2002-05-02 Akim Demaille <akim@epita.fr>
5920
5921 * src/reader.c (parse_braces): Merge into...
5922 (parse_action): this.
5923
5924 2002-05-02 Akim Demaille <akim@epita.fr>
5925
5926 * configure.in (ALL_LINGUAS): Remove.
5927 * po/LINGUAS, hr.po: New.
5928
5929 2002-05-02 Akim Demaille <akim@epita.fr>
5930
5931 Remove the so called hairy (semantic) parsers.
5932
5933 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
5934 * src/gram.h, src/gram.c (semantic_parser): Remove.
5935 (rule_t): Remove the guard and guard_line members.
5936 * src/lex.h (token_t): remove tok_guard.
5937 * src/options.c (option_table): Remove %guard and %semantic_parser
5938 support.
5939 * src/output.c, src/output.h (guards_output): Remove.
5940 (prepare): Adjust.
5941 (token_definitions_output): Don't output the `T'
5942 tokens (???).
5943 (output_skeleton): Don't output the guards.
5944 * src/files.c, src/files.c (attrsfile): Remove.
5945 * src/reader.c (symbol_list): Remove the guard and guard_line
5946 members.
5947 Adjust dependencies.
5948 (parse_guard): Remove.
5949 * data/bison.hairy: Remove.
5950 * doc/bison.texinfo (Environment Variables): Remove occurrences of
5951 BISON_HAIRY.
5952
5953 2002-05-02 Akim Demaille <akim@epita.fr>
5954
5955 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
5956 (parse_guard): Rename the formal argument `stack_offset' as
5957 `rule_length', which is more readable.
5958 Adjust callers.
5959 (copy_at, copy_dollar): Instead of outputting the hard coded
5960 values of $$, $n and so forth, output invocation to b4_lhs_value,
5961 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
5962 Note: this patch partially drops `semantic-parser' support: it
5963 always does `rule_length - n', where semantic parsers ought to
5964 always use `-n'.
5965 * data/bison.simple, data/bison.c++ (b4_lhs_value)
5966 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
5967
5968 2002-05-02 Akim Demaille <akim@epita.fr>
5969
5970 * configure.in (AC_INIT): Bump to 1.49b.
5971 (AM_INIT_AUTOMAKE): Short invocation.
5972
5973 2002-05-02 Akim Demaille <akim@epita.fr>
5974
5975 Version 1.49a.
5976
5977 2002-05-01 Akim Demaille <akim@epita.fr>
5978
5979 * src/skeleton.h: Remove.
5980
5981 2002-05-01 Akim Demaille <akim@epita.fr>
5982
5983 * src/skeleton.h: Fix the #endif.
5984 Reported by Magnus Fromreide.
5985
5986 2002-04-26 Paul Eggert <eggert@twinsun.com>
5987
5988 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
5989 Define if we define YYSTYPE and YYLTYPE, respectively.
5990 (YYCOPY): Fix [] quoting problem in the non-GCC case.
5991
5992 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
5993
5994 * src/scan-skel.l: Postprocess quadrigraphs.
5995
5996 * src/reader.c (copy_character): New function, used to output
5997 single characters while replacing `[' and `]' with quadrigraphs, to
5998 avoid troubles with M4 quotes.
5999 (copy_comment): Output characters with copy_character.
6000 (read_additionnal_code): Likewise.
6001 (copy_string2): Likewise.
6002 (copy_definition): Likewise.
6003
6004 * tests/calc.at: Exercise M4 quoting.
6005
6006 2002-04-25 Akim Demaille <akim@epita.fr>
6007
6008 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
6009 between `!' and the command.
6010 Reported by Paul Eggert.
6011
6012 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
6013
6014 * tests/calc.at: Exercise prologue splitting.
6015
6016 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
6017 `b4_post_prologue' instead of `b4_prologue'.
6018
6019 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
6020 muscles.
6021 (output): Free pre_prologue_obstack and post_prologue_obstack.
6022 * src/files.h, src/files.c (attrs_obstack): Remove.
6023 (pre_prologue_obstack, post_prologue_obstack): New.
6024 * src/reader.c (copy_definition): Add a parameter to specify the
6025 obstack to fill, instead of using attrs_obstack unconditionally.
6026 (read_declarations): Pass pre_prologue_obstack to copy_definition if
6027 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
6028
6029 2002-04-23 Paul Eggert <eggert@twinsun.com>
6030
6031 * data/bison.simple: Remove unnecessary commentary and white
6032 space differences from 1_29-branch.
6033 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
6034
6035 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
6036 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
6037 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
6038 constructors or destructors.
6039
6040 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
6041
6042 2002-04-23 Akim Demaille <akim@epita.fr>
6043
6044 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
6045 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
6046 location with columns.
6047 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
6048 All reported by Paul Eggert.
6049
6050 2002-04-22 Akim Demaille <akim@epita.fr>
6051
6052 * src/reduce.c (dump_grammar): Move to...
6053 * src/gram.h, src/gram.c (grammar_dump): here.
6054 Be sure to separate long item numbers.
6055 Don't read the members of a rule's prec if its nil.
6056
6057 2002-04-22 Akim Demaille <akim@epita.fr>
6058
6059 * src/output.c (table_size, table_grow): New.
6060 (MAXTABLE): Remove, replace uses with table_size.
6061 (pack_vector): Instead of dying when the table is too big, grow it.
6062
6063 2002-04-22 Akim Demaille <akim@epita.fr>
6064
6065 * data/bison.simple (yyr1): Its type is that of a token number.
6066 * data/bison.c++ (r1_): Likewise.
6067 * tests/regression.at (Web2c Actions): Adjust.
6068
6069 2002-04-22 Akim Demaille <akim@epita.fr>
6070
6071 * src/reader.c (token_translations_init): 256 is now the default
6072 value for the error token, i.e., it will be assigned another
6073 number if the user assigned 256 to one of her tokens.
6074 (reader): Don't force 256 to error.
6075 * doc/bison.texinfo (Symbols): Adjust.
6076 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
6077 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
6078 etc. instead of 10, 20, 30 (which was used to `jump' over error
6079 (256) and undefined (2)).
6080
6081 2002-04-22 Akim Demaille <akim@epita.fr>
6082
6083 Propagate more token_number_t.
6084
6085 * src/gram.h (token_number_as_item_number)
6086 (item_number_as_token_number): New.
6087 * src/output.c (GENERATE_OUTPUT_TABLE): New.
6088 Use it to create output_item_number_table and
6089 output_token_number_table.
6090 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
6091 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
6092 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
6093 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
6094
6095 2002-04-22 Akim Demaille <akim@epita.fr>
6096
6097 * src/output.h, src/output.c (get_lines_number): Remove.
6098
6099 2002-04-19 Akim Demaille <akim@epita.fr>
6100
6101 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
6102 as Lex/Flex'.
6103 (Debugging): More details about enabling the debugging features.
6104 (Table of Symbols): Describe $$, $n, @$, and @n.
6105 Suggested by Tim Josling.
6106
6107 2002-04-19 Akim Demaille <akim@epita.fr>
6108
6109 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
6110
6111 2002-04-10 Akim Demaille <akim@epita.fr>
6112
6113 * src/system.h: Rely on HAVE_LIMITS_H.
6114 Suggested by Paul Eggert.
6115
6116 2002-04-09 Akim Demaille <akim@epita.fr>
6117
6118 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
6119 full stderr, and strip it according to the bison options, instead
6120 of composing the error message from different bits.
6121 This makes it easier to check for several error messages.
6122 Adjust all the invocations.
6123 Add an invocation exercising the error token.
6124 Add an invocation demonstrating a stupid error message.
6125 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
6126 Adjust the tests.
6127 Error message are for stderr, not stdout.
6128
6129 2002-04-09 Akim Demaille <akim@epita.fr>
6130
6131 * src/gram.h, src/gram.c (error_token_number): Remove, use
6132 errtoken->number.
6133 * src/reader.c (reader): Don't specify the user token number (2)
6134 for $undefined, as it uselessly prevents using it.
6135 * src/gram.h (token_number_t): Move to...
6136 * src/symtab.h: here.
6137 (state_t.number): Is a token_number_t.
6138 * src/print.c, src/reader.c: Use undeftoken->number instead of
6139 hard coded 2.
6140 (Even though this 2 is not the same as above: the number of the
6141 undeftoken remains being 2, it is its user token number which
6142 might not be 2).
6143 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
6144 `user_token_number_max'.
6145 Output `undef_token_number'.
6146 * data/bison.simple, data/bison.c++: Use them.
6147 Be sure to map invalid yylex return values to
6148 `undef_token_number'. This saves us from gratuitous SEGV.
6149
6150 * tests/conflicts.at (Solved SR Conflicts)
6151 (Unresolved SR Conflicts): Adjust.
6152 * tests/regression.at (Web2c Actions): Adjust.
6153
6154 2002-04-08 Akim Demaille <akim@epita.fr>
6155
6156 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
6157 Adding #line.
6158 Remove the duplicate `typedefs'.
6159 (RhsNumberType): Fix the declaration and various other typos.
6160 Use __ofile__.
6161 * data/bison.simple: Use __ofile__.
6162 * src/scan-skel.l: Handle __ofile__.
6163
6164 2002-04-08 Akim Demaille <akim@epita.fr>
6165
6166 * src/gram.h (item_number_t): New, the type of item numbers in
6167 RITEM. Note that it must be able to code symbol numbers as
6168 positive number, and the negation of rule numbers as negative
6169 numbers.
6170 Adjust all dependencies (pretty many).
6171 * src/reduce.c (rule): Remove this `short *' pointer: use
6172 item_number_t.
6173 * src/system.h (MINSHORT, MAXSHORT): Remove.
6174 Include `limits.h'.
6175 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
6176 (shortcpy): Remove.
6177 (MAXTABLE): Move to...
6178 * src/output.c (MAXTABLE): here.
6179 (prepare_rules): Use output_int_table to output rhs.
6180 * data/bison.simple, data/bison.c++: Adjust.
6181 * tests/torture.at (Big triangle): Move the limit from 254 to
6182 500.
6183 * tests/regression.at (Web2c Actions): Ajust.
6184
6185 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
6186 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
6187 passes, but produces negative #line number, once fixed, GCC is
6188 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
6189 C), it passes.
6190 * src/state.h (state_h): Code input lines on ints, not shorts.
6191
6192 2002-04-08 Akim Demaille <akim@epita.fr>
6193
6194 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
6195 and then the grammar.
6196
6197 2002-04-08 Akim Demaille <akim@epita.fr>
6198
6199 * src/system.h: No longer using strndup.
6200
6201 2002-04-07 Akim Demaille <akim@epita.fr>
6202
6203 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
6204 * src/output.c (output_table_data): Return the longest number.
6205 (prepare_tokens): Output `token_number_max').
6206 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
6207 New.
6208 Use them to define yy_token_number_type/TokenNumberType.
6209 Use this type for yytranslate.
6210 * tests/torture.at (Big triangle): Push the limit from 124 to
6211 253.
6212 * tests/regression.at (Web2c Actions): Adjust.
6213
6214 2002-04-07 Akim Demaille <akim@epita.fr>
6215
6216 * tests/torture.at (Big triangle): New.
6217 (GNU AWK Grammar, GNU Cim Grammar): Move to...
6218 * tests/existing.at: here.
6219
6220 2002-04-07 Akim Demaille <akim@epita.fr>
6221
6222 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
6223 nritems.
6224 Adjust dependencies.
6225
6226 2002-04-07 Akim Demaille <akim@epita.fr>
6227
6228 * src/reader.c: Normalize increments to prefix form.
6229
6230 2002-04-07 Akim Demaille <akim@epita.fr>
6231
6232 * src/reader.c, symtab.c: Remove debugging code.
6233
6234 2002-04-07 Akim Demaille <akim@epita.fr>
6235
6236 Rename all the `bucket's as `symbol_t'.
6237
6238 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
6239 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
6240 * src/symtab.c, src/symtab.h (bucket): Rename as...
6241 (symbol_t): this.
6242 (symbol_list_new, bucket_check_defined, bucket_make_alias)
6243 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
6244 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6245 (buckets_new, buckets_free, buckets_do): Rename as...
6246 (symbol_list_new, symbol_check_defined, symbol_make_alias)
6247 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
6248 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
6249 (symbols_new, symbols_free, symbols_do): these.
6250
6251 2002-04-07 Akim Demaille <akim@epita.fr>
6252
6253 Use lib/hash for the symbol table.
6254
6255 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
6256 EOF.
6257 * src/lex.c (lex): Set the `number' member of new terminals.
6258 * src/reader.c (bucket_check_defined, bucket_make_alias)
6259 (bucket_check_alias_consistence, bucket_translation): New.
6260 (reader, grammar_free, readgram, token_translations_init)
6261 (packsymbols): Adjust.
6262 (reader): Number the predefined tokens.
6263 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
6264 for predefined tokens.
6265 * src/symtab.h (bucket): Remove all the hash table related
6266 members.
6267 * src/symtab.c (symtab): Replace by...
6268 (bucket_table): this.
6269 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6270 (buckets_new, buckets_do): New.
6271
6272 2002-04-07 Akim Demaille <akim@epita.fr>
6273
6274 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
6275 (start_symbol, max_user_token_number, semantic_parser)
6276 (error_token_number): Initialize.
6277 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
6278 Initialize.
6279 (reader): Don't.
6280 (errtoken, eoftoken, undeftoken, axiom): Extern.
6281
6282 2002-04-07 Akim Demaille <akim@epita.fr>
6283
6284 * src/gram.h (rule_s): prec and precsym are now pointers
6285 to the bucket giving the priority/associativity.
6286 Member `associativity' removed: useless.
6287 * src/reduce.c, src/conflicts.c: Adjust.
6288
6289 2002-04-07 Akim Demaille <akim@epita.fr>
6290
6291 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
6292 Properly escape the symbols' TAG when outputting them.
6293
6294 2002-04-07 Akim Demaille <akim@epita.fr>
6295
6296 * src/lalr.h (LA): Is a bitsetv, not bitset*.
6297
6298 2002-04-07 Akim Demaille <akim@epita.fr>
6299
6300 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
6301 (LArule): this, which is an array to rule_t*.
6302 * src/print.c, src/conflicts.c: Adjust.
6303
6304 2002-04-07 Akim Demaille <akim@epita.fr>
6305
6306 * src/gram.h (rule_t): Rename `number' as `user_number'.
6307 `number' is a new member.
6308 Adjust dependencies.
6309 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
6310
6311 2002-04-07 Akim Demaille <akim@epita.fr>
6312
6313 As a result of the previous patch, it is no longer needed
6314 to reorder ritem itself.
6315
6316 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
6317
6318 2002-04-07 Akim Demaille <akim@epita.fr>
6319
6320 Be sure never to walk through RITEMS, but use only data related to
6321 the rules themselves. RITEMS should be banished.
6322
6323 * src/output.c (output_token_translations): Rename as...
6324 (prepare_tokens): this.
6325 In addition to `translate', prepare the muscles `tname' and
6326 `toknum', which were handled by...
6327 (output_rule_data): this.
6328 Remove, and move the remainder of its outputs into...
6329 (prepare_rules): this new routines, which also merges content from
6330 (output_gram): this.
6331 (prepare_rules): Be sure never to walk through RITEMS.
6332 (output_stos): Rename as...
6333 (prepare_stos): this.
6334 (output): Always invoke prepare_states, after all, just don't use it
6335 in the output if you don't need it.
6336
6337 2002-04-07 Akim Demaille <akim@epita.fr>
6338
6339 * src/LR0.c (new_state): Display `nstates' as the name of the
6340 newly created state.
6341 Adjust to initialize first_state and last_state if needed.
6342 Be sure to distinguish the initial from the final state.
6343 (new_states): Create the itemset of the initial state, and use
6344 new_state.
6345 * src/closure.c (closure): Now that the initial state has its
6346 items properly set, there is no need for a special case when
6347 creating `ruleset'.
6348
6349 As a result, now the rule 0, reducing to $axiom, is visible in the
6350 outputs. Adjust the test suite.
6351
6352 * tests/conflicts.at (Solved SR Conflicts)
6353 (Unresolved SR Conflicts): Adjust.
6354 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
6355 * tests/conflicts.at (S/R in initial): New.
6356
6357 2002-04-07 Akim Demaille <akim@epita.fr>
6358
6359 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
6360 the RHS of the rules.
6361 * src/output.c (output_gram): Likewise.
6362
6363 2002-04-07 Akim Demaille <akim@epita.fr>
6364
6365 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
6366 bucket.
6367 Adjust all dependencies.
6368 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
6369 `number' of the buckets too.
6370 * src/gram.h: Include `symtab.h'.
6371 (associativity): Move to...
6372 * src/symtab.h: here.
6373 No longer include `gram.h'.
6374
6375 2002-04-07 Akim Demaille <akim@epita.fr>
6376
6377 * src/gram.h, src/gram.c (rules_rhs_length): New.
6378 (ritem_longest_rhs): Use it.
6379 * src/gram.h (rule_t): `number' is a new member.
6380 * src/reader.c (packgram): Set it.
6381 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
6382 the end of `rules', and count them out of `nrules'.
6383 (reduce_output, dump_grammar): Adjust.
6384 * src/print.c (print_grammar): It is no longer needed to check for
6385 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
6386 * tests/reduce.at (Reduced Automaton): New test.
6387
6388 2002-04-07 Akim Demaille <akim@epita.fr>
6389
6390 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
6391 lacking `+ 1' to nrules, Bison reported as useless a token if it
6392 was used solely to set the precedence of the last rule...
6393
6394 2002-04-07 Akim Demaille <akim@epita.fr>
6395
6396 * data/bison.c++, data/bison.simple: Don't output the current file
6397 name in #line, to avoid useless diffs between two identical
6398 outputs under different names.
6399
6400 2002-04-07 Akim Demaille <akim@epita.fr>
6401
6402 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
6403 Normalize loops to using `< nrules + 1', not `<= nrules'.
6404
6405 2002-04-07 Akim Demaille <akim@epita.fr>
6406
6407 * TODO: Update.
6408
6409 2002-04-07 Akim Demaille <akim@epita.fr>
6410
6411 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
6412 bucket.value as bucket.number.
6413
6414 2002-04-07 Akim Demaille <akim@epita.fr>
6415
6416 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
6417 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
6418 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
6419 RHS, instead of being an index in RITEMS.
6420
6421 2002-04-04 Paul Eggert <eggert@twinsun.com>
6422
6423 * doc/bison.texinfo: Update copyright date.
6424 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
6425 (Symbols): Warn about running Bison in one character set,
6426 but compiling and/or running in an incompatible one.
6427 Warn about character code 256, too.
6428
6429 2002-04-03 Paul Eggert <eggert@twinsun.com>
6430
6431 * src/bison.data (YYSTACK_ALLOC): Depend on whether
6432 YYERROR_VERBOSE is nonzero, not whether it is defined.
6433
6434 Merge changes from bison-1_29-branch.
6435
6436 2002-03-20 Paul Eggert <eggert@twinsun.com>
6437
6438 Merge fixes from Debian bison_1.34-1.diff.
6439
6440 * configure.in (AC_PREREQ): 2.53.
6441
6442 2002-03-20 Akim Demaille <akim@epita.fr>
6443
6444 * src/conflicts.c (log_resolution): Argument `resolution' is const.
6445
6446 2002-03-19 Paul Eggert <eggert@twinsun.com>
6447
6448 * src/bison.simple (YYCOPY): New macro.
6449 (YYSTACK_RELOCATE): Use it.
6450 Remove Type arg; no longer needed. All callers changed.
6451 (yymemcpy): Remove; no longer needed.
6452
6453 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
6454 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6455
6456 2002-03-19 Akim Demaille <akim@epita.fr>
6457
6458 Test and fix the #line outputs.
6459
6460 * tests/atlocal.at (GCC): New.
6461 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
6462 (Prologue synch line, ,%union synch line, Postprologue synch line)
6463 (Action synch line, Epilogue synch line): New tests.
6464 * src/reader.c (parse_union_decl): Define the muscle stype_line.
6465 * data/bison.simple, data/bison.c++: Use it.
6466
6467 2002-03-19 Akim Demaille <akim@epita.fr>
6468
6469 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
6470 (Solved SR Conflicts, %expect not enough, %expect right)
6471 (%expect too much): Move to...
6472 * tests/conflicts.at: this new file.
6473
6474 2002-03-19 Akim Demaille <akim@epita.fr>
6475
6476 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6477 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
6478 that we can move to enums for instance.
6479 * src/output.c (token_definitions_output): Output a list of
6480 `token-name, token-number' instead of the #define.
6481 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
6482
6483 2002-03-14 Akim Demaille <akim@epita.fr>
6484
6485 Use Gettext 0.11.1.
6486
6487 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
6488
6489 * data/bison.c++: Make the user able to add members to the generated
6490 parser by subclassing.
6491
6492 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
6493
6494 * src/reader.c (read_additionnal_code): `c' should be an integer, not
6495 a character.
6496 Reported by Nicolas Tisserand and Nicolas Burrus.
6497
6498 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6499
6500 * src/reader.c: Warn about lacking semi-colons, do not complain.
6501
6502 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6503
6504 * data/bison.c++: Remove a debug line.
6505
6506 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6507
6508 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
6509 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
6510 provide a default implementation.
6511
6512 2002-03-04 Akim Demaille <akim@epita.fr>
6513
6514 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
6515 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
6516 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
6517 * tests/semantic.at (Parsing Guards): Similarly.
6518 * src/reader.at (readgram): Complain if the last rule is not ended
6519 with a semi-colon.
6520
6521 2002-03-04 Akim Demaille <akim@epita.fr>
6522
6523 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
6524 * src/closure.c: here.
6525 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
6526 RTC.
6527 * src/warshall.h, src/warshall.c: Remove.
6528 * tests/sets.at (Broken Closure): Adjust.
6529
6530 2002-03-04 Akim Demaille <akim@epita.fr>
6531
6532 * src/output.c (output_skeleton): tempdir is const.
6533 bytes_read is unused.
6534
6535 2002-03-04 Akim Demaille <akim@epita.fr>
6536
6537 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6538 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
6539 Update.
6540 From Michael Hayes.
6541
6542 2002-03-04 Akim Demaille <akim@epita.fr>
6543
6544 * src/closure.c (closure): `r' is unused.
6545
6546 2002-03-04 Akim Demaille <akim@epita.fr>
6547
6548 * tests/sets.at (Broken Closure): Add the ending `;'.
6549 * src/reader.at (readgram): Complain if a rule is not ended with a
6550 semi-colon.
6551
6552 2002-03-04 Akim Demaille <akim@epita.fr>
6553
6554 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
6555 (count_sr_conflicts): Use bitset_count.
6556 * src/reduce.c (inaccessable_symbols): Ditto.
6557 (bits_size): Remove.
6558 * src/warshall.h, src/warshall.c: Convert to bitsetv.
6559
6560 2002-03-04 Akim Demaille <akim@epita.fr>
6561
6562 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
6563 * src/reduce.c: Remove the `bitset_zero's following the
6564 `bitset_create's, as now it is performed by the latter.
6565
6566 2002-03-04 Akim Demaille <akim@epita.fr>
6567
6568 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
6569 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
6570 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
6571 latest sources from Michael.
6572
6573 2002-03-04 Akim Demaille <akim@epita.fr>
6574
6575 * src/output.c (output): Don't free the grammar.
6576 * src/reader.c (grammar_free): New.
6577 * src/main.c (main): Call it and don't free symtab here.
6578
6579 2002-03-04 Akim Demaille <akim@epita.fr>
6580
6581 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
6582 before returning.
6583 Reported by Benoit Perrot.
6584
6585 2002-03-04 Akim Demaille <akim@epita.fr>
6586
6587 Use bitset operations when possible, not loops over bits.
6588
6589 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
6590 bitset_or.
6591 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
6592 * src/reduce.c (useless_nonterminals): Formatting changes.
6593 * src/warshall.c (TC): Use bitset_or.
6594
6595 2002-03-04 Akim Demaille <akim@epita.fr>
6596
6597 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
6598 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
6599 Ditto.
6600
6601 2002-03-04 Akim Demaille <akim@epita.fr>
6602
6603 * src/lalr.c (F): Now a bitset*.
6604 Adjust all dependencies.
6605
6606 2002-03-04 Akim Demaille <akim@epita.fr>
6607
6608 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
6609 Adjust all dependencies.
6610
6611 2002-03-04 Akim Demaille <akim@epita.fr>
6612
6613 * src/L0.c, src/LR0.h (nstates): Be size_t.
6614 Adjust comparisons (signed vs unsigned).
6615 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
6616 bitset*.
6617 Adjust all dependencies.
6618
6619 2002-03-04 Akim Demaille <akim@epita.fr>
6620
6621 * src/closure.c (firsts): Now, also a bitset.
6622 Adjust all dependencies.
6623 (varsetsize): Remove, now unused.
6624 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
6625
6626 2002-03-04 Akim Demaille <akim@epita.fr>
6627
6628 * src/print.c: Convert to use bitset.h, not hand coded iterations
6629 over ints.
6630
6631 2002-03-04 Akim Demaille <akim@epita.fr>
6632
6633 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
6634
6635 2002-03-04 Akim Demaille <akim@epita.fr>
6636
6637 * src/closure.c (ruleset): Be a bitset.
6638 (rulesetsize): Remove.
6639
6640 2002-03-04 Akim Demaille <akim@epita.fr>
6641
6642 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6643 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
6644 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
6645 * src/closure.c (fderives): Be an array of bitsets.
6646
6647 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
6648
6649 * data/bison.c++: Merge the two generated headers. Insert a copyright
6650 notice in each output file.
6651
6652 2002-02-28 Akim Demaille <akim@epita.fr>
6653
6654 * data/bison.c++: Copy the prologue of bison.simple to fetch
6655 useful M4 definitions, such as b4_header_guard.
6656
6657 2002-02-25 Akim Demaille <akim@epita.fr>
6658
6659 * src/getargs.c (version): Give the name of the authors, and use a
6660 translator friendly scheme for the bgr
6661 copyright notice.
6662
6663 2002-02-25 Akim Demaille <akim@epita.fr>
6664
6665 * src/output.c (header_output): Remove, now handled completely via
6666 M4.
6667
6668 2002-02-25 Akim Demaille <akim@epita.fr>
6669
6670 * m4/m4.m4: New, from CVS Autoconf.
6671 * configure.in: Invoke it.
6672 * src/output.c (output_skeleton): Use its result instead of the
6673 hard coded name.
6674
6675 2002-02-25 Akim Demaille <akim@epita.fr>
6676
6677 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
6678 Fileutils 4.1.5.
6679 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
6680 * src/output.c (output_skeleton): Use mkstemp to create a real
6681 temporary file.
6682 Move the filling of `skeleton' and its muscle to...
6683 (prepare): here.
6684 (output): Move the definition of the prologue muscle to...
6685 (prepare): here.
6686 * src/system.h (DEFAULT_TMPDIR): New.
6687
6688 2002-02-14 Paul Eggert <eggert@twinsun.com>
6689
6690 Remove the support for C++ namespace cleanliness; it was
6691 causing more problems than it was curing, since it didn't work
6692 properly on some nonstandard C++ compilers. This can wait
6693 for a proper C++ parser.
6694
6695 * NEWS: Document this.
6696 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
6697 of C++, as it's treated like C now.
6698 * src/bison.simple (YYSTD): Remove.
6699 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
6700 Treat C++ just like Standard C instead of trying to support
6701 namespace cleanliness.
6702
6703 2002-02-14 Akim Demaille <akim@epita.fr>
6704
6705 * tests/regression.at (else): Adjust to Andreas' change.
6706
6707 2002-02-14 Akim Demaille <akim@epita.fr>
6708
6709 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
6710
6711 2002-02-13 Andreas Schwab <schwab@suse.de>
6712
6713 * src/output.c (output_rule_data): Don't output NULL, it might
6714 not be defined yet.
6715
6716 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
6717
6718 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6719 (Copyright notice): Update.
6720
6721 2002-02-11 Akim Demaille <akim@epita.fr>
6722
6723 * tests/regression.at (%nonassoc and eof): Don't include
6724 nonportable headers.
6725
6726 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
6727
6728 * data/bison.c++: Correct error recovery. Make the user able to
6729 initialize the starting location.
6730
6731 2002-02-07 Akim Demaille <akim@epita.fr>
6732
6733 * tests/input.at: New.
6734
6735 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6736
6737 * data/bison.c++: Replace some direct m4 expansions by constants. Be
6738 more consistent when naming methods and variables. Put preprocessor
6739 directives around tables only needed for debugging.
6740
6741 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6742
6743 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6744 C++ parsers.
6745 (yy::b4_name::parse): Use print_.
6746
6747 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6748
6749 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6750
6751 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6752
6753 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6754 C++ parsers.
6755 (yy::b4_name::parse): Build verbose error messages, and use error_.
6756
6757 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6758
6759 * data/bison.c++: Fix m4 quoting in comments.
6760
6761 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6762
6763 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6764 not expanded by m4.
6765
6766 2002-02-05 Akim Demaille <akim@epita.fr>
6767
6768 * data/bison.c++: Adjust to the M4 back end.
6769 More is certainly needed.
6770
6771 2002-02-05 Akim Demaille <akim@epita.fr>
6772
6773 Give a try to M4 as a back end.
6774
6775 * lib/readpipe.c: New, from wdiff.
6776 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6777 BISON_HAIRY.
6778 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6779 specific values. Now it is m4 that performs the lookup.
6780 * src/parse-skel.y: Remove.
6781 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6782 * src/output.c (actions_output, guards_output)
6783 (token_definitions_output): No longer keeps track of the output
6784 line number, hence remove the second argument.
6785 (guards_output): Check against the guard member of a rule, not the
6786 action member.
6787 Adjust callers.
6788 (output_skeleton): Don't look for the skeleton location, let m4 do
6789 that.
6790 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6791 file will be used.
6792 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6793 (prepare): Given that for the time being changesyntax is not
6794 usable in M4, rename the muscles using `-' to `_'.
6795 Define `defines_flag', `output_parser_name' and `output_header_name'.
6796 * src/output.h (actions_output, guards_output)
6797 (token_definitions_output): Adjust prototypes.
6798 * src/scan-skel.l: Instead of scanning the skeletons, it now
6799 processes the output of m4: `__oline__' and `#output'.
6800 * data/bison.simple: Adjust to be used by M4(sugar).
6801 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6802 to date.
6803 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6804 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6805 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6806 shamelessly stolen from CVS Autoconf.
6807
6808 2002-02-05 Akim Demaille <akim@epita.fr>
6809
6810 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
6811 * configure.in: Check for the declarations of free and malloc.
6812 * src/muscle_tab.c: Adjust.
6813
6814 2002-02-05 Akim Demaille <akim@epita.fr>
6815
6816 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
6817 which have no values.
6818
6819 2002-02-05 Akim Demaille <akim@epita.fr>
6820
6821 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
6822 * data/: here.
6823
6824 2002-01-29 Paul Eggert <eggert@twinsun.com>
6825
6826 * src/bison.simple (YYSIZE_T): Do not define merely because
6827 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
6828 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6829
6830 2002-01-27 Akim Demaille <akim@epita.fr>
6831
6832 Fix `%nonassoc and eof'.
6833
6834 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
6835 which were not properly copied! Replace
6836 memcpy (res->errs, src->errs, src->nerrs);
6837 with
6838 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
6839 !!!
6840 * tests/regression.at (%nonassoc and eof): Adjust to newest
6841 Autotest: `.' is not in the PATH.
6842
6843 2002-01-27 Akim Demaille <akim@epita.fr>
6844
6845 * tests/sets.at (AT_EXTRACT_SETS): New.
6846 (Nullable): Use it.
6847 (Firsts): New.
6848
6849 2002-01-26 Akim Demaille <akim@epita.fr>
6850
6851 * tests/actions.at, tests/calc.at, tests/headers.at,
6852 * tests/torture.at: Adjust to the newest Autotest which no longer
6853 forces `.' in the PATH.
6854
6855 2002-01-25 Akim Demaille <akim@epita.fr>
6856
6857 * tests/regression.at (%nonassoc and eof): New.
6858 Suggested by Robert Anisko.
6859
6860 2002-01-24 Akim Demaille <akim@epita.fr>
6861
6862 Bison dumps core when trying to complain about broken input files.
6863 Reported by Cris van Pelt.
6864
6865 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
6866 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
6867 into...
6868 (Invalid inputs): Strengthen: exercise parse_percent_token.
6869
6870 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
6871
6872 * src/Makefile.am: Add bison.c++.
6873 * src/bison.c++: New skeleton.
6874
6875 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
6876
6877 * po/it.po: New.
6878
6879 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6880
6881 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
6882
6883 2002-01-20 Marc Autret <marc@gnu.org>
6884
6885 * src/files.c (compute_output_file_names): Fix
6886
6887 2002-01-20 Marc Autret <marc@gnu.org>
6888
6889 * tests/output.at: New test.
6890 * src/files.c (compute_base_names): Don't map extensions when
6891 the YACC flag is set, use defaults.
6892 Reported by Evgeny Stambulchik.
6893
6894 2002-01-20 Marc Autret <marc@gnu.org>
6895
6896 * src/system.h: Need to define __attribute__ away for non-GCC
6897 compilers as well (i.e. the vendor C compiler).
6898 Suggested by Albert Chin-A-Young.
6899
6900 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
6901
6902 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
6903 canonical definition.
6904 * src/system.h: Use the canonical definition for PARAMS (avoids
6905 a conflict with the macro from lib/hash.h).
6906
6907 2002-01-11 Akim Demaille <akim@epita.fr>
6908
6909 * configure.in: Use AC_FUNC_STRNLEN.
6910 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
6911
6912 2002-01-09 Akim Demaille <akim@epita.fr>
6913
6914 * src/files.c, src/files.h (output_infix): New.
6915 (tab_extension): Remove.
6916 (compute_base_names): Compute the former, drop the latter.
6917 * src/output.c (prepare): Insert the muscles `output-infix', and
6918 `output-suffix'.
6919 * src/parse-skel.y (string, string.1): New.
6920 (section.header): Use it.
6921 (section.yacc): Remove.
6922 (prefix): Remove too.
6923 * src/scan-skel.l: Adjust.
6924 * src/bison.simple, src/bison.hairy: Adjust.
6925
6926 2002-01-09 Akim Demaille <akim@epita.fr>
6927
6928 * configure.in (WERROR_CFLAGS): Compute it.
6929 * src/Makefile.am (CFLAGS): Pass it.
6930 * tests/atlocal.in (CFLAGS): Idem.
6931 * src/files.c: Fix a few warnings.
6932 (get_extension_index): Remove, unused.
6933
6934 2002-01-08 Akim Demaille <akim@epita.fr>
6935
6936 * src/getargs.c (AS_FILE_NAME): New.
6937 (getargs): Use it to convert DOSish file names.
6938 * src/files.c (base_name): Rename as full_base_name to avoid
6939 clashes with `base_name ()'.
6940 (filename_split): New.
6941 (compute_base_names): N-th rewrite, using filename_split.
6942
6943 2002-01-08 Akim Demaille <akim@epita.fr>
6944
6945 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
6946 New, stolen from the Fileutils 4.1.
6947 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6948 * configure.in: Check for the presence of memrchr, and of its
6949 prototype.
6950
6951 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
6952
6953 * lib/hash.h (__P): Added definition for this macro.
6954 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
6955 BUILT_SOURCES, to ensure they are generated first.
6956 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
6957 %error-verbose to allow bootstrapping with bison 1.30x.
6958
6959 2002-01-06 Akim Demaille <akim@epita.fr>
6960
6961 * src/reader.c (parse_braces): Don't fetch the next char, the
6962 convention is to fetch on entry.
6963 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
6964 'switch' without a following semicolon.
6965 * tests/regression.at (braces parsing): New.
6966
6967 2002-01-06 Akim Demaille <akim@epita.fr>
6968
6969 Bison is dead wrong in its RR conflict reports.
6970
6971 * tests/torture.at (GNU Cim Grammar): New.
6972 * src/conflicts.c (count_rr_conflicts): Fix.
6973
6974 2002-01-06 Akim Demaille <akim@epita.fr>
6975
6976 Creating package.m4 from configure.ac causes too many problems.
6977
6978 * tests/Makefile.am (package.m4): Create it by hand,
6979 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
6980
6981 2002-01-06 Akim Demaille <akim@epita.fr>
6982
6983 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
6984 skeleton.h.
6985
6986 2002-01-04 Paul Eggert <eggert@twinsun.com>
6987
6988 * doc/bison.texinfo (Debugging):
6989 Remove YYSTDERR; it's no longer defined or used.
6990 Also, s/cstdio.h/cstdio/.
6991
6992 2002-01-03 Akim Demaille <akim@epita.fr>
6993
6994 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
6995
6996 2002-01-03 Akim Demaille <akim@epita.fr>
6997
6998 * src/parse-skel.y (process_skeleton): Don't bind the parser's
6999 tracing code to --trace, wait for a better --trace option, with
7000 args.
7001
7002 2002-01-03 Akim Demaille <akim@epita.fr>
7003
7004 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
7005 The ISO C++ standard is extremely clear about it: stderr is
7006 considered a macro, not a regular symbol (see table 94 `Header
7007 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
7008 Therefore std:: does not apply to it. It still does with fprintf.
7009 Also, s/cstdio.h/cstdio/.
7010
7011 2002-01-03 Akim Demaille <akim@epita.fr>
7012
7013 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
7014 for non system headers.
7015
7016 2002-01-02 Akim Demaille <akim@epita.fr>
7017
7018 Equip the skeleton chain with location tracking, runtime trace,
7019 pure parser and scanner.
7020
7021 * src/parse-skel.y: Request a pure parser, locations, and prefix
7022 renaming.
7023 (%union): Having several members with the same type does not help
7024 type mismatches, simplify.
7025 (YYPRINT, yyprint): New.
7026 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
7027 (skel_error): this.
7028 Handle locations.
7029 * src/scan-skel.l: Adjust to these changes.
7030 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
7031 (LOCATION_PRINT, skel_control_t): New.
7032
7033 2001-12-30 Akim Demaille <akim@epita.fr>
7034
7035 * src/parse-skel.y: Get rid of the shift/reduce conflict:
7036 replace `gb' with BLANKS.
7037 * src/scan-skel.l: Adjust.
7038
7039 2001-12-30 Akim Demaille <akim@epita.fr>
7040
7041 * src/system.h: We don't need nor want bcopy.
7042 Throw away MS-DOS crap: we don't need getpid.
7043 * configure.in: We don't need strndup. It was even causing
7044 problems: because Flex includes the headers *before* us,
7045 _GNU_SOURCE is not defined by config.h, and therefore strndup was
7046 not visible.
7047 * lib/xstrndup.c: New.
7048 * src/scan-skel.l: Use it.
7049 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
7050 * src/parse-skel.y: Use %directives instead of #defines.
7051
7052 2001-12-30 Akim Demaille <akim@epita.fr>
7053
7054 * src/skeleton.h: New.
7055 * src/output.c (output_parser, output_master_parser): Remove, dead
7056 code.
7057 * src/output.h (get_lines_number, actions_output, guards_output)
7058 (token_definitions_output): Prototype them.
7059 * src/parse-skel.y: Add the license notice.
7060 Include output.h and skeleton.h.
7061 (process_skeleton): Returns void, and takes a single parameter.
7062 * src/scan-skel.l: Add the license notice.
7063 Include skeleton.h.
7064 Don't use %option yylineno: it seems that then Flex imagines
7065 REJECT has been used, and therefore it won't reallocate its
7066 buffers (which makes no other sense to me than a bug). It results
7067 in warnings for `unused: yy_flex_realloc'.
7068
7069 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
7070
7071 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
7072 (MUSCLE_INSERT_PREFIX): ...to there.
7073 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
7074 (MUSCLE_INSERT_PREFIX): Move from here...
7075
7076 * src/bison.hairy: Add a section directive. Put braces around muscle
7077 names. This parser skeleton is still broken, but Bison should not
7078 choke on a bad muscle 'syntax'.
7079 * src/bison.simple: Add a section directive. Put braces around muscle
7080 names.
7081
7082 * src/files.h (strsuffix, stringappend): Add declarations.
7083 (tab_extension): Add declaration.
7084 (short_base_name): Add declaration.
7085
7086 * src/files.c (strsuffix, stringappend): No longer static. These
7087 functions are used in the skeleton parser.
7088 (tab_extension): New.
7089 (compute_base_names): Use the computations done in this function
7090 to guess if the generated parsers should have '.tab' in their
7091 names.
7092 (short_base_name): No longer static.
7093
7094 * src/output.c (output_skeleton): New.
7095 (output): Disable call to output_master_parser, and give a try to
7096 a new skeleton handling system.
7097 (guards_output, actions_output): No longer static.
7098 (token_definitions_output, get_lines_number): No longer static.
7099
7100 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
7101
7102 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
7103 parse-skel.y.
7104
7105 * src/parse-skel.y: New file.
7106 * src/scan-skel.l: New file.
7107
7108 2001-12-29 Akim Demaille <akim@epita.fr>
7109
7110 %name-prefix is broken.
7111
7112 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
7113 Adjust all dependencies.
7114 * tests/headers.at (export YYLTYPE): Strengthen this test: use
7115 %name-prefix.
7116
7117 Renaming yylval but not yylloc is not consistent. Now we do.
7118
7119 * src/bison.simple: Prefix yylloc if used.
7120 * doc/bison.texinfo (Decl Summary): Document that.
7121
7122 2001-12-29 Akim Demaille <akim@epita.fr>
7123
7124 * doc/bison.texinfo: Promote `%long-directive' over
7125 `%long_directive'.
7126 Remove all references to fixed-output-files, yacc is enough.
7127
7128 2001-12-29 Akim Demaille <akim@epita.fr>
7129
7130 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
7131 user prologue. These are defaults.
7132 * tests/actions.at (Mid-rule actions): Make sure the user can
7133 define YYDEBUG and YYERROR_VERBOSE.
7134
7135 2001-12-29 Akim Demaille <akim@epita.fr>
7136
7137 * src/output.c (header_output): Don't forget to export YYLTYPE and
7138 yylloc.
7139 * tests/headers.at (export YYLTYPE): New, make sure it does.
7140 * tests/regression.at (%union and --defines, Invalid CPP headers):
7141 Move to...
7142 * tests/headers.at: here.
7143
7144 2001-12-29 Akim Demaille <akim@epita.fr>
7145
7146 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
7147
7148 2001-12-29 Akim Demaille <akim@epita.fr>
7149
7150 * tests/actions.at (Mid-rule actions): Output on a single line
7151 instead of several.
7152
7153 2001-12-29 Akim Demaille <akim@epita.fr>
7154
7155 * doc/bison.texinfo: Formatting changes.
7156
7157 2001-12-29 Akim Demaille <akim@epita.fr>
7158
7159 Don't store the token defs in a muscle, just be ready to output it
7160 on command. Now possible via `symbols'. Fixes a memory leak.
7161
7162 * src/output.c (token_definitions_output): New.
7163 (output_parser, header_output): Use it.
7164 * src/reader.c (symbols_save): Remove.
7165
7166 2001-12-29 Akim Demaille <akim@epita.fr>
7167
7168 * src/bison.simple: Do not provide a default for YYSTYPE and
7169 YYLTYPE before the user's prologue. Otherwise it's hardly... a
7170 default.
7171
7172 2001-12-29 Akim Demaille <akim@epita.fr>
7173
7174 Mid-rule actions are simply... ignored!
7175
7176 * src/reader.c (readgram): Be sure to attach mid-rule actions to
7177 the empty-rule associated to the dummy symbol, not to the host
7178 rule.
7179 * tests/actions.at (Mid-rule actions): New.
7180
7181 2001-12-29 Akim Demaille <akim@epita.fr>
7182
7183 Memory leak.
7184
7185 * src/reader.c (reader): Free grammar.
7186
7187 2001-12-29 Akim Demaille <akim@epita.fr>
7188
7189 Memory leak.
7190
7191 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
7192 since it allocates it for each state, although only one is needed.
7193 (allocate_storage): Do it here.
7194
7195 2001-12-29 Akim Demaille <akim@epita.fr>
7196
7197 * src/options.h, src/options.c (create_long_option_table): Rename
7198 as...
7199 (long_option_table_new): this, with a clearer prototype.
7200 (percent_table): Remove, unused,
7201 * src/getargs.c (getargs): Adjust.
7202
7203 2001-12-29 Akim Demaille <akim@epita.fr>
7204
7205 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
7206 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
7207 as states.
7208
7209 2001-12-29 Akim Demaille <akim@epita.fr>
7210
7211 * src/lalr.c (build_relations): Rename `states' as `states1'.
7212 Sorry, I don't understand exactly what it is, no better name...
7213
7214 2001-12-29 Akim Demaille <akim@epita.fr>
7215
7216 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
7217 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
7218 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
7219 as rules.
7220
7221 2001-12-29 Akim Demaille <akim@epita.fr>
7222
7223 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
7224 ago.
7225
7226 2001-12-29 Akim Demaille <akim@epita.fr>
7227
7228 * src/reader.c, src/reader.h (user_toknums): Remove.
7229 Adjust all users to use symbols[i]->user_token_number.
7230
7231 2001-12-29 Akim Demaille <akim@epita.fr>
7232
7233 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
7234 Adjust all users to use symbols[i]->prec or ->assoc.
7235
7236 2001-12-29 Akim Demaille <akim@epita.fr>
7237
7238 * src/reader.c, src/reader.h (tags): Remove.
7239 Adjust all users to use symbols[i]->tag.
7240
7241 2001-12-29 Akim Demaille <akim@epita.fr>
7242
7243 * src/gram.h, src/gram.c (symbols): New, similar to state_table
7244 and rule_table.
7245 * src/reader.c (packsymbols): Fill this table.
7246 Drop sprec.
7247 * src/conflicts.c (resolve_sr_conflict): Adjust.
7248 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
7249 single table.
7250 Use symbols[i]->tag instead of tags[i].
7251
7252 2001-12-29 Akim Demaille <akim@epita.fr>
7253
7254 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
7255 In addition, put a comment in there, to replace...
7256 * tests/regression.at (%union and C comments): Remove.
7257
7258 2001-12-29 Akim Demaille <akim@epita.fr>
7259
7260 * tests/regression.at (Web2c Actions): Blindly move the actual
7261 output as expected output. The contents *seem* right to me, but I
7262 can't pretend reading perfectly parser tables... Nonetheless, all
7263 the other tests pass correctly, the table look OK, even though the
7264 presence of `$axiom' is to be noted: AFAICS it is useless (but
7265 harmless).
7266
7267 2001-12-29 Akim Demaille <akim@epita.fr>
7268
7269 * src/reader.c (readgram): Don't add the rule 0 if there were no
7270 rules read. In other words, add it _after_ having performed
7271 grammar sanity checks.
7272 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
7273
7274 2001-12-29 Akim Demaille <akim@epita.fr>
7275
7276 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
7277 visible, and some states have now a different number.
7278
7279 2001-12-29 Akim Demaille <akim@epita.fr>
7280
7281 * src/reader.c (readgram): Bind the initial rule's lineno to that
7282 of the first rule.
7283 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
7284 (Solved SR Conflicts): Adjust rule 0's line number.
7285
7286 2001-12-29 Akim Demaille <akim@epita.fr>
7287
7288 Fix the `GAWK Grammar' failure.
7289
7290 * src/LR0.c (final_state): Initialize to -1 so that we do compute
7291 the reductions of the first state which was mistakenly confused
7292 with the final state because precisely final_state was initialized
7293 to 0.
7294 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
7295 now noticed by Bison.
7296 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
7297 have a reduction on $default.
7298
7299 2001-12-29 Akim Demaille <akim@epita.fr>
7300
7301 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
7302 rule line numbers.
7303 * src/closure.c (print_closure): Likewise.
7304 * src/derives.c (print_derives): Likewise.
7305 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
7306 now.
7307
7308 2001-12-29 Akim Demaille <akim@epita.fr>
7309
7310 * src/lalr.c (lookaheads_print): New.
7311 (lalr): Call it when --trace-flag.
7312 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
7313 are dumped.
7314
7315 2001-12-29 Akim Demaille <akim@epita.fr>
7316
7317 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
7318 when walking through ritem, even via rule->rhs.
7319 * src/reduce.c (dump_grammar, useful_production, reduce_output)
7320 (useful_production, useless_nonterminals): Likewise.
7321 (reduce_grammar_tables): Likewise, plus update nritems.
7322 * src/nullable.c (set_nullable): Likewise.
7323 * src/lalr.c (build_relations): Likewise.
7324 * tests/sets.at (Nullable): Adjust.
7325 Fortunately, now, the $axiom is no longer nullable.
7326
7327 2001-12-29 Akim Demaille <akim@epita.fr>
7328
7329 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
7330 the 0-sentinel.
7331 * src/gram.c (ritem_longest_rhs): Likewise.
7332 * src/reduce.c (nonterminals_reduce): Likewise.
7333 * src/print_graph.c (print_graph): Likewise.
7334 * src/output.c (output_rule_data): Likewise.
7335 * src/nullable.c (set_nullable): Likewise.
7336
7337 2001-12-29 Akim Demaille <akim@epita.fr>
7338
7339 * src/output.c: Comment changes.
7340
7341 2001-12-27 Paul Eggert <eggert@twinsun.com>
7342
7343 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
7344 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
7345 Sparc, as they were causing more porting problems than the
7346 (minor) performance improvement was worth.
7347
7348 Also, catch up with 1.31's YYSTD.
7349
7350 2001-12-27 Akim Demaille <akim@epita.fr>
7351
7352 * src/output.c (output_gram): Rely on nritems, not the
7353 0-sentinel. See below.
7354 Use -1 as separator, not 0.
7355 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
7356 Rely on -1 as separator in yyrhs, instead of 0.
7357 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
7358 twice `Now at end of input', therefore there are two lines less to
7359 expect.
7360
7361 2001-12-27 Akim Demaille <akim@epita.fr>
7362
7363 * tests/regression.at (Unresolved SR Conflicts):
7364 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
7365 below.
7366
7367 2001-12-27 Akim Demaille <akim@epita.fr>
7368
7369 * src/LR0.c (new_state): Recognize the final state by the fact it
7370 is reached by eoftoken.
7371 (insert_start_shifting_state, insert_eof_shifting_state)
7372 (insert_accepting_state, augment_automaton): Remove, since now
7373 these states are automatically computed from the initial state.
7374 (generate_states): Adjust.
7375 * src/print.c: When reporting a rule number to the user, substract
7376 1, so that the axiom rule is rule 0, and the first user rule is 1.
7377 * src/reduce.c: Likewise.
7378 * src/print_graph.c (print_core): For the time being, just as for
7379 the report, depend upon --trace-flags to dump the full set of
7380 items.
7381 * src/reader.c (readgram): Once the grammar read, insert the rule
7382 0: `$axiom: START-SYMBOL $'.
7383 * tests/set.at: Adjust: rule 0 is now displayed, and since the
7384 number of the states has changed (the final state is no longer
7385 necessarily the last), catch up.
7386
7387 2001-12-27 Akim Demaille <akim@epita.fr>
7388
7389 Try to make the use of the eoftoken valid. Given that its value
7390 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
7391 is used instead of > 0 where appropriate, (ii), depend upon nritems
7392 instead of the 0-sentinel.
7393
7394 * src/gram.h, src/gram.c (nritems): New.
7395 Expected to be duplication of nitems, but for the time being...
7396 * src/reader.c (packgram): Assert nritems and nitems are equal.
7397 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
7398 * src/closure.c (print_closure, print_fderives): Likewise.
7399 * src/gram.c (ritem_print): Likewise.
7400 * src/print.c (print_core, print_grammar): Likewise.
7401 * src/print_graph.c: Likewise.
7402
7403 2001-12-27 Akim Demaille <akim@epita.fr>
7404
7405 * src/main.c (main): If there are complains after grammar
7406 reductions, then output the report anyway if requested, then die.
7407 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
7408 * src/reader.c (eoftoken): New.
7409 (parse_token_decl): If the token being defined has value `0', it
7410 is the eoftoken.
7411 (packsymbols): No longer hack `tags' to insert `$' by hand.
7412 Be sure to preserve the value of the eoftoken.
7413 (reader): Make sure eoftoken is defined.
7414 Initialize nsyms to 0: now eoftoken is created just like the others.
7415 * src/print.c (print_grammar): Don't special case the eof token.
7416 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
7417 lie anyway, albeit pleasant.
7418 * tests/calc.at: Exercise error messages with eoftoken.
7419 Change the grammar so that empty input is invalid.
7420 Adjust expectations.
7421 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
7422
7423 2001-12-27 Akim Demaille <akim@epita.fr>
7424
7425 * configure.in: Check the protos of strchr ans strspn.
7426 Replace strchr if needed.
7427 * src/system.h: Provide the protos of strchr, strspn and memchr if
7428 missing.
7429 * lib/strchr.c: New.
7430 * src/reader.c (symbols_save): Use strchr.
7431
7432 2001-12-27 Akim Demaille <akim@epita.fr>
7433
7434 * src/print.c, src/print_graph.c (escape): New.
7435 Use it to quote the TAGS outputs.
7436 * src/print_graph.c (print_state): Now errors are in red, and
7437 reductions in green.
7438 Prefer high to wide: output the state number on a line of its own.
7439
7440 2001-12-27 Akim Demaille <akim@epita.fr>
7441
7442 * src/state.h, src/state.c (reductions_new): New.
7443 * src/LR0.c (set_state_table): Let all the states have a
7444 `reductions', even if reduced to 0.
7445 (save_reductions): Adjust.
7446 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
7447 * src/print.c (print_reductions, print_actions): Adjust.
7448 * src/output.c (action_row): Adjust.
7449
7450 2001-12-27 Akim Demaille <akim@epita.fr>
7451
7452 * src/state.h, src/state.c (errs_new, errs_dup): New.
7453 * src/LR0.c (set_state_table): Let all the states have an errs,
7454 even if reduced to 0.
7455 * src/print.c (print_errs, print_reductions): Adjust.
7456 * src/output.c (output_actions, action_row): Adjust.
7457 * src/conflicts.c (resolve_sr_conflict): Adjust.
7458
7459 2001-12-27 Akim Demaille <akim@epita.fr>
7460
7461 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
7462
7463 2001-12-27 Akim Demaille <akim@epita.fr>
7464
7465 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
7466 * src/print.c: here.
7467 (lookaheadset, shiftset): New, used as additional storage by
7468 print_reductions.
7469 (print_results): Adjust.
7470 (print_shifts, print_gotos, print_errs): New, extracted from...
7471 (print_actions): here.
7472 * src/print_graph.c (print_actions): Remove dead code.
7473
7474 2001-12-27 Akim Demaille <akim@epita.fr>
7475
7476 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
7477 `$n' and `@n'.
7478
7479 2001-12-27 Akim Demaille <akim@epita.fr>
7480
7481 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
7482 (build_relations): Adjust.
7483
7484 2001-12-27 Akim Demaille <akim@epita.fr>
7485
7486 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
7487 duplication.
7488
7489 2001-12-27 Akim Demaille <akim@epita.fr>
7490
7491 * src/reader.c (packgram): Catch nitems overflows.
7492
7493 2001-12-27 Akim Demaille <akim@epita.fr>
7494
7495 * src/files.c, src/files.h (guard_obstack): Remove.
7496 * src/output.c (output): Adjust.
7497 * src/reader.c (parse_braces): New, factoring...
7498 (copy_action, copy_guard): these two which are renamed as...
7499 (parse_action, parse_guard): these.
7500 As a voluntary consequence, using braces around guards is now
7501 mandatory.
7502
7503 2001-12-27 Akim Demaille <akim@epita.fr>
7504
7505 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
7506 * src/reader.c (symbol_list): `guard' and `guard_line' are new
7507 members.
7508 (symbol_list_new): Adjust.
7509 (copy_action): action_line is the first line, not the last.
7510 (copy_guard): Just as for actions, store the `action' only, not
7511 the switch/case/break flesh.
7512 Don't parse the user action that might follow the guard, let...
7513 (readgram): do it, i.e., now, there can be an action after a
7514 guard.
7515 In other words the guard is just explicitly optional.
7516 (packgram): Adjust.
7517 * src/output.c (guards_output): New.
7518 (output_parser): Call it when needed.
7519 (output): Also free the guard and attrs obstacks.
7520 * src/files.c, src/files.h (obstack_save): Remove.
7521 (output_files): Remove.
7522 As a result, if one needs the former `.act' file, using an
7523 appropriate skeleton which requires actions and guards is now
7524 required.
7525 * src/main.c (main): Adjust.
7526 * tests/semantic.at: New.
7527 * tests/regression.at: Use `input.y' as input file name.
7528 Avoid 8+3 problems by requiring input.c when the test needs the
7529 parser.
7530
7531 2001-12-27 Akim Demaille <akim@epita.fr>
7532
7533 * src/reader.c (symbol_list_new): Be sure to initialize all the
7534 fields.
7535
7536 2001-12-27 Akim Demaille <akim@epita.fr>
7537
7538 All the hacks using a final pseudo state are now useless.
7539
7540 * src/LR0.c (set_state_table): state_table holds exactly nstates.
7541 * src/lalr.c (nLA): New.
7542 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
7543 instead of lookaheadsp from the pseudo state (nstate + 1).
7544
7545 2001-12-27 Akim Demaille <akim@epita.fr>
7546
7547 * src/output.c (action_row, token_actions): Use a state_t instead
7548 of a integer, and nlookaheads instead of the following state's
7549 lookaheadsp.
7550
7551 2001-12-27 Akim Demaille <akim@epita.fr>
7552
7553 * src/conflicts.c (log_resolution, flush_shift)
7554 (resolve_sr_conflict, set_conflicts, solve_conflicts)
7555 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
7556 (conflicts_print, print_reductions): Use a state_t instead of an
7557 integer when referring to a state.
7558 As much as possible, depend upon nlookaheads, instead of the
7559 `lookaheadsp' member of the following state (since lookaheads of
7560 successive states are successive, the difference between state n + 1
7561 and n served as the number of lookaheads for state n).
7562 * src/lalr.c (add_lookback_edge): Likewise.
7563 * src/print.c (print_core, print_actions, print_state)
7564 (print_results): Likewise.
7565 * src/print_graph.c (print_core, print_actions, print_state)
7566 (print_graph): Likewise.
7567 * src/conflicts.h: Adjust.
7568
7569 2001-12-27 Akim Demaille <akim@epita.fr>
7570
7571 * src/bison.hairy: Formatting/comment changes.
7572 ANSIfy.
7573 Remove `register' indications.
7574 Add plenty of `static'.
7575
7576 2001-12-27 Akim Demaille <akim@epita.fr>
7577
7578 * src/output.c (prepare): Drop the muscle `ntbase' which
7579 duplicates ntokens.
7580 * src/bison.simple: Formatting/comment changes.
7581 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
7582 is an undocumented synonym.
7583
7584 2001-12-22 Akim Demaille <akim@epita.fr>
7585
7586 * src/output.c (output_table_data): Change the prototype to use
7587 `int' for array ranges: some invocations do pass an int, not a
7588 short.
7589 Reported by Wayne Green.
7590
7591 2001-12-22 Akim Demaille <akim@epita.fr>
7592
7593 Some actions of web2c.y are improperly triggered.
7594 Reported by Mike Castle.
7595
7596 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
7597 * tests/regression.at (Web2c): Rename as...
7598 (Web2c Report): this.
7599 (Web2c Actions): New.
7600
7601 2001-12-22 Akim Demaille <akim@epita.fr>
7602
7603 Reductions in web2c.y are improperly reported.
7604 Reported by Mike Castle.
7605
7606 * src/conflicts.c (print_reductions): Fix.
7607 * tests/regression.at (Web2c): New.
7608
7609 2001-12-18 Akim Demaille <akim@epita.fr>
7610
7611 Some host fail on `assert (!"foo")', which expands to
7612 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
7613 Reported by Nelson Beebee.
7614
7615 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
7616 `#define it_succeeded 0' and `assert (it_succeeded)'.
7617
7618 2001-12-17 Marc Autret <autret_m@epita.fr>
7619
7620 * src/bison.simple: Don't hard code the skeleton line and filename.
7621 * src/output.c (output_parser): Rename 'line' as 'output_line'.
7622 New line counter 'skeleton_line' (skeleton-line muscle).
7623
7624 2001-12-17 Paul Eggert <eggert@twinsun.com>
7625
7626 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
7627 YYDEBUG must be defined to a nonzero value.
7628
7629 * src/bison.simple (yytname): Do not assume that the user defines
7630 YYDEBUG to a properly parenthesized expression.
7631
7632 2001-12-17 Akim Demaille <akim@epita.fr>
7633
7634 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
7635 nlookaheads is a new member.
7636 Adjust all users.
7637 * src/lalr.h (nlookaheads): Remove this orphan declaration.
7638 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
7639 state.
7640
7641 2001-12-17 Akim Demaille <akim@epita.fr>
7642
7643 * src/files.h, src/files.c (open_files, close_files): Remove.
7644 * src/main.c (main): Don't open/close files, nor invoke lex_free,
7645 let...
7646 * src/reader.c (reader): Do it.
7647
7648 2001-12-17 Akim Demaille <akim@epita.fr>
7649
7650 * src/conflicts.c (print_reductions): Formatting changes.
7651
7652 2001-12-17 Akim Demaille <akim@epita.fr>
7653
7654 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
7655 (flush_reduce): New.
7656 (resolve_sr_conflict): Adjust.
7657
7658 2001-12-17 Akim Demaille <akim@epita.fr>
7659
7660 * src/output.c (output_obstack): Be static and rename as...
7661 (format_obstack): this, to avoid any confusion with files.c's
7662 output_obstack.
7663 * src/reader.h (muscle_obstack): Move to...
7664 * src/output.h: here, since it's defined in output.c.
7665
7666 2001-12-17 Akim Demaille <akim@epita.fr>
7667
7668 * src/output.c (action_row, save_column, default_goto)
7669 (sort_actions, matching_state, pack_vector): Better variable
7670 locality.
7671
7672 2001-12-17 Akim Demaille <akim@epita.fr>
7673
7674 * src/output.c: Various formatting changes.
7675
7676 2001-12-17 Akim Demaille <akim@epita.fr>
7677
7678 * src/files.c (output_files): Free the output_obstack.
7679 * src/main.c (main): Call print and print_graph conditionally.
7680 * src/print.c (print): Work unconditionally.
7681 * src/print_graph.c (print_graph): Work unconditionally.
7682 * src/conflicts.c (log_resolution): Output only if verbose_flag.
7683
7684 2001-12-16 Marc Autret <autret_m@epita.fr>
7685
7686 * src/output.c (actions_output): Fix. When we use %no-lines,
7687 there is one less line per action.
7688
7689 2001-12-16 Marc Autret <autret_m@epita.fr>
7690
7691 * src/bison.simple: Remove a useless #line directive.
7692 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
7693 * src/output.c (get_lines_number): New.
7694 (output_parser): Adjust, now takes care about the lines of a
7695 output muscles.
7696 Fix line numbering.
7697 (actions_output): Computes the number of lines taken by actions.
7698 (output_master_parser): Insert new skeleton which is the name of
7699 the output parser file name.
7700
7701 2001-12-15 Marc Autret <autret_m@epita.fr>
7702
7703 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
7704
7705 2001-12-15 Marc Autret <autret_m@epita.fr>
7706
7707 * src/output.c (output_gram): Keep track of the hairy one.
7708
7709 2001-12-15 Akim Demaille <akim@epita.fr>
7710
7711 Make `make distcheck' work.
7712
7713 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
7714 system.h which uses libgettext.h.
7715
7716 2001-12-15 Akim Demaille <akim@epita.fr>
7717
7718 * src/nullable.c (set_nullable): Useless rules must be skipped,
7719 otherwise, since we range over their symbols, we might look at a
7720 nonterminal which no longer ``exists'', i.e., it is not counted in
7721 `nvars', hence we overflow our arrays.
7722
7723 2001-12-15 Akim Demaille <akim@epita.fr>
7724
7725 The header can also be produced directly, without any obstack!
7726 Yahoo!
7727
7728 * src/files.c, src/files.h (defines_obstack): Remove.
7729 (compute_header_macro): Global.
7730 (defines_obstack_save): Remove.
7731 * src/reader.c (parse_union_decl): No longer output to
7732 defines_obstack: its content can be found in the `stype' muscle
7733 anyway.
7734 (output_token_translations): Merge into...
7735 (symbols_output): this.
7736 Rename as...
7737 (symbols_save): this.
7738 (reader): Adjust.
7739 * src/output.c (header_output): New.
7740 (output): Call it.
7741
7742 2001-12-15 Akim Demaille <akim@epita.fr>
7743
7744 * src/reader.c (parse_union_decl): Instead of handling two obstack
7745 simultaneously, use one to define the `stype' muscle, and use the
7746 value of the latter to fill defines_obstack.
7747 (copy_comment): Remove.
7748 (copy_comment2): Work for a single obstack.
7749 Rename as...
7750 (copy_comment): this.
7751
7752 2001-12-15 Akim Demaille <akim@epita.fr>
7753
7754 * src/lex.c, src/lex.h (xgetc): No longer static.
7755 * src/reader.c (parse_union_decl): Revamp.
7756
7757 2001-12-15 Akim Demaille <akim@epita.fr>
7758
7759 Still making progress in separating Bison into (i) input, (ii)
7760 process, (iii) output: now we can directly output the parser file
7761 without using table_obstack at all.
7762
7763 * src/files.c, src/files.h (table_obstack): Bye bye.
7764 (parser_file_name): New.
7765 * src/files.c (compute_output_file_names): Compute it.
7766 * src/output.c (actions_output, output_parser)
7767 (output_master_parser): To a file instead of an obstack.
7768
7769 2001-12-15 Akim Demaille <akim@epita.fr>
7770
7771 Attach actions to rules, instead of pre-outputting them to
7772 actions_obstack.
7773
7774 * src/gram.h (rule_t): action and action_line are new members.
7775 * src/reader.c (symbol_list): Likewise.
7776 (copy_action): Save the actions within the rule.
7777 (packgram): Save them in rule_table.
7778 * src/output.c (actions_output): New.
7779 (output_parser): Use it on `%%actions'.
7780 (output_rule_data): Don't free rule_table.
7781 (output): Do it.
7782 (prepare): Don't save the `action' muscle.
7783 * src/bison.simple: s/%%action/%%actions/.
7784
7785 2001-12-15 Akim Demaille <akim@epita.fr>
7786
7787 * src/reader.c (copy_action): When --yacc, don't append a `;'
7788 to the user action: let it fail if lacking.
7789 Suggested by Arnold Robbins and Tom Tromey.
7790
7791 2001-12-14 Akim Demaille <akim@epita.fr>
7792
7793 * src/lex.c (literalchar): Simply return the char you decoded, non
7794 longer mess around with obstacks and int pointers.
7795 Adjust all callers.
7796
7797 2001-12-14 Akim Demaille <akim@epita.fr>
7798
7799 * src/lex.c (literalchar): Don't escape the special characters,
7800 just decode them, and keep them as char (before, eol was output as
7801 the 2 char string `\n' etc.).
7802 * src/output.c (output_rule_data): Use quotearg to output the
7803 token strings.
7804
7805 2001-12-13 Paul Eggert <eggert@twinsun.com>
7806
7807 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
7808 Do not infringe on the global user namespace when using C++.
7809 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
7810 All uses of `fprintf' and `stderr' changed.
7811
7812 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
7813
7814 2001-12-13 Akim Demaille <akim@epita.fr>
7815
7816 The computation of nullable is broken: it doesn't handle empty
7817 RHS's properly.
7818
7819 * tests/torture.at (GNU AWK Grammar): New.
7820 * tests/sets.at (Nullable): New.
7821 * src/nullable.c (set_nullable): Instead of blindly looping over
7822 `ritems', loop over the rules, and then over their rhs's.
7823
7824 Work around Autotest bugs.
7825
7826 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
7827 frame, because Autotest understand lines starting with a `+' as
7828 traces from the shell. Then, they are not processed properly.
7829 Admittedly an Autotest bug, but we don't have time to wait for
7830 Autotest to catch up.
7831 * tests/regression.at (Broken Closure): Adjust to the new table
7832 frames.
7833 Move to...
7834 * tests/sets.at: here.
7835
7836 2001-12-13 Akim Demaille <akim@epita.fr>
7837
7838 * src/closure.c (closure): Use nrules instead of playing tricks
7839 with BITS_PER_WORD.
7840
7841 2001-12-13 Akim Demaille <akim@epita.fr>
7842
7843 * src/print.c (print_actions): Output the handling of `$' as the
7844 traces do: shifting the token EOF. Before EOF was treated as a
7845 nonterminal.
7846 * tests/regression.at: Adjust some tests.
7847 * src/print_graph.c (print_core): Complete the set of items via
7848 closure. The next-to-final and final states are still unsatisfying,
7849 but that's to be addressed elsewhere.
7850 No longer output the rule numbers, but do output the state number.
7851 A single loop for the shifts + gotos is enough, but picked a
7852 distinct color for each.
7853 (print_graph): Initialize and finalize closure.
7854
7855 2001-12-13 Akim Demaille <akim@epita.fr>
7856
7857 * src/reader.c (readgram): Remove dead code, an strip useless
7858 braces.
7859 (get_type): Remove, unused.
7860
7861 2001-12-12 Akim Demaille <akim@epita.fr>
7862
7863 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
7864 on that of lib/error.c.
7865
7866 2001-12-12 Akim Demaille <akim@epita.fr>
7867
7868 Some hosts don't like `/' in includes.
7869
7870 * src/system.h: Include libgettext.h without qualifying the path.
7871 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
7872 $(top_srcdir).
7873
7874 2001-12-11 Marc Autret <autret_m@epita.fr>
7875
7876 * src/output.c (output_parser): Remove useless muscle.
7877
7878 2001-12-11 Marc Autret <autret_m@epita.fr>
7879
7880 * src/bison.simple: Remove #line just before %%epilogue. It
7881 is now handled in ...
7882 * src/reader.c (read_additionnal_code): Add the output of a
7883 #line for the epilogue.
7884
7885 2001-12-10 Marc Autret <autret_m@epita.fr>
7886
7887 * src/reader.c (copy_definition): Re-use CPP-outed code which
7888 replace precedent remove.
7889 * src/bison.simple: Remove #line before %%prologue because
7890 %%input-line is wrong at this time.
7891
7892 2001-12-10 Marc Autret <autret_m@epita.fr>
7893
7894 * src/reader.c (symbols_output): Clean up.
7895 * src/output.c (output_gram, output): Clean up.
7896
7897 2001-12-10 Akim Demaille <akim@epita.fr>
7898
7899 * src/lalr.c (initialize_lookaheads): New. Extracted from...
7900 * src/LR0.c (set_state_table): here.
7901 * src/lalr.c (lalr): Call it.
7902
7903 2001-12-10 Akim Demaille <akim@epita.fr>
7904
7905 * src/state.h (shifts): Remove the `number' member: shifts are
7906 attached to state, hence no longer need to be labelled with a
7907 state number.
7908
7909 2001-12-10 Akim Demaille <akim@epita.fr>
7910
7911 Now that states have a complete set of members, the linked list of
7912 shifts is useless: just fill directly the state's shifts member.
7913
7914 * src/state.h (shifts): Remove the `next' member.
7915 * src/LR0.c (first_state, last_state): Remove.
7916 Adjust the callers.
7917 (augment_automaton): Don't look for the shifts that must be added
7918 a shift on EOF: it is those of the state we looked for! But now,
7919 since shifts are attached, it is no longer needed to looking
7920 merely by its id: its number.
7921
7922 2001-12-10 Akim Demaille <akim@epita.fr>
7923
7924 * src/LR0.c (augment_automaton): Better variable locality.
7925 Remove an impossible branch: if there is a state corresponding to
7926 the start symbol being shifted, then there is shift for the start
7927 symbol from the initial state.
7928
7929 2001-12-10 Akim Demaille <akim@epita.fr>
7930
7931 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
7932 only when appropriate: when insert_start_shifting_state' is not
7933 invoked.
7934 * tests/regression.at (Rule Line Numbers): Adjust.
7935
7936 2001-12-10 Akim Demaille <akim@epita.fr>
7937
7938 * src/LR0.c (augment_automaton): Now that all states have shifts,
7939 merge the two cases addition shifts to the initial state.
7940
7941 2001-12-10 Akim Demaille <akim@epita.fr>
7942
7943 * src/lalr.c (set_state_table): Move to...
7944 * src/LR0.c: here.
7945 * src/lalr.c (lalr): Don't call it...
7946 * src/LR0.c (generate_states): do it.
7947 * src/LR0.h (first_state): Remove, only the table is used.
7948
7949 2001-12-10 Akim Demaille <akim@epita.fr>
7950
7951 * src/LR0.h (first_shift, first_reduction): Remove.
7952 * src/lalr.c: Don't use first_shift: find shifts through the
7953 states.
7954
7955 2001-12-10 Akim Demaille <akim@epita.fr>
7956
7957 * src/LR0.c: Attach shifts to states as soon as they are
7958 computed.
7959 * src/lalr.c (set_state_table): Instead of assigning shifts to
7960 state, just assert that the mapping was properly done.
7961
7962 2001-12-10 Akim Demaille <akim@epita.fr>
7963
7964 * src/LR0.c (insert_start_shift): Rename as...
7965 (insert_start_shifting_state): this.
7966 (insert_eof_shifting_state, insert_accepting_state): New.
7967 (augment_automaton): Adjust.
7968 Better locality of the variables.
7969 When looking if the start_symbol is shifted from the initial
7970 state, using `while (... symbol != start_symbol ...)' sounds
7971 better than `while (... symbol < start_symbol ...)': If fail
7972 to see how the order between symbols could be relevant!
7973
7974 2001-12-10 Akim Demaille <akim@epita.fr>
7975
7976 * src/getargs.h: Don't declare `spec_name_prefix' and
7977 `spec_file_prefix', declared by src/files.h.
7978 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
7979 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
7980 * src/output.c (prepare): Adjust.
7981 * src/reader.c (symbols_output): Likewise.
7982 * src/vmsgetargs.c: Vaguely adjust, but who cares?
7983
7984 2001-12-10 Akim Demaille <akim@epita.fr>
7985
7986 * src/muscle_tab.c (muscle_init): NULL is a better default than
7987 `"0"'.
7988
7989 2001-12-10 Akim Demaille <akim@epita.fr>
7990
7991 * src/reader.c (reader): Calling symbols_output once is enough.
7992
7993 2001-12-10 Akim Demaille <akim@epita.fr>
7994
7995 Now that states have a complete set of members, the linked list of
7996 reductions is useless: just fill directly the state's reductions
7997 member.
7998
7999 * src/state.h (struct reductions): Remove member `number' and
8000 `next'.
8001 * src/LR0.c (first_reduction, last_reduction): Remove.
8002 (save_reductions): Don't link the new reductions, store them in
8003 this_state.
8004 * src/lalr.c (set_state_table): No need to attach reductions to
8005 states, it's already done.
8006 * src/output.c (output_actions): No longer free the shifts, then
8007 the reductions, then the states: free all the states and their
8008 members.
8009
8010 2001-12-10 Akim Demaille <akim@epita.fr>
8011
8012 * src/options.c (OPTN, DRTV, BOTH): New.
8013 (option_table): Use them.
8014
8015 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
8016 the job of system.h.
8017 * src/options.c: Don't include stdio.h and xalloc.h for the same
8018 reasons.
8019
8020 2001-12-10 Akim Demaille <akim@epita.fr>
8021
8022 * src/output.c (output, prepare): Make sure the values of the
8023 muscles `action' and `prologue' are 0-terminated.
8024
8025 2001-12-10 Akim Demaille <akim@epita.fr>
8026
8027 Clean up GCC warnings.
8028
8029 * src/reader.c (copy_action): `buf' is not used.
8030 (parse_skel_decl): Be static.
8031 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
8032 * src/options.h (create_long_option_table): Have a real prototype.
8033 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
8034 (hash_delete_at): Return const void *.
8035 Adjust casts to preserve the const.
8036
8037 2001-12-10 Akim Demaille <akim@epita.fr>
8038
8039 * configure.in: Require 2.52g.
8040 M4 is not needed, but AUTOM4TE is.
8041 * m4/m4.m4: Remove.
8042 * tests/Makefile.am: Adjust.
8043
8044 2001-12-10 Akim Demaille <akim@epita.fr>
8045
8046 One structure for states is enough, even though theoretically
8047 there are LR(0) states and LALR(1) states.
8048
8049 * src/lalr.h (state_t): Remove.
8050 (state_table): Be state_t **, not state_t *.
8051 * src/state.h (core, CORE_ALLOC): Rename as...
8052 (state_t, STATE_ALLOC): this.
8053 Add the LALR(1) members: shifts, reductions, errs.
8054 * src/LR0.c (state_table): Rename as...
8055 (state_hash): this, to avoid name clashes with the global
8056 `state_table'.
8057 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
8058 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
8059
8060 2001-12-10 Akim Demaille <akim@epita.fr>
8061
8062 Bison dumps core on bash.y.
8063 Reported by Pascal Bart.
8064
8065 * src/warshall.c (bitmatrix_print): New.
8066 (TC): Use it.
8067 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
8068 j must be the outer loop.
8069 * tests/regression.at (Broken Closure): New.
8070
8071 2001-12-05 Akim Demaille <akim@epita.fr>
8072
8073 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
8074 its argument.
8075 Reported by Peter Hamorsky.
8076
8077 2001-12-05 Akim Demaille <akim@epita.fr>
8078
8079 * src/conflicts.c (err_table): Remove.
8080 (resolve_sr_conflict): Adjust.
8081 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
8082 Rename as...
8083 (state_t.reductions, state_t.shifts): this.
8084
8085 2001-12-05 Akim Demaille <akim@epita.fr>
8086
8087 * src/reduce.c (reduce_grammar_tables): No longer disable the
8088 removal of useless rules via CPP but via `if (0)', so that the
8089 compiler still check the code is valid.
8090 For instance, it should have noticed `rline' no longer exists: use
8091 the `line' member of rule_t.
8092 * src/gram.c (dummy, rline): Remove, unused.
8093
8094 2001-12-05 Akim Demaille <akim@epita.fr>
8095
8096 * src/output.c (pack_vector): Use assert, not berror.
8097 * src/main.c (berror): Remove, unused.
8098
8099 2001-12-05 Akim Demaille <akim@epita.fr>
8100
8101 New experimental feature: if --verbose --trace output all the
8102 items of a state, not only its kernel.
8103
8104 * src/print.c (print_core): If `trace_flag', then invoke closure
8105 before outputting the items of the state (print_core is no longer
8106 a correct name them).
8107 (print_results): Invoke new_closure/free_closure if needed.
8108
8109 2001-12-05 Akim Demaille <akim@epita.fr>
8110
8111 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
8112 * src/closure.c, src/closure.h (itemsetsize): Rename as...
8113 (nitemset): for consistency with the rest of the project.
8114
8115 2001-12-05 Akim Demaille <akim@epita.fr>
8116
8117 * src/closure.c (print_closure): Improve.
8118 (closure): Use it for printing input and output.
8119
8120 2001-12-05 Akim Demaille <akim@epita.fr>
8121
8122 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
8123 indexed by nonterminals.
8124
8125 2001-12-05 Akim Demaille <akim@epita.fr>
8126
8127 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
8128 what it was!).
8129 * src/warshall.h: Remove accidental duplication of the content.
8130
8131 2001-12-05 Akim Demaille <akim@epita.fr>
8132
8133 * src/closure.c (set_fderives): De-obfuscate.
8134
8135 2001-12-05 Akim Demaille <akim@epita.fr>
8136
8137 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
8138
8139 2001-12-05 Akim Demaille <akim@epita.fr>
8140
8141 * src/closure.c (set_firsts): De-obfuscate.
8142
8143 2001-12-05 Akim Demaille <akim@epita.fr>
8144
8145 * src/output.c (action_row): De-obfuscate
8146 using the good o' techniques: arrays not pointers, variable
8147 locality, BITISSET, RESETBIT etc.
8148
8149 2001-12-05 Akim Demaille <akim@epita.fr>
8150
8151 Pessimize the code to simplify it: from now on, all the states
8152 have a valid SHIFTS, which NSHIFTS is possibly 0.
8153
8154 * src/LR0.c (shifts_new): Be global and move to..
8155 * src/state.c, src/state.h: here.
8156 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
8157 * src/print_graph: Adjust.
8158
8159 2001-12-05 Akim Demaille <akim@epita.fr>
8160
8161 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
8162 * src/conflicts.c: Use it.
8163 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
8164 incorrectly ``simplified''.
8165
8166 2001-12-05 Akim Demaille <akim@epita.fr>
8167
8168 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
8169 using the good o' techniques: arrays not pointers, variable
8170 locality, BITISSET, RESETBIT etc.
8171
8172 2001-12-05 Akim Demaille <akim@epita.fr>
8173
8174 * src/state.h (SHIFT_SYMBOL): New.
8175 * src/conflicts.c: Use it to deobfuscate.
8176
8177 2001-12-05 Akim Demaille <akim@epita.fr>
8178
8179 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
8180 (print_reductions): De-obfuscate using the good o' techniques:
8181 arrays not pointers, variable locality, BITISSET.
8182
8183 2001-12-05 Akim Demaille <akim@epita.fr>
8184
8185 * src/conflicts.c (print_reductions): Arrays, not pointers.
8186 Use BITISSET.
8187
8188 2001-12-05 Akim Demaille <akim@epita.fr>
8189
8190 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8191
8192 2001-12-05 Akim Demaille <akim@epita.fr>
8193
8194 * src/conflicts.c (print_reductions): Improve variable locality.
8195
8196 2001-12-05 Akim Demaille <akim@epita.fr>
8197
8198 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8199
8200 2001-12-05 Akim Demaille <akim@epita.fr>
8201
8202 * src/conflicts.c (print_reductions): Improve variable locality.
8203
8204 2001-12-05 Akim Demaille <akim@epita.fr>
8205
8206 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
8207 * src/lalr.c: Use them.
8208
8209 2001-12-05 Akim Demaille <akim@epita.fr>
8210
8211 * src/LR0.c (augment_automaton): Formatting changes.
8212 Better variable locality.
8213
8214 2001-12-05 Akim Demaille <akim@epita.fr>
8215
8216 * src/lalr.c (matrix_print): New.
8217 (transpose): Use it.
8218 Use arrays instead of pointers.
8219
8220 2001-12-05 Akim Demaille <akim@epita.fr>
8221
8222 * src/lalr.c (maxrhs): Move to...
8223 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
8224 * src/lalr.c (build_relations): Adjust.
8225
8226 2001-12-05 Akim Demaille <akim@epita.fr>
8227
8228 * src/lalr.c (transpose): Free the memory allocated to the
8229 argument, as it is replaced by the results by the unique caller.
8230 (build_relations): Merely invoke transpose: it handles the memory
8231 deallocation.
8232 Improve variable locality.
8233 Avoid variables used as mere abbreviations.
8234 (compute_lookaheads): Use arrays instead of pointers.
8235
8236 2001-12-05 Akim Demaille <akim@epita.fr>
8237
8238 * src/lalr.c (initialize_F): Improve variable locality.
8239 Avoid variables used as mere abbreviations.
8240
8241 2001-12-05 Akim Demaille <akim@epita.fr>
8242
8243 * src/derives.c (print_derives): Display the ruleno.
8244 * src/lalr.c (initialize_F, transpose): Better variable locality
8245 to improve readability.
8246 Avoid variables used as mere abbreviations.
8247
8248 2001-12-05 Akim Demaille <akim@epita.fr>
8249
8250 * src/lalr.c (traverse): Use arrays instead of pointers.
8251
8252 2001-12-05 Akim Demaille <akim@epita.fr>
8253
8254 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
8255 the handling of squeue.
8256 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8257
8258 2001-12-05 Akim Demaille <akim@epita.fr>
8259
8260 Because useless nonterminals are now kept alive (instead of being
8261 `destroyed'), we now sometimes examine them, and store information
8262 related to them. Hence we need to know their number, and adjust
8263 memory allocations.
8264
8265 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
8266 static.
8267 * src/LR0.c (allocate_itemsets): The memory allocated to
8268 `symbol_count' was used for two different purpose: once to count
8269 the number of occurrences of each symbol, and later reassigned to
8270 `shift_symbol', containing the symbol that can be shifted from a
8271 given state.
8272 Deobfuscate, i.e., allocate, use and free `symbol_count' here
8273 only, and...
8274 (new_itemsets): Allocate `shift_symbol' here.
8275 (allocate_itemsets): symbol_count includes useless nonterminals.
8276 Make room for them.
8277 (free_storage): Use `free', not `XFREE', for pointers that cannot
8278 be null.
8279
8280 2001-12-05 Akim Demaille <akim@epita.fr>
8281
8282 * src/nullable.c (set_nullable): Deobfuscate the handling of
8283 ritem.
8284 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8285
8286 2001-12-05 Akim Demaille <akim@epita.fr>
8287
8288 * src/gram.c, src/gram.h (ritem_print): New.
8289 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
8290 (This useless function was defined only to work around VMS linkers
8291 that can't handle compilation units with variables only).
8292 * src/reduce.c (dump_grammar): Use it to trace the construction of
8293 ritem.
8294
8295 2001-12-04 Paul Eggert <eggert@twinsun.com>
8296
8297 * src/bison.simple (union yyalloc): Change member names
8298 to be the same as the stack names.
8299 (yyparse): yyptr is now union yyalloc *, not char *.
8300 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
8301 and may generate better code on some machines.
8302 (yystpcpy): Use prototype if __STDC__ is defined, not just
8303 if __cplusplus is defined.
8304
8305 2001-11-30 Akim Demaille <akim@epita.fr>
8306
8307 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
8308 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
8309 Gettext doesn't compile cleanly, and dies with -Werror.
8310 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
8311 Include WARNING_CFLAGS here.
8312 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
8313 before being defined.
8314
8315 2001-11-27 Paul Eggert <eggert@twinsun.com>
8316
8317 * lib/quotearg.h (quotearg_n, quotearg_n_style):
8318 First arg is int, not unsigned.
8319 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
8320 (SIZE_MAX, UINT_MAX): New macros.
8321 (quotearg_n_options): Abort if N is negative.
8322 Avoid overflow check on hosts where size_t is 64 bits and int
8323 is 32 bits, as overflow is impossible there.
8324 Fix off-by-one typo that caused unnecessary reallocation.
8325
8326 2001-11-29 Paul Eggert <eggert@twinsun.com>
8327
8328 Name space cleanup in generated parser.
8329
8330 * doc/bison.texinfo (Bison Parser): Discuss system headers
8331 and their effect on the user name space.
8332
8333 * src/bison.simple:
8334 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
8335 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
8336 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
8337
8338 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
8339 on user names when possible.
8340
8341 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
8342 Simplify test for whather <alloca.h> exists.
8343
8344 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
8345
8346 (<stdio.h>): Include if YYDEBUG.
8347
8348 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
8349 ! defined (yyoverflow) && ! defined (yymemcpy).
8350
8351 (yymemcpy, yyparse): Rename local variables as needed so that
8352 they all begin with 'yy'.
8353
8354 (yystrlen, yystpcpy): New functions.
8355
8356 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
8357 All uses changed.
8358
8359 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
8360 instead of relying on string.h functions. Use YYSTACK_ALLOC
8361 and YYSTACK_FREE instead of malloc and free.
8362
8363 2001-11-30 Akim Demaille <akim@epita.fr>
8364
8365 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
8366 before their first uses.
8367 (YYBISON, YYPURE): Move to the top of the output.
8368
8369 2001-11-30 Akim Demaille <akim@epita.fr>
8370
8371 * tests/reduce.at (Useless Nonterminals): Fix.
8372
8373 2001-11-30 Akim Demaille <akim@epita.fr>
8374
8375 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
8376 if body instead of `;' to pacify GCC's warnings.
8377
8378 2001-11-30 Akim Demaille <akim@epita.fr>
8379
8380 Instead of mapping the LHS of unused rules to -1, keep the LHS
8381 valid, but flag the rules as invalid.
8382
8383 * src/gram.h (rule_t): `useful' is a new member.
8384 * src/print.c (print_grammar): Adjust.
8385 * src/derives.c (set_derives): Likewise.
8386 * src/reader.c (packgram, reduce_output): Likewise.
8387 * src/reduce.c (reduce_grammar_tables): Likewise.
8388 * tests/reduce.at (Underivable Rules, Useless Rules): New.
8389
8390 2001-11-30 Akim Demaille <akim@epita.fr>
8391
8392 * src/reduce.c (reduce_output): Formatting changes.
8393 * src/print.c (print_results, print_grammar): Likewise.
8394 * tests/regression.at (Rule Line Numbers)
8395 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
8396
8397 2001-11-30 Akim Demaille <akim@epita.fr>
8398
8399 * src/reduce.c (nonterminals_reduce): Instead of throwing away
8400 useless nonterminals, move them at the end of the symbol arrays.
8401 (reduce_output): Adjust.
8402 * tests/reduce.at (Useless Nonterminals): Adjust.
8403
8404 2001-11-30 Akim Demaille <akim@epita.fr>
8405
8406 * src/reduce.c: Various comment/formatting changes.
8407 (nonterminals_reduce): New, extracted from...
8408 (reduce_grammar_tables): here.
8409 (reduce_grammar): Call nonterminals_reduce.
8410
8411 2001-11-29 Paul Eggert <eggert@twinsun.com>
8412
8413 * src/bison.simple (YYSTACK_REALLOC): Remove.
8414 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
8415 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
8416 New macros.
8417 (union yyalloc): New type.
8418 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
8419 an arbitrary restriction on hosts where size_t is wider than int.
8420
8421 (yyparse): Don't dump core if alloca or malloc fails; instead, report
8422 a parser stack overflow. Allocate just one block of memory for all
8423 three stacks, instead of allocating three blocks; this typically is
8424 faster and reduces fragmentation.
8425
8426 Do not limit the number of items in the stack to a value that fits
8427 in 'int', as this is an arbitrary limit on hosts with 64-bit
8428 size_t and 32-bit int.
8429
8430 2001-11-29 Marc Autret <autret_m@epita.fr>
8431
8432 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
8433 of defining YYERROR_VERBOSE.
8434 [AT_DATA]: $4 is now out of C declarations in the prologue.
8435
8436 2001-11-28 Marc Autret <autret_m@epita.fr>
8437
8438 * src/reader.c (parse_dquoted_param): New.
8439 (parse_skel_decl): Use it.
8440 * src/lex.h: Add its prototype.
8441 * src/lex.c (literalchar): Become not static.
8442
8443 2001-11-28 Marc Autret <autret_m@epita.fr>
8444
8445 * src/output.h: And put its extern declaration here.
8446 * src/output.c (error_verbose): Define here.
8447 (prepare): Echo name modification.
8448 * src/getargs.h: Clean its extern declaration.
8449 * src/getargs.c (error_verbose_flag): Remove.
8450 (getargs): Remove case 'e'.
8451 * src/options.c (option_table): 'error-verbose' is now seen as simple
8452 percent option.
8453 Include output.h.
8454
8455 * src/reader.c (read_declarations): Remove case tok_include.
8456 (parse_include_decl): Remove.
8457 * src/lex.h (token_t): Remove tok_include.
8458 * src/options.c (option_table): 'include' is now a simple command line
8459 option.
8460
8461 2001-11-28 Marc Autret <autret_m@epita.fr>
8462
8463 * src/bison.simple: Adjust muscle names.
8464 * src/muscle_tab.c (muscle_init): Also rename the muscles.
8465 * src/output.c (prepare): s/_/-/ for the muscles names.
8466 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
8467
8468 2001-11-28 Marc Autret <autret_m@epita.fr>
8469
8470 * src/bison.simple: Fix debug.
8471 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
8472
8473 2001-11-28 Akim Demaille <akim@epita.fr>
8474
8475 * src/LR0.c (shifts_new): New.
8476 (save_shifts, insert_start_shift, augment_automaton): Use it.
8477
8478 2001-11-28 Akim Demaille <akim@epita.fr>
8479
8480 * src/closure.c (closure): `b' and `ruleno' denote the same value:
8481 keep ruleno only.
8482
8483 2001-11-28 Akim Demaille <akim@epita.fr>
8484
8485 * src/closure.c (closure): Instead of looping over word in array
8486 then bits in words, loop over bits in array.
8487
8488 2001-11-28 Akim Demaille <akim@epita.fr>
8489
8490 * src/closure.c (closure): No longer optimize the special case
8491 where all the bits of `ruleset[r]' are set to 0, to make the code
8492 clearer.
8493
8494 2001-11-28 Akim Demaille <akim@epita.fr>
8495
8496 * src/closure.c (closure): `r' and `c' are new variables, used to
8497 de-obfuscate accesses to RULESET and CORE.
8498
8499 2001-11-28 Akim Demaille <akim@epita.fr>
8500
8501 * src/reduce.c (reduce_print): Use ngettext.
8502 (dump_grammar): Improve the trace accuracy.
8503
8504 2001-11-28 Akim Demaille <akim@epita.fr>
8505
8506 * src/reduce.c (dump_grammar): Don't translate trace messages.
8507
8508 2001-11-28 Akim Demaille <akim@epita.fr>
8509
8510 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
8511 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
8512 as all tags are free'ed afterwards.
8513 From Enrico Scholz.
8514
8515 2001-11-27 Paul Eggert <eggert@twinsun.com>
8516
8517 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
8518 use alloca when we didn't want to, and vice versa.
8519
8520 2001-11-27 Marc Autret <autret_m@epita.fr>
8521
8522 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
8523 initialization.
8524 * src/output.c (prepare): Remove its update.
8525
8526 2001-11-27 Marc Autret <autret_m@epita.fr>
8527
8528 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
8529 Use %error-verbose.
8530
8531 2001-11-27 Marc Autret <autret_m@epita.fr>
8532
8533 * src/bison.simple: Remove YYERROR_VERBOSE using.
8534 Use %%error_verbose.
8535 (yyparse): Likewise.
8536 * src/output.c (prepare): Give its final value.
8537 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
8538 * src/getargs.h: Add its extern declaration.
8539 * src/getargs.c (error_verbose_flag): New int.
8540 (getargs): Update to catch new case.
8541 * src/options.c (option_table): 'error-verbose' is a new option.
8542 (shortopts): Update.
8543
8544 2001-11-27 Akim Demaille <akim@epita.fr>
8545
8546 * src/system.h: Use intl/libgettext.h.
8547 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
8548
8549 2001-11-27 Akim Demaille <akim@epita.fr>
8550
8551 * tests/torture.at (Exploding the Stack Size with Malloc):
8552 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
8553
8554 2001-11-27 Akim Demaille <akim@epita.fr>
8555
8556 * src/files.c: Include error.h.
8557 Reported by Hans Aberg.
8558
8559 2001-11-26 Marc Autret <autret_m@epita.fr>
8560
8561 * src/reader.c (parse_include_decl): New, not yet implemented.
8562 (read_declarations): Add case tok_include.
8563 * src/getargs.h (include): Add its extern definition.
8564 * src/getargs.c (include): New const char *.
8565 (getargs): Add case '-I'.
8566 * src/options.c (option_table): Add include as command line and
8567 percent option.
8568 * src/lex.h (token_t): Add tok_include.
8569
8570 2001-11-26 Akim Demaille <akim@epita.fr>
8571
8572 * src/reader.c (readgram): Make sure rules for mid-rule actions
8573 have a lineno equal to that of their host rule.
8574 Reported by Hans Aberg.
8575 * tests/regression.at (Rule Line Numbers): New.
8576
8577 2001-11-26 Akim Demaille <akim@epita.fr>
8578
8579 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
8580 size_ts.
8581
8582 2001-11-26 Akim Demaille <akim@epita.fr>
8583
8584 * src/complain.c, src/complain.h (error): Remove, provided by
8585 lib/error.[ch].
8586
8587 2001-11-26 Akim Demaille <akim@epita.fr>
8588
8589 * src/reader.c (read_declarations): Don't abort on tok_illegal,
8590 issue an error message.
8591 * tests/regression.at (Invalid %directive): New.
8592 Reported by Hans Aberg.
8593
8594 2001-11-26 Akim Demaille <akim@epita.fr>
8595
8596 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
8597 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8598
8599 2001-11-26 Akim Demaille <akim@epita.fr>
8600
8601 * src/conflicts.c (conflicts_print): Don't complain at all when
8602 there are no reduce/reduce conflicts, and as many shift/reduce
8603 conflicts as expected.
8604 * tests/regression.at (%expect right): Adjust.
8605
8606 2001-11-23 Akim Demaille <akim@epita.fr>
8607
8608 * lib/alloca.c: Update, from fileutils.
8609
8610 2001-11-23 Akim Demaille <akim@epita.fr>
8611
8612 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
8613
8614 2001-11-23 Akim Demaille <akim@epita.fr>
8615
8616 * src/system.h: Include alloca.h.
8617 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
8618
8619 2001-11-23 Akim Demaille <akim@epita.fr>
8620
8621 * src/print_graph.c (print_actions): Remove `rule', unused.
8622 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
8623 pacify GCC's signed < unsigned warnings.
8624 * src/closure.c (itemsetsize): Likewise.
8625 * src/reader.c (symbol_list_new): Static.
8626
8627 2001-11-23 Akim Demaille <akim@epita.fr>
8628
8629 Attaching lineno to buckets is stupid, since only one copy of each
8630 symbol is kept, only the line of the first occurrence is kept too.
8631
8632 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
8633 * src/reader.c (rline_allocated): Remove, unused.
8634 (symbol_list): Have a `line' member.
8635 (symbol_list_new): New.
8636 (readgram): Use it.
8637 * src/print.c (print_grammar): Output the rule line numbers.
8638 * tests/regression.at (Solved SR Conflicts)
8639 (Unresolved SR Conflicts): Adjust.
8640 Reported by Hans Aberg.
8641
8642 2001-11-22 Marc Autret <autret_m@epita.fr>
8643
8644 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
8645
8646 2001-11-22 Marc Autret <autret_m@epita.fr>
8647
8648 * src/muscle_tab.c (muscle_init): Remove initialization of
8649 skeleton muscle.
8650 * src/output.c (output_master_parser): Do it here.
8651
8652 2001-11-20 Akim Demaille <akim@epita.fr>
8653
8654 * po/sv.po: New.
8655 * configure.in (ALL_LINGUAS): Adjust.
8656 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
8657 longer contains strings to translate.
8658
8659 2001-11-19 Akim Demaille <akim@epita.fr>
8660
8661 * src/conflicts.c (conflicts_print): Add a missing \n.
8662
8663 2001-11-19 Akim Demaille <akim@epita.fr>
8664
8665 * src/nullable.c (nullable_print): New.
8666 (set_nullable): Call it when tracing.
8667 Better locality of variables.
8668
8669 2001-11-19 Akim Demaille <akim@epita.fr>
8670
8671 * src/print.c (print_actions): Better locality of variables.
8672
8673 2001-11-19 Akim Demaille <akim@epita.fr>
8674
8675 * src/derives.c (print_derives): Fix and enrich.
8676 * src/closure.c (print_fderives): Likewise.
8677
8678 2001-11-19 Akim Demaille <akim@epita.fr>
8679
8680 * src/closure.c (itemsetend): Remove, replaced with...
8681 (itemsetsize): new.
8682
8683 2001-11-19 Akim Demaille <akim@epita.fr>
8684
8685 * src/LR0.c (kernel_end): Remove, replaced with...
8686 (kernel_size): new.
8687
8688 2001-11-19 Akim Demaille <akim@epita.fr>
8689
8690 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
8691 to clarify.
8692
8693 2001-11-19 Akim Demaille <akim@epita.fr>
8694
8695 * src/closure.c (closure): Use arrays instead of pointers to clarify.
8696
8697 2001-11-19 Akim Demaille <akim@epita.fr>
8698
8699 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
8700 trace messages.
8701 * src/LR0.c: Likewise.
8702 (allocate_itemsets): Use arrays instead of pointers to clarify.
8703
8704 2001-11-19 Akim Demaille <akim@epita.fr>
8705
8706 * src/getargs.c (statistics_flag): Replace with...
8707 (trace_flag): New.
8708 (longopts): Accept --trace instead of --statistics.
8709 * src/getargs.h, src/options.c: Adjust.
8710 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
8711 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
8712
8713 2001-11-19 Akim Demaille <akim@epita.fr>
8714
8715 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
8716 pointers to clarify the code.
8717 (save_reductions, save_shifts): Factor common parts of alternatives.
8718
8719 2001-11-19 Akim Demaille <akim@epita.fr>
8720
8721 * src/LR0.c (new_state, get_state): Complete TRACE code.
8722 * src/closure.c: Include `reader.h' to get `tags', needed by the
8723 trace code.
8724 Rename the conditional DEBUG as TRACE.
8725 Output consistently TRACEs to stderr, not stdout.
8726 * src/derives.c: Likewise.
8727 * src/reduce.c: (inaccessable_symbols): Using if is better style
8728 than goto.
8729 Use `#if TRACE' instead of `#if 0' for tracing code.
8730
8731 2001-11-19 Akim Demaille <akim@epita.fr>
8732
8733 * src/system.h (LIST_FREE, shortcpy): New.
8734 * src/LR0.c: Use them.
8735 * src/output.c (free_itemsets, free_reductions, free_shifts):
8736 Remove, replaced by LIST_FREE.
8737
8738 2001-11-19 Akim Demaille <akim@epita.fr>
8739
8740 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8741 (REDUCTIONS_ALLOC): New.
8742 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8743 allocation.
8744
8745 2001-11-19 Akim Demaille <akim@epita.fr>
8746
8747 * src/LR0.c (new_state): Complete trace code.
8748 * src/nullable.c (set_nullable): Don't translate traces.
8749
8750 2001-11-19 Akim Demaille <akim@epita.fr>
8751
8752 * src/print_graph.c (print_core): Better locality of variables.
8753 * src/print.c (print_core): Likewise.
8754
8755 2001-11-19 Akim Demaille <akim@epita.fr>
8756
8757 * src/vcg.c: You do the output, so you are responsible of the
8758 handling of VCG syntax, in particular: use quotearg.
8759 * src/print_graph.c: Don't.
8760 (print_actions): Don't output the actions as part of the nodes,
8761 since that's the job of the edges.
8762 (print_state): Don't output by hand: fill the node description,
8763 and ask for its output.
8764
8765 2001-11-19 Akim Demaille <akim@epita.fr>
8766
8767 * src/bison.simple (yyparse): When verbosely reporting an error,
8768 no longer put additional quotes around token names.
8769 * tests/calc.at: Adjust.
8770
8771 2001-11-19 Akim Demaille <akim@epita.fr>
8772
8773 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8774 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8775 * src/output.c: Adjust.
8776
8777 2001-11-19 Akim Demaille <akim@epita.fr>
8778
8779 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8780 (rule_t): this.
8781 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8782
8783 2001-11-19 Akim Demaille <akim@epita.fr>
8784
8785 * src/gram.h (rule_t): New.
8786 (rule_table): New.
8787 (rrhs, rlhs): Remove, part of state_t.
8788 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8789 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8790 * src/reader.c, src/reduce.c: Adjust.
8791
8792 2001-11-19 Akim Demaille <akim@epita.fr>
8793
8794 * src/reader.c (symbols_output): New, extracted from...
8795 (packsymbols): Here.
8796 (reader): Call it.
8797
8798 2001-11-19 Akim Demaille <akim@epita.fr>
8799
8800 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8801 (maxrhs): this new function.
8802
8803 2001-11-19 Akim Demaille <akim@epita.fr>
8804
8805 * src/lalr.c (F): New macro to access the variable F.
8806 Adjust.
8807
8808 2001-11-19 Akim Demaille <akim@epita.fr>
8809
8810 * src/lalr.h (LA): New macro to access the variable LA.
8811 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8812 * src/lalr.c: Adjust.
8813
8814 2001-11-19 Akim Demaille <akim@epita.fr>
8815
8816 * src/lalr.c (initialize_LA): Only initialize LA. Let...
8817 (set_state_table): handle the `lookaheads' members.
8818
8819 2001-11-19 Akim Demaille <akim@epita.fr>
8820
8821 * src/lalr.h (lookaheads): Removed array, whose contents is now
8822 a member of...
8823 (state_t): this structure.
8824 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8825 Adjust.
8826
8827 2001-11-19 Akim Demaille <akim@epita.fr>
8828
8829 * src/lalr.h (consistent): Removed array, whose contents is now
8830 a member of...
8831 (state_t): this structure.
8832 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8833 Adjust.
8834
8835 2001-11-19 Akim Demaille <akim@epita.fr>
8836
8837 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
8838 contents are now members of...
8839 (state_t): this structure.
8840 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8841 Adjust.
8842
8843 2001-11-19 Akim Demaille <akim@epita.fr>
8844
8845 * src/lalr.h (state_t): New.
8846 (state_table): Be a state_t * instead of a core **.
8847 (accessing_symbol): Remove, part of state_t.
8848 * src/lalr.c: Adjust.
8849 (set_accessing_symbol): Merge into...
8850 (set_state_table): this.
8851 * src/print_graph.c, src/conflicts.c: Adjust.
8852
8853 2001-11-14 Akim Demaille <akim@epita.fr>
8854
8855 * tests/calc.at, tests/output.at, tests/regression.at,
8856 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
8857 now the tests are run in private dirs, therefore AC_CLEANUP and
8858 family can be simplified to 0-ary.
8859 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
8860 use abs. path to find config.h.
8861 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
8862 stderr, there can be way too much random noise.
8863 Instead pass -Werror to GCC and rely on the exit status.
8864 Reported by Wolfram Wagner.
8865
8866 2001-11-14 Akim Demaille <akim@epita.fr>
8867
8868 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
8869 defined only if yyoverflow is defined, to avoid `warning: unused
8870 variable `yyvs1''.
8871 Reported by The Test Suite.
8872
8873 2001-11-14 Akim Demaille <akim@epita.fr>
8874
8875 * src/print.c: Include reduce.h.
8876 Reported by Hans Aberg.
8877
8878 2001-11-14 Akim Demaille <akim@epita.fr>
8879
8880 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
8881 Revert a previous patch: these are really const.
8882 * src/conflicts.c (conflict_report): Additional useless pair of
8883 braces to pacify GCC's warnings for `if () if () {} else {}'.
8884 * src/lex.c (parse_percent_token): Replace equal_offset with
8885 arg_offset.
8886 arg is const.
8887 Be sure to strdup `arg' when used, since there is no reason for
8888 token_buffer not to change.
8889
8890 2001-11-14 Akim Demaille <akim@epita.fr>
8891
8892 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
8893 definition.
8894 * src/main.c (main): Use them.
8895 Suggested by Hans Aberg.
8896
8897 2001-11-12 Akim Demaille <akim@epita.fr>
8898
8899 * src/system.h (ngettext): Now that we use ngettext, be sure to
8900 provide a default definition when NLS are not used.
8901
8902 2001-11-12 Akim Demaille <akim@epita.fr>
8903
8904 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
8905 Use @kbd to denote user input.
8906 (Language and Grammar): ANSIfy the example.
8907 Adjust its layout for info/notinfo.
8908 (Location Tracking Calc): Output error messages to stderr.
8909 Output locations in a more GNUtically correct way.
8910 Fix a couple of Englishos.
8911 Adjust @group/@end group pairs.
8912
8913 2001-11-12 Akim Demaille <akim@epita.fr>
8914
8915 %expect was not functioning at all.
8916
8917 * src/conflicts.c (expected_conflicts): Set to -1.
8918 (conflict_report): Use ngettext.
8919 (conflicts_print): Check %expect and make its violation an error.
8920 * doc/bison.texinfo (Expect Decl): Adjust.
8921 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
8922 * tests/regression.at (%expect not enough, %expect right)
8923 (%expect too much): New.
8924
8925 2001-11-12 Akim Demaille <akim@epita.fr>
8926
8927 * tests/regression.at (Conflicts): Rename as...
8928 (Unresolved SR Conflicts): this.
8929 (Solved SR Conflicts): New.
8930
8931 2001-11-12 Akim Demaille <akim@epita.fr>
8932
8933 * src/reduce.c (print_results): Rename as...
8934 (reduce_output): This.
8935 Output to OUT, passed as argument, instead of output_obstack.
8936 (dump_grammar): Likewise.
8937 (reduce_free): New.
8938 Also free V1.
8939 (reduce_grammar): No longer call reduce_output, since...
8940 * src/print.c (print_results): do it.
8941 * src/main.c (main): Call reduce_free;
8942
8943 2001-11-12 Akim Demaille <akim@epita.fr>
8944
8945 * src/conflicts.c (print_reductions): Accept OUT as argument.
8946 Output to it, not to output_obstack.
8947 * src/print.c (print_actions): Adjust.
8948
8949 2001-11-12 Akim Demaille <akim@epita.fr>
8950
8951 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
8952 the result instead of using...
8953 (src_total, rrc_total, src_count, rrc_count): Remove.
8954 (any_conflicts): Remove.
8955 (print_conflicts): Split into...
8956 (conflicts_print, conflicts_output): New.
8957 * src/conflicts.h: Adjust.
8958 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
8959 * src/print.c (print_grammar): Issue `\n' between two rules.
8960 * tests/regression.at (Conflicts): New.
8961 Reported by Tom Lane.
8962
8963 2001-11-12 Akim Demaille <akim@epita.fr>
8964
8965 * tests/regression.at (Invalid input): Remove, duplicate with
8966 ``Invalid input: 1''.
8967
8968 2001-11-12 Akim Demaille <akim@epita.fr>
8969
8970 * tests/torture.at (AT_DATA_STACK_TORTURE)
8971 (Exploding the Stack Size with Alloca)
8972 (Exploding the Stack Size with Malloc): New.
8973
8974 2001-11-12 Akim Demaille <akim@epita.fr>
8975
8976 * src/bison.simple (YYSTACK_REALLOC): New.
8977 (yyparse) [!yyoverflow]: Use it and free the old stack.
8978 Reported by Per Allansson.
8979
8980 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
8981
8982 * src/bison.simple: Define type yystype instead of YYSTYPE, and
8983 define CPP macro, which substitute YYSTYPE by yystype.
8984 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
8985 with yyltype/YYLTYPE. This allows inclusion of the generated
8986 header within the parser if the compiler, such as GGC, accepts
8987 multiple equivalent #defines.
8988 From Akim.
8989
8990 2001-11-05 Akim Demaille <akim@epita.fr>
8991
8992 * src/reader.c (symbols_output): New, extracted from...
8993 (packsymbols): here.
8994 (reader): Adjust.
8995
8996 2001-11-05 Akim Demaille <akim@epita.fr>
8997
8998 * src/lex.c (parse_percent_token): s/quotearg/quote/.
8999
9000 2001-11-05 Akim Demaille <akim@epita.fr>
9001
9002 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
9003 pattern.
9004
9005 2001-11-05 Akim Demaille <akim@epita.fr>
9006
9007 * src/options.h (struct option_table_struct): set_flags is void*.
9008 * src/options.c (longopts): Support `--output' and `%output'.
9009 (usage): Adjust.
9010 * src/lex.h (tok_setopt): Remove, replaced with...
9011 (tok_intopt, tok_stropt): these new guys.
9012 * src/lex.c (getopt.h): Not needed.
9013 (token_buffer, unlexed_token_buffer): Not const.
9014 (percent_table): Promote `-' over `_' in directive names.
9015 Active `%name-prefix', `file-prefix', and `output'.
9016 (parse_percent_token): Accept possible arguments to directives.
9017 Promote `-' over `_' in directive names.
9018
9019 2001-11-04 Akim Demaille <akim@epita.fr>
9020
9021 * doc/bison.texinfo (Decl Summary): Split the list into
9022 `directives for grammars' and `directives for bison'.
9023 Sort'em.
9024 Add description of `%name-prefix', `file-prefix', and `output'.
9025 Promote `-' over `_' in directive names.
9026 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
9027 Simplify the description of `--name-prefix'.
9028 Promote `-' over `_' in directive names.
9029 Promote `--output' over `--output-file'.
9030 Fix the description of `--defines'.
9031 * tests/output.at: Exercise %file-prefix and %output.
9032
9033 2001-11-02 Akim Demaille <akim@epita.fr>
9034
9035 * doc/refcard.tex: Update.
9036
9037 2001-11-02 Akim Demaille <akim@epita.fr>
9038
9039 * src/symtab.h (SUNDEF): New.
9040 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
9041 stand for `uninitialized', instead of 0.
9042 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
9043 * src/lex.c (lex): Adjust.
9044
9045 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
9046 Number it 0.
9047 Let yylex return it instead of a plain 0.
9048 Reported by Dick Streefland.
9049
9050 2001-11-02 Akim Demaille <akim@epita.fr>
9051
9052 * tests/regression.at (Mixing %token styles): New test.
9053
9054 2001-11-02 Akim Demaille <akim@epita.fr>
9055
9056 * src/reader.c (parse_thong_decl): Formatting changes.
9057 (token_translations_init): New, extracted from...
9058 (packsymbols): Here.
9059 Adjust.
9060
9061 2001-11-01 Akim Demaille <akim@epita.fr>
9062
9063 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
9064 Check that `9foo.y' produces correct cpp guards.
9065 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
9066 guards.
9067 Reported by Wwp.
9068
9069 2001-11-01 Akim Demaille <akim@epita.fr>
9070
9071 * tests/regression.at (Invalid input: 2): New.
9072 * src/lex.c (unlexed_token_buffer): New.
9073 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
9074 too.
9075 Reported by Wwp.
9076
9077 2001-11-01 Akim Demaille <akim@epita.fr>
9078
9079 * tests/calc.at: Catch up with 1.30.
9080 * configure.in: Bump to 1.49a.
9081 Adjust to newer Autotest.
9082
9083 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
9084
9085 * src/conflicts.c: Move global variables rrc_total and src_total ...
9086 (print_conflicts): here.
9087 * src/output.c (output): Free global variable user_toknums.
9088 * src/lex.c (token_obstack): Become static.
9089
9090 2001-10-18 Akim Demaille <akim@epita.fr>
9091
9092 * tests/atlocal.in (GCC): Add.
9093 * tests/calc.at: s/m4_match/m4_bmatch/.
9094 s/m4_patsubst/m4_bpatsubst/.
9095 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
9096 * configure.in: AC_SUBST(GCC).
9097
9098 2001-10-14 Marc Autret <autret_m@epita.fr>
9099
9100 * src/options.c (create_long_option_table): Fix.
9101
9102 2001-10-10 Akim Demaille <akim@epita.fr>
9103
9104 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
9105
9106 2001-10-04 Akim Demaille <akim@epita.fr>
9107
9108 * src/reader.c (parse_union_decl): Push the caracters in
9109 union_obstack, not attrs_obstack.
9110
9111 2001-10-04 Akim Demaille <akim@epita.fr>
9112
9113 Merge in the branch 1.29.
9114
9115 * src/reader.c (packsymbols): Use a temporary obstack for
9116 `%%tokendef', since output_stack is already used elsewhere.
9117
9118 2001-10-02 Akim Demaille <akim@epita.fr>
9119
9120 Bump 1.29d.
9121
9122 2001-10-02 Akim Demaille <akim@epita.fr>
9123
9124 Version 1.29c.
9125
9126 2001-10-02 Akim Demaille <akim@epita.fr>
9127
9128 * tests/regression.at (Invalid CPP headers): New.
9129 From Alexander Belopolsky.
9130 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
9131
9132 2001-10-02 Akim Demaille <akim@epita.fr>
9133
9134 * tests/regression.at (Invalid input): New.
9135 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
9136 Reported by Shura.
9137
9138 2001-10-02 Akim Demaille <akim@epita.fr>
9139
9140 * tests/calc.at: Now that --debug works, the tests must be adjusted.
9141
9142 2001-10-02 Akim Demaille <akim@epita.fr>
9143
9144 * src/output.c (output_parser): Assert `skeleton'.
9145 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
9146 systems.
9147 From Shura.
9148
9149 2001-10-01 Marc Autret <autret_m@epita.fr>
9150
9151 * src/lex.h: Echo modifications.
9152 * src/lex.c (unlex): Parameter is now token_t.
9153 From Hans Aberg.
9154
9155 2001-10-01 Marc Autret <autret_m@epita.fr>
9156
9157 * src/main.c: Include lex.h.
9158 From Hans Aberg.
9159
9160 2001-09-29 Akim Demaille <akim@epita.fr>
9161
9162 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
9163
9164 2001-09-28 Akim Demaille <akim@epita.fr>
9165
9166 * tests/testsuite.at: Update to newer Autotest.
9167 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
9168
9169 2001-09-27 Akim Demaille <akim@epita.fr>
9170
9171 Position independent wrapper.
9172
9173 * tests/bison: Remove.
9174 * tests/bison.in: New.
9175 * configure.in: Adjust.
9176
9177 2001-09-27 Paul Eggert <eggert@twinsun.com>
9178
9179 Port quotearg fixes from tar 1.13.24.
9180
9181 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
9182 tm to be declared.
9183 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
9184 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
9185
9186 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
9187 * m4/mbrtowc.m4: New file.
9188 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
9189 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
9190
9191 2001-09-27 Akim Demaille <akim@epita.fr>
9192
9193 Bump to 1.29c.
9194
9195 2001-09-27 Akim Demaille <akim@epita.fr>
9196
9197 Version 1.29b.
9198
9199 2001-09-25 Akim Demaille <akim@epita.fr>
9200
9201 * src/system.h: Include `xalloc.h'.
9202 Remove it from the C files.
9203 * src/files.c (output_files): Free the obstacks.
9204 * src/lex.c (init_lex): Rename as...
9205 (lex_init): this.
9206 (lex_free): New.
9207 * src/main.c (main): Use it.
9208
9209 2001-09-24 Marc Autret <autret_m@epita.fr>
9210
9211 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
9212 to output informations in fout (FILE*).
9213 (open_graph, close_graph): Likewise.
9214 (output_graph, output_edge, output_node): Likewise.
9215 * src/vcg.h: Update function prototypes.
9216 * src/print_graph.c (print_graph): Open output graph file.
9217 (print_actions): Adjust.
9218 * src/files.h: Remove extern declaration.
9219 * src/files.c: Remove graph_obstack declaration.
9220 (open_files): Remove graph_obstack initialization.
9221 (output_files): Remove graph_obstack saving.
9222
9223 2001-09-24 Marc Autret <autret_m@epita.fr>
9224
9225 * src/files.c (compute_output_file_names): Fix.
9226
9227 2001-09-24 Marc Autret <autret_m@epita.fr>,
9228 Akim Demaille <akim@epita.fr>
9229
9230 * src/reader.c (reader): Remove call to free_symtab ().
9231 * src/main.c (main): Call it here.
9232 Include symtab.h.
9233 * src/conflicts.c (initialize_conflicts): Rename as...
9234 (solve_conflicts): this.
9235 * src/print.c (print_core, print_actions, print_state)
9236 (print_grammar): Dump to a file instead a `output_obstack'.
9237 (print_results): Dump `output_obstack', and then proceed with the
9238 FILE *.
9239 * src/files.c (compute_output_file_names, close_files): New.
9240 (output_files): Adjust.
9241 * src/main.c (main): Adjust.
9242
9243 2001-09-23 Marc Autret <autret_m@epita.fr>
9244
9245 * src/files.c (compute_header_macro): Computes header macro name
9246 from spec_defines_file when given.
9247
9248 2001-09-23 Marc Autret <autret_m@epita.fr>
9249
9250 * src/files.c (output_files): Add default extensions.
9251
9252 2001-09-22 Akim Demaille <akim@epita.fr>
9253
9254 * src/conflicts.c (finalize_conflicts): Rename as...
9255 (free_conflicts): this.
9256
9257 2001-09-22 Akim Demaille <akim@epita.fr>
9258
9259 * src/gram.c (gram_free): Rename back as...
9260 (dummy): this.
9261 (output_token_translations): Free `token_translations'.
9262 * src/symtab.c (free_symtab): Free the tag field.
9263
9264 2001-09-22 Akim Demaille <akim@epita.fr>
9265
9266 Remove `translations' as it is always set to true.
9267
9268 * src/gram.h: Adjust.
9269 * src/reader.c (packsymbols, parse_token_decl): Adjust
9270 * src/print.c (print_grammar): Adjust.
9271 * src/output.c (output_token_translations): Adjust.
9272 * src/lex.c (lex): Adjust.
9273 * src/gram.c: Be sure the set pointers to NULL.
9274 (dummy): Rename as...
9275 (gram_free): this.
9276
9277 2001-09-22 Akim Demaille <akim@epita.fr>
9278
9279 * configure.in: Invoke AM_LIB_DMALLOC.
9280 * src/system.h: Use dmalloc.
9281 * src/LR0.c: Be sure to have pointers initialized to NULL.
9282 (allocate_itemsets): Allocate kernel_items only if needed.
9283
9284 2001-09-22 Akim Demaille <akim@epita.fr>
9285
9286 * configure.in: Bump to 1.29b.
9287 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
9288 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
9289 need xmalloc.c in calc.y.
9290 From Pascal Bart.
9291
9292 2001-09-21 Akim Demaille <akim@epita.fr>
9293
9294 Version 1.29a.
9295 * Makefile.maint, config/config.guess, config/config.sub,
9296 * config/missing: Update from masters.
9297 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
9298 upon package.m4.
9299 * configure.in (ALL_LINGUAS): Add `tr'.
9300
9301 2001-09-21 Akim Demaille <akim@epita.fr>
9302
9303 * tests/Makefile.am (package.m4): Move to...
9304 ($(srcdir)/$(TESTSUITE)): here.
9305
9306 2001-09-20 Akim Demaille <akim@epita.fr>
9307
9308 * src/complain.c: No longer try to be standalone: use system.h.
9309 Don't assume __STDC__ is defined to 1. Just test if it is defined.
9310 * src/complain.h: Likewise.
9311 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
9312 Remove the unused variable `n'.
9313 From Albert Chin-A-Young.
9314
9315 2001-09-18 Marc Autret <autret_m@epita.fr>
9316
9317 * doc/bison.1: Update.
9318 * doc/bison.texinfo (Bison Options): Update --defines and --graph
9319 descriptions.
9320 (Option Cross Key): Update.
9321 Add --graph.
9322
9323 2001-09-18 Marc Autret <autret_m@epita.fr>
9324
9325 * tests/regression.at: New test (comment in %union).
9326
9327 2001-09-18 Marc Autret <autret_m@epita.fr>
9328
9329 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
9330 do that.
9331 Reported by Keith Browne.
9332
9333 2001-09-18 Marc Autret <autret_m@epita.fr>
9334
9335 * tests/output.at: Add tests for --defines and --graph.
9336
9337 2001-09-18 Marc Autret <autret_m@epita.fr>
9338
9339 * tests/output.at: Removes tests of %{header,src}_extension features.
9340
9341 2001-09-18 Akim Demaille <akim@epita.fr>
9342
9343 * tests/Makefile.am (package.m4): New.
9344 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
9345 (_AT_CHECK_CALC_ERROR): Likewise.
9346 Factor the `, ' part of verbose error messages.
9347
9348 2001-09-18 Marc Autret <autret_m@epita.fr>
9349
9350 * src/getargs.c (longopts): Declare --defines and --graph as options
9351 with optional arguments.
9352 * src/files.h: Add extern declarations.
9353 * src/files.c (spec_graph_file, spec_defines_file): New.
9354 (output_files): Update.
9355 Remove CPP-outed code.
9356
9357 2001-09-18 Marc Autret <autret_m@epita.fr>
9358
9359 Turn off %{source,header}_extension feature.
9360
9361 * src/files.c (compute_exts_from_gf): Update.
9362 (compute_exts_from_src): Update.
9363 (output_files): CPP-out useless code.
9364 * src/files.h: Remove {header,source}_extension extern declarations.
9365 * src/reader.c (parse_dquoted_param): CPP-out.
9366 (parse_header_extension_decl): Remove.
9367 (parse_source_extension_decl): Remove.
9368 (read_declarations): Remove cases tok_{hdrext,srcext}.
9369 * src/lex.c (percent_table): Remove {header,source}_extension entries.
9370 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
9371
9372 2001-09-10 Akim Demaille <akim@epita.fr>
9373
9374 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
9375 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
9376 (AT_CHECK_OUTPUT): this.
9377 Merely check ls' exit status, its output is useless.
9378
9379 2001-09-10 Akim Demaille <akim@epita.fr>
9380
9381 * tests/calc.at: Use m4_match.
9382 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
9383
9384 2001-09-10 Marc Autret <autret_m@epita.fr>,
9385 Akim Demaille <akim@epita.fr>
9386
9387 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
9388 enum color_e.
9389 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
9390 to `normal'.
9391 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
9392 * src/lex.h: Adjust prototype.
9393 (token_t): Add `tok_undef'.
9394 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
9395 (parse_percent_token): Now returns token_t.
9396 Add default statement in switch.
9397 (lex): Separate `c' as an input variable, from the token_t result
9398 part.
9399 (unlexed): Is a token_t.
9400
9401 2001-09-10 Akim Demaille <akim@epita.fr>
9402
9403 * configure.in: Bump to 1.29a.
9404
9405 2001-09-07 Akim Demaille <akim@epita.fr>
9406
9407 Version 1.29.
9408
9409 2001-08-30 Akim Demaille <akim@epita.fr>
9410
9411 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
9412 * m4/atconfig.m4: Remove.
9413 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
9414 * tests/bison: New.
9415 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
9416 m4_if, m4_patsubst, and m4_regexp.
9417 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
9418 `input' file instead of echo.
9419
9420 2001-08-29 Akim Demaille <akim@epita.fr>
9421
9422 Bump to 1.28e.
9423
9424 2001-08-29 Akim Demaille <akim@epita.fr>
9425
9426 Version 1.28d.
9427
9428 2001-08-29 Paul Eggert <eggert@twinsun.com>
9429
9430 * src/bison.simple (yyparse): Don't take the address of an
9431 item before the start of an array, as that doesn't conform to
9432 the C Standard.
9433
9434 2001-08-29 Robert Anisko <anisko_r@epita.fr>
9435
9436 * doc/bison.texinfo (Location Tracking Calc): New node.
9437
9438 2001-08-29 Paul Eggert <eggert@twinsun.com>
9439
9440 * src/output.c (output): Do not define const, as this now
9441 causes more problems than it cures.
9442
9443 2001-08-29 Akim Demaille <akim@epita.fr>
9444
9445 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
9446 the nodes.
9447 Be sure to tag the `detailmenu'.
9448
9449 2001-08-29 Akim Demaille <akim@epita.fr>
9450
9451 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
9452 download in a tmp dir.
9453
9454 2001-08-28 Marc Autret <autret_m@epita.fr>
9455
9456 * config/depcomp: New file.
9457
9458 2001-08-28 Marc Autret <autret_m@epita.fr>
9459
9460 * doc/bison.1 (mandoc): Adjust.
9461 From Juan Manuel Guerrero.
9462
9463 2001-08-28 Marc Autret <autret_m@epita.fr>
9464
9465 * src/print_graph.c (print_state): Fix.
9466
9467 2001-08-27 Marc Autret <autret_m@epita.fr>
9468
9469 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
9470 char * members.
9471 Echo modifications to the functions prototypes.
9472 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
9473
9474 2001-08-27 Marc Autret <autret_m@epita.fr>
9475
9476 * src/vcg.c: Include `xalloc.h'.
9477 (add_colorentry): New.
9478 (add_classname): New.
9479 (add_infoname): New.
9480 * src/vcg.h: Add new prototypes.
9481
9482 2001-08-27 Akim Demaille <akim@epita.fr>
9483
9484 * Makefile.maint: Sync. again with CVS Autoconf.
9485
9486 2001-08-27 Akim Demaille <akim@epita.fr>
9487
9488 * Makefile.maint: Formatting changes.
9489 (po-update, cvs-update, update): New targets.
9490 (AMTAR): Remove.
9491
9492 2001-08-27 Akim Demaille <akim@epita.fr>
9493
9494 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9495 * Makefile.maint: Sync. with CVS Autoconf.
9496
9497 2001-08-27 Marc Autret <autret_m@epita.fr>
9498
9499 * src/vcg.h (struct infoname_s): New.
9500 (struct colorentry_s): New.
9501 (graph_s): New fields {vertical,horizontal}_order in structure.
9502 Add `infoname' field.
9503 Add `colorentry' field;
9504 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
9505 (G_HORIZONTAL_ORDER): New.
9506 (G_INFONAME): New.
9507 (G_COLORENTRY): New.
9508 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
9509 Add output of `infoname'.
9510 Add output of `colorentry'.
9511
9512 2001-08-27 Marc Autret <autret_m@epita.fr>
9513
9514 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
9515 This one shadowed a global parameter.
9516
9517 2001-08-24 Marc Autret <autret_m@epita.fr>
9518
9519 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
9520 instead of `unsigned'.
9521 (print_state): Do not call obstack_object_size () in obstack_grow ()
9522 to avoid macro variables shadowing.
9523
9524 2001-08-23 Marc Autret <autret_m@epita.fr>
9525
9526 * src/lex.c (percent_table): Typo: s/naem/name/.
9527 Add graph option.
9528 Normalize new options declarations.
9529
9530 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
9531
9532 * tests/suite.at: Exercise %header_extension and %source_extension.
9533
9534 2001-08-16 Marc Autret <autret_m@epita.fr>
9535
9536 * src/reader.c (parse_dquoted_param): New.
9537 (parse_header_extension_decl): Use it.
9538 (parse_source_extension_decl): Likewise.
9539
9540 2001-08-16 Marc Autret <autret_m@epita.fr>
9541
9542 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
9543 (get_xxxx_str): Use assert () instead of complain ().
9544 Remove return invokations in default cases.
9545 (get_decision_str): Modify default behaviour. Remove second argument.
9546 Echo modifications on calls.
9547 (output_graph): Fix.
9548
9549 2001-08-16 Marc Autret <autret_m@epita.fr>
9550
9551 * src/getargs.c (usage): Update with ``-g, --graph''.
9552
9553 2001-08-16 Marc Autret <autret_m@epita.fr>
9554
9555 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
9556 (Option Cross Key): Likewise.
9557 * doc/bison.1: Update.
9558
9559 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
9560
9561 * src/output.c (output_master_parser): Don't finish action_obstack.
9562 (output_parser): Don't care about the muscle action, here.
9563 (prepare): Copy the action_obstack in the action muscle.
9564 (output): Free action_obstack.
9565
9566 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9567
9568 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
9569 will contain `%union' declaration.
9570 (parse_union_decl): Delete #line directive output.
9571 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
9572 informations about %union.
9573 (parse_union_decl): Copy the union_obstack in the muscle stype.
9574 * src/bison.simple: Add new #line directive.
9575 Add typdef %%stype YYSTYPE.
9576
9577 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9578
9579 * src/bison.simple: Add new `#line' directive.
9580
9581 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
9582
9583 * src/bison.simple: New `#line' directive.
9584 * src/output.c (output_parser): Support new dynamic muscle input_line.
9585
9586 2001-09-22 Marc Autret <autret_m@epita.fr>
9587
9588 * src/output.c (output_master_parser): New.
9589 (output_parser): Be more re-entrant.
9590
9591 2001-09-21 Marc Autret <autret_m@epita.fr>
9592
9593 * src/reader.c (copy_definition, parse_union_decl): Update and use
9594 `linef' muscle.
9595 (copy_action): Likewise.
9596 Use obstack_1grow ().
9597 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
9598
9599 2001-09-21 Marc Autret <autret_m@epita.fr>
9600
9601 * src/options.c (option_table): Adjust.
9602 * src/lex.c (parse_percent_token): Fix.
9603
9604 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9605
9606 * src/options.c (symtab.h): Include it, need by lex.h.
9607
9608 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9609
9610 * src/lex.c (parse_percent_token): Change type of variable `tx', which
9611 is now an option_table_struct*.
9612 (option_strcmp): New function option_strcmp.
9613 (parse_percent_token): Call option_strcmp.
9614 * src/getargs.c (xalloc.h, options.h): Include it.
9615 (getargs): Call create_long_option_table.
9616 (getargs): Free longopts at the end of the function.
9617 (shortopts): Move in options.c.
9618 * src/options.c (create_long_option_table): New function. Convert
9619 information from option_table to option structure.
9620 * src/reader.c (options.h): Include it.
9621
9622 * src/Makefile.am: Adjust.
9623 * src/options.c (option_table): Create from longopts and percent_table.
9624 * src/getargs.c (longopts): Delete.
9625 * src/lex.c (struct percent_table_struct): Delete.
9626 (percent_table): Delete.
9627 (options.h): Include it.
9628 * src/options.c: Create.
9629 * src/options.h: Create.
9630 Declare enum opt_access_e.
9631 Define struct option_table_struct.
9632
9633 2001-09-20 Marc Autret <autret_m@epita.fr>
9634
9635 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
9636 sections of Bison.
9637
9638 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
9639
9640 * src/bison.simple: s/%%filename/%%skeleton.
9641 * src/muscle_tab.c (getargs.h): Include it.
9642 (muscle_init): Insert new muscle skeleton.
9643
9644 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
9645
9646 * src/output.c (output_parser): Delete unused variable actions_dumped.
9647
9648 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
9649
9650 * src/output.c (output): Delete call to reader_output_yylsp.
9651 * src/reader.c (reader): Likewise.
9652 * src/reader.h: Delete declaration of reader_output_yylsp.
9653
9654 2001-09-02 Marc Autret <autret_m@epita.fr>
9655
9656 * src/reader.c: Include muscle_tab.h.
9657 (parse_union_decl): Update.
9658 (parse_macro_decl): Rename parse_muscle_decl.
9659 Update to use renamed functions and variable.
9660 (read_declarations, copy_action, read_additionnal_code, : Updated
9661 with correct variables and functions names.
9662 (packsymbols, reader): Likewise.
9663
9664 * src/reader.h (muscle_obstack): Extern declaration update.
9665
9666 * src/output.c: Include muscle_tab.h
9667 In all functions using macro_insert, change by using muscle_insert ().
9668 (macro_obstack): Rename muscle_obstack.
9669 Echo modifications in the whole file.
9670 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
9671 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
9672 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
9673
9674 * src/muscle_tab.h: Update double inclusion macros.
9675 (macro_entry_s): Rename muscle_entry_s.
9676 Update prototypes.
9677
9678 * src/muscle_tab.c: Include muscle_tab.h.
9679 Rename macro_tabble to muscle_table.
9680 (mhash1, mhash2, mcmp): Use muscle_entry.
9681 (macro_init): Rename muscle_init. Update.
9682 (macro_insert): Rename muscle_insert. Update.
9683 (macro_find): Rename muscle_find. Update.
9684
9685 * src/main.c: Include muscle_tab.h.
9686 (main): Call muscle_init ().
9687 * src/Makefile.am (bison_SOURCES): Echo modifications.
9688
9689 2001-09-02 Marc Autret <autret_m@epita.fr>
9690
9691 Now the files macro_tab.[ch] are named muscle_tab.[ch].
9692
9693 * src/muscle_tab.c, src/muscle_tab.h: Add files.
9694
9695 2001-09-02 Marc Autret <autret_m@epita.fr>
9696
9697 * src/macrotab.c, src/macrotab.h: Remove.
9698
9699 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
9700
9701 * src/reader.c (copy_guard): Use muscle to specify the `#line'
9702 filename.
9703
9704 2001-09-01 Marc Autret <autret_m@epita.fr>
9705
9706 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
9707 to an explicit value to activate the feature. We do it here.
9708
9709 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9710
9711 * src/output.c (prepare): Delete the `filename' muscule insertion.
9712 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
9713 (parse_union_decl): Likewise.
9714 * src/macrotab.c (macro_init): Initialize filename by infile.
9715
9716 2001-08-31 Marc Autret <autret_m@epita.fr>
9717
9718 * src/bison.simple (YYLSP_NEEDED): New definition.
9719 * src/output.c (prepare): Add macro insertion of `locations_flag'
9720
9721 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9722
9723 * src/output.c (prepare): Delete insertion of previous muscles,
9724 and insert the `prefix' muscles.
9725 * src/macrotab.c (macro_init): Likewise.
9726 (macro_init): Initialization prefix directive by `yy'.
9727 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
9728 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9729 yylval, yydebug, yyerror, yynerrs and yyparse.
9730 New directive `#define' to substitute yydebug, ... with option
9731 name_prefix.
9732
9733 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9734
9735 * src/main.c (main): Standardize.
9736 * src/output.c (output_table_data, output_parser): Likewise.
9737 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9738
9739 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9740
9741 * src/reader.c (read_additionnal_code): Rename %%user_code to
9742 %%epilogue.
9743 * src/output.c (output): Rename %%declarations to %%prologue.
9744 * src/bison.simple: Echo modifications.
9745
9746 2001-08-31 Marc Autret <autret_m@epita.fr>
9747
9748 * src/reader.c (readgram): CleanUp.
9749 (output_token_defines): Likewise.
9750 (packsymbols): Likewise.
9751 (reader): Likewise.
9752 * src/output.c (output): CPP-out useless code.
9753
9754 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9755
9756 * src/reader.c (reader): Delete obsolete call to function
9757 output_trailers and output_headers.
9758 * src/output.h: Remove obsolete functions prototypes of output_headers
9759 and output_trailers.
9760
9761 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
9762
9763 * src/main.c: Include macrotab.h.
9764 * src/macrotab.h (macro_entry_s): Constify fields.
9765 Adjust functions prototypes.
9766 * src/macrotab.c (macro_insert): Constify key and value.
9767 (macro_find): Constify key.
9768 (macro_insert): Include 'xalloc.h'
9769 (macro_insert): Use XMALLOC.
9770 (macro_find): Constify return value.
9771 * src/output.c (output_table_data): Rename table to table_data.
9772 (output_parser): Constify macro_key, macro_value.
9773
9774 2001-08-30 Marc Autret <autret_m@epita.fr>
9775
9776 * src/reader.c (parse_skel_decl): New.
9777 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
9778 * src/lex.h (token_t): New token `tok_skel'.
9779 * src/lex.c (percent_table): Add skeleton option entry.
9780 Standardize.
9781
9782 2001-08-29 Marc Autret <autret_m@epita.fr>
9783
9784 * src/bison.simple: Add %%user_code directive at the end.
9785 * src/reader.c (read_additionnal_code): New.
9786 (reader): Use it.
9787 * src/output.c (output_program): Remove.
9788 (output): Update.
9789
9790 2001-08-28 Marc Autret <autret_m@epita.fr>
9791
9792 * src/output.c (output_actions): Clean up.
9793 (output_gram): CPP-out useless code.
9794 * src/reader.c (reader): Clean up, CPP-out useless code.
9795
9796 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
9797
9798 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
9799 directive.
9800 * src/bison.simple: Add `%%definitions'.
9801
9802 2001-08-28 Marc Autret <autret_m@epita.fr>
9803
9804 * config/depcomp: New file.
9805
9806 2001-08-27 Paul Eggert <eggert@twinsun.com>
9807
9808 * src/bison.simple (yyparse): Don't take the address of an
9809 item before the start of an array, as that doesn't conform to
9810 the C Standard.
9811
9812 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9813
9814 * src/output.c (output): Remove the initialization of the macro
9815 obstack. It was done too late here.
9816
9817 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
9818 completely wrong.
9819 (reader): Initialize the macro obstack here, since we need it to grow
9820 '%define' directives.
9821
9822 * src/reader.h: Declare the macro obstack as extern.
9823
9824 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9825
9826 * src/output.c (output_parser): Fix. Store single '%' characters in
9827 the output obstack instead of throwing them away.
9828
9829 2001-08-27 Akim Demaille <akim@epita.fr>
9830
9831 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9832
9833 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9834
9835 * lib/Makefile.am: Adjust.
9836
9837 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9838
9839 * src/bison.simple: Update and add '%%' directives.
9840
9841 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9842
9843 * src/reader.c (reader): Remove calls to 'output_headers' and
9844 'output_trailers'. Remove some C output.
9845 (readgram): Disable a piece of code that was writing a default
9846 definition for 'YYSTYPE'.
9847 (reader_output_yylsp): Remove.
9848 (packsymbols): Output token defintions to a macro.
9849 (copy_definition): Disable C output.
9850
9851 * src/reader.c (parse_macro_decl): New function used to parse macro
9852 declarations.
9853 (copy_string2): Put the body of copy_string into this new function.
9854 Add a parameter to let the caller choose whether he wants to copy the
9855 string delimiters or not.
9856 (copy_string): Be a simple call to copy_string2 with the last argument
9857 bound to true.
9858 (read_declarations): Add case for macro definition.
9859 (copy_identifier): New.
9860 (parse_macro_decl): Read macro identifiers using copy_identifier
9861 rather than lex.
9862
9863 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9864
9865 * src/output.c (prepare): Add prefixed names.
9866 (output_parser): Output semantic actions.
9867 (output_parser): Fix bug on '%%line' directives.
9868
9869 * src/output.c (output_headers): Remove. The C code printed by this
9870 function should now be in the skeletons.
9871 (output_trailers): Remove.
9872 (output): Disable call to 'reader_output_yylsp'.
9873 (output_rule_data): Do not output tables to the table obstack.
9874
9875 * src/output.c: Remove some C dedicated output.
9876 Improve the use of macro and output obstacks.
9877 (output_defines): Remove.
9878
9879 * src/output.c (output_token_translations): Associate 'translate'
9880 table with a macro. No output to the table obstack.
9881 (output_gram): Same for 'rhs' and 'prhs'.
9882 (output_stos): Same for 'stos'.
9883 (output_rule_data): Same for 'r1' and 'r2'.
9884 (token_actions): Same for 'defact'.
9885 (goto_actions): Same for 'defgoto'.
9886 (output_base): Same for 'pact' and 'pgoto'.
9887 (output_table): Same for 'table'.
9888 (output_check): Same for 'check'.
9889
9890 * src/output.c (output_table_data): New function.
9891 (output_short_table): Remove.
9892 (output_short_or_char_table): Remove.
9893
9894 * src/output.c (output_parser): Replace most of the skeleton copy code
9895 with something new. Skeletons are now processed character by character
9896 rather than line by line, and Bison looks for '%%' macros. This is the
9897 first step in making Bison's output process (a lot) more flexible.
9898 (output_parser): Use the macro table.
9899
9900 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9901
9902 * src/main.c (main): Initialize the macro table.
9903
9904 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9905
9906 * src/lex.c (percent_table): Add tok_define.
9907 * src/lex.h: Add tok_define.
9908
9909 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9910
9911 * src/macrotab.c: New file.
9912 * src/macrotab.h: New file.
9913 * src/Makefile.am: Update.
9914
9915 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9916
9917 * lib/hash.c: New file.
9918 * lib/hash.h: New file.
9919 * lib/Makefile.am: Update.
9920
9921 2001-08-15 Akim Demaille <akim@epita.fr>
9922
9923 Version 1.28c.
9924
9925 2001-08-15 Marc Autret <autret_m@epita.fr>
9926
9927 * src/reader.c (readgram): Indent output macro YYSTYPE.
9928 (packsymbols): Likewise.
9929 (output_token_defines): Likewise.
9930 * src/files.c: Standardize.
9931 (compute_header_macro): New.
9932 (defines_obstack_save): New. Use compute_header_macro.
9933 (output_files): Update. Use defines_obstack_save.
9934
9935 2001-08-15 Akim Demaille <akim@epita.fr>
9936
9937 * doc/bison.texinfo (Table of Symbols): Document
9938 YYSTACK_USE_ALLOCA.
9939
9940 2001-08-15 Akim Demaille <akim@epita.fr>
9941
9942 * missing: Update from CVS Automake.
9943 * config/config.guess, config/config.sub, config/texinfo.tex:
9944 Update from gnu.org.
9945
9946 2001-08-15 Akim Demaille <akim@epita.fr>
9947
9948 * Makefile.maint: Sync with CVS Autoconf.
9949
9950 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
9951
9952 * doc/bison.texinfo: Include GNU Free Documentation License from
9953 `fdl.texi'.
9954 * doc/fdl.texi: Add to package.
9955
9956 2001-08-14 Marc Autret <autret_m@epita.fr>
9957
9958 Turn on %{source,header}_extension features.
9959
9960 * src/lex.c (percent_table): Un-CPP out header_extension and
9961 source_extension.
9962 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
9963 (compute_exts_from_src): Remove conditions. It restores priorities
9964 between options.
9965
9966 2001-08-14 Marc Autret <autret_m@epita.fr>
9967
9968 * src/files.c (compute_base_names): Add extensions computing when
9969 `--file-prefix' used.
9970 Standardize function calls.
9971
9972 2001-08-13 Marc Autret <autret_m@epita.fr>
9973
9974 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
9975 defining it (defined but null disables alloca).
9976
9977 2001-08-13 Marc Autret <autret_m@epita.fr>
9978
9979 * src/bison.simple (_yy_memcpy): CPP reformat.
9980
9981 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
9982
9983 * tests/atconfig.in (CPPFLAGS): Fix.
9984
9985 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
9986
9987 * doc/bison.texinfo: Include GNU General Public License from
9988 `gpl.texi'.
9989 * doc/gpl.texi: Add to package.
9990
9991 2001-08-10 Marc Autret <autret_m@epita.fr>
9992
9993 * src/print_graph.h: Fix.
9994 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
9995
9996 2001-08-10 Akim Demaille <akim@epita.fr>
9997
9998 * src/system.h: Provide default declarations for stpcpy, strndup,
9999 and strnlen.
10000
10001 2001-08-10 Robert Anisko <anisko_r@epita.fr>
10002
10003 * doc/bison.texinfo (Locations): Update @$ stuff.
10004
10005 2001-08-09 Robert Anisko <anisko_r@epita.fr>
10006
10007 * src/bison.simple (YYLLOC_DEFAULT): Update.
10008 (yyparse): Adjust.
10009
10010 2001-08-08 Marc Autret <autret_m@epita.fr>
10011
10012 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
10013 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
10014 Reported by Fabrice Bauzac.
10015
10016 2001-08-08 Marc Autret <autret_m@epita.fr>
10017
10018 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
10019 * src/vcg.c (output_node): Fix.
10020 * src/vcg.h: Cleanup.
10021 * src/print_graph.c: Add comments.
10022 (node_output_size): New global variable. Simplify the formatting of
10023 the VCG graph output.
10024 (print_actions): Unused code is now used. It notifies the final state
10025 and no action states in the VCG graph. It also give the reduce actions.
10026 The `shift and goto' edges are red and the `go to state' edges are
10027 blue.
10028 Get the current node name and node_obstack by argument.
10029 (node_obstack): New variable.
10030 (print_state): Manage node_obstack.
10031 (print_core): Use node_obstack given by argument.
10032 A node is not only computed here but in print_actions also.
10033 (print_graph): CPP out useless code instead of commenting it.
10034
10035 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
10036
10037 * tests/atconfig.in (CPPFLAGS): Fix.
10038
10039 2001-08-07 Akim Demaille <akim@epita.fr>
10040
10041 * src/print_graph.c (quote): New.
10042 (print_core): Use it.
10043
10044 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
10045
10046 * src/vcg.c (complain.h): Include it.
10047 Unepitaize `return' invocations.
10048 [NDEBUG] (main): Remove.
10049 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
10050 * src/files.c (open_files): Initialize graph_obstack.
10051 * src/print_graph.c (print_actions): CPP out useless code.
10052 (print_core): Don't output the last `\n' in labels.
10053 Use `quote'.
10054 * src/files.c (output_files): Output the VCG file.
10055 * src/main.c (main): Invoke print_graph ();
10056
10057 2001-08-06 Marc Autret <autret_m@epita.fr>
10058
10059 Automaton VCG graph output.
10060 Using option ``-g'' or long option ``--graph'', you can generate
10061 a gram_filename.vcg file containing a VCG description of the LALR (1)
10062 automaton of your grammar.
10063
10064 * src/main.c: Call to print_graph() function.
10065 * src/getargs.h: Update.
10066 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
10067 (graph_flag): New flag.
10068 (longopts): Update.
10069 (getargs): Add case `g'.
10070 * src/files.c (graph_obstack): New obstack struct.
10071 (open_files): Initialize new obstack.
10072 (output_files): Saves graph_obstack if required.
10073 * src/files.h (graph_obstack): New extern declaration.
10074 * src/Makefile.am: Add new source files.
10075
10076 2001-08-06 Marc Autret <autret_m@epita.fr>
10077
10078 * src/print_graph.c, src/print_graph.h (graph): New.
10079 * src/vcg.h: New file.
10080 * src/vcg.c: New file, VCG graph handling.
10081
10082 2001-08-06 Marc Autret <autret_m@epita.fr>
10083
10084 Add of %source_extension and %header_extension which specify
10085 the source or/and the header output file extension.
10086
10087 * src/files.c (compute_base_names): Remove initialisation of
10088 src_extension and header_extension.
10089 (compute_exts_from_gf): Update.
10090 (compute_exts_from_src): Update.
10091 (output_files): Update.
10092 * src/reader.c (parse_header_extension_decl): New.
10093 (parse_source_extension_decl): New.
10094 (read_declarations): New case statements for the new tokens.
10095 * src/lex.c (percent_table): Add entries for %source_extension
10096 and %header_extension.
10097 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
10098
10099 2001-08-06 Marc Autret <autret_m@epita.fr>
10100
10101 * configure.in: Bump to 1.28c.
10102 * doc/bison.texinfo: Texinfo thingies.
10103
10104 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
10105
10106 * tests/atconfig.in (CPPFLAGS): Add.
10107 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
10108
10109 2001-08-03 Akim Demaille <akim@epita.fr>
10110
10111 Version 1.28b.
10112
10113 2001-08-03 Akim Demaille <akim@epita.fr>
10114
10115 * tests/Makefile.am (check-local): Ship testsuite.
10116 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
10117 Include `string.h'.
10118
10119 2001-08-03 Akim Demaille <akim@epita.fr>
10120
10121 * configure.in: Try using -Wformat when compiling.
10122
10123 2001-08-03 Akim Demaille <akim@epita.fr>
10124
10125 * configure.in: Bump to 1.28b.
10126
10127 2001-08-03 Akim Demaille <akim@epita.fr>
10128
10129 * src/complain.c: Adjust strerror_r portability issues.
10130
10131 2001-08-03 Akim Demaille <akim@epita.fr>
10132
10133 Version 1.28a.
10134
10135 2001-08-03 Akim Demaille <akim@epita.fr>
10136
10137 * src/getargs.c, src/getarg.h (skeleton)): Constify.
10138 * src/lex.c (literalchar): Avoid name clashes on `buf'.
10139 * src/getargs.c: Include complain.h.
10140 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
10141 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
10142
10143 2001-08-03 Akim Demaille <akim@epita.fr>
10144
10145 * src/reader.c (readgram): Display hidden chars in error messages.
10146
10147 2001-08-03 Akim Demaille <akim@epita.fr>
10148
10149 Update to gettext 0.10.39.
10150
10151 2001-08-03 Akim Demaille <akim@epita.fr>
10152
10153 * lib/strspn.c: New.
10154
10155 2001-08-01 Marc Autret <autret_m@epita.fr>
10156
10157 * doc/bison.texinfo: Update.
10158 * doc/bison.1 (mandoc): Update.
10159 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
10160 * src/files.c: Support output files extensions computing.
10161 (src_extension): New static variable.
10162 (header_extension): New static variable.
10163 (tr): New function.
10164 (get_extension_index): New function, gets the index of an extension
10165 filename in a string.
10166 (compute_exts_from_gf): New function, computes extensions from the
10167 grammar file extension.
10168 (compute_exts_from_src): New functions, computes extensions from the
10169 C source file extension, file given by ``-o'' option.
10170 (compute_base_names): Update.
10171 (output_files): Update.
10172
10173 2001-08-01 Robert Anisko <anisko_r@epita.fr>
10174
10175 * doc/bison.texi: Document @$.
10176 (Locations): New section.
10177
10178 2001-07-18 Akim Demaille <akim@epita.fr>
10179
10180 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
10181 * config/prev-version.txt, config/move-if-change: New.
10182 * Makefile.am: Adjust.
10183
10184 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
10185
10186 * src/bison.simple (yyparse): Suppress warning `comparaison
10187 between signed and unsigned'.
10188
10189 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
10190
10191 * src/getargs.h (raw_flag): Remove.
10192 * src/getargs.c: Die on `-r'/`--raw'.
10193 * src/lex.c (parse_percent_token): Die on `%raw'.
10194 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
10195 * tests/calc.at: Suppress test with option `--raw'.
10196
10197 2001-07-14 Akim Demaille <akim@epita.fr>
10198
10199 * config/: New.
10200 * configure.in: Require Autoconf 2.50.
10201 Update to gettext 0.10.38.
10202
10203 2001-03-16 Akim Demaille <akim@epita.fr>
10204
10205 * doc/bison.texinfo: ANSIfy the examples.
10206
10207 2001-03-16 Akim Demaille <akim@epita.fr>
10208
10209 * getargs.c (skeleton): New variable.
10210 (longopts): --skeleton is a new option.
10211 (shortopts, getargs): -S is a new option.
10212 * getargs.h: Declare skeleton.
10213 * output.c (output_parser): Use it.
10214
10215 2001-03-16 Akim Demaille <akim@epita.fr>
10216
10217 * m4/strerror_r.m4: New.
10218 * m4/error.m4: Run AC_FUNC_STRERROR_R.
10219 * lib/error.h, lib/error.c: Update.
10220
10221 2001-03-16 Akim Demaille <akim@epita.fr>
10222
10223 * src/getargs.c (longopts): Clean up.
10224
10225 2001-02-21 Akim Demaille <akim@epita.fr>
10226
10227 * src/reader.c (gensym): `gensym_count' is your own.
10228 Use a static buf to create the symbol name, as token_buffer is no
10229 longer a buffer.
10230
10231 2001-02-08 Akim Demaille <akim@epita.fr>
10232
10233 * src/conflicts.c (conflict_report): Be sure not to append to res
10234 between two calls, which could happen if both first sprintf were
10235 skipped, but not the first cp += strlen.
10236
10237 2001-02-08 Akim Demaille <akim@epita.fr>
10238
10239 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
10240 New, from fileutils 4.0.37.
10241 * configure.in: Require Autoconf 2.49c. I took some time before
10242 making this decision. This is the only way out for portability
10243 issues in Bison, it would mean way too much duplicate effort to
10244 import in Bison features implemented in 2.49c since 2.13.
10245 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
10246
10247 2001-02-02 Akim Demaille <akim@epita.fr>
10248
10249 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
10250 * lib/xalloc.h, lib/xmalloc.c: Update.
10251
10252 2001-01-19 Akim Demaille <akim@epita.fr>
10253
10254 Get rid of the ad hoc handling of token_buffer in the scanner: use
10255 the obstacks.
10256
10257 * src/lex.c (token_obstack): New.
10258 (init_lex): Initialize it. No longer call...
10259 (grow_token_buffer): this. Remove it.
10260 Adjust all the places which used it to use the obstack.
10261
10262 2001-01-19 Akim Demaille <akim@epita.fr>
10263
10264 * src/lex.h: Rename all the tokens:
10265 s/\bENDFILE\b/tok_eof/g;
10266 s/\bIDENTIFIER\b/tok_identifier/g;
10267 etc.
10268 Let them be enums, not #define, to ease debugging.
10269 Adjust all the code.
10270
10271 2001-01-18 Akim Demaille <akim@epita.fr>
10272
10273 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
10274 * src/lex.c (maxtoken, grow_token_buffer): Static.
10275
10276 2001-01-18 Akim Demaille <akim@epita.fr>
10277
10278 Since we now use obstacks, more % directives can be enabled.
10279
10280 * src/lex.c (percent_table): Also accept `%yacc',
10281 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
10282 `%debug'.
10283 Handle the actions for `%semantic_parser' and `%pure_parser' here,
10284 instead of returning a token.
10285 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
10286 * src/reader.c (read_declarations): Adjust.
10287 * src/files.c (open_files): Don't call `compute_base_names', don't
10288 compute `attrsfile' since they depend upon data which might be
10289 *in* the input file now.
10290 (output_files): Do it here.
10291 * src/output.c (output_headers): Document the fact that this patch
10292 introduces a guaranteed SEGV for semantic parsers.
10293 * doc/bison.texinfo: Document them.
10294 * tests/suite.at: Exercise these %options.
10295
10296 2000-12-20 Akim Demaille <akim@epita.fr>
10297
10298 Also handle the output file (--verbose) with obstacks.
10299
10300 * files.c (foutput): Remove.
10301 (output_obstack): New.
10302 Adjust all dependencies.
10303 * src/conflicts.c: Return a string.
10304 * src/system.h (obstack_grow_string): Rename as...
10305 (obstack_sgrow): this. Be ready to work with non literals.
10306 (obstack_fgrow4): New.
10307
10308 2000-12-20 Akim Demaille <akim@epita.fr>
10309
10310 * src/files.c (open_files): Fix the computation of short_base_name
10311 in the case of `-o foo.tab.c'.
10312
10313 2000-12-20 Akim Demaille <akim@epita.fr>
10314
10315 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
10316 (copy_dollar): Now that everything uses obstacks, get rid of the
10317 FILE * parameters.
10318
10319 2000-12-20 Akim Demaille <akim@epita.fr>
10320
10321 * src/files.c (open_files): Actually the `.output' file is based
10322 on the short_base_name, not base_name.
10323 * tests/suite.at (Checking output file names): Adjust.
10324
10325 2000-12-20 Akim Demaille <akim@epita.fr>
10326
10327 * src/bison.s1: Remove, we now use directly...
10328 * src/bison.simple: this.
10329 * src/Makefile.am: Use pkgdata instead of data.
10330
10331 2000-12-20 Akim Demaille <akim@epita.fr>
10332
10333 * src/files.c (guard_obstack): New.
10334 (open_files): Initialize it.
10335 (output_files): Dump it...
10336 * src/files.h: Export it.
10337 * src/reader.c (copy_guard): Use it.
10338
10339 2000-12-19 Akim Demaille <akim@epita.fr>
10340
10341 * src/files.c (outfile, defsfile, actfile): Removed as global
10342 vars.
10343 (open_files): Don't compute them.
10344 (output_files): Adjust.
10345 (base_name, short_base_name): Be global.
10346 Adjust dependencies.
10347
10348 2000-12-19 Akim Demaille <akim@epita.fr>
10349
10350 * src/files.c (strsuffix): New.
10351 (stringappend): Be just like strcat but allocate.
10352 (base_names): Eve out from open_files.
10353 Try to simplify the rather hairy computation of base_name and
10354 short_base_name.
10355 (open_files): Use it.
10356 * tests/suite.at (Checking output file names): New test.
10357
10358 2000-12-19 Akim Demaille <akim@epita.fr>
10359
10360 * src/system.h (obstack_grow_literal_string): Rename as...
10361 (obstack_grow_string): this.
10362 * src/output.c (output_parser): Recognize `%% actions' instead of
10363 `$'.
10364 * src/bison.s1: s/$/%% actions/.
10365 * src/bison.hairy: Likewise.
10366
10367 2000-12-19 Akim Demaille <akim@epita.fr>
10368
10369 * src/output.c (output_parser): Compute the `#line' lines when
10370 there are.
10371 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
10372 Suggested by Hans Aberg.
10373
10374 2000-12-19 Akim Demaille <akim@epita.fr>
10375
10376 Let the handling of the skeleton files be local to the procedures
10377 that use it.
10378
10379 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
10380 longer static.
10381 (fparser, open_extra_files): Remove.
10382 (open_files, output_files): Don't take care of fparser.
10383 * src/files.h: Adjust.
10384 * src/output.c (output_parser): Open and close the file to the
10385 skeleton.
10386 * src/reader.c (read_declarations): When %semantic_parser, open
10387 fguard.
10388
10389 2000-12-19 Akim Demaille <akim@epita.fr>
10390
10391 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
10392 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
10393
10394 2000-12-19 Akim Demaille <akim@epita.fr>
10395
10396 * src/files.c (open_files): Yipee! We no longer need all the code
10397 looking for `/tmp' since we have no tmp file.
10398
10399 2000-12-19 Akim Demaille <akim@epita.fr>
10400
10401 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
10402 New macros.
10403 * src/files.c (open_files): Less dependency on MSDOS etc.
10404
10405 2000-12-14 Akim Demaille <akim@epita.fr>
10406
10407 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
10408 Provide a default definition.
10409 Use it when executing the default @ action.
10410 * src/reader.c (reader_output_yylsp): No longer include
10411 `timestamp' and `text' in the default YYLTYPE.
10412
10413 2000-12-12 Akim Demaille <akim@epita.fr>
10414
10415 * src/reader.c (copy_definition, parse_union_decl, copy_action)
10416 (copy_guard): Quote the file names.
10417 Reported by Laurent Mascherpa.
10418
10419 2000-12-12 Akim Demaille <akim@epita.fr>
10420
10421 * src/output.c (output_headers, output_program, output): Be sure
10422 to escape special characters when outputting filenames.
10423 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
10424 (output_headers): Don't depend on them, Use ACTSTR.
10425
10426 2000-11-17 Akim Demaille <akim@epita.fr>
10427
10428 * lib/obstack.h: Formatting changes.
10429 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
10430 prevents type checking.
10431 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
10432 cast the value to (void *): assigning a `foo *' to a `void *'
10433 variable is valid.
10434 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
10435 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
10436 append characters.
10437
10438 2000-11-17 Akim Demaille <akim@epita.fr>
10439
10440 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
10441 as...
10442 (suite.m4, regression.m4, calc.m4): these.
10443 * tests/atgeneral.m4: Update from CVS Autoconf.
10444
10445 2000-11-17 Akim Demaille <akim@epita.fr>
10446
10447 * tests/regression.m4 (%union and --defines): New test,
10448 demonstrating a current bug in the obstack implementation.
10449
10450 2000-11-17 Akim Demaille <akim@epita.fr>
10451
10452 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
10453 macros.
10454 Use them to declare the variables which are global or local to
10455 `yyparse'.
10456
10457 2000-11-17 Akim Demaille <akim@epita.fr>
10458
10459 * acconfig.h: Remove, no longer used.
10460
10461 2000-11-07 Akim Demaille <akim@epita.fr>
10462
10463 * src: s/Copyright (C)/Copyright/g.
10464
10465 2000-11-07 Akim Demaille <akim@epita.fr>
10466
10467 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
10468 defining.
10469 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
10470
10471 2000-11-07 Akim Demaille <akim@epita.fr>
10472
10473 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
10474 Merge in a single CPP if/else.
10475
10476 2000-11-07 Akim Demaille <akim@epita.fr>
10477
10478 * src/output.c (output): Remove useless variables.
10479 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
10480 argument `data' for consistency with the prototypes.
10481 Qualify it `const'.
10482 (obstack_copy, obstack_copy0): Rename the second argument as
10483 `address' for consistency. Qualify it `const'.
10484 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
10485 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
10486 `const' their input argument (`data' or `address').
10487 Adjust the corresponding macros to include `const' in casts.
10488
10489 2000-11-03 Akim Demaille <akim@epita.fr>
10490
10491 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
10492 s/PFILE1/BISON_HAIRY/.
10493 Adjust dependencies.
10494
10495 2000-11-03 Akim Demaille <akim@epita.fr>
10496
10497 For some reason, this was not applied.
10498
10499 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10500 `unlink': it's no longer used.
10501
10502 2000-11-03 Akim Demaille <akim@epita.fr>
10503
10504 * src/files.c (skeleton_find): New function, eved out of...
10505 (open_files, open_extra_files): here.
10506
10507 2000-11-03 Akim Demaille <akim@epita.fr>
10508
10509 Don't use `atexit'.
10510
10511 * src/files.c (obstack_save): New function.
10512 (done): Rename as...
10513 (output_files): this.
10514 Use `obstack_save'.
10515 * src/main.c (main): Don't use `atexit' to register `done', since
10516 it no longer has to remove tmp files, just call `output_files'
10517 when there are no errors.
10518
10519 2000-11-02 Akim Demaille <akim@epita.fr>
10520
10521 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10522 `unlink': it's no longer used.
10523 * src/files.h: Formatting changes.
10524
10525 2000-11-02 Akim Demaille <akim@epita.fr>
10526
10527 Remove the last uses of mktemp and unlink/delete.
10528
10529 * src/files.c (fdefines, ftable): Removed.
10530 (defines_ostack, table_obstack): New.
10531 Adjust dependencies of the former into uses of the latter.
10532 * src/output.c (output_short_or_char_table, output_short_table):
10533 Convert to using obstacks.
10534 * src/reader.c (copy_comment2): Accept one FILE * and two
10535 obstacks.
10536 (output_token_defines, reader_output_yylsp): Use obstacks.
10537 * src/system.h (obstack_fgrow3): New.
10538 * po/POTFILES.in: Adjust.
10539
10540 2000-11-01 Akim Demaille <akim@epita.fr>
10541
10542 Change each use of `fattrs' into a use of `attrs_obstack'.
10543
10544 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
10545 * src/files.c (fattrs): Remove.
10546 (attrs_obstack): New.
10547 Adjust all dependencies.
10548 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
10549
10550 2000-11-01 Akim Demaille <akim@epita.fr>
10551
10552 Introduce obstacks.
10553 Change each use of `faction' into a use of `action_obstack'.
10554
10555 * lib/obstack.h, lib/obstack.c: New files.
10556 * src/files.c (faction): Remove.
10557 (action_obstack): New.
10558 Adjust all dependencies.
10559
10560 2000-10-20 Akim Demaille <akim@epita.fr>
10561
10562 * lib/quote.h (PARAMS): New macro. Use it.
10563
10564 2000-10-16 Akim Demaille <akim@epita.fr>
10565
10566 * src/output.c (output_short_or_char_table): New function.
10567 (output_short_table, output_token_translations): Use it.
10568 (goto_actions): Use output_short_table.
10569
10570 2000-10-16 Akim Demaille <akim@epita.fr>
10571
10572 * src/symtab.c (bucket_new): New function.
10573 (getsym): Use it.
10574
10575 * src/output.c (output_short_table): New argument to display the
10576 comment associated with the table.
10577 Adjust dependencies.
10578 (output_gram): Use it.
10579 (output_rule_data): Nicer output layout for YYTNAME.
10580
10581 2000-10-16 Akim Demaille <akim@epita.fr>
10582
10583 * src/lex.c (read_typename): New function.
10584 (lex): Use it.
10585 * src/reader.c (copy_dollar): Likewise.
10586
10587 2000-10-16 Akim Demaille <akim@epita.fr>
10588
10589 * src/reader.c (copy_comment2): Expect the input stream to be on
10590 the `/' which is suspected to open a comment, instead of being
10591 called after `//' or `/*' was read.
10592 (copy_comment, copy_definition, parse_union_decl, copy_action)
10593 (copy_guard): Adjust.
10594
10595 2000-10-16 Akim Demaille <akim@epita.fr>
10596
10597 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
10598 `read_signed_integer'.
10599
10600 2000-10-16 Akim Demaille <akim@epita.fr>
10601
10602 * src/reader.c (copy_dollar): New function.
10603 (copy_guard, copy_action): Use it.
10604
10605 2000-10-16 Akim Demaille <akim@epita.fr>
10606
10607 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
10608 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
10609 New files, from Fileutils 4.0.27.
10610 * src/main.c (printable_version): Remove.
10611 * src/lex.c, src/reader.c: Use `quote'.
10612
10613 2000-10-04 Akim Demaille <akim@epita.fr>
10614
10615 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
10616
10617 2000-10-04 Akim Demaille <akim@epita.fr>
10618
10619 * doc/bison.texinfo: Various typos spotted by Neil Booth.
10620
10621 2000-10-04 Akim Demaille <akim@epita.fr>
10622
10623 When a literal string is used to define two different tokens,
10624 `bison -v' segfaults.
10625 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
10626
10627 * tests/regression.m4: New file.
10628 Include the core of the sample provided by Piotr Gackiewicz.
10629 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
10630 properly.
10631
10632 2000-10-04 Akim Demaille <akim@epita.fr>
10633
10634 * src/reader.c (parse_expect_decl): Keep `count' within the size
10635 of `buffer'.
10636 From Neil Booth.
10637
10638 2000-10-02 Paul Eggert <eggert@twinsun.com>
10639
10640 * bison.s1 (yyparse): Assign the default value
10641 unconditionally, to avoid a GCC warning and make the parser a
10642 tad smaller.
10643
10644 2000-10-02 Akim Demaille <akim@epita.fr>
10645
10646 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
10647 options.
10648
10649 2000-10-02 Akim Demaille <akim@epita.fr>
10650
10651 * src/derives.c, src/print.c, src/reduce.c: To ease the
10652 translation, move some `\n' out of the translated strings.
10653
10654 2000-10-02 Akim Demaille <akim@epita.fr>
10655
10656 The location tracking mechanism is precious for parse error
10657 messages. Nevertheless, it is enabled only when `@n' is used in
10658 the grammar, which is a different issue (you can use it in error
10659 message, but not in the grammar per se). Therefore, there should
10660 be another means to enable it.
10661
10662 * src/getargs.c (getargs): Support `--locations'.
10663 (usage): Report it.
10664 * src/getargs.h (locationsflag): Export it.
10665 * src/lex.c (percent_table): Support `%locations'.
10666 * src/reader.c (yylsp_needed): Remove this variable, now replaced
10667 with `locationsflag'.
10668 * doc/bison.texinfo: Document `--locations' and `%locations'.
10669 Sort the options.
10670 * tests/calc.m4: Test it.
10671
10672 For regularity of the names, replace each
10673 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
10674 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
10675 In addition replace each `flag' with `_flag'.
10676
10677 2000-10-02 Akim Demaille <akim@epita.fr>
10678
10679 Also test parse error messages, including with YYERROR_VERBOSE.
10680
10681 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
10682 associative).
10683 Use it to check the computations.
10684 Use it to check `nonassoc' is honored.
10685 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
10686 `--yyerror-verbose'.
10687 (_AT_CHECK_CALC): Adjust to this option.
10688 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
10689
10690 2000-10-02 Akim Demaille <akim@epita.fr>
10691
10692 Test also `--verbose', `--defines' and `--name-prefix'. Testing
10693 the latter demonstrates a flaw in the handling of non debugging
10694 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
10695 was used in order to simplify:
10696
10697 #if YYDEBUG
10698 if (yydebug)
10699 {
10700 ...
10701 }
10702 #endif
10703
10704 into
10705
10706 if (yydebug)
10707 {
10708 ...
10709 }
10710
10711 unfortunately this leads to a CPP conflict when
10712 `--name-prefix=foo' is used since it produces `#define yydebug
10713 foodebug'.
10714
10715 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
10716 (YYDPRINTF): New macro.
10717 Spread its use.
10718 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10719 the bison options.
10720 Also test `--verbose', `--defines' and `--name-prefix'.
10721
10722 2000-10-02 Akim Demaille <akim@epita.fr>
10723
10724 Improve the readability of the produced parsers.
10725
10726 * src/bison.s1: Formatting changes.
10727 Improve the comment related to the `$' mark.
10728 (yydefault): Don't fall through to `yyresume': `goto' there.
10729 * src/output.c (output_parser): When the `$' is met, skip the end
10730 of its line.
10731 New variable, `number_of_dollar_signs', to check there's exactly
10732 one `$' in the parser skeleton.
10733
10734 2000-10-02 Akim Demaille <akim@epita.fr>
10735
10736 * lib/xstrdup.c: New file, from the fileutils.
10737 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10738 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10739 instead of strlen + xmalloc + strcpy.
10740 * src/symtab.c (copys): Remove, use xstrdup instead.
10741
10742 2000-10-02 Akim Demaille <akim@epita.fr>
10743
10744 * src/gram.h (associativity): New enum type which replaces the
10745 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10746 `right_assoc', `left_assoc' and `non_assoc'.
10747 Adjust all dependencies.
10748 * src/reader.c: Formatting changes.
10749 (LTYPESTR): Don't define it, use it as a literal in
10750 `reader_output_yylsp'.
10751 * src/symtab.h (symbol_class): New enum type which replaces the
10752 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10753 `sunknown', `stoken and `snterm'.
10754
10755 2000-10-02 Akim Demaille <akim@epita.fr>
10756
10757 * src/getargs.c (fixed_outfiles): Rename as...
10758 (yaccflag): for consistency and accuracy.
10759 Adjust dependencies.
10760
10761 2000-10-02 Akim Demaille <akim@epita.fr>
10762
10763 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10764 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10765 difficult and introduced a lot of core dump. It turns out that
10766 Bison used an implementation of `xmalloc' based on `calloc', and
10767 at various places it does depend upon the initialization to 0. I
10768 have not tried to isolate the pertinent places, and all the former
10769 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10770 someone should address this issue.
10771
10772 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10773 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10774 files.
10775 Adjust dependencies.
10776 * src/warshall.h: New file.
10777 Propagate.
10778
10779 2000-10-02 Akim Demaille <akim@epita.fr>
10780
10781 Various anti-`extern in *.c' changes.
10782
10783 * src/system.h: Include `assert.h'.
10784
10785 2000-10-02 Akim Demaille <akim@epita.fr>
10786
10787 * src/state.h (nstates, final_state, first_state, first_shift)
10788 (first_reduction): Move their exportation from here...
10789 * src/LR0.h: to here.
10790 Adjust dependencies.
10791 * src/getargs.c (statisticsflag): New variable.
10792 Add support for `--statistics'.
10793 Adjust dependencies.
10794
10795 Remove a lot of now useless `extern' statements in most files.
10796
10797 2000-10-02 Akim Demaille <akim@epita.fr>
10798
10799 * src/LR0.h: New file.
10800 Propagate its use.
10801
10802 2000-10-02 Akim Demaille <akim@epita.fr>
10803
10804 * src/print.h: New file.
10805 Propagate its use.
10806 * src/print.c: Formatting and ordering changes.
10807 (verbose, terse): Replace with...
10808 (print_results): this new function.
10809 Adjust dependencies.
10810
10811 2000-10-02 Akim Demaille <akim@epita.fr>
10812
10813 * src/conflicts.c (conflict_report): New function.
10814 (conflict_log, verbose_conflict_log): Replace with...
10815 (print_conflicts): this function.
10816 Adjust dependencies.
10817 * src/conflicts.h: New file.
10818 Propagate its inclusion.
10819
10820 2000-10-02 Akim Demaille <akim@epita.fr>
10821
10822 * src/nullable.h: New file.
10823 Propagate its inclusion.
10824 * src/nullable.c: Formatting changes.
10825
10826 2000-10-02 Akim Demaille <akim@epita.fr>
10827
10828 * src/reduce.h: New file.
10829 Propagate its inclusion.
10830 * src/reduce.c: Topological sort and other formatting changes.
10831 (bool, TRUE, FALSE): Move their definition to...
10832 * src/system.h: here.
10833
10834 2000-10-02 Akim Demaille <akim@epita.fr>
10835
10836 * src/files.c: Formatting changes.
10837 (tryopen, tryclose, openfiles): Rename as...
10838 (xfopen, xfclose, open_files): this.
10839 (stringappend): static.
10840 * src/files.h: Complete the list of exported symbols.
10841 Propagate its use.
10842
10843 2000-10-02 Akim Demaille <akim@epita.fr>
10844
10845 * src/reader.h: New file.
10846 Propagate its use instead of tedious list of `extern' and
10847 prototypes.
10848 * src/reader.c: Formatting changes, topological sort,
10849 s/register//.
10850
10851 2000-10-02 Akim Demaille <akim@epita.fr>
10852
10853 * src/lex.h: Prototype `lex.c' exported functions.
10854 * src/reader.c: Adjust.
10855 * src/lex.c: Formatting changes.
10856 (safegetc): Rename as...
10857 (xgetc): this.
10858
10859 2000-10-02 Akim Demaille <akim@epita.fr>
10860
10861 * src/lalr.h: New file.
10862 Propagate its inclusion instead of prototypes and `extern'.
10863 * src/lalr.c: Formatting changes, topological sorting etc.
10864
10865 2000-10-02 Akim Demaille <akim@epita.fr>
10866
10867 * src/output.c (token_actions): Introduce a temporary array,
10868 YYDEFACT, that makes it possible for this function to use
10869 output_short_table.
10870
10871 2000-10-02 Akim Demaille <akim@epita.fr>
10872
10873 `user_toknums' is output as a `short[]' in `output.c', while it is
10874 defined as a `int[]' in `reader.c'. For consistency with the
10875 other output tables, `user_toknums' is now defined as a table of
10876 shorts.
10877
10878 * src/reader.c (user_toknums): Be a short table instead of an int
10879 table.
10880 Adjust dependencies.
10881
10882 Factor the short table outputs.
10883
10884 * src/output.c (output_short_table): New function.
10885 * src/output.c (output_gram, output_stos, output_rule_data)
10886 (output_base, output_table, output_check): Use it.
10887
10888 2000-10-02 Akim Demaille <akim@epita.fr>
10889
10890 * src/output.c (output): Topological sort of the functions, in
10891 order to get rid of the `static' prototypes.
10892 No longer use `register'.
10893 * src/output.h: New file.
10894 Propagate its inclusion in files explicitly prototyping functions
10895 from output.c.
10896
10897 2000-09-21 Akim Demaille <akim@epita.fr>
10898
10899 * src/atgeneral.m4: Update from Autoconf.
10900
10901 2000-09-21 Akim Demaille <akim@epita.fr>
10902
10903 * src/closure.h: New file.
10904 * src/closure.c: Formatting changes, topological sort over the
10905 functions, use of closure.h.
10906 (initialize_closure, finalize_closure): Rename as...
10907 (new_closure, free_closure): these. Adjust dependencies.
10908 * src/LR0.c: Formatting changes, topological sort, use of
10909 cloture.h.
10910 (initialize_states): Rename as...
10911 (new_states): this.
10912 * src/Makefile.am (noinst_HEADERS): Adjust.
10913
10914 2000-09-20 Akim Demaille <akim@epita.fr>
10915
10916 * src/acconfig.h: Don't protect config.h against multiple
10917 inclusion.
10918 Don't define PARAMS.
10919 * src/system.h: Define PARAMS.
10920 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
10921 purpose of config.h. system.h must not try to fix wrong
10922 definitions in config.h.
10923
10924 2000-09-20 Akim Demaille <akim@epita.fr>
10925
10926 * src/derives.h: New file.
10927 * src/main.c, src/derives.h: Use it.
10928 Formatting changes.
10929 * src/Makefile.am (noinst_HEADERS): Adjust.
10930
10931 2000-09-20 Akim Demaille <akim@epita.fr>
10932
10933 * tests/atgeneral.m4: Update from Autoconf.
10934 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
10935 (AT_CHECK_CALC): New macros.
10936 Use these macros to test bison with options `', `--raw',
10937 `--debug', `--yacc', `--yacc --debug'.
10938
10939 2000-09-19 Akim Demaille <akim@epita.fr>
10940
10941 * src/output.c: Formatting changes.
10942 * src/machine.h: Remove, leaving its contents in...
10943 * src/system.h: here.
10944 Include stdio.h.
10945 Adjust all dependencies on stdio.h and machine.h.
10946 * src/getargs.h: New file.
10947 Let all `extern' declarations about getargs.c be replaced with
10948 inclusion of `getargs.h'.
10949 * src/Makefile.am (noinst_HEADERS): Adjust.
10950
10951 * tests/calc.m4 (yyin): Be initialized in main, not on the global
10952 scope.
10953 (yyerror): Returns void, not int.
10954 * doc/bison.texinfo: Formatting changes.
10955
10956 2000-09-19 Akim Demaille <akim@epita.fr>
10957
10958 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
10959 portable.
10960
10961 2000-09-18 Akim Demaille <akim@epita.fr>
10962
10963 * configure.in: Append WARNING_CFLAGS to CFLAGS.
10964 * src/Makefile.am (INCLUDES): Don't.
10965 Be ready to fetch headers in lib/.
10966
10967 2000-09-18 Akim Demaille <akim@epita.fr>
10968
10969 * doc/bison.texinfo: Update the copyright.
10970 ANSIfy and GNUify the examples.
10971 Remove the old menu.
10972
10973 2000-09-18 Akim Demaille <akim@epita.fr>
10974
10975 First set of tests: use the `calc' example from the documentation.
10976
10977 * src/bison.s1 (yyparse): Condition the code using `yytname' which
10978 is defined only when YYDEBUG is.
10979 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
10980 * src/files.c (tryopen, tryclose): Formatting changes.
10981 Move to the top and be static.
10982 * src/reader.c (read_signed_integer): Likewise.
10983 * tests/calc.m4: New file.
10984 * Makefile.am, suite.m4: Adjust.
10985 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
10986
10987 2000-09-18 Akim Demaille <akim@epita.fr>
10988
10989 Add support for an Autotest test suite for Bison.
10990
10991 * m4/m4.m4, m4/atconfig.m4: New files.
10992 * m4/Makefile.am (EXTRA_DIST): Adjust.
10993 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
10994 files.
10995 * src/getargs.c: Display a more standard --version message.
10996 * src/reader.c (reader): Formatting changes.
10997 No longer depend upon VERSION_STRING.
10998 * configure.in: No longer use `dnl'.
10999 Set up the test suite and the new directory `tests/.
11000 (VERSION_STRING): Remove.
11001
11002 2000-04-14 Akim Demaille <akim@epita.fr>
11003
11004 * src/reader.c (copy_comment2): New function, same as former
11005 `copy_comment', but outputs into two FILE *.
11006 (copy_comment): Use it.
11007 (parse_union_decl): Use it.
11008 (get_type, parse_start_decl): Use the same `invalid' message.
11009 (parse_start_decl, parse_union_decl): Use the same `multiple'
11010 message.
11011 (parse_union_decl, copy_guard, copy_action): Use the same
11012 `unmatched' message.
11013 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
11014
11015 2000-03-31 Akim Demaille <akim@epita.fr>
11016
11017 * src/files.c (tryopen, tryclose): Move to the top.
11018 Be static.
11019
11020 2000-03-31 Akim Demaille <akim@epita.fr>
11021
11022 * src/main.c (main): Don't call `done', exit does it.
11023
11024 2000-03-31 Akim Demaille <akim@epita.fr>
11025
11026 * allocate.c: s/return (foo)/return foo/.
11027 * lalr.c: Likewise.
11028 * LR0.c: Likewise.
11029 * output.c: Likewise.
11030 * reader.c: Likewise.
11031 * symtab.c: Likewise.
11032 * vmsgetargs.c: Likewise.
11033
11034 2000-03-31 Akim Demaille <akim@epita.fr>
11035
11036 Clean up the error reporting functions.
11037
11038 * src/report.c: New file.
11039 * src/report.h: Likewise.
11040 * src/Makefile.am: Adjust.
11041 * m4/error.m4: New file.
11042 * m4/Makefile.am: Adjust.
11043 * configure.in (jm_PREREQ_ERROR): Call it.
11044 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
11045 Remove.
11046 (fatal, fatals): Remove. All callers use complain.c::fatal.
11047 (warn, warni, warns, warnss, warnss): Remove. All callers use
11048 complain.c::complain.
11049 (toomany): Remove, use fatal instead.
11050 * src/files.c (done): No argument, use complain_message_count.
11051 * src/main.c (main): Register `done' to `atexit'.
11052
11053 * src/getargs.c (usage): More `fputs', less `fprintf'.
11054
11055 2000-03-28 Akim Demaille <akim@epita.fr>
11056
11057 * lib/: New directory.
11058 * Makefile.am (SUBDIRS): Adjust.
11059 * configure.in: Adjust.
11060 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
11061 useless.
11062 * src/alloca.c: Moved to lib/.
11063 * src/getopt.c: Likewise.
11064 * src/getopt1.c: Likewise.
11065 * src/getopt.h: Likewise.
11066 * src/ansi2knr.c: Likewise.
11067 * src/ansi2knr.1: Likewise.
11068 * src/Makefile.am: Adjust.
11069 * lib/Makefile.am: New file.
11070
11071 2000-03-28 Akim Demaille <akim@epita.fr>
11072
11073 * src/getargs.c (usage): Refresh the help message.
11074
11075 2000-03-17 Akim Demaille <akim@epita.fr>
11076
11077 * src/getopt1.c: Updated from textutils 2.0e
11078 * src/getopt.c: Likewise.
11079 * src/getopt.h: Likewise.
11080
11081 2000-03-17 Akim Demaille <akim@epita.fr>
11082
11083 * src/Makefile.am (bison.simple): Fix the awk program: quote only
11084 the file name, not the whole `#line LINE FILE'.
11085
11086 2000-03-17 Akim Demaille <akim@epita.fr>
11087
11088 On syntax errors, report the token on which we choked.
11089
11090 * src/bison.s1 (yyparse): In the label yyerrlab, when
11091 YYERROR_VERBOSE, add yychar in msg.
11092
11093 2000-03-17 Akim Demaille <akim@epita.fr>
11094
11095 * src/reader.c (copy_at): New function.
11096 (copy_guard): Use it.
11097 (copy_action): Use it.
11098
11099 2000-03-17 Akim Demaille <akim@epita.fr>
11100
11101 Be kind to translators, save some useless translations.
11102
11103 * src/main.c (banner): New function.
11104 (fatal_banner): Use it.
11105 (warn_banner): Use it.
11106
11107 2000-03-17 Akim Demaille <akim@epita.fr>
11108
11109 * src/reader.c (copy_definition): Use copy_string and
11110 copy_comment. Removed now unused `match', `ended',
11111 `cplus_comment'.
11112 (copy_comment, copy_string): Moved, to be visible from
11113 copy_definition.
11114
11115 2000-03-17 Akim Demaille <akim@epita.fr>
11116
11117 * src/reader.c (copy_string): Declare `static inline'. No
11118 problems with inline, since it is checked by configure.
11119 (copy_comment): Likewise.
11120
11121 2000-03-17 Akim Demaille <akim@epita.fr>
11122
11123 * src/reader.c (packsymbols): Formatting changes.
11124
11125 2000-03-17 Akim Demaille <akim@epita.fr>
11126
11127 * src/reader.c (copy_comment): New function, factored out from:
11128 (copy_action): Use it. Removed now unused `match', `ended',
11129 `cplus_comment'.
11130 (copy_guard): Likewise.
11131
11132 2000-03-17 Akim Demaille <akim@epita.fr>
11133
11134 * src/reader.c (copy_string): New function, factored out from:
11135 (copy_action): Use it.
11136 (copy_guard): Likewise.
11137
11138 2000-03-17 Akim Demaille <akim@epita.fr>
11139
11140 Change the handling of @s so that they behave exactly like $s.
11141 There is now a pseudo variable @$ (readble and writable), location
11142 of the lhs of the rule (by default ranging from the location of
11143 the first symbol of the rhs, to the location of the last symbol,
11144 or, if the rhs is empty, YYLLOC).
11145
11146 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
11147 yyval.
11148 (yyparse): When providing a default semantic action, provide a
11149 default location action.
11150 (after the $): No longer change `*YYLSP', just stack YYLOC the
11151 same way you stack YYVAL.
11152 * src/reader.c (read_declarations): Use warns.
11153 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
11154 (copy_action, case '@'): Likewise.
11155 Use a standard error message, to save useless work from
11156 translators.
11157
11158 2000-03-17 Akim Demaille <akim@epita.fr>
11159
11160 * src/bison.s1: Formatting and cosmetics changes.
11161 * src/reader.c: Likewise.
11162 Update the Copyright notice.
11163
11164 2000-03-17 Akim Demaille <akim@epita.fr>
11165
11166 * src/bison.s1 (#line): All set to `#line' only, since the
11167 Makefile now handles them.
11168
11169 2000-03-16 Akim Demaille <akim@epita.fr>
11170
11171 * src/output.c (output_rule_data): Output the documentation of
11172 some of the tables.
11173 (Copyright notice): Update.
11174 Formatting changes.
11175
11176 2000-03-16 Akim Demaille <akim@epita.fr>
11177
11178 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
11179 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
11180 One `#if YYDEBUG' remains, since it uses variables which are
11181 defined only if `YYDEBUG != 0'.
11182
11183 2000-03-16 Akim Demaille <akim@epita.fr>
11184
11185 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
11186 and related variables so that the similarities are highlighted.
11187
11188 2000-03-16 Akim Demaille <akim@epita.fr>
11189
11190 * src/bison.s1: Properly indent CPP directives.
11191
11192 2000-03-16 Akim Demaille <akim@epita.fr>
11193
11194 * src/bison.s1: Properly indent the `alloca' CPP section.
11195
11196 2000-03-16 Akim Demaille <akim@epita.fr>
11197
11198 Do not hard code values of directories in `configure.in'.
11199 Update the `configure' tool chain.
11200
11201 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
11202 src/makefile.am.
11203 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
11204 (AC_OUTPUT): Add m4/Makefile.
11205 Bump to bison 1.28a, 1.29 has never been released.
11206 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
11207 handled via src/Makefile.am.
11208 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
11209 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
11210 autoheader.
11211 * Makefile.am (SUBDIRS): Add m4.
11212 (ACLOCAL_AM_FLAGS): New variable.
11213 (AUTOMAKE_OPTIONS): Add check-news.
11214 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
11215 the proper line number and file name.
11216 (DEFS): Propagate the location of bison library files and of the
11217 locale files.
11218 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
11219 builddir.
11220 * acinclude.m4: Remove, replaced by the directory m4.
11221 * m4/Makefile.am (EXTRA_DIST): New variable.
11222 * m4/gettext.m4: New file, from the fileutils.
11223 * m4/lcmessage.m4: Likewise
11224 * m4/progtest.m4: Likewise.
11225 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
11226
11227 2000-03-10 Akim Demaille <akim@epita.fr>
11228
11229 * src/closure.c:
11230 Formatting changes of various comments.
11231 Respect the GNU coding standards at various places.
11232 Don't use `_()' when no translation is needed.
11233
11234 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11235
11236 * src/files.c:
11237 OS/2 honors TMPDIR environment variable.
11238
11239 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11240
11241 * doc/bison.texinfo: Tweaked spelling and grammar.
11242 Updated ISBN.
11243 Removed reference to price of printed copy.
11244 Mention BISON_SIMPLE and BISON_HAIRY.
11245
11246 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11247
11248 * configure.in, NEWS:
11249 Bison 1.29 released.
11250
11251 1999-10-27 Jesse Thilo <jthilo@gnu.org>
11252
11253 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
11254 Added reference card.
11255
11256 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11257
11258 * po/ru.po: Added Russian translation.
11259
11260 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11261
11262 * configure.in: Added Russian translation.
11263
11264 1999-07-06 Jesse Thilo <jthilo@gnu.org>
11265
11266 * configure.in, NEWS, README:
11267 Released version 1.28.
11268
11269 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11270
11271 * src/system.h:
11272 Squashed redefinition warning on some systems.
11273
11274 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
11275 Have configure build version string instead of relying on ANSI string
11276 concatentation.
11277
11278 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11279
11280 * po/POTFILES.in: Got rid of version.c.
11281
11282 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11283
11284 * acconfig.h, configure.in:
11285 Have configure build version string instead of relying on ANSI string
11286 concatentation.
11287
11288 1999-06-08 Jesse Thilo <jthilo@gnu.org>
11289
11290 * doc/bison.1:
11291 Dropped mention of `+' for long-named options.
11292
11293 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11294
11295 * src/files.c: Added <unistd.h> for unlink().
11296
11297 * src/Makefile.am, src/system.h:
11298 I18n fixes.
11299
11300 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11301
11302 * README: Added a FAQ list.
11303
11304 * configure.in, acconfig.h:
11305 I18n fixes.
11306
11307 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11308
11309 * doc/FAQ, doc/Makefile.am:
11310 Added a FAQ list.
11311
11312 1999-05-19 Jesse Thilo <jthilo@gnu.org>
11313
11314 * src/alloc.h, src/symtab.h, src/version.c:
11315 Protected inclusion of "config.h" with HAVE_CONFIG_H.
11316
11317 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11318
11319 * src/.cvsignore, src/Makefile.am:
11320 Reorganized: sources in `src', documentation in `doc'.
11321
11322 * src/lex.c (literalchar):
11323 fixed the code for escaping double quotes (thanks
11324 Jonathan Czisny.)
11325
11326 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11327
11328 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
11329 Adjusted paths to reflect directory reorganization.
11330
11331 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11332
11333 * doc/.cvsignore, doc/Makefile.am:
11334 Reorganized: sources in `src', documentation in `doc'.
11335
11336 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11337
11338 * configure.in:
11339 Updated AC_INIT file to reflect directory reorganization.
11340
11341 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
11342 Reorganized: sources in `src', documentation in `doc'.
11343
11344 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11345
11346 * src/allocate.c:
11347 Don't declare calloc() and realloc() if not necessary.
11348
11349 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11350
11351 * configure.in, acconfig.h, acinclude.m4:
11352 Don't declare calloc() and realloc() if not necessary.
11353
11354 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11355
11356 * po/.cvsignore: Added i18n support.
11357
11358 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11359
11360 * acconfig.h, configure.in, Makefile.am:
11361 Added i18n support.
11362
11363 1999-03-22 Jesse Thilo <jthilo@gnu.org>
11364
11365 * src/bison.s1: Fixed #line numbers.
11366
11367 1999-03-15 Jesse Thilo <jthilo@gnu.org>
11368
11369 * po/es.po, po/fr.po, po/nl.po, po/de.po:
11370 Added PO files from Translation Project.
11371
11372 1999-03-03 Jesse Thilo <jthilo@gnu.org>
11373
11374 * Makefile.am:
11375 Added support for non-ANSI compilers (ansi2knr).
11376
11377 1999-02-16 Jesse Thilo <jthilo@gnu.org>
11378
11379 * configure.in: Bumped version number to 1.27.
11380
11381 * Makefile.am:
11382 Added `bison.simple' to list of files removed by `make distclean'.
11383
11384 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11385
11386 * src/files.c, src/files.h:
11387 Defined locations of parser files in config.h instead of Makefile.
11388
11389 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11390
11391 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
11392 Defined locations of parser files in config.h instead of Makefile.
11393
11394 1999-02-09 Jesse Thilo <jthilo@gnu.org>
11395
11396 * Makefile.am:
11397 Removed inappropriate use of $< macro.
11398
11399 1999-02-05 Jesse Thilo <jthilo@gnu.org>
11400
11401 * po/Makefile.in.in, po/POTFILES.in:
11402 Add `po' directory skeleton.
11403
11404 1999-01-27 Jesse Thilo <jthilo@gnu.org>
11405
11406 * README: Document help-bison list.
11407
11408 * configure.in: Add check for mkstemp().
11409
11410 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11411
11412 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
11413 Hush a few compiler warnings.
11414
11415 * src/files.c:
11416 Add tryclose(), which verifies that fclose was successful.
11417 Hush a couple of compiler warnings.
11418
11419 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11420
11421 * Makefile.am, OChangeLog:
11422 ChangeLog is now automatically generated. Include the old version as
11423 OChangeLog.
11424
11425 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11426
11427 * 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:
11428 Update FSF address.
11429
11430 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11431
11432 * doc/bison.texinfo: Fix formatting glitch.
11433
11434 * doc/bison.texinfo: Update FSF address.
11435
11436 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11437
11438 * acconfig.h: Update FSF address.
11439
11440 1999-01-08 Jesse Thilo <jthilo@gnu.org>
11441
11442 * src/system.h:
11443 Don't define PACKAGE here, since config.h defines it.
11444
11445 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11446
11447 * src/reader.c: Update copyright date.
11448
11449 * src/main.c:
11450 Ditch sprintf to statically-sized buffers in fatal/warn functions in
11451 favor of output directly to stderr (avoids buffer overruns).
11452
11453 * src/reader.c: Some checks for premature EOF.
11454
11455 * 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:
11456 Use prototypes if the compiler understands them.
11457
11458 * src/files.c: Honor TMPDIR on Unix hosts.
11459 Use prototypes if the compiler understands them.
11460
11461 * src/reader.c:
11462 Fix a couple of buffer overrun bugs.
11463 Use prototypes if the compiler understands them.
11464
11465 * src/system.h: Include unistd.h and ctype.h.
11466 Use #ifdef instead of #if for NLS symbols.
11467
11468 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11469
11470 * doc/bison.texinfo:
11471 Delete comment "consider using @set for edition number, etc..." since
11472 we now are doing so.
11473
11474 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11475
11476 * configure.in:
11477 Use prototypes if the compiler understands them.
11478
11479 * NEWS: Document 1.26 highlights.
11480
11481 * Makefile.am: Require Automake 1.3 or later.
11482
11483 * acconfig.h:
11484 Use prototypes if the compiler understands them.
11485
11486 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11487
11488 * src/version.c:
11489 Use VERSION symbol from automake for version number.
11490
11491 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11492
11493 * acconfig.h, configure.in, version.cin:
11494 Use VERSION symbol from automake for version number.
11495
11496 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11497
11498 * Makefile.am:
11499 Distribute original version of simple parser (bison.s1), not built
11500 version (bison.simple).
11501
11502 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11503
11504 * doc/bison.texinfo: Add info dir entry.
11505
11506 * doc/bison.texinfo:
11507 Let automake put version number into documentation.
11508
11509 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11510
11511 * src/bison.cld, src/build.com, src/vmshlp.mar:
11512 Add non-RCS files from /gd/gnu/bison.
11513
11514 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11515
11516 * doc/bison.1:
11517 Document the BISON_HAIRY and BISON_SIMPLE variables.
11518
11519 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11520
11521 * src/version.c: Build version.c automatically.
11522
11523 * src/reader.c:
11524 Fix token numbering (used to start at 258, not 257).
11525
11526 * src/system.h: Include config.h.
11527
11528 * src/getargs.c: Update bug report address.
11529
11530 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
11531 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
11532
11533 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11534
11535 * Makefile.am:
11536 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11537
11538 * configure.in, version.cin:
11539 Build version.c automatically.
11540
11541 * AUTHORS: Add AUTHORS file.
11542
11543 * README: Update bug report address.
11544
11545 * bison.simple:
11546 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11547
11548 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
11549 Add automake stuff.
11550
11551 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11552
11553 * doc/bison.texinfo: Clean up some formatting.
11554
11555 1998-05-05 Richard Stallman <rms@gnu.org>
11556
11557 * doc/bison.texinfo:
11558 Explain better why to make a pure parser.
11559
11560 1998-01-05 Richard Stallman <rms@gnu.org>
11561
11562 * src/files.c (openfiles):
11563 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
11564 find a temporary directory, if possible. Do not unlink files while
11565 they are open.
11566
11567 1997-08-25 Richard Stallman <rms@gnu.org>
11568
11569 * src/reader.c (stack_offset;):
11570 Change some warni to warns.
11571
11572 * src/lex.c (literalchar): Use warns, not warni.
11573
11574 1997-06-28 Richard Stallman <rms@gnu.org>
11575
11576 * src/bison.s1: Add a Bison version comment.
11577
11578 * src/main.c (fatal, warn, berror):
11579 Use program_name.
11580
11581 1997-06-28 Richard Stallman <rms@gnu.org>
11582
11583 * Makefile.in (bison_version): New variable.
11584 (dist): Use that variable.
11585 (bison.s1): Substitute the Bison version into bison.simple.
11586
11587 * bison.simple: Add a Bison version comment.
11588
11589 1997-06-18 Richard Stallman <rms@gnu.org>
11590
11591 * src/main.c (fatal, warn, berror):
11592 Make error messages standard.
11593 (toomany): Improve error message text.
11594
11595 * 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:
11596 new.h renamed to alloc.h.
11597
11598 1997-06-18 Richard Stallman <rms@gnu.org>
11599
11600 * Makefile.in: new.h renamed to alloc.h.
11601
11602 1997-05-24 Richard Stallman <rms@gnu.org>
11603
11604 * src/lex.c (literalchar):
11605 Fix the code for escaping \, " and '.
11606
11607 (lex): Avoid trouble when there are many chars
11608 to discard in a char literal with just several chars in it.
11609
11610 1997-05-17 Richard Stallman <rms@gnu.org>
11611
11612 * src/bison.s1:
11613 Use malloc, if using alloca is troublesome.
11614 (YYSTACK_USE_ALLOCA): New flag macro.
11615 Define it for some systems and compilers.
11616 (YYSTACK_ALLOC): New macro.
11617 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11618 If it was malloc'd, free it.
11619
11620 1997-05-17 Richard Stallman <rms@gnu.org>
11621
11622 * bison.simple:
11623 Use malloc, if using alloca is troublesome.
11624 (YYSTACK_USE_ALLOCA): New flag macro.
11625 Define it for some systems and compilers.
11626 (YYSTACK_ALLOC): New macro.
11627 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11628 If it was malloc'd, free it.
11629
11630 1997-04-23 Richard Stallman <rms@gnu.org>
11631
11632 * src/bison.s1:
11633 (alloca) [__hpux]: Always define as __builtin_alloca.
11634
11635 1997-04-23 Richard Stallman <rms@gnu.org>
11636
11637 * bison.simple:
11638 (alloca) [__hpux]: Always define as __builtin_alloca.
11639
11640 1997-04-22 Richard Stallman <rms@gnu.org>
11641
11642 * src/bison.s1:
11643 [__hpux]: Include alloca.h (right for HPUX 10)
11644 instead of declaring alloca (right for HPUX 9).
11645
11646 * src/bison.s1 (__yy_memcpy):
11647 Declare arg `count' as unsigned int.
11648 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11649
11650 1997-04-22 Richard Stallman <rms@gnu.org>
11651
11652 * bison.simple:
11653 [__hpux]: Include alloca.h (right for HPUX 10)
11654 instead of declaring alloca (right for HPUX 9).
11655
11656 * bison.simple (__yy_memcpy):
11657 Declare arg `count' as unsigned int.
11658 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11659
11660 1997-01-03 Richard Stallman <rms@gnu.org>
11661
11662 * src/allocate.c: [__STDC__ or _MSC_VER]:
11663 Declare calloc and realloc to return void *.
11664
11665 1997-01-02 Richard Stallman <rms@gnu.org>
11666
11667 * src/system.h:
11668 [_MSC_VER]: Include stdlib.h and process.h.
11669 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
11670
11671 * src/main.c (main): Return FAILURE as a value.
11672 (printable_version): Declare arg as int, not char.
11673
11674 1997-01-02 Richard Stallman <rms@gnu.org>
11675
11676 * Makefile.in (dist):
11677 Explicitly check for symlinks, and copy them.
11678
11679 1996-12-19 Richard Stallman <rms@gnu.org>
11680
11681 * src/files.c:
11682 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
11683
11684 1996-12-18 Paul Eggert <eggert@gnu.org>
11685
11686 * src/bison.s1 (yyparse):
11687 If __GNUC__ and YYPARSE_PARAM are both defined,
11688 declare yyparse to have a void * argument.
11689
11690 1996-12-18 Paul Eggert <eggert@gnu.org>
11691
11692 * bison.simple (yyparse):
11693 If __GNUC__ and YYPARSE_PARAM are both defined,
11694 declare yyparse to have a void * argument.
11695
11696 1996-12-17 Richard Stallman <rms@gnu.org>
11697
11698 * src/reduce.c (nbits): Add some casts.
11699
11700 1996-08-12 Richard Stallman <rms@gnu.org>
11701
11702 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
11703
11704 1996-08-12 Richard Stallman <rms@gnu.org>
11705
11706 * bison.simple: Test _MSDOS as well as _MSDOS_.
11707
11708 1996-07-31 Richard Stallman <rms@gnu.org>
11709
11710 * src/bison.s1:
11711 [__sun && __i386]: Include alloca.h.
11712
11713 1996-07-31 Richard Stallman <rms@gnu.org>
11714
11715 * bison.simple:
11716 [__sun && __i386]: Include alloca.h.
11717
11718 1996-07-30 Richard Stallman <rms@gnu.org>
11719
11720 * src/bison.s1: Comment change.
11721
11722 * src/bison.s1: Test _MSDOS_, not MSDOS.
11723
11724 1996-07-30 Richard Stallman <rms@gnu.org>
11725
11726 * bison.simple: Comment change.
11727
11728 * bison.simple: Test _MSDOS_, not MSDOS.
11729
11730 1996-06-01 Richard Stallman <rms@gnu.org>
11731
11732 * 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:
11733 Insert `_' macro around many string constants.
11734
11735 * src/main.c:
11736 Insert `_' macro around many string constants.
11737
11738 (main): Call setlocale, bindtextdomain and textdomain.
11739
11740 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11741 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11742 [ENABLE_NLS]: Include libintl.h.
11743 [ENABLE_NLS] (gettext): Define.
11744 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11745 (N_, PACKAGE, LOCALEDIR): New macros.
11746
11747 1996-06-01 Richard Stallman <rms@gnu.org>
11748
11749 * POTFILES.in: New file.
11750
11751 * Makefile.in (allocate.o):
11752 Define target explicitly.
11753
11754 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11755 (LDFLAGS): Set to @LDFLAGS@.
11756 (configure): Run autoconf only if preceding `cd' succeeds.
11757 (bison.s1): Redirect output to temporary file then move the
11758 temporary to the target, rather than redirecting directly to bison.s1.
11759 (clean): Remove config.status and config.log.
11760 (distclean): Don't remove config.status here.
11761
11762 1996-05-12 Richard Stallman <rms@gnu.org>
11763
11764 * src/bison.s1:
11765 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11766
11767 1996-05-12 Richard Stallman <rms@gnu.org>
11768
11769 * bison.simple:
11770 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11771
11772 1996-05-11 Richard Stallman <rms@gnu.org>
11773
11774 * src/bison.s1 (__yy_memcpy):
11775 Really reorder the args, as was supposedly done on Feb 14 1995.
11776 (yyparse): Calls changed accordingly.
11777
11778 1996-05-11 Richard Stallman <rms@gnu.org>
11779
11780 * Makefile.in (dist): Don't use $(srcdir).
11781
11782 * bison.simple (__yy_memcpy):
11783 Really reorder the args, as was supposedly done on Feb 14 1995.
11784 (yyparse): Calls changed accordingly.
11785
11786 1996-01-27 Richard Stallman <rms@gnu.org>
11787
11788 * src/output.c (output_rule_data):
11789 Test YYERROR_VERBOSE in the conditional
11790 around the definition of ttyname.
11791
11792 1995-12-29 Richard Stallman <rms@gnu.org>
11793
11794 * src/bison.s1:
11795 Fix line numbers in #line commands.
11796
11797 1995-12-29 Richard Stallman <rms@gnu.org>
11798
11799 * bison.simple:
11800 Fix line numbers in #line commands.
11801
11802 1995-12-27 Richard Stallman <rms@gnu.org>
11803
11804 * src/bison.s1 (YYPARSE_PARAM_DECL):
11805 In C++, make it always null.
11806 (YYPARSE_PARAM_ARG): New macro.
11807 (yyparse): Use YYPARSE_PARAM_ARG.
11808
11809 1995-12-27 Richard Stallman <rms@gnu.org>
11810
11811 * bison.simple (YYPARSE_PARAM_DECL):
11812 In C++, make it always null.
11813 (YYPARSE_PARAM_ARG): New macro.
11814 (yyparse): Use YYPARSE_PARAM_ARG.
11815
11816 1995-11-29 Richard Stallman <rms@gnu.org>
11817
11818 * doc/bison.texinfo:
11819 Describe literal string tokens, %raw, %no_lines, %token_table.
11820
11821 1995-11-29 Daniel Hagerty <hag@gnu.org>
11822
11823 * doc/bison.texinfo: Fixed update date
11824
11825 1995-10-16 Richard Stallman <rms@gnu.org>
11826
11827 * src/version.c: Version 1.25.
11828
11829 1995-10-16 Richard Stallman <rms@gnu.org>
11830
11831 * NEWS: *** empty log message ***
11832
11833 1995-10-16 Richard Stallman <rms@gnu.org>
11834
11835 * doc/bison.1, doc/bison.rnh:
11836 Add new options.
11837
11838 1995-10-15 Richard Stallman <rms@gnu.org>
11839
11840 * src/vmsgetargs.c, src/getargs.c:
11841 Added -n, -k, and -raw switches.
11842 (noparserflag, toknumflag, rawtoknumflag): New variables.
11843
11844 * src/symtab.h (SALIAS):
11845 New #define for adding aliases to %token.
11846 (struct bucket): Added `alias' field.
11847
11848 * src/reduce.c (reduce_grammar):
11849 Revise error message.
11850 (print_notices): Remove final `.' from error message.
11851
11852 * src/reader.c (reader_output_yylsp):
11853 New function.
11854 (readgram): Use `#if 0' around code that accepted %command
11855 inside grammar rules: The documentation doesn't allow it,
11856 and it will fail since the %command processors scan for the next %.
11857 (parse_token_decl): Extended the %token
11858 declaration to allow a multi-character symbol as an alias.
11859 (parse_thong_decl): New function.
11860 (read_declarations): Added %thong declarations.
11861 (read_declarations): Handle NOOP to deal with allowing
11862 % declarations as another means to specify the flags.
11863 (readgram): Allow %prec prior to semantics embedded in a rule.
11864 (skip_to_char, read_declarations, copy_definition)
11865 (parse_token_decl, parse_start_decl, parse_type_decl)
11866 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
11867 (get_type_name, copy_guard, copy_action, readgram)
11868 (get_type, packsymbols): Revised most error messages.
11869 Changed `fatal' to `warnxxx' to avoid aborting for error.
11870 Revised and use multiple warnxxx functions to avoid using VARARGS1.
11871 (read_declarations): Improve the error message for
11872 an invalid character. Do not abort.
11873 (read_declarations, copy_guard, copy_action): Use
11874 printable_version to avoid unprintable characters in printed output.
11875 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
11876 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
11877 Allow the type of a non-terminal can be given
11878 more than once, as long as all specifications give the same type.
11879
11880 * src/output.c:
11881 (output_headers, output_trailers, output, output_gram)
11882 (output_rule_data): Implement noparserflag variable.
11883 Implement toknumflag variable.
11884 (output): Call reader_output_yylsp to output LTYPESTR.
11885
11886 * src/main.c (main):
11887 If reader sees an error, don't process the grammar.
11888 (fatals): Updated to not use VARARGS1.
11889 (printable_version, int_to_string, warn, warni, warns, warnss)
11890 (warnsss): New error reporting functions. Avoid abort for error.
11891
11892 * src/lex.h:
11893 Added THONG and NOOP for alias processing.
11894 Added SETOPT for the new code that allows setting options with %flags.
11895
11896 * src/lex.c:
11897 Include getopt.h. Add some extern decls.
11898 (safegetc): New function to deal with EOF gracefully.
11899 (literalchar); new function to deal with reading \ escapes.
11900 (lex): Use literalchar.
11901 (lex): Implemented "..." tokens.
11902 (literalchar, lex, parse_percent_token): Made tokenbuffer
11903 always contain the token. This includes growing the token
11904 buffer while reading an integer.
11905 (parse_percent_token): Replaced if-else statement with percent_table.
11906 (parse_percent_token): Added % declarations as another
11907 way to specify the flags -n, -l, and -r. Also added hooks for
11908 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
11909 major changes to files.c.
11910 (lex) Retain in the incoming stream a character following
11911 an incorrect '/'.
11912 (skip_white_space, lex): Revised most error messages
11913 and changed fatal to warn to avoid aborting.
11914 (percent_table): Added %thong declarations.
11915
11916 * src/gram.h: Comment changes.
11917
11918 * src/files.c (openfiles, open_extra_files, done):
11919 Add faction flag
11920 and actfile file. Handle noparserflag. Both for -n switch.
11921
11922 * src/conflicts.c (resolve_sr_conflict):
11923 Remove use of alloca.
11924
11925 1995-06-01 Jim Meyering <meyering@gnu.org>
11926
11927 * doc/bison.texinfo: *** empty log message ***
11928
11929 1995-05-06 Richard Stallman <rms@gnu.org>
11930
11931 * src/bison.s1: Comment change.
11932
11933 1995-05-06 Richard Stallman <rms@gnu.org>
11934
11935 * bison.simple: Comment change.
11936
11937 1995-05-03 Richard Stallman <rms@gnu.org>
11938
11939 * src/version.c: Version now 1.24.
11940
11941 * src/bison.s1: Change distribution terms.
11942
11943 * src/version.c: Version now 1.23.
11944
11945 1995-05-03 Richard Stallman <rms@gnu.org>
11946
11947 * doc/bison.texinfo:
11948 Rewrite "Conditions for Using Bison".
11949 Update version to 1.24.
11950
11951 1995-05-03 Richard Stallman <rms@gnu.org>
11952
11953 * bison.simple: Change distribution terms.
11954
11955 1995-02-23 Richard Stallman <rms@gnu.org>
11956
11957 * src/files.c: Test __VMS_POSIX as well as VMS.
11958
11959 1995-02-14 Jim Meyering <meyering@gnu.org>
11960
11961 * src/bison.s1 (__yy_memcpy):
11962 Renamed from __yy_bcopy to avoid
11963 confusion. Reverse FROM and TO arguments to be consistent with
11964 those of memcpy.
11965
11966 1995-02-14 Jim Meyering <meyering@gnu.org>
11967
11968 * bison.simple (__yy_memcpy):
11969 Renamed from __yy_bcopy to avoid
11970 confusion. Reverse FROM and TO arguments to be consistent with
11971 those of memcpy.
11972
11973 1994-11-10 David J. MacKenzie <djm@gnu.org>
11974
11975 * NEWS: reformat
11976
11977 * NEWS: New file.
11978
11979 * Makefile.in (DISTFILES): Include NEWS.
11980
11981 * Makefile.in (DISTFILES):
11982 Include install-sh, not install.sh.
11983
11984 * configure.in: Update to Autoconf v2 macro names.
11985
11986 1994-10-05 David J. MacKenzie <djm@gnu.org>
11987
11988 * Makefile.in: fix typo
11989
11990 * Makefile.in (prefix, exec_prefix):
11991 Let configure set them.
11992
11993 1994-09-28 David J. MacKenzie <djm@gnu.org>
11994
11995 * Makefile.in: Set datadir to $(prefix)/share.
11996
11997 1994-09-15 Richard Stallman <rms@gnu.org>
11998
11999 * src/bison.s1:
12000 Update copyright notice and GPL version.
12001
12002 1994-09-15 Richard Stallman <rms@gnu.org>
12003
12004 * bison.simple:
12005 Update copyright notice and GPL version.
12006
12007 1994-07-12 Richard Stallman <rms@gnu.org>
12008
12009 * src/reduce.c, src/reader.c:
12010 entered into RCS
12011
12012 1994-05-05 David J. MacKenzie <djm@gnu.org>
12013
12014 * Makefile.in: entered into RCS
12015
12016 1994-03-26 Richard Stallman <rms@gnu.org>
12017
12018 * src/bison.s1: entered into RCS
12019
12020 1994-03-26 Richard Stallman <rms@gnu.org>
12021
12022 * bison.simple: entered into RCS
12023
12024 1994-03-25 Richard Stallman <rms@gnu.org>
12025
12026 * src/main.c: entered into RCS
12027
12028 1994-03-24 Richard Stallman <rms@gnu.org>
12029
12030 * src/conflicts.c: entered into RCS
12031
12032 1994-01-02 Richard Stallman <rms@gnu.org>
12033
12034 * Makefile.in: *** empty log message ***
12035
12036 1993-11-21 Richard Stallman <rms@gnu.org>
12037
12038 * src/bison.s1: *** empty log message ***
12039
12040 1993-11-21 Richard Stallman <rms@gnu.org>
12041
12042 * doc/bison.texinfo: entered into RCS
12043
12044 * doc/bison.texinfo: *** empty log message ***
12045
12046 1993-11-21 Richard Stallman <rms@gnu.org>
12047
12048 * bison.simple: *** empty log message ***
12049
12050 1993-10-25 David J. MacKenzie <djm@gnu.org>
12051
12052 * doc/bison.texinfo: *** empty log message ***
12053
12054 1993-10-19 Richard Stallman <rms@gnu.org>
12055
12056 * src/bison.s1: *** empty log message ***
12057
12058 1993-10-19 Richard Stallman <rms@gnu.org>
12059
12060 * bison.simple: *** empty log message ***
12061
12062 1993-10-14 Richard Stallman <rms@gnu.org>
12063
12064 * src/bison.s1: *** empty log message ***
12065
12066 1993-10-14 Richard Stallman <rms@gnu.org>
12067
12068 * bison.simple: *** empty log message ***
12069
12070 1993-09-14 David J. MacKenzie <djm@gnu.org>
12071
12072 * doc/bison.texinfo: *** empty log message ***
12073
12074 1993-09-13 Noah Friedman <friedman@gnu.org>
12075
12076 * Makefile.in: *** empty log message ***
12077
12078 1993-09-10 Richard Stallman <rms@gnu.org>
12079
12080 * src/conflicts.c: *** empty log message ***
12081
12082 * src/system.h: entered into RCS
12083
12084 1993-09-10 Richard Stallman <rms@gnu.org>
12085
12086 * doc/bison.1: entered into RCS
12087
12088 1993-09-06 Noah Friedman <friedman@gnu.org>
12089
12090 * src/version.c: entered into RCS
12091
12092 1993-09-06 Noah Friedman <friedman@gnu.org>
12093
12094 * Makefile.in: *** empty log message ***
12095
12096 1993-07-30 David J. MacKenzie <djm@gnu.org>
12097
12098 * Makefile.in: *** empty log message ***
12099
12100 1993-07-24 Richard Stallman <rms@gnu.org>
12101
12102 * src/bison.s1: *** empty log message ***
12103
12104 1993-07-24 Richard Stallman <rms@gnu.org>
12105
12106 * bison.simple: *** empty log message ***
12107
12108 1993-07-08 David J. MacKenzie <djm@gnu.org>
12109
12110 * Makefile.in: *** empty log message ***
12111
12112 1993-07-04 Richard Stallman <rms@gnu.org>
12113
12114 * src/bison.s1: *** empty log message ***
12115
12116 1993-07-04 Richard Stallman <rms@gnu.org>
12117
12118 * bison.simple: *** empty log message ***
12119
12120 1993-06-26 David J. MacKenzie <djm@gnu.org>
12121
12122 * src/getargs.c: entered into RCS
12123
12124 1993-06-26 David J. MacKenzie <djm@gnu.org>
12125
12126 * doc/bison.texinfo: *** empty log message ***
12127
12128 * doc/bison.1: New file.
12129
12130 1993-06-25 Richard Stallman <rms@gnu.org>
12131
12132 * src/getargs.c: New file.
12133
12134 1993-06-16 Richard Stallman <rms@gnu.org>
12135
12136 * src/bison.s1: *** empty log message ***
12137
12138 1993-06-16 Richard Stallman <rms@gnu.org>
12139
12140 * bison.simple: *** empty log message ***
12141
12142 1993-06-03 Richard Stallman <rms@gnu.org>
12143
12144 * src/bison.s1: New file.
12145
12146 1993-06-03 Richard Stallman <rms@gnu.org>
12147
12148 * doc/bison.texinfo: *** empty log message ***
12149
12150 1993-06-03 Richard Stallman <rms@gnu.org>
12151
12152 * bison.simple: New file.
12153
12154 1993-05-19 Richard Stallman <rms@gnu.org>
12155
12156 * doc/bison.texinfo: New file.
12157
12158 1993-05-07 Noah Friedman <friedman@gnu.org>
12159
12160 * Makefile.in: *** empty log message ***
12161
12162 1993-04-28 Noah Friedman <friedman@gnu.org>
12163
12164 * src/reader.c: *** empty log message ***
12165
12166 1993-04-23 Noah Friedman <friedman@gnu.org>
12167
12168 * src/alloc.h: entered into RCS
12169
12170 1993-04-20 David J. MacKenzie <djm@gnu.org>
12171
12172 * src/version.c: *** empty log message ***
12173
12174 * src/files.c, src/allocate.c:
12175 entered into RCS
12176
12177 * src/reader.c: *** empty log message ***
12178
12179 * src/lex.c: entered into RCS
12180
12181 * src/conflicts.c: New file.
12182
12183 * src/symtab.c: entered into RCS
12184
12185 * src/alloc.h: New file.
12186
12187 * src/LR0.c: entered into RCS
12188
12189 1993-04-18 Noah Friedman <friedman@gnu.org>
12190
12191 * src/reader.c: New file.
12192
12193 * src/version.c: *** empty log message ***
12194
12195 1993-04-18 Noah Friedman <friedman@gnu.org>
12196
12197 * Makefile.in: *** empty log message ***
12198
12199 1993-04-17 Noah Friedman <friedman@gnu.org>
12200
12201 * Makefile.in: *** empty log message ***
12202
12203 1993-04-15 Richard Stallman <rms@gnu.org>
12204
12205 * src/main.c, src/files.c:
12206 New file.
12207
12208 1993-04-15 Noah Friedman <friedman@gnu.org>
12209
12210 * configure.in: entered into RCS
12211
12212 * configure.in: *** empty log message ***
12213
12214 * configure.in: New file.
12215
12216 1993-04-14 Richard Stallman <rms@gnu.org>
12217
12218 * Makefile.in: New file.
12219
12220 1993-04-13 Richard Stallman <rms@gnu.org>
12221
12222 * src/version.c: New file.
12223
12224 1993-03-25 Richard Stallman <rms@gnu.org>
12225
12226 * src/output.c: entered into RCS
12227
12228 1992-09-25 Richard Stallman <rms@gnu.org>
12229
12230 * configure.bat: entered into RCS
12231
12232 1992-06-22 Richard Stallman <rms@gnu.org>
12233
12234 * src/vmsgetargs.c: entered into RCS
12235
12236 1992-06-22 Richard Stallman <rms@gnu.org>
12237
12238 * doc/bison.rnh: entered into RCS
12239
12240 1992-04-20 David J. MacKenzie <djm@gnu.org>
12241
12242 * README: entered into RCS
12243
12244 1992-01-22 Richard Stallman <rms@gnu.org>
12245
12246 * src/machine.h: entered into RCS
12247
12248 1991-12-21 Richard Stallman <rms@gnu.org>
12249
12250 * src/lalr.c, src/closure.c:
12251 entered into RCS
12252
12253 1991-12-20 Richard Stallman <rms@gnu.org>
12254
12255 * src/state.h: entered into RCS
12256
12257 1991-12-18 Richard Stallman <rms@gnu.org>
12258
12259 * src/print.c, src/nullable.c, src/derives.c:
12260 entered into RCS
12261
12262 1991-11-03 David J. MacKenzie <djm@gnu.org>
12263
12264 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
12265 entered into RCS
12266
12267 1988-09-09 Richard Stallman <rms@gnu.org>
12268
12269 * src/bison.hairy: entered into RCS
12270
12271 1987-12-16 Richard Stallman <rms@gnu.org>
12272
12273 * REFERENCES: entered into RCS
12274
12275 -----
12276
12277 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
12278 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
12279
12280 This file is part of Bison, the GNU Compiler Compiler.
12281
12282 Bison is free software; you can redistribute it and/or modify
12283 it under the terms of the GNU General Public License as published by
12284 the Free Software Foundation; either version 2, or (at your option)
12285 any later version.
12286
12287 Bison is distributed in the hope that it will be useful,
12288 but WITHOUT ANY WARRANTY; without even the implied warranty of
12289 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12290 GNU General Public License for more details.
12291
12292 You should have received a copy of the GNU General Public License
12293 along with Bison; see the file COPYING. If not, write to
12294 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
12295 Boston, MA 02111-1307, USA.