]> git.saurik.com Git - bison.git/blob - ChangeLog
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
[bison.git] / ChangeLog
1 2004-09-02 Akim Demaille <akim@epita.fr>
2
3 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
4 %printer calls to use cdebug_ when using lalr1.cc.
5
6 * data/lalr1.cc (b4_yysymprint_generate): New.
7
8 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
9
10 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11 with #ifdef YYDEBUG.
12
13 2004-08-26 Akim Demaille <akim@epita.fr>
14
15 * doc/bison.texinfo (Implementing Loops): Rename as...
16 (Implementing Gotos/Loops): this.
17
18 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
19
20 Adjust to latest gnulib.
21 * bootstrap (gnulib_modules): Add xalloc-die.
22 Set LC_ALL=C so that file names sort consistently.
23 Prefer the gnulib copies of gettext.m4, glibc21.m4,
24 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
25 uintmax_t.m4, ulonglong.m4.
26 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
27 po.m4 since we are now using _gl.m4 instead.
28
29 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
30
31 * src/scan-action.l: Remove. Scanning of semantic actions is
32 handled in scan-gram.l.
33
34 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
35
36 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
37
38 * src/location.h (struct): The file member is a uniqstr.
39 (equal_boundaries): Use UNIQSTR_EQ for comparison.
40
41 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
42
43 Fix bug with non-%union parsers that have printers or destructors,
44 which led to a Bison core dump. Reported by Peter Fales in
45 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
46
47 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
48 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
49 not to our own type.
50 * src/output.c (symbol_destructors_output, symbol_printers_output):
51 Don't assume %union.
52 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
53 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
54 UNION-FLAG. All callers changed.
55 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
56 Use type char, not unsigned int, when declaring an array of char;
57 this lets us remove a cast.
58 (Printers and Destructors): Add non-%union test cases.
59
60 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
61
62 * doc/bison.texinfo: Minor editorial changes, mostly to the new
63 GLR writeups. E.g., avoid frenchspacing and the future tense,
64 change "lookahead" to "look-ahead", and change "wrt" to "with
65 respect to".
66
67 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
68
69 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
70 New sections, split off from the GLR Parsers section. Put the new
71 Simple GLR Parser near the start of the GLR section, for clarity.
72 Rewrite connective text.
73
74 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
75
76 * doc/bison.texinfo (Simple GLR Parsers): New section.
77
78 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
79
80 * NEWS, TODO, doc/bison.texinfo:
81 Use "look-ahead" instead of "lookahead", to be consistent.
82 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
83 while we're fixing "look-ahead".
84 * src/conflicts.c (shift_set): Renamed from shiftset.
85 (look_ahead_set): Renamed from lookaheadset.
86 * src/print.c: Likewise.
87 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
88 name for "lookahead".
89 (report_types, usage): Likewise.
90 * src/getargs.h (report_look_ahead_tokens): Renamed from
91 report_lookaheads.
92 * src/lalr.c (compute_look_ahead_tokens): Renamed from
93 compute_lookaheads.
94 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
95 (look_ahead_tokens_print): Renamed from lookaheads_print.
96 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
97 state_rule_lookaheads_print.
98 * src/state.h: Likewise.
99 (reductions.look_ahead_tokens): Renamed from lookaheads.
100 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
101 AT_DATA_LOOKAHEADS_GRAMMAR.
102
103 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
104
105 * README: Update location of patched M4 distribution.
106
107 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
108
109 Don't assume the C++ compiler takes the same arguments as the C compiler
110 (trivial change).
111 * configure.ac (O0CXXFLAGS): New var.
112 * tests/atlocal.in (CXXFLAGS): Use it.
113
114 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
115
116 Fix some "make check" problems with C++ reported by
117 Albert Chin-A-Young for Tru64 C++ in this thread:
118 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
119
120 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
121 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
122 Output to a .cc file for C++, not to a .c file.
123 * tests/calc.at (AT_CHECK_CALC): Likewise.
124 * tests/regression.at (AT_CHECK_DANCER): Likewise.
125 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
126
127 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
128
129 * tests/calc.at, tests/actions.at: Workaround for SGI
130 C++ compiler. (trivial change)
131
132 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
133
134 Spent a few hours checking out which prerequisite versions the
135 current sources actually require. I went all the way back to
136 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
137 a seemingly endless set of combinations of versions more recent
138 than that. The bottom line is that the current sources require
139 fairly recent versions of the build tools, and it'll be some work
140 to change this.
141 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
142 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
143 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
144 Add comments explaining why those particular versions are
145 currently needed.
146
147 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
148 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
149 <http://mail.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
150
151 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
152 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
153
154 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
155
156 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
157 0.11.5. Suggested by Bruno Haible.
158 * bootstrap: Remove gettext version checking.
159
160 * doc/bison.texinfo (Decl Summary): Also mention that %union
161 can depend on prerequisite types. Problem reported by Tim
162 Van Holder.
163
164 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
165
166 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
167 * README-alpha: Don't tell people not to package this.
168
169 * bootstrap: Don't assume $(...) works; use `...` instead.
170 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
171 gettext better.
172
173 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
174 put into the -d output file, and mention what to do if YYSTYPE is
175 defined as a macro.
176
177 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
178
179 Undo change made earlier today: it caused autopoint to not bring
180 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
181 autopoint's.
182
183 * bootstrap: Check that gettext version matches what's in
184 configure.ac. Warn users to ignore robots.txt ERROR 404.
185 * bootstrap: Undo today's earlier change (logged below).
186 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
187
188 The gettext version checking is causing more trouble than it's
189 curing; remove it. Problem reported by Paul Hilfinger.
190
191 * bootstrap: Issue a warning that one can expect a message
192 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
193 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
194
195 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
196
197 Ensure that the C++ compiler used for testing actually works on a
198 simple test program; if not, skip the C++-related tests. Problem
199 reported by Vin Shelton in:
200 http://mail.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
201
202 * m4/cxx.m4: New file.
203 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
204 * tests/atlocal.in (BISON_CXX_WORKS): Add.
205 * tests/local.at (AT_COMPILE_CXX): Use it.
206
207 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
208
209 * data/glr.c (yylloc): Output this macro even if locations are not
210 being generated, as the GLR parser needs it even in that case.
211 Problem reported by Troy A. Johnson
212 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
213
214 * configure.ac (AC_INIT): Update to 1.875e.
215
216 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
217
218 * NEWS: Version 1.875d.
219 * configure.ac (AC_INIT): Likewise.
220 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
221
222 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
223 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
224 lalr1.cc runs afoul of the first, and the last two are no longer
225 supported by GCC 3.4.0.
226 * README: Mention GNU m4 1.4 or later; mention m4 patches.
227 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
228
229 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
230
231 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
232 unsigned int, for compatibility with latest gnulib hash module.
233 * src/state.c (state_hash, state_hasher): Likewise.
234 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
235 * src/uniqstr.c (hash_uniqstr): Likewise.
236
237 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
238
239 * NEWS: Unescaped newlines are no longer allowed in char & strings.
240
241 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
242 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
243 character and string literals.
244 (unexpected_end): New function.
245 (unexpected_eof): Use it.
246 (unexpected_newline): New function.
247 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
248 actions.
249
250 * NEWS: Document %expect-rr.
251
252 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
253 Fix typo by replacing $1 with $option.
254 Remove more 'intl'-related files.
255 Don't DEFUN AM_INTL_SUBDIR twice.
256
257 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
258 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
259 strtoul.c.
260 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
261 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
262 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
263 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
264 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
265 * src/.cvsignore: Add *.output.
266
267 * src/parse-gram.y: Put copyright notice inside %{ %} so it
268 gets copied to the output file.
269
270 2004-04-28 Paul Eggert <eggert@twinsun.com>
271
272 Get files from the gnulib and po repositories, instead of relying
273 on them being in our CVS. Upgrade to latest versions of gnulib
274 and Automake.
275
276 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
277 * bootstrap: Bootstrap from gnulib and po repositories.
278 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
279 * README-cvs: Document these changes. Remove version numbers from
280 mentions of build tools, since they change so often. Mention Flex.
281
282 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
283 (gl_USE_SYSTEM_EXTENSIONS): Add.
284 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
285 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
286 does this for us.
287 (AC_ISC_POSIX): Remove; we no longer support this
288 ancient OS, as it gets in the way of latest Autoconf & gnulib.
289 (AC_HEADER_STDC): Remove: we now assume C89 or better.
290 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
291 Do not check for C89 headers, except for locale.h which is used
292 by the Yacc library and must port to K&R hosts.
293 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
294 Do not check for C89 functions, except for setlocale which is
295 used by the Yacc library.
296 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
297 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
298 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
299 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
300 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
301 AM_GNU_GETTEXT): Remove; now done by:
302 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
303 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
304 for us.
305
306 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
307 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
308 Define to empty, as gnulib.mk will do the rest for us.
309 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
310 for us.
311 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
312 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
313
314 * src/files.c: Include gnulib's xstrndup.h.
315
316 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
317 (REALLOC): Use xnrealloc, for likewise.
318 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
319 (strnlen, memrchr): Remove decls; functions no longer used.
320 Include <stpcpy.h>.
321
322 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
323 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
324 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
325 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
326 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
327 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
328 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
329 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
330 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
331 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
332 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
333 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
334 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
335 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
336 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
337 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
338 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
339 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
340 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
341 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
342 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
343 Remove, as these files are now generated automatically
344 by bootstrap or automake.
345
346 * po/ChangeLog: Remove: all but one entry was a duplicate
347 of this file, and I moved that 2000-11-02 entry here.
348
349 * config/.cvsignore: Add Makefile, depcomp, install-sh.
350 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
351 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
352 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
353 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
354 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
355 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
356 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
357 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
358 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
359 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
360 xstrndup.h.
361 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
362 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
363 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
364 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
365 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
366 * src/.cvsignore: Remove *_.c.
367
368
369 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
370 support it. (The latest stable gzip doesn't.)
371
372 2004-04-27 Paul Eggert <eggert@twinsun.com>
373
374 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
375 case, as stos_ is now used by destructors due to the 2004-02-09
376 change.
377
378 Remove more K&R C support.
379 * lib/libiberty.y (PARAMS): Remove. All uses removed.
380 * lib/subpipe.c (errno): Remove decl.
381 Include <stdlib.h> unconditionally.
382 (EXIT_FAILURE): Remove macro.
383 * src/complain.c (vfprintf, strerror): Remove.
384 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
385 unconditionally.
386 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
387 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
388 (strchr, strspn, memchr): Remove decls.
389 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
390 unconditionally. Do not declare perror.
391 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
392 unconditionally.
393
394 * src/complain.c (_): Remove useless defn, as system.h defines this.
395
396 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
397 with latest obstack.h.
398 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
399 to procedure types, as obstack.h now does that for us.
400 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
401
402 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
403 so that this include file can stand alone.
404 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
405 does this now. Include subpipe.h first after config.h, to
406 test whether it can stand alone.
407
408 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
409 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
410 unused declaration.
411
412 * tests/synclines.at (%union synch line): Put a dummy member in
413 the union, because empty unions aren't allowed in C. Caught
414 by GCC 3.4.0.
415
416 2004-04-13 Jim Meyering <jim@meyering.net>
417
418 * src/conflicts.c (conflicts_print): Correct format string typo:
419 use `%%' to produce literal `%'. (trivial change)
420
421 2004-03-30 Paul Eggert <eggert@twinsun.com>
422
423 * src/getargs.c (version): Update copyright year to 2004.
424
425 * data/c.m4 (b4_int_type): Use 'short int' rather than
426 'short', and similarly for 'long', 'unsigned', etc.
427 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
428 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
429 yy_yypstack, yydumpstack): Likewise.
430 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
431 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
432 Likewise.
433 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
434 yy_stack_print, yyparse): Likewise.
435 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
436 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
437 * lib/bitset.c (bitset_print): Likewise.
438 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
439 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
440 * lib/bitsetv.c (bitsetv_dump): Likewise.
441 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
442 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
443 Likewise.
444 * src/LR0.c (allocate_itemsets): Likewise.
445 * src/gram.h (rule_number, rule): Likewise.
446 * src/lalr.h (goto_number): Likewise.
447 * src/nullable.c (nullable_compute): Likewise.
448 * src/output.c (prepare_rules): Likewise.
449 * src/relation.c (relation_print, relation_digraph): Likewise.
450 * src/relation.h (relation_node): Likewise.
451 * src/state.h (state_number, transitions, errs, reductions,
452 struct state): Likewise.
453 * src/symtab.h (symbol_number, struct symbol): Likewise.
454 * src/tables.c (vector_number, tally, action_number,
455 default_goto, goto_actions): Likewise.
456 * tests/existing.at (GNU Cim Grammar): Likewise.
457 * tests/regression.at (Web2c Actions): Likewise.
458
459 * src/output.c (muscle_insert_short_int_table): Renamed from
460 muscle_insert_short_table. All uses changed.
461
462 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
463
464 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
465 (declaration): Replace expected_conflicts with expected_sr_conflicts.
466 Add %expect-rr rule.
467
468 * src/scan-gram.l: Recognize %expect-rr.
469
470 * src/conflicts.h (expected_sr_conflicts): Rename from
471 expected_conflicts.
472 (expected_rr_conflicts): Declare.
473
474 * src/conflicts.c (expected_sr_conflicts): Rename from
475 expected_conflicts.
476 (expected_rr_conflicts): Define.
477 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
478 for GLR parsers.
479 Use expected_sr_conflicts in place of expected_conflicts.
480 Warn if expected_rr_conflicts used in non-GLR parser.
481
482 * doc/bison.texinfo: Add documentation for %expect-rr.
483
484 2004-03-08 Paul Eggert <eggert@gnu.org>
485
486 Add support for hex token numbers. Suggested by Odd Arild Olsen in
487 <http://mail.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
488
489 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
490 in lalr1.cc.
491 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
492 * src/scan-gram.l (scan_integer): New function.
493 ({int}): Use it.
494 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
495 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
496 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
497 Say "long int", not "long", for uniformity with GNU style.
498
499 2004-02-25 Paul Eggert <eggert@twinsun.com>
500
501 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
502 compilers. This fixes a problem with Intel's C++ compiler being
503 chatty, reported by Guido Trentalancia in
504 <http://mail.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
505
506 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
507
508 Support %destructor and merge error locations in lalr1.cc.
509
510 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
511 (Parser::stos_): Define unconditionally.
512 (Parser::destruct_): New method. Generate its body with
513 b4_yydestruct_generate.
514 (Parser::error_start_): New attribute.
515 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
516 token which are discarded.
517 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
518 error_start_ when erroneous token are discarded.
519 (Parser::parse) <yyerrlab1>: Compute the location of the error
520 token so that it covers all the discarded tokens.
521 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
522 it can be called with `%skeleton "lalr1.cc"', and do that.
523
524 2004-02-02 Paul Eggert <eggert@twinsun.com>
525
526 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
527 $(top_srcdir)/lib and ../lib. This fixes a bug reported
528 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
529 There's no need to mention top_builddir since Automake does that
530 for us.
531 (INCLUDES): Remove, as Automake says it's obsolescent.
532 Contents migrated into AM_CPPFLAGS as described above.
533 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
534
535 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
536
537 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
538 (yyreportSyntaxError): Handle case where lookahead token is
539 YYEMPTY.
540
541 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
542
543 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
544 resulting parsers are compilable with C++.
545
546 2003-12-23 Paul Eggert <eggert@twinsun.com>
547
548 * config/depcomp, config/install-sh: Sync with Automake 1.8.
549 * src/output.c (output_skeleton): Rename local var.
550 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
551 Bison tokens, as this runs afoul of the 2003-10-07 change that
552 disallowed NUL bytes in character constants or string literals.
553
554 * tests/local.at: Require Autoconf 2.59's Autotest.
555 * tests/testsuite.at: Don't include local.at, since we now assume
556 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
557 including it.
558 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
559 multiple inclusion warnings.
560
561 2003-12-02 Akim Demaille <akim@epita.fr>
562
563 * doc/bison.texinfo (How Can I Reset the Parser): More about start
564 conditions.
565 From Bruno Haible.
566
567 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
568
569 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
570
571 2003-10-07 Paul Eggert <eggert@twinsun.com>
572
573 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
574 if testsuite doesn't exist.
575
576 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
577 literals, unfortunately.
578 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
579 Complain about NUL bytes in character constants or string literals.
580
581 2003-10-05 Paul Eggert <eggert@twinsun.com>
582
583 * NEWS: Don't document %no-default-prec, as it's still
584 too experimental.
585 * doc/bison.texinfo: Document %no-default-prec only if
586 the defaultprec flag is set. Normally it's not.
587
588 2003-10-04 Paul Eggert <eggert@twinsun.com>
589
590 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
591 non-modifiable lvalue, instead of a modifiable one.
592 * doc/bison.texinfo (Actions): Document that $$ can
593 be assigned to. Do not claim that $$ and $N are
594 array element references: user code should not rely on this.
595
596 2003-10-01 Paul Eggert <eggert@twinsun.com>
597
598 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
599 (grammar_declaration): Use it.
600 * src/scan-gram.l: New token %no-default-prec.
601 * tests/conflicts.at: Revamp tests to use %no-default-prec.
602 * NEWS, doc/bison.texinfo: Document the above.
603
604 2003-10-01 Akim Demaille <akim@epita.fr>
605
606 VCG no longer supports long_straight_phase.
607
608 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
609 * src/print_graph.c (print_graph): Adjust.
610
611 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
612 and Paul Eggert <eggert@twinsun.com>
613
614 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
615 Table of Symbols): Document %default-prec.
616 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
617 (grammar_declaration): Set default_prec on %default-prec.
618 * src/scan-gram.l (%default-prec): New token.
619 * src/reader.h (default_prec): New flag.
620 * src/reader.c: Likewise.
621 (packgram): Handle it.
622 * tests/conflicts.at (%default-prec without %prec,
623 %default-prec with %prec, %default-prec 1): New tests.
624
625 2003-09-30 Paul Eggert <eggert@twinsun.com>
626
627 * tests/testsuite.at: Include local.at, not input.at, fixing
628 a typo in the 2003-08-25 patch.
629
630 2003-08-27 Akim Demaille <akim@epita.fr>
631
632 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
633 GCC warnings.
634
635 2003-08-26 Akim Demaille <akim@epita.fr>
636
637 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
638 "<\#" to avoid magic from Gnus when posting parts of this script.
639
640 2003-08-26 Akim Demaille <akim@epita.fr>
641
642 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
643 (Parser::parse): here.
644 Adjust: nerrs and errstatus is now replaced by...
645 (Parser::nerrs_, Parser::errstatus_): New.
646
647 2003-08-25 Akim Demaille <akim@epita.fr>
648
649 * config/announce-gen, Makefile.cfg: New.
650 * Makefile.am: Adjust.
651 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
652 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
653
654 2003-08-25 Akim Demaille <akim@epita.fr>
655
656 When reducing initial empty rules, Bison parser read an initial
657 location that is not defined. This results in garbage, and that
658 affects Bison's own parser. Therefore we need (i) to extend Bison
659 to support a means to initialize this location, and (ii) to use
660 this CVS Bison to fix CVS Bison's parser.
661
662 * src/reader.h, reader.c (epilogue_augment): Remove, replace
663 with...
664 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
665 * src/parse-gram.y: Adjust.
666 (%initial-action): New.
667 (%error-verbose): Since we require CVS Bison, there is no reason
668 not to use it.
669 * src/scan-gram.l: Adjust.
670 * src/Makefile.am (YACC): New, to make sure we use our own parser.
671 * data/yacc.c (yyparse): Use b4_initial_action.
672
673 2003-08-25 Akim Demaille <akim@epita.fr>
674
675 * doc/bison.texinfo: Don't promote stdout for error messages.
676
677 2003-08-25 Akim Demaille <akim@epita.fr>
678
679 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
680 From Alexandre Duret-Lutz.
681
682 2003-08-25 Akim Demaille <akim@epita.fr>
683
684 Version 1.875c.
685
686 2003-08-25 Akim Demaille <akim@epita.fr>
687
688 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
689 Use them.
690
691 2003-08-25 Akim Demaille <akim@epita.fr>
692
693 * data/lalr1.cc (Parser::reduce_print_): New.
694 Use it.
695
696 2003-08-25 Akim Demaille <akim@epita.fr>
697
698 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
699 error recovery loops. This patch is based on
700 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
701 Also, augment the similarity between lalr1.cc and yacc.c.
702 Note: the locations of error recovery rules are not correct yet.
703
704 * data/lalr1.cc: Comment changes to augment the similarity between
705 lalr1.cc and yacc.c.
706 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
707 (yyerrlab1): Remove, but where it used to be (now the bottom part of
708 yyerrlab), when hitting EOF, pop the whole stack here instead of
709 merely falling thru the default error handling mechanism.
710 (yyerrorlab): New label, with the old contents of YYERROR,
711 plus the following change: pop the stack of rhs corresponding
712 to the production that invoked YYERROR. That is how Yacc
713 behaves (required by POSIX).
714 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
715 fail.
716
717 2003-08-25 Akim Demaille <akim@epita.fr>
718
719 Tune local.at so that people can "autom4te -l autotest calc.at -o
720 calc" for instance, to extract a sub test suite.
721
722 * tests/testsuite.at: Move the initialization, Autotest version
723 requirement, and AT_TESTED invocation into...
724 * tests/local.at: here.
725 * tests/testsuite.at: Include it for compatibility with Autoconf
726 2.57.
727 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
728 be ignore.
729
730 2003-08-04 Paul Eggert <eggert@twinsun.com>
731
732 Rework code slightly to avoid gcc -Wtraditional warnings.
733 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
734 The returned value is now stored in *YY0. All callers changed.
735 * src/output.c (merge_output): Adjust to the above change.
736
737 2003-07-26 Paul Eggert <eggert@twinsun.com>
738
739 * data/glr.c (YYASSERT): New macro.
740 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
741 yyresolveStates, yyprocessOneStack):
742 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
743 Derived from a suggestion by Frank Heckenbach.
744
745 2003-07-25 Paul Eggert <eggert@twinsun.com>
746
747 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
748 for portability to K&R C (after ansi2knr, presumably). See
749 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
750 by Frank Heckenbach, though I have omitted the structure-initialization
751 part of his glr-knr.diff patch since I recall that the Portable
752 C Compiler didn't require that change.
753
754 Let the user specify how to allocate and free memory.
755 Derived from a suggestion by Frank Heckenbach in
756 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
757 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
758 All uses of free, malloc, realloc changed to use these macros,
759 and unnecessary casts removed.
760 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
761
762 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
763
764 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
765 use s.empty() rather than s == "" to test for empty string; see
766 <http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
767 (trivial change)
768
769 2003-06-25 Akim Demaille <akim@epita.fr>
770
771 * config/depcomp, config/install-sh: Update from masters.
772
773 2003-06-20 Paul Eggert <eggert@twinsun.com>
774
775 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
776 and return properly parenthesized result.
777 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
778 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
779 Remove unnecessary parentheses from uses.
780 * doc/bison.texinfo (Location Default Action): Describe the
781 conventions for parentheses.
782
783 2003-06-19 Paul Eggert <eggert@twinsun.com>
784
785 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
786 yyreportTree): Do not assume that size_t is the same width as int,
787 when printing sizes. Print sizes using an unsigned format.
788 Problem reported by Frank Heckenbach in
789 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
790
791 Port to Forte Developer 7 C compiler.
792 * data/glr.c (struct YYLTYPE): If locations are not being used,
793 declare a single dummy member, as empty structs do not conform
794 to the C standard.
795 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
796 the Forte Developer 7 C compiler complains that end-of-loop
797 code is not reached.
798
799 2003-06-17 Paul Eggert <eggert@twinsun.com>
800
801 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
802 avoid warnings from picky compilers about redefinition of PARAMS.
803
804 2003-06-17 Paul Eggert <eggert@twinsun.com>
805
806 Version 1.875b.
807
808 * NEWS: Document 1.875b.
809
810 * lib/bbitset.h: Do not include config.h; that's the includer's job.
811 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
812 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
813 Don't use 'index' in comments, as it's a builtin fn on some hosts.
814 * lib/bitset_stats.c: Include gettext.h unconditionally, as
815 per recent gettext manual's suggestion.
816 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
817 Use prototypes, not old-style definitions.
818 * lib/lbitset.c (lbitset_unused_clear): Likewise.
819 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
820 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
821 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
822 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
823 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
824 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
825 vbitset_or_and_cmp, vbitset_copy): Likewise.
826
827 * lib/libiberty.h: Do not include config.h; that's the includer's job.
828 Do not include <stdlib.h>.
829 (PARAMS): Define unconditionally for C89.
830 (ATTRIBUTE_NORETURN): Remove.
831 (ATTRIBUTE_UNUSED): Define unconditionally.
832
833 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
834 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
835 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
836 * lib/vbitset.c, lib/vbitset.h: New files.
837 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
838 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
839 from libbitset.
840
841 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
842 `How Can I Reset @code{yyparse}', since texinfo does not allow
843 arbitrary @ in node names.
844
845 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
846 shouldn't be needed according to the gettext 0.12.1 documentation
847 but which seem to be needed anyway: codeset.m4 glibc21.m4
848 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
849 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
850 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
851
852 * lib/.cvsignore: Add stdbool.h.
853 * m4/.cvsignore: Add nls.m4, po.m4.
854
855 Upgrade to CVS gnulib.
856 * stdbool_.h: File renamed from stdbool.h.in.
857 * configure.ac (AM_STDBOOL_H): Invoke this instead of
858 AC_HEADER_STDBOOL.
859 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
860 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
861 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
862 (MOSTLYCLEANFILES): New var.
863 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
864 (stdbool.h): New rule.
865 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
866 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
867 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
868 m4/quote.m4: Upgrade to today's gnulib.
869
870 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
871 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
872 the tests right now.
873 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
874 yyerror are declared before use; C99 requires this.
875
876 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
877
878 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
879 first.
880 (yyrecoverSyntaxError): Correct the logic for setting and testing
881 yyerrState.
882 Correct comment on handling EOF.
883 Allow states with only a default reduction, rather than failing
884 (I can't quite reconstruct why these were not allowed before).
885
886 Fixes to avoid problem that $-N rules in GLR parsers can cause
887 buffer overruns, corrupting state.
888
889 * src/output.c (prepare_rules): Output max_left_semantic_context
890 definition.
891 * src/reader.h (max_left_semantic_context): New variable declaration.
892 * src/scan-gram.l (max_left_semantic_context): Define.
893 (handle_action_dollar): Update max_left_semantic_context.
894 * data/glr.c (YYMAXLEFT): New definition.
895 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
896 (yyresolveAction): Ditto.
897
898 Fixes to problems with location handling in GLR parsers reported by
899 Frank Heckenbach (2003/06/05).
900
901 * data/glr.c (YYLTYPE): Make trivial if locations not used.
902 (YYRHSLOC): Add parentheses, and define only if locations used.
903 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
904 locations not used.
905 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
906 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
907
908 * tests/cxx-type.at: Exercise location information; update tests
909 to differentiate output with and without locations.
910 Remove forward declarations of yylex and yyerror---caused errors
911 because default YYLTYPE not yet defined.
912 Change semantic actions to compute strings, rather than printing
913 them directly (to test proper passing of semantics values). Change
914 output to prefix notation and update test data and expected results.
915 (yylex): Track locations.
916 (stmtMerge): Return value rather than printing, and include arguments
917 in value.
918
919 2003-06-03 Paul Eggert <eggert@twinsun.com>
920
921 Avoid warnings generated by GCC 2.95.4 when Bison is
922 configured with --enable-gcc-warnings.
923 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
924 yy::]b4_parser_class_name[::translate_,
925 yy::Stack::operator[] (unsigned),
926 yy::Stack::operator[] (unsigned) const,
927 yy::Slice::operator[] (unsigned),
928 yy::Slice::operator[] (unsigned) const):
929 Rename local vars to avoid warnings.
930 * tests/glr-regression.at (Improper handling of embedded actions
931 and $-N in GLR parsers): Remove unused local variable from yylex.
932 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
933 (void) as arg when not pure, since we now assume C89 when building
934 Bison. Pacify GCC by using parameter.
935
936 2003-06-02 Paul Eggert <eggert@twinsun.com>
937
938 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
939 yy::Location::lines, yy::Location::columns): Rename arguments
940 to avoid shadowing; this removes a warning generated by GCC 3.3.
941
942 2003-06-01 Paul Eggert <eggert@twinsun.com>
943
944 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
945 to g++, as GCC 3.3 complains if you do it.
946 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
947 everything that WARNING_CFLAGS has, except omit warnings
948 not suitable for C++.
949 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
950 * tests/atlocal.in (CXXFLAGS): New var.
951 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
952
953 Fix a GLR parser bug I reported in February; see
954 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
955 The problem was that GLR parsers did not conform to the C standard,
956 because actions like { $1 = $2 + $3; } expanded to expressions
957 that invoked YYFILL in separate subexpressions, and YYFILL assigned
958 to a local variable. The C standard says that expressions
959 like (var = f ()) + (var = f ()) have undefined behavior.
960 Another problem was that GCC sometimes issues warnings that
961 yyfill and its parameters are unused.
962
963 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
964 as possibly unused.
965 (yyfill): New function.
966 (YYFILL): Use it.
967 (yyuserAction): Change type of yynormal to bool, so that it matches
968 the new yyfill signature. Mark it as possibly unused.
969
970
971 Follow up on a bug I reported in February, where a Bison-generated
972 parser can loop. Provide a test case and a fix for yacc.c. I
973 don't have a fix for lalr1.cc or for glr.c, unfortunately.
974 The original bug report is in:
975 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
976
977 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
978 macro's size was becoming unwieldy.
979 (yyerrlab): Do not discard an empty lookahead symbol, as this
980 might destroy garbage.
981 (yyerrorlab): New label, with the old contents of YYERROR,
982 plus the following change: pop the stack of rhs corresponding
983 to the production that invoked YYERROR. That is how Yacc
984 behaves, and POSIX requires this behavior.
985 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
986 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
987 Define 'alarm' to do nothing if unistd.h is not available.
988 Add a new rule "exp: '-' error;" to test the above change to
989 data/yacc.c. Use 'alarm' to abort any test taking longer than
990 10 seconds, as it's probably looping.
991 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
992 Also, the new yacc.c generates two fewer diagnostics for an
993 existing test.
994
995 2003-05-24 Paul Eggert <eggert@twinsun.com>
996
997 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
998 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
999 This fixes a problem reported by John Bowman when the Compaq/HP
1000 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
1001 -ansi -Wall -gall).
1002 * data/yacc.c (union yyalloc): Likewise.
1003 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
1004
1005 Switch from 'int' to 'bool' where that makes sense.
1006
1007 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
1008 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
1009 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
1010 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
1011 Return or accept bool, not int. All callers changed.
1012 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
1013 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
1014 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
1015 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
1016 bitset_or_and_cmp_): Likewise.
1017 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
1018 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
1019 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
1020 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
1021 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
1022 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
1023 bitset_stats_or_and_cmp): Likewise.
1024 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
1025 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
1026 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
1027 ebitset_xor_cmp): Likewise.
1028 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
1029 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
1030 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
1031 lbitset_xor_cmp): Likewise.
1032 * lib/bbitset.h: Include <stdbool.h>.
1033 (struct bitset_vtable): The following members now return bool, not
1034 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
1035 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
1036 or_and_cmp).
1037 * src/conflicts.c (count_rr_conflicts): Likewise.
1038 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
1039 All uses changed.
1040 * lib/ebitset.c (ebitset_obstack_init): Likewise.
1041 * lib/lbitset.c (lbitset_obstack_init): Likewise.
1042 * src/getargs.c (debug_flag, defines_flag, locations_flag,
1043 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
1044 graph_flag): Likewise.
1045 * src/getargs.h (debug_flag, defines_flag, locations_flag,
1046 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
1047 graph_flag): Likewise.
1048 * src/output.c (error_verbose): Likewise.
1049 * src/output.h (error_verbose): Likewise.
1050 * src/reader.c (start_flag, typed): Likewise.
1051 * src/reader.h (typed): Likewise.
1052 * src/getargs.c (LOCATIONS_OPTION): New constant.
1053 (long_options, getargs): Use it.
1054 * src/lalr.c (build_relations): Use bool, not int.
1055 * src/nullable.c (nullable_compute): Likewise.
1056 * src/print.c (print_reductions): Likewise.
1057 * src/tables.c (action_row, pack_vector): Likewise.
1058 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
1059 * src/output.c (prepare): Use it.
1060 * src/output.c (token_definitions_output,
1061 symbol_destructors_output, symbol_destructors_output): Use string,
1062 not boolean integer, to keep track of whether to output separator.
1063 * src/print_graph.c (print_core): Likewise.
1064 * src/state.c (state_rule_lookaheads_print): Likewise.
1065
1066 * config/install-sh: Sync from automake 1.7.5.
1067
1068 2003-05-14 Paul Eggert <eggert@twinsun.com>
1069
1070 * src/parse-gram.y (rules_or_grammar_declaration): Require a
1071 semicolon after a grammar declaration, in the interest of possible
1072 future changes to the Bison input language.
1073 Do not allow a stray semicolon at the start of the grammar.
1074 (rhses.1): Allow one or more semicolons after any rule, including
1075 just before "|" as required by POSIX.
1076 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
1077 grammar.
1078
1079 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
1080
1081 %parse-param support for lalr1.cc.
1082
1083 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
1084 b4_cc_constructor_calls, b4_cc_constructor_call,
1085 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
1086 definitions.
1087 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
1088 parse-param arguments.
1089 (yy::b4_parser_class_name): Declare instance variables to
1090 hold parse-param arguments.
1091 * tests/calc.at: s/value/semantic_value/ because value clashes
1092 with a member of yy::b4_parser_class_name. Adjust C++ code
1093 to handle %parse-param. Enable %parse-param test in C++.
1094
1095 2003-05-12 Paul Eggert <eggert@twinsun.com>
1096
1097 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
1098 English a bit. Fix fclose typo. Change "const char" to "char
1099 const", and use ANSI C rather than K&R for "main". Suggest
1100 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
1101 and suggest yy_switch_to_buffer.
1102
1103 2003-05-05 Paul Eggert <eggert@twinsun.com>
1104
1105 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
1106 C89. This avoids a diagnostic on compilers that define __STDC__
1107 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
1108 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
1109
1110 2003-05-03 Paul Eggert <eggert@twinsun.com>
1111
1112 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
1113 Do not overrun array bounds.
1114 This should fix a bug reported today by Olatunji Oluwabukunmi in
1115 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
1116
1117 2003-04-29 Akim Demaille <akim@epita.fr>
1118
1119 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
1120 * src/getargs.c, src/getargs.h: here, as bool, not int.
1121 (nondeterministic_parser): New.
1122 * src/parse-gram.y, src/scan-gram.l: Support
1123 %nondeterministic-parser.
1124 * src/output.c (prepare): Use nondeterministic_parser instead
1125 of glr_parser where appropriate.
1126 * src/tables.c (conflict_row, action_row, save_row)
1127 (token_actions, token_actions, pack_vector): Ditto.
1128
1129 2003-04-29 Akim Demaille <akim@epita.fr>
1130
1131 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
1132
1133 2003-04-29 Akim Demaille <akim@epita.fr>
1134
1135 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
1136 with %pure-parser and %locations to exercise the patch from Yakov
1137 Markovitch below.
1138
1139 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
1140
1141 * data/yacc.c: (b4_lex_param): Corrected for the case where
1142 %lex-param is provided and %pure-parser isn't.
1143
1144 2003-04-27 Paul Eggert <eggert@twinsun.com>
1145
1146 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
1147 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
1148 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
1149 if it is not defined.
1150 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
1151
1152 2003-04-26 Paul Eggert <eggert@twinsun.com>
1153
1154 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
1155 Declare to be of type suitable for the ninf value itself, not of
1156 type suitable for the corresponding table, since the latter might
1157 be unsigned but the ninf value might be negative. This fixes a
1158 bug reported by Alexandre Duret-Lutz in
1159 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
1160
1161 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
1162 invokes it. We shouldn't invoke it twice because it will attempt
1163 to put error.o in the archive twice. This fixes a glitch reported
1164 by Martin Mokrejs in
1165 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
1166
1167 2003-04-21 Paul Eggert <eggert@twinsun.com>
1168
1169 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
1170 to gnulib.
1171
1172 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
1173
1174 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
1175 Fix obvious typo that results in uncompilable GLR parsers
1176 when both %pure-parser and %locations are used. (trivial change)
1177
1178 2003-04-17 Paul Eggert <eggert@twinsun.com>
1179
1180 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
1181 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
1182 Do not insert the expected token via unput, as this runs afoul
1183 of a POSIX-compatibility bug in flex 2.5.31.
1184 All uses changed to BEGIN the parent state,
1185 since we no longer insert the expected token via unput.
1186 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
1187 that is no longer emitted after the above change.
1188
1189 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
1190 the first one. This change is from Paul Hilfinger, and it fixes
1191 regression reported by Werner Lemberg in
1192 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1193
1194 (resolve_sr_conflict): Don't invoke state_errs_set
1195 unless one or more tokens have been explicitly made errors.
1196 Otherwise, the above change causes Bison to abort.
1197
1198 * tests/existing.at (GNU pic Grammar): New test case, taken from
1199 Lemberg's email.
1200
1201 2003-03-31 Akim Demaille <akim@epita.fr>
1202
1203 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
1204
1205 2003-03-31 Akim Demaille <akim@epita.fr>
1206
1207 * src/output.c (prepare_symbols): Avoid trailing spaces in the
1208 output.
1209
1210 2003-03-31 Akim Demaille <akim@epita.fr>
1211
1212 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
1213 From Paul Hilfinger.
1214
1215 2003-03-29 Akim Demaille <akim@epita.fr>
1216
1217 * m4/error.m4: Do not put under dynamic conditions some code which
1218 expansion is under static control.
1219
1220 2003-03-29 Akim Demaille <akim@epita.fr>
1221
1222 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
1223
1224 2003-03-29 Akim Demaille <akim@epita.fr>
1225
1226 * doc/bison.texinfo (Strings are Destroyed): New.
1227
1228 2003-03-13 Paul Eggert <eggert@twinsun.com>
1229
1230 * .cvsignore: Add configure.lineno.
1231 * src/.cvsignore: Add yacc.
1232 * tests/.cvsignore: Add testsuite.log.
1233 * doc/fdl.texi: Sync with latest FSF version.
1234
1235 2003-03-12 Paul Eggert <eggert@twinsun.com>
1236
1237 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
1238 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
1239 cursor, instead of leaving it undefined. This fixes a bug
1240 reported by Tim Van Holder in
1241 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
1242 * tests/input.at (Torturing the Scanner): Test the scanner on
1243 an empty input file, which was Tim Van Holder's test case.
1244
1245 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
1246 <sys/resource.h> can be included, include sys/time.h and
1247 sys/times.h first, if available. This works around the SunOS
1248 4.1.4 porting bug reported by Bruce Becker in
1249 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
1250
1251 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
1252 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
1253 AC_HEADER_SYS_WAIT.
1254
1255 Merge changes from gnulib. This was prompted because the CVS
1256 snapshot didn't build on Solaris 7 due to strnlen problems.
1257
1258 These changes need to be merged back into gnulib:
1259 * lib/hash.c: Include <stdbool.h> unconditionally.
1260 * m4/onceonly.m4 (m4_quote): New macro.
1261 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
1262 Quote AC_FOREACH variable-expansions properly.
1263 The 2003-01-03 obstack.h change also needs merging.
1264 {end of changes requiring merging}
1265
1266 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
1267 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
1268 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
1269 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
1270 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
1271 New files, imported from gnulib.
1272 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
1273 above.
1274
1275 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
1276 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
1277 gnulib sources.
1278
1279 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
1280 Add.
1281 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
1282 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
1283 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
1284 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
1285 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
1286 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
1287 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
1288 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
1289 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
1290 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
1291 (jm_PREREQ_ARGMATCH): Remove.
1292 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
1293 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
1294
1295 * src/system.h: Include <stdbool.h> unconditionally.
1296
1297 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
1298 assuming at least C89 in the bitset code for some time now.
1299
1300 2003-03-03 Akim Demaille <akim@epita.fr>
1301
1302 * ro.po: New.
1303
1304 2003-03-02 Akim Demaille <akim@epita.fr>
1305
1306 * doc/bison.texinfo (Table of Symbols): Reactivate the
1307 documentation for %lex-param, and %parse-param.
1308
1309 2003-03-02 Akim Demaille <akim@epita.fr>
1310
1311 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
1312 generate verbose error messages.
1313 Use the number of tokens as an upper bound in yytname, as it
1314 cannot be a non terminal.
1315
1316 2003-03-02 Akim Demaille <akim@epita.fr>
1317
1318 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
1319 message.
1320
1321 2003-03-02 Akim Demaille <akim@epita.fr>
1322
1323 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
1324 Use them to exercise yycheck overrun.
1325 Based on Andrew Suffield's grammar.
1326
1327 2003-03-02 Akim Demaille <akim@epita.fr>
1328
1329 Create tests/local.at for Bison generic testing macros.
1330
1331 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
1332 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
1333 This new file.
1334 * tests/calc.at (AT_CHECK_CALC): Adjust.
1335 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
1336 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
1337 * tests/local.at: here.
1338 (AT_COMPILE_CXX): Tags the tests using it as c++.
1339 Ignore the test if CXX is not functional.
1340
1341 2003-03-01 Paul Eggert <eggert@twinsun.com>
1342
1343 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
1344 not loc->end, since loc->end might contain garbage and this leads
1345 to undefined behavior on some platforms.
1346 (id_loc, token_start): Use (IF_LINTed) initial values that do not
1347 depend on *loc, so that the reader doesn't give the the false
1348 impression that *loc is initialized.
1349 (<INITIAL>"%%"): Do not bother setting code_start, since its value
1350 does not survive the return.
1351
1352 2003-03-01 Akim Demaille <akim@epita.fr>
1353
1354 * src/scan-gram.l (code_start): Always initialize it when entering
1355 into yylex, as SC_EPILOGUE is activated *before* the corresponding
1356 yylex invocation. An alternative would be making it static, but
1357 then it starts with the second %%'s beginning, instead of its end.
1358
1359 2003-02-28 Paul Eggert <eggert@twinsun.com>
1360
1361 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
1362 around a UnixWare 7.1.1 porting bug reported by John Hughes in
1363 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
1364
1365 2003-02-26 Paul Eggert <eggert@twinsun.com>
1366
1367 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
1368 Remove Sequent/Pyramid discussion (nobody uses them any more).
1369 Merge VMS and MS-DOS discussion; these ports may well be dead
1370 but let's keep mentioning them for now. Put <> around email
1371 addresses. Add copyright notice.
1372
1373 2003-02-24 Paul Eggert <eggert@twinsun.com>
1374
1375 * data/glr.c (yy_reduce_print): yylineno -> yylno,
1376 to avoid collision with flex use of yylineno.
1377 Problem reported by Bruce Lilly in
1378 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
1379 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1380 * data/yacc.c (yy_reduce_print): Likewise.
1381
1382 * config/depcomp: Sync with Automake 1.7.3.
1383
1384 2003-02-21 Akim Demaille <akim@epita.fr>
1385
1386 * data/lalr1.cc: Use temporary variables instead of casts to
1387 change integer types.
1388 Suggested by Paul Eggert.
1389
1390 2003-02-21 Akim Demaille <akim@epita.fr>
1391
1392 * doc/bison.texinfo: Use "location" consistently to refer to @n,
1393 to avoid confusions with lalr1.cc's notion of Position.
1394 Suggested by Paul Eggert.
1395
1396 2003-02-20 Akim Demaille <akim@epita.fr>
1397
1398 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
1399 before initial_columns.
1400 (location.hh): Use consistent variable names when defining the
1401 operator<<.
1402 Use "last" so that we subtract from Positions, not from unsigned.
1403
1404 2003-02-20 Akim Demaille <akim@epita.fr>
1405
1406 * data/lalr1.cc (position.hh): New subfile, including the extended
1407 and Doxygen'ed documentation of class Position.
1408 (location.hh): Use it.
1409 Document a` la Doxygen.
1410 With the help of Benoit Perrot.
1411
1412 2003-02-20 Akim Demaille <akim@epita.fr>
1413
1414 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
1415 AT_YACC_IF.
1416 Redefine AT_YYERROR_SEES_LOC_IF using it.
1417 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
1418 not defined.
1419 Don't use the location in yy::Parser::error_ and
1420 yy::Parser::print_ when not %locations.
1421 Activate more lalr1.cc tests.
1422
1423 2003-02-19 Akim Demaille <akim@epita.fr>
1424
1425 * data/lalr1.cc: When displaying a line number, be sure to make it
1426 an int.
1427
1428 2003-02-19 Akim Demaille <akim@epita.fr>
1429
1430 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
1431 Remove, useless.
1432 (YYABORT, YYACCEPT, YYERROR): New.
1433 * tests/calc.at: Renable the lalr1.cc test.
1434
1435 2003-02-19 Akim Demaille <akim@epita.fr>
1436
1437 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
1438 error recovery, mixing with/without pops and discarding of the
1439 lookahead.
1440 Exercise YYERROR.
1441 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
1442
1443 2003-02-17 Paul Eggert <eggert@twinsun.com>
1444
1445 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
1446 * tests/testsuite.at (AT_COMPILE): Use them.
1447 This fixes the testsuite problem reported by Robert Lentz in
1448 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
1449
1450 2003-02-12 Paul Eggert <eggert@twinsun.com>
1451
1452 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
1453 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
1454 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
1455 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
1456 Check for malloc failure, for consistency with yacc.c.
1457 (yytname_size): Remove, for consistency with yacc.c.
1458
1459 The bug still remains in data/lalr1.cc, as I didn't have time
1460 to fix it there.
1461
1462 2003-02-06 Akim Demaille <akim@epita.fr>
1463
1464 * configure.ac (GXX): Rename as...
1465 (CXX): this, to keep the original Autoconf semantics.
1466 Require 2.57.
1467 * data/lalr1.cc: Fix b4_copyright invocations.
1468 If YYDEBUG is not defined, don't depend upon name_ being defined.
1469 (location.hh): Include string and iostream.
1470 (Position::filename): New member.
1471 (Position::Position ()): New.
1472 (operator<< (Position)): New.
1473 (operator- (Position, int)): New.
1474 (Location::first, Location::last): Rename as...
1475 (Location::begin, Location::end): these, to mock the conventional
1476 iterator names.
1477 (operator<< (Location)): New.
1478 * tests/atlocal.in (CXX): New.
1479 * tests/testsuite.at (AT_COMPILE_CXX): New.
1480 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
1481 locations in a more synthetic way.
1482 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
1483 lalr1.cc is used.
1484 Adjust the C locations to match those from Emacs: first column is
1485 column 0.
1486 Change all the expected results.
1487 Conform to the GCS: simplify the locations when applicable.
1488 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
1489 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
1490 these CPP macros with the m4 macros new defined by...
1491 (AT_CHECK_PUSHDEFS): this, i.e.:
1492 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
1493 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
1494 New macros.
1495 (AT_CHECK_POPDEFS): Undefine them.
1496 (AT_CHECK_CALC_LALR1_CC): New.
1497 Use it for the first lalr1.cc test.
1498
1499 2003-02-04 Akim Demaille <akim@epita.fr>
1500
1501 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
1502 Location as is defined.
1503
1504 2003-02-04 Akim Demaille <akim@epita.fr>
1505
1506 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
1507 name_ being defined.
1508
1509 2003-02-03 Paul Eggert <eggert@twinsun.com>
1510
1511 * src/gram.h (start_symbol): Remove unused decl.
1512
1513 Use more-consistent naming conventions for local vars.
1514
1515 * src/derives.c (derives_compute): Change type of local var from
1516 int to rule_number.
1517 * src/gram.c (grammar_rules_partial_print): Likewise.
1518 * src/print.c (print_core): Likewise.
1519 * src/reduce.c (reduce_grammar_tables): Likewise.
1520
1521 * src/gram.c (grammar_dump): Change name of item_number *
1522 local var from r to rp.
1523 * src/nullable.c (nullable_compute): Likewise.
1524
1525 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
1526
1527 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
1528 for symbol or symbol_number var.
1529 * src/reader.c (grammar_start_symbol_set): Likewise.
1530 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
1531 Likewise.
1532 * src/state.c (transitions_to): Likewise.
1533 * src/state.h: Likewise.
1534 * src/tables.c (symbol_number_to_vector_number): Likewise.
1535
1536 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
1537 char * var.
1538
1539 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
1540 var.
1541
1542 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
1543 var.
1544
1545 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
1546 Use str, not s, for char * var. Use ch, not c, for character var.
1547 Use size for size var.
1548
1549 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
1550 char * var.
1551 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
1552 uniqstr var.
1553 * src/uniqstr.h: Likewise.
1554
1555 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1556 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1557 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
1558 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
1559 param to have same name as that of enum, so that we don't use
1560 "s" to stand for a non-state.
1561
1562 2003-02-02 Akim Demaille <akim@epita.fr>
1563
1564 * src/scan-skel.l: Scan more than one inert character per yylex
1565 invocation.
1566
1567 2003-02-01 Paul Eggert <eggert@twinsun.com>
1568
1569 Version 1.875a.
1570
1571 * po/LINGUAS: Add ms.
1572
1573 2003-01-30 Akim Demaille <akim@epita.fr>
1574
1575 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
1576
1577 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1578
1579 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
1580 of $1.
1581
1582 Changes in response to error report by S. Eken: GLR mode does not
1583 handle negative $ indices or $ indices in embedded rules correctly.
1584 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
1585
1586 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
1587 (b4_rhs_location): Ditto.
1588 (yyfill): New function to copy from stack tree into array
1589 incrementally.
1590 (yyuserAction): Modify to allow incremental move of semantic values
1591 to rhs array when in GLR mode.
1592 Define YYFILL to use in user-defined actions to fill semantic array
1593 as needed.
1594 Remove dummy use of yystack, as there is now a guaranteed use.
1595 (yydoAction): Modify to allow incremental move of semantic values
1596 to rhs array when in GLR mode.
1597 (yyresolveAction): Ditto.
1598 (yyglrShiftDefer): Update comment.
1599 (yyresolveStates): Use X == NULL for pointers, not !X.
1600 (yyglrReduce): Ditto.
1601 (yydoAction): Ditto
1602
1603 * tests/glr-regr1.at: Rename to ...
1604 * tests/glr-regression.at: Add new regression test for the problems
1605 described above (adapted from S. Eken).
1606 Update copyright notice.
1607 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
1608 * tests/Makefile.am: Ditto.
1609
1610 2003-01-28 Paul Eggert <eggert@twinsun.com>
1611
1612 * data/lalr1.cc: Do not use @output_header_name@ unless
1613 b4_defines_flag is set. This fixes two bugs reported by
1614 Tim Van Holder in
1615 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
1616 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
1617
1618 2003-01-21 Paul Eggert <eggert@twinsun.com>
1619
1620 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
1621 we don't need to worry about yyerrlab1 being reported as an
1622 "unused label" by non-GCC C compilers. The downside is that if
1623 locations are used then a couple of statements are duplicated each
1624 time YYERROR is invoked, but the upside is that the warnings
1625 should vanish.
1626 (yyerrlab1): Move code to YERROR.
1627 (yyerrlab2): Remove. Change uses back to yyerrlab1.
1628 This reverts some of the 2002-12-27 change.
1629
1630 2003-01-17 Paul Eggert <eggert@twinsun.com>
1631
1632 * src/output.c (symbol_printers_output): Fix typo that led
1633 to core dump. Problem reported by Antonio Rus in
1634 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
1635
1636 2003-01-13 Akim Demaille <akim@epita.fr>,
1637 Quoc Peyrot <chojin@lrde.epita.fr>,
1638 Robert Anisko <anisko_r@lrde.epita.fr>
1639
1640 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
1641 when the stacks contain one element, as the loop would otherwise
1642 free the last state, and then use the top state (the one we just
1643 popped). This means that the initial elements will not be freed
1644 explicitly, as is the case in yacc.c; it is not a problem, as
1645 these elements have fake values.
1646
1647 2003-01-11 Paul Eggert <eggert@twinsun.com>
1648
1649 * NEWS: %expect-violations are now just warnings, reverting
1650 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
1651 bootstrapping problem reported by Matthias Klose; see
1652 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
1653 * src/conflicts.c (conflicts_print): Likewise.
1654 * tests/conflicts.at (%expect not enough, %expect too much,
1655 %expect with reduce conflicts): Likewise.
1656 * doc/bison.texinfo (Expect Decl): Document this. Also mention
1657 that the warning is enabled if the number of conflicts changes
1658 (not necessarily increases).
1659
1660 * src/getargs.c (version): Update copyright year.
1661
1662 2003-01-09 Akim Demaille <akim@epita.fr>
1663
1664 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
1665
1666 2003-01-08 Paul Eggert <eggert@twinsun.com>
1667
1668 * Makefile.maint (WGETFLAGS):
1669 New macro, containing "-C off" to disable proxy caches.
1670 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
1671 (rel-check): Use $(WGET) instead of wget.
1672
1673 2003-01-06 Paul Eggert <eggert@twinsun.com>
1674
1675 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
1676 the GLR paper of Scott, Johnstone and Hussain.
1677
1678 2003-01-04 Paul Eggert <eggert@twinsun.com>
1679
1680 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
1681 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
1682 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
1683 (EXTRA_LIBRARIES): New var, for liby.a.
1684 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
1685 (EXTRA_SCRIPTS): New var, for yacc.
1686
1687 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
1688 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
1689 Problem reported by Nelson H. F. Beebe.
1690
1691 2003-01-03 Paul Eggert <eggert@twinsun.com>
1692
1693 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
1694 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1695 when compiling Bison 1.875's `bitset bset = obstack_alloc
1696 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
1697
1698 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
1699 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
1700 grow to a huge size with typical invocation.
1701
1702 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
1703 Use the pattern recommended by Autoconf 2.57, except also protect
1704 against double-definition.
1705 * src/system.h: Likewise.
1706 Portability issues reported by Nelson H. F. Beebe.
1707
1708 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
1709 All uses changed. Provide a definition in both C and C++.
1710 (yytrue, yyfalse): Define even if defined (__cplusplus).
1711
1712 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
1713 Reported by Nelson H. F. Beebe.
1714
1715 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
1716
1717 2003-01-02 Paul Eggert <eggert@twinsun.com>
1718
1719 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
1720 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
1721 Bug reported by Nelson H. F. Beebe.
1722
1723 2003-01-01 Paul Eggert <eggert@twinsun.com>
1724
1725 * Version 1.875.
1726
1727 2002-12-30 Paul Eggert <eggert@twinsun.com>
1728
1729 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
1730 Moved here from...
1731 (<INITIAL>","): Here. This causes stray "," to be treated
1732 more uniformly.
1733
1734 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
1735 last brace in braced code when not in Yacc mode, for compatibility
1736 with Bison 1.35. This resurrects the 2001-12-15 patch to
1737 src/reader.c.
1738
1739 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
1740 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
1741
1742 2002-12-28 Paul Eggert <eggert@twinsun.com>
1743
1744 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
1745 that of SYM's type. This fixes Debian bug 168069, reported by
1746 Thomas Olsson.
1747
1748 2002-12-28 Paul Eggert <eggert@twinsun.com>
1749
1750 Version 1.75f.
1751
1752 Switch back to the Yacc style of conflict reports, undoing some
1753 of the 2002-07-30 change.
1754 * doc/bison.texinfo (Understanding): Use Yacc style for
1755 conflict reports. Also, use new way of locating rules.
1756 * src/conflicts.c (conflict_report):
1757 Renamed from conflict_report_yacc, removing the old
1758 'conflict_report'. Translate the entire conflict report at once,
1759 so that we don't assume that "," has the same interpretation in
1760 all languages.
1761 (conflicts_output): Use Yacc-style conflict report for each state,
1762 instead of our more-complicated style.
1763 (conflicts_print): Use Yacc-style conflict report, except print
1764 the input file name when not emulating Yacc.
1765 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
1766 Conflicted Reduction, %expect not enough, %expect too much,
1767 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
1768 * tests/existing.at (GNU Cim Grammar): Likewise.
1769 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
1770
1771 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
1772 fatal): Don't invoke fflush; it's not needed and it might even be
1773 harmful for stdout, as stdout might not be open.
1774 * src/reduce.c (reduce_print): Likewise.
1775
1776 2002-12-27 Paul Eggert <eggert@twinsun.com>
1777
1778 Fix a bug where error locations were not being recorded correctly.
1779 This problem was originally reported by Paul Hilfinger in
1780 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
1781
1782 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1783 top of the location stack's error locations.
1784 (yyerrlab): Set it. When discarding a token, push its location
1785 onto yylerrsp so that we don't lose track of the error's end.
1786 (yyerrlab1): Now is only the target of YYERROR, so that we can
1787 properly record the location of the action that failed. For GCC
1788 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1789 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1790 (yyerrlab2): New label, which yyerrlab now falls through to.
1791 Compute the error's location by applying YYLLOC_DEFAULT to
1792 the locations of all the symbols that went into the error.
1793 * doc/bison.texinfo (Location Default Action): Mention that
1794 YYLLOC_DEFAULT is also invoked for syntax errors.
1795 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1796 Error locations include the locations of all the tokens that were
1797 discarded, not just the last token.
1798
1799 2002-12-26 Paul Eggert <eggert@twinsun.com>
1800
1801 * src/files.c: Include quote.h.
1802 (compute_output_file_names): Warn if we detect conflicting
1803 outputs to the same file. This should catch the misunderstanding
1804 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1805
1806 * src/conflicts.c (conflicts_print): If the user specifies
1807 "%expect N", report an error if there are any reduce/reduce
1808 conflicts. This is what the manual says should happen.
1809 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1810 * tests/conflicts.at (%expect with reduce conflicts): New test.
1811
1812 Don't use m4_include on relative file names, as it doesn't work as
1813 desired if there happens to be a file with that name under ".".
1814
1815 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1816 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1817 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1818 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1819 * src/output.c (output_skeleton): Use full path names when
1820 specifying a file to include; don't rely on include path, as
1821 it's unreliable when the working file contains a file with
1822 that name.
1823
1824 2002-12-25 Paul Eggert <eggert@twinsun.com>
1825
1826 Remove obsolete references to bison.simple and bison.hairy.
1827 Problem mentioned by Aubin Mahe in
1828 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
1829 * data/glr.c: Comment fix.
1830 * doc/bison.1: Remove references. Also, mention "yacc".
1831
1832 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1833 with -g option.
1834
1835 * src/parse-gram.y (declaration): Use enum "report_states" rather
1836 than its numeric value 1.
1837
1838 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1839 opening a new one. This fixes Debian bug 165349, reported by
1840 Bruce Stephens.
1841
1842 2002-12-24 Paul Eggert <eggert@twinsun.com>
1843
1844 Version 1.75e.
1845
1846 * Makefile.maint (cvs-update): Don't assume that the shell
1847 supports $(...), as Solaris sh doesn't.
1848
1849 * src/parse-gram.y (lloc_default): Remove test for empty
1850 nonterminals at the end, since it didn't change the result.
1851
1852 2002-12-24 Paul Eggert <eggert@twinsun.com>
1853
1854 If the user does not define YYSTYPE as a macro, Bison now declares it
1855 using typedef instead of defining it as a macro. POSIX requires this.
1856 For consistency, YYLTYPE is also declared instead of defined.
1857
1858 %union directives can now have a tag before the `{', e.g., the
1859 directive `%union foo {...}' now generates the C code
1860 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1861 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1862 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1863 instead of `yyltype'.
1864
1865 `yystype' and `yyltype' are now obsolescent macros instead of being
1866 typedefs or tags; they are no longer documented and will be
1867 withdrawn in a future release.
1868
1869 * data/glr.c (b4_location_type): Remove.
1870 (YYSTYPE): Renamed from yystype.
1871 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
1872 (struct YYLTYPE): Renamed from struct yyltype.
1873 (YYLTYPE): Renamed from yyltype.
1874 (yyltype, yystype): New (and obsolescent) macros,
1875 for backward compatibility.
1876 * data/yacc.c: Likewise.
1877
1878 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
1879 does not specify a union tag. This is for compatibility with
1880 Solaris 9 yacc.
1881
1882 * src/parse-gram.y (add_param): 2nd arg is now char * not char
1883 const *, since it is now modified by stripping surrounding { }.
1884 (current_braced_code): Remove.
1885 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
1886 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
1887 trailing " {...}". Now of type <chars>.
1888 (grammar_declaration): Adjust to bundled tokens.
1889 (code_content): Remove; stripping is now done by add_param.
1890 (print_token_value): Print contents of bundled tokens.
1891 (token_name): New function.
1892
1893 * src/reader.h (braced_code, current_braced_code): Remove.
1894 (token_name): New decl.
1895
1896 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
1897 token_type, not braced_code code_kind. All uses changed.
1898 (SC_PRE_CODE): New state, for scanning after a keyword that
1899 has (or usually has) an immediately-following braced code.
1900 (token_type): New local var, to keep track of which token type
1901 to return when scanning braced code.
1902 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
1903 <INITIAL>"%parse-param", <INITIAL>"%printer",
1904 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
1905 instead of returning a token type immediately.
1906 (<INITIAL>"{"): Set token type.
1907 (<SC_BRACED_CODE>"}"): Use it.
1908 (handle_action_dollar, handle_action_at): Now returns bool
1909 indicating success. Fail if ! current_rule; this prevents a core dump.
1910 (handle_symbol_code_dollar, handle_symbol_code_at):
1911 Remove; merge body into caller.
1912 (handle_dollar, handle_at): Complain in invalid contexts.
1913
1914 * NEWS, doc/bison.texinfo: Document the above.
1915 * NEWS: Fix years and program names in copyright notice.
1916
1917 2002-12-17 Paul Eggert <eggert@twinsun.com>
1918
1919 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
1920 Reporting, Table of Symbols): Omit mentions of %lex-param and
1921 %parse-param from the documentation for now.
1922
1923 2002-12-15 Paul Eggert <eggert@twinsun.com>
1924
1925 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
1926 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
1927 lookahead symbol, and which sets yychar in parser actions) and it
1928 disagreed with the Bison documentation. Bug
1929 reported by Andrew Walrond.
1930
1931 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
1932 as the caller now does that.
1933 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
1934 (YYEMPTY): Parenthesize right hand side, since others use it.
1935 (yyparse): Don't assume that our generated code is the only code
1936 that sets yychar.
1937
1938 2002-12-13 Paul Eggert <eggert@twinsun.com>
1939
1940 Version 1.75d.
1941
1942 POSIX requires a "yacc" command.
1943 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
1944 (MOSTLYCLEANFILES): Add yacc.
1945 (yacc): New rule.
1946 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
1947 as an alias for bison y.
1948
1949 * po/LINGUAS: Add da.
1950
1951 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
1952 problem with latest <getopt.h>.
1953 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
1954
1955 * doc/fdl.texi: Upgrade to 1.2.
1956 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
1957 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
1958 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
1959 gnulib.
1960 * config/install-sh: Sync with autotools.
1961
1962 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
1963 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1964 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
1965 locations are requested.
1966 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
1967 locations are requested.
1968
1969 2002-12-12 Paul Eggert <eggert@twinsun.com>
1970
1971 Remove unportable casts and storage allocation tricks.
1972 While we're at it, remove almost all casts, since they
1973 usually aren't needed and are a sign of trouble.
1974
1975 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
1976
1977 * src/derives.c (derives_compute): Do not subtract NTOKENS from
1978 the pointer DSET returned by malloc; this isn't portable.
1979 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
1980 Similarly for DERIVES.
1981 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
1982 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
1983 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
1984
1985 * src/derives.c (derives_compute): Do not bother invoking
1986 int_of_rule_number, since rule numbers are integers.
1987
1988 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
1989 rather than XMALLOC (char, N).
1990
1991 * src/files.c (filename_split): Rewrite to avoid cast.
1992
1993 * src/gram.h (symbol_number_as_item_number,
1994 item_number_as_symbol_number, rule_number_as_item_number,
1995 item_number_as_rule_number):
1996 Now inline functions rather than macros, to avoid casts.
1997 * src/state.h (state_number_as_int): Likewise.
1998 * src/tables.c (state_number_to_vector_number,
1999 symbol_number_to_vector_number): Likewise.
2000
2001 * src/gram.h (int_of_rule_number): Remove; no longer used.
2002
2003 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
2004 since the resulting storage is always stored into.
2005
2006 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
2007 where it's needed.
2008
2009 * src/muscle_tab.c (muscle_m4_output):
2010 Now inline. Return bool, not int.
2011 * src/state.c (state_compare): Likewise.
2012 * src/symtab.c (symbol_check_defined,
2013 symbol_check_alias_consistency, symbol_pack, symbol_translation,
2014 hash_compare_symbol, hash_symbol):
2015 Likewise.
2016 * src/uniqstr.c (uniqstr_print): Likewise.
2017 * src/muscle_tab.c (muscle_m4_output_processor):
2018 New function, to avoid casts.
2019 * src/state.c (state_comparator, stage_hasher): Likewise.
2020 * src/symtab.c (symbol_check_defined_processor,
2021 symbol_check_alias_consistency_processor, symbol_pack_processor,
2022 symbol_translation_processor, hash_symbol_comparator,
2023 hash_symbol_hasher): Likewise.
2024 * src/uniqstr.c (uniqstr_print_processor): Likewise.
2025 * src/muscle_tab.c (muscles_m4_output):
2026 Use new functions instead of casting old functions unportably.
2027 * src/state.c (state_hash_new): Likewise.
2028 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
2029 symbols_token_translations_init):
2030 Likewise.
2031 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
2032
2033 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
2034 var instead of casting to long, to avoid casts.
2035 (prepare_states): Use MALLOC rather than alloca, so that we don't
2036 have to worry about alloca.
2037 * src/state.c (state_hash_lookup): Likewise.
2038
2039 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
2040 local var instead of casting to unsigned char, to avoid casts.
2041
2042 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
2043 STATE_ALLOC): Remove.
2044 (transitions_new, errs_new, reductions_new, state_new): Use malloc
2045 rather than calloc, and use offsetof to avoid allocating slightly
2046 too much storage.
2047 (state_new): Initialize all members.
2048
2049 * src/state.c (state_hash): Use unsigned accumulator, not signed.
2050
2051 * src/symtab.c (symbol_free): Remove; unused.
2052 (symbol_get): Remove cast in lhs of assignment.
2053 (symbols_do): Now static. Accept generic arguments, not
2054 hashing-related ones.
2055
2056 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
2057 (symbol_processor): Remove.
2058 (symbols_do): Remove decl; now static.
2059
2060 * src/system.h (alloca): Remove; decl no longer needed.
2061 (<stddef.h>): Include, for offsetof.
2062 (<inttypes.>, <stdint.h>): Include if available.
2063 (uintptr_t): New type, if system lacks it.
2064 (CALLOC, MALLOC, REALLOC): New macros.
2065 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
2066 new macros.
2067
2068 * src/tables.c (table_size): Now int, to pacify GCC.
2069 (table_grow, table_ninf_remap): Use signed table size.
2070 (save_row): Don't bother initializing locals when not needed.
2071 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
2072 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
2073
2074 * src/vcg.h: Correct misspellings.
2075
2076 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
2077
2078
2079 * src/getargs.c (getargs): Don't assume EOF == -1.
2080
2081 2002-12-09 Paul Eggert <eggert@twinsun.com>
2082
2083 Change identifier spellings to avoid collisions with names
2084 that are reserved by POSIX.
2085
2086 Don't use names ending in _t, since POSIX reserves them.
2087 For consistency, remove _e and _s endings -- they're weren't
2088 needed to remove ambiguity. All uses changed.
2089 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
2090 turn was just renamed from struniq_t.
2091 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
2092 which in turn was just renamed from struniq_processor_t.
2093 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
2094 in turn was renamed from hash_compare_struniq_t.
2095 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
2096 (state_list): Renamed from state_list_t.
2097 * src/assoc.h (assoc): Renamed from assoc_t.
2098 * src/conflicts.c (enum conflict_resolution): Renamed from
2099 enum conflict_resolution_e.
2100 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
2101 (rule_list): Renamed from rule_list_t.
2102 * src/getargs.h (enum trace): Renamed from enum trace_e.
2103 (enum report): Renamed from enum report_e.
2104 * src/gram.h (item_number): Renamed from item_number_t.
2105 (rule_number): Renamed from rule_number_t.
2106 (struct rule_s): Remove the "rule_s" part; not used.
2107 (rule): Renamed from rule_t.
2108 (rule_filter): Renamed from rule_filter_t.
2109 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
2110 (goto_list): Renamed from goto_list_t.
2111 * src/lalr.h (goto_number): Renamed from goto_number_t.
2112 * src/location.h (location): Renamed from location_t.
2113 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
2114 and moved here from:
2115 * src/muscle_tab.h (muscle_entry_t): here.
2116 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
2117 (rule_list): Renamed from rule_list_t.
2118 * src/print_graph.c (static_graph): Renamed from graph.
2119 * src/reader.h (braced_code): Renamed from braced_code_t.
2120 Remove brace_code_e tag.
2121 * src/relation.h (relation_node): Renamed from relation_node_t.
2122 (relation_nodes): Renamed from relation_nodes_t.
2123 (relation): Renamed from relation_t.
2124 * src/state.h (state_number): Renamed from state_number_t.
2125 (struct state): Renamed from struct state_s.
2126 (state): Renamed from state_t.
2127 (transitions): Renamed from transitions_t. Unused (and
2128 misspelled) transtion_s tag removed.
2129 (errs): Renamed from errs_t. Unused errs_s tag removed.
2130 (reductions): Renamed from reductions_t. Unused tag
2131 reductions_s removed.
2132 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
2133 (struct symbol_list): Renamed from struct symbol_list_s.
2134 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
2135 (struct symbol): Renamed from struct symbol_s.
2136 (symbol): Renamed from symbol_t.
2137 * src/tables.c (vector_number): Renamed from vector_number_t.
2138 (action_number): Renamed from action_t.
2139 * src/tables.h (base_number): Renamed from base_t.
2140 * src/vcg.h (enum color): Renamed from enum color_e.
2141 (enum textmode): Renamed from enum textmode_e.
2142 (enum shape): Renamed from enum shape_e.
2143 (struct colorentry): Renamed from struct colorentry_s.
2144 (struct classname): Renamed from struct classname_s.
2145 (struct infoname): Renamed from struct infoname_s.
2146 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
2147 (enum decision): Renamed from enum decision_e.
2148 (enum orientation): Renamed from enum orientation_e.
2149 (enum alignment): Renamed from enum alignment_e.
2150 (enum arrow_mode): Renamed from enum arrow_mode_e.
2151 (enum crossing_type): Renamed from enum crossing_type_e.
2152 (enum view): Renamed from enum view_e.
2153 (struct node): Renamed from struct node_s.
2154 (node): Renamed from node_t.
2155 (enum linestyle): Renamed from enum linestyle_e.
2156 (enum arrowstyle): Renamed from enum arrowstyle_e.
2157 (struct edge): Renamed from struct edge.
2158 (edge): Renamed from edge_t.
2159 (struct graph): Renamed from struct graph_s.
2160 (graph): Renamed from graph_t.
2161 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
2162 Rename value_t -> value.
2163 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
2164 value_t_as_yystype -> value_as_yystype.
2165
2166 Don't include <errno.h> in the mainstream code, since it
2167 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
2168 * lib/get-errno.c, lib/get-errno.h: New files.
2169 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
2170 get-errno.c.
2171 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
2172 * src/output.c (output_skeleton): Likewise.
2173 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
2174 instead of errno.
2175 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
2176 Likewise.
2177 (handle_action_dollar, handle_action_at): Likewise.
2178 * src/system.h: Do not include <errno.h>.
2179 (TAB_EXT): Renamed from EXT_TAB.
2180 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
2181
2182 Avoid str[a-z]*, since <string.h> reserves that name space.
2183 Change all instances of "struniq" in names to "uniqstr", and
2184 likewise for "STRUNIQ" and "UNIQSTR".
2185 * src/uniqstr.c: Renamed from src/struniq.c.
2186 * src/uniqstr.h: Renamed from src/struniq.h.
2187 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
2188 * src/files.c (strsuffix): Remove; unused.
2189 (concat2): Renamed from stringappend. Now static.
2190 * src/files.h (strsuffix, stringappend): Remove; unused.
2191 * src/parse-gram.y (<chars>): Renamed from <string>.
2192 (<uniqstr>): Renamed from <struniq>.
2193 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
2194 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
2195 (struct graph_s.expand): Renamed from struct graph_s.stretch.
2196 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
2197 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
2198 (N_EXPAND): Renamed from N_STRETCH.
2199
2200 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
2201 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
2202 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
2203 Remove; unused.
2204 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
2205 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
2206 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
2207 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
2208 (BASE_MAXIMUM): Renamed from BASE_MAX.
2209 (BASE_MINIMUM): Renamed from BASE_MIN.
2210 (ACTION_MAX): Remove; unused.
2211 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
2212 Unnecessary casts removed from above defines.
2213
2214
2215 Fix misspelling in names.
2216 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
2217 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
2218 G_NODE_ALIGNEMENT.
2219
2220
2221 * lib/timevar.c (timevar_report): Renamed from time_report,
2222 for consistency with other names.
2223 * lib/timevar.h (timevar_report): New decl.
2224 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
2225
2226
2227 Sort include-file uses.
2228
2229 Reorder all include files under src to be in the order "system.h".
2230 then the ../lib include files in angle brackets (alphabetized),
2231 then the . include files in double-quotes (alphabetized). Fix
2232 dependency breakages encountered in this process, as follows:
2233 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
2234 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
2235 * src/state.h: Include "symtab.h".
2236
2237 2002-12-08 Paul Eggert <eggert@twinsun.com>
2238
2239 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
2240 since this causes problems when __file__ contains character
2241 sequences like "@" that are treated specially by src/scan-skel.l.
2242 Instead, just use the file's basename. This fixes the bug
2243 reported by Martin Mokrejs in
2244 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
2245
2246 2002-12-06 Paul Eggert <eggert@twinsun.com>
2247
2248 Add support for rules that do not have trailing semicolons, as
2249 POSIX requires. Improve the quality of locations in Bison
2250 diagnostics.
2251
2252 * src/location.c: Include <quotearg.h>.
2253 (empty_location): Now const.
2254 (location_print): New function. Follow the recommendation of the
2255 GNU Coding Standards for locations that span file boundaries.
2256 * src/location.h: Do not include <quotearg.h>; no longer needed.
2257 (boundary): New type.
2258 (location_t): Use it. This allows locations to span file boundaries.
2259 All member uses changed: file -> start.file or end.file (as needed),
2260 first_line -> start.line, first_column -> start.column,
2261 last_line -> end.line, last_column -> end.column.
2262 (equal_boundaries): New function.
2263 (LOCATION_RESET, LOCATION_STEP): Remove.
2264 (LOCATION_PRINT): Remove. All callers changed to use location_print.
2265 (empty_location): Now const.
2266 (location_print): New decl.
2267 * src/parse-gram.y (lloc_default): New function, which handles
2268 empty locations more accurately.
2269 (YYLLOC_DEFAULT): Use it.
2270 (%token COLON): Remove.
2271 (%token ID_COLON): New token.
2272 (rules): Use it.
2273 (declarations, rules): Remove trailing semicolon.
2274 (declaration, rules_or_grammar_declaration):
2275 Allow empty (";") declaration.
2276 (symbol_def): Remove empty actions; no longer needed.
2277 (rules_or_grammar_declaration): Remove trailing semicolon.
2278 (semi_colon.opt): Remove.
2279 * src/reader.h: Include location.h.
2280 (scanner_cursor): New decl.
2281 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
2282 rolling our own.
2283 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
2284 of *loc.
2285 (STEP): Remove. No longer needed, now that adjust_location does
2286 the work. All uses removed.
2287 (scanner_cursor): New var.
2288 (adjust_location): Renamed from extend_location. It now sets
2289 *loc and adjusts the scanner cursor. All uses changed.
2290 Don't bother testing for CR.
2291 (handle_syncline): Remove location arg; now updates scanner cursor.
2292 All callers changed.
2293 (unexpected_end_of_file): Now accepts start boundary of token or
2294 comment, not location. All callers changed. Update scanner cursor,
2295 not the location.
2296 (SC_AFTER_IDENTIFIER): New state.
2297 (context_state): Renamed from c_context. All uses changed.
2298 (id_loc, code_start, token_start): New local vars.
2299 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
2300 processing of Yacc white space and equivalents here.
2301 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
2302 instead of returning ID immediately, since we need to search for
2303 a subsequent colon.
2304 (<INITIAL>"'", "\""): Save token_start.
2305 (<INITIAL>"%{", "{", "%%"): Save code_start.
2306 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
2307 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
2308 BEGIN context_state at end, not INITIAL.
2309 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
2310 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
2311 Return correct token start.
2312 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
2313 the start of a character, string or multiline comment is found.
2314 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
2315 Reduction): Adjust reported locations to match the more-precise
2316 results now expected.
2317 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
2318 * tests/reduce.at (Useless Rules, Reduced Automaton,
2319 Underivable Rules): Likewise.
2320 * tests/regression.at (Invalid inputs): No longer `expecting ";"
2321 or "|"' now that so many other tokens are allowed by the new grammar.
2322
2323 * src/complain.h (current_file): Remove duplicate decl;
2324 current_file is now owned by files.h.
2325 * src/complain.c, src/scan-gram.l: Include files.h.
2326
2327 2002-12-06 Paul Eggert <eggert@twinsun.com>
2328
2329 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
2330 promotes to int; it might be unsigned int.
2331 * data/yacc.c (yy_reduce_print): Likewise.
2332
2333 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
2334 be #defined in the prologue, not in the Bison declarations.
2335 This fixes Debian Bug 102878, reported by Shaul Karl.
2336
2337 2002-12-02 Paul Eggert <eggert@twinsun.com>
2338
2339 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
2340 * lib/strtoul.c: New file, from gnulib.
2341 This fixes a porting bug reported by Peter Klein in
2342 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
2343
2344 2002-11-30 Paul Eggert <eggert@twinsun.com>
2345
2346 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
2347 and put only a forward declaration in the prologue. This is for
2348 consistency with the other scanner helper functions.
2349
2350 Type clashes now generate warnings, not errors, since it
2351 appears that POSIX may allow some grammars with type clashes.
2352 * src/reader.c (grammar_current_rule_check): Warn about
2353 type clashes instead of complaining.
2354 * tests/input.at (Type Clashes): Expect warnings, not complaints.
2355
2356 Add Yacc library, since POSIX requires it.
2357 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
2358 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
2359 * lib/main.c, lib/yyerror.c: New files.
2360
2361 gram_error can be static; it need not be extern.
2362 * src/reader.h (gram_error): Remove decl.
2363 * src/parse-gram.y (gram_error): Now static. Add static decl.
2364 (print_token_value): Omit parameter names from forward decl,
2365 for consistency.
2366
2367 2002-11-29 Paul Eggert <eggert@twinsun.com>
2368
2369 * doc/bison.texinfo: Emphasize that yylex and yyerror must
2370 be declared before being used. E.g., one should typically
2371 declare them in the prologue. Use GNU coding style in examples.
2372 Put "const" consistently after the type it modifies. Mention
2373 that C99 supports "inline". Mention that yyerror traditionally
2374 returns "int".
2375
2376 %parse-param and %lex-param now take just one argument, the
2377 declaration; the argument name is deduced from the declaration.
2378
2379 * doc/bison.texinfo (Parser Function, Pure Calling, Error
2380 Reporting, Table of Symbols): Document this.
2381 * src/parse-gram.y (add_param): New function.
2382 (COMMA): Remove.
2383 (declaration): Implement new rule for %parse-param and %lex-param.
2384 * src/scan-gram.l: "," now elicits a warning, rather than being
2385 a token; this is more compatible with byacc.
2386 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
2387
2388 2002-11-27 Paul Eggert <eggert@twinsun.com>
2389
2390 Rename identifiers to avoid real and potential collisions.
2391
2392 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
2393 to avoid collision with lex macro described by Bruce Lilly in
2394 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
2395 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2396 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
2397 * src/parse-gram.y (print_token_value): Renamed from yyprint.
2398 All uses changed.
2399 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
2400 The name "yycontrol" violates the name space rules, and this stuff
2401 wasn't being used anyway.
2402 (input): Remove action; this stuff wasn't being used.
2403 (gram_error): Rename local variable yylloc -> loc.
2404 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
2405 (YY_DECL): Don't use "yy" at start of local variables.
2406 All uses changed, e.g., yylloc -> loc.
2407 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
2408 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
2409 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
2410 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
2411
2412 * src/parse-gram.y (gram_error): loc is now const *.
2413 * src/reader.h (gram_error): Likewise.
2414
2415 2002-11-24 Paul Eggert <eggert@twinsun.com>
2416
2417 Version 1.75c.
2418
2419 * tests/actions.at (Actions after errors): Use an output format
2420 more similar to that of the Printers and Destructors test.
2421 Test the position of the ';' token too.
2422 (Printers and Destructors): Likewise.
2423 (Printers and Destructors: %glr-parser): Remove for now, to avoid
2424 unnecessarily alarming people when the test fails.
2425
2426 * data/yacc.c (yyerrlab1): Move this label down, so that the
2427 parser does not discard the lookahead token if the user code
2428 invokes YYERROR. This change is required for POSIX conformance.
2429
2430 * lib/error.c: Sync with gnulib.
2431
2432 2002-11-22 Paul Eggert <eggert@twinsun.com>
2433
2434 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
2435 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
2436 * lib/xmalloc.c: Likewise.
2437
2438 2002-11-20 Paul Eggert <eggert@twinsun.com>
2439
2440 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
2441
2442 2002-11-20 Paul Eggert <eggert@twinsun.com>
2443
2444 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
2445 should use `if (! x) abort ();' rather than `assert (x);', and
2446 anyway it's one less thing to worry about configuring.
2447
2448 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
2449 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
2450 and replace all instances of assert with abort.
2451 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2452 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
2453
2454 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
2455 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
2456 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
2457 hash_find_entry, hash_rehash, hash_insert): Likewise.
2458 * src/conflicts.c (resolve_sr_conflict): Likewise.
2459 * src/lalr.c (set_goto_map, map_goto): Likewise.
2460 * src/nullable.c (nullable_compute): Likewise.
2461 * src/output.c (prepare_rules, token_definitions_output): Likewise.
2462 * src/reader.c (packgram, reader): Likewise.
2463 * src/state.c (state_new, state_free, state_transitions_set,
2464 state_reduction_find): Likewise.
2465 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
2466 symbol_pack): Likewise.
2467 * src/tables.c (conflict_row, pack_vector): Likewise.
2468 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
2469 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
2470 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
2471 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
2472
2473 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
2474 (ARGMATCH_CONSTRAINT): New macro.
2475 (ARGMATCH_ASSERT): Use it.
2476
2477 * src/system.h (verify): New macro.
2478 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
2479 rather than assert.
2480 * src/tables.c (tables_generate): Likewise.
2481
2482 * src/struniq.c (struniq_assert): Now returns void, and aborts
2483 if the assertion is false.
2484 (struniq_assert_p): Remove.
2485 * src/struniq.h: Likewise.
2486
2487 2002-11-18 Paul Eggert <eggert@twinsun.com>
2488
2489 * data/glr.c (yygetLRActions): Replace `yyindex' with
2490 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
2491 This fixes the regression with Sun ONE Studio 7 cc that I reported in
2492 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
2493
2494 2002-11-18 Akim Demaille <akim@epita.fr>
2495
2496 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
2497 space.
2498 From Tim Van Holder.
2499
2500 2002-11-17 Paul Eggert <eggert@twinsun.com>
2501
2502 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
2503 to "SyntaxError" for consistency with my 2002-11-15 change.
2504
2505 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
2506 not define to {}, since this breaks the common use of `YYDPRINTF
2507 ((...));' if a single statement is desired (e.g. before `else').
2508 Work around GCC warnings by surrounding corresponding calls with
2509 {} if needed.
2510 (yyhasResolvedValue): Remove unused function.
2511 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
2512 loop body.
2513 (yyreportSyntaxError): Renamed from yyreportParseError.
2514 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
2515 All uses changed.
2516 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
2517 extern when possible. Remove unused initializations.
2518
2519 2002-11-16 Akim Demaille <akim@epita.fr>
2520
2521 Augment the similarity between GLR and LALR traces.
2522
2523 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
2524 (YY_REDUCE_PRINT): New.
2525 (yyparse): Use them.
2526 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
2527 YYDPRINT here.
2528 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
2529 state reached after the reduction/recovery, since...
2530 (yyparse, yyprocessOneStack): Report the state we are entering in.
2531
2532 2002-11-16 Akim Demaille <akim@epita.fr>
2533
2534 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
2535 Add support for --trace=skeleton.
2536 * src/scan-skel.l: %option debug.
2537 Scan strings of non-@ or \n instead of character by character.
2538 (scan_skel): Handle trace_skeleton.
2539 (QPUTS): New.
2540 (@output_parser_name@, @output_header_name@): ``Restore'' their
2541 support (used to be M4 macros).
2542 * data/yacc.c: Quote larger chunks, a la glr.c.
2543 * data/lalr1.cc: Likewise.
2544 The header guards are no longer available, so use some other
2545 string than `YYLSP_NEEDED'.
2546
2547 2002-11-16 Akim Demaille <akim@epita.fr>
2548
2549 Make the ``Printers and Destructors'' test more verbose, taking
2550 `yacc.c''s behavior as (possibly wrong) reference.
2551
2552 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
2553 instead of fprint on stdout.
2554 Set and report the last_line of the symbols.
2555 Consistently display values and locations.
2556
2557 2002-11-16 Paul Eggert <eggert@twinsun.com>
2558
2559 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
2560
2561 2002-11-15 Paul Eggert <eggert@twinsun.com>
2562
2563 * tests/actions.at (Actions after errors): New test case.
2564
2565 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
2566 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
2567 tests/action.at, tests/calc.at, tests/conflicts.at,
2568 tests/cxx-type.at, tests/regression.at:
2569 "parse error" -> "syntax error" for POSIX compatibility.
2570 "parsing stack overflow..." -> "parser stack overflow" so
2571 that code matches Bison documentation.
2572
2573 2002-11-15 Akim Demaille <akim@epita.fr>
2574
2575 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
2576 take two BRACED_CODE, not two string_content.
2577 Free the scanner's obstack when we are done.
2578 (code_content): New.
2579 * tests/calc.at: Adjust.
2580 * doc/bison.texinfo: Adjust.
2581 Also, make sure to include the `,' for these declarations.
2582
2583 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
2584
2585 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
2586 definition; avoids potential autoreconf problems.
2587
2588 2002-11-15 Akim Demaille <akim@epita.fr>
2589
2590 Always check the value returned by yyparse.
2591
2592 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
2593 returned by yyparse.
2594 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
2595 Adjust calls.
2596 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
2597 returned by yyparse.
2598
2599 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2600
2601 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
2602 on input.at test.
2603
2604 2002-11-14 Paul Eggert <eggert@twinsun.com>
2605
2606 * src/output.c (output_skeleton): Call xfopen instead of
2607 duplicating xfopen's body.
2608
2609 Fix bugs reported by Nelson H. F. Beebe in
2610 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
2611
2612 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
2613 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
2614 Group compiler. Instead, use "$CC -E bar.c". Include the .h
2615 file twice in the grammar, as an extra check.
2616
2617 * tests/input.at (Torturing the Scanner): Surround the
2618 backslash-newline tests with "#if 0", to make it less likely that
2619 we'll run into compiler bugs. Bring back solitary \ inside
2620 comment, but add a closing comment to work around HP C bug. Don't
2621 test backslash-newline in C character constant.
2622
2623 2002-11-14 Akim Demaille <akim@epita.fr>
2624
2625 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
2626 status of the compiler.
2627 Calling `exit 1' is no longer needed.
2628 Reported by Nelson H. F. Beebe.
2629
2630 2002-11-14 Akim Demaille <akim@epita.fr>
2631
2632 * tests/atlocal.in (CPPFLAGS): We have config.h.
2633 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
2634 New.
2635 * tests/actions.at, tests/calc.at, tests/conflicts.at,
2636 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
2637 * tests/regression.at, tests/torture.at: Use them for all the
2638 grammars that are to be compiled.
2639 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
2640 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
2641 * doc/bison.texinfo (GLR Parsers): Document `inline'.
2642
2643 2002-11-14 Akim Demaille <akim@epita.fr>
2644
2645 * doc/bison.texinfo: Various formatting changes (alignments in
2646 samples, additional @group/@end group, GCS in samples.
2647 Use @deffn instead of simple @table to define the directives,
2648 macros, variables etc.
2649
2650 2002-11-13 Paul Eggert <eggert@twinsun.com>
2651
2652 Fix some bugs reported by Albert Chin-A-Young in
2653 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
2654
2655 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
2656 -o c"; the HP C compiler chatters during compilation.
2657 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
2658 * tests/headers.at (export YYLTYPE): Likewise.
2659
2660 * tests/input.at (Torturing the Scanner): Remove lines containing
2661 solitary backslashes, as they tickle a bug in the HP C compiler.
2662
2663 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
2664 comments, since they're not portable. Use GNU coding style.
2665
2666 2002-11-13 Akim Demaille <akim@epita.fr>
2667
2668 * data/yacc.c: Leave bigger chunks of quoted text.
2669 (YYDSYMPRINTF): New.
2670 Use it to report symbol activities.
2671 * data/glr.c (YYDSYMPRINTF): New.
2672 Use it.
2673
2674 2002-11-12 Paul Eggert <eggert@twinsun.com>
2675
2676 Version 1.75b.
2677
2678 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
2679 (yyglrReduce): Return yyok, not 0.
2680 This should avoid the enumerated-type warnings reported
2681 by Nelson H. F. Beebe in
2682 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
2683
2684 * lib/bbitset.h (BITSET_INLINE): Remove.
2685 * lib/bitset.h [! BITSET_INLINE]: Remove.
2686 (bitset_set, bitset_reset, bitset_test): Rename local vars
2687 to avoid shadowing warnings by GCC.
2688
2689 * data/glr.c (inline): Remove #define. It's the user's
2690 responsibility to #define it away, just like 'const'.
2691 This fixes one of the bugs reported by Nelson H. F. Beebe in
2692 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
2693
2694 * Makefile.maint (po-check): Scan .l and .y files instead of the
2695 .c and the .h files that they generate. This fixes the bug
2696 reported by Tim Van Holder in:
2697 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
2698 Look for N_ as well as for _. Try to avoid matching #define for
2699 N_ and _.
2700 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
2701 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
2702 * src/scan-gram.l: Revamp regular expressions so that " and '
2703 do not confuse xgettext.
2704
2705 * src/struniq.h (struniq_new): Do not declare the return type
2706 to be 'const'; this violates the C standard.
2707 * src/struniq.c (struniq_new): Likewise.
2708
2709 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
2710
2711 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
2712 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
2713 linker.
2714
2715 2002-11-12 Akim Demaille <akim@epita.fr>
2716
2717 * Makefile.maint: Sync with Autoconf:
2718 (local_updates): New.
2719
2720 2002-11-12 Akim Demaille <akim@epita.fr>
2721
2722 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
2723
2724 2002-11-12 Akim Demaille <akim@epita.fr>
2725
2726 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
2727 locations.
2728
2729 2002-11-12 Akim Demaille <akim@epita.fr>
2730
2731 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
2732 not yyvalue.
2733
2734 2002-11-12 Akim Demaille <akim@epita.fr>
2735
2736 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
2737 Use it to test the GLR parser.
2738
2739 2002-11-12 Akim Demaille <akim@epita.fr>
2740
2741 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
2742 defines it.
2743 * data/glr.c (yystos): New.
2744 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
2745 (YYDSYMPRINT): New.
2746 (yyval): Don't define it, it is handled via M4.
2747 (yyrecoverParseError): Free verbosely the discarded symbols.
2748 * data/yacc.c (yysymprint): Remove, rather...
2749 (b4_yysymprint_generate): invoke.
2750 * data/c.m4 (b4_yysymprint_generate): New.
2751 Accept pointers as arguments, as opposed to the version from
2752 yacc.c.
2753 (b4_yydestruct_generate): Likewise.
2754 * tests/cations.at (Printers and Destructors): Use Bison directives
2755 instead of CPP macros.
2756 Don't rely on internal details.
2757
2758 2002-11-12 Akim Demaille <akim@epita.fr>
2759
2760 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
2761 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
2762 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
2763 it against YYEMPTY and so forth), work on yytoken (i.e., set
2764 it to YYEMPTY etc.).
2765 (yydestruct): Replace with a b4_yydestruct_generate invocation.
2766 (b4_symbol_actions): Remove.
2767 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
2768 for 0, end-of-input.
2769
2770 2002-11-12 Akim Demaille <akim@epita.fr>
2771
2772 * doc/bison.texinfo (Destructor Decl): New.
2773
2774 2002-11-12 Akim Demaille <akim@epita.fr>
2775
2776 * src/tables.c (tables_generate): Use free for pointers that
2777 cannot be NULL, not XFREE.
2778 (pack_vector): Use assert, not fatal, for bound violations.
2779 * src/state.c (state_new): Likewise.
2780 * src/reader.c (reader): Likewise.
2781 * src/lalr.c (set_goto_map): Likewise.
2782 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
2783 the file name.
2784
2785 2002-11-12 Akim Demaille <akim@epita.fr>
2786
2787 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2788 Restore.
2789 * src/scan-gram.l (last_string): Is global to the file, not to
2790 yylex.
2791 * src/parse-gram.y (input): Don't append the epilogue here,
2792 (epilogue.opt): do it here, and free the scanner's obstack.
2793 * src/reader.c (epilogue_set): Rename as...
2794 (epilogue_augment): this.
2795 * data/c.m4 (b4_epilogue): Defaults to empty.
2796
2797 2002-11-12 Akim Demaille <akim@epita.fr>
2798
2799 * src/getargs.c (long_options): Remove duplicates.
2800 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2801 Remove.
2802 * doc/bison.rnh: Remove.
2803 * doc/bison.texinfo (VMS Invocation): Remove.
2804
2805 2002-11-12 Akim Demaille <akim@epita.fr>
2806
2807 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2808 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2809
2810 Use struniq for symbols.
2811
2812 * src/symtab.h (symbol_t): The tag member is a struniq.
2813 (symbol_type_set): Adjust.
2814 * src/symtab.c (symbol_new): Takes a struniq.
2815 (symbol_free): Don't free the tag member.
2816 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2817 (hash_compare_symbol, hash_symbol): these.
2818 Use the fact that tags as struniqs.
2819 (symbol_get): Use struniq_new.
2820 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2821 Returns a strniq.
2822 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2823 and type members are struniqs.
2824 * src/reader.c (get_merge_function)
2825 (grammar_current_rule_merge_set): Adjust.
2826 (TYPE, current_type): Are struniq.
2827
2828 Use struniq for file names.
2829
2830 * src/files.h, src/files.c (infile): Split into...
2831 (grammar_file, current_file): these.
2832 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2833 * src/reduce.c (reduce_print): Likewise.
2834 * src/getargs.c (getargs): Likewise.
2835 * src/complain.h, src/complain.c: Likewise.
2836 * src/main.c (main): Call struniqs_new early enough to use it for
2837 file names.
2838 Don't free the input file name.
2839
2840 2002-11-12 Akim Demaille <akim@epita.fr>
2841
2842 * src/symtab.c (symbol_free): Remove dead deactivated code:
2843 type_name are properly removed.
2844 Don't use XFREE to free items that cannot be NULL.
2845 * src/struniq.h, src/struniq.c: New.
2846 * src/main.c (main): Initialize/free struniqs.
2847 * src/parse-gram.y (%union): Add astruniq member.
2848 (yyprint): Adjust.
2849 * src/scan-gram.l (<{tag}>): Return a struniq.
2850 Free the obstack bit that used to store it.
2851 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2852
2853 2002-11-11 Paul Eggert <eggert@twinsun.com>
2854
2855 Revamp to fix many (but not all) of the C- and M4-related quoting
2856 problems. Among other things, this fixes the Bison bug reported
2857 by Jan Hubicka when processing the Bash grammar; see:
2858 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
2859
2860 Use new @ escapes consistently. Represent brackets with @{ and @}
2861 rather than @<:@ and @:>@, since this works a bit better with dumb
2862 editors like vi. Represent @ with @@, since @ is now consistently
2863 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2864 __ofile__, to avoid unexpected expansions. Similarly, use @output
2865 rather than #output.
2866
2867 * data/c.m4 (b4_copyright): Omit file name from comment, since
2868 the file name could contain "*/".
2869 (b4_synclines_flag): Don't quote the 2nd argument; it should already
2870 be quoted. All uses changed.
2871
2872 * data/glr.c: Use new @ escapes consistently.
2873 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
2874 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
2875 Remove, since they couldn't handle arbitrary characters in file
2876 names.
2877 * data/lalr1.cc: Likewise.
2878 * data/yacc.c: Likewise.
2879
2880 * src/files.c (output_infix): Remove; all uses removed.
2881 * src/files.h: Likewise.
2882
2883 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
2884 mishandled funny characters in file names, and anyway it isn't
2885 needed any more.
2886 * data/yacc.c: Likewise.
2887 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
2888
2889 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
2890 * data/yacc.c: Likewise.
2891
2892 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
2893 strings now.
2894 (muscle_init): Quote filename as a C string.
2895 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
2896 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
2897 * src/output.c (escaped_file_name_output): New function.
2898 (prepare_symbols): Quote tokens for M4.
2899 (prepare): Don't insert output_infix, output_prefix,
2900 output_parser_name, output_header_name; this is now down by scan-skel.
2901 Insert skeleton as a C string.
2902
2903 * src/output.c (user_actions_output, symbol_destructors_output,
2904 symbol_printers_output): Quote filenames for C and M4.
2905 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2906
2907 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
2908 escapes other than \\ and \'; this simplifies the code.
2909 (<SC_STRING>): Likewise, for \\ and \".
2910 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
2911 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
2912 Use new escapes @{ and @} for [ and ].
2913
2914 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
2915 them with auto vars.
2916 Switch to new escape scheme, where @ is the escape character uniformly.
2917 Abort if a stray escape character is found. Avoid unbounded input
2918 buffer when parsing non-escaped text.
2919
2920 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
2921 __oline__, #output, $@, and @{ do not have unintended meanings.
2922
2923 2002-11-09 Paul Eggert <eggert@twinsun.com>
2924
2925 Fix the test failure due to GCC warnings described in
2926 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
2927 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
2928 evaluate to 0 if it's impossible for NINF to be in the respective
2929 table.
2930 (yygetLRActions, yyrecoverParseError): Use them.
2931
2932 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
2933 counted in the token inserted at end of file. Now takes
2934 location_t *, not location_t, so that the location can be
2935 adjusted. All uses changed.
2936
2937 * tests/regression.at (Invalid inputs): Adjust wording in
2938 diagnostic to match the new behavior.
2939
2940 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
2941 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
2942 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
2943 abort ();'. This reduces the runtime of the "Many lookaheads"
2944 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
2945 GCC 3.2.
2946
2947 2002-11-07 Paul Eggert <eggert@twinsun.com>
2948
2949 * src/parse-gram.y (CHARACTER): Remove unused token.
2950 All uses removed.
2951
2952 * src/scan-gram.l: Remove stack option. We no longer use the
2953 stack, since the stack was never deeper than 1; instead, use the
2954 new auto var c_context to record the stacked value.
2955
2956 Remove nounput option. At an unexpected end of file, we now unput
2957 the minimal input necessary to end cleanly; this simplifies the
2958 code.
2959
2960 Avoid unbounded token sizes where this is easy.
2961
2962 (unexpected_end_of_file): New function.
2963 Use it to systematize the error message on unexpected EOF.
2964 (last-string): Now auto, not static.
2965 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
2966 (scanner_last_string_free): Remove; not used.
2967 (percent_percent_count): Move decl to just before use.
2968 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
2969 not the (never otherwised-used) CHARACTER.
2970
2971 2002-11-07 Akim Demaille <akim@epita.fr>
2972
2973 Let yyerror always receive the msg as last argument, so that
2974 yyerror can be variadic.
2975
2976 * data/yacc.c (b4_yyerror_args): New.
2977 Use it when calling yyerror.
2978 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
2979 Use it when calling yyerror.
2980 * doc/bison.texinfo (Error Reporting): Adjust.
2981 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
2982 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
2983
2984 2002-11-06 Akim Demaille <akim@epita.fr>
2985
2986 #line should have quoted strings.
2987 Ideally, this should be done by m4_quotearg.
2988
2989 * src/scan-skel.l: Include quotearg.h.
2990 Quote __ofile__.
2991 * src/output.c (symbol_printers_output)
2992 (symbol_destructors_output): Quote the file name.
2993
2994 2002-11-06 Akim Demaille <akim@epita.fr>
2995
2996 * tests/regression.at (Invalid inputs): Adjust to the recent
2997 messages.
2998
2999 2002-11-06 Akim Demaille <akim@epita.fr>
3000
3001 Restore --no-lines.
3002 Reported by Jim Kent.
3003
3004 * data/c.m4 (b4_syncline): New.
3005 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
3006 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
3007 * src/output.c (user_actions_output): Likewise.
3008 (prepare): Define 'b4_synclines_flag'.
3009 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
3010
3011 2002-11-06 Akim Demaille <akim@epita.fr>
3012
3013 * src/main.c (main): Free `infile'.
3014 * src/scan-gram.l (handle_syncline): New.
3015 Recognize `#line'.
3016 * src/output.c (user_actions_output, symbol_destructors_output)
3017 (symbol_printers_output): Use the location's file name, not
3018 infile.
3019 * src/reader.c (prologue_augment, epilogue_set): Likewise.
3020
3021 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3022
3023 * src/tables.c (matching_state): Don't allow states to match if
3024 either has GLR conflict entries.
3025
3026 2002-11-05 Paul Eggert <eggert@twinsun.com>
3027
3028 * src/scan-gram.l: Use more accurate diagnostics, e.g.
3029 "integer out of range" rather than "invalid value".
3030 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
3031 accordingly.
3032
3033 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
3034 Also, remove one static variable in the scanner.
3035
3036 * src/scan-gram.l (braces_level): Now auto, not static.
3037 Initialize to zero if the compiler is being picky.
3038 (INITIAL): Clear braces_level instead of incrementing it.
3039 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
3040 as POSIX 1003.1-2001 requires.
3041 * src/system.h (IF_LINT): New macro, taken from coreutils.
3042 * configure.ac: Define "lint" if --enable-gcc-warnings.
3043
3044 2002-11-05 Akim Demaille <akim@epita.fr>
3045
3046 * src/scan-gram.l: When it starts with `%', complain about the
3047 whole directive, not just that `invalid character: %'.
3048
3049 2002-11-04 Akim Demaille <akim@epita.fr>
3050
3051 * Makefile.maint: Update from Autoconf.
3052 (update, cvs-update, po-update, do-po-update): New.
3053
3054 2002-11-04 Akim Demaille <akim@epita.fr>
3055
3056 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
3057 and yyerror.
3058 Have yyerror `use' its arguments.
3059 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
3060 returns true when location & yacc & pure & parse-param.
3061 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
3062
3063 2002-11-04 Akim Demaille <akim@epita.fr>
3064
3065 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
3066 clashes.
3067 * src/scan-gram.l: Use [\'] instead of ['] to pacify
3068 font-lock-mode.
3069 Use complain_at.
3070 Use quote, not quote_n since LOCATION_PRINT no longer uses the
3071 slot 0.
3072
3073 2002-11-03 Paul Eggert <eggert@twinsun.com>
3074
3075 * src/reader.c (get_merge_function, grammar_current_rule_check):
3076 Use consistent diagnostics for reporting type name clashes.
3077 Quote the types with <>, for consistency with Yacc.
3078 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
3079
3080 2002-11-03 Akim Demaille <akim@epita.fr>
3081
3082 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
3083 New.
3084 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
3085 (b4_parse_param): Remove.
3086 Use b4_identification.
3087 Propagate b4_pure_args where needed to pass them to yyerror.
3088 * data/glr.m4 (b4_parse_param): Remove.
3089 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
3090 (b4_lpure_formals): New.
3091 Use b4_identification.
3092 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
3093 b4_user_formals and b4_user_args.
3094 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
3095 (yyreportAmbiguity): When using a pure parser, also need
3096 the location, and the parse-params.
3097 Adjust callers.
3098 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
3099 When using a pure parser, also need the parse-params.
3100 Adjust callers.
3101 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
3102 (%pure-parser + %parse-param) LALR and GLR parsers.
3103 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
3104 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
3105 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
3106 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
3107 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
3108 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
3109 * doc/bison.texinfo: Untabify the whole file.
3110 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
3111 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
3112 (Error Reporting): Adjust to these new directives.
3113 Document %error-verbose, deprecate YYERROR_VERBOSE.
3114
3115 2002-11-03 Akim Demaille <akim@epita.fr>
3116
3117 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
3118 AT_CHECK_CALC_GLR invocations to use % directives, instead of
3119 command line options.
3120 * tests/cxx-type.at: Formatting changes.
3121
3122 2002-11-03 Paul Eggert <eggert@twinsun.com>
3123
3124 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
3125 to count columns correctly, and to check for invalid inputs.
3126
3127 Use mbsnwidth to count columns correctly. Account for tabs, too.
3128 Include mbswidth.h.
3129 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
3130 (extend_location): New function.
3131 (YY_LINES): Remove.
3132
3133 Handle CRLF in C code rather than in Lex code.
3134 (YY_INPUT): New macro.
3135 (no_cr_read): New function.
3136
3137 Scan UCNs, even though we don't fully handle them yet.
3138 (convert_ucn_to_byte): New function.
3139
3140 Handle backslash-newline correctly in C code.
3141 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
3142 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
3143 all uses changed.
3144 (tag, splice): New EREs. Do not allow NUL or newline in tags.
3145 Use {splice} wherever C allows backslash-newline.
3146 YY_STEP after space, newline, vertical-tab.
3147 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
3148
3149 (letter, id): Don't assume ASCII; e.g., spell out a-z.
3150
3151 ({int}, handle_action_dollar, handle_action_at): Check for integer
3152 overflow.
3153
3154 (YY_STEP): Omit trailing semicolon, so that it's more like C.
3155
3156 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
3157 as well as \000. Check for UCHAR_MAX, not 255.
3158 Allow \x with an arbitrary positive number of digits, as in C.
3159 Check for overflow here.
3160 Allow \? and UCNs, for compatibility with C.
3161
3162 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
3163 with quote slot used by complain_at.
3164
3165 * tests/input.at: Add tests for backslash-newline, m4 quotes
3166 in symbols, long literals, and funny escapes in strings.
3167
3168 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
3169 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
3170 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
3171 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
3172 * m4/mbswidth.m4: New file, from GNU coreutils.
3173
3174 * doc/bison.texinfo (Grammar Outline): Document // comments.
3175 (Symbols): Document that trigraphs have no special meaning in Bison,
3176 nor is backslash-newline allowed.
3177 (Actions): Document that trigraphs have no special meaning.
3178
3179 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
3180 no longer used.
3181
3182 2002-11-02 Paul Eggert <eggert@twinsun.com>
3183
3184 * src/reader.c: Don't include quote.h; not needed.
3185 (get_merge_function): Reword warning to be consistent with
3186 type clash diagnostic in grammar_current_rule_check.
3187
3188 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
3189 bug in trigraph handling.
3190
3191 * src/output.c (prepare_symbols): When printing token names,
3192 escape "[" as "@<:@" and likewise for "]".
3193
3194 * src/system.h (errno): Remove declaration, as we are now
3195 assuming C89 or better, and C89 guarantees errno.
3196
3197 2002-10-30 Paul Eggert <eggert@twinsun.com>
3198
3199 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
3200 Check for close failures.
3201 * src/files.h (xfclose): Return void, not int, since it always
3202 returned zero.
3203 * src/files.c (xfclose): Likewise. Report I/O error if ferror
3204 indicates one.
3205 * src/output.c (output_skeleton): Use xfclose rather than fclose
3206 and ferror. xfclose now checks ferror.
3207
3208 * data/glr.c (YYLEFTMOST_STATE): Remove.
3209 (yyreportTree): Use a stack-based leftmost state. This avoids
3210 our continuing battles with bogus warnings about initializers.
3211
3212 2002-10-30 Akim Demaille <akim@epita.fr>
3213
3214 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
3215 #if.
3216
3217 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3218
3219 * tests/glr-regr1.at: New test for reported regressions.
3220 * tests/testsuite.at: Add glr-regr1.at test.
3221 * tests/Makefile.am: Add glr-regr1.at test.
3222
3223 2002-10-24 Paul Eggert <eggert@twinsun.com>
3224
3225 Version 1.75a.
3226
3227 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
3228 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
3229 we use malloc. Don't assume 'A' through 'Z' are contiguous.
3230 Don't assume strdup exists; POSIX says its an XSI extension.
3231 Check for buffer overflow on input.
3232
3233 2002-10-24 Akim Demaille <akim@epita.fr>
3234
3235 * src/output.c (output_skeleton): Don't disable M4sugar comments
3236 too soon: it results in comments being expanded.
3237 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
3238 first output.
3239
3240 2002-10-24 Akim Demaille <akim@epita.fr>
3241
3242 * data/yacc.c (m4_int_type): New.
3243 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
3244 char' as only yacc.c wants K&R portability.
3245 * data/glr.c (yysigned_char): Remove.
3246 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
3247 Reported by Quoc Peyrot.
3248
3249 2002-10-23 Paul Eggert <eggert@twinsun.com>
3250
3251 * src/main.c (main): With --trace=time, report times even if a
3252 non-fatal error occurs. Formerly, the times were reported in some
3253 such cases but not in others.
3254 * src/reader.c (reader): Just return if a complaint has been issued,
3255 instead of exiting, so that 'main' can report times.
3256
3257 2002-10-22 Akim Demaille <akim@epita.fr>
3258
3259 * src/system.h: Include sys/types.
3260 Reported by Bert Deknuydt.
3261
3262 2002-10-23 Paul Eggert <eggert@twinsun.com>
3263
3264 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
3265 Suggested by Art Haas.
3266
3267 2002-10-22 Paul Eggert <eggert@twinsun.com>
3268
3269 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
3270 decl; not needed any more.
3271 * src/main.c (main): Use return to exit, undoing yesterday's change.
3272 The last OS that we could find where this wouldn't work is
3273 SunOS 3.5, and that's too old to worry about now.
3274
3275 * data/glr.c (struct yyltype): Define members even when not
3276 doing locations. This is more consistent with yacc.c, and it
3277 works around the following bug reports:
3278 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
3279 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
3280
3281 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
3282 @acronym consistently. Standardize on "Yacc" instead of "YACC",
3283 "Algol" instead of "ALGOL". Give a bit more history about BNF.
3284
3285 2002-10-22 Akim Demaille <akim@epita.fr>
3286
3287 * data/README: New.
3288
3289 2002-10-21 Paul Eggert <eggert@twinsun.com>
3290
3291 Be consistent about 'bool'; the old code used an enum in one
3292 module and an int in another, and this violates the C standard.
3293 * m4/stdbool.m4: New file, from coreutils 4.5.3.
3294 * configure.ac (AC_HEADER_STDBOOL): Add.
3295 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
3296 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
3297 * src/symtab.c (hash_compare_symbol_t): Likewise.
3298 * src/system.h (bool, false, true): Use a definition consistent
3299 with ../lib/hash.c. All uses changed.
3300
3301 * src/complain.c (warning_issued): Renamed from warn_message_count,
3302 so that we needn't worry about integer overflow (!).
3303 Now of type bool. All uses changed.
3304 (complaint_issued): Renamed from complain_message_count; likewise.
3305
3306 * src/main.c (main): Use exit to exit with failure.
3307
3308 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
3309 rather than 1 and 0.
3310 * src/main.c (main): Likewise.
3311 * src/getargs.c (getargs): Likewise.
3312 * src/reader.c (reader): Likewise.
3313
3314 * src/getarg.c (getargs): Remove duplicate code for
3315 "Try `bison --help'".
3316
3317 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
3318 What was that "2" for?
3319
3320 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
3321 * src/getargs.c (usage): Likewise.
3322
3323 * src/getargs.c (getargs): When there are too few operands, report
3324 the last one. When there are too many, report the first extra
3325 one. This is how diffutils does it.
3326
3327 2002-10-20 Paul Eggert <eggert@twinsun.com>
3328
3329 Remove K&R vestiges.
3330 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
3331 * src/complain.c (VA_START): Remove. Assume prototypes.
3332 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
3333 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
3334 fatal): Assume prototypes.
3335 * src/complain.h: Assume prototypes.
3336 * src/system.h (PARAMS): Remove.
3337 Include <limits.h> unconditionally, since it's guaranteeed even
3338 for a freestanding C89 compiler.
3339 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
3340 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
3341
3342 2002-10-20 Akim Demaille <akim@epita.fr>
3343
3344 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
3345 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
3346 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
3347 (yyresolveStates, yyresolveAction, yyresolveStack)
3348 (yyprocessOneStack): Use them.
3349 (yy_reduce_print): New.
3350 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
3351
3352 2002-10-20 Akim Demaille <akim@epita.fr>
3353
3354 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
3355 arguments and output `void'.
3356 (b4_c_function): Rename as...
3357 (b4_c_function_def): this.
3358 (b4_c_function_decl, b4_c_ansi_function_def)
3359 (b4_c_ansi_function_decl): New.
3360 Change the interpretation of the arguments: before `int, foo', now
3361 `int foo, foo'.
3362 * data/yacc.c (yyparse): Prototype and define thanks to these.
3363 Adjust b4_c_function_def uses.
3364 * data/glr.c (yyparse): Likewise, but ANSI only.
3365
3366 2002-10-20 Akim Demaille <akim@epita.fr>
3367
3368 * src/output.c (prepare): Move the definition of `tokens_number',
3369 `nterms_number', `undef_token_number', `user_token_number_max'
3370 to...
3371 (prepare_tokens): Here.
3372 (prepare_tokens): Rename as...
3373 (prepare_symbols): this.
3374 (prepare): Move the definition of `rules_number' to...
3375 (prepare_rules): here.
3376 (prepare): Move the definition of `last', `final_state_number',
3377 `states_number' to...
3378 (prepare_states): here.
3379 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
3380
3381 2002-10-20 Akim Demaille <akim@epita.fr>
3382
3383 * src/tables.h, src/tables.c, src/output.c: Comment changes.
3384
3385 2002-10-20 Akim Demaille <akim@epita.fr>
3386
3387 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
3388 * data/c.m4: here.
3389
3390 2002-10-20 Akim Demaille <akim@epita.fr>
3391
3392 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
3393 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
3394 `pair'.
3395 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
3396 `name' to...
3397 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
3398 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
3399 These.
3400
3401 2002-10-19 Paul Eggert <eggert@twinsun.com>
3402
3403 Do not create a temporary file, as that involves security and
3404 cleanup headaches. Instead, use a pair of pipes.
3405 Derived from a suggestion by Florian Krohm.
3406 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
3407 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
3408 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
3409 (BISON_PREREQ_SUBPIPE): Add.
3410 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
3411 Add subpipe.h, subpipe.c.
3412 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
3413 * po/POTFILES.in: Add lib/subpipe.c.
3414 * src/output.c: Include "subpipe.h".
3415 (m4_invoke): Remove decl.
3416 (scan_skel): New decl.
3417 (output_skeleton): Use pipe rather than temporary file for m4 input.
3418 Check that m4sugar.m4 is readable, to avoid deadlock.
3419 Check for pipe I/O error.
3420 * src/scan-skel.l (readpipe): Remove decl.
3421 (scan_skel): New function, to be used in place of m4_invoke.
3422 Read from stream rather than file.
3423
3424 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
3425 float, as this generates a warning on Solaris 8 + GCC 3.2 with
3426 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
3427 this generates a more-accurate value anyway.
3428
3429 * lib/timevar.c (timervar_accumulate): Rename locals to
3430 avoid confusion with similarly-named more-global.
3431 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
3432
3433 * src/output.c (prepare): Use xstrdup to convert char const *
3434 to char *, to avoid GCC warning.
3435
3436 2002-10-19 Akim Demaille <akim@epita.fr>
3437
3438 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
3439 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
3440 Use them to have `calc.y' ready for %pure-parser.
3441 * data/yacc.c (YYLEX): Pass a yylex return type to
3442 b4_c_function_call.
3443
3444 2002-10-19 Akim Demaille <akim@epita.fr>
3445
3446 Prototype support of %lex-param and %parse-param.
3447
3448 * src/parse-gram.y: Add the definition of the %lex-param and
3449 %parse-param tokens, plus their rules.
3450 Drop the `_' version of %glr-parser.
3451 Add the "," token.
3452 * src/scan-gram.l (INITIAL): Scan them.
3453 * src/muscle_tab.c: Comment changes.
3454 (muscle_insert, muscle_find): Rename `pair' as `probe'.
3455 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
3456 (muscle_entry_s): The `value' member is no longer const.
3457 Adjust all dependencies.
3458 * src/muscle_tab.c (muscle_init): Adjust: use
3459 MUSCLE_INSERT_STRING.
3460 Initialize the obstack earlier.
3461 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
3462 (muscle_pair_list_grow): New.
3463 * data/c.m4 (b4_c_function_call, b4_c_args): New.
3464 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
3465 * tests/calc.at: Use %locations, not --locations.
3466 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
3467
3468 2002-10-19 Akim Demaille <akim@epita.fr>
3469
3470 * src/getargs.c (usage): Take status as argument and exit
3471 accordingly.
3472 Report the traditional `Try ... --help' message when status != 0.
3473 (usage, version): Don't take a FILE * as arg, it is pointless.
3474 (getargs): When there is an incorrect number of arguments, make it
3475 an error, and report it GNUlically thanks to `usage ()'.
3476
3477 2002-10-18 Paul Eggert <eggert@twinsun.com>
3478
3479 * data/glr.c (yyreportParseError): Don't assume that sprintf
3480 yields the length of the printed string, as this is not true
3481 on SunOS 4.1.4. Reported by Peter Klein.
3482
3483 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
3484 * tests/conflicts.at (%nonassoc and eof): Likewise.
3485 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
3486
3487 2002-10-17 Akim Demaille <akim@epita.fr>
3488
3489 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
3490 * src/getargs.c (trace_types, trace_args): Adjust.
3491 * src/reader.c (grammar_current_rule_prec_set)
3492 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
3493 Standardize error messages.
3494 And s/@prec/%prec/!
3495 (reader): Use trace_flag to enable scanner/parser debugging,
3496 instead of an adhoc scheme.
3497 * src/scan-gram.l: Remove trailing debugging code.
3498
3499 2002-10-16 Paul Eggert <eggert@twinsun.com>
3500
3501 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
3502 MUSCLE_TAB_H.
3503
3504 * NEWS: Officially drop support for building Bison with K&R C,
3505 since it didn't work anyway and it's not worth worrying about.
3506 * Makefile.maint (wget_files): Remove ansi2knr.c.
3507 (ansi2knr.c-url_prefix): Remove.
3508 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
3509 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3510 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3511
3512 2002-10-15 Paul Eggert <eggert@twinsun.com>
3513
3514 Stop using the "enum_" trick for K&R-style function definitions;
3515 it confused me, and I was the author! Instead, assume that people
3516 who want to use K&R C compilers (when using these modules in GCC,
3517 perhaps?) will run ansi2knr.
3518
3519 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
3520 All uses of "enum_" changed to "enum ".
3521 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3522 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3523
3524 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
3525 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
3526 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
3527 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
3528 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
3529 abitset_not, abitset_ones, abitset_or, abitset_or_and,
3530 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
3531 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
3532 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
3533 Use function prototypes; this removes the need for declaring
3534 static functions simply to provide their prototypes.
3535 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
3536 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
3537 bitset_count_, bitset_create, bitset_dump, bitset_first,
3538 bitset_free, bitset_init, bitset_last, bitset_next,
3539 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
3540 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
3541 bitset_print, bitset_release_memory, bitset_toggle_,
3542 bitset_type_choose, bitset_type_get, bitset_type_name_get,
3543 debug_bitset): Likewise.
3544 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
3545 * lib/bitset_stats.c (bitset_log_histogram_print,
3546 bitset_percent_histogram_print, bitset_stats_and,
3547 bitset_stats_and_cmp, bitset_stats_and_or,
3548 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
3549 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
3550 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
3551 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
3552 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
3553 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
3554 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
3555 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
3556 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
3557 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
3558 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
3559 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
3560 bitset_stats_zero): Likewise.
3561 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3562 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3563 bitsetv_dump, debug_bitsetv): Likewise.
3564 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
3565 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
3566 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
3567 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
3568 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
3569 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
3570 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
3571 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
3572 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
3573 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
3574 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
3575 Likewise.
3576 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
3577 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
3578 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
3579 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
3580 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
3581 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
3582 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
3583 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
3584 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
3585 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
3586 lbitset_xor_cmp, lbitset_zero): Likewise.
3587
3588 2002-10-14 Akim Demaille <akim@epita.fr>
3589
3590 Version 1.75.
3591
3592 2002-10-14 Akim Demaille <akim@epita.fr>
3593
3594 * tests/Makefile.am (maintainer-check-posix): New.
3595
3596 2002-10-14 Akim Demaille <akim@epita.fr>
3597
3598 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
3599 member.
3600
3601 2002-10-14 Akim Demaille <akim@epita.fr>
3602
3603 * src/tables.c (table_ninf_remap): base -> tab.
3604 Reported by Matt Rosing.
3605
3606 2002-10-14 Paul Eggert <eggert@twinsun.com>
3607
3608 * tests/action.at, tests/calc.at, tests/conflicts.at,
3609 tests/cxx-type.at, tests/headers.at, tests/input.at,
3610 tests/regression.at, tests/synclines.at, tests/torture.at:
3611 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
3612 so that the tests still work even if POSIXLY_CORRECT is set.
3613 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
3614
3615 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
3616 for portability to K&R hosts. Fix typo: signed char is guaranteed
3617 only to 127, not to 128.
3618 * data/glr.c (yysigned_char): New type.
3619 * data/yacc.c (yysigned_char): Likewise.
3620 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
3621
3622 2002-10-13 Paul Eggert <eggert@twinsun.com>
3623
3624 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
3625 true due to limited range of data type" warning from GCC.
3626
3627 * data/c.m4 (b4_token_defines): Protect against double-inclusion
3628 by wrapping enum yytokentype's definition inside #ifndef
3629 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
3630
3631 2002-10-13 Akim Demaille <akim@epita.fr>
3632
3633 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
3634 Un yy- yyrhs to avoid the name clash with the global YYRHS.
3635
3636 2002-10-13 Akim Demaille <akim@epita.fr>
3637
3638 * Makefile.maint: Update from Autoconf 2.54.
3639 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
3640
3641 2002-10-13 Akim Demaille <akim@epita.fr>
3642
3643 * src/print.c (print_state): Separate the list of solved conflicts
3644 from the other items.
3645 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
3646
3647 2002-10-13 Akim Demaille <akim@epita.fr>
3648
3649 Let nondeterministic skeletons be usable with deterministic
3650 tables.
3651
3652 With the patch, GAWK compiled by GCC without -O2 passes its test
3653 suite using a GLR parser driven by LALR tables. It fails with -O2
3654 because `struct stat' gives two different answers on my machine:
3655 88 (definition of an auto var) and later 96 (memset on this var).
3656 Hence the stack is badly corrumpted. The headers inclusion is to
3657 blame: if I move the awk.h inclusion before GLR's system header
3658 inclusion, the two struct stat have the same size.
3659
3660 * src/tables.c (pack_table): Always create conflict_table.
3661 (token_actions): Always create conflict_list.
3662 * data/glr.c (YYFLAG): Remove, unused.
3663
3664 2002-10-13 Akim Demaille <akim@epita.fr>
3665
3666 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
3667 (O0FLAGS): New.
3668 (VALGRIND, GXX): New.
3669 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
3670 * tests/bison.in: Run $PREBISON a pre-command.
3671 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
3672 (maintainer-check-g++): New.
3673 * Makefile.am (maintainer-check): New.
3674
3675 2002-10-13 Akim Demaille <akim@epita.fr>
3676
3677 * data/glr.c: Formatting changes.
3678 Tweak some trace messages to match yacc.c's.
3679
3680 2002-10-13 Akim Demaille <akim@epita.fr>
3681
3682 GLR parsers sometimes raise parse errors instead of performing the
3683 default reduction.
3684 Reported by Charles-Henry de Boysson.
3685
3686 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
3687 check the length of the traces when %glr.
3688 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
3689 GLR's traces.
3690 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
3691 Test GLR parsers.
3692 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
3693 (yyltype): Remove the yy prefix from the member names.
3694 (yytable): Complete its comment.
3695 (yygetLRActions): Map error action number from YYTABLE from
3696 YYTABLE_NINF to 0.
3697 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
3698 (which was a bug: it should have been YYTABEL_NINF, and yet it was
3699 not satisfying as we could compare an YYACTION computed from
3700 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
3701 only value for error actions.
3702 (yyreportParseError): In verbose parse error messages, don't issue
3703 `error' in the list of expected tokens.
3704 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
3705 next action to perform to match glr.c's decoding.
3706 (yytable): Complete its comment.
3707
3708 2002-10-13 Paul Eggert <eggert@twinsun.com>
3709
3710 Fix problem reported by Henrik Grubbstroem in
3711 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
3712 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
3713 because the Bison parser reads the second action before reducing
3714 the first one.
3715 * src/scan-gram.l (rule_length): New static var.
3716 Use it to keep track of the rule length in the scanner, since
3717 we can't expect the parser to be in lock-step sync with the scanner.
3718 (handle_action_dollar, handle_action_at): Use this var.
3719 * tests/actions.at (Exotic Dollars): Test for the problem.
3720
3721 2002-10-12 Paul Eggert <eggert@twinsun.com>
3722
3723 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
3724 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
3725 Include <sys/time.h> when checking for clock_t and struct tms.
3726 Use same include order as source.
3727 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
3728 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
3729
3730 * lib/timevar.c: Update copyright date and clarify comments.
3731 (get_time) [IN_GCC]: Keep the GCC version for reference.
3732
3733 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
3734 GCC version as of today, then merge Bison's changes.
3735 Change "GCC" to "Bison" in copyright notice. timevar.def's
3736 author is Akim, so change that too.
3737
3738 * src/reader.c (grammar_current_rule_check):
3739 Don't worry about the default action if $$ is untyped.
3740 Prevents bogus warnings reported by Jim Gifford in
3741 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
3742
3743 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
3744 * data/glr.c, data/lalr1.cc, data/yacc.c:
3745 Output token definitions before the first part of user declarations.
3746 Fixes compatibility problem reported by Jim Gifford for kbd in
3747 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
3748
3749 2002-10-11 Paul Eggert <eggert@twinsun.com>
3750
3751 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
3752 (yyparse): here. This undoes some of the 2002-07-25 change.
3753 Compatibility problem reported by Ralf S. Engelschall with
3754 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
3755
3756 2002-10-11 Akim Demaille <akim@epita.fr>
3757
3758 * tests/regression.at Characters Escapes): New.
3759 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
3760 characters.
3761 Reported by Jan Nieuwenhuizen.
3762
3763 2002-10-11 Akim Demaille <akim@epita.fr>
3764
3765 * po/id.po: New.
3766
3767 2002-10-10 Paul Eggert <eggert@twinsun.com>
3768
3769 Portability fixes for bitsets; this also avoids several GCC
3770 warnings.
3771
3772 * lib/abitset.c: Include <stddef.h>, for offsetof.
3773 * lib/lbitset.c: Likewise.
3774
3775 * lib/abitset.c (abitset_bytes): Return a size that is aligned
3776 properly for vectors of objects. Do not assume that adding a
3777 header size to a multiple of a word size yields a value that is
3778 properly aligned for the whole union.
3779 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3780
3781 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3782 unique names for structures.
3783 * lib/ebitset.c (ebitset_bytes): Likewise.
3784 * lib/lbitset.c (lbitset_bytes): Likewise.
3785
3786 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3787 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3788 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3789 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3790 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3791 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3792 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3793 to improve the type-checking that GCC can do.
3794 * lib/bitset.c (bitset_op4_cmp): Likewise.
3795 * lib/bitset_stats.c (bitset_stats_count,
3796 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3797 bitset_stats_copy, bitset_stats_disjoint_p,
3798 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3799 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3800 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3801 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3802 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3803 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3804 bitset_stats_or_and_cmp): Likewise.
3805 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3806 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3807 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3808 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3809
3810 * lib/abitset.h: Include bitset.h, not bbitset.h.
3811 * lib/ebitset.h: Likewise.
3812 * lib/lbitset.h: Likewise.
3813
3814 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3815 All instances of parameters of type enum bitset_opts are now of
3816 type enum_bitset_opts, to conform to the C Standard, and similarly
3817 for enum_bitset_type.
3818 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3819 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3820
3821 Do not use "struct bitset_struct" to mean different things in
3822 different modules. Not only is this confusing, it violates
3823 the C Standard, which requires that structure types in different
3824 modules must be compatible if one is to be passed to the other.
3825 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3826 All instances of "struct bitset_struct *" replaced with "bitset".
3827 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3828 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3829 struct lbitset_struct, struct bitset_stats_struct): New types.
3830 All uses of struct bitset_struct changed to union bitset_union,
3831 etc.
3832 * lib/abitset.c (struct abitset_struct, abitset,
3833 struct bitset_struct): Remove.
3834 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3835 struct bitset_struct): Remove.
3836 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3837 bitset_struct): Remove.
3838 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3839 Likewise.
3840
3841 Do not call a function of type T using a call that assumes the
3842 function is of a different type U. Standard C requires that a
3843 function must be called with a type that is compatible with its
3844 definition.
3845 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3846 New decls.
3847 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3848 New functions.
3849 * lib/ebitset.c (PFV): Remove.
3850 * lib/lbitset.c (PFV): Likewise.
3851 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3852 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3853 decls.
3854 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3855 (ebitset_vtable): Use them.
3856 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3857 lbitset_xor): New functions.
3858 (lbitset_vtable): Use them.
3859
3860 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3861 Declare.
3862
3863 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3864 GCC warning.
3865 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
3866 Use offsetof, for simplicity.
3867
3868 2002-10-06 Paul Eggert <eggert@twinsun.com>
3869
3870 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
3871 the same width as int. This reapplies a hunk of the 2002-08-12 patch
3872 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
3873 which was inadvertently undone by the 2002-09-30 patch.
3874 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
3875 the same width as int.
3876
3877 2002-10-04 Paul Eggert <eggert@twinsun.com>
3878
3879 Version 1.50.
3880
3881 * configure.ac (AC_INIT), NEWS: Increment version number.
3882
3883 * doc/bison.texinfo: Minor spelling, grammar, and white space
3884 fixes.
3885 (Symbols): Mention that any negative value returned from yylex
3886 signifies end-of-input. Warn about negative chars. Mention
3887 the portable Standard C character set.
3888
3889 The GNU coding standard says CFLAGS and YFLAGS are reserved
3890 for the installer to set.
3891 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
3892 * src/Makefile.am (AM_CFLAGS): Likewise.
3893 (AM_YFLAGS): Renamed from YFLAGS.
3894
3895 Fix some MAX and MIN problems.
3896 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
3897 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
3898 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
3899 * src/reader.c (reader): Use it.
3900
3901 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
3902 POSIX 1003.1-2001 has removed fgrep.
3903
3904 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3905
3906 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
3907 interpreted as signed.
3908 * lib/ebitset.c (ebitset_list): Fix bug.
3909
3910 2002-10-01 Paul Eggert <eggert@twinsun.com>
3911
3912 More fixes for 64-bit hosts and large bitsets.
3913
3914 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
3915 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
3916 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
3917 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
3918 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
3919 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
3920 bitset_count_): Likewise.
3921 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
3922 bitset_first, bitset_last): Likewise.
3923 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
3924 bitset_stats_list_reverse, bitset_stats_size,
3925 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
3926 Likewise.
3927 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3928 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3929 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3930 bitsetv_reflexive_transitive_closure): Likewise.
3931 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
3932 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
3933 Likewise.
3934 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
3935 Likewise.
3936
3937 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
3938 Use size_t, not unsigned int, to count bytes.
3939 * lib/abitset.h (abitset_bytes): Likewise.
3940 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
3941 Likewise.
3942 * lib/bitset.h (bitset_bytes): Likewise.
3943 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
3944 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
3945 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3946 * lib/ebitset.c (ebitset_bytes): Likewise.
3947 * lib/ebitset.h (ebitset_bytes): Likewise.
3948 * lib/lbitset.c (lbitset_bytes): Likewise.
3949 * lib/lbitset.h (lbitset_bytes): Likewise.
3950
3951 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
3952 abitset_subset_p, abitset_disjoint_p, abitset_and,
3953 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
3954 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
3955 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
3956 abitset_or_and, abitset_or_and_cmp):
3957 Use bitset_windex instead of unsigned int.
3958 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3959 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
3960 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
3961 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
3962 Likewise.
3963 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
3964
3965 * lib/bitset.c (bitset_print):
3966 Use proper printf formats for widths of integer types.
3967 * lib/bitset_stats.c (bitset_percent_histogram_print,
3968 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
3969 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3970 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3971 * lib/lbitset.c (lbitset_bytes): Likewise.
3972
3973 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
3974 BITSET_SIZE_MAX): New macros.
3975 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
3976 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
3977 to BITSET_WINDEX_MAX.
3978
3979 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
3980 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
3981 since we now return the bitset_bindex type (not int).
3982
3983 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
3984 when computing sizes.
3985 * lib/ebitset.c (ebitset_elts_grow): Likewise.
3986
3987 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
3988 and avoid cast to unsigned.
3989
3990 2002-09-30 Akim Demaille <akim@epita.fr>
3991
3992 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3993 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
3994 Updates from Michael Hayes.
3995
3996 2002-09-30 Art Haas <ahaas@neosoft.com>
3997
3998 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
3999 invocations.
4000 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
4001 defined.
4002
4003 2002-09-27 Akim Demaille <akim@epita.fr>
4004
4005 Version 1.49c.
4006
4007 2002-09-27 Akim Demaille <akim@epita.fr>
4008
4009 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
4010 (Because of AC_LIBSOURCE).
4011
4012 2002-09-27 Akim Demaille <akim@epita.fr>
4013
4014 Playing with Autoscan.
4015
4016 * configure.ac: Remove the old LIBOBJ tweaks.
4017 (AC_REPLACE_FUNCS): Add strrchr and strtol.
4018 * lib/strrchr.c: New.
4019 * lib/strtol.c: New, from the Coreutils 4.5.1.
4020
4021 2002-09-27 Akim Demaille <akim@epita.fr>
4022
4023 Playing with Autoscan.
4024
4025 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
4026 * lib/Makefile.am (libbison_a_SOURCES): No longer include
4027 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
4028 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
4029 Coreutils 4.5.1.
4030
4031 2002-09-24 Akim Demaille <akim@epita.fr>
4032
4033 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
4034 (Frequently Asked Questions, Parser Stack Overflow): New.
4035
4036 2002-09-13 Akim Demaille <akim@epita.fr>
4037
4038 Playing with autoscan.
4039
4040 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
4041 * src/files.c (skeleton_find): Remove, unused.
4042 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
4043 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
4044
4045 2002-09-13 Akim Demaille <akim@epita.fr>
4046
4047 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
4048 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
4049
4050 2002-09-13 Akim Demaille <akim@epita.fr>
4051
4052 * configure.ac: Require 2.54.
4053 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
4054 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
4055 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
4056 Remove, provided by Autoconf macros.
4057
4058 2002-09-12 Akim Demaille <akim@epita.fr>
4059
4060 * m4/prereq.m4: Update, from Coreutils 4.5.1.
4061
4062 2002-09-12 Akim Demaille <akim@epita.fr>
4063
4064 * m4/prereq.m4: Update, from Fileutils 4.1.5.
4065 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
4066 Reported by Martin Mokrejs.
4067
4068 2002-09-10 Akim Demaille <akim@epita.fr>
4069
4070 * src/parse-gram.y: Associate a human readable string to each
4071 token type.
4072 * tests/regression.at (Invalid inputs): Adjust.
4073
4074 2002-09-10 Gary V. Vaughan <gary@gnu.org>
4075
4076 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
4077 with an Autoconf-2.5x style configure.ac.
4078
4079 2002-09-06 Paul Eggert <eggert@twinsun.com>
4080
4081 * doc/bison.texinfo (Conditions): Make explicit that the GPL
4082 exception applies only to yacc.c. This is a modification of a
4083 patch originally suggested by Akim Demaille.
4084
4085 2002-09-06 Akim Demaille <akim@epita.fr>
4086
4087 * data/c.m4 (b4_copyright): Move the GPL exception comment from
4088 here to...
4089 * data/yacc.c: here.
4090
4091 * data/lalr1.cc (struct yyltype): Don't define it, since we use
4092 LocationType.
4093 (b4_ltype): Default to yy::Location from location.hh.
4094
4095 2002-09-04 Jim Meyering <jim@meyering.net>
4096
4097 * data/yacc.c: Guard the declaration of yytoknum also with
4098 `#ifdef YYPRINT', so it is declared only when used.
4099
4100 2002-09-04 Akim Demaille <akim@epita.fr>
4101
4102 * configure.in: Rename as...
4103 * configure.ac: this.
4104 Bump to 1.49c.
4105
4106 2002-09-04 Akim Demaille <akim@epita.fr>
4107
4108 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
4109 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
4110 translate maintainer only messages.
4111
4112 2002-08-12 Paul Eggert <eggert@twinsun.com>
4113
4114 Version 1.49b.
4115
4116 * Makefile.am (SUBDIRS): Remove intl.
4117 (DISTCLEANFILES): Remove.
4118 * NEWS: Mention that GNU M4 is now required. Clarify what is
4119 meant by "larger grammars". Mention the pt_BR translation.
4120 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
4121 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
4122 Bump version from 0.11.2 to 0.11.5.
4123 (BISON_PREREQ_STAGE): Remove.
4124 (AM_GNU_GETTEXT): Use external gettext.
4125 (AC_OUTPUT): Remove intl/Makefile.
4126
4127 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
4128
4129 * data/glr.c: Include string.h, for strlen.
4130 (yyreportParseError): Use size_t for yysize.
4131 (yy_yypstack): No longer nested inside yypstates, as nested
4132 functions are not portable. Do not assume size_t is the
4133 same width as int.
4134 (yypstates): Do not assume that ptrdiff_t is the same width
4135 as int, and similarly for yyposn and YYINDEX.
4136
4137 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
4138
4139 * lib/Makefile.am (INCLUDES): Do not include from the intl
4140 directory, which has been removed.
4141 * src/Makefile.am (INCLUDES): Likewise.
4142
4143 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
4144 (bitsets_sources, additional_bitsets_sources, timevars_sources):
4145 New vars.
4146
4147 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
4148 * tests/Makefile.am (EXTRA_DIST): Likewise.
4149
4150 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
4151 Do not assume that bitset_windex is the same width as unsigned.
4152
4153 * lib/abitset.c (abitset_unused_clear): Do not assume that
4154 bitset_word is the same width as int.
4155 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
4156 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
4157 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
4158 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
4159 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
4160
4161 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
4162 portability to one's complement hosts!).
4163 * lib/ebitset.c (ebitset_op1): Likewise.
4164 * lib/lbitset.c (lbitset_op1): Likewise.
4165
4166 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
4167 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4168 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
4169 Sync with fileutils.
4170 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
4171 lib/gettext.h: Sync with diffutils.
4172
4173 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
4174 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
4175
4176 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
4177 PROTOTYPES to check for prototypes, and "defined __STDC__" to
4178 check for void *.
4179
4180 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
4181 size_t; the old version tried to do this but casted improperly.
4182 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
4183 (bitset_test): Now returns int, not unsigned long.
4184
4185 * lib/bitset_stats.c: Include "gettext.h".
4186 (_): New macro.
4187 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
4188 name locals "index", as it generates unnecessary warnings on some
4189 hosts that have an "index" function.
4190
4191 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
4192 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
4193 they need translation.
4194 * src/LR0.c (state_list_append, new_itemsets, get_state,
4195 append_states, generate_states): Likewise.
4196 * src/assoc.c (assoc_to_string): Likewise.
4197 * src/closure.c (print_closure, set_firsts, closure): Likewise.
4198 * src/gram.c (grammar_dump): Likewise.
4199 * src/injections.c (injections_compute): Likewise.
4200 * src/lalr.c (lookaheads_print): Likewise.
4201 * src/relation.c (relation_transpose): Likewise.
4202 * src/scan-gram.l: Likewise.
4203 * src/tables.c (table_grow, pack_vector): Likewise.
4204
4205 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
4206 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
4207 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
4208 * m4/mbstate_t.m4: Sync with fileutils.
4209 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
4210
4211 * po/LINGUAS: Add pt_BR.
4212 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
4213 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
4214 lib/timevar.c.
4215 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
4216 manual recommends.
4217 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
4218
4219 * src/complain.c (strerror_r): Remove decl; not needed.
4220 (strerror): Use same pattern as ../lib/error.c.
4221
4222 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
4223
4224 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
4225
4226 * src/main.c (main): Cast result of bindtextdomain and textdomain
4227 to void, to avoid a GCC warning when --disable-nls is in effect.
4228
4229 * src/scan-gram.l: Use strings rather than escapes when possible,
4230 to minimize the number of warnings from xgettext.
4231 (handle_action_dollar, handle_action_at): Don't use isdigit,
4232 as it mishandles negative chars and it may not work as expected
4233 outside the C locale.
4234
4235 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
4236 this is a GCC extension and is not portable to other compilers.
4237
4238 * src/system.h (alloca): Use same pattern as ../lib/error.c.
4239 Do not include <ctype.h>; no longer needed.
4240 Do not include <malloc.h>; no longer needed (and generates
4241 warnings on OpenBSD 3.0).
4242
4243 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
4244 it's not portable.
4245
4246 * tests/regression.at: Do not use 'cc -c input.c -o input';
4247 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
4248
4249 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
4250 exit status as failure, not just exit status 1. Sun C exits
4251 with status 2 sometimes.
4252
4253 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
4254 Use it for the two large tests.
4255
4256 2002-08-02 Akim Demaille <akim@epita.fr>
4257
4258 * src/conflicts.c (conflicts_output): Don't output rules never
4259 reduced here, since anyway that computation doesn't work.
4260 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
4261 (rule_useless_p, rule_never_reduced_p): New.
4262 (grammar_rules_partial_print): Use a filter instead of a range.
4263 Display the title only if needed.
4264 (grammar_rules_print): Adjust.
4265 (grammar_rules_never_reduced_report): New.
4266 * src/tables.c (action_row): Move the computation of rules never
4267 reduced to...
4268 (token_actions): here.
4269 * src/main.c (main): Make the parser before making the report, so
4270 that rules never reduced are computed.
4271 Call grammar_rules_never_reduced_report.
4272 * src/print.c (print_results): Report rules never reduced.
4273 * tests/conflicts.at, tests/reduce.at: Adjust.
4274
4275 2002-08-01 Akim Demaille <akim@epita.fr>
4276
4277 Instead of attaching lookaheads and duplicating the rules being
4278 reduced by a state, attach the lookaheads to the reductions.
4279
4280 * src/state.h (state_t): Remove the `lookaheads',
4281 `lookaheads_rule' member.
4282 (reductions_t): Add a `lookaheads' member.
4283 Use a regular array for the `rules'.
4284 * src/state.c (reductions_new): Initialize the lookaheads member
4285 to 0.
4286 (state_rule_lookaheads_print): Adjust.
4287 * src/state.h, src/state.c (state_reductions_find): New.
4288 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
4289 (count_rr_conflicts): Adjust.
4290 * src/lalr.c (LArule): Remove.
4291 (add_lookback_edge): Adjust.
4292 (state_lookaheads_count): New.
4293 (states_lookaheads_initialize): Merge into...
4294 (initialize_LA): this.
4295 (lalr_free): Adjust.
4296 * src/main.c (main): Don't free nullable and derives too early: it
4297 is used by --verbose.
4298 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
4299
4300 2002-08-01 Akim Demaille <akim@epita.fr>
4301
4302 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
4303 `rule_number_t**'.
4304 (set_derives, free_derives): Rename as...
4305 (derives_compute, derives_free): this.
4306 Adjust all dependencies.
4307 * src/nullable.c (set_nullable, free_nullable): Rename as...
4308 (nullable_compute, nullable_free): these.
4309 (rule_list_t): Store rule_t *, not rule_number_t.
4310 * src/state.c (state_rule_lookaheads_print): Directly compare rule
4311 pointers, instead of their numbers.
4312 * src/main.c (main): Call nullable_free, and derives_free earlier,
4313 as they were lo longer used.
4314
4315 2002-08-01 Akim Demaille <akim@epita.fr>
4316
4317 * lib/timevar.c (get_time): Include children time.
4318 * src/lalr.h (LA, LArule): Don't export them: used with the
4319 state_t.
4320 * src/lalr.c (LA, LArule): Static.
4321 * src/lalr.h, src/lalr.c (lalr_free): New.
4322 * src/main.c (main): Call it.
4323 * src/tables.c (pack_vector): Check whether loc is >= to the
4324 table_size, not >.
4325 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
4326 (tables_generate): do it, since that's also it which allocates
4327 them.
4328 Don't free LA and LArule, main does.
4329
4330 2002-07-31 Akim Demaille <akim@epita.fr>
4331
4332 Separate parser tables computation and output.
4333
4334 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
4335 (conflict_list, conflict_list_cnt, table, check, table_ninf)
4336 (yydefgoto, yydefact, high): Move to...
4337 * src/tables.h, src/tables.c: here.
4338 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4339 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4340 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
4341 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
4342 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
4343 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
4344 (action_row, save_row, token_actions, save_column, default_goto)
4345 (goto_actions, sort_actions, matching_state, pack_vector)
4346 (table_ninf_remap, pack_table, prepare_actions): Move to...
4347 * src/tables.c: here.
4348 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
4349 * src/output.c (token_actions, output_base, output_conflicts)
4350 (output_check): Merge into...
4351 (prepare_actions): this.
4352 (actions_output): Rename as...
4353 (user_actions_output): this.
4354 * src/main.c (main): Call tables_generate and tables_free.
4355
4356 2002-07-31 Akim Demaille <akim@epita.fr>
4357
4358 Steal GCC's --time-report support.
4359
4360 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
4361 stolen/adjusted from GCC.
4362 * m4/stage.m4: Remove time related checks.
4363 * m4/timevar.m4: New.
4364 * configure.in: Adjust.
4365 * src/system.h: Adjust to using timevar.h.
4366 * src/getargs.h, src/getargs.c: Support trace_time for
4367 --trace=time.
4368 * src/main.c (stage): Remove.
4369 (main): Replace `stage' invocations with timevar calls.
4370 * src/output.c: Insert pertinent timevar calls.
4371
4372 2002-07-31 Akim Demaille <akim@epita.fr>
4373
4374 Let --trace have arguments.
4375
4376 * src/getargs.h (enum trace_e): New.
4377 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
4378 (long_options, short_options): --trace/-T takes an optional
4379 argument.
4380 Change all the uses of trace_flag to reflect the new flags.
4381 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
4382
4383 Strengthen `stage' portability.
4384
4385 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
4386 * configure.in: Use it.
4387 Don't check for malloc.h and sys/times.h.
4388 * src/system.h: Include them when appropriate.
4389 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
4390 times and struct tms are available.
4391
4392 2002-07-30 Akim Demaille <akim@epita.fr>
4393
4394 In verbose parse error message, don't report `error' as an
4395 expected token.
4396 * tests/actions.at (Printers and Destructors): Adjust.
4397 * tests/calc.at (Calculator $1): Adjust.
4398 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
4399 error message, do not report the parser accepts the error token in
4400 that state.
4401
4402 2002-07-30 Akim Demaille <akim@epita.fr>
4403
4404 Normalize conflict related messages.
4405
4406 * src/complain.h, src/complain.c (warn, complain): New.
4407 * src/conflicts.c (conflicts_print): Use them.
4408 (conflict_report_yacc): New, extracted from...
4409 (conflicts_print): here.
4410 * tests/conflicts.at, tests/existing.at: Adjust.
4411
4412 2002-07-30 Akim Demaille <akim@epita.fr>
4413
4414 Report rules which are never reduced by the parser: those hidden
4415 by conflicts.
4416
4417 * src/LR0.c (save_reductions): Don't make the final state too
4418 different: save its reduction (accept) instead of having a state
4419 without any action (no shift or goto, no reduce).
4420 Note: the final state is now a ``regular'' state, i.e., the
4421 parsers now contain `reduce 0' as default reduction.
4422 Nevertheless, since they decide to `accept' when yystate =
4423 final_state, they still will not reduce rule 0.
4424 * src/print.c (print_actions, print_reduction): Adjust.
4425 * src/output.c (action_row): Track reduced rules.
4426 (token_actions): Report rules never reduced.
4427 * tests/conflicts.at, tests/regression.at: Adjust.
4428
4429 2002-07-30 Akim Demaille <akim@epita.fr>
4430
4431 `stage' was accidently included in a previous patch.
4432 Initiate its autoconfiscation.
4433
4434 * configure.in: Look for malloc.h and sys/times.h.
4435 * src/main.c (stage): Adjust.
4436 Report only when trace_flag.
4437
4438 2002-07-29 Akim Demaille <akim@epita.fr>
4439
4440 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
4441 state_number_t.
4442 (errs_t): symbol_t*, not symbol_number_t.
4443 (reductions_t): rule_t*, not rule_number_t.
4444 (FOR_EACH_SHIFT): New.
4445 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
4446 * src/print.c, src/print_graph.c: Adjust.
4447
4448 2002-07-29 Akim Demaille <akim@epita.fr>
4449
4450 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
4451
4452 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
4453 (endtoken, accept): these.
4454 * src/reader.c (reader): Set endtoken's default tag to "$end".
4455 Set undeftoken's tag to "$undefined" instead of "$undefined.".
4456 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
4457 Adjust.
4458
4459 2002-07-29 Akim Demaille <akim@epita.fr>
4460
4461 * src/reduce.c (reduce_grammar): When the language is empty,
4462 complain about the start symbol, not the axiom.
4463 Use its location.
4464 * tests/reduce.at (Empty Language): New.
4465
4466 2002-07-26 Akim Demaille <akim@epita.fr>
4467
4468 * src/reader.h, src/reader.c (gram_error): ... can't get
4469 yycontrol without making too strong assumptions on the parser
4470 itself.
4471 * src/output.c (prepare_tokens): Use the real 0th value of
4472 token_translations instead of `0'.
4473 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
4474 visible here.
4475 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
4476 for the time being: %locations ought to provide it to yyerror.
4477
4478 2002-07-25 Akim Demaille <akim@epita.fr>
4479
4480 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
4481 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
4482 * tests/regression.at (Web2c Actions): Adjust.
4483
4484 2002-07-25 Akim Demaille <akim@epita.fr>
4485
4486 Stop storing rules from 1 to nrules + 1.
4487
4488 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
4489 * src/nullable.c, src/output.c, src/print.c, src/reader.c
4490 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
4491 Iterate from 0 to nrules.
4492 Use rule_number_as_item_number and item_number_as_rule_number.
4493 Adjust to `derive' now containing possibly 0.
4494 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
4495 Handle the `- 1' part in rule numbers from/to item numbers.
4496 * src/conflicts.c (log_resolution): Fix the message which reversed
4497 shift and reduce.
4498 * src/output.c (action_row): Initialize default_rule to -1.
4499 (token_actions): Adjust.
4500 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
4501 expected output.
4502 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
4503
4504 2002-07-25 Akim Demaille <akim@epita.fr>
4505
4506 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
4507 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
4508 (b4_c_knr_arg_decl): New.
4509 * data/yacc.c: Use it to define yysymprint, yydestruct, and
4510 yyreport_parse_error.
4511
4512 2002-07-25 Akim Demaille <akim@epita.fr>
4513
4514 * data/yacc.c (yyreport_parse_error): New, extracted from...
4515 (yyparse): here.
4516 (yydestruct, yysymprint): Move above yyparse.
4517 Be K&R compliant.
4518
4519 2002-07-25 Akim Demaille <akim@epita.fr>
4520
4521 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
4522 replace...
4523 (b4_sint_type, b4_uint_type): these.
4524 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
4525 * tests/regression.at (Web2c Actions): Adjust.
4526
4527 2002-07-25 Akim Demaille <akim@epita.fr>
4528
4529 * src/gram.h (TIEM_NUMBER_MAX): New.
4530 (item_number_of_rule_number, rule_number_of_item_number): Rename
4531 as...
4532 (rule_number_as_item_number, item_number_as_rule_number): these.
4533 Adjust dependencies.
4534 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4535 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4536 (symbol_number_to_vector_number): New.
4537 (order): Of vector_number_t* type.
4538 (base_t, BASE_MAX, BASE_MIN): New.
4539 (froms, tos, width, pos, check): Of base_t type.
4540 (action_number_t, ACTION_MIN, ACTION_MAX): New.
4541 (actrow): Of action_number_t type.
4542 (conflrow): Of unsigned int type.
4543 (table_ninf, base_ninf): New.
4544 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
4545 (muscle_insert_int_table, muscle_insert_base_table)
4546 (muscle_insert_rule_number_table): New.
4547 (prepare_tokens): Output `toknum' as int_table.
4548 (action_row): Returns a rule_number_t.
4549 Use ACTION_MIN, not SHRT_MIN.
4550 (token_actions): yydefact is rule_number_t*.
4551 (table_ninf_remap): New.
4552 (pack_table): Use it for `base' and `table'.
4553 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
4554 replaced with...
4555 (YYPACT_NINF, YYTABLE_NINF): these.
4556 (yypact, yytable): Compute their types instead of hard-coded
4557 `short'.
4558 * tests/regression.at (Web2c Actions): Adjust.
4559
4560 2002-07-19 Akim Demaille <akim@epita.fr>
4561
4562 * src/scan-gram.l (id): Can start with an underscore.
4563
4564 2002-07-16 Akim Demaille <akim@epita.fr>
4565
4566 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
4567 Adjust all former `associativity' dependencies.
4568 * src/symtab.c (symbol_new): Default associativity is `undef', not
4569 `right'.
4570 (symbol_check_alias_consistence): Adjust.
4571
4572 2002-07-09 Akim Demaille <akim@epita.fr>
4573
4574 * doc/bison.texinfo: Properly set the ``header'' part.
4575 Use @dircategory ``GNU programming tools'' as per Texinfo's
4576 documentation.
4577 Use @copying.
4578
4579 2002-07-09 Akim Demaille <akim@epita.fr>
4580
4581 * lib/quotearg.h: Protect against multiple inclusions.
4582 * src/location.h (location_t): Add a `file' member.
4583 (LOCATION_RESET, LOCATION_PRINT): Adjust.
4584 * src/complain.c (warn_at, complain_at, fatal_at): Drop
4585 `error_one_per_line' support.
4586
4587 2002-07-09 Akim Demaille <akim@epita.fr>
4588
4589 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
4590 * src/reader.c (lineno): Remove.
4591 Adjust all dependencies.
4592 (get_merge_function): Take a location and use complain_at.
4593 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
4594 * tests/regression.at (Invalid inputs, Mixing %token styles):
4595 Adjust.
4596
4597 2002-07-09 Akim Demaille <akim@epita.fr>
4598
4599 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
4600 recovery rule, and forbid extensions when --yacc.
4601 (gram_error): Use complain_at.
4602 * src/reader.c (reader): Exit if there were parse errors.
4603
4604 2002-07-09 Akim Demaille <akim@epita.fr>
4605
4606 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
4607 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
4608 Reported by R Blake <blakers@mac.com>.
4609
4610 2002-07-09 Akim Demaille <akim@epita.fr>
4611
4612 * data/yacc.c: Output the copyright notive in the header.
4613
4614 2002-07-03 Akim Demaille <akim@epita.fr>
4615
4616 * src/output.c (froms, tos): Are state_number_t.
4617 (save_column): sp, sp1, and sp2 are state_number_t.
4618 (prepare): Rename `final' as `final_state_number', `nnts' as
4619 `nterms_number', `nrules' as `rules_number', `nstates' as
4620 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
4621 unused.
4622 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
4623 * data/lalr1.cc (nsym_): Remove, unused.
4624
4625 2002-07-03 Akim Demaille <akim@epita.fr>
4626
4627 * src/lalr.h, src/lalr.c (goto_number_t): New.
4628 * src/lalr.c (goto_list_t): New.
4629 Propagate them.
4630 * src/nullable.c (rule_list_t): New.
4631 Propagate.
4632 * src/types.h: Remove.
4633
4634 2002-07-03 Akim Demaille <akim@epita.fr>
4635
4636 * src/closure.c (print_fderives): Use rule_rhs_print.
4637 * src/derives.c (print_derives): Use rule_rhs_print.
4638 (rule_list_t): New, replaces `shorts'.
4639 (set_derives): Add comments.
4640 * tests/sets.at (Nullable, Firsts): Adjust.
4641
4642 2002-07-03 Akim Demaille <akim@epita.fr>
4643
4644 * src/output.c (prepare_actions): Free `tally' and `width'.
4645 (prepare_actions): Allocate and free `order'.
4646 * src/symtab.c (symbols_free): Free `symbols'.
4647 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
4648 * src/output.c (m4_invoke): Move to...
4649 * src/scan-skel.l: here.
4650 (<<EOF>>): Close yyout, and free its name.
4651
4652 2002-07-03 Akim Demaille <akim@epita.fr>
4653
4654 Fix some memory leaks, and fix a bug: state 0 was examined twice.
4655
4656 * src/LR0.c (new_state): Merge into...
4657 (state_list_append): this.
4658 (new_states): Merge into...
4659 (generate_states): here.
4660 (set_states): Don't ensure a proper `errs' state member here, do it...
4661 * src/conflicts.c (conflicts_solve): here.
4662 * src/state.h, src/state.c: Comment changes.
4663 (state_t): Rename member `shifts' as `transitions'.
4664 Adjust all dependencies.
4665 (errs_new): For consistency, also take the values as argument.
4666 (errs_dup): Remove.
4667 (state_errs_set): New.
4668 (state_reductions_set, state_transitions_set): Assert that no
4669 previous value was assigned.
4670 (state_free): New.
4671 (states_free): Use it.
4672 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
4673 temporary storage: use `errs' and `nerrs' as elsewhere.
4674 (set_conflicts): Allocate and free this `errs'.
4675
4676 2002-07-02 Akim Demaille <akim@epita.fr>
4677
4678 * lib/libiberty.h: New.
4679 * lib: Update the bitset implementation from upstream.
4680 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
4681 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
4682 * src/main.c: Adjust bitset stats calls.
4683
4684 2002-07-01 Paul Eggert <eggert@twinsun.com>
4685
4686 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
4687 char, so that negative chars don't collide with $.
4688
4689 2002-06-30 Akim Demaille <akim@epita.fr>
4690
4691 Have the GLR tests be `warning' checked, and fix the warnings.
4692
4693 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
4694 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
4695 (yyremoveDeletes): `yyi' and `yyj' are size_t.
4696 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
4697 (yyaddDeferredAction): static.
4698 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
4699 (yyreportParseError): yyprefix is const.
4700 yytokenp is used only when verbose.
4701 (yy__GNUC__): Replace with __GNUC__.
4702 (yypdumpstack): yyi is size_t.
4703 (yypreference): Un-yy local variables and arguments, to avoid
4704 clashes with `yyr1'. Anyway, we are not in the user name space.
4705 (yytname_size): be an int, as is compared with ints.
4706 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
4707 Use them.
4708 * tests/cxx-gram.at: Use quotation to protect $1.
4709 Use AT_COMPILE to enable warnings hunts.
4710 Prototype yylex and yyerror.
4711 `Use' argc.
4712 Include `string.h', not `strings.h'.
4713 Produce and prototype stmtMerge only when used.
4714 yylex takes a location.
4715
4716 2002-06-30 Akim Demaille <akim@epita.fr>
4717
4718 We spend a lot of time in quotearg, in particular when --verbose.
4719
4720 * src/symtab.c (symbol_get): Store a quoted version of the key.
4721 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
4722 Adjust all callers.
4723
4724 2002-06-30 Akim Demaille <akim@epita.fr>
4725
4726 * src/state.h (reductions_t): Rename member `nreds' as num.
4727 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
4728 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
4729
4730 2002-06-30 Akim Demaille <akim@epita.fr>
4731
4732 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
4733 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
4734 (shifts_to): Rename as...
4735 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
4736 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
4737 (TRANSITION_IS_DISABLED, transitions_to): these.
4738
4739 2002-06-30 Akim Demaille <akim@epita.fr>
4740
4741 * src/print.c (print_shifts, print_gotos): Merge into...
4742 (print_transitions): this.
4743 (print_transitions, print_errs, print_reductions): Align the
4744 lookaheads columns.
4745 (print_core, print_transitions, print_errs, print_state,
4746 print_grammar): Output empty lines separator before, not after.
4747 (state_default_rule_compute): Rename as...
4748 (state_default_rule): this.
4749 * tests/conflicts.at (Defaulted Conflicted Reduction),
4750 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
4751 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
4752
4753 2002-06-30 Akim Demaille <akim@epita.fr>
4754
4755 Display items as we display rules.
4756
4757 * src/gram.h, src/gram.c (rule_lhs_print): New.
4758 * src/gram.c (grammar_rules_partial_print): Use it.
4759 * src/print.c (print_core): Likewise.
4760 * tests/conflicts.at (Defaulted Conflicted Reduction),
4761 (Unresolved SR Conflicts): Adjust.
4762 (Unresolved SR Conflicts): Adjust and rename as...
4763 (Resolved SR Conflicts): this, as was meant.
4764 * tests/regression.at (Web2c Report): Adjust.
4765
4766 2002-06-30 Akim Demaille <akim@epita.fr>
4767
4768 * src/print.c (state_default_rule_compute): New, extracted from...
4769 (print_reductions): here.
4770 Pessimize, but clarify the code.
4771 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
4772
4773 2002-06-30 Akim Demaille <akim@epita.fr>
4774
4775 * src/output.c (action_row): Let default_rule be always a rule
4776 number.
4777
4778 2002-06-30 Akim Demaille <akim@epita.fr>
4779
4780 * src/closure.c (print_firsts, print_fderives, closure):
4781 Use BITSET_EXECUTE.
4782 * src/lalr.c (lookaheads_print): Likewise.
4783 * src/state.c (state_rule_lookaheads_print): Likewise.
4784 * src/print_graph.c (print_core): Likewise.
4785 * src/print.c (print_reductions): Likewise.
4786 * src/output.c (action_row): Likewise.
4787 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4788
4789 2002-06-30 Akim Demaille <akim@epita.fr>
4790
4791 * src/print_graph.c: Use report_flag.
4792
4793 2002-06-30 Akim Demaille <akim@epita.fr>
4794
4795 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4796 to...
4797 * src/relation.h, src/relation.c (traverse, relation_digraph)
4798 (relation_print, relation_transpose): New.
4799
4800 2002-06-30 Akim Demaille <akim@epita.fr>
4801
4802 * src/state.h, src/state.c (shifts_to): New.
4803 * src/lalr.c (build_relations): Use it.
4804
4805 2002-06-30 Akim Demaille <akim@epita.fr>
4806
4807 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4808 (item_number_of_rule_number, rule_number_of_item_number): New.
4809 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4810 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4811 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4812 Propagate their use.
4813 Much remains to be done, in particular wrt `shorts' from types.h.
4814
4815 2002-06-30 Akim Demaille <akim@epita.fr>
4816
4817 * src/symtab.c (symbol_new): Initialize the `printer' member.
4818
4819 2002-06-30 Akim Demaille <akim@epita.fr>
4820
4821 * src/LR0.c (save_reductions): Remove, replaced by...
4822 * src/state.h, src/state.c (state_reductions_set): New.
4823 (reductions, errs): Rename as...
4824 (reductions_t, errs_t): these.
4825 Adjust all dependencies.
4826
4827 2002-06-30 Akim Demaille <akim@epita.fr>
4828
4829 * src/LR0.c (state_list_t, state_list_append): New.
4830 (first_state, last_state): Now symbol_list_t.
4831 (this_state): Remove.
4832 (new_itemsets, append_states, save_reductions): Take a state_t as
4833 argument.
4834 (set_states, generate_states): Adjust.
4835 (save_shifts): Remove, replaced by...
4836 * src/state.h, src/state.c (state_shifts_set): New.
4837 (shifts): Rename as...
4838 (shifts_t): this.
4839 Adjust all dependencies.
4840 * src/state.h (state_t): Remove the `next' member.
4841
4842 2002-06-30 Akim Demaille <akim@epita.fr>
4843
4844 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4845 escaped in slot 0.
4846
4847 2002-06-30 Akim Demaille <akim@epita.fr>
4848
4849 Use hash.h for the state hash table.
4850
4851 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4852 (allocate_storage): Use state_hash_new.
4853 (free_storage): Use state_hash_free.
4854 (new_state, get_state): Adjust.
4855 * src/lalr.h, src/lalr.c (states): Move to...
4856 * src/states.h (state_t): Remove the `link' member, no longer
4857 used.
4858 * src/states.h, src/states.c: here.
4859 (state_hash_new, state_hash_free, state_hash_lookup)
4860 (state_hash_insert, states_free): New.
4861 * src/states.c (state_table, state_compare, state_hash): New.
4862 * src/output.c (output_actions): Do not free states now, since we
4863 still need to know the final_state number in `prepare', called
4864 afterwards. Do it...
4865 * src/main.c (main): here: call states_free after `output'.
4866
4867 2002-06-30 Akim Demaille <akim@epita.fr>
4868
4869 * src/state.h, src/state.c (state_new): New, extracted from...
4870 * src/LR0.c (new_state): here.
4871 * src/state.h (STATE_ALLOC): Move to...
4872 * src/state.c: here.
4873 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
4874 * src/state.h, src/state.c: here.
4875
4876 2002-06-30 Akim Demaille <akim@epita.fr>
4877
4878 * src/reader.c (gensym): Rename as...
4879 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
4880 (getsym): Rename as...
4881 (symbol_get): this.
4882
4883 2002-06-30 Akim Demaille <akim@epita.fr>
4884
4885 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
4886 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
4887 * src/output.c, src/print.c, src/print_graph.c: Propagate.
4888 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
4889
4890 2002-06-30 Akim Demaille <akim@epita.fr>
4891
4892 Make the test suite pass with warnings checked.
4893
4894 * tests/actions.at (Printers and Destructors): Improve.
4895 Avoid unsigned vs. signed issues.
4896 * tests/calc.at: Don't exercise the scanner here, do it...
4897 * tests/input.at (Torturing the Scanner): here.
4898
4899 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4900
4901 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
4902 reorganize first lines parallel to yacc.c.
4903
4904 2002-06-28 Akim Demaille <akim@epita.fr>
4905
4906 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
4907 (b4_token_enum, b4_token_defines): New, factored from...
4908 * data/lalr1.cc, data/yacc.c, glr.c: here.
4909
4910 2002-06-28 Akim Demaille <akim@epita.fr>
4911
4912 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
4913 unused variables.
4914 * src/output.c (merger_output): static.
4915
4916 2002-06-28 Akim Demaille <akim@epita.fr>
4917
4918 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
4919 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
4920 pacify GCC.
4921 * src/output.c (save_row): Initialize all the variables to pacify GCC.
4922
4923 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4924
4925 Accumulated changelog for new GLR parsing features.
4926
4927 * src/conflicts.c (count_total_conflicts): Change name to
4928 conflicts_total_count.
4929 * src/conflicts.h: Ditto.
4930 * src/output.c (token_actions): Use the new name.
4931 (output_conflicts): Change conflp => conflict_list_heads, and
4932 confl => conflict_list for better readability.
4933 * data/glr.c: Use the new names.
4934 * NEWS: Add self to GLR announcement.
4935
4936 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
4937
4938 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
4939 Akim Demaille.
4940
4941 * data/bison.glr: Change name to glr.c
4942 * data/glr.c: Renamed from bison.glr.
4943 * data/Makefile.am: Add glr.c
4944
4945 * src/getargs.c:
4946
4947 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
4948 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
4949
4950 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4951
4952 * data/bison.glr: Be sure to restore the
4953 current #line when returning to the skeleton contents after having
4954 exposed the input file's #line.
4955
4956 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4957
4958 * data/bison.glr: Bring up to date with changes to bison.simple.
4959
4960 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4961
4962 * data/bison.glr: Correct definitions that use b4_prefix.
4963 Various reformatting.
4964 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
4965 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
4966 yytokenp argument; now part of stack.
4967 (yychar): Define to behave as documented.
4968 (yyclearin): Ditto.
4969
4970 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4971
4972 * src/reader.h: Add declaration for free_merger_functions.
4973
4974 * src/reader.c (merge_functions): New variable.
4975 (get_merge_function): New function.
4976 (free_merger_functions): New function.
4977 (readgram): Check for %prec that is not followed by a symbol.
4978 Handle %dprec and %merge declarations.
4979 (packgram): Initialize dprec and merger fields in rules array.
4980
4981 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
4982 conflict_list_cnt, conflict_list_free): New variables.
4983 (table_grow): Also grow conflict_table.
4984 (prepare_rules): Output dprec and merger tables.
4985 (conflict_row): New function.
4986 (action_row): Output conflict lists for GLR parser. Don't use
4987 default reduction in conflicted states for GLR parser so that there
4988 are spaces for the conflict lists.
4989 (save_row): Also save conflict information.
4990 (token_actions): Allocate conflict list.
4991 (merger_output): New function.
4992 (pack_vector): Pack conflict table, too.
4993 (output_conflicts): New function to output yyconflp and yyconfl.
4994 (output_check): Allocate conflict_tos.
4995 (output_actions): Output conflict tables, also.
4996 (output_skeleton): Output b4_mergers definition.
4997 (prepare): Output b4_max_rhs_length definition.
4998 Use 'bison.glr' as default skeleton for GLR parsers.
4999
5000 * src/gram.c (glr_parser): New flag.
5001 (grammar_free): Call free_merger_functions.
5002
5003 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
5004 all pairs of conflicting reductions, rather than just all tokens
5005 causing conflicts. Needed to size conflict tables.
5006 (conflicts_output): Modify call to count_rr_conflicts for new
5007 interface.
5008 (conflicts_print): Ditto.
5009 (count_total_conflicts): New function.
5010
5011 * src/reader.h (merger_list): New type.
5012 (merge_functions): New variable.
5013
5014 * src/lex.h (tok_dprec, tok_merge): New token types.
5015
5016 * src/gram.h (rule_s): Add dprec and merger fields.
5017 (glr_parser): New flag.
5018
5019 * src/conflicts.h (count_total_conflicts): New function.
5020
5021 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
5022
5023 * doc/bison.texinfo (Generalized LR Parsing): New section.
5024 (GLR Parsers): New section.
5025 (Language and Grammar): Mention GLR parsing.
5026 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
5027 Correct typo ("tge" -> "the").
5028
5029 * data/bison.glr: New skeleton for GLR parsing.
5030
5031 * tests/cxx-gram.at: New tests for GLR parsing.
5032
5033 * tests/testsuite.at: Include cxx-gram.at.
5034
5035 * tests/Makefile.am: Add cxx-gram.at.
5036
5037 * src/parse-gram.y:
5038
5039 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
5040
5041 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
5042
5043 2002-06-27 Akim Demaille <akim@epita.fr>
5044
5045 * src/options.h, src/options.c: Remove.
5046 * src/getargs.c (short_options, long_options): New.
5047
5048 2002-06-27 Akim Demaille <akim@epita.fr>
5049
5050 * data/bison.simple, data/bison.c++: Rename as...
5051 * data/yacc.c, data/lalr1.cc: these.
5052 * doc/bison.texinfo (Environment Variables): Remove.
5053
5054 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
5055
5056 * src/getargs.c (report_argmatch): Initialize strtok().
5057
5058 2002-06-20 Akim Demaille <akim@epita.fr>
5059
5060 * data/bison.simple (b4_symbol_actions): New, replaces...
5061 (b4_symbol_destructor, b4_symbol_printer): these.
5062 (yysymprint): Be sure to call YYPRINT only for tokens, and using
5063 user token numbers.
5064
5065 2002-06-20 Akim Demaille <akim@epita.fr>
5066
5067 * data/bison.simple (yydestructor): Rename as...
5068 (yydestruct): this.
5069
5070 2002-06-20 Akim Demaille <akim@epita.fr>
5071
5072 * src/symtab.h, src/symtab.c (symbol_type_set)
5073 (symbol_destructor_set, symbol_precedence_set): The location is
5074 the last argument.
5075 Adjust all callers.
5076
5077 2002-06-20 Akim Demaille <akim@epita.fr>
5078
5079 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
5080 internals.
5081 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
5082 Takes a location.
5083 * src/symtab.h, src/symtab.c (symbol_class_set)
5084 (symbol_user_token_number_set): Likewise.
5085 Adjust all callers.
5086 Promote complain_at.
5087 * tests/input.at (Type Clashes): Adjust.
5088
5089 2002-06-20 Akim Demaille <akim@epita.fr>
5090
5091 * data/bison.simple (YYLEX): Fix the declaration when
5092 %pure-parser.
5093
5094 2002-06-20 Akim Demaille <akim@epita.fr>
5095
5096 * data/bison.simple (yysymprint): Don't print the token number,
5097 just its name.
5098 * tests/actions.at (Destructors): Rename as...
5099 (Printers and Destructors): this.
5100 Also exercise %printer.
5101
5102 2002-06-20 Akim Demaille <akim@epita.fr>
5103
5104 * data/bison.simple (YYDSYMPRINT): New.
5105 Use it to remove many of the #if YYDEBUG/if (yydebug).
5106
5107 2002-06-20 Akim Demaille <akim@epita.fr>
5108
5109 * src/symtab.h, src/symtab.c (symbol_t): printer and
5110 printer_location are new members.
5111 (symbol_printer_set): New.
5112 * src/parse-gram.y (PERCENT_PRINTER): New token.
5113 Handle its associated rule.
5114 * src/scan-gram.l: Adjust.
5115 (handle_destructor_at, handle_destructor_dollar): Rename as...
5116 (handle_symbol_code_at, handle_symbol_code_dollar): these.
5117 * src/output.c (symbol_printers_output): New.
5118 (output_skeleton): Call it.
5119 * data/bison.simple (yysymprint): New. Cannot be named yyprint
5120 since there are already many grammar files with a user `yyprint'.
5121 Replace the calls to YYPRINT to calls to yysymprint.
5122 * tests/calc.at: Adjust.
5123 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
5124 taking advantage of parser very internal details (stack size!).
5125
5126 2002-06-20 Akim Demaille <akim@epita.fr>
5127
5128 * src/scan-gram.l: Complete the scanner with the missing patterns
5129 to pacify Flex.
5130 Use `quote' and `symbol_tag_get' where appropriate.
5131
5132 2002-06-19 Akim Demaille <akim@epita.fr>
5133
5134 * tests/actions.at (Destructors): Augment to test locations.
5135 * data/bison.simple (yydestructor): Pass it the current location
5136 if locations are enabled.
5137 Prototype only when __STDC__ or C++.
5138 Change the argument names to move into the yy name space: there is
5139 user code here.
5140
5141 2002-06-19 Akim Demaille <akim@epita.fr>
5142
5143 * data/bison.simple (b4_pure_if): New.
5144 Use it instead of #ifdef YYPURE.
5145
5146 2002-06-19 Akim Demaille <akim@epita.fr>
5147
5148 * data/bison.simple (b4_location_if): New.
5149 Use it instead of #ifdef YYLSP_NEEDED.
5150
5151 2002-06-19 Akim Demaille <akim@epita.fr>
5152
5153 Prepare @$ in %destructor, but currently don't bind it in the
5154 skeleton, as %location use is not cleaned up yet.
5155
5156 * src/scan-gram.l (handle_dollar, handle_destructor_at)
5157 (handle_action_at): New.
5158 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
5159 a braced_code_t and a location as additional arguments.
5160 (handle_destructor_dollar): Instead of requiring `b4_eval', just
5161 unquote one when outputting `b4_dollar_dollar'.
5162 Adjust callers.
5163 * data/bison.simple (b4_eval): Remove.
5164 (b4_symbol_destructor): Adjust.
5165 * tests/input.at (Invalid @n): Adjust.
5166
5167 2002-06-19 Zack Weinberg <zack@codesourcery.com>
5168
5169 * doc/bison.texinfo: Document ability to have multiple
5170 prologue sections.
5171
5172 2002-06-18 Akim Demaille <akim@epita.fr>
5173
5174 * src/files.c (compute_base_names): When computing the output file
5175 names from the input file name, strip the directory part.
5176
5177 2002-06-18 Akim Demaille <akim@epita.fr>
5178
5179 * data/bison.simple.new: Comment changes.
5180 Reported by Andreas Schwab.
5181
5182 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
5183
5184 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
5185 there are no `label `yyoverflowlab' defined but not used' warnings
5186 when yyoverflow is defined.
5187
5188 2002-06-18 Akim Demaille <akim@epita.fr>
5189
5190 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
5191 new member.
5192 (symbol_destructor_set): Adjust.
5193 * src/output.c (symbol_destructors_output): Output the destructor
5194 locations.
5195 Output the symbol name.
5196 * data/bison.simple (b4_symbol_destructor): Adjust.
5197
5198 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
5199 and Akim Demaille <akim@epita.fr>
5200
5201 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
5202 what's left on the stack when the error recovery hits EOF.
5203 * tests/actions.at (Destructors): Complete to exercise this case.
5204
5205 2002-06-17 Akim Demaille <akim@epita.fr>
5206
5207 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
5208 arguments is really empty, not only equal to `[]'.
5209 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
5210 member.
5211 (symbol_destructor_set): New.
5212 * src/output.c (symbol_destructors_output): New.
5213 * src/reader.h (brace_code_t, current_braced_code): New.
5214 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
5215 (handle_dollar): Rename as...
5216 (handle_action_dollar): this.
5217 (handle_destructor_dollar): New.
5218 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
5219 (grammar_declaration): Use it.
5220 * data/bison.simple (yystos): Is always defined.
5221 (yydestructor): New.
5222 * tests/actions.at (Destructors): New.
5223 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
5224
5225 2002-06-17 Akim Demaille <akim@epita.fr>
5226
5227 * src/symlist.h, src/symlist.c (symbol_list_length): New.
5228 * src/scan-gram.l (handle_dollar, handle_at): Compute the
5229 rule_length only when needed.
5230 * src/output.c (actions_output, token_definitions_output): Output
5231 the full M4 block.
5232 * src/symtab.c: Don't access directly to the symbol tag, use
5233 symbol_tag_get.
5234 * src/parse-gram.y: Use symbol_list_free.
5235
5236 2002-06-17 Akim Demaille <akim@epita.fr>
5237
5238 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
5239 (symbol_list_prepend, get_type_name): Move to...
5240 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
5241 (symbol_list_prepend, symbol_list_n_type_name_get): here.
5242 Adjust all callers.
5243 (symbol_list_free): New.
5244 * src/scan-gram.l (handle_dollar): Takes a location.
5245 * tests/input.at (Invalid $n): Adjust.
5246
5247 2002-06-17 Akim Demaille <akim@epita.fr>
5248
5249 * src/reader.h, src/reader.c (symbol_list_new): Export it.
5250 (symbol_list_prepend): New.
5251 * src/parse-gram.y (%union): `list' is a new member.
5252 (symbols.1): New, replaces...
5253 (terms_to_prec.1, nterms_to_type.1): these.
5254 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
5255 Take a location as additional argument.
5256 Adjust all callers.
5257
5258 2002-06-15 Akim Demaille <akim@epita.fr>
5259
5260 * src/parse-gram.y: Move %token in the declaration section so that
5261 we don't depend upon CVS Bison.
5262
5263 2002-06-15 Akim Demaille <akim@epita.fr>
5264
5265 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
5266 * src/print.c (print_core): Use it.
5267
5268 2002-06-15 Akim Demaille <akim@epita.fr>
5269
5270 * src/conflicts.c (log_resolution): Accept the rule involved in
5271 the sr conflicts instead of the lookahead number that points to
5272 that rule.
5273 (flush_reduce): Accept the current lookahead vector as argument,
5274 instead of the index in LA.
5275 (resolve_sr_conflict): Accept the current number of lookahead
5276 bitset to consider for the STATE, instead of the index in LA.
5277 (set_conflicts): Adjust.
5278 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
5279
5280 2002-06-15 Akim Demaille <akim@epita.fr>
5281
5282 * src/state.h (state_t): Replace the `lookaheadsp' member, a
5283 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
5284 Adjust all dependencies.
5285 * src/lalr.c (initialize_lookaheads): Split into...
5286 (states_lookaheads_count, states_lookaheads_initialize): these.
5287 (lalr): Adjust.
5288
5289 2002-06-15 Akim Demaille <akim@epita.fr>
5290
5291 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
5292 out of...
5293 (grammar_rules_print): here.
5294 * src/reduce.c (reduce_output): Use it.
5295 * tests/reduce.at (Useless Rules, Reduced Automaton)
5296 (Underivable Rules): Adjust.
5297
5298 2002-06-15 Akim Demaille <akim@epita.fr>
5299
5300 Copy BYacc's nice way to report the grammar.
5301
5302 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
5303 New.
5304 Don't print the rules' location, it is confusing and useless.
5305 (rule_print): Use grammar_rhs_print.
5306 * src/print.c (print_grammar): Use grammar_rules_print.
5307
5308 2002-06-15 Akim Demaille <akim@epita.fr>
5309
5310 Complete and rationalize `useless thing' warnings.
5311
5312 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
5313 (symbol_tag_print): New.
5314 Use them everywhere in place of accessing directly the tag member.
5315 * src/gram.h, src/gram.c (rule_print): New.
5316 Use it where a rule used to be printed `by hand'.
5317 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
5318 (reduce_grammar_tables): Report the useless rules.
5319 (reduce_print): Useless things are a warning, not an error.
5320 Report it as such.
5321 * tests/reduce.at (Useless Nonterminals, Useless Rules):
5322 (Reduced Automaton, Underivable Rules): Adjust.
5323 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
5324 * tests/conflicts.at (Unresolved SR Conflicts)
5325 (Solved SR Conflicts): Adjust.
5326
5327 2002-06-15 Akim Demaille <akim@epita.fr>
5328
5329 Let symbols have a location.
5330
5331 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
5332 (getsym): Adjust.
5333 Adjust all callers.
5334 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
5335 Use location_t, not int.
5336 * src/symtab.c (symbol_check_defined): Take advantage of the
5337 location.
5338 * tests/regression.at (Invalid inputs): Adjust.
5339
5340 2002-06-15 Akim Demaille <akim@epita.fr>
5341
5342 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
5343 (input): Don't try to initialize yylloc here, do it in the
5344 scanner.
5345 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
5346 * src/gram.h (rule_t): Change line and action_line into location
5347 and action_location, of location_t type.
5348 Adjust all dependencies.
5349 * src/location.h, src/location.c (empty_location): New.
5350 * src/reader.h, src/reader.c (grammar_start_symbol_set)
5351 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
5352 (grammar_current_rule_symbol_append)
5353 (grammar_current_rule_action_append): Expect a location as argument.
5354 * src/reader.c (grammar_midrule_action): Adjust to attach an
5355 action's location as dummy symbol location.
5356 * src/symtab.h, src/symtab.c (startsymbol_location): New.
5357 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
5358 the line numbers.
5359
5360 2002-06-14 Akim Demaille <akim@epita.fr>
5361
5362 Grammar declarations may be found in the grammar section.
5363
5364 * src/parse-gram.y (rules_or_grammar_declaration): New.
5365 (declarations): Each declaration may end with a semicolon, not
5366 just...
5367 (grammar_declaration): `"%union"'.
5368 (grammar): Branch to rules_or_grammar_declaration.
5369
5370 2002-06-14 Akim Demaille <akim@epita.fr>
5371
5372 * src/main.c (main): Invoke scanner_free.
5373
5374 2002-06-14 Akim Demaille <akim@epita.fr>
5375
5376 * src/output.c (m4_invoke): Extracted from...
5377 (output_skeleton): here.
5378 Free tempfile.
5379
5380 2002-06-14 Akim Demaille <akim@epita.fr>
5381
5382 * src/parse-gram.y (directives, directive, gram)
5383 (grammar_directives, precedence_directives, precedence_directive):
5384 Rename as...
5385 (declarations, declaration, grammar, grammar_declaration)
5386 (precedence_declaration, precedence_declarator): these.
5387 (symbol_declaration): New.
5388
5389 2002-06-14 Akim Demaille <akim@epita.fr>
5390
5391 * src/files.c (action_obstack): Remove, unused.
5392 (output_obstack): Remove it, and all its dependencies, as it is no
5393 longer needed.
5394 * src/reader.c (epilogue_set): Build the epilogue in the
5395 muscle_obstack.
5396 * src/output.h, src/output.c (muscle_obstack): Move to...
5397 * src/muscle_tab.h, src/muscle_tab.h: here.
5398 (muscle_init): Initialize muscle_obstack.
5399 (muscle_free): New.
5400 * src/main.c (main): Call it.
5401
5402 2002-06-14 Akim Demaille <akim@epita.fr>
5403
5404 * src/location.h: New, extracted from...
5405 * src/reader.h: here.
5406 * src/Makefile.am (noinst_HEADERS): Merge into
5407 (bison_SOURCES): this.
5408 Add location.h.
5409 * src/parse-gram.y: Use location_t instead of Bison's.
5410 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
5411 Use location_t instead of ints.
5412
5413 2002-06-14 Akim Demaille <akim@epita.fr>
5414
5415 * data/bison.simple, data/bison.c++: Be sure to restore the
5416 current #line when returning to the skeleton contents after having
5417 exposed the input file's #line.
5418
5419 2002-06-12 Akim Demaille <akim@epita.fr>
5420
5421 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
5422 eager.
5423 * tests/actions.at (Exotic Dollars): New.
5424
5425 2002-06-12 Akim Demaille <akim@epita.fr>
5426
5427 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
5428 ['"/] too eagerly.
5429 * tests/input.at (Torturing the Scanner): New.
5430
5431 2002-06-11 Akim Demaille <akim@epita.fr>
5432
5433 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
5434 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
5435 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
5436 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
5437 * src/reader.c (reader): Use it.
5438
5439 2002-06-11 Akim Demaille <akim@epita.fr>
5440
5441 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
5442 Adjust all callers.
5443 (scanner_last_string_free): New.
5444
5445 2002-06-11 Akim Demaille <akim@epita.fr>
5446
5447 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
5448 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
5449 (last_string, YY_OBS_FREE): New.
5450 Use them when returning an ID.
5451
5452 2002-06-11 Akim Demaille <akim@epita.fr>
5453
5454 Have Bison grammars parsed by a Bison grammar.
5455
5456 * src/reader.c, src/reader.h (prologue_augment): New.
5457 * src/reader.c (copy_definition): Remove.
5458
5459 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
5460 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
5461 (grammar_current_rule_prec_set, grammar_current_rule_check)
5462 (grammar_current_rule_symbol_append)
5463 (grammar_current_rule_action_append): Export.
5464 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
5465 (symbol_list_action_append): Remove.
5466 Hook the routines from reader.
5467 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
5468 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
5469
5470 * src/reader.c (read_declarations): Remove, unused.
5471
5472 * src/parse-gram.y: Handle the epilogue.
5473 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
5474 (grammar_start_symbol_set): this.
5475 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
5476 * src/reader.c (readgram): Remove, unused.
5477 (reader): Adjust to insert eoftoken and axiom where appropriate.
5478
5479 * src/reader.c (copy_dollar): Replace with...
5480 * src/scan-gram.h (handle_dollar): this.
5481 * src/parse-gram.y: Remove `%thong'.
5482
5483 * src/reader.c (copy_at): Replace with...
5484 * src/scan-gram.h (handle_at): this.
5485
5486 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
5487 New.
5488
5489 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
5490 time being.
5491
5492 * src/reader.h, src/reader.c (grammar_rule_end): New.
5493
5494 * src/parse.y (current_type, current_class): New.
5495 Implement `%nterm', `%token' support.
5496 Merge `%term' into `%token'.
5497 (string_as_id): New.
5498 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
5499 type name.
5500
5501 * src/parse-gram.y: Be sure to handle properly the beginning of
5502 rules.
5503
5504 * src/parse-gram.y: Handle %type.
5505 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
5506
5507 * src/parse-gram.y: More directives support.
5508 * src/options.c: No longer handle source directives.
5509
5510 * src/parse-gram.y: Fix %output.
5511
5512 * src/parse-gram.y: Handle %union.
5513 Use the prologue locations.
5514 * src/reader.c (parse_union_decl): Remove.
5515
5516 * src/reader.h, src/reader.c (epilogue_set): New.
5517 * src/parse-gram.y: Use it.
5518
5519 * data/bison.simple, data/bison.c++: b4_stype is now either not
5520 defined, then default to int, or to the contents of %union,
5521 without `union' itself.
5522 Adjust.
5523 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
5524
5525 * src/output.c (actions_output): Don't output braces, as they are
5526 already handled by the scanner.
5527
5528 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
5529 characters to themselves.
5530
5531 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
5532 that the epilogue has a proper #line.
5533
5534 * src/parse-gram.y: Handle precedence/associativity.
5535
5536 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
5537 a terminal.
5538 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
5539 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
5540 at all to define terminals that cannot be emitted.
5541
5542 * src/scan-gram.l: Escape M4 characters.
5543
5544 * src/scan-gram.l: Working properly with escapes in user
5545 strings/characters.
5546
5547 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
5548 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
5549 grammar.
5550 Use more modest sizes, as for the time being the parser does not
5551 release memory, and therefore the process swallows a huge amount
5552 of memory.
5553
5554 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
5555 stricter %token grammar.
5556
5557 * src/symtab.h (associativity): Add `undef_assoc'.
5558 (symbol_precedence_set): Do nothing when passed an undef_assoc.
5559 * src/symtab.c (symbol_check_alias_consistence): Adjust.
5560
5561 * tests/regression.at (Invalid %directive): Remove, as it is now
5562 meaningless.
5563 (Invalid inputs): Adjust to the new error messages.
5564 (Token definitions): The new grammar doesn't allow too many
5565 eccentricities.
5566
5567 * src/lex.h, src/lex.c: Remove.
5568 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
5569 (copy_character, copy_string2, copy_string, copy_identifier)
5570 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
5571 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
5572 (parse_action): Remove.
5573 * po/POTFILES.in: Adjust.
5574
5575 2002-06-11 Akim Demaille <akim@epita.fr>
5576
5577 * src/reader.c (parse_action): Don't store directly into the
5578 rule's action member: return the action as a string.
5579 Don't require `rule_length' as an argument: compute it.
5580 (grammar_current_rule_symbol_append)
5581 (grammar_current_rule_action_append): New, eved out from
5582 (readgram): here.
5583 Remove `action_flag', `rulelength', unused now.
5584
5585 2002-06-11 Akim Demaille <akim@epita.fr>
5586
5587 * src/reader.c (grammar_current_rule_prec_set).
5588 (grammar_current_rule_check): New, eved out from...
5589 (readgram): here.
5590 Remove `xaction', `first_rhs': useless.
5591 * tests/input.at (Type clashes): New.
5592 * tests/existing.at (GNU Cim Grammar): Adjust.
5593
5594 2002-06-11 Akim Demaille <akim@epita.fr>
5595
5596 * src/reader.c (grammar_midrule_action): New, Eved out from
5597 (readgram): here.
5598
5599 2002-06-11 Akim Demaille <akim@epita.fr>
5600
5601 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
5602 New.
5603 (readgram): Use them as replacement of inlined code, crule and
5604 crule1.
5605
5606 2002-06-11 Akim Demaille <akim@epita.fr>
5607
5608 * src/reader.c (grammar_end, grammar_symbol_append): New.
5609 (readgram): Use them.
5610 Make the use of `p' as local as possible.
5611
5612 2002-06-10 Akim Demaille <akim@epita.fr>
5613
5614 GCJ's parser requires the tokens to be defined before the prologue.
5615
5616 * data/bison.simple: Output the token definition before the user's
5617 prologue.
5618 * tests/regression.at (Braces parsing, Duplicate string)
5619 (Mixing %token styles): Check the output from bison.
5620 (Early token definitions): New.
5621
5622 2002-06-10 Akim Demaille <akim@epita.fr>
5623
5624 * src/symtab.c (symbol_user_token_number_set): Don't complain when
5625 assigning twice the same user number to a token, so that we can
5626 use it in...
5627 * src/lex.c (lex): here.
5628 Also use `symbol_class_set' instead of hand written code.
5629 * src/reader.c (parse_assoc_decl): Likewise.
5630
5631 2002-06-10 Akim Demaille <akim@epita.fr>
5632
5633 * src/symtab.c, src/symtab.c (symbol_class_set)
5634 (symbol_user_token_number_set): New.
5635 * src/reader.c (parse_token_decl): Use them.
5636 Use a switch instead of ifs.
5637 Use a single argument.
5638
5639 2002-06-10 Akim Demaille <akim@epita.fr>
5640
5641 Remove `%thong' support as it is undocumented, unused, duplicates
5642 `%token's job, and creates useless e-mail traffic with people who
5643 want to know what it is, why it is undocumented, unused, and
5644 duplicates `%token's job.
5645
5646 * src/reader.c (parse_thong_decl): Remove.
5647 * src/options.c (option_table): Remove "thong".
5648 * src/lex.h (tok_thong): Remove.
5649
5650 2002-06-10 Akim Demaille <akim@epita.fr>
5651
5652 * src/symtab.c, src/symtab.c (symbol_type_set)
5653 (symbol_precedence_set): New.
5654 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
5655 (value_components_used): Remove, unused.
5656
5657 2002-06-09 Akim Demaille <akim@epita.fr>
5658
5659 Move symbols handling code out of the reader.
5660
5661 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
5662 (axiom): Move to...
5663 * src/symtab.h, src/symtab.c: here.
5664
5665 * src/gram.c (start_symbol): Remove: use startsymbol->number.
5666 * src/reader.c (startval): Rename as...
5667 * src/symtab.h, src/symtab.c (startsymbol): this.
5668 * src/reader.c: Adjust.
5669
5670 * src/reader.c (symbol_check_defined, symbol_make_alias)
5671 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5672 (token_translations_init)
5673 Move to...
5674 * src/symtab.c: here.
5675 * src/reader.c (packsymbols): Move to...
5676 * src/symtab.h, src/symtab.c (symbols_pack): here.
5677 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
5678 argument.
5679
5680 2002-06-03 Akim Demaille <akim@epita.fr>
5681
5682 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
5683 then statements.
5684
5685 2002-06-03 Akim Demaille <akim@epita.fr>
5686
5687 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
5688 structs with non literals.
5689 * src/scan-skel.l: never-interactive.
5690 * src/conflicts.c (enum conflict_resolution_e): No trailing
5691 comma.
5692 * src/getargs.c (usage): Split long literal strings.
5693 Reported by Hans Aberg.
5694
5695 2002-05-28 Akim Demaille <akim@epita.fr>
5696
5697 * data/bison.c++: Use C++ ostreams.
5698 (cdebug_): New member.
5699
5700 2002-05-28 Akim Demaille <akim@epita.fr>
5701
5702 * src/output.c (output_skeleton): Be sure to allocate enough room
5703 for `/' _and_ for `\0' in full_skeleton.
5704
5705 2002-05-28 Akim Demaille <akim@epita.fr>
5706
5707 * data/bison.c++: Catch up with bison.simple:
5708 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5709 and Paul Eggert <eggert@twinsun.com>: `error' handing.
5710 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
5711 and popping traces.
5712
5713 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5714
5715 * src/output.c (output_skeleton): Put an explicit path in front of
5716 the skeleton file name, rather than relying on the -I directory,
5717 to partially alleviate effects of having a skeleton file lying around
5718 in the current directory.
5719
5720 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5721
5722 * src/conflicts.c (log_resolution): Correct typo:
5723 obstack_printf should be obstack_fgrow1.
5724
5725 2002-05-26 Akim Demaille <akim@epita.fr>
5726
5727 * src/state.h (state_t): `solved_conflicts' is a new member.
5728 * src/LR0.c (new_state): Set it to 0.
5729 * src/conflicts.h, src/conflicts.c (print_conflicts)
5730 (free_conflicts, solve_conflicts): Rename as...
5731 (conflicts_print, conflicts_free, conflicts_solve): these.
5732 Adjust callers.
5733 * src/conflicts.c (enum conflict_resolution_e)
5734 (solved_conflicts_obstack): New, used by...
5735 (log_resolution): this.
5736 Adjust to attach the conflict resolution to each state.
5737 Complete the description with the precedence/associativity
5738 information.
5739 (resolve_sr_conflict): Adjust.
5740 * src/print.c (print_state): Output its solved_conflicts.
5741 * tests/conflicts.at (Unresolved SR Conflicts)
5742 (Solved SR Conflicts): Exercise --report=all.
5743
5744 2002-05-26 Akim Demaille <akim@epita.fr>
5745
5746 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5747 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5748 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
5749 (token_number_t, item_number_as_token_number)
5750 (token_number_as_item_number, muscle_insert_token_number_table):
5751 Rename as...
5752 (symbol_number_t, item_number_as_symbol_number)
5753 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
5754 these, since it is more appropriate.
5755
5756 2002-05-26 Akim Demaille <akim@epita.fr>
5757
5758 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
5759 `Error:' lines.
5760 * data/bison.simple (yystos) [YYDEBUG]: New.
5761 (yyparse) [YYDEBUG]: Display the symbols which are popped during
5762 error recovery.
5763 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
5764
5765 2002-05-25 Akim Demaille <akim@epita.fr>
5766
5767 * doc/bison.texinfo (Debugging): Split into...
5768 (Tracing): this new section, its former contents, and...
5769 (Understanding): this new section.
5770 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
5771 by...
5772 (report_flag): this.
5773 Adjust all dependencies.
5774 (report_args, report_types, report_argmatch): New.
5775 (usage, getargs): Report/support -r, --report.
5776 * src/options.h
5777 (struct option_table_struct): Rename as..,
5778 (struct option_table_s): this.
5779 Rename the `set_flag' member to `flag' to match with getopt_long's
5780 struct.
5781 * src/options.c (option_table): Split verbose into an entry for
5782 %verbose, and another for --verbose.
5783 Support --report/-r, so remove -r from the obsolete --raw.
5784 * src/print.c: Attach full item sets and lookaheads reports to
5785 report_flag instead of trace_flag.
5786 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5787
5788 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5789 and Paul Eggert <eggert@twinsun.com>
5790
5791 * data/bison.simple (yyparse): Correct error handling to conform to
5792 POSIX and yacc. Specifically, after syntax error is discovered,
5793 do not reduce further before shifting the error token.
5794 Clean up the code a bit by removing the labels yyerrdefault,
5795 yyerrhandle, yyerrpop.
5796 * NEWS: Document the above.
5797
5798 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5799
5800 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5801 type; it isn't always big enough, since it doesn't necessarily
5802 include non-terminals.
5803 (yytranslate): Expand definition of yy_token_number_type, so that
5804 the latter can be removed.
5805 (yy_token_number_type): Remove, only one use.
5806 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5807 don't use TokenNumberType as element type.
5808
5809 * tests/regression.at: Modify expected output to agree with change
5810 to yyr1 and yytranslate.
5811
5812 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5813
5814 * src/reader.c (parse_action): Use copy_character instead of
5815 obstack_1grow.
5816
5817 2002-05-13 Akim Demaille <akim@epita.fr>
5818
5819 * tests/regression.at (Token definitions): Prototype yylex and
5820 yyerror.
5821
5822 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5823
5824 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
5825 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5826 32-bit arithmetic.
5827 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5828
5829 2002-05-07 Akim Demaille <akim@epita.fr>
5830
5831 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5832 avoid GCC warnings.
5833
5834 2002-05-07 Akim Demaille <akim@epita.fr>
5835
5836 Kill GCC warnings.
5837
5838 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5839 over the RHS of each rule.
5840 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5841 * src/state.h (state_t): Member `nitems' is unsigned short.
5842 * src/LR0.c (get_state): Adjust.
5843 * src/reader.c (packgram): Likewise.
5844 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5845 `Type'.
5846 (muscle_insert_int_table): Remove, unused.
5847 (prepare_rules): Remove `max'.
5848
5849 2002-05-06 Akim Demaille <akim@epita.fr>
5850
5851 * src/closure.c (print_firsts): Display of the symbol tags.
5852 (bitmatrix_print): Move to...
5853 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5854 here.
5855 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5856
5857 2002-05-06 Akim Demaille <akim@epita.fr>
5858
5859 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5860 hash_do_for_each.
5861
5862 2002-05-06 Akim Demaille <akim@epita.fr>
5863
5864 * src/LR0.c (new_state, get_state): Instead of using the global
5865 `kernel_size' and `kernel_base', have two new arguments:
5866 `core_size' and `core'.
5867 Adjust callers.
5868
5869 2002-05-06 Akim Demaille <akim@epita.fr>
5870
5871 * src/reader.c (packgram): No longer end `ritem' with a 0
5872 sentinel: it is not used.
5873
5874 2002-05-05 Akim Demaille <akim@epita.fr>
5875
5876 New experimental feature: display the lookaheads in the report and
5877 graph.
5878
5879 * src/print (print_core): When --trace-flag, display the rules
5880 lookaheads.
5881 * src/print_graph.c (print_core): Likewise.
5882 Swap the arguments.
5883 Adjust caller.
5884
5885 2002-05-05 Akim Demaille <akim@epita.fr>
5886
5887 * tests/torture.at (Many lookaheads): New test.
5888
5889 2002-05-05 Akim Demaille <akim@epita.fr>
5890
5891 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
5892 (GENERATE_MUSCLE_INSERT_TABLE): this.
5893 (output_int_table, output_unsigned_int_table, output_short_table)
5894 (output_token_number_table, output_item_number_table): Replace with...
5895 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
5896 (muscle_insert_short_table, muscle_insert_token_number_table)
5897 (muscle_insert_item_number_table): these.
5898 Adjust all callers.
5899 (prepare_tokens): Don't free `translations', since...
5900 * src/reader.h, src/reader.c (grammar_free): do it.
5901 Move to...
5902 * src/gram.h, src/gram.c (grammar_free): here.
5903 * data/bison.simple, data/bison.c++: b4_token_number_max is now
5904 b4_translate_max.
5905
5906 2002-05-05 Akim Demaille <akim@epita.fr>
5907
5908 * src/output.c (output_unsigned_int_table): New.
5909 (prepare_rules): `i' is unsigned.
5910 `prhs', `rline', `r2' are unsigned int.
5911 Rename muscle `rhs_number_max' as `rhs_max'.
5912 Output muscles `prhs_max', `rline_max', and `r2_max'.
5913 Free rline and r1.
5914 * data/bison.simple, data/bison.c++: Adjust to use these muscles
5915 to compute types instead of constant types.
5916 * tests/regression.at (Web2c Actions): Adjust.
5917
5918 2002-05-04 Akim Demaille <akim@epita.fr>
5919
5920 * src/symtab.h (SALIAS, SUNDEF): Rename as...
5921 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
5922 Adjust dependencies.
5923 * src/output.c (token_definitions_output): Be sure not to output a
5924 `#define 'a'' when fed with `%token 'a' "a"'.
5925 * tests/regression.at (Token definitions): New.
5926
5927 2002-05-03 Paul Eggert <eggert@twinsun.com>
5928
5929 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
5930 for K&R C.
5931
5932 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
5933
5934 * Makefile.am (SUBDIRS): Remove intl.
5935 (EXTRA_DIST): Add config/config.rpath.
5936
5937 2002-05-03 Akim Demaille <akim@epita.fr>
5938
5939 * data/bison.simple (m4_if): Don't output empty enums.
5940 And actually, output valid enum definitions :(.
5941
5942 2002-05-03 Akim Demaille <akim@epita.fr>
5943
5944 * configure.bat: Remove, completely obsolete.
5945 * Makefile.am (EXTRA_DIST): Adjust.
5946 Don't distribute config.rpath...
5947 * config/Makefile.am (EXTRA_DIST): Do it.
5948
5949 2002-05-03 Akim Demaille <akim@epita.fr>
5950
5951 * configure.in (GETTEXT_VERSION): New.
5952 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
5953
5954 2002-05-03 Akim Demaille <akim@epita.fr>
5955
5956 * data/bison.simple (b4_token_enum): New.
5957 (b4_token_defines): Use it to output tokens both as #define and
5958 enums.
5959 Suggested by Paul Eggert.
5960 * src/output.c (token_definitions_output): Don't output spurious
5961 white spaces.
5962
5963 2002-05-03 Akim Demaille <akim@epita.fr>
5964
5965 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5966
5967 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
5968
5969 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
5970 Update the stack class, give a try to deque as the default container.
5971
5972 2002-05-02 Akim Demaille <akim@epita.fr>
5973
5974 * data/bison.simple (yyparse): Do not implement @$ = @1.
5975 (YYLLOC_DEFAULT): Adjust to do it.
5976 * doc/bison.texinfo (Location Default Action): Fix.
5977
5978 2002-05-02 Akim Demaille <akim@epita.fr>
5979
5980 * src/reader.c (parse_braces): Merge into...
5981 (parse_action): this.
5982
5983 2002-05-02 Akim Demaille <akim@epita.fr>
5984
5985 * configure.in (ALL_LINGUAS): Remove.
5986 * po/LINGUAS, hr.po: New.
5987
5988 2002-05-02 Akim Demaille <akim@epita.fr>
5989
5990 Remove the so called hairy (semantic) parsers.
5991
5992 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
5993 * src/gram.h, src/gram.c (semantic_parser): Remove.
5994 (rule_t): Remove the guard and guard_line members.
5995 * src/lex.h (token_t): remove tok_guard.
5996 * src/options.c (option_table): Remove %guard and %semantic_parser
5997 support.
5998 * src/output.c, src/output.h (guards_output): Remove.
5999 (prepare): Adjust.
6000 (token_definitions_output): Don't output the `T'
6001 tokens (???).
6002 (output_skeleton): Don't output the guards.
6003 * src/files.c, src/files.c (attrsfile): Remove.
6004 * src/reader.c (symbol_list): Remove the guard and guard_line
6005 members.
6006 Adjust dependencies.
6007 (parse_guard): Remove.
6008 * data/bison.hairy: Remove.
6009 * doc/bison.texinfo (Environment Variables): Remove occurrences of
6010 BISON_HAIRY.
6011
6012 2002-05-02 Akim Demaille <akim@epita.fr>
6013
6014 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
6015 (parse_guard): Rename the formal argument `stack_offset' as
6016 `rule_length', which is more readable.
6017 Adjust callers.
6018 (copy_at, copy_dollar): Instead of outputting the hard coded
6019 values of $$, $n and so forth, output invocation to b4_lhs_value,
6020 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
6021 Note: this patch partially drops `semantic-parser' support: it
6022 always does `rule_length - n', where semantic parsers ought to
6023 always use `-n'.
6024 * data/bison.simple, data/bison.c++ (b4_lhs_value)
6025 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
6026
6027 2002-05-02 Akim Demaille <akim@epita.fr>
6028
6029 * configure.in (AC_INIT): Bump to 1.49b.
6030 (AM_INIT_AUTOMAKE): Short invocation.
6031
6032 2002-05-02 Akim Demaille <akim@epita.fr>
6033
6034 Version 1.49a.
6035
6036 2002-05-01 Akim Demaille <akim@epita.fr>
6037
6038 * src/skeleton.h: Remove.
6039
6040 2002-05-01 Akim Demaille <akim@epita.fr>
6041
6042 * src/skeleton.h: Fix the #endif.
6043 Reported by Magnus Fromreide.
6044
6045 2002-04-26 Paul Eggert <eggert@twinsun.com>
6046
6047 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
6048 Define if we define YYSTYPE and YYLTYPE, respectively.
6049 (YYCOPY): Fix [] quoting problem in the non-GCC case.
6050
6051 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
6052
6053 * src/scan-skel.l: Postprocess quadrigraphs.
6054
6055 * src/reader.c (copy_character): New function, used to output
6056 single characters while replacing `[' and `]' with quadrigraphs, to
6057 avoid troubles with M4 quotes.
6058 (copy_comment): Output characters with copy_character.
6059 (read_additionnal_code): Likewise.
6060 (copy_string2): Likewise.
6061 (copy_definition): Likewise.
6062
6063 * tests/calc.at: Exercise M4 quoting.
6064
6065 2002-04-25 Akim Demaille <akim@epita.fr>
6066
6067 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
6068 between `!' and the command.
6069 Reported by Paul Eggert.
6070
6071 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
6072
6073 * tests/calc.at: Exercise prologue splitting.
6074
6075 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
6076 `b4_post_prologue' instead of `b4_prologue'.
6077
6078 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
6079 muscles.
6080 (output): Free pre_prologue_obstack and post_prologue_obstack.
6081 * src/files.h, src/files.c (attrs_obstack): Remove.
6082 (pre_prologue_obstack, post_prologue_obstack): New.
6083 * src/reader.c (copy_definition): Add a parameter to specify the
6084 obstack to fill, instead of using attrs_obstack unconditionally.
6085 (read_declarations): Pass pre_prologue_obstack to copy_definition if
6086 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
6087
6088 2002-04-23 Paul Eggert <eggert@twinsun.com>
6089
6090 * data/bison.simple: Remove unnecessary commentary and white
6091 space differences from 1_29-branch.
6092 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
6093
6094 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
6095 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
6096 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
6097 constructors or destructors.
6098
6099 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
6100
6101 2002-04-23 Akim Demaille <akim@epita.fr>
6102
6103 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
6104 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
6105 location with columns.
6106 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
6107 All reported by Paul Eggert.
6108
6109 2002-04-22 Akim Demaille <akim@epita.fr>
6110
6111 * src/reduce.c (dump_grammar): Move to...
6112 * src/gram.h, src/gram.c (grammar_dump): here.
6113 Be sure to separate long item numbers.
6114 Don't read the members of a rule's prec if its nil.
6115
6116 2002-04-22 Akim Demaille <akim@epita.fr>
6117
6118 * src/output.c (table_size, table_grow): New.
6119 (MAXTABLE): Remove, replace uses with table_size.
6120 (pack_vector): Instead of dying when the table is too big, grow it.
6121
6122 2002-04-22 Akim Demaille <akim@epita.fr>
6123
6124 * data/bison.simple (yyr1): Its type is that of a token number.
6125 * data/bison.c++ (r1_): Likewise.
6126 * tests/regression.at (Web2c Actions): Adjust.
6127
6128 2002-04-22 Akim Demaille <akim@epita.fr>
6129
6130 * src/reader.c (token_translations_init): 256 is now the default
6131 value for the error token, i.e., it will be assigned another
6132 number if the user assigned 256 to one of her tokens.
6133 (reader): Don't force 256 to error.
6134 * doc/bison.texinfo (Symbols): Adjust.
6135 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
6136 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
6137 etc. instead of 10, 20, 30 (which was used to `jump' over error
6138 (256) and undefined (2)).
6139
6140 2002-04-22 Akim Demaille <akim@epita.fr>
6141
6142 Propagate more token_number_t.
6143
6144 * src/gram.h (token_number_as_item_number)
6145 (item_number_as_token_number): New.
6146 * src/output.c (GENERATE_OUTPUT_TABLE): New.
6147 Use it to create output_item_number_table and
6148 output_token_number_table.
6149 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
6150 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
6151 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
6152 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
6153
6154 2002-04-22 Akim Demaille <akim@epita.fr>
6155
6156 * src/output.h, src/output.c (get_lines_number): Remove.
6157
6158 2002-04-19 Akim Demaille <akim@epita.fr>
6159
6160 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
6161 as Lex/Flex'.
6162 (Debugging): More details about enabling the debugging features.
6163 (Table of Symbols): Describe $$, $n, @$, and @n.
6164 Suggested by Tim Josling.
6165
6166 2002-04-19 Akim Demaille <akim@epita.fr>
6167
6168 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
6169
6170 2002-04-10 Akim Demaille <akim@epita.fr>
6171
6172 * src/system.h: Rely on HAVE_LIMITS_H.
6173 Suggested by Paul Eggert.
6174
6175 2002-04-09 Akim Demaille <akim@epita.fr>
6176
6177 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
6178 full stderr, and strip it according to the bison options, instead
6179 of composing the error message from different bits.
6180 This makes it easier to check for several error messages.
6181 Adjust all the invocations.
6182 Add an invocation exercising the error token.
6183 Add an invocation demonstrating a stupid error message.
6184 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
6185 Adjust the tests.
6186 Error message are for stderr, not stdout.
6187
6188 2002-04-09 Akim Demaille <akim@epita.fr>
6189
6190 * src/gram.h, src/gram.c (error_token_number): Remove, use
6191 errtoken->number.
6192 * src/reader.c (reader): Don't specify the user token number (2)
6193 for $undefined, as it uselessly prevents using it.
6194 * src/gram.h (token_number_t): Move to...
6195 * src/symtab.h: here.
6196 (state_t.number): Is a token_number_t.
6197 * src/print.c, src/reader.c: Use undeftoken->number instead of
6198 hard coded 2.
6199 (Even though this 2 is not the same as above: the number of the
6200 undeftoken remains being 2, it is its user token number which
6201 might not be 2).
6202 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
6203 `user_token_number_max'.
6204 Output `undef_token_number'.
6205 * data/bison.simple, data/bison.c++: Use them.
6206 Be sure to map invalid yylex return values to
6207 `undef_token_number'. This saves us from gratuitous SEGV.
6208
6209 * tests/conflicts.at (Solved SR Conflicts)
6210 (Unresolved SR Conflicts): Adjust.
6211 * tests/regression.at (Web2c Actions): Adjust.
6212
6213 2002-04-08 Akim Demaille <akim@epita.fr>
6214
6215 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
6216 Adding #line.
6217 Remove the duplicate `typedefs'.
6218 (RhsNumberType): Fix the declaration and various other typos.
6219 Use __ofile__.
6220 * data/bison.simple: Use __ofile__.
6221 * src/scan-skel.l: Handle __ofile__.
6222
6223 2002-04-08 Akim Demaille <akim@epita.fr>
6224
6225 * src/gram.h (item_number_t): New, the type of item numbers in
6226 RITEM. Note that it must be able to code symbol numbers as
6227 positive number, and the negation of rule numbers as negative
6228 numbers.
6229 Adjust all dependencies (pretty many).
6230 * src/reduce.c (rule): Remove this `short *' pointer: use
6231 item_number_t.
6232 * src/system.h (MINSHORT, MAXSHORT): Remove.
6233 Include `limits.h'.
6234 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
6235 (shortcpy): Remove.
6236 (MAXTABLE): Move to...
6237 * src/output.c (MAXTABLE): here.
6238 (prepare_rules): Use output_int_table to output rhs.
6239 * data/bison.simple, data/bison.c++: Adjust.
6240 * tests/torture.at (Big triangle): Move the limit from 254 to
6241 500.
6242 * tests/regression.at (Web2c Actions): Ajust.
6243
6244 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
6245 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
6246 passes, but produces negative #line number, once fixed, GCC is
6247 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
6248 C), it passes.
6249 * src/state.h (state_h): Code input lines on ints, not shorts.
6250
6251 2002-04-08 Akim Demaille <akim@epita.fr>
6252
6253 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
6254 and then the grammar.
6255
6256 2002-04-08 Akim Demaille <akim@epita.fr>
6257
6258 * src/system.h: No longer using strndup.
6259
6260 2002-04-07 Akim Demaille <akim@epita.fr>
6261
6262 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
6263 * src/output.c (output_table_data): Return the longest number.
6264 (prepare_tokens): Output `token_number_max').
6265 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
6266 New.
6267 Use them to define yy_token_number_type/TokenNumberType.
6268 Use this type for yytranslate.
6269 * tests/torture.at (Big triangle): Push the limit from 124 to
6270 253.
6271 * tests/regression.at (Web2c Actions): Adjust.
6272
6273 2002-04-07 Akim Demaille <akim@epita.fr>
6274
6275 * tests/torture.at (Big triangle): New.
6276 (GNU AWK Grammar, GNU Cim Grammar): Move to...
6277 * tests/existing.at: here.
6278
6279 2002-04-07 Akim Demaille <akim@epita.fr>
6280
6281 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
6282 nritems.
6283 Adjust dependencies.
6284
6285 2002-04-07 Akim Demaille <akim@epita.fr>
6286
6287 * src/reader.c: Normalize increments to prefix form.
6288
6289 2002-04-07 Akim Demaille <akim@epita.fr>
6290
6291 * src/reader.c, symtab.c: Remove debugging code.
6292
6293 2002-04-07 Akim Demaille <akim@epita.fr>
6294
6295 Rename all the `bucket's as `symbol_t'.
6296
6297 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
6298 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
6299 * src/symtab.c, src/symtab.h (bucket): Rename as...
6300 (symbol_t): this.
6301 (symbol_list_new, bucket_check_defined, bucket_make_alias)
6302 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
6303 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6304 (buckets_new, buckets_free, buckets_do): Rename as...
6305 (symbol_list_new, symbol_check_defined, symbol_make_alias)
6306 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
6307 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
6308 (symbols_new, symbols_free, symbols_do): these.
6309
6310 2002-04-07 Akim Demaille <akim@epita.fr>
6311
6312 Use lib/hash for the symbol table.
6313
6314 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
6315 EOF.
6316 * src/lex.c (lex): Set the `number' member of new terminals.
6317 * src/reader.c (bucket_check_defined, bucket_make_alias)
6318 (bucket_check_alias_consistence, bucket_translation): New.
6319 (reader, grammar_free, readgram, token_translations_init)
6320 (packsymbols): Adjust.
6321 (reader): Number the predefined tokens.
6322 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
6323 for predefined tokens.
6324 * src/symtab.h (bucket): Remove all the hash table related
6325 members.
6326 * src/symtab.c (symtab): Replace by...
6327 (bucket_table): this.
6328 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6329 (buckets_new, buckets_do): New.
6330
6331 2002-04-07 Akim Demaille <akim@epita.fr>
6332
6333 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
6334 (start_symbol, max_user_token_number, semantic_parser)
6335 (error_token_number): Initialize.
6336 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
6337 Initialize.
6338 (reader): Don't.
6339 (errtoken, eoftoken, undeftoken, axiom): Extern.
6340
6341 2002-04-07 Akim Demaille <akim@epita.fr>
6342
6343 * src/gram.h (rule_s): prec and precsym are now pointers
6344 to the bucket giving the priority/associativity.
6345 Member `associativity' removed: useless.
6346 * src/reduce.c, src/conflicts.c: Adjust.
6347
6348 2002-04-07 Akim Demaille <akim@epita.fr>
6349
6350 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
6351 Properly escape the symbols' TAG when outputting them.
6352
6353 2002-04-07 Akim Demaille <akim@epita.fr>
6354
6355 * src/lalr.h (LA): Is a bitsetv, not bitset*.
6356
6357 2002-04-07 Akim Demaille <akim@epita.fr>
6358
6359 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
6360 (LArule): this, which is an array to rule_t*.
6361 * src/print.c, src/conflicts.c: Adjust.
6362
6363 2002-04-07 Akim Demaille <akim@epita.fr>
6364
6365 * src/gram.h (rule_t): Rename `number' as `user_number'.
6366 `number' is a new member.
6367 Adjust dependencies.
6368 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
6369
6370 2002-04-07 Akim Demaille <akim@epita.fr>
6371
6372 As a result of the previous patch, it is no longer needed
6373 to reorder ritem itself.
6374
6375 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
6376
6377 2002-04-07 Akim Demaille <akim@epita.fr>
6378
6379 Be sure never to walk through RITEMS, but use only data related to
6380 the rules themselves. RITEMS should be banished.
6381
6382 * src/output.c (output_token_translations): Rename as...
6383 (prepare_tokens): this.
6384 In addition to `translate', prepare the muscles `tname' and
6385 `toknum', which were handled by...
6386 (output_rule_data): this.
6387 Remove, and move the remainder of its outputs into...
6388 (prepare_rules): this new routines, which also merges content from
6389 (output_gram): this.
6390 (prepare_rules): Be sure never to walk through RITEMS.
6391 (output_stos): Rename as...
6392 (prepare_stos): this.
6393 (output): Always invoke prepare_states, after all, just don't use it
6394 in the output if you don't need it.
6395
6396 2002-04-07 Akim Demaille <akim@epita.fr>
6397
6398 * src/LR0.c (new_state): Display `nstates' as the name of the
6399 newly created state.
6400 Adjust to initialize first_state and last_state if needed.
6401 Be sure to distinguish the initial from the final state.
6402 (new_states): Create the itemset of the initial state, and use
6403 new_state.
6404 * src/closure.c (closure): Now that the initial state has its
6405 items properly set, there is no need for a special case when
6406 creating `ruleset'.
6407
6408 As a result, now the rule 0, reducing to $axiom, is visible in the
6409 outputs. Adjust the test suite.
6410
6411 * tests/conflicts.at (Solved SR Conflicts)
6412 (Unresolved SR Conflicts): Adjust.
6413 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
6414 * tests/conflicts.at (S/R in initial): New.
6415
6416 2002-04-07 Akim Demaille <akim@epita.fr>
6417
6418 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
6419 the RHS of the rules.
6420 * src/output.c (output_gram): Likewise.
6421
6422 2002-04-07 Akim Demaille <akim@epita.fr>
6423
6424 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
6425 bucket.
6426 Adjust all dependencies.
6427 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
6428 `number' of the buckets too.
6429 * src/gram.h: Include `symtab.h'.
6430 (associativity): Move to...
6431 * src/symtab.h: here.
6432 No longer include `gram.h'.
6433
6434 2002-04-07 Akim Demaille <akim@epita.fr>
6435
6436 * src/gram.h, src/gram.c (rules_rhs_length): New.
6437 (ritem_longest_rhs): Use it.
6438 * src/gram.h (rule_t): `number' is a new member.
6439 * src/reader.c (packgram): Set it.
6440 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
6441 the end of `rules', and count them out of `nrules'.
6442 (reduce_output, dump_grammar): Adjust.
6443 * src/print.c (print_grammar): It is no longer needed to check for
6444 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
6445 * tests/reduce.at (Reduced Automaton): New test.
6446
6447 2002-04-07 Akim Demaille <akim@epita.fr>
6448
6449 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
6450 lacking `+ 1' to nrules, Bison reported as useless a token if it
6451 was used solely to set the precedence of the last rule...
6452
6453 2002-04-07 Akim Demaille <akim@epita.fr>
6454
6455 * data/bison.c++, data/bison.simple: Don't output the current file
6456 name in #line, to avoid useless diffs between two identical
6457 outputs under different names.
6458
6459 2002-04-07 Akim Demaille <akim@epita.fr>
6460
6461 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
6462 Normalize loops to using `< nrules + 1', not `<= nrules'.
6463
6464 2002-04-07 Akim Demaille <akim@epita.fr>
6465
6466 * TODO: Update.
6467
6468 2002-04-07 Akim Demaille <akim@epita.fr>
6469
6470 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
6471 bucket.value as bucket.number.
6472
6473 2002-04-07 Akim Demaille <akim@epita.fr>
6474
6475 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
6476 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
6477 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
6478 RHS, instead of being an index in RITEMS.
6479
6480 2002-04-04 Paul Eggert <eggert@twinsun.com>
6481
6482 * doc/bison.texinfo: Update copyright date.
6483 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
6484 (Symbols): Warn about running Bison in one character set,
6485 but compiling and/or running in an incompatible one.
6486 Warn about character code 256, too.
6487
6488 2002-04-03 Paul Eggert <eggert@twinsun.com>
6489
6490 * src/bison.data (YYSTACK_ALLOC): Depend on whether
6491 YYERROR_VERBOSE is nonzero, not whether it is defined.
6492
6493 Merge changes from bison-1_29-branch.
6494
6495 2002-03-20 Paul Eggert <eggert@twinsun.com>
6496
6497 Merge fixes from Debian bison_1.34-1.diff.
6498
6499 * configure.in (AC_PREREQ): 2.53.
6500
6501 2002-03-20 Akim Demaille <akim@epita.fr>
6502
6503 * src/conflicts.c (log_resolution): Argument `resolution' is const.
6504
6505 2002-03-19 Paul Eggert <eggert@twinsun.com>
6506
6507 * src/bison.simple (YYCOPY): New macro.
6508 (YYSTACK_RELOCATE): Use it.
6509 Remove Type arg; no longer needed. All callers changed.
6510 (yymemcpy): Remove; no longer needed.
6511
6512 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
6513 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6514
6515 2002-03-19 Akim Demaille <akim@epita.fr>
6516
6517 Test and fix the #line outputs.
6518
6519 * tests/atlocal.at (GCC): New.
6520 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
6521 (Prologue synch line, ,%union synch line, Postprologue synch line)
6522 (Action synch line, Epilogue synch line): New tests.
6523 * src/reader.c (parse_union_decl): Define the muscle stype_line.
6524 * data/bison.simple, data/bison.c++: Use it.
6525
6526 2002-03-19 Akim Demaille <akim@epita.fr>
6527
6528 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
6529 (Solved SR Conflicts, %expect not enough, %expect right)
6530 (%expect too much): Move to...
6531 * tests/conflicts.at: this new file.
6532
6533 2002-03-19 Akim Demaille <akim@epita.fr>
6534
6535 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6536 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
6537 that we can move to enums for instance.
6538 * src/output.c (token_definitions_output): Output a list of
6539 `token-name, token-number' instead of the #define.
6540 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
6541
6542 2002-03-14 Akim Demaille <akim@epita.fr>
6543
6544 Use Gettext 0.11.1.
6545
6546 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
6547
6548 * data/bison.c++: Make the user able to add members to the generated
6549 parser by subclassing.
6550
6551 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
6552
6553 * src/reader.c (read_additionnal_code): `c' should be an integer, not
6554 a character.
6555 Reported by Nicolas Tisserand and Nicolas Burrus.
6556
6557 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6558
6559 * src/reader.c: Warn about lacking semi-colons, do not complain.
6560
6561 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6562
6563 * data/bison.c++: Remove a debug line.
6564
6565 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6566
6567 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
6568 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
6569 provide a default implementation.
6570
6571 2002-03-04 Akim Demaille <akim@epita.fr>
6572
6573 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
6574 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
6575 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
6576 * tests/semantic.at (Parsing Guards): Similarly.
6577 * src/reader.at (readgram): Complain if the last rule is not ended
6578 with a semi-colon.
6579
6580 2002-03-04 Akim Demaille <akim@epita.fr>
6581
6582 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
6583 * src/closure.c: here.
6584 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
6585 RTC.
6586 * src/warshall.h, src/warshall.c: Remove.
6587 * tests/sets.at (Broken Closure): Adjust.
6588
6589 2002-03-04 Akim Demaille <akim@epita.fr>
6590
6591 * src/output.c (output_skeleton): tempdir is const.
6592 bytes_read is unused.
6593
6594 2002-03-04 Akim Demaille <akim@epita.fr>
6595
6596 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6597 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
6598 Update.
6599 From Michael Hayes.
6600
6601 2002-03-04 Akim Demaille <akim@epita.fr>
6602
6603 * src/closure.c (closure): `r' is unused.
6604
6605 2002-03-04 Akim Demaille <akim@epita.fr>
6606
6607 * tests/sets.at (Broken Closure): Add the ending `;'.
6608 * src/reader.at (readgram): Complain if a rule is not ended with a
6609 semi-colon.
6610
6611 2002-03-04 Akim Demaille <akim@epita.fr>
6612
6613 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
6614 (count_sr_conflicts): Use bitset_count.
6615 * src/reduce.c (inaccessable_symbols): Ditto.
6616 (bits_size): Remove.
6617 * src/warshall.h, src/warshall.c: Convert to bitsetv.
6618
6619 2002-03-04 Akim Demaille <akim@epita.fr>
6620
6621 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
6622 * src/reduce.c: Remove the `bitset_zero's following the
6623 `bitset_create's, as now it is performed by the latter.
6624
6625 2002-03-04 Akim Demaille <akim@epita.fr>
6626
6627 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
6628 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
6629 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
6630 latest sources from Michael.
6631
6632 2002-03-04 Akim Demaille <akim@epita.fr>
6633
6634 * src/output.c (output): Don't free the grammar.
6635 * src/reader.c (grammar_free): New.
6636 * src/main.c (main): Call it and don't free symtab here.
6637
6638 2002-03-04 Akim Demaille <akim@epita.fr>
6639
6640 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
6641 before returning.
6642 Reported by Benoit Perrot.
6643
6644 2002-03-04 Akim Demaille <akim@epita.fr>
6645
6646 Use bitset operations when possible, not loops over bits.
6647
6648 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
6649 bitset_or.
6650 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
6651 * src/reduce.c (useless_nonterminals): Formatting changes.
6652 * src/warshall.c (TC): Use bitset_or.
6653
6654 2002-03-04 Akim Demaille <akim@epita.fr>
6655
6656 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
6657 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
6658 Ditto.
6659
6660 2002-03-04 Akim Demaille <akim@epita.fr>
6661
6662 * src/lalr.c (F): Now a bitset*.
6663 Adjust all dependencies.
6664
6665 2002-03-04 Akim Demaille <akim@epita.fr>
6666
6667 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
6668 Adjust all dependencies.
6669
6670 2002-03-04 Akim Demaille <akim@epita.fr>
6671
6672 * src/L0.c, src/LR0.h (nstates): Be size_t.
6673 Adjust comparisons (signed vs unsigned).
6674 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
6675 bitset*.
6676 Adjust all dependencies.
6677
6678 2002-03-04 Akim Demaille <akim@epita.fr>
6679
6680 * src/closure.c (firsts): Now, also a bitset.
6681 Adjust all dependencies.
6682 (varsetsize): Remove, now unused.
6683 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
6684
6685 2002-03-04 Akim Demaille <akim@epita.fr>
6686
6687 * src/print.c: Convert to use bitset.h, not hand coded iterations
6688 over ints.
6689
6690 2002-03-04 Akim Demaille <akim@epita.fr>
6691
6692 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
6693
6694 2002-03-04 Akim Demaille <akim@epita.fr>
6695
6696 * src/closure.c (ruleset): Be a bitset.
6697 (rulesetsize): Remove.
6698
6699 2002-03-04 Akim Demaille <akim@epita.fr>
6700
6701 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6702 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
6703 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
6704 * src/closure.c (fderives): Be an array of bitsets.
6705
6706 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
6707
6708 * data/bison.c++: Merge the two generated headers. Insert a copyright
6709 notice in each output file.
6710
6711 2002-02-28 Akim Demaille <akim@epita.fr>
6712
6713 * data/bison.c++: Copy the prologue of bison.simple to fetch
6714 useful M4 definitions, such as b4_header_guard.
6715
6716 2002-02-25 Akim Demaille <akim@epita.fr>
6717
6718 * src/getargs.c (version): Give the name of the authors, and use a
6719 translator friendly scheme for the bgr
6720 copyright notice.
6721
6722 2002-02-25 Akim Demaille <akim@epita.fr>
6723
6724 * src/output.c (header_output): Remove, now handled completely via
6725 M4.
6726
6727 2002-02-25 Akim Demaille <akim@epita.fr>
6728
6729 * m4/m4.m4: New, from CVS Autoconf.
6730 * configure.in: Invoke it.
6731 * src/output.c (output_skeleton): Use its result instead of the
6732 hard coded name.
6733
6734 2002-02-25 Akim Demaille <akim@epita.fr>
6735
6736 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
6737 Fileutils 4.1.5.
6738 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
6739 * src/output.c (output_skeleton): Use mkstemp to create a real
6740 temporary file.
6741 Move the filling of `skeleton' and its muscle to...
6742 (prepare): here.
6743 (output): Move the definition of the prologue muscle to...
6744 (prepare): here.
6745 * src/system.h (DEFAULT_TMPDIR): New.
6746
6747 2002-02-14 Paul Eggert <eggert@twinsun.com>
6748
6749 Remove the support for C++ namespace cleanliness; it was
6750 causing more problems than it was curing, since it didn't work
6751 properly on some nonstandard C++ compilers. This can wait
6752 for a proper C++ parser.
6753
6754 * NEWS: Document this.
6755 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
6756 of C++, as it's treated like C now.
6757 * src/bison.simple (YYSTD): Remove.
6758 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
6759 Treat C++ just like Standard C instead of trying to support
6760 namespace cleanliness.
6761
6762 2002-02-14 Akim Demaille <akim@epita.fr>
6763
6764 * tests/regression.at (else): Adjust to Andreas' change.
6765
6766 2002-02-14 Akim Demaille <akim@epita.fr>
6767
6768 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
6769
6770 2002-02-13 Andreas Schwab <schwab@suse.de>
6771
6772 * src/output.c (output_rule_data): Don't output NULL, it might
6773 not be defined yet.
6774
6775 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
6776
6777 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6778 (Copyright notice): Update.
6779
6780 2002-02-11 Akim Demaille <akim@epita.fr>
6781
6782 * tests/regression.at (%nonassoc and eof): Don't include
6783 nonportable headers.
6784
6785 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
6786
6787 * data/bison.c++: Correct error recovery. Make the user able to
6788 initialize the starting location.
6789
6790 2002-02-07 Akim Demaille <akim@epita.fr>
6791
6792 * tests/input.at: New.
6793
6794 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6795
6796 * data/bison.c++: Replace some direct m4 expansions by constants. Be
6797 more consistent when naming methods and variables. Put preprocessor
6798 directives around tables only needed for debugging.
6799
6800 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6801
6802 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6803 C++ parsers.
6804 (yy::b4_name::parse): Use print_.
6805
6806 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6807
6808 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6809
6810 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6811
6812 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6813 C++ parsers.
6814 (yy::b4_name::parse): Build verbose error messages, and use error_.
6815
6816 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6817
6818 * data/bison.c++: Fix m4 quoting in comments.
6819
6820 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6821
6822 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6823 not expanded by m4.
6824
6825 2002-02-05 Akim Demaille <akim@epita.fr>
6826
6827 * data/bison.c++: Adjust to the M4 back end.
6828 More is certainly needed.
6829
6830 2002-02-05 Akim Demaille <akim@epita.fr>
6831
6832 Give a try to M4 as a back end.
6833
6834 * lib/readpipe.c: New, from wdiff.
6835 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6836 BISON_HAIRY.
6837 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6838 specific values. Now it is m4 that performs the lookup.
6839 * src/parse-skel.y: Remove.
6840 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6841 * src/output.c (actions_output, guards_output)
6842 (token_definitions_output): No longer keeps track of the output
6843 line number, hence remove the second argument.
6844 (guards_output): Check against the guard member of a rule, not the
6845 action member.
6846 Adjust callers.
6847 (output_skeleton): Don't look for the skeleton location, let m4 do
6848 that.
6849 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6850 file will be used.
6851 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6852 (prepare): Given that for the time being changesyntax is not
6853 usable in M4, rename the muscles using `-' to `_'.
6854 Define `defines_flag', `output_parser_name' and `output_header_name'.
6855 * src/output.h (actions_output, guards_output)
6856 (token_definitions_output): Adjust prototypes.
6857 * src/scan-skel.l: Instead of scanning the skeletons, it now
6858 processes the output of m4: `__oline__' and `#output'.
6859 * data/bison.simple: Adjust to be used by M4(sugar).
6860 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6861 to date.
6862 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6863 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6864 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6865 shamelessly stolen from CVS Autoconf.
6866
6867 2002-02-05 Akim Demaille <akim@epita.fr>
6868
6869 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
6870 * configure.in: Check for the declarations of free and malloc.
6871 * src/muscle_tab.c: Adjust.
6872
6873 2002-02-05 Akim Demaille <akim@epita.fr>
6874
6875 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
6876 which have no values.
6877
6878 2002-02-05 Akim Demaille <akim@epita.fr>
6879
6880 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
6881 * data/: here.
6882
6883 2002-01-29 Paul Eggert <eggert@twinsun.com>
6884
6885 * src/bison.simple (YYSIZE_T): Do not define merely because
6886 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
6887 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6888
6889 2002-01-27 Akim Demaille <akim@epita.fr>
6890
6891 Fix `%nonassoc and eof'.
6892
6893 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
6894 which were not properly copied! Replace
6895 memcpy (res->errs, src->errs, src->nerrs);
6896 with
6897 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
6898 !!!
6899 * tests/regression.at (%nonassoc and eof): Adjust to newest
6900 Autotest: `.' is not in the PATH.
6901
6902 2002-01-27 Akim Demaille <akim@epita.fr>
6903
6904 * tests/sets.at (AT_EXTRACT_SETS): New.
6905 (Nullable): Use it.
6906 (Firsts): New.
6907
6908 2002-01-26 Akim Demaille <akim@epita.fr>
6909
6910 * tests/actions.at, tests/calc.at, tests/headers.at,
6911 * tests/torture.at: Adjust to the newest Autotest which no longer
6912 forces `.' in the PATH.
6913
6914 2002-01-25 Akim Demaille <akim@epita.fr>
6915
6916 * tests/regression.at (%nonassoc and eof): New.
6917 Suggested by Robert Anisko.
6918
6919 2002-01-24 Akim Demaille <akim@epita.fr>
6920
6921 Bison dumps core when trying to complain about broken input files.
6922 Reported by Cris van Pelt.
6923
6924 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
6925 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
6926 into...
6927 (Invalid inputs): Strengthen: exercise parse_percent_token.
6928
6929 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
6930
6931 * src/Makefile.am: Add bison.c++.
6932 * src/bison.c++: New skeleton.
6933
6934 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
6935
6936 * po/it.po: New.
6937
6938 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6939
6940 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
6941
6942 2002-01-20 Marc Autret <marc@gnu.org>
6943
6944 * src/files.c (compute_output_file_names): Fix
6945
6946 2002-01-20 Marc Autret <marc@gnu.org>
6947
6948 * tests/output.at: New test.
6949 * src/files.c (compute_base_names): Don't map extensions when
6950 the YACC flag is set, use defaults.
6951 Reported by Evgeny Stambulchik.
6952
6953 2002-01-20 Marc Autret <marc@gnu.org>
6954
6955 * src/system.h: Need to define __attribute__ away for non-GCC
6956 compilers as well (i.e. the vendor C compiler).
6957 Suggested by Albert Chin-A-Young.
6958
6959 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
6960
6961 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
6962 canonical definition.
6963 * src/system.h: Use the canonical definition for PARAMS (avoids
6964 a conflict with the macro from lib/hash.h).
6965
6966 2002-01-11 Akim Demaille <akim@epita.fr>
6967
6968 * configure.in: Use AC_FUNC_STRNLEN.
6969 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
6970
6971 2002-01-09 Akim Demaille <akim@epita.fr>
6972
6973 * src/files.c, src/files.h (output_infix): New.
6974 (tab_extension): Remove.
6975 (compute_base_names): Compute the former, drop the latter.
6976 * src/output.c (prepare): Insert the muscles `output-infix', and
6977 `output-suffix'.
6978 * src/parse-skel.y (string, string.1): New.
6979 (section.header): Use it.
6980 (section.yacc): Remove.
6981 (prefix): Remove too.
6982 * src/scan-skel.l: Adjust.
6983 * src/bison.simple, src/bison.hairy: Adjust.
6984
6985 2002-01-09 Akim Demaille <akim@epita.fr>
6986
6987 * configure.in (WERROR_CFLAGS): Compute it.
6988 * src/Makefile.am (CFLAGS): Pass it.
6989 * tests/atlocal.in (CFLAGS): Idem.
6990 * src/files.c: Fix a few warnings.
6991 (get_extension_index): Remove, unused.
6992
6993 2002-01-08 Akim Demaille <akim@epita.fr>
6994
6995 * src/getargs.c (AS_FILE_NAME): New.
6996 (getargs): Use it to convert DOSish file names.
6997 * src/files.c (base_name): Rename as full_base_name to avoid
6998 clashes with `base_name ()'.
6999 (filename_split): New.
7000 (compute_base_names): N-th rewrite, using filename_split.
7001
7002 2002-01-08 Akim Demaille <akim@epita.fr>
7003
7004 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
7005 New, stolen from the Fileutils 4.1.
7006 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7007 * configure.in: Check for the presence of memrchr, and of its
7008 prototype.
7009
7010 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
7011
7012 * lib/hash.h (__P): Added definition for this macro.
7013 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
7014 BUILT_SOURCES, to ensure they are generated first.
7015 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
7016 %error-verbose to allow bootstrapping with bison 1.30x.
7017
7018 2002-01-06 Akim Demaille <akim@epita.fr>
7019
7020 * src/reader.c (parse_braces): Don't fetch the next char, the
7021 convention is to fetch on entry.
7022 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
7023 'switch' without a following semicolon.
7024 * tests/regression.at (braces parsing): New.
7025
7026 2002-01-06 Akim Demaille <akim@epita.fr>
7027
7028 Bison is dead wrong in its RR conflict reports.
7029
7030 * tests/torture.at (GNU Cim Grammar): New.
7031 * src/conflicts.c (count_rr_conflicts): Fix.
7032
7033 2002-01-06 Akim Demaille <akim@epita.fr>
7034
7035 Creating package.m4 from configure.ac causes too many problems.
7036
7037 * tests/Makefile.am (package.m4): Create it by hand,
7038 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
7039
7040 2002-01-06 Akim Demaille <akim@epita.fr>
7041
7042 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
7043 skeleton.h.
7044
7045 2002-01-04 Paul Eggert <eggert@twinsun.com>
7046
7047 * doc/bison.texinfo (Debugging):
7048 Remove YYSTDERR; it's no longer defined or used.
7049 Also, s/cstdio.h/cstdio/.
7050
7051 2002-01-03 Akim Demaille <akim@epita.fr>
7052
7053 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
7054
7055 2002-01-03 Akim Demaille <akim@epita.fr>
7056
7057 * src/parse-skel.y (process_skeleton): Don't bind the parser's
7058 tracing code to --trace, wait for a better --trace option, with
7059 args.
7060
7061 2002-01-03 Akim Demaille <akim@epita.fr>
7062
7063 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
7064 The ISO C++ standard is extremely clear about it: stderr is
7065 considered a macro, not a regular symbol (see table 94 `Header
7066 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
7067 Therefore std:: does not apply to it. It still does with fprintf.
7068 Also, s/cstdio.h/cstdio/.
7069
7070 2002-01-03 Akim Demaille <akim@epita.fr>
7071
7072 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
7073 for non system headers.
7074
7075 2002-01-02 Akim Demaille <akim@epita.fr>
7076
7077 Equip the skeleton chain with location tracking, runtime trace,
7078 pure parser and scanner.
7079
7080 * src/parse-skel.y: Request a pure parser, locations, and prefix
7081 renaming.
7082 (%union): Having several members with the same type does not help
7083 type mismatches, simplify.
7084 (YYPRINT, yyprint): New.
7085 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
7086 (skel_error): this.
7087 Handle locations.
7088 * src/scan-skel.l: Adjust to these changes.
7089 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
7090 (LOCATION_PRINT, skel_control_t): New.
7091
7092 2001-12-30 Akim Demaille <akim@epita.fr>
7093
7094 * src/parse-skel.y: Get rid of the shift/reduce conflict:
7095 replace `gb' with BLANKS.
7096 * src/scan-skel.l: Adjust.
7097
7098 2001-12-30 Akim Demaille <akim@epita.fr>
7099
7100 * src/system.h: We don't need nor want bcopy.
7101 Throw away MS-DOS crap: we don't need getpid.
7102 * configure.in: We don't need strndup. It was even causing
7103 problems: because Flex includes the headers *before* us,
7104 _GNU_SOURCE is not defined by config.h, and therefore strndup was
7105 not visible.
7106 * lib/xstrndup.c: New.
7107 * src/scan-skel.l: Use it.
7108 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
7109 * src/parse-skel.y: Use %directives instead of #defines.
7110
7111 2001-12-30 Akim Demaille <akim@epita.fr>
7112
7113 * src/skeleton.h: New.
7114 * src/output.c (output_parser, output_master_parser): Remove, dead
7115 code.
7116 * src/output.h (get_lines_number, actions_output, guards_output)
7117 (token_definitions_output): Prototype them.
7118 * src/parse-skel.y: Add the license notice.
7119 Include output.h and skeleton.h.
7120 (process_skeleton): Returns void, and takes a single parameter.
7121 * src/scan-skel.l: Add the license notice.
7122 Include skeleton.h.
7123 Don't use %option yylineno: it seems that then Flex imagines
7124 REJECT has been used, and therefore it won't reallocate its
7125 buffers (which makes no other sense to me than a bug). It results
7126 in warnings for `unused: yy_flex_realloc'.
7127
7128 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
7129
7130 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
7131 (MUSCLE_INSERT_PREFIX): ...to there.
7132 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
7133 (MUSCLE_INSERT_PREFIX): Move from here...
7134
7135 * src/bison.hairy: Add a section directive. Put braces around muscle
7136 names. This parser skeleton is still broken, but Bison should not
7137 choke on a bad muscle 'syntax'.
7138 * src/bison.simple: Add a section directive. Put braces around muscle
7139 names.
7140
7141 * src/files.h (strsuffix, stringappend): Add declarations.
7142 (tab_extension): Add declaration.
7143 (short_base_name): Add declaration.
7144
7145 * src/files.c (strsuffix, stringappend): No longer static. These
7146 functions are used in the skeleton parser.
7147 (tab_extension): New.
7148 (compute_base_names): Use the computations done in this function
7149 to guess if the generated parsers should have '.tab' in their
7150 names.
7151 (short_base_name): No longer static.
7152
7153 * src/output.c (output_skeleton): New.
7154 (output): Disable call to output_master_parser, and give a try to
7155 a new skeleton handling system.
7156 (guards_output, actions_output): No longer static.
7157 (token_definitions_output, get_lines_number): No longer static.
7158
7159 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
7160
7161 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
7162 parse-skel.y.
7163
7164 * src/parse-skel.y: New file.
7165 * src/scan-skel.l: New file.
7166
7167 2001-12-29 Akim Demaille <akim@epita.fr>
7168
7169 %name-prefix is broken.
7170
7171 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
7172 Adjust all dependencies.
7173 * tests/headers.at (export YYLTYPE): Strengthen this test: use
7174 %name-prefix.
7175
7176 Renaming yylval but not yylloc is not consistent. Now we do.
7177
7178 * src/bison.simple: Prefix yylloc if used.
7179 * doc/bison.texinfo (Decl Summary): Document that.
7180
7181 2001-12-29 Akim Demaille <akim@epita.fr>
7182
7183 * doc/bison.texinfo: Promote `%long-directive' over
7184 `%long_directive'.
7185 Remove all references to fixed-output-files, yacc is enough.
7186
7187 2001-12-29 Akim Demaille <akim@epita.fr>
7188
7189 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
7190 user prologue. These are defaults.
7191 * tests/actions.at (Mid-rule actions): Make sure the user can
7192 define YYDEBUG and YYERROR_VERBOSE.
7193
7194 2001-12-29 Akim Demaille <akim@epita.fr>
7195
7196 * src/output.c (header_output): Don't forget to export YYLTYPE and
7197 yylloc.
7198 * tests/headers.at (export YYLTYPE): New, make sure it does.
7199 * tests/regression.at (%union and --defines, Invalid CPP headers):
7200 Move to...
7201 * tests/headers.at: here.
7202
7203 2001-12-29 Akim Demaille <akim@epita.fr>
7204
7205 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
7206
7207 2001-12-29 Akim Demaille <akim@epita.fr>
7208
7209 * tests/actions.at (Mid-rule actions): Output on a single line
7210 instead of several.
7211
7212 2001-12-29 Akim Demaille <akim@epita.fr>
7213
7214 * doc/bison.texinfo: Formatting changes.
7215
7216 2001-12-29 Akim Demaille <akim@epita.fr>
7217
7218 Don't store the token defs in a muscle, just be ready to output it
7219 on command. Now possible via `symbols'. Fixes a memory leak.
7220
7221 * src/output.c (token_definitions_output): New.
7222 (output_parser, header_output): Use it.
7223 * src/reader.c (symbols_save): Remove.
7224
7225 2001-12-29 Akim Demaille <akim@epita.fr>
7226
7227 * src/bison.simple: Do not provide a default for YYSTYPE and
7228 YYLTYPE before the user's prologue. Otherwise it's hardly... a
7229 default.
7230
7231 2001-12-29 Akim Demaille <akim@epita.fr>
7232
7233 Mid-rule actions are simply... ignored!
7234
7235 * src/reader.c (readgram): Be sure to attach mid-rule actions to
7236 the empty-rule associated to the dummy symbol, not to the host
7237 rule.
7238 * tests/actions.at (Mid-rule actions): New.
7239
7240 2001-12-29 Akim Demaille <akim@epita.fr>
7241
7242 Memory leak.
7243
7244 * src/reader.c (reader): Free grammar.
7245
7246 2001-12-29 Akim Demaille <akim@epita.fr>
7247
7248 Memory leak.
7249
7250 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
7251 since it allocates it for each state, although only one is needed.
7252 (allocate_storage): Do it here.
7253
7254 2001-12-29 Akim Demaille <akim@epita.fr>
7255
7256 * src/options.h, src/options.c (create_long_option_table): Rename
7257 as...
7258 (long_option_table_new): this, with a clearer prototype.
7259 (percent_table): Remove, unused,
7260 * src/getargs.c (getargs): Adjust.
7261
7262 2001-12-29 Akim Demaille <akim@epita.fr>
7263
7264 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
7265 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
7266 as states.
7267
7268 2001-12-29 Akim Demaille <akim@epita.fr>
7269
7270 * src/lalr.c (build_relations): Rename `states' as `states1'.
7271 Sorry, I don't understand exactly what it is, no better name...
7272
7273 2001-12-29 Akim Demaille <akim@epita.fr>
7274
7275 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
7276 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
7277 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
7278 as rules.
7279
7280 2001-12-29 Akim Demaille <akim@epita.fr>
7281
7282 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
7283 ago.
7284
7285 2001-12-29 Akim Demaille <akim@epita.fr>
7286
7287 * src/reader.c, src/reader.h (user_toknums): Remove.
7288 Adjust all users to use symbols[i]->user_token_number.
7289
7290 2001-12-29 Akim Demaille <akim@epita.fr>
7291
7292 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
7293 Adjust all users to use symbols[i]->prec or ->assoc.
7294
7295 2001-12-29 Akim Demaille <akim@epita.fr>
7296
7297 * src/reader.c, src/reader.h (tags): Remove.
7298 Adjust all users to use symbols[i]->tag.
7299
7300 2001-12-29 Akim Demaille <akim@epita.fr>
7301
7302 * src/gram.h, src/gram.c (symbols): New, similar to state_table
7303 and rule_table.
7304 * src/reader.c (packsymbols): Fill this table.
7305 Drop sprec.
7306 * src/conflicts.c (resolve_sr_conflict): Adjust.
7307 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
7308 single table.
7309 Use symbols[i]->tag instead of tags[i].
7310
7311 2001-12-29 Akim Demaille <akim@epita.fr>
7312
7313 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
7314 In addition, put a comment in there, to replace...
7315 * tests/regression.at (%union and C comments): Remove.
7316
7317 2001-12-29 Akim Demaille <akim@epita.fr>
7318
7319 * tests/regression.at (Web2c Actions): Blindly move the actual
7320 output as expected output. The contents *seem* right to me, but I
7321 can't pretend reading perfectly parser tables... Nonetheless, all
7322 the other tests pass correctly, the table look OK, even though the
7323 presence of `$axiom' is to be noted: AFAICS it is useless (but
7324 harmless).
7325
7326 2001-12-29 Akim Demaille <akim@epita.fr>
7327
7328 * src/reader.c (readgram): Don't add the rule 0 if there were no
7329 rules read. In other words, add it _after_ having performed
7330 grammar sanity checks.
7331 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
7332
7333 2001-12-29 Akim Demaille <akim@epita.fr>
7334
7335 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
7336 visible, and some states have now a different number.
7337
7338 2001-12-29 Akim Demaille <akim@epita.fr>
7339
7340 * src/reader.c (readgram): Bind the initial rule's lineno to that
7341 of the first rule.
7342 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
7343 (Solved SR Conflicts): Adjust rule 0's line number.
7344
7345 2001-12-29 Akim Demaille <akim@epita.fr>
7346
7347 Fix the `GAWK Grammar' failure.
7348
7349 * src/LR0.c (final_state): Initialize to -1 so that we do compute
7350 the reductions of the first state which was mistakenly confused
7351 with the final state because precisely final_state was initialized
7352 to 0.
7353 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
7354 now noticed by Bison.
7355 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
7356 have a reduction on $default.
7357
7358 2001-12-29 Akim Demaille <akim@epita.fr>
7359
7360 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
7361 rule line numbers.
7362 * src/closure.c (print_closure): Likewise.
7363 * src/derives.c (print_derives): Likewise.
7364 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
7365 now.
7366
7367 2001-12-29 Akim Demaille <akim@epita.fr>
7368
7369 * src/lalr.c (lookaheads_print): New.
7370 (lalr): Call it when --trace-flag.
7371 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
7372 are dumped.
7373
7374 2001-12-29 Akim Demaille <akim@epita.fr>
7375
7376 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
7377 when walking through ritem, even via rule->rhs.
7378 * src/reduce.c (dump_grammar, useful_production, reduce_output)
7379 (useful_production, useless_nonterminals): Likewise.
7380 (reduce_grammar_tables): Likewise, plus update nritems.
7381 * src/nullable.c (set_nullable): Likewise.
7382 * src/lalr.c (build_relations): Likewise.
7383 * tests/sets.at (Nullable): Adjust.
7384 Fortunately, now, the $axiom is no longer nullable.
7385
7386 2001-12-29 Akim Demaille <akim@epita.fr>
7387
7388 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
7389 the 0-sentinel.
7390 * src/gram.c (ritem_longest_rhs): Likewise.
7391 * src/reduce.c (nonterminals_reduce): Likewise.
7392 * src/print_graph.c (print_graph): Likewise.
7393 * src/output.c (output_rule_data): Likewise.
7394 * src/nullable.c (set_nullable): Likewise.
7395
7396 2001-12-29 Akim Demaille <akim@epita.fr>
7397
7398 * src/output.c: Comment changes.
7399
7400 2001-12-27 Paul Eggert <eggert@twinsun.com>
7401
7402 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
7403 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
7404 Sparc, as they were causing more porting problems than the
7405 (minor) performance improvement was worth.
7406
7407 Also, catch up with 1.31's YYSTD.
7408
7409 2001-12-27 Akim Demaille <akim@epita.fr>
7410
7411 * src/output.c (output_gram): Rely on nritems, not the
7412 0-sentinel. See below.
7413 Use -1 as separator, not 0.
7414 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
7415 Rely on -1 as separator in yyrhs, instead of 0.
7416 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
7417 twice `Now at end of input', therefore there are two lines less to
7418 expect.
7419
7420 2001-12-27 Akim Demaille <akim@epita.fr>
7421
7422 * tests/regression.at (Unresolved SR Conflicts):
7423 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
7424 below.
7425
7426 2001-12-27 Akim Demaille <akim@epita.fr>
7427
7428 * src/LR0.c (new_state): Recognize the final state by the fact it
7429 is reached by eoftoken.
7430 (insert_start_shifting_state, insert_eof_shifting_state)
7431 (insert_accepting_state, augment_automaton): Remove, since now
7432 these states are automatically computed from the initial state.
7433 (generate_states): Adjust.
7434 * src/print.c: When reporting a rule number to the user, substract
7435 1, so that the axiom rule is rule 0, and the first user rule is 1.
7436 * src/reduce.c: Likewise.
7437 * src/print_graph.c (print_core): For the time being, just as for
7438 the report, depend upon --trace-flags to dump the full set of
7439 items.
7440 * src/reader.c (readgram): Once the grammar read, insert the rule
7441 0: `$axiom: START-SYMBOL $'.
7442 * tests/set.at: Adjust: rule 0 is now displayed, and since the
7443 number of the states has changed (the final state is no longer
7444 necessarily the last), catch up.
7445
7446 2001-12-27 Akim Demaille <akim@epita.fr>
7447
7448 Try to make the use of the eoftoken valid. Given that its value
7449 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
7450 is used instead of > 0 where appropriate, (ii), depend upon nritems
7451 instead of the 0-sentinel.
7452
7453 * src/gram.h, src/gram.c (nritems): New.
7454 Expected to be duplication of nitems, but for the time being...
7455 * src/reader.c (packgram): Assert nritems and nitems are equal.
7456 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
7457 * src/closure.c (print_closure, print_fderives): Likewise.
7458 * src/gram.c (ritem_print): Likewise.
7459 * src/print.c (print_core, print_grammar): Likewise.
7460 * src/print_graph.c: Likewise.
7461
7462 2001-12-27 Akim Demaille <akim@epita.fr>
7463
7464 * src/main.c (main): If there are complains after grammar
7465 reductions, then output the report anyway if requested, then die.
7466 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
7467 * src/reader.c (eoftoken): New.
7468 (parse_token_decl): If the token being defined has value `0', it
7469 is the eoftoken.
7470 (packsymbols): No longer hack `tags' to insert `$' by hand.
7471 Be sure to preserve the value of the eoftoken.
7472 (reader): Make sure eoftoken is defined.
7473 Initialize nsyms to 0: now eoftoken is created just like the others.
7474 * src/print.c (print_grammar): Don't special case the eof token.
7475 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
7476 lie anyway, albeit pleasant.
7477 * tests/calc.at: Exercise error messages with eoftoken.
7478 Change the grammar so that empty input is invalid.
7479 Adjust expectations.
7480 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
7481
7482 2001-12-27 Akim Demaille <akim@epita.fr>
7483
7484 * configure.in: Check the protos of strchr ans strspn.
7485 Replace strchr if needed.
7486 * src/system.h: Provide the protos of strchr, strspn and memchr if
7487 missing.
7488 * lib/strchr.c: New.
7489 * src/reader.c (symbols_save): Use strchr.
7490
7491 2001-12-27 Akim Demaille <akim@epita.fr>
7492
7493 * src/print.c, src/print_graph.c (escape): New.
7494 Use it to quote the TAGS outputs.
7495 * src/print_graph.c (print_state): Now errors are in red, and
7496 reductions in green.
7497 Prefer high to wide: output the state number on a line of its own.
7498
7499 2001-12-27 Akim Demaille <akim@epita.fr>
7500
7501 * src/state.h, src/state.c (reductions_new): New.
7502 * src/LR0.c (set_state_table): Let all the states have a
7503 `reductions', even if reduced to 0.
7504 (save_reductions): Adjust.
7505 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
7506 * src/print.c (print_reductions, print_actions): Adjust.
7507 * src/output.c (action_row): Adjust.
7508
7509 2001-12-27 Akim Demaille <akim@epita.fr>
7510
7511 * src/state.h, src/state.c (errs_new, errs_dup): New.
7512 * src/LR0.c (set_state_table): Let all the states have an errs,
7513 even if reduced to 0.
7514 * src/print.c (print_errs, print_reductions): Adjust.
7515 * src/output.c (output_actions, action_row): Adjust.
7516 * src/conflicts.c (resolve_sr_conflict): Adjust.
7517
7518 2001-12-27 Akim Demaille <akim@epita.fr>
7519
7520 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
7521
7522 2001-12-27 Akim Demaille <akim@epita.fr>
7523
7524 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
7525 * src/print.c: here.
7526 (lookaheadset, shiftset): New, used as additional storage by
7527 print_reductions.
7528 (print_results): Adjust.
7529 (print_shifts, print_gotos, print_errs): New, extracted from...
7530 (print_actions): here.
7531 * src/print_graph.c (print_actions): Remove dead code.
7532
7533 2001-12-27 Akim Demaille <akim@epita.fr>
7534
7535 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
7536 `$n' and `@n'.
7537
7538 2001-12-27 Akim Demaille <akim@epita.fr>
7539
7540 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
7541 (build_relations): Adjust.
7542
7543 2001-12-27 Akim Demaille <akim@epita.fr>
7544
7545 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
7546 duplication.
7547
7548 2001-12-27 Akim Demaille <akim@epita.fr>
7549
7550 * src/reader.c (packgram): Catch nitems overflows.
7551
7552 2001-12-27 Akim Demaille <akim@epita.fr>
7553
7554 * src/files.c, src/files.h (guard_obstack): Remove.
7555 * src/output.c (output): Adjust.
7556 * src/reader.c (parse_braces): New, factoring...
7557 (copy_action, copy_guard): these two which are renamed as...
7558 (parse_action, parse_guard): these.
7559 As a voluntary consequence, using braces around guards is now
7560 mandatory.
7561
7562 2001-12-27 Akim Demaille <akim@epita.fr>
7563
7564 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
7565 * src/reader.c (symbol_list): `guard' and `guard_line' are new
7566 members.
7567 (symbol_list_new): Adjust.
7568 (copy_action): action_line is the first line, not the last.
7569 (copy_guard): Just as for actions, store the `action' only, not
7570 the switch/case/break flesh.
7571 Don't parse the user action that might follow the guard, let...
7572 (readgram): do it, i.e., now, there can be an action after a
7573 guard.
7574 In other words the guard is just explicitly optional.
7575 (packgram): Adjust.
7576 * src/output.c (guards_output): New.
7577 (output_parser): Call it when needed.
7578 (output): Also free the guard and attrs obstacks.
7579 * src/files.c, src/files.h (obstack_save): Remove.
7580 (output_files): Remove.
7581 As a result, if one needs the former `.act' file, using an
7582 appropriate skeleton which requires actions and guards is now
7583 required.
7584 * src/main.c (main): Adjust.
7585 * tests/semantic.at: New.
7586 * tests/regression.at: Use `input.y' as input file name.
7587 Avoid 8+3 problems by requiring input.c when the test needs the
7588 parser.
7589
7590 2001-12-27 Akim Demaille <akim@epita.fr>
7591
7592 * src/reader.c (symbol_list_new): Be sure to initialize all the
7593 fields.
7594
7595 2001-12-27 Akim Demaille <akim@epita.fr>
7596
7597 All the hacks using a final pseudo state are now useless.
7598
7599 * src/LR0.c (set_state_table): state_table holds exactly nstates.
7600 * src/lalr.c (nLA): New.
7601 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
7602 instead of lookaheadsp from the pseudo state (nstate + 1).
7603
7604 2001-12-27 Akim Demaille <akim@epita.fr>
7605
7606 * src/output.c (action_row, token_actions): Use a state_t instead
7607 of a integer, and nlookaheads instead of the following state's
7608 lookaheadsp.
7609
7610 2001-12-27 Akim Demaille <akim@epita.fr>
7611
7612 * src/conflicts.c (log_resolution, flush_shift)
7613 (resolve_sr_conflict, set_conflicts, solve_conflicts)
7614 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
7615 (conflicts_print, print_reductions): Use a state_t instead of an
7616 integer when referring to a state.
7617 As much as possible, depend upon nlookaheads, instead of the
7618 `lookaheadsp' member of the following state (since lookaheads of
7619 successive states are successive, the difference between state n + 1
7620 and n served as the number of lookaheads for state n).
7621 * src/lalr.c (add_lookback_edge): Likewise.
7622 * src/print.c (print_core, print_actions, print_state)
7623 (print_results): Likewise.
7624 * src/print_graph.c (print_core, print_actions, print_state)
7625 (print_graph): Likewise.
7626 * src/conflicts.h: Adjust.
7627
7628 2001-12-27 Akim Demaille <akim@epita.fr>
7629
7630 * src/bison.hairy: Formatting/comment changes.
7631 ANSIfy.
7632 Remove `register' indications.
7633 Add plenty of `static'.
7634
7635 2001-12-27 Akim Demaille <akim@epita.fr>
7636
7637 * src/output.c (prepare): Drop the muscle `ntbase' which
7638 duplicates ntokens.
7639 * src/bison.simple: Formatting/comment changes.
7640 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
7641 is an undocumented synonym.
7642
7643 2001-12-22 Akim Demaille <akim@epita.fr>
7644
7645 * src/output.c (output_table_data): Change the prototype to use
7646 `int' for array ranges: some invocations do pass an int, not a
7647 short.
7648 Reported by Wayne Green.
7649
7650 2001-12-22 Akim Demaille <akim@epita.fr>
7651
7652 Some actions of web2c.y are improperly triggered.
7653 Reported by Mike Castle.
7654
7655 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
7656 * tests/regression.at (Web2c): Rename as...
7657 (Web2c Report): this.
7658 (Web2c Actions): New.
7659
7660 2001-12-22 Akim Demaille <akim@epita.fr>
7661
7662 Reductions in web2c.y are improperly reported.
7663 Reported by Mike Castle.
7664
7665 * src/conflicts.c (print_reductions): Fix.
7666 * tests/regression.at (Web2c): New.
7667
7668 2001-12-18 Akim Demaille <akim@epita.fr>
7669
7670 Some host fail on `assert (!"foo")', which expands to
7671 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
7672 Reported by Nelson Beebee.
7673
7674 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
7675 `#define it_succeeded 0' and `assert (it_succeeded)'.
7676
7677 2001-12-17 Marc Autret <autret_m@epita.fr>
7678
7679 * src/bison.simple: Don't hard code the skeleton line and filename.
7680 * src/output.c (output_parser): Rename 'line' as 'output_line'.
7681 New line counter 'skeleton_line' (skeleton-line muscle).
7682
7683 2001-12-17 Paul Eggert <eggert@twinsun.com>
7684
7685 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
7686 YYDEBUG must be defined to a nonzero value.
7687
7688 * src/bison.simple (yytname): Do not assume that the user defines
7689 YYDEBUG to a properly parenthesized expression.
7690
7691 2001-12-17 Akim Demaille <akim@epita.fr>
7692
7693 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
7694 nlookaheads is a new member.
7695 Adjust all users.
7696 * src/lalr.h (nlookaheads): Remove this orphan declaration.
7697 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
7698 state.
7699
7700 2001-12-17 Akim Demaille <akim@epita.fr>
7701
7702 * src/files.h, src/files.c (open_files, close_files): Remove.
7703 * src/main.c (main): Don't open/close files, nor invoke lex_free,
7704 let...
7705 * src/reader.c (reader): Do it.
7706
7707 2001-12-17 Akim Demaille <akim@epita.fr>
7708
7709 * src/conflicts.c (print_reductions): Formatting changes.
7710
7711 2001-12-17 Akim Demaille <akim@epita.fr>
7712
7713 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
7714 (flush_reduce): New.
7715 (resolve_sr_conflict): Adjust.
7716
7717 2001-12-17 Akim Demaille <akim@epita.fr>
7718
7719 * src/output.c (output_obstack): Be static and rename as...
7720 (format_obstack): this, to avoid any confusion with files.c's
7721 output_obstack.
7722 * src/reader.h (muscle_obstack): Move to...
7723 * src/output.h: here, since it's defined in output.c.
7724
7725 2001-12-17 Akim Demaille <akim@epita.fr>
7726
7727 * src/output.c (action_row, save_column, default_goto)
7728 (sort_actions, matching_state, pack_vector): Better variable
7729 locality.
7730
7731 2001-12-17 Akim Demaille <akim@epita.fr>
7732
7733 * src/output.c: Various formatting changes.
7734
7735 2001-12-17 Akim Demaille <akim@epita.fr>
7736
7737 * src/files.c (output_files): Free the output_obstack.
7738 * src/main.c (main): Call print and print_graph conditionally.
7739 * src/print.c (print): Work unconditionally.
7740 * src/print_graph.c (print_graph): Work unconditionally.
7741 * src/conflicts.c (log_resolution): Output only if verbose_flag.
7742
7743 2001-12-16 Marc Autret <autret_m@epita.fr>
7744
7745 * src/output.c (actions_output): Fix. When we use %no-lines,
7746 there is one less line per action.
7747
7748 2001-12-16 Marc Autret <autret_m@epita.fr>
7749
7750 * src/bison.simple: Remove a useless #line directive.
7751 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
7752 * src/output.c (get_lines_number): New.
7753 (output_parser): Adjust, now takes care about the lines of a
7754 output muscles.
7755 Fix line numbering.
7756 (actions_output): Computes the number of lines taken by actions.
7757 (output_master_parser): Insert new skeleton which is the name of
7758 the output parser file name.
7759
7760 2001-12-15 Marc Autret <autret_m@epita.fr>
7761
7762 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
7763
7764 2001-12-15 Marc Autret <autret_m@epita.fr>
7765
7766 * src/output.c (output_gram): Keep track of the hairy one.
7767
7768 2001-12-15 Akim Demaille <akim@epita.fr>
7769
7770 Make `make distcheck' work.
7771
7772 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
7773 system.h which uses libgettext.h.
7774
7775 2001-12-15 Akim Demaille <akim@epita.fr>
7776
7777 * src/nullable.c (set_nullable): Useless rules must be skipped,
7778 otherwise, since we range over their symbols, we might look at a
7779 nonterminal which no longer ``exists'', i.e., it is not counted in
7780 `nvars', hence we overflow our arrays.
7781
7782 2001-12-15 Akim Demaille <akim@epita.fr>
7783
7784 The header can also be produced directly, without any obstack!
7785 Yahoo!
7786
7787 * src/files.c, src/files.h (defines_obstack): Remove.
7788 (compute_header_macro): Global.
7789 (defines_obstack_save): Remove.
7790 * src/reader.c (parse_union_decl): No longer output to
7791 defines_obstack: its content can be found in the `stype' muscle
7792 anyway.
7793 (output_token_translations): Merge into...
7794 (symbols_output): this.
7795 Rename as...
7796 (symbols_save): this.
7797 (reader): Adjust.
7798 * src/output.c (header_output): New.
7799 (output): Call it.
7800
7801 2001-12-15 Akim Demaille <akim@epita.fr>
7802
7803 * src/reader.c (parse_union_decl): Instead of handling two obstack
7804 simultaneously, use one to define the `stype' muscle, and use the
7805 value of the latter to fill defines_obstack.
7806 (copy_comment): Remove.
7807 (copy_comment2): Work for a single obstack.
7808 Rename as...
7809 (copy_comment): this.
7810
7811 2001-12-15 Akim Demaille <akim@epita.fr>
7812
7813 * src/lex.c, src/lex.h (xgetc): No longer static.
7814 * src/reader.c (parse_union_decl): Revamp.
7815
7816 2001-12-15 Akim Demaille <akim@epita.fr>
7817
7818 Still making progress in separating Bison into (i) input, (ii)
7819 process, (iii) output: now we can directly output the parser file
7820 without using table_obstack at all.
7821
7822 * src/files.c, src/files.h (table_obstack): Bye bye.
7823 (parser_file_name): New.
7824 * src/files.c (compute_output_file_names): Compute it.
7825 * src/output.c (actions_output, output_parser)
7826 (output_master_parser): To a file instead of an obstack.
7827
7828 2001-12-15 Akim Demaille <akim@epita.fr>
7829
7830 Attach actions to rules, instead of pre-outputting them to
7831 actions_obstack.
7832
7833 * src/gram.h (rule_t): action and action_line are new members.
7834 * src/reader.c (symbol_list): Likewise.
7835 (copy_action): Save the actions within the rule.
7836 (packgram): Save them in rule_table.
7837 * src/output.c (actions_output): New.
7838 (output_parser): Use it on `%%actions'.
7839 (output_rule_data): Don't free rule_table.
7840 (output): Do it.
7841 (prepare): Don't save the `action' muscle.
7842 * src/bison.simple: s/%%action/%%actions/.
7843
7844 2001-12-15 Akim Demaille <akim@epita.fr>
7845
7846 * src/reader.c (copy_action): When --yacc, don't append a `;'
7847 to the user action: let it fail if lacking.
7848 Suggested by Arnold Robbins and Tom Tromey.
7849
7850 2001-12-14 Akim Demaille <akim@epita.fr>
7851
7852 * src/lex.c (literalchar): Simply return the char you decoded, non
7853 longer mess around with obstacks and int pointers.
7854 Adjust all callers.
7855
7856 2001-12-14 Akim Demaille <akim@epita.fr>
7857
7858 * src/lex.c (literalchar): Don't escape the special characters,
7859 just decode them, and keep them as char (before, eol was output as
7860 the 2 char string `\n' etc.).
7861 * src/output.c (output_rule_data): Use quotearg to output the
7862 token strings.
7863
7864 2001-12-13 Paul Eggert <eggert@twinsun.com>
7865
7866 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
7867 Do not infringe on the global user namespace when using C++.
7868 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
7869 All uses of `fprintf' and `stderr' changed.
7870
7871 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
7872
7873 2001-12-13 Akim Demaille <akim@epita.fr>
7874
7875 The computation of nullable is broken: it doesn't handle empty
7876 RHS's properly.
7877
7878 * tests/torture.at (GNU AWK Grammar): New.
7879 * tests/sets.at (Nullable): New.
7880 * src/nullable.c (set_nullable): Instead of blindly looping over
7881 `ritems', loop over the rules, and then over their rhs's.
7882
7883 Work around Autotest bugs.
7884
7885 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
7886 frame, because Autotest understand lines starting with a `+' as
7887 traces from the shell. Then, they are not processed properly.
7888 Admittedly an Autotest bug, but we don't have time to wait for
7889 Autotest to catch up.
7890 * tests/regression.at (Broken Closure): Adjust to the new table
7891 frames.
7892 Move to...
7893 * tests/sets.at: here.
7894
7895 2001-12-13 Akim Demaille <akim@epita.fr>
7896
7897 * src/closure.c (closure): Use nrules instead of playing tricks
7898 with BITS_PER_WORD.
7899
7900 2001-12-13 Akim Demaille <akim@epita.fr>
7901
7902 * src/print.c (print_actions): Output the handling of `$' as the
7903 traces do: shifting the token EOF. Before EOF was treated as a
7904 nonterminal.
7905 * tests/regression.at: Adjust some tests.
7906 * src/print_graph.c (print_core): Complete the set of items via
7907 closure. The next-to-final and final states are still unsatisfying,
7908 but that's to be addressed elsewhere.
7909 No longer output the rule numbers, but do output the state number.
7910 A single loop for the shifts + gotos is enough, but picked a
7911 distinct color for each.
7912 (print_graph): Initialize and finalize closure.
7913
7914 2001-12-13 Akim Demaille <akim@epita.fr>
7915
7916 * src/reader.c (readgram): Remove dead code, an strip useless
7917 braces.
7918 (get_type): Remove, unused.
7919
7920 2001-12-12 Akim Demaille <akim@epita.fr>
7921
7922 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
7923 on that of lib/error.c.
7924
7925 2001-12-12 Akim Demaille <akim@epita.fr>
7926
7927 Some hosts don't like `/' in includes.
7928
7929 * src/system.h: Include libgettext.h without qualifying the path.
7930 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
7931 $(top_srcdir).
7932
7933 2001-12-11 Marc Autret <autret_m@epita.fr>
7934
7935 * src/output.c (output_parser): Remove useless muscle.
7936
7937 2001-12-11 Marc Autret <autret_m@epita.fr>
7938
7939 * src/bison.simple: Remove #line just before %%epilogue. It
7940 is now handled in ...
7941 * src/reader.c (read_additionnal_code): Add the output of a
7942 #line for the epilogue.
7943
7944 2001-12-10 Marc Autret <autret_m@epita.fr>
7945
7946 * src/reader.c (copy_definition): Re-use CPP-outed code which
7947 replace precedent remove.
7948 * src/bison.simple: Remove #line before %%prologue because
7949 %%input-line is wrong at this time.
7950
7951 2001-12-10 Marc Autret <autret_m@epita.fr>
7952
7953 * src/reader.c (symbols_output): Clean up.
7954 * src/output.c (output_gram, output): Clean up.
7955
7956 2001-12-10 Akim Demaille <akim@epita.fr>
7957
7958 * src/lalr.c (initialize_lookaheads): New. Extracted from...
7959 * src/LR0.c (set_state_table): here.
7960 * src/lalr.c (lalr): Call it.
7961
7962 2001-12-10 Akim Demaille <akim@epita.fr>
7963
7964 * src/state.h (shifts): Remove the `number' member: shifts are
7965 attached to state, hence no longer need to be labelled with a
7966 state number.
7967
7968 2001-12-10 Akim Demaille <akim@epita.fr>
7969
7970 Now that states have a complete set of members, the linked list of
7971 shifts is useless: just fill directly the state's shifts member.
7972
7973 * src/state.h (shifts): Remove the `next' member.
7974 * src/LR0.c (first_state, last_state): Remove.
7975 Adjust the callers.
7976 (augment_automaton): Don't look for the shifts that must be added
7977 a shift on EOF: it is those of the state we looked for! But now,
7978 since shifts are attached, it is no longer needed to looking
7979 merely by its id: its number.
7980
7981 2001-12-10 Akim Demaille <akim@epita.fr>
7982
7983 * src/LR0.c (augment_automaton): Better variable locality.
7984 Remove an impossible branch: if there is a state corresponding to
7985 the start symbol being shifted, then there is shift for the start
7986 symbol from the initial state.
7987
7988 2001-12-10 Akim Demaille <akim@epita.fr>
7989
7990 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
7991 only when appropriate: when insert_start_shifting_state' is not
7992 invoked.
7993 * tests/regression.at (Rule Line Numbers): Adjust.
7994
7995 2001-12-10 Akim Demaille <akim@epita.fr>
7996
7997 * src/LR0.c (augment_automaton): Now that all states have shifts,
7998 merge the two cases addition shifts to the initial state.
7999
8000 2001-12-10 Akim Demaille <akim@epita.fr>
8001
8002 * src/lalr.c (set_state_table): Move to...
8003 * src/LR0.c: here.
8004 * src/lalr.c (lalr): Don't call it...
8005 * src/LR0.c (generate_states): do it.
8006 * src/LR0.h (first_state): Remove, only the table is used.
8007
8008 2001-12-10 Akim Demaille <akim@epita.fr>
8009
8010 * src/LR0.h (first_shift, first_reduction): Remove.
8011 * src/lalr.c: Don't use first_shift: find shifts through the
8012 states.
8013
8014 2001-12-10 Akim Demaille <akim@epita.fr>
8015
8016 * src/LR0.c: Attach shifts to states as soon as they are
8017 computed.
8018 * src/lalr.c (set_state_table): Instead of assigning shifts to
8019 state, just assert that the mapping was properly done.
8020
8021 2001-12-10 Akim Demaille <akim@epita.fr>
8022
8023 * src/LR0.c (insert_start_shift): Rename as...
8024 (insert_start_shifting_state): this.
8025 (insert_eof_shifting_state, insert_accepting_state): New.
8026 (augment_automaton): Adjust.
8027 Better locality of the variables.
8028 When looking if the start_symbol is shifted from the initial
8029 state, using `while (... symbol != start_symbol ...)' sounds
8030 better than `while (... symbol < start_symbol ...)': If fail
8031 to see how the order between symbols could be relevant!
8032
8033 2001-12-10 Akim Demaille <akim@epita.fr>
8034
8035 * src/getargs.h: Don't declare `spec_name_prefix' and
8036 `spec_file_prefix', declared by src/files.h.
8037 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
8038 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
8039 * src/output.c (prepare): Adjust.
8040 * src/reader.c (symbols_output): Likewise.
8041 * src/vmsgetargs.c: Vaguely adjust, but who cares?
8042
8043 2001-12-10 Akim Demaille <akim@epita.fr>
8044
8045 * src/muscle_tab.c (muscle_init): NULL is a better default than
8046 `"0"'.
8047
8048 2001-12-10 Akim Demaille <akim@epita.fr>
8049
8050 * src/reader.c (reader): Calling symbols_output once is enough.
8051
8052 2001-12-10 Akim Demaille <akim@epita.fr>
8053
8054 Now that states have a complete set of members, the linked list of
8055 reductions is useless: just fill directly the state's reductions
8056 member.
8057
8058 * src/state.h (struct reductions): Remove member `number' and
8059 `next'.
8060 * src/LR0.c (first_reduction, last_reduction): Remove.
8061 (save_reductions): Don't link the new reductions, store them in
8062 this_state.
8063 * src/lalr.c (set_state_table): No need to attach reductions to
8064 states, it's already done.
8065 * src/output.c (output_actions): No longer free the shifts, then
8066 the reductions, then the states: free all the states and their
8067 members.
8068
8069 2001-12-10 Akim Demaille <akim@epita.fr>
8070
8071 * src/options.c (OPTN, DRTV, BOTH): New.
8072 (option_table): Use them.
8073
8074 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
8075 the job of system.h.
8076 * src/options.c: Don't include stdio.h and xalloc.h for the same
8077 reasons.
8078
8079 2001-12-10 Akim Demaille <akim@epita.fr>
8080
8081 * src/output.c (output, prepare): Make sure the values of the
8082 muscles `action' and `prologue' are 0-terminated.
8083
8084 2001-12-10 Akim Demaille <akim@epita.fr>
8085
8086 Clean up GCC warnings.
8087
8088 * src/reader.c (copy_action): `buf' is not used.
8089 (parse_skel_decl): Be static.
8090 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
8091 * src/options.h (create_long_option_table): Have a real prototype.
8092 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
8093 (hash_delete_at): Return const void *.
8094 Adjust casts to preserve the const.
8095
8096 2001-12-10 Akim Demaille <akim@epita.fr>
8097
8098 * configure.in: Require 2.52g.
8099 M4 is not needed, but AUTOM4TE is.
8100 * m4/m4.m4: Remove.
8101 * tests/Makefile.am: Adjust.
8102
8103 2001-12-10 Akim Demaille <akim@epita.fr>
8104
8105 One structure for states is enough, even though theoretically
8106 there are LR(0) states and LALR(1) states.
8107
8108 * src/lalr.h (state_t): Remove.
8109 (state_table): Be state_t **, not state_t *.
8110 * src/state.h (core, CORE_ALLOC): Rename as...
8111 (state_t, STATE_ALLOC): this.
8112 Add the LALR(1) members: shifts, reductions, errs.
8113 * src/LR0.c (state_table): Rename as...
8114 (state_hash): this, to avoid name clashes with the global
8115 `state_table'.
8116 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
8117 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
8118
8119 2001-12-10 Akim Demaille <akim@epita.fr>
8120
8121 Bison dumps core on bash.y.
8122 Reported by Pascal Bart.
8123
8124 * src/warshall.c (bitmatrix_print): New.
8125 (TC): Use it.
8126 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
8127 j must be the outer loop.
8128 * tests/regression.at (Broken Closure): New.
8129
8130 2001-12-05 Akim Demaille <akim@epita.fr>
8131
8132 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
8133 its argument.
8134 Reported by Peter Hamorsky.
8135
8136 2001-12-05 Akim Demaille <akim@epita.fr>
8137
8138 * src/conflicts.c (err_table): Remove.
8139 (resolve_sr_conflict): Adjust.
8140 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
8141 Rename as...
8142 (state_t.reductions, state_t.shifts): this.
8143
8144 2001-12-05 Akim Demaille <akim@epita.fr>
8145
8146 * src/reduce.c (reduce_grammar_tables): No longer disable the
8147 removal of useless rules via CPP but via `if (0)', so that the
8148 compiler still check the code is valid.
8149 For instance, it should have noticed `rline' no longer exists: use
8150 the `line' member of rule_t.
8151 * src/gram.c (dummy, rline): Remove, unused.
8152
8153 2001-12-05 Akim Demaille <akim@epita.fr>
8154
8155 * src/output.c (pack_vector): Use assert, not berror.
8156 * src/main.c (berror): Remove, unused.
8157
8158 2001-12-05 Akim Demaille <akim@epita.fr>
8159
8160 New experimental feature: if --verbose --trace output all the
8161 items of a state, not only its kernel.
8162
8163 * src/print.c (print_core): If `trace_flag', then invoke closure
8164 before outputting the items of the state (print_core is no longer
8165 a correct name them).
8166 (print_results): Invoke new_closure/free_closure if needed.
8167
8168 2001-12-05 Akim Demaille <akim@epita.fr>
8169
8170 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
8171 * src/closure.c, src/closure.h (itemsetsize): Rename as...
8172 (nitemset): for consistency with the rest of the project.
8173
8174 2001-12-05 Akim Demaille <akim@epita.fr>
8175
8176 * src/closure.c (print_closure): Improve.
8177 (closure): Use it for printing input and output.
8178
8179 2001-12-05 Akim Demaille <akim@epita.fr>
8180
8181 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
8182 indexed by nonterminals.
8183
8184 2001-12-05 Akim Demaille <akim@epita.fr>
8185
8186 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
8187 what it was!).
8188 * src/warshall.h: Remove accidental duplication of the content.
8189
8190 2001-12-05 Akim Demaille <akim@epita.fr>
8191
8192 * src/closure.c (set_fderives): De-obfuscate.
8193
8194 2001-12-05 Akim Demaille <akim@epita.fr>
8195
8196 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
8197
8198 2001-12-05 Akim Demaille <akim@epita.fr>
8199
8200 * src/closure.c (set_firsts): De-obfuscate.
8201
8202 2001-12-05 Akim Demaille <akim@epita.fr>
8203
8204 * src/output.c (action_row): De-obfuscate
8205 using the good o' techniques: arrays not pointers, variable
8206 locality, BITISSET, RESETBIT etc.
8207
8208 2001-12-05 Akim Demaille <akim@epita.fr>
8209
8210 Pessimize the code to simplify it: from now on, all the states
8211 have a valid SHIFTS, which NSHIFTS is possibly 0.
8212
8213 * src/LR0.c (shifts_new): Be global and move to..
8214 * src/state.c, src/state.h: here.
8215 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
8216 * src/print_graph: Adjust.
8217
8218 2001-12-05 Akim Demaille <akim@epita.fr>
8219
8220 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
8221 * src/conflicts.c: Use it.
8222 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
8223 incorrectly ``simplified''.
8224
8225 2001-12-05 Akim Demaille <akim@epita.fr>
8226
8227 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
8228 using the good o' techniques: arrays not pointers, variable
8229 locality, BITISSET, RESETBIT etc.
8230
8231 2001-12-05 Akim Demaille <akim@epita.fr>
8232
8233 * src/state.h (SHIFT_SYMBOL): New.
8234 * src/conflicts.c: Use it to deobfuscate.
8235
8236 2001-12-05 Akim Demaille <akim@epita.fr>
8237
8238 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
8239 (print_reductions): De-obfuscate using the good o' techniques:
8240 arrays not pointers, variable locality, BITISSET.
8241
8242 2001-12-05 Akim Demaille <akim@epita.fr>
8243
8244 * src/conflicts.c (print_reductions): Arrays, not pointers.
8245 Use BITISSET.
8246
8247 2001-12-05 Akim Demaille <akim@epita.fr>
8248
8249 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8250
8251 2001-12-05 Akim Demaille <akim@epita.fr>
8252
8253 * src/conflicts.c (print_reductions): Improve variable locality.
8254
8255 2001-12-05 Akim Demaille <akim@epita.fr>
8256
8257 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8258
8259 2001-12-05 Akim Demaille <akim@epita.fr>
8260
8261 * src/conflicts.c (print_reductions): Improve variable locality.
8262
8263 2001-12-05 Akim Demaille <akim@epita.fr>
8264
8265 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
8266 * src/lalr.c: Use them.
8267
8268 2001-12-05 Akim Demaille <akim@epita.fr>
8269
8270 * src/LR0.c (augment_automaton): Formatting changes.
8271 Better variable locality.
8272
8273 2001-12-05 Akim Demaille <akim@epita.fr>
8274
8275 * src/lalr.c (matrix_print): New.
8276 (transpose): Use it.
8277 Use arrays instead of pointers.
8278
8279 2001-12-05 Akim Demaille <akim@epita.fr>
8280
8281 * src/lalr.c (maxrhs): Move to...
8282 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
8283 * src/lalr.c (build_relations): Adjust.
8284
8285 2001-12-05 Akim Demaille <akim@epita.fr>
8286
8287 * src/lalr.c (transpose): Free the memory allocated to the
8288 argument, as it is replaced by the results by the unique caller.
8289 (build_relations): Merely invoke transpose: it handles the memory
8290 deallocation.
8291 Improve variable locality.
8292 Avoid variables used as mere abbreviations.
8293 (compute_lookaheads): Use arrays instead of pointers.
8294
8295 2001-12-05 Akim Demaille <akim@epita.fr>
8296
8297 * src/lalr.c (initialize_F): Improve variable locality.
8298 Avoid variables used as mere abbreviations.
8299
8300 2001-12-05 Akim Demaille <akim@epita.fr>
8301
8302 * src/derives.c (print_derives): Display the ruleno.
8303 * src/lalr.c (initialize_F, transpose): Better variable locality
8304 to improve readability.
8305 Avoid variables used as mere abbreviations.
8306
8307 2001-12-05 Akim Demaille <akim@epita.fr>
8308
8309 * src/lalr.c (traverse): Use arrays instead of pointers.
8310
8311 2001-12-05 Akim Demaille <akim@epita.fr>
8312
8313 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
8314 the handling of squeue.
8315 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8316
8317 2001-12-05 Akim Demaille <akim@epita.fr>
8318
8319 Because useless nonterminals are now kept alive (instead of being
8320 `destroyed'), we now sometimes examine them, and store information
8321 related to them. Hence we need to know their number, and adjust
8322 memory allocations.
8323
8324 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
8325 static.
8326 * src/LR0.c (allocate_itemsets): The memory allocated to
8327 `symbol_count' was used for two different purpose: once to count
8328 the number of occurrences of each symbol, and later reassigned to
8329 `shift_symbol', containing the symbol that can be shifted from a
8330 given state.
8331 Deobfuscate, i.e., allocate, use and free `symbol_count' here
8332 only, and...
8333 (new_itemsets): Allocate `shift_symbol' here.
8334 (allocate_itemsets): symbol_count includes useless nonterminals.
8335 Make room for them.
8336 (free_storage): Use `free', not `XFREE', for pointers that cannot
8337 be null.
8338
8339 2001-12-05 Akim Demaille <akim@epita.fr>
8340
8341 * src/nullable.c (set_nullable): Deobfuscate the handling of
8342 ritem.
8343 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8344
8345 2001-12-05 Akim Demaille <akim@epita.fr>
8346
8347 * src/gram.c, src/gram.h (ritem_print): New.
8348 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
8349 (This useless function was defined only to work around VMS linkers
8350 that can't handle compilation units with variables only).
8351 * src/reduce.c (dump_grammar): Use it to trace the construction of
8352 ritem.
8353
8354 2001-12-04 Paul Eggert <eggert@twinsun.com>
8355
8356 * src/bison.simple (union yyalloc): Change member names
8357 to be the same as the stack names.
8358 (yyparse): yyptr is now union yyalloc *, not char *.
8359 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
8360 and may generate better code on some machines.
8361 (yystpcpy): Use prototype if __STDC__ is defined, not just
8362 if __cplusplus is defined.
8363
8364 2001-11-30 Akim Demaille <akim@epita.fr>
8365
8366 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
8367 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
8368 Gettext doesn't compile cleanly, and dies with -Werror.
8369 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
8370 Include WARNING_CFLAGS here.
8371 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
8372 before being defined.
8373
8374 2001-11-27 Paul Eggert <eggert@twinsun.com>
8375
8376 * lib/quotearg.h (quotearg_n, quotearg_n_style):
8377 First arg is int, not unsigned.
8378 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
8379 (SIZE_MAX, UINT_MAX): New macros.
8380 (quotearg_n_options): Abort if N is negative.
8381 Avoid overflow check on hosts where size_t is 64 bits and int
8382 is 32 bits, as overflow is impossible there.
8383 Fix off-by-one typo that caused unnecessary reallocation.
8384
8385 2001-11-29 Paul Eggert <eggert@twinsun.com>
8386
8387 Name space cleanup in generated parser.
8388
8389 * doc/bison.texinfo (Bison Parser): Discuss system headers
8390 and their effect on the user name space.
8391
8392 * src/bison.simple:
8393 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
8394 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
8395 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
8396
8397 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
8398 on user names when possible.
8399
8400 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
8401 Simplify test for whather <alloca.h> exists.
8402
8403 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
8404
8405 (<stdio.h>): Include if YYDEBUG.
8406
8407 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
8408 ! defined (yyoverflow) && ! defined (yymemcpy).
8409
8410 (yymemcpy, yyparse): Rename local variables as needed so that
8411 they all begin with 'yy'.
8412
8413 (yystrlen, yystpcpy): New functions.
8414
8415 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
8416 All uses changed.
8417
8418 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
8419 instead of relying on string.h functions. Use YYSTACK_ALLOC
8420 and YYSTACK_FREE instead of malloc and free.
8421
8422 2001-11-30 Akim Demaille <akim@epita.fr>
8423
8424 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
8425 before their first uses.
8426 (YYBISON, YYPURE): Move to the top of the output.
8427
8428 2001-11-30 Akim Demaille <akim@epita.fr>
8429
8430 * tests/reduce.at (Useless Nonterminals): Fix.
8431
8432 2001-11-30 Akim Demaille <akim@epita.fr>
8433
8434 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
8435 if body instead of `;' to pacify GCC's warnings.
8436
8437 2001-11-30 Akim Demaille <akim@epita.fr>
8438
8439 Instead of mapping the LHS of unused rules to -1, keep the LHS
8440 valid, but flag the rules as invalid.
8441
8442 * src/gram.h (rule_t): `useful' is a new member.
8443 * src/print.c (print_grammar): Adjust.
8444 * src/derives.c (set_derives): Likewise.
8445 * src/reader.c (packgram, reduce_output): Likewise.
8446 * src/reduce.c (reduce_grammar_tables): Likewise.
8447 * tests/reduce.at (Underivable Rules, Useless Rules): New.
8448
8449 2001-11-30 Akim Demaille <akim@epita.fr>
8450
8451 * src/reduce.c (reduce_output): Formatting changes.
8452 * src/print.c (print_results, print_grammar): Likewise.
8453 * tests/regression.at (Rule Line Numbers)
8454 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
8455
8456 2001-11-30 Akim Demaille <akim@epita.fr>
8457
8458 * src/reduce.c (nonterminals_reduce): Instead of throwing away
8459 useless nonterminals, move them at the end of the symbol arrays.
8460 (reduce_output): Adjust.
8461 * tests/reduce.at (Useless Nonterminals): Adjust.
8462
8463 2001-11-30 Akim Demaille <akim@epita.fr>
8464
8465 * src/reduce.c: Various comment/formatting changes.
8466 (nonterminals_reduce): New, extracted from...
8467 (reduce_grammar_tables): here.
8468 (reduce_grammar): Call nonterminals_reduce.
8469
8470 2001-11-29 Paul Eggert <eggert@twinsun.com>
8471
8472 * src/bison.simple (YYSTACK_REALLOC): Remove.
8473 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
8474 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
8475 New macros.
8476 (union yyalloc): New type.
8477 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
8478 an arbitrary restriction on hosts where size_t is wider than int.
8479
8480 (yyparse): Don't dump core if alloca or malloc fails; instead, report
8481 a parser stack overflow. Allocate just one block of memory for all
8482 three stacks, instead of allocating three blocks; this typically is
8483 faster and reduces fragmentation.
8484
8485 Do not limit the number of items in the stack to a value that fits
8486 in 'int', as this is an arbitrary limit on hosts with 64-bit
8487 size_t and 32-bit int.
8488
8489 2001-11-29 Marc Autret <autret_m@epita.fr>
8490
8491 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
8492 of defining YYERROR_VERBOSE.
8493 [AT_DATA]: $4 is now out of C declarations in the prologue.
8494
8495 2001-11-28 Marc Autret <autret_m@epita.fr>
8496
8497 * src/reader.c (parse_dquoted_param): New.
8498 (parse_skel_decl): Use it.
8499 * src/lex.h: Add its prototype.
8500 * src/lex.c (literalchar): Become not static.
8501
8502 2001-11-28 Marc Autret <autret_m@epita.fr>
8503
8504 * src/output.h: And put its extern declaration here.
8505 * src/output.c (error_verbose): Define here.
8506 (prepare): Echo name modification.
8507 * src/getargs.h: Clean its extern declaration.
8508 * src/getargs.c (error_verbose_flag): Remove.
8509 (getargs): Remove case 'e'.
8510 * src/options.c (option_table): 'error-verbose' is now seen as simple
8511 percent option.
8512 Include output.h.
8513
8514 * src/reader.c (read_declarations): Remove case tok_include.
8515 (parse_include_decl): Remove.
8516 * src/lex.h (token_t): Remove tok_include.
8517 * src/options.c (option_table): 'include' is now a simple command line
8518 option.
8519
8520 2001-11-28 Marc Autret <autret_m@epita.fr>
8521
8522 * src/bison.simple: Adjust muscle names.
8523 * src/muscle_tab.c (muscle_init): Also rename the muscles.
8524 * src/output.c (prepare): s/_/-/ for the muscles names.
8525 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
8526
8527 2001-11-28 Marc Autret <autret_m@epita.fr>
8528
8529 * src/bison.simple: Fix debug.
8530 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
8531
8532 2001-11-28 Akim Demaille <akim@epita.fr>
8533
8534 * src/LR0.c (shifts_new): New.
8535 (save_shifts, insert_start_shift, augment_automaton): Use it.
8536
8537 2001-11-28 Akim Demaille <akim@epita.fr>
8538
8539 * src/closure.c (closure): `b' and `ruleno' denote the same value:
8540 keep ruleno only.
8541
8542 2001-11-28 Akim Demaille <akim@epita.fr>
8543
8544 * src/closure.c (closure): Instead of looping over word in array
8545 then bits in words, loop over bits in array.
8546
8547 2001-11-28 Akim Demaille <akim@epita.fr>
8548
8549 * src/closure.c (closure): No longer optimize the special case
8550 where all the bits of `ruleset[r]' are set to 0, to make the code
8551 clearer.
8552
8553 2001-11-28 Akim Demaille <akim@epita.fr>
8554
8555 * src/closure.c (closure): `r' and `c' are new variables, used to
8556 de-obfuscate accesses to RULESET and CORE.
8557
8558 2001-11-28 Akim Demaille <akim@epita.fr>
8559
8560 * src/reduce.c (reduce_print): Use ngettext.
8561 (dump_grammar): Improve the trace accuracy.
8562
8563 2001-11-28 Akim Demaille <akim@epita.fr>
8564
8565 * src/reduce.c (dump_grammar): Don't translate trace messages.
8566
8567 2001-11-28 Akim Demaille <akim@epita.fr>
8568
8569 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
8570 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
8571 as all tags are free'ed afterwards.
8572 From Enrico Scholz.
8573
8574 2001-11-27 Paul Eggert <eggert@twinsun.com>
8575
8576 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
8577 use alloca when we didn't want to, and vice versa.
8578
8579 2001-11-27 Marc Autret <autret_m@epita.fr>
8580
8581 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
8582 initialization.
8583 * src/output.c (prepare): Remove its update.
8584
8585 2001-11-27 Marc Autret <autret_m@epita.fr>
8586
8587 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
8588 Use %error-verbose.
8589
8590 2001-11-27 Marc Autret <autret_m@epita.fr>
8591
8592 * src/bison.simple: Remove YYERROR_VERBOSE using.
8593 Use %%error_verbose.
8594 (yyparse): Likewise.
8595 * src/output.c (prepare): Give its final value.
8596 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
8597 * src/getargs.h: Add its extern declaration.
8598 * src/getargs.c (error_verbose_flag): New int.
8599 (getargs): Update to catch new case.
8600 * src/options.c (option_table): 'error-verbose' is a new option.
8601 (shortopts): Update.
8602
8603 2001-11-27 Akim Demaille <akim@epita.fr>
8604
8605 * src/system.h: Use intl/libgettext.h.
8606 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
8607
8608 2001-11-27 Akim Demaille <akim@epita.fr>
8609
8610 * tests/torture.at (Exploding the Stack Size with Malloc):
8611 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
8612
8613 2001-11-27 Akim Demaille <akim@epita.fr>
8614
8615 * src/files.c: Include error.h.
8616 Reported by Hans Aberg.
8617
8618 2001-11-26 Marc Autret <autret_m@epita.fr>
8619
8620 * src/reader.c (parse_include_decl): New, not yet implemented.
8621 (read_declarations): Add case tok_include.
8622 * src/getargs.h (include): Add its extern definition.
8623 * src/getargs.c (include): New const char *.
8624 (getargs): Add case '-I'.
8625 * src/options.c (option_table): Add include as command line and
8626 percent option.
8627 * src/lex.h (token_t): Add tok_include.
8628
8629 2001-11-26 Akim Demaille <akim@epita.fr>
8630
8631 * src/reader.c (readgram): Make sure rules for mid-rule actions
8632 have a lineno equal to that of their host rule.
8633 Reported by Hans Aberg.
8634 * tests/regression.at (Rule Line Numbers): New.
8635
8636 2001-11-26 Akim Demaille <akim@epita.fr>
8637
8638 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
8639 size_ts.
8640
8641 2001-11-26 Akim Demaille <akim@epita.fr>
8642
8643 * src/complain.c, src/complain.h (error): Remove, provided by
8644 lib/error.[ch].
8645
8646 2001-11-26 Akim Demaille <akim@epita.fr>
8647
8648 * src/reader.c (read_declarations): Don't abort on tok_illegal,
8649 issue an error message.
8650 * tests/regression.at (Invalid %directive): New.
8651 Reported by Hans Aberg.
8652
8653 2001-11-26 Akim Demaille <akim@epita.fr>
8654
8655 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
8656 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8657
8658 2001-11-26 Akim Demaille <akim@epita.fr>
8659
8660 * src/conflicts.c (conflicts_print): Don't complain at all when
8661 there are no reduce/reduce conflicts, and as many shift/reduce
8662 conflicts as expected.
8663 * tests/regression.at (%expect right): Adjust.
8664
8665 2001-11-23 Akim Demaille <akim@epita.fr>
8666
8667 * lib/alloca.c: Update, from fileutils.
8668
8669 2001-11-23 Akim Demaille <akim@epita.fr>
8670
8671 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
8672
8673 2001-11-23 Akim Demaille <akim@epita.fr>
8674
8675 * src/system.h: Include alloca.h.
8676 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
8677
8678 2001-11-23 Akim Demaille <akim@epita.fr>
8679
8680 * src/print_graph.c (print_actions): Remove `rule', unused.
8681 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
8682 pacify GCC's signed < unsigned warnings.
8683 * src/closure.c (itemsetsize): Likewise.
8684 * src/reader.c (symbol_list_new): Static.
8685
8686 2001-11-23 Akim Demaille <akim@epita.fr>
8687
8688 Attaching lineno to buckets is stupid, since only one copy of each
8689 symbol is kept, only the line of the first occurrence is kept too.
8690
8691 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
8692 * src/reader.c (rline_allocated): Remove, unused.
8693 (symbol_list): Have a `line' member.
8694 (symbol_list_new): New.
8695 (readgram): Use it.
8696 * src/print.c (print_grammar): Output the rule line numbers.
8697 * tests/regression.at (Solved SR Conflicts)
8698 (Unresolved SR Conflicts): Adjust.
8699 Reported by Hans Aberg.
8700
8701 2001-11-22 Marc Autret <autret_m@epita.fr>
8702
8703 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
8704
8705 2001-11-22 Marc Autret <autret_m@epita.fr>
8706
8707 * src/muscle_tab.c (muscle_init): Remove initialization of
8708 skeleton muscle.
8709 * src/output.c (output_master_parser): Do it here.
8710
8711 2001-11-20 Akim Demaille <akim@epita.fr>
8712
8713 * po/sv.po: New.
8714 * configure.in (ALL_LINGUAS): Adjust.
8715 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
8716 longer contains strings to translate.
8717
8718 2001-11-19 Akim Demaille <akim@epita.fr>
8719
8720 * src/conflicts.c (conflicts_print): Add a missing \n.
8721
8722 2001-11-19 Akim Demaille <akim@epita.fr>
8723
8724 * src/nullable.c (nullable_print): New.
8725 (set_nullable): Call it when tracing.
8726 Better locality of variables.
8727
8728 2001-11-19 Akim Demaille <akim@epita.fr>
8729
8730 * src/print.c (print_actions): Better locality of variables.
8731
8732 2001-11-19 Akim Demaille <akim@epita.fr>
8733
8734 * src/derives.c (print_derives): Fix and enrich.
8735 * src/closure.c (print_fderives): Likewise.
8736
8737 2001-11-19 Akim Demaille <akim@epita.fr>
8738
8739 * src/closure.c (itemsetend): Remove, replaced with...
8740 (itemsetsize): new.
8741
8742 2001-11-19 Akim Demaille <akim@epita.fr>
8743
8744 * src/LR0.c (kernel_end): Remove, replaced with...
8745 (kernel_size): new.
8746
8747 2001-11-19 Akim Demaille <akim@epita.fr>
8748
8749 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
8750 to clarify.
8751
8752 2001-11-19 Akim Demaille <akim@epita.fr>
8753
8754 * src/closure.c (closure): Use arrays instead of pointers to clarify.
8755
8756 2001-11-19 Akim Demaille <akim@epita.fr>
8757
8758 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
8759 trace messages.
8760 * src/LR0.c: Likewise.
8761 (allocate_itemsets): Use arrays instead of pointers to clarify.
8762
8763 2001-11-19 Akim Demaille <akim@epita.fr>
8764
8765 * src/getargs.c (statistics_flag): Replace with...
8766 (trace_flag): New.
8767 (longopts): Accept --trace instead of --statistics.
8768 * src/getargs.h, src/options.c: Adjust.
8769 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
8770 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
8771
8772 2001-11-19 Akim Demaille <akim@epita.fr>
8773
8774 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
8775 pointers to clarify the code.
8776 (save_reductions, save_shifts): Factor common parts of alternatives.
8777
8778 2001-11-19 Akim Demaille <akim@epita.fr>
8779
8780 * src/LR0.c (new_state, get_state): Complete TRACE code.
8781 * src/closure.c: Include `reader.h' to get `tags', needed by the
8782 trace code.
8783 Rename the conditional DEBUG as TRACE.
8784 Output consistently TRACEs to stderr, not stdout.
8785 * src/derives.c: Likewise.
8786 * src/reduce.c: (inaccessable_symbols): Using if is better style
8787 than goto.
8788 Use `#if TRACE' instead of `#if 0' for tracing code.
8789
8790 2001-11-19 Akim Demaille <akim@epita.fr>
8791
8792 * src/system.h (LIST_FREE, shortcpy): New.
8793 * src/LR0.c: Use them.
8794 * src/output.c (free_itemsets, free_reductions, free_shifts):
8795 Remove, replaced by LIST_FREE.
8796
8797 2001-11-19 Akim Demaille <akim@epita.fr>
8798
8799 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8800 (REDUCTIONS_ALLOC): New.
8801 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8802 allocation.
8803
8804 2001-11-19 Akim Demaille <akim@epita.fr>
8805
8806 * src/LR0.c (new_state): Complete trace code.
8807 * src/nullable.c (set_nullable): Don't translate traces.
8808
8809 2001-11-19 Akim Demaille <akim@epita.fr>
8810
8811 * src/print_graph.c (print_core): Better locality of variables.
8812 * src/print.c (print_core): Likewise.
8813
8814 2001-11-19 Akim Demaille <akim@epita.fr>
8815
8816 * src/vcg.c: You do the output, so you are responsible of the
8817 handling of VCG syntax, in particular: use quotearg.
8818 * src/print_graph.c: Don't.
8819 (print_actions): Don't output the actions as part of the nodes,
8820 since that's the job of the edges.
8821 (print_state): Don't output by hand: fill the node description,
8822 and ask for its output.
8823
8824 2001-11-19 Akim Demaille <akim@epita.fr>
8825
8826 * src/bison.simple (yyparse): When verbosely reporting an error,
8827 no longer put additional quotes around token names.
8828 * tests/calc.at: Adjust.
8829
8830 2001-11-19 Akim Demaille <akim@epita.fr>
8831
8832 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8833 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8834 * src/output.c: Adjust.
8835
8836 2001-11-19 Akim Demaille <akim@epita.fr>
8837
8838 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8839 (rule_t): this.
8840 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8841
8842 2001-11-19 Akim Demaille <akim@epita.fr>
8843
8844 * src/gram.h (rule_t): New.
8845 (rule_table): New.
8846 (rrhs, rlhs): Remove, part of state_t.
8847 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8848 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8849 * src/reader.c, src/reduce.c: Adjust.
8850
8851 2001-11-19 Akim Demaille <akim@epita.fr>
8852
8853 * src/reader.c (symbols_output): New, extracted from...
8854 (packsymbols): Here.
8855 (reader): Call it.
8856
8857 2001-11-19 Akim Demaille <akim@epita.fr>
8858
8859 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8860 (maxrhs): this new function.
8861
8862 2001-11-19 Akim Demaille <akim@epita.fr>
8863
8864 * src/lalr.c (F): New macro to access the variable F.
8865 Adjust.
8866
8867 2001-11-19 Akim Demaille <akim@epita.fr>
8868
8869 * src/lalr.h (LA): New macro to access the variable LA.
8870 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8871 * src/lalr.c: Adjust.
8872
8873 2001-11-19 Akim Demaille <akim@epita.fr>
8874
8875 * src/lalr.c (initialize_LA): Only initialize LA. Let...
8876 (set_state_table): handle the `lookaheads' members.
8877
8878 2001-11-19 Akim Demaille <akim@epita.fr>
8879
8880 * src/lalr.h (lookaheads): Removed array, whose contents is now
8881 a member of...
8882 (state_t): this structure.
8883 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8884 Adjust.
8885
8886 2001-11-19 Akim Demaille <akim@epita.fr>
8887
8888 * src/lalr.h (consistent): Removed array, whose contents is now
8889 a member of...
8890 (state_t): this structure.
8891 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8892 Adjust.
8893
8894 2001-11-19 Akim Demaille <akim@epita.fr>
8895
8896 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
8897 contents are now members of...
8898 (state_t): this structure.
8899 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8900 Adjust.
8901
8902 2001-11-19 Akim Demaille <akim@epita.fr>
8903
8904 * src/lalr.h (state_t): New.
8905 (state_table): Be a state_t * instead of a core **.
8906 (accessing_symbol): Remove, part of state_t.
8907 * src/lalr.c: Adjust.
8908 (set_accessing_symbol): Merge into...
8909 (set_state_table): this.
8910 * src/print_graph.c, src/conflicts.c: Adjust.
8911
8912 2001-11-14 Akim Demaille <akim@epita.fr>
8913
8914 * tests/calc.at, tests/output.at, tests/regression.at,
8915 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
8916 now the tests are run in private dirs, therefore AC_CLEANUP and
8917 family can be simplified to 0-ary.
8918 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
8919 use abs. path to find config.h.
8920 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
8921 stderr, there can be way too much random noise.
8922 Instead pass -Werror to GCC and rely on the exit status.
8923 Reported by Wolfram Wagner.
8924
8925 2001-11-14 Akim Demaille <akim@epita.fr>
8926
8927 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
8928 defined only if yyoverflow is defined, to avoid `warning: unused
8929 variable `yyvs1''.
8930 Reported by The Test Suite.
8931
8932 2001-11-14 Akim Demaille <akim@epita.fr>
8933
8934 * src/print.c: Include reduce.h.
8935 Reported by Hans Aberg.
8936
8937 2001-11-14 Akim Demaille <akim@epita.fr>
8938
8939 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
8940 Revert a previous patch: these are really const.
8941 * src/conflicts.c (conflict_report): Additional useless pair of
8942 braces to pacify GCC's warnings for `if () if () {} else {}'.
8943 * src/lex.c (parse_percent_token): Replace equal_offset with
8944 arg_offset.
8945 arg is const.
8946 Be sure to strdup `arg' when used, since there is no reason for
8947 token_buffer not to change.
8948
8949 2001-11-14 Akim Demaille <akim@epita.fr>
8950
8951 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
8952 definition.
8953 * src/main.c (main): Use them.
8954 Suggested by Hans Aberg.
8955
8956 2001-11-12 Akim Demaille <akim@epita.fr>
8957
8958 * src/system.h (ngettext): Now that we use ngettext, be sure to
8959 provide a default definition when NLS are not used.
8960
8961 2001-11-12 Akim Demaille <akim@epita.fr>
8962
8963 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
8964 Use @kbd to denote user input.
8965 (Language and Grammar): ANSIfy the example.
8966 Adjust its layout for info/notinfo.
8967 (Location Tracking Calc): Output error messages to stderr.
8968 Output locations in a more GNUtically correct way.
8969 Fix a couple of Englishos.
8970 Adjust @group/@end group pairs.
8971
8972 2001-11-12 Akim Demaille <akim@epita.fr>
8973
8974 %expect was not functioning at all.
8975
8976 * src/conflicts.c (expected_conflicts): Set to -1.
8977 (conflict_report): Use ngettext.
8978 (conflicts_print): Check %expect and make its violation an error.
8979 * doc/bison.texinfo (Expect Decl): Adjust.
8980 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
8981 * tests/regression.at (%expect not enough, %expect right)
8982 (%expect too much): New.
8983
8984 2001-11-12 Akim Demaille <akim@epita.fr>
8985
8986 * tests/regression.at (Conflicts): Rename as...
8987 (Unresolved SR Conflicts): this.
8988 (Solved SR Conflicts): New.
8989
8990 2001-11-12 Akim Demaille <akim@epita.fr>
8991
8992 * src/reduce.c (print_results): Rename as...
8993 (reduce_output): This.
8994 Output to OUT, passed as argument, instead of output_obstack.
8995 (dump_grammar): Likewise.
8996 (reduce_free): New.
8997 Also free V1.
8998 (reduce_grammar): No longer call reduce_output, since...
8999 * src/print.c (print_results): do it.
9000 * src/main.c (main): Call reduce_free;
9001
9002 2001-11-12 Akim Demaille <akim@epita.fr>
9003
9004 * src/conflicts.c (print_reductions): Accept OUT as argument.
9005 Output to it, not to output_obstack.
9006 * src/print.c (print_actions): Adjust.
9007
9008 2001-11-12 Akim Demaille <akim@epita.fr>
9009
9010 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
9011 the result instead of using...
9012 (src_total, rrc_total, src_count, rrc_count): Remove.
9013 (any_conflicts): Remove.
9014 (print_conflicts): Split into...
9015 (conflicts_print, conflicts_output): New.
9016 * src/conflicts.h: Adjust.
9017 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
9018 * src/print.c (print_grammar): Issue `\n' between two rules.
9019 * tests/regression.at (Conflicts): New.
9020 Reported by Tom Lane.
9021
9022 2001-11-12 Akim Demaille <akim@epita.fr>
9023
9024 * tests/regression.at (Invalid input): Remove, duplicate with
9025 ``Invalid input: 1''.
9026
9027 2001-11-12 Akim Demaille <akim@epita.fr>
9028
9029 * tests/torture.at (AT_DATA_STACK_TORTURE)
9030 (Exploding the Stack Size with Alloca)
9031 (Exploding the Stack Size with Malloc): New.
9032
9033 2001-11-12 Akim Demaille <akim@epita.fr>
9034
9035 * src/bison.simple (YYSTACK_REALLOC): New.
9036 (yyparse) [!yyoverflow]: Use it and free the old stack.
9037 Reported by Per Allansson.
9038
9039 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
9040
9041 * src/bison.simple: Define type yystype instead of YYSTYPE, and
9042 define CPP macro, which substitute YYSTYPE by yystype.
9043 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
9044 with yyltype/YYLTYPE. This allows inclusion of the generated
9045 header within the parser if the compiler, such as GGC, accepts
9046 multiple equivalent #defines.
9047 From Akim.
9048
9049 2001-11-05 Akim Demaille <akim@epita.fr>
9050
9051 * src/reader.c (symbols_output): New, extracted from...
9052 (packsymbols): here.
9053 (reader): Adjust.
9054
9055 2001-11-05 Akim Demaille <akim@epita.fr>
9056
9057 * src/lex.c (parse_percent_token): s/quotearg/quote/.
9058
9059 2001-11-05 Akim Demaille <akim@epita.fr>
9060
9061 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
9062 pattern.
9063
9064 2001-11-05 Akim Demaille <akim@epita.fr>
9065
9066 * src/options.h (struct option_table_struct): set_flags is void*.
9067 * src/options.c (longopts): Support `--output' and `%output'.
9068 (usage): Adjust.
9069 * src/lex.h (tok_setopt): Remove, replaced with...
9070 (tok_intopt, tok_stropt): these new guys.
9071 * src/lex.c (getopt.h): Not needed.
9072 (token_buffer, unlexed_token_buffer): Not const.
9073 (percent_table): Promote `-' over `_' in directive names.
9074 Active `%name-prefix', `file-prefix', and `output'.
9075 (parse_percent_token): Accept possible arguments to directives.
9076 Promote `-' over `_' in directive names.
9077
9078 2001-11-04 Akim Demaille <akim@epita.fr>
9079
9080 * doc/bison.texinfo (Decl Summary): Split the list into
9081 `directives for grammars' and `directives for bison'.
9082 Sort'em.
9083 Add description of `%name-prefix', `file-prefix', and `output'.
9084 Promote `-' over `_' in directive names.
9085 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
9086 Simplify the description of `--name-prefix'.
9087 Promote `-' over `_' in directive names.
9088 Promote `--output' over `--output-file'.
9089 Fix the description of `--defines'.
9090 * tests/output.at: Exercise %file-prefix and %output.
9091
9092 2001-11-02 Akim Demaille <akim@epita.fr>
9093
9094 * doc/refcard.tex: Update.
9095
9096 2001-11-02 Akim Demaille <akim@epita.fr>
9097
9098 * src/symtab.h (SUNDEF): New.
9099 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
9100 stand for `uninitialized', instead of 0.
9101 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
9102 * src/lex.c (lex): Adjust.
9103
9104 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
9105 Number it 0.
9106 Let yylex return it instead of a plain 0.
9107 Reported by Dick Streefland.
9108
9109 2001-11-02 Akim Demaille <akim@epita.fr>
9110
9111 * tests/regression.at (Mixing %token styles): New test.
9112
9113 2001-11-02 Akim Demaille <akim@epita.fr>
9114
9115 * src/reader.c (parse_thong_decl): Formatting changes.
9116 (token_translations_init): New, extracted from...
9117 (packsymbols): Here.
9118 Adjust.
9119
9120 2001-11-01 Akim Demaille <akim@epita.fr>
9121
9122 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
9123 Check that `9foo.y' produces correct cpp guards.
9124 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
9125 guards.
9126 Reported by Wwp.
9127
9128 2001-11-01 Akim Demaille <akim@epita.fr>
9129
9130 * tests/regression.at (Invalid input: 2): New.
9131 * src/lex.c (unlexed_token_buffer): New.
9132 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
9133 too.
9134 Reported by Wwp.
9135
9136 2001-11-01 Akim Demaille <akim@epita.fr>
9137
9138 * tests/calc.at: Catch up with 1.30.
9139 * configure.in: Bump to 1.49a.
9140 Adjust to newer Autotest.
9141
9142 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
9143
9144 * src/conflicts.c: Move global variables rrc_total and src_total ...
9145 (print_conflicts): here.
9146 * src/output.c (output): Free global variable user_toknums.
9147 * src/lex.c (token_obstack): Become static.
9148
9149 2001-10-18 Akim Demaille <akim@epita.fr>
9150
9151 * tests/atlocal.in (GCC): Add.
9152 * tests/calc.at: s/m4_match/m4_bmatch/.
9153 s/m4_patsubst/m4_bpatsubst/.
9154 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
9155 * configure.in: AC_SUBST(GCC).
9156
9157 2001-10-14 Marc Autret <autret_m@epita.fr>
9158
9159 * src/options.c (create_long_option_table): Fix.
9160
9161 2001-10-10 Akim Demaille <akim@epita.fr>
9162
9163 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
9164
9165 2001-10-04 Akim Demaille <akim@epita.fr>
9166
9167 * src/reader.c (parse_union_decl): Push the caracters in
9168 union_obstack, not attrs_obstack.
9169
9170 2001-10-04 Akim Demaille <akim@epita.fr>
9171
9172 Merge in the branch 1.29.
9173
9174 * src/reader.c (packsymbols): Use a temporary obstack for
9175 `%%tokendef', since output_stack is already used elsewhere.
9176
9177 2001-10-02 Akim Demaille <akim@epita.fr>
9178
9179 Bump 1.29d.
9180
9181 2001-10-02 Akim Demaille <akim@epita.fr>
9182
9183 Version 1.29c.
9184
9185 2001-10-02 Akim Demaille <akim@epita.fr>
9186
9187 * tests/regression.at (Invalid CPP headers): New.
9188 From Alexander Belopolsky.
9189 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
9190
9191 2001-10-02 Akim Demaille <akim@epita.fr>
9192
9193 * tests/regression.at (Invalid input): New.
9194 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
9195 Reported by Shura.
9196
9197 2001-10-02 Akim Demaille <akim@epita.fr>
9198
9199 * tests/calc.at: Now that --debug works, the tests must be adjusted.
9200
9201 2001-10-02 Akim Demaille <akim@epita.fr>
9202
9203 * src/output.c (output_parser): Assert `skeleton'.
9204 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
9205 systems.
9206 From Shura.
9207
9208 2001-10-01 Marc Autret <autret_m@epita.fr>
9209
9210 * src/lex.h: Echo modifications.
9211 * src/lex.c (unlex): Parameter is now token_t.
9212 From Hans Aberg.
9213
9214 2001-10-01 Marc Autret <autret_m@epita.fr>
9215
9216 * src/main.c: Include lex.h.
9217 From Hans Aberg.
9218
9219 2001-09-29 Akim Demaille <akim@epita.fr>
9220
9221 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
9222
9223 2001-09-28 Akim Demaille <akim@epita.fr>
9224
9225 * tests/testsuite.at: Update to newer Autotest.
9226 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
9227
9228 2001-09-27 Akim Demaille <akim@epita.fr>
9229
9230 Position independent wrapper.
9231
9232 * tests/bison: Remove.
9233 * tests/bison.in: New.
9234 * configure.in: Adjust.
9235
9236 2001-09-27 Paul Eggert <eggert@twinsun.com>
9237
9238 Port quotearg fixes from tar 1.13.24.
9239
9240 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
9241 tm to be declared.
9242 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
9243 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
9244
9245 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
9246 * m4/mbrtowc.m4: New file.
9247 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
9248 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
9249
9250 2001-09-27 Akim Demaille <akim@epita.fr>
9251
9252 Bump to 1.29c.
9253
9254 2001-09-27 Akim Demaille <akim@epita.fr>
9255
9256 Version 1.29b.
9257
9258 2001-09-25 Akim Demaille <akim@epita.fr>
9259
9260 * src/system.h: Include `xalloc.h'.
9261 Remove it from the C files.
9262 * src/files.c (output_files): Free the obstacks.
9263 * src/lex.c (init_lex): Rename as...
9264 (lex_init): this.
9265 (lex_free): New.
9266 * src/main.c (main): Use it.
9267
9268 2001-09-24 Marc Autret <autret_m@epita.fr>
9269
9270 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
9271 to output informations in fout (FILE*).
9272 (open_graph, close_graph): Likewise.
9273 (output_graph, output_edge, output_node): Likewise.
9274 * src/vcg.h: Update function prototypes.
9275 * src/print_graph.c (print_graph): Open output graph file.
9276 (print_actions): Adjust.
9277 * src/files.h: Remove extern declaration.
9278 * src/files.c: Remove graph_obstack declaration.
9279 (open_files): Remove graph_obstack initialization.
9280 (output_files): Remove graph_obstack saving.
9281
9282 2001-09-24 Marc Autret <autret_m@epita.fr>
9283
9284 * src/files.c (compute_output_file_names): Fix.
9285
9286 2001-09-24 Marc Autret <autret_m@epita.fr>,
9287 Akim Demaille <akim@epita.fr>
9288
9289 * src/reader.c (reader): Remove call to free_symtab ().
9290 * src/main.c (main): Call it here.
9291 Include symtab.h.
9292 * src/conflicts.c (initialize_conflicts): Rename as...
9293 (solve_conflicts): this.
9294 * src/print.c (print_core, print_actions, print_state)
9295 (print_grammar): Dump to a file instead a `output_obstack'.
9296 (print_results): Dump `output_obstack', and then proceed with the
9297 FILE *.
9298 * src/files.c (compute_output_file_names, close_files): New.
9299 (output_files): Adjust.
9300 * src/main.c (main): Adjust.
9301
9302 2001-09-23 Marc Autret <autret_m@epita.fr>
9303
9304 * src/files.c (compute_header_macro): Computes header macro name
9305 from spec_defines_file when given.
9306
9307 2001-09-23 Marc Autret <autret_m@epita.fr>
9308
9309 * src/files.c (output_files): Add default extensions.
9310
9311 2001-09-22 Akim Demaille <akim@epita.fr>
9312
9313 * src/conflicts.c (finalize_conflicts): Rename as...
9314 (free_conflicts): this.
9315
9316 2001-09-22 Akim Demaille <akim@epita.fr>
9317
9318 * src/gram.c (gram_free): Rename back as...
9319 (dummy): this.
9320 (output_token_translations): Free `token_translations'.
9321 * src/symtab.c (free_symtab): Free the tag field.
9322
9323 2001-09-22 Akim Demaille <akim@epita.fr>
9324
9325 Remove `translations' as it is always set to true.
9326
9327 * src/gram.h: Adjust.
9328 * src/reader.c (packsymbols, parse_token_decl): Adjust
9329 * src/print.c (print_grammar): Adjust.
9330 * src/output.c (output_token_translations): Adjust.
9331 * src/lex.c (lex): Adjust.
9332 * src/gram.c: Be sure the set pointers to NULL.
9333 (dummy): Rename as...
9334 (gram_free): this.
9335
9336 2001-09-22 Akim Demaille <akim@epita.fr>
9337
9338 * configure.in: Invoke AM_LIB_DMALLOC.
9339 * src/system.h: Use dmalloc.
9340 * src/LR0.c: Be sure to have pointers initialized to NULL.
9341 (allocate_itemsets): Allocate kernel_items only if needed.
9342
9343 2001-09-22 Akim Demaille <akim@epita.fr>
9344
9345 * configure.in: Bump to 1.29b.
9346 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
9347 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
9348 need xmalloc.c in calc.y.
9349 From Pascal Bart.
9350
9351 2001-09-21 Akim Demaille <akim@epita.fr>
9352
9353 Version 1.29a.
9354 * Makefile.maint, config/config.guess, config/config.sub,
9355 * config/missing: Update from masters.
9356 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
9357 upon package.m4.
9358 * configure.in (ALL_LINGUAS): Add `tr'.
9359
9360 2001-09-21 Akim Demaille <akim@epita.fr>
9361
9362 * tests/Makefile.am (package.m4): Move to...
9363 ($(srcdir)/$(TESTSUITE)): here.
9364
9365 2001-09-20 Akim Demaille <akim@epita.fr>
9366
9367 * src/complain.c: No longer try to be standalone: use system.h.
9368 Don't assume __STDC__ is defined to 1. Just test if it is defined.
9369 * src/complain.h: Likewise.
9370 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
9371 Remove the unused variable `n'.
9372 From Albert Chin-A-Young.
9373
9374 2001-09-18 Marc Autret <autret_m@epita.fr>
9375
9376 * doc/bison.1: Update.
9377 * doc/bison.texinfo (Bison Options): Update --defines and --graph
9378 descriptions.
9379 (Option Cross Key): Update.
9380 Add --graph.
9381
9382 2001-09-18 Marc Autret <autret_m@epita.fr>
9383
9384 * tests/regression.at: New test (comment in %union).
9385
9386 2001-09-18 Marc Autret <autret_m@epita.fr>
9387
9388 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
9389 do that.
9390 Reported by Keith Browne.
9391
9392 2001-09-18 Marc Autret <autret_m@epita.fr>
9393
9394 * tests/output.at: Add tests for --defines and --graph.
9395
9396 2001-09-18 Marc Autret <autret_m@epita.fr>
9397
9398 * tests/output.at: Removes tests of %{header,src}_extension features.
9399
9400 2001-09-18 Akim Demaille <akim@epita.fr>
9401
9402 * tests/Makefile.am (package.m4): New.
9403 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
9404 (_AT_CHECK_CALC_ERROR): Likewise.
9405 Factor the `, ' part of verbose error messages.
9406
9407 2001-09-18 Marc Autret <autret_m@epita.fr>
9408
9409 * src/getargs.c (longopts): Declare --defines and --graph as options
9410 with optional arguments.
9411 * src/files.h: Add extern declarations.
9412 * src/files.c (spec_graph_file, spec_defines_file): New.
9413 (output_files): Update.
9414 Remove CPP-outed code.
9415
9416 2001-09-18 Marc Autret <autret_m@epita.fr>
9417
9418 Turn off %{source,header}_extension feature.
9419
9420 * src/files.c (compute_exts_from_gf): Update.
9421 (compute_exts_from_src): Update.
9422 (output_files): CPP-out useless code.
9423 * src/files.h: Remove {header,source}_extension extern declarations.
9424 * src/reader.c (parse_dquoted_param): CPP-out.
9425 (parse_header_extension_decl): Remove.
9426 (parse_source_extension_decl): Remove.
9427 (read_declarations): Remove cases tok_{hdrext,srcext}.
9428 * src/lex.c (percent_table): Remove {header,source}_extension entries.
9429 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
9430
9431 2001-09-10 Akim Demaille <akim@epita.fr>
9432
9433 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
9434 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
9435 (AT_CHECK_OUTPUT): this.
9436 Merely check ls' exit status, its output is useless.
9437
9438 2001-09-10 Akim Demaille <akim@epita.fr>
9439
9440 * tests/calc.at: Use m4_match.
9441 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
9442
9443 2001-09-10 Marc Autret <autret_m@epita.fr>,
9444 Akim Demaille <akim@epita.fr>
9445
9446 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
9447 enum color_e.
9448 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
9449 to `normal'.
9450 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
9451 * src/lex.h: Adjust prototype.
9452 (token_t): Add `tok_undef'.
9453 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
9454 (parse_percent_token): Now returns token_t.
9455 Add default statement in switch.
9456 (lex): Separate `c' as an input variable, from the token_t result
9457 part.
9458 (unlexed): Is a token_t.
9459
9460 2001-09-10 Akim Demaille <akim@epita.fr>
9461
9462 * configure.in: Bump to 1.29a.
9463
9464 2001-09-07 Akim Demaille <akim@epita.fr>
9465
9466 Version 1.29.
9467
9468 2001-08-30 Akim Demaille <akim@epita.fr>
9469
9470 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
9471 * m4/atconfig.m4: Remove.
9472 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
9473 * tests/bison: New.
9474 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
9475 m4_if, m4_patsubst, and m4_regexp.
9476 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
9477 `input' file instead of echo.
9478
9479 2001-08-29 Akim Demaille <akim@epita.fr>
9480
9481 Bump to 1.28e.
9482
9483 2001-08-29 Akim Demaille <akim@epita.fr>
9484
9485 Version 1.28d.
9486
9487 2001-08-29 Paul Eggert <eggert@twinsun.com>
9488
9489 * src/bison.simple (yyparse): Don't take the address of an
9490 item before the start of an array, as that doesn't conform to
9491 the C Standard.
9492
9493 2001-08-29 Robert Anisko <anisko_r@epita.fr>
9494
9495 * doc/bison.texinfo (Location Tracking Calc): New node.
9496
9497 2001-08-29 Paul Eggert <eggert@twinsun.com>
9498
9499 * src/output.c (output): Do not define const, as this now
9500 causes more problems than it cures.
9501
9502 2001-08-29 Akim Demaille <akim@epita.fr>
9503
9504 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
9505 the nodes.
9506 Be sure to tag the `detailmenu'.
9507
9508 2001-08-29 Akim Demaille <akim@epita.fr>
9509
9510 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
9511 download in a tmp dir.
9512
9513 2001-08-28 Marc Autret <autret_m@epita.fr>
9514
9515 * config/depcomp: New file.
9516
9517 2001-08-28 Marc Autret <autret_m@epita.fr>
9518
9519 * doc/bison.1 (mandoc): Adjust.
9520 From Juan Manuel Guerrero.
9521
9522 2001-08-28 Marc Autret <autret_m@epita.fr>
9523
9524 * src/print_graph.c (print_state): Fix.
9525
9526 2001-08-27 Marc Autret <autret_m@epita.fr>
9527
9528 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
9529 char * members.
9530 Echo modifications to the functions prototypes.
9531 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
9532
9533 2001-08-27 Marc Autret <autret_m@epita.fr>
9534
9535 * src/vcg.c: Include `xalloc.h'.
9536 (add_colorentry): New.
9537 (add_classname): New.
9538 (add_infoname): New.
9539 * src/vcg.h: Add new prototypes.
9540
9541 2001-08-27 Akim Demaille <akim@epita.fr>
9542
9543 * Makefile.maint: Sync. again with CVS Autoconf.
9544
9545 2001-08-27 Akim Demaille <akim@epita.fr>
9546
9547 * Makefile.maint: Formatting changes.
9548 (po-update, cvs-update, update): New targets.
9549 (AMTAR): Remove.
9550
9551 2001-08-27 Akim Demaille <akim@epita.fr>
9552
9553 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9554 * Makefile.maint: Sync. with CVS Autoconf.
9555
9556 2001-08-27 Marc Autret <autret_m@epita.fr>
9557
9558 * src/vcg.h (struct infoname_s): New.
9559 (struct colorentry_s): New.
9560 (graph_s): New fields {vertical,horizontal}_order in structure.
9561 Add `infoname' field.
9562 Add `colorentry' field;
9563 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
9564 (G_HORIZONTAL_ORDER): New.
9565 (G_INFONAME): New.
9566 (G_COLORENTRY): New.
9567 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
9568 Add output of `infoname'.
9569 Add output of `colorentry'.
9570
9571 2001-08-27 Marc Autret <autret_m@epita.fr>
9572
9573 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
9574 This one shadowed a global parameter.
9575
9576 2001-08-24 Marc Autret <autret_m@epita.fr>
9577
9578 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
9579 instead of `unsigned'.
9580 (print_state): Do not call obstack_object_size () in obstack_grow ()
9581 to avoid macro variables shadowing.
9582
9583 2001-08-23 Marc Autret <autret_m@epita.fr>
9584
9585 * src/lex.c (percent_table): Typo: s/naem/name/.
9586 Add graph option.
9587 Normalize new options declarations.
9588
9589 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
9590
9591 * tests/suite.at: Exercise %header_extension and %source_extension.
9592
9593 2001-08-16 Marc Autret <autret_m@epita.fr>
9594
9595 * src/reader.c (parse_dquoted_param): New.
9596 (parse_header_extension_decl): Use it.
9597 (parse_source_extension_decl): Likewise.
9598
9599 2001-08-16 Marc Autret <autret_m@epita.fr>
9600
9601 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
9602 (get_xxxx_str): Use assert () instead of complain ().
9603 Remove return invokations in default cases.
9604 (get_decision_str): Modify default behaviour. Remove second argument.
9605 Echo modifications on calls.
9606 (output_graph): Fix.
9607
9608 2001-08-16 Marc Autret <autret_m@epita.fr>
9609
9610 * src/getargs.c (usage): Update with ``-g, --graph''.
9611
9612 2001-08-16 Marc Autret <autret_m@epita.fr>
9613
9614 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
9615 (Option Cross Key): Likewise.
9616 * doc/bison.1: Update.
9617
9618 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
9619
9620 * src/output.c (output_master_parser): Don't finish action_obstack.
9621 (output_parser): Don't care about the muscle action, here.
9622 (prepare): Copy the action_obstack in the action muscle.
9623 (output): Free action_obstack.
9624
9625 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9626
9627 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
9628 will contain `%union' declaration.
9629 (parse_union_decl): Delete #line directive output.
9630 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
9631 informations about %union.
9632 (parse_union_decl): Copy the union_obstack in the muscle stype.
9633 * src/bison.simple: Add new #line directive.
9634 Add typdef %%stype YYSTYPE.
9635
9636 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9637
9638 * src/bison.simple: Add new `#line' directive.
9639
9640 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
9641
9642 * src/bison.simple: New `#line' directive.
9643 * src/output.c (output_parser): Support new dynamic muscle input_line.
9644
9645 2001-09-22 Marc Autret <autret_m@epita.fr>
9646
9647 * src/output.c (output_master_parser): New.
9648 (output_parser): Be more re-entrant.
9649
9650 2001-09-21 Marc Autret <autret_m@epita.fr>
9651
9652 * src/reader.c (copy_definition, parse_union_decl): Update and use
9653 `linef' muscle.
9654 (copy_action): Likewise.
9655 Use obstack_1grow ().
9656 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
9657
9658 2001-09-21 Marc Autret <autret_m@epita.fr>
9659
9660 * src/options.c (option_table): Adjust.
9661 * src/lex.c (parse_percent_token): Fix.
9662
9663 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9664
9665 * src/options.c (symtab.h): Include it, need by lex.h.
9666
9667 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9668
9669 * src/lex.c (parse_percent_token): Change type of variable `tx', which
9670 is now an option_table_struct*.
9671 (option_strcmp): New function option_strcmp.
9672 (parse_percent_token): Call option_strcmp.
9673 * src/getargs.c (xalloc.h, options.h): Include it.
9674 (getargs): Call create_long_option_table.
9675 (getargs): Free longopts at the end of the function.
9676 (shortopts): Move in options.c.
9677 * src/options.c (create_long_option_table): New function. Convert
9678 information from option_table to option structure.
9679 * src/reader.c (options.h): Include it.
9680
9681 * src/Makefile.am: Adjust.
9682 * src/options.c (option_table): Create from longopts and percent_table.
9683 * src/getargs.c (longopts): Delete.
9684 * src/lex.c (struct percent_table_struct): Delete.
9685 (percent_table): Delete.
9686 (options.h): Include it.
9687 * src/options.c: Create.
9688 * src/options.h: Create.
9689 Declare enum opt_access_e.
9690 Define struct option_table_struct.
9691
9692 2001-09-20 Marc Autret <autret_m@epita.fr>
9693
9694 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
9695 sections of Bison.
9696
9697 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
9698
9699 * src/bison.simple: s/%%filename/%%skeleton.
9700 * src/muscle_tab.c (getargs.h): Include it.
9701 (muscle_init): Insert new muscle skeleton.
9702
9703 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
9704
9705 * src/output.c (output_parser): Delete unused variable actions_dumped.
9706
9707 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
9708
9709 * src/output.c (output): Delete call to reader_output_yylsp.
9710 * src/reader.c (reader): Likewise.
9711 * src/reader.h: Delete declaration of reader_output_yylsp.
9712
9713 2001-09-02 Marc Autret <autret_m@epita.fr>
9714
9715 * src/reader.c: Include muscle_tab.h.
9716 (parse_union_decl): Update.
9717 (parse_macro_decl): Rename parse_muscle_decl.
9718 Update to use renamed functions and variable.
9719 (read_declarations, copy_action, read_additionnal_code, : Updated
9720 with correct variables and functions names.
9721 (packsymbols, reader): Likewise.
9722
9723 * src/reader.h (muscle_obstack): Extern declaration update.
9724
9725 * src/output.c: Include muscle_tab.h
9726 In all functions using macro_insert, change by using muscle_insert ().
9727 (macro_obstack): Rename muscle_obstack.
9728 Echo modifications in the whole file.
9729 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
9730 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
9731 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
9732
9733 * src/muscle_tab.h: Update double inclusion macros.
9734 (macro_entry_s): Rename muscle_entry_s.
9735 Update prototypes.
9736
9737 * src/muscle_tab.c: Include muscle_tab.h.
9738 Rename macro_tabble to muscle_table.
9739 (mhash1, mhash2, mcmp): Use muscle_entry.
9740 (macro_init): Rename muscle_init. Update.
9741 (macro_insert): Rename muscle_insert. Update.
9742 (macro_find): Rename muscle_find. Update.
9743
9744 * src/main.c: Include muscle_tab.h.
9745 (main): Call muscle_init ().
9746 * src/Makefile.am (bison_SOURCES): Echo modifications.
9747
9748 2001-09-02 Marc Autret <autret_m@epita.fr>
9749
9750 Now the files macro_tab.[ch] are named muscle_tab.[ch].
9751
9752 * src/muscle_tab.c, src/muscle_tab.h: Add files.
9753
9754 2001-09-02 Marc Autret <autret_m@epita.fr>
9755
9756 * src/macrotab.c, src/macrotab.h: Remove.
9757
9758 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
9759
9760 * src/reader.c (copy_guard): Use muscle to specify the `#line'
9761 filename.
9762
9763 2001-09-01 Marc Autret <autret_m@epita.fr>
9764
9765 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
9766 to an explicit value to activate the feature. We do it here.
9767
9768 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9769
9770 * src/output.c (prepare): Delete the `filename' muscule insertion.
9771 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
9772 (parse_union_decl): Likewise.
9773 * src/macrotab.c (macro_init): Initialize filename by infile.
9774
9775 2001-08-31 Marc Autret <autret_m@epita.fr>
9776
9777 * src/bison.simple (YYLSP_NEEDED): New definition.
9778 * src/output.c (prepare): Add macro insertion of `locations_flag'
9779
9780 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9781
9782 * src/output.c (prepare): Delete insertion of previous muscles,
9783 and insert the `prefix' muscles.
9784 * src/macrotab.c (macro_init): Likewise.
9785 (macro_init): Initialization prefix directive by `yy'.
9786 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
9787 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9788 yylval, yydebug, yyerror, yynerrs and yyparse.
9789 New directive `#define' to substitute yydebug, ... with option
9790 name_prefix.
9791
9792 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9793
9794 * src/main.c (main): Standardize.
9795 * src/output.c (output_table_data, output_parser): Likewise.
9796 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9797
9798 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9799
9800 * src/reader.c (read_additionnal_code): Rename %%user_code to
9801 %%epilogue.
9802 * src/output.c (output): Rename %%declarations to %%prologue.
9803 * src/bison.simple: Echo modifications.
9804
9805 2001-08-31 Marc Autret <autret_m@epita.fr>
9806
9807 * src/reader.c (readgram): CleanUp.
9808 (output_token_defines): Likewise.
9809 (packsymbols): Likewise.
9810 (reader): Likewise.
9811 * src/output.c (output): CPP-out useless code.
9812
9813 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9814
9815 * src/reader.c (reader): Delete obsolete call to function
9816 output_trailers and output_headers.
9817 * src/output.h: Remove obsolete functions prototypes of output_headers
9818 and output_trailers.
9819
9820 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
9821
9822 * src/main.c: Include macrotab.h.
9823 * src/macrotab.h (macro_entry_s): Constify fields.
9824 Adjust functions prototypes.
9825 * src/macrotab.c (macro_insert): Constify key and value.
9826 (macro_find): Constify key.
9827 (macro_insert): Include 'xalloc.h'
9828 (macro_insert): Use XMALLOC.
9829 (macro_find): Constify return value.
9830 * src/output.c (output_table_data): Rename table to table_data.
9831 (output_parser): Constify macro_key, macro_value.
9832
9833 2001-08-30 Marc Autret <autret_m@epita.fr>
9834
9835 * src/reader.c (parse_skel_decl): New.
9836 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
9837 * src/lex.h (token_t): New token `tok_skel'.
9838 * src/lex.c (percent_table): Add skeleton option entry.
9839 Standardize.
9840
9841 2001-08-29 Marc Autret <autret_m@epita.fr>
9842
9843 * src/bison.simple: Add %%user_code directive at the end.
9844 * src/reader.c (read_additionnal_code): New.
9845 (reader): Use it.
9846 * src/output.c (output_program): Remove.
9847 (output): Update.
9848
9849 2001-08-28 Marc Autret <autret_m@epita.fr>
9850
9851 * src/output.c (output_actions): Clean up.
9852 (output_gram): CPP-out useless code.
9853 * src/reader.c (reader): Clean up, CPP-out useless code.
9854
9855 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
9856
9857 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
9858 directive.
9859 * src/bison.simple: Add `%%definitions'.
9860
9861 2001-08-28 Marc Autret <autret_m@epita.fr>
9862
9863 * config/depcomp: New file.
9864
9865 2001-08-27 Paul Eggert <eggert@twinsun.com>
9866
9867 * src/bison.simple (yyparse): Don't take the address of an
9868 item before the start of an array, as that doesn't conform to
9869 the C Standard.
9870
9871 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9872
9873 * src/output.c (output): Remove the initialization of the macro
9874 obstack. It was done too late here.
9875
9876 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
9877 completely wrong.
9878 (reader): Initialize the macro obstack here, since we need it to grow
9879 '%define' directives.
9880
9881 * src/reader.h: Declare the macro obstack as extern.
9882
9883 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9884
9885 * src/output.c (output_parser): Fix. Store single '%' characters in
9886 the output obstack instead of throwing them away.
9887
9888 2001-08-27 Akim Demaille <akim@epita.fr>
9889
9890 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9891
9892 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9893
9894 * lib/Makefile.am: Adjust.
9895
9896 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9897
9898 * src/bison.simple: Update and add '%%' directives.
9899
9900 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9901
9902 * src/reader.c (reader): Remove calls to 'output_headers' and
9903 'output_trailers'. Remove some C output.
9904 (readgram): Disable a piece of code that was writing a default
9905 definition for 'YYSTYPE'.
9906 (reader_output_yylsp): Remove.
9907 (packsymbols): Output token defintions to a macro.
9908 (copy_definition): Disable C output.
9909
9910 * src/reader.c (parse_macro_decl): New function used to parse macro
9911 declarations.
9912 (copy_string2): Put the body of copy_string into this new function.
9913 Add a parameter to let the caller choose whether he wants to copy the
9914 string delimiters or not.
9915 (copy_string): Be a simple call to copy_string2 with the last argument
9916 bound to true.
9917 (read_declarations): Add case for macro definition.
9918 (copy_identifier): New.
9919 (parse_macro_decl): Read macro identifiers using copy_identifier
9920 rather than lex.
9921
9922 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9923
9924 * src/output.c (prepare): Add prefixed names.
9925 (output_parser): Output semantic actions.
9926 (output_parser): Fix bug on '%%line' directives.
9927
9928 * src/output.c (output_headers): Remove. The C code printed by this
9929 function should now be in the skeletons.
9930 (output_trailers): Remove.
9931 (output): Disable call to 'reader_output_yylsp'.
9932 (output_rule_data): Do not output tables to the table obstack.
9933
9934 * src/output.c: Remove some C dedicated output.
9935 Improve the use of macro and output obstacks.
9936 (output_defines): Remove.
9937
9938 * src/output.c (output_token_translations): Associate 'translate'
9939 table with a macro. No output to the table obstack.
9940 (output_gram): Same for 'rhs' and 'prhs'.
9941 (output_stos): Same for 'stos'.
9942 (output_rule_data): Same for 'r1' and 'r2'.
9943 (token_actions): Same for 'defact'.
9944 (goto_actions): Same for 'defgoto'.
9945 (output_base): Same for 'pact' and 'pgoto'.
9946 (output_table): Same for 'table'.
9947 (output_check): Same for 'check'.
9948
9949 * src/output.c (output_table_data): New function.
9950 (output_short_table): Remove.
9951 (output_short_or_char_table): Remove.
9952
9953 * src/output.c (output_parser): Replace most of the skeleton copy code
9954 with something new. Skeletons are now processed character by character
9955 rather than line by line, and Bison looks for '%%' macros. This is the
9956 first step in making Bison's output process (a lot) more flexible.
9957 (output_parser): Use the macro table.
9958
9959 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9960
9961 * src/main.c (main): Initialize the macro table.
9962
9963 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9964
9965 * src/lex.c (percent_table): Add tok_define.
9966 * src/lex.h: Add tok_define.
9967
9968 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9969
9970 * src/macrotab.c: New file.
9971 * src/macrotab.h: New file.
9972 * src/Makefile.am: Update.
9973
9974 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9975
9976 * lib/hash.c: New file.
9977 * lib/hash.h: New file.
9978 * lib/Makefile.am: Update.
9979
9980 2001-08-15 Akim Demaille <akim@epita.fr>
9981
9982 Version 1.28c.
9983
9984 2001-08-15 Marc Autret <autret_m@epita.fr>
9985
9986 * src/reader.c (readgram): Indent output macro YYSTYPE.
9987 (packsymbols): Likewise.
9988 (output_token_defines): Likewise.
9989 * src/files.c: Standardize.
9990 (compute_header_macro): New.
9991 (defines_obstack_save): New. Use compute_header_macro.
9992 (output_files): Update. Use defines_obstack_save.
9993
9994 2001-08-15 Akim Demaille <akim@epita.fr>
9995
9996 * doc/bison.texinfo (Table of Symbols): Document
9997 YYSTACK_USE_ALLOCA.
9998
9999 2001-08-15 Akim Demaille <akim@epita.fr>
10000
10001 * missing: Update from CVS Automake.
10002 * config/config.guess, config/config.sub, config/texinfo.tex:
10003 Update from gnu.org.
10004
10005 2001-08-15 Akim Demaille <akim@epita.fr>
10006
10007 * Makefile.maint: Sync with CVS Autoconf.
10008
10009 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
10010
10011 * doc/bison.texinfo: Include GNU Free Documentation License from
10012 `fdl.texi'.
10013 * doc/fdl.texi: Add to package.
10014
10015 2001-08-14 Marc Autret <autret_m@epita.fr>
10016
10017 Turn on %{source,header}_extension features.
10018
10019 * src/lex.c (percent_table): Un-CPP out header_extension and
10020 source_extension.
10021 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
10022 (compute_exts_from_src): Remove conditions. It restores priorities
10023 between options.
10024
10025 2001-08-14 Marc Autret <autret_m@epita.fr>
10026
10027 * src/files.c (compute_base_names): Add extensions computing when
10028 `--file-prefix' used.
10029 Standardize function calls.
10030
10031 2001-08-13 Marc Autret <autret_m@epita.fr>
10032
10033 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
10034 defining it (defined but null disables alloca).
10035
10036 2001-08-13 Marc Autret <autret_m@epita.fr>
10037
10038 * src/bison.simple (_yy_memcpy): CPP reformat.
10039
10040 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
10041
10042 * tests/atconfig.in (CPPFLAGS): Fix.
10043
10044 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
10045
10046 * doc/bison.texinfo: Include GNU General Public License from
10047 `gpl.texi'.
10048 * doc/gpl.texi: Add to package.
10049
10050 2001-08-10 Marc Autret <autret_m@epita.fr>
10051
10052 * src/print_graph.h: Fix.
10053 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
10054
10055 2001-08-10 Akim Demaille <akim@epita.fr>
10056
10057 * src/system.h: Provide default declarations for stpcpy, strndup,
10058 and strnlen.
10059
10060 2001-08-10 Robert Anisko <anisko_r@epita.fr>
10061
10062 * doc/bison.texinfo (Locations): Update @$ stuff.
10063
10064 2001-08-09 Robert Anisko <anisko_r@epita.fr>
10065
10066 * src/bison.simple (YYLLOC_DEFAULT): Update.
10067 (yyparse): Adjust.
10068
10069 2001-08-08 Marc Autret <autret_m@epita.fr>
10070
10071 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
10072 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
10073 Reported by Fabrice Bauzac.
10074
10075 2001-08-08 Marc Autret <autret_m@epita.fr>
10076
10077 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
10078 * src/vcg.c (output_node): Fix.
10079 * src/vcg.h: Cleanup.
10080 * src/print_graph.c: Add comments.
10081 (node_output_size): New global variable. Simplify the formatting of
10082 the VCG graph output.
10083 (print_actions): Unused code is now used. It notifies the final state
10084 and no action states in the VCG graph. It also give the reduce actions.
10085 The `shift and goto' edges are red and the `go to state' edges are
10086 blue.
10087 Get the current node name and node_obstack by argument.
10088 (node_obstack): New variable.
10089 (print_state): Manage node_obstack.
10090 (print_core): Use node_obstack given by argument.
10091 A node is not only computed here but in print_actions also.
10092 (print_graph): CPP out useless code instead of commenting it.
10093
10094 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
10095
10096 * tests/atconfig.in (CPPFLAGS): Fix.
10097
10098 2001-08-07 Akim Demaille <akim@epita.fr>
10099
10100 * src/print_graph.c (quote): New.
10101 (print_core): Use it.
10102
10103 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
10104
10105 * src/vcg.c (complain.h): Include it.
10106 Unepitaize `return' invocations.
10107 [NDEBUG] (main): Remove.
10108 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
10109 * src/files.c (open_files): Initialize graph_obstack.
10110 * src/print_graph.c (print_actions): CPP out useless code.
10111 (print_core): Don't output the last `\n' in labels.
10112 Use `quote'.
10113 * src/files.c (output_files): Output the VCG file.
10114 * src/main.c (main): Invoke print_graph ();
10115
10116 2001-08-06 Marc Autret <autret_m@epita.fr>
10117
10118 Automaton VCG graph output.
10119 Using option ``-g'' or long option ``--graph'', you can generate
10120 a gram_filename.vcg file containing a VCG description of the LALR (1)
10121 automaton of your grammar.
10122
10123 * src/main.c: Call to print_graph() function.
10124 * src/getargs.h: Update.
10125 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
10126 (graph_flag): New flag.
10127 (longopts): Update.
10128 (getargs): Add case `g'.
10129 * src/files.c (graph_obstack): New obstack struct.
10130 (open_files): Initialize new obstack.
10131 (output_files): Saves graph_obstack if required.
10132 * src/files.h (graph_obstack): New extern declaration.
10133 * src/Makefile.am: Add new source files.
10134
10135 2001-08-06 Marc Autret <autret_m@epita.fr>
10136
10137 * src/print_graph.c, src/print_graph.h (graph): New.
10138 * src/vcg.h: New file.
10139 * src/vcg.c: New file, VCG graph handling.
10140
10141 2001-08-06 Marc Autret <autret_m@epita.fr>
10142
10143 Add of %source_extension and %header_extension which specify
10144 the source or/and the header output file extension.
10145
10146 * src/files.c (compute_base_names): Remove initialisation of
10147 src_extension and header_extension.
10148 (compute_exts_from_gf): Update.
10149 (compute_exts_from_src): Update.
10150 (output_files): Update.
10151 * src/reader.c (parse_header_extension_decl): New.
10152 (parse_source_extension_decl): New.
10153 (read_declarations): New case statements for the new tokens.
10154 * src/lex.c (percent_table): Add entries for %source_extension
10155 and %header_extension.
10156 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
10157
10158 2001-08-06 Marc Autret <autret_m@epita.fr>
10159
10160 * configure.in: Bump to 1.28c.
10161 * doc/bison.texinfo: Texinfo thingies.
10162
10163 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
10164
10165 * tests/atconfig.in (CPPFLAGS): Add.
10166 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
10167
10168 2001-08-03 Akim Demaille <akim@epita.fr>
10169
10170 Version 1.28b.
10171
10172 2001-08-03 Akim Demaille <akim@epita.fr>
10173
10174 * tests/Makefile.am (check-local): Ship testsuite.
10175 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
10176 Include `string.h'.
10177
10178 2001-08-03 Akim Demaille <akim@epita.fr>
10179
10180 * configure.in: Try using -Wformat when compiling.
10181
10182 2001-08-03 Akim Demaille <akim@epita.fr>
10183
10184 * configure.in: Bump to 1.28b.
10185
10186 2001-08-03 Akim Demaille <akim@epita.fr>
10187
10188 * src/complain.c: Adjust strerror_r portability issues.
10189
10190 2001-08-03 Akim Demaille <akim@epita.fr>
10191
10192 Version 1.28a.
10193
10194 2001-08-03 Akim Demaille <akim@epita.fr>
10195
10196 * src/getargs.c, src/getarg.h (skeleton)): Constify.
10197 * src/lex.c (literalchar): Avoid name clashes on `buf'.
10198 * src/getargs.c: Include complain.h.
10199 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
10200 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
10201
10202 2001-08-03 Akim Demaille <akim@epita.fr>
10203
10204 * src/reader.c (readgram): Display hidden chars in error messages.
10205
10206 2001-08-03 Akim Demaille <akim@epita.fr>
10207
10208 Update to gettext 0.10.39.
10209
10210 2001-08-03 Akim Demaille <akim@epita.fr>
10211
10212 * lib/strspn.c: New.
10213
10214 2001-08-01 Marc Autret <autret_m@epita.fr>
10215
10216 * doc/bison.texinfo: Update.
10217 * doc/bison.1 (mandoc): Update.
10218 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
10219 * src/files.c: Support output files extensions computing.
10220 (src_extension): New static variable.
10221 (header_extension): New static variable.
10222 (tr): New function.
10223 (get_extension_index): New function, gets the index of an extension
10224 filename in a string.
10225 (compute_exts_from_gf): New function, computes extensions from the
10226 grammar file extension.
10227 (compute_exts_from_src): New functions, computes extensions from the
10228 C source file extension, file given by ``-o'' option.
10229 (compute_base_names): Update.
10230 (output_files): Update.
10231
10232 2001-08-01 Robert Anisko <anisko_r@epita.fr>
10233
10234 * doc/bison.texi: Document @$.
10235 (Locations): New section.
10236
10237 2001-07-18 Akim Demaille <akim@epita.fr>
10238
10239 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
10240 * config/prev-version.txt, config/move-if-change: New.
10241 * Makefile.am: Adjust.
10242
10243 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
10244
10245 * src/bison.simple (yyparse): Suppress warning `comparaison
10246 between signed and unsigned'.
10247
10248 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
10249
10250 * src/getargs.h (raw_flag): Remove.
10251 * src/getargs.c: Die on `-r'/`--raw'.
10252 * src/lex.c (parse_percent_token): Die on `%raw'.
10253 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
10254 * tests/calc.at: Suppress test with option `--raw'.
10255
10256 2001-07-14 Akim Demaille <akim@epita.fr>
10257
10258 * config/: New.
10259 * configure.in: Require Autoconf 2.50.
10260 Update to gettext 0.10.38.
10261
10262 2001-03-16 Akim Demaille <akim@epita.fr>
10263
10264 * doc/bison.texinfo: ANSIfy the examples.
10265
10266 2001-03-16 Akim Demaille <akim@epita.fr>
10267
10268 * getargs.c (skeleton): New variable.
10269 (longopts): --skeleton is a new option.
10270 (shortopts, getargs): -S is a new option.
10271 * getargs.h: Declare skeleton.
10272 * output.c (output_parser): Use it.
10273
10274 2001-03-16 Akim Demaille <akim@epita.fr>
10275
10276 * m4/strerror_r.m4: New.
10277 * m4/error.m4: Run AC_FUNC_STRERROR_R.
10278 * lib/error.h, lib/error.c: Update.
10279
10280 2001-03-16 Akim Demaille <akim@epita.fr>
10281
10282 * src/getargs.c (longopts): Clean up.
10283
10284 2001-02-21 Akim Demaille <akim@epita.fr>
10285
10286 * src/reader.c (gensym): `gensym_count' is your own.
10287 Use a static buf to create the symbol name, as token_buffer is no
10288 longer a buffer.
10289
10290 2001-02-08 Akim Demaille <akim@epita.fr>
10291
10292 * src/conflicts.c (conflict_report): Be sure not to append to res
10293 between two calls, which could happen if both first sprintf were
10294 skipped, but not the first cp += strlen.
10295
10296 2001-02-08 Akim Demaille <akim@epita.fr>
10297
10298 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
10299 New, from fileutils 4.0.37.
10300 * configure.in: Require Autoconf 2.49c. I took some time before
10301 making this decision. This is the only way out for portability
10302 issues in Bison, it would mean way too much duplicate effort to
10303 import in Bison features implemented in 2.49c since 2.13.
10304 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
10305
10306 2001-02-02 Akim Demaille <akim@epita.fr>
10307
10308 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
10309 * lib/xalloc.h, lib/xmalloc.c: Update.
10310
10311 2001-01-19 Akim Demaille <akim@epita.fr>
10312
10313 Get rid of the ad hoc handling of token_buffer in the scanner: use
10314 the obstacks.
10315
10316 * src/lex.c (token_obstack): New.
10317 (init_lex): Initialize it. No longer call...
10318 (grow_token_buffer): this. Remove it.
10319 Adjust all the places which used it to use the obstack.
10320
10321 2001-01-19 Akim Demaille <akim@epita.fr>
10322
10323 * src/lex.h: Rename all the tokens:
10324 s/\bENDFILE\b/tok_eof/g;
10325 s/\bIDENTIFIER\b/tok_identifier/g;
10326 etc.
10327 Let them be enums, not #define, to ease debugging.
10328 Adjust all the code.
10329
10330 2001-01-18 Akim Demaille <akim@epita.fr>
10331
10332 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
10333 * src/lex.c (maxtoken, grow_token_buffer): Static.
10334
10335 2001-01-18 Akim Demaille <akim@epita.fr>
10336
10337 Since we now use obstacks, more % directives can be enabled.
10338
10339 * src/lex.c (percent_table): Also accept `%yacc',
10340 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
10341 `%debug'.
10342 Handle the actions for `%semantic_parser' and `%pure_parser' here,
10343 instead of returning a token.
10344 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
10345 * src/reader.c (read_declarations): Adjust.
10346 * src/files.c (open_files): Don't call `compute_base_names', don't
10347 compute `attrsfile' since they depend upon data which might be
10348 *in* the input file now.
10349 (output_files): Do it here.
10350 * src/output.c (output_headers): Document the fact that this patch
10351 introduces a guaranteed SEGV for semantic parsers.
10352 * doc/bison.texinfo: Document them.
10353 * tests/suite.at: Exercise these %options.
10354
10355 2000-12-20 Akim Demaille <akim@epita.fr>
10356
10357 Also handle the output file (--verbose) with obstacks.
10358
10359 * files.c (foutput): Remove.
10360 (output_obstack): New.
10361 Adjust all dependencies.
10362 * src/conflicts.c: Return a string.
10363 * src/system.h (obstack_grow_string): Rename as...
10364 (obstack_sgrow): this. Be ready to work with non literals.
10365 (obstack_fgrow4): New.
10366
10367 2000-12-20 Akim Demaille <akim@epita.fr>
10368
10369 * src/files.c (open_files): Fix the computation of short_base_name
10370 in the case of `-o foo.tab.c'.
10371
10372 2000-12-20 Akim Demaille <akim@epita.fr>
10373
10374 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
10375 (copy_dollar): Now that everything uses obstacks, get rid of the
10376 FILE * parameters.
10377
10378 2000-12-20 Akim Demaille <akim@epita.fr>
10379
10380 * src/files.c (open_files): Actually the `.output' file is based
10381 on the short_base_name, not base_name.
10382 * tests/suite.at (Checking output file names): Adjust.
10383
10384 2000-12-20 Akim Demaille <akim@epita.fr>
10385
10386 * src/bison.s1: Remove, we now use directly...
10387 * src/bison.simple: this.
10388 * src/Makefile.am: Use pkgdata instead of data.
10389
10390 2000-12-20 Akim Demaille <akim@epita.fr>
10391
10392 * src/files.c (guard_obstack): New.
10393 (open_files): Initialize it.
10394 (output_files): Dump it...
10395 * src/files.h: Export it.
10396 * src/reader.c (copy_guard): Use it.
10397
10398 2000-12-19 Akim Demaille <akim@epita.fr>
10399
10400 * src/files.c (outfile, defsfile, actfile): Removed as global
10401 vars.
10402 (open_files): Don't compute them.
10403 (output_files): Adjust.
10404 (base_name, short_base_name): Be global.
10405 Adjust dependencies.
10406
10407 2000-12-19 Akim Demaille <akim@epita.fr>
10408
10409 * src/files.c (strsuffix): New.
10410 (stringappend): Be just like strcat but allocate.
10411 (base_names): Eve out from open_files.
10412 Try to simplify the rather hairy computation of base_name and
10413 short_base_name.
10414 (open_files): Use it.
10415 * tests/suite.at (Checking output file names): New test.
10416
10417 2000-12-19 Akim Demaille <akim@epita.fr>
10418
10419 * src/system.h (obstack_grow_literal_string): Rename as...
10420 (obstack_grow_string): this.
10421 * src/output.c (output_parser): Recognize `%% actions' instead of
10422 `$'.
10423 * src/bison.s1: s/$/%% actions/.
10424 * src/bison.hairy: Likewise.
10425
10426 2000-12-19 Akim Demaille <akim@epita.fr>
10427
10428 * src/output.c (output_parser): Compute the `#line' lines when
10429 there are.
10430 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
10431 Suggested by Hans Aberg.
10432
10433 2000-12-19 Akim Demaille <akim@epita.fr>
10434
10435 Let the handling of the skeleton files be local to the procedures
10436 that use it.
10437
10438 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
10439 longer static.
10440 (fparser, open_extra_files): Remove.
10441 (open_files, output_files): Don't take care of fparser.
10442 * src/files.h: Adjust.
10443 * src/output.c (output_parser): Open and close the file to the
10444 skeleton.
10445 * src/reader.c (read_declarations): When %semantic_parser, open
10446 fguard.
10447
10448 2000-12-19 Akim Demaille <akim@epita.fr>
10449
10450 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
10451 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
10452
10453 2000-12-19 Akim Demaille <akim@epita.fr>
10454
10455 * src/files.c (open_files): Yipee! We no longer need all the code
10456 looking for `/tmp' since we have no tmp file.
10457
10458 2000-12-19 Akim Demaille <akim@epita.fr>
10459
10460 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
10461 New macros.
10462 * src/files.c (open_files): Less dependency on MSDOS etc.
10463
10464 2000-12-14 Akim Demaille <akim@epita.fr>
10465
10466 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
10467 Provide a default definition.
10468 Use it when executing the default @ action.
10469 * src/reader.c (reader_output_yylsp): No longer include
10470 `timestamp' and `text' in the default YYLTYPE.
10471
10472 2000-12-12 Akim Demaille <akim@epita.fr>
10473
10474 * src/reader.c (copy_definition, parse_union_decl, copy_action)
10475 (copy_guard): Quote the file names.
10476 Reported by Laurent Mascherpa.
10477
10478 2000-12-12 Akim Demaille <akim@epita.fr>
10479
10480 * src/output.c (output_headers, output_program, output): Be sure
10481 to escape special characters when outputting filenames.
10482 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
10483 (output_headers): Don't depend on them, Use ACTSTR.
10484
10485 2000-11-17 Akim Demaille <akim@epita.fr>
10486
10487 * lib/obstack.h: Formatting changes.
10488 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
10489 prevents type checking.
10490 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
10491 cast the value to (void *): assigning a `foo *' to a `void *'
10492 variable is valid.
10493 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
10494 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
10495 append characters.
10496
10497 2000-11-17 Akim Demaille <akim@epita.fr>
10498
10499 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
10500 as...
10501 (suite.m4, regression.m4, calc.m4): these.
10502 * tests/atgeneral.m4: Update from CVS Autoconf.
10503
10504 2000-11-17 Akim Demaille <akim@epita.fr>
10505
10506 * tests/regression.m4 (%union and --defines): New test,
10507 demonstrating a current bug in the obstack implementation.
10508
10509 2000-11-17 Akim Demaille <akim@epita.fr>
10510
10511 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
10512 macros.
10513 Use them to declare the variables which are global or local to
10514 `yyparse'.
10515
10516 2000-11-17 Akim Demaille <akim@epita.fr>
10517
10518 * acconfig.h: Remove, no longer used.
10519
10520 2000-11-07 Akim Demaille <akim@epita.fr>
10521
10522 * src: s/Copyright (C)/Copyright/g.
10523
10524 2000-11-07 Akim Demaille <akim@epita.fr>
10525
10526 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
10527 defining.
10528 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
10529
10530 2000-11-07 Akim Demaille <akim@epita.fr>
10531
10532 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
10533 Merge in a single CPP if/else.
10534
10535 2000-11-07 Akim Demaille <akim@epita.fr>
10536
10537 * src/output.c (output): Remove useless variables.
10538 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
10539 argument `data' for consistency with the prototypes.
10540 Qualify it `const'.
10541 (obstack_copy, obstack_copy0): Rename the second argument as
10542 `address' for consistency. Qualify it `const'.
10543 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
10544 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
10545 `const' their input argument (`data' or `address').
10546 Adjust the corresponding macros to include `const' in casts.
10547
10548 2000-11-03 Akim Demaille <akim@epita.fr>
10549
10550 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
10551 s/PFILE1/BISON_HAIRY/.
10552 Adjust dependencies.
10553
10554 2000-11-03 Akim Demaille <akim@epita.fr>
10555
10556 For some reason, this was not applied.
10557
10558 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10559 `unlink': it's no longer used.
10560
10561 2000-11-03 Akim Demaille <akim@epita.fr>
10562
10563 * src/files.c (skeleton_find): New function, eved out of...
10564 (open_files, open_extra_files): here.
10565
10566 2000-11-03 Akim Demaille <akim@epita.fr>
10567
10568 Don't use `atexit'.
10569
10570 * src/files.c (obstack_save): New function.
10571 (done): Rename as...
10572 (output_files): this.
10573 Use `obstack_save'.
10574 * src/main.c (main): Don't use `atexit' to register `done', since
10575 it no longer has to remove tmp files, just call `output_files'
10576 when there are no errors.
10577
10578 2000-11-02 Akim Demaille <akim@epita.fr>
10579
10580 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10581 `unlink': it's no longer used.
10582 * src/files.h: Formatting changes.
10583
10584 2000-11-02 Akim Demaille <akim@epita.fr>
10585
10586 Remove the last uses of mktemp and unlink/delete.
10587
10588 * src/files.c (fdefines, ftable): Removed.
10589 (defines_ostack, table_obstack): New.
10590 Adjust dependencies of the former into uses of the latter.
10591 * src/output.c (output_short_or_char_table, output_short_table):
10592 Convert to using obstacks.
10593 * src/reader.c (copy_comment2): Accept one FILE * and two
10594 obstacks.
10595 (output_token_defines, reader_output_yylsp): Use obstacks.
10596 * src/system.h (obstack_fgrow3): New.
10597 * po/POTFILES.in: Adjust.
10598
10599 2000-11-01 Akim Demaille <akim@epita.fr>
10600
10601 Change each use of `fattrs' into a use of `attrs_obstack'.
10602
10603 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
10604 * src/files.c (fattrs): Remove.
10605 (attrs_obstack): New.
10606 Adjust all dependencies.
10607 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
10608
10609 2000-11-01 Akim Demaille <akim@epita.fr>
10610
10611 Introduce obstacks.
10612 Change each use of `faction' into a use of `action_obstack'.
10613
10614 * lib/obstack.h, lib/obstack.c: New files.
10615 * src/files.c (faction): Remove.
10616 (action_obstack): New.
10617 Adjust all dependencies.
10618
10619 2000-10-20 Akim Demaille <akim@epita.fr>
10620
10621 * lib/quote.h (PARAMS): New macro. Use it.
10622
10623 2000-10-16 Akim Demaille <akim@epita.fr>
10624
10625 * src/output.c (output_short_or_char_table): New function.
10626 (output_short_table, output_token_translations): Use it.
10627 (goto_actions): Use output_short_table.
10628
10629 2000-10-16 Akim Demaille <akim@epita.fr>
10630
10631 * src/symtab.c (bucket_new): New function.
10632 (getsym): Use it.
10633
10634 * src/output.c (output_short_table): New argument to display the
10635 comment associated with the table.
10636 Adjust dependencies.
10637 (output_gram): Use it.
10638 (output_rule_data): Nicer output layout for YYTNAME.
10639
10640 2000-10-16 Akim Demaille <akim@epita.fr>
10641
10642 * src/lex.c (read_typename): New function.
10643 (lex): Use it.
10644 * src/reader.c (copy_dollar): Likewise.
10645
10646 2000-10-16 Akim Demaille <akim@epita.fr>
10647
10648 * src/reader.c (copy_comment2): Expect the input stream to be on
10649 the `/' which is suspected to open a comment, instead of being
10650 called after `//' or `/*' was read.
10651 (copy_comment, copy_definition, parse_union_decl, copy_action)
10652 (copy_guard): Adjust.
10653
10654 2000-10-16 Akim Demaille <akim@epita.fr>
10655
10656 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
10657 `read_signed_integer'.
10658
10659 2000-10-16 Akim Demaille <akim@epita.fr>
10660
10661 * src/reader.c (copy_dollar): New function.
10662 (copy_guard, copy_action): Use it.
10663
10664 2000-10-16 Akim Demaille <akim@epita.fr>
10665
10666 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
10667 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
10668 New files, from Fileutils 4.0.27.
10669 * src/main.c (printable_version): Remove.
10670 * src/lex.c, src/reader.c: Use `quote'.
10671
10672 2000-10-04 Akim Demaille <akim@epita.fr>
10673
10674 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
10675
10676 2000-10-04 Akim Demaille <akim@epita.fr>
10677
10678 * doc/bison.texinfo: Various typos spotted by Neil Booth.
10679
10680 2000-10-04 Akim Demaille <akim@epita.fr>
10681
10682 When a literal string is used to define two different tokens,
10683 `bison -v' segfaults.
10684 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
10685
10686 * tests/regression.m4: New file.
10687 Include the core of the sample provided by Piotr Gackiewicz.
10688 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
10689 properly.
10690
10691 2000-10-04 Akim Demaille <akim@epita.fr>
10692
10693 * src/reader.c (parse_expect_decl): Keep `count' within the size
10694 of `buffer'.
10695 From Neil Booth.
10696
10697 2000-10-02 Paul Eggert <eggert@twinsun.com>
10698
10699 * bison.s1 (yyparse): Assign the default value
10700 unconditionally, to avoid a GCC warning and make the parser a
10701 tad smaller.
10702
10703 2000-10-02 Akim Demaille <akim@epita.fr>
10704
10705 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
10706 options.
10707
10708 2000-10-02 Akim Demaille <akim@epita.fr>
10709
10710 * src/derives.c, src/print.c, src/reduce.c: To ease the
10711 translation, move some `\n' out of the translated strings.
10712
10713 2000-10-02 Akim Demaille <akim@epita.fr>
10714
10715 The location tracking mechanism is precious for parse error
10716 messages. Nevertheless, it is enabled only when `@n' is used in
10717 the grammar, which is a different issue (you can use it in error
10718 message, but not in the grammar per se). Therefore, there should
10719 be another means to enable it.
10720
10721 * src/getargs.c (getargs): Support `--locations'.
10722 (usage): Report it.
10723 * src/getargs.h (locationsflag): Export it.
10724 * src/lex.c (percent_table): Support `%locations'.
10725 * src/reader.c (yylsp_needed): Remove this variable, now replaced
10726 with `locationsflag'.
10727 * doc/bison.texinfo: Document `--locations' and `%locations'.
10728 Sort the options.
10729 * tests/calc.m4: Test it.
10730
10731 For regularity of the names, replace each
10732 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
10733 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
10734 In addition replace each `flag' with `_flag'.
10735
10736 2000-10-02 Akim Demaille <akim@epita.fr>
10737
10738 Also test parse error messages, including with YYERROR_VERBOSE.
10739
10740 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
10741 associative).
10742 Use it to check the computations.
10743 Use it to check `nonassoc' is honored.
10744 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
10745 `--yyerror-verbose'.
10746 (_AT_CHECK_CALC): Adjust to this option.
10747 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
10748
10749 2000-10-02 Akim Demaille <akim@epita.fr>
10750
10751 Test also `--verbose', `--defines' and `--name-prefix'. Testing
10752 the latter demonstrates a flaw in the handling of non debugging
10753 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
10754 was used in order to simplify:
10755
10756 #if YYDEBUG
10757 if (yydebug)
10758 {
10759 ...
10760 }
10761 #endif
10762
10763 into
10764
10765 if (yydebug)
10766 {
10767 ...
10768 }
10769
10770 unfortunately this leads to a CPP conflict when
10771 `--name-prefix=foo' is used since it produces `#define yydebug
10772 foodebug'.
10773
10774 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
10775 (YYDPRINTF): New macro.
10776 Spread its use.
10777 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10778 the bison options.
10779 Also test `--verbose', `--defines' and `--name-prefix'.
10780
10781 2000-10-02 Akim Demaille <akim@epita.fr>
10782
10783 Improve the readability of the produced parsers.
10784
10785 * src/bison.s1: Formatting changes.
10786 Improve the comment related to the `$' mark.
10787 (yydefault): Don't fall through to `yyresume': `goto' there.
10788 * src/output.c (output_parser): When the `$' is met, skip the end
10789 of its line.
10790 New variable, `number_of_dollar_signs', to check there's exactly
10791 one `$' in the parser skeleton.
10792
10793 2000-10-02 Akim Demaille <akim@epita.fr>
10794
10795 * lib/xstrdup.c: New file, from the fileutils.
10796 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10797 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10798 instead of strlen + xmalloc + strcpy.
10799 * src/symtab.c (copys): Remove, use xstrdup instead.
10800
10801 2000-10-02 Akim Demaille <akim@epita.fr>
10802
10803 * src/gram.h (associativity): New enum type which replaces the
10804 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10805 `right_assoc', `left_assoc' and `non_assoc'.
10806 Adjust all dependencies.
10807 * src/reader.c: Formatting changes.
10808 (LTYPESTR): Don't define it, use it as a literal in
10809 `reader_output_yylsp'.
10810 * src/symtab.h (symbol_class): New enum type which replaces the
10811 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10812 `sunknown', `stoken and `snterm'.
10813
10814 2000-10-02 Akim Demaille <akim@epita.fr>
10815
10816 * src/getargs.c (fixed_outfiles): Rename as...
10817 (yaccflag): for consistency and accuracy.
10818 Adjust dependencies.
10819
10820 2000-10-02 Akim Demaille <akim@epita.fr>
10821
10822 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10823 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10824 difficult and introduced a lot of core dump. It turns out that
10825 Bison used an implementation of `xmalloc' based on `calloc', and
10826 at various places it does depend upon the initialization to 0. I
10827 have not tried to isolate the pertinent places, and all the former
10828 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10829 someone should address this issue.
10830
10831 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10832 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10833 files.
10834 Adjust dependencies.
10835 * src/warshall.h: New file.
10836 Propagate.
10837
10838 2000-10-02 Akim Demaille <akim@epita.fr>
10839
10840 Various anti-`extern in *.c' changes.
10841
10842 * src/system.h: Include `assert.h'.
10843
10844 2000-10-02 Akim Demaille <akim@epita.fr>
10845
10846 * src/state.h (nstates, final_state, first_state, first_shift)
10847 (first_reduction): Move their exportation from here...
10848 * src/LR0.h: to here.
10849 Adjust dependencies.
10850 * src/getargs.c (statisticsflag): New variable.
10851 Add support for `--statistics'.
10852 Adjust dependencies.
10853
10854 Remove a lot of now useless `extern' statements in most files.
10855
10856 2000-10-02 Akim Demaille <akim@epita.fr>
10857
10858 * src/LR0.h: New file.
10859 Propagate its use.
10860
10861 2000-10-02 Akim Demaille <akim@epita.fr>
10862
10863 * src/print.h: New file.
10864 Propagate its use.
10865 * src/print.c: Formatting and ordering changes.
10866 (verbose, terse): Replace with...
10867 (print_results): this new function.
10868 Adjust dependencies.
10869
10870 2000-10-02 Akim Demaille <akim@epita.fr>
10871
10872 * src/conflicts.c (conflict_report): New function.
10873 (conflict_log, verbose_conflict_log): Replace with...
10874 (print_conflicts): this function.
10875 Adjust dependencies.
10876 * src/conflicts.h: New file.
10877 Propagate its inclusion.
10878
10879 2000-10-02 Akim Demaille <akim@epita.fr>
10880
10881 * src/nullable.h: New file.
10882 Propagate its inclusion.
10883 * src/nullable.c: Formatting changes.
10884
10885 2000-10-02 Akim Demaille <akim@epita.fr>
10886
10887 * src/reduce.h: New file.
10888 Propagate its inclusion.
10889 * src/reduce.c: Topological sort and other formatting changes.
10890 (bool, TRUE, FALSE): Move their definition to...
10891 * src/system.h: here.
10892
10893 2000-10-02 Akim Demaille <akim@epita.fr>
10894
10895 * src/files.c: Formatting changes.
10896 (tryopen, tryclose, openfiles): Rename as...
10897 (xfopen, xfclose, open_files): this.
10898 (stringappend): static.
10899 * src/files.h: Complete the list of exported symbols.
10900 Propagate its use.
10901
10902 2000-10-02 Akim Demaille <akim@epita.fr>
10903
10904 * src/reader.h: New file.
10905 Propagate its use instead of tedious list of `extern' and
10906 prototypes.
10907 * src/reader.c: Formatting changes, topological sort,
10908 s/register//.
10909
10910 2000-10-02 Akim Demaille <akim@epita.fr>
10911
10912 * src/lex.h: Prototype `lex.c' exported functions.
10913 * src/reader.c: Adjust.
10914 * src/lex.c: Formatting changes.
10915 (safegetc): Rename as...
10916 (xgetc): this.
10917
10918 2000-10-02 Akim Demaille <akim@epita.fr>
10919
10920 * src/lalr.h: New file.
10921 Propagate its inclusion instead of prototypes and `extern'.
10922 * src/lalr.c: Formatting changes, topological sorting etc.
10923
10924 2000-10-02 Akim Demaille <akim@epita.fr>
10925
10926 * src/output.c (token_actions): Introduce a temporary array,
10927 YYDEFACT, that makes it possible for this function to use
10928 output_short_table.
10929
10930 2000-10-02 Akim Demaille <akim@epita.fr>
10931
10932 `user_toknums' is output as a `short[]' in `output.c', while it is
10933 defined as a `int[]' in `reader.c'. For consistency with the
10934 other output tables, `user_toknums' is now defined as a table of
10935 shorts.
10936
10937 * src/reader.c (user_toknums): Be a short table instead of an int
10938 table.
10939 Adjust dependencies.
10940
10941 Factor the short table outputs.
10942
10943 * src/output.c (output_short_table): New function.
10944 * src/output.c (output_gram, output_stos, output_rule_data)
10945 (output_base, output_table, output_check): Use it.
10946
10947 2000-10-02 Akim Demaille <akim@epita.fr>
10948
10949 * src/output.c (output): Topological sort of the functions, in
10950 order to get rid of the `static' prototypes.
10951 No longer use `register'.
10952 * src/output.h: New file.
10953 Propagate its inclusion in files explicitly prototyping functions
10954 from output.c.
10955
10956 2000-09-21 Akim Demaille <akim@epita.fr>
10957
10958 * src/atgeneral.m4: Update from Autoconf.
10959
10960 2000-09-21 Akim Demaille <akim@epita.fr>
10961
10962 * src/closure.h: New file.
10963 * src/closure.c: Formatting changes, topological sort over the
10964 functions, use of closure.h.
10965 (initialize_closure, finalize_closure): Rename as...
10966 (new_closure, free_closure): these. Adjust dependencies.
10967 * src/LR0.c: Formatting changes, topological sort, use of
10968 cloture.h.
10969 (initialize_states): Rename as...
10970 (new_states): this.
10971 * src/Makefile.am (noinst_HEADERS): Adjust.
10972
10973 2000-09-20 Akim Demaille <akim@epita.fr>
10974
10975 * src/acconfig.h: Don't protect config.h against multiple
10976 inclusion.
10977 Don't define PARAMS.
10978 * src/system.h: Define PARAMS.
10979 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
10980 purpose of config.h. system.h must not try to fix wrong
10981 definitions in config.h.
10982
10983 2000-09-20 Akim Demaille <akim@epita.fr>
10984
10985 * src/derives.h: New file.
10986 * src/main.c, src/derives.h: Use it.
10987 Formatting changes.
10988 * src/Makefile.am (noinst_HEADERS): Adjust.
10989
10990 2000-09-20 Akim Demaille <akim@epita.fr>
10991
10992 * tests/atgeneral.m4: Update from Autoconf.
10993 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
10994 (AT_CHECK_CALC): New macros.
10995 Use these macros to test bison with options `', `--raw',
10996 `--debug', `--yacc', `--yacc --debug'.
10997
10998 2000-09-19 Akim Demaille <akim@epita.fr>
10999
11000 * src/output.c: Formatting changes.
11001 * src/machine.h: Remove, leaving its contents in...
11002 * src/system.h: here.
11003 Include stdio.h.
11004 Adjust all dependencies on stdio.h and machine.h.
11005 * src/getargs.h: New file.
11006 Let all `extern' declarations about getargs.c be replaced with
11007 inclusion of `getargs.h'.
11008 * src/Makefile.am (noinst_HEADERS): Adjust.
11009
11010 * tests/calc.m4 (yyin): Be initialized in main, not on the global
11011 scope.
11012 (yyerror): Returns void, not int.
11013 * doc/bison.texinfo: Formatting changes.
11014
11015 2000-09-19 Akim Demaille <akim@epita.fr>
11016
11017 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
11018 portable.
11019
11020 2000-09-18 Akim Demaille <akim@epita.fr>
11021
11022 * configure.in: Append WARNING_CFLAGS to CFLAGS.
11023 * src/Makefile.am (INCLUDES): Don't.
11024 Be ready to fetch headers in lib/.
11025
11026 2000-09-18 Akim Demaille <akim@epita.fr>
11027
11028 * doc/bison.texinfo: Update the copyright.
11029 ANSIfy and GNUify the examples.
11030 Remove the old menu.
11031
11032 2000-09-18 Akim Demaille <akim@epita.fr>
11033
11034 First set of tests: use the `calc' example from the documentation.
11035
11036 * src/bison.s1 (yyparse): Condition the code using `yytname' which
11037 is defined only when YYDEBUG is.
11038 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
11039 * src/files.c (tryopen, tryclose): Formatting changes.
11040 Move to the top and be static.
11041 * src/reader.c (read_signed_integer): Likewise.
11042 * tests/calc.m4: New file.
11043 * Makefile.am, suite.m4: Adjust.
11044 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
11045
11046 2000-09-18 Akim Demaille <akim@epita.fr>
11047
11048 Add support for an Autotest test suite for Bison.
11049
11050 * m4/m4.m4, m4/atconfig.m4: New files.
11051 * m4/Makefile.am (EXTRA_DIST): Adjust.
11052 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
11053 files.
11054 * src/getargs.c: Display a more standard --version message.
11055 * src/reader.c (reader): Formatting changes.
11056 No longer depend upon VERSION_STRING.
11057 * configure.in: No longer use `dnl'.
11058 Set up the test suite and the new directory `tests/.
11059 (VERSION_STRING): Remove.
11060
11061 2000-04-14 Akim Demaille <akim@epita.fr>
11062
11063 * src/reader.c (copy_comment2): New function, same as former
11064 `copy_comment', but outputs into two FILE *.
11065 (copy_comment): Use it.
11066 (parse_union_decl): Use it.
11067 (get_type, parse_start_decl): Use the same `invalid' message.
11068 (parse_start_decl, parse_union_decl): Use the same `multiple'
11069 message.
11070 (parse_union_decl, copy_guard, copy_action): Use the same
11071 `unmatched' message.
11072 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
11073
11074 2000-03-31 Akim Demaille <akim@epita.fr>
11075
11076 * src/files.c (tryopen, tryclose): Move to the top.
11077 Be static.
11078
11079 2000-03-31 Akim Demaille <akim@epita.fr>
11080
11081 * src/main.c (main): Don't call `done', exit does it.
11082
11083 2000-03-31 Akim Demaille <akim@epita.fr>
11084
11085 * allocate.c: s/return (foo)/return foo/.
11086 * lalr.c: Likewise.
11087 * LR0.c: Likewise.
11088 * output.c: Likewise.
11089 * reader.c: Likewise.
11090 * symtab.c: Likewise.
11091 * vmsgetargs.c: Likewise.
11092
11093 2000-03-31 Akim Demaille <akim@epita.fr>
11094
11095 Clean up the error reporting functions.
11096
11097 * src/report.c: New file.
11098 * src/report.h: Likewise.
11099 * src/Makefile.am: Adjust.
11100 * m4/error.m4: New file.
11101 * m4/Makefile.am: Adjust.
11102 * configure.in (jm_PREREQ_ERROR): Call it.
11103 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
11104 Remove.
11105 (fatal, fatals): Remove. All callers use complain.c::fatal.
11106 (warn, warni, warns, warnss, warnss): Remove. All callers use
11107 complain.c::complain.
11108 (toomany): Remove, use fatal instead.
11109 * src/files.c (done): No argument, use complain_message_count.
11110 * src/main.c (main): Register `done' to `atexit'.
11111
11112 * src/getargs.c (usage): More `fputs', less `fprintf'.
11113
11114 2000-03-28 Akim Demaille <akim@epita.fr>
11115
11116 * lib/: New directory.
11117 * Makefile.am (SUBDIRS): Adjust.
11118 * configure.in: Adjust.
11119 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
11120 useless.
11121 * src/alloca.c: Moved to lib/.
11122 * src/getopt.c: Likewise.
11123 * src/getopt1.c: Likewise.
11124 * src/getopt.h: Likewise.
11125 * src/ansi2knr.c: Likewise.
11126 * src/ansi2knr.1: Likewise.
11127 * src/Makefile.am: Adjust.
11128 * lib/Makefile.am: New file.
11129
11130 2000-03-28 Akim Demaille <akim@epita.fr>
11131
11132 * src/getargs.c (usage): Refresh the help message.
11133
11134 2000-03-17 Akim Demaille <akim@epita.fr>
11135
11136 * src/getopt1.c: Updated from textutils 2.0e
11137 * src/getopt.c: Likewise.
11138 * src/getopt.h: Likewise.
11139
11140 2000-03-17 Akim Demaille <akim@epita.fr>
11141
11142 * src/Makefile.am (bison.simple): Fix the awk program: quote only
11143 the file name, not the whole `#line LINE FILE'.
11144
11145 2000-03-17 Akim Demaille <akim@epita.fr>
11146
11147 On syntax errors, report the token on which we choked.
11148
11149 * src/bison.s1 (yyparse): In the label yyerrlab, when
11150 YYERROR_VERBOSE, add yychar in msg.
11151
11152 2000-03-17 Akim Demaille <akim@epita.fr>
11153
11154 * src/reader.c (copy_at): New function.
11155 (copy_guard): Use it.
11156 (copy_action): Use it.
11157
11158 2000-03-17 Akim Demaille <akim@epita.fr>
11159
11160 Be kind to translators, save some useless translations.
11161
11162 * src/main.c (banner): New function.
11163 (fatal_banner): Use it.
11164 (warn_banner): Use it.
11165
11166 2000-03-17 Akim Demaille <akim@epita.fr>
11167
11168 * src/reader.c (copy_definition): Use copy_string and
11169 copy_comment. Removed now unused `match', `ended',
11170 `cplus_comment'.
11171 (copy_comment, copy_string): Moved, to be visible from
11172 copy_definition.
11173
11174 2000-03-17 Akim Demaille <akim@epita.fr>
11175
11176 * src/reader.c (copy_string): Declare `static inline'. No
11177 problems with inline, since it is checked by configure.
11178 (copy_comment): Likewise.
11179
11180 2000-03-17 Akim Demaille <akim@epita.fr>
11181
11182 * src/reader.c (packsymbols): Formatting changes.
11183
11184 2000-03-17 Akim Demaille <akim@epita.fr>
11185
11186 * src/reader.c (copy_comment): New function, factored out from:
11187 (copy_action): Use it. Removed now unused `match', `ended',
11188 `cplus_comment'.
11189 (copy_guard): Likewise.
11190
11191 2000-03-17 Akim Demaille <akim@epita.fr>
11192
11193 * src/reader.c (copy_string): New function, factored out from:
11194 (copy_action): Use it.
11195 (copy_guard): Likewise.
11196
11197 2000-03-17 Akim Demaille <akim@epita.fr>
11198
11199 Change the handling of @s so that they behave exactly like $s.
11200 There is now a pseudo variable @$ (readble and writable), location
11201 of the lhs of the rule (by default ranging from the location of
11202 the first symbol of the rhs, to the location of the last symbol,
11203 or, if the rhs is empty, YYLLOC).
11204
11205 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
11206 yyval.
11207 (yyparse): When providing a default semantic action, provide a
11208 default location action.
11209 (after the $): No longer change `*YYLSP', just stack YYLOC the
11210 same way you stack YYVAL.
11211 * src/reader.c (read_declarations): Use warns.
11212 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
11213 (copy_action, case '@'): Likewise.
11214 Use a standard error message, to save useless work from
11215 translators.
11216
11217 2000-03-17 Akim Demaille <akim@epita.fr>
11218
11219 * src/bison.s1: Formatting and cosmetics changes.
11220 * src/reader.c: Likewise.
11221 Update the Copyright notice.
11222
11223 2000-03-17 Akim Demaille <akim@epita.fr>
11224
11225 * src/bison.s1 (#line): All set to `#line' only, since the
11226 Makefile now handles them.
11227
11228 2000-03-16 Akim Demaille <akim@epita.fr>
11229
11230 * src/output.c (output_rule_data): Output the documentation of
11231 some of the tables.
11232 (Copyright notice): Update.
11233 Formatting changes.
11234
11235 2000-03-16 Akim Demaille <akim@epita.fr>
11236
11237 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
11238 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
11239 One `#if YYDEBUG' remains, since it uses variables which are
11240 defined only if `YYDEBUG != 0'.
11241
11242 2000-03-16 Akim Demaille <akim@epita.fr>
11243
11244 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
11245 and related variables so that the similarities are highlighted.
11246
11247 2000-03-16 Akim Demaille <akim@epita.fr>
11248
11249 * src/bison.s1: Properly indent CPP directives.
11250
11251 2000-03-16 Akim Demaille <akim@epita.fr>
11252
11253 * src/bison.s1: Properly indent the `alloca' CPP section.
11254
11255 2000-03-16 Akim Demaille <akim@epita.fr>
11256
11257 Do not hard code values of directories in `configure.in'.
11258 Update the `configure' tool chain.
11259
11260 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
11261 src/makefile.am.
11262 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
11263 (AC_OUTPUT): Add m4/Makefile.
11264 Bump to bison 1.28a, 1.29 has never been released.
11265 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
11266 handled via src/Makefile.am.
11267 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
11268 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
11269 autoheader.
11270 * Makefile.am (SUBDIRS): Add m4.
11271 (ACLOCAL_AM_FLAGS): New variable.
11272 (AUTOMAKE_OPTIONS): Add check-news.
11273 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
11274 the proper line number and file name.
11275 (DEFS): Propagate the location of bison library files and of the
11276 locale files.
11277 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
11278 builddir.
11279 * acinclude.m4: Remove, replaced by the directory m4.
11280 * m4/Makefile.am (EXTRA_DIST): New variable.
11281 * m4/gettext.m4: New file, from the fileutils.
11282 * m4/lcmessage.m4: Likewise
11283 * m4/progtest.m4: Likewise.
11284 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
11285
11286 2000-03-10 Akim Demaille <akim@epita.fr>
11287
11288 * src/closure.c:
11289 Formatting changes of various comments.
11290 Respect the GNU coding standards at various places.
11291 Don't use `_()' when no translation is needed.
11292
11293 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11294
11295 * src/files.c:
11296 OS/2 honors TMPDIR environment variable.
11297
11298 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11299
11300 * doc/bison.texinfo: Tweaked spelling and grammar.
11301 Updated ISBN.
11302 Removed reference to price of printed copy.
11303 Mention BISON_SIMPLE and BISON_HAIRY.
11304
11305 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11306
11307 * configure.in, NEWS:
11308 Bison 1.29 released.
11309
11310 1999-10-27 Jesse Thilo <jthilo@gnu.org>
11311
11312 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
11313 Added reference card.
11314
11315 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11316
11317 * po/ru.po: Added Russian translation.
11318
11319 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11320
11321 * configure.in: Added Russian translation.
11322
11323 1999-07-06 Jesse Thilo <jthilo@gnu.org>
11324
11325 * configure.in, NEWS, README:
11326 Released version 1.28.
11327
11328 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11329
11330 * src/system.h:
11331 Squashed redefinition warning on some systems.
11332
11333 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
11334 Have configure build version string instead of relying on ANSI string
11335 concatentation.
11336
11337 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11338
11339 * po/POTFILES.in: Got rid of version.c.
11340
11341 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11342
11343 * acconfig.h, configure.in:
11344 Have configure build version string instead of relying on ANSI string
11345 concatentation.
11346
11347 1999-06-08 Jesse Thilo <jthilo@gnu.org>
11348
11349 * doc/bison.1:
11350 Dropped mention of `+' for long-named options.
11351
11352 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11353
11354 * src/files.c: Added <unistd.h> for unlink().
11355
11356 * src/Makefile.am, src/system.h:
11357 I18n fixes.
11358
11359 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11360
11361 * README: Added a FAQ list.
11362
11363 * configure.in, acconfig.h:
11364 I18n fixes.
11365
11366 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11367
11368 * doc/FAQ, doc/Makefile.am:
11369 Added a FAQ list.
11370
11371 1999-05-19 Jesse Thilo <jthilo@gnu.org>
11372
11373 * src/alloc.h, src/symtab.h, src/version.c:
11374 Protected inclusion of "config.h" with HAVE_CONFIG_H.
11375
11376 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11377
11378 * src/.cvsignore, src/Makefile.am:
11379 Reorganized: sources in `src', documentation in `doc'.
11380
11381 * src/lex.c (literalchar):
11382 fixed the code for escaping double quotes (thanks
11383 Jonathan Czisny.)
11384
11385 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11386
11387 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
11388 Adjusted paths to reflect directory reorganization.
11389
11390 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11391
11392 * doc/.cvsignore, doc/Makefile.am:
11393 Reorganized: sources in `src', documentation in `doc'.
11394
11395 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11396
11397 * configure.in:
11398 Updated AC_INIT file to reflect directory reorganization.
11399
11400 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
11401 Reorganized: sources in `src', documentation in `doc'.
11402
11403 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11404
11405 * src/allocate.c:
11406 Don't declare calloc() and realloc() if not necessary.
11407
11408 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11409
11410 * configure.in, acconfig.h, acinclude.m4:
11411 Don't declare calloc() and realloc() if not necessary.
11412
11413 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11414
11415 * po/.cvsignore: Added i18n support.
11416
11417 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11418
11419 * acconfig.h, configure.in, Makefile.am:
11420 Added i18n support.
11421
11422 1999-03-22 Jesse Thilo <jthilo@gnu.org>
11423
11424 * src/bison.s1: Fixed #line numbers.
11425
11426 1999-03-15 Jesse Thilo <jthilo@gnu.org>
11427
11428 * po/es.po, po/fr.po, po/nl.po, po/de.po:
11429 Added PO files from Translation Project.
11430
11431 1999-03-03 Jesse Thilo <jthilo@gnu.org>
11432
11433 * Makefile.am:
11434 Added support for non-ANSI compilers (ansi2knr).
11435
11436 1999-02-16 Jesse Thilo <jthilo@gnu.org>
11437
11438 * configure.in: Bumped version number to 1.27.
11439
11440 * Makefile.am:
11441 Added `bison.simple' to list of files removed by `make distclean'.
11442
11443 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11444
11445 * src/files.c, src/files.h:
11446 Defined locations of parser files in config.h instead of Makefile.
11447
11448 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11449
11450 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
11451 Defined locations of parser files in config.h instead of Makefile.
11452
11453 1999-02-09 Jesse Thilo <jthilo@gnu.org>
11454
11455 * Makefile.am:
11456 Removed inappropriate use of $< macro.
11457
11458 1999-02-05 Jesse Thilo <jthilo@gnu.org>
11459
11460 * po/Makefile.in.in, po/POTFILES.in:
11461 Add `po' directory skeleton.
11462
11463 1999-01-27 Jesse Thilo <jthilo@gnu.org>
11464
11465 * README: Document help-bison list.
11466
11467 * configure.in: Add check for mkstemp().
11468
11469 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11470
11471 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
11472 Hush a few compiler warnings.
11473
11474 * src/files.c:
11475 Add tryclose(), which verifies that fclose was successful.
11476 Hush a couple of compiler warnings.
11477
11478 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11479
11480 * Makefile.am, OChangeLog:
11481 ChangeLog is now automatically generated. Include the old version as
11482 OChangeLog.
11483
11484 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11485
11486 * 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:
11487 Update FSF address.
11488
11489 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11490
11491 * doc/bison.texinfo: Fix formatting glitch.
11492
11493 * doc/bison.texinfo: Update FSF address.
11494
11495 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11496
11497 * acconfig.h: Update FSF address.
11498
11499 1999-01-08 Jesse Thilo <jthilo@gnu.org>
11500
11501 * src/system.h:
11502 Don't define PACKAGE here, since config.h defines it.
11503
11504 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11505
11506 * src/reader.c: Update copyright date.
11507
11508 * src/main.c:
11509 Ditch sprintf to statically-sized buffers in fatal/warn functions in
11510 favor of output directly to stderr (avoids buffer overruns).
11511
11512 * src/reader.c: Some checks for premature EOF.
11513
11514 * 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:
11515 Use prototypes if the compiler understands them.
11516
11517 * src/files.c: Honor TMPDIR on Unix hosts.
11518 Use prototypes if the compiler understands them.
11519
11520 * src/reader.c:
11521 Fix a couple of buffer overrun bugs.
11522 Use prototypes if the compiler understands them.
11523
11524 * src/system.h: Include unistd.h and ctype.h.
11525 Use #ifdef instead of #if for NLS symbols.
11526
11527 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11528
11529 * doc/bison.texinfo:
11530 Delete comment "consider using @set for edition number, etc..." since
11531 we now are doing so.
11532
11533 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11534
11535 * configure.in:
11536 Use prototypes if the compiler understands them.
11537
11538 * NEWS: Document 1.26 highlights.
11539
11540 * Makefile.am: Require Automake 1.3 or later.
11541
11542 * acconfig.h:
11543 Use prototypes if the compiler understands them.
11544
11545 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11546
11547 * src/version.c:
11548 Use VERSION symbol from automake for version number.
11549
11550 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11551
11552 * acconfig.h, configure.in, version.cin:
11553 Use VERSION symbol from automake for version number.
11554
11555 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11556
11557 * Makefile.am:
11558 Distribute original version of simple parser (bison.s1), not built
11559 version (bison.simple).
11560
11561 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11562
11563 * doc/bison.texinfo: Add info dir entry.
11564
11565 * doc/bison.texinfo:
11566 Let automake put version number into documentation.
11567
11568 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11569
11570 * src/bison.cld, src/build.com, src/vmshlp.mar:
11571 Add non-RCS files from /gd/gnu/bison.
11572
11573 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11574
11575 * doc/bison.1:
11576 Document the BISON_HAIRY and BISON_SIMPLE variables.
11577
11578 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11579
11580 * src/version.c: Build version.c automatically.
11581
11582 * src/reader.c:
11583 Fix token numbering (used to start at 258, not 257).
11584
11585 * src/system.h: Include config.h.
11586
11587 * src/getargs.c: Update bug report address.
11588
11589 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
11590 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
11591
11592 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11593
11594 * Makefile.am:
11595 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11596
11597 * configure.in, version.cin:
11598 Build version.c automatically.
11599
11600 * AUTHORS: Add AUTHORS file.
11601
11602 * README: Update bug report address.
11603
11604 * bison.simple:
11605 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11606
11607 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
11608 Add automake stuff.
11609
11610 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11611
11612 * doc/bison.texinfo: Clean up some formatting.
11613
11614 1998-05-05 Richard Stallman <rms@gnu.org>
11615
11616 * doc/bison.texinfo:
11617 Explain better why to make a pure parser.
11618
11619 1998-01-05 Richard Stallman <rms@gnu.org>
11620
11621 * src/files.c (openfiles):
11622 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
11623 find a temporary directory, if possible. Do not unlink files while
11624 they are open.
11625
11626 1997-08-25 Richard Stallman <rms@gnu.org>
11627
11628 * src/reader.c (stack_offset;):
11629 Change some warni to warns.
11630
11631 * src/lex.c (literalchar): Use warns, not warni.
11632
11633 1997-06-28 Richard Stallman <rms@gnu.org>
11634
11635 * src/bison.s1: Add a Bison version comment.
11636
11637 * src/main.c (fatal, warn, berror):
11638 Use program_name.
11639
11640 1997-06-28 Richard Stallman <rms@gnu.org>
11641
11642 * Makefile.in (bison_version): New variable.
11643 (dist): Use that variable.
11644 (bison.s1): Substitute the Bison version into bison.simple.
11645
11646 * bison.simple: Add a Bison version comment.
11647
11648 1997-06-18 Richard Stallman <rms@gnu.org>
11649
11650 * src/main.c (fatal, warn, berror):
11651 Make error messages standard.
11652 (toomany): Improve error message text.
11653
11654 * 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:
11655 new.h renamed to alloc.h.
11656
11657 1997-06-18 Richard Stallman <rms@gnu.org>
11658
11659 * Makefile.in: new.h renamed to alloc.h.
11660
11661 1997-05-24 Richard Stallman <rms@gnu.org>
11662
11663 * src/lex.c (literalchar):
11664 Fix the code for escaping \, " and '.
11665
11666 (lex): Avoid trouble when there are many chars
11667 to discard in a char literal with just several chars in it.
11668
11669 1997-05-17 Richard Stallman <rms@gnu.org>
11670
11671 * src/bison.s1:
11672 Use malloc, if using alloca is troublesome.
11673 (YYSTACK_USE_ALLOCA): New flag macro.
11674 Define it for some systems and compilers.
11675 (YYSTACK_ALLOC): New macro.
11676 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11677 If it was malloc'd, free it.
11678
11679 1997-05-17 Richard Stallman <rms@gnu.org>
11680
11681 * bison.simple:
11682 Use malloc, if using alloca is troublesome.
11683 (YYSTACK_USE_ALLOCA): New flag macro.
11684 Define it for some systems and compilers.
11685 (YYSTACK_ALLOC): New macro.
11686 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11687 If it was malloc'd, free it.
11688
11689 1997-04-23 Richard Stallman <rms@gnu.org>
11690
11691 * src/bison.s1:
11692 (alloca) [__hpux]: Always define as __builtin_alloca.
11693
11694 1997-04-23 Richard Stallman <rms@gnu.org>
11695
11696 * bison.simple:
11697 (alloca) [__hpux]: Always define as __builtin_alloca.
11698
11699 1997-04-22 Richard Stallman <rms@gnu.org>
11700
11701 * src/bison.s1:
11702 [__hpux]: Include alloca.h (right for HPUX 10)
11703 instead of declaring alloca (right for HPUX 9).
11704
11705 * src/bison.s1 (__yy_memcpy):
11706 Declare arg `count' as unsigned int.
11707 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11708
11709 1997-04-22 Richard Stallman <rms@gnu.org>
11710
11711 * bison.simple:
11712 [__hpux]: Include alloca.h (right for HPUX 10)
11713 instead of declaring alloca (right for HPUX 9).
11714
11715 * bison.simple (__yy_memcpy):
11716 Declare arg `count' as unsigned int.
11717 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11718
11719 1997-01-03 Richard Stallman <rms@gnu.org>
11720
11721 * src/allocate.c: [__STDC__ or _MSC_VER]:
11722 Declare calloc and realloc to return void *.
11723
11724 1997-01-02 Richard Stallman <rms@gnu.org>
11725
11726 * src/system.h:
11727 [_MSC_VER]: Include stdlib.h and process.h.
11728 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
11729
11730 * src/main.c (main): Return FAILURE as a value.
11731 (printable_version): Declare arg as int, not char.
11732
11733 1997-01-02 Richard Stallman <rms@gnu.org>
11734
11735 * Makefile.in (dist):
11736 Explicitly check for symlinks, and copy them.
11737
11738 1996-12-19 Richard Stallman <rms@gnu.org>
11739
11740 * src/files.c:
11741 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
11742
11743 1996-12-18 Paul Eggert <eggert@gnu.org>
11744
11745 * src/bison.s1 (yyparse):
11746 If __GNUC__ and YYPARSE_PARAM are both defined,
11747 declare yyparse to have a void * argument.
11748
11749 1996-12-18 Paul Eggert <eggert@gnu.org>
11750
11751 * bison.simple (yyparse):
11752 If __GNUC__ and YYPARSE_PARAM are both defined,
11753 declare yyparse to have a void * argument.
11754
11755 1996-12-17 Richard Stallman <rms@gnu.org>
11756
11757 * src/reduce.c (nbits): Add some casts.
11758
11759 1996-08-12 Richard Stallman <rms@gnu.org>
11760
11761 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
11762
11763 1996-08-12 Richard Stallman <rms@gnu.org>
11764
11765 * bison.simple: Test _MSDOS as well as _MSDOS_.
11766
11767 1996-07-31 Richard Stallman <rms@gnu.org>
11768
11769 * src/bison.s1:
11770 [__sun && __i386]: Include alloca.h.
11771
11772 1996-07-31 Richard Stallman <rms@gnu.org>
11773
11774 * bison.simple:
11775 [__sun && __i386]: Include alloca.h.
11776
11777 1996-07-30 Richard Stallman <rms@gnu.org>
11778
11779 * src/bison.s1: Comment change.
11780
11781 * src/bison.s1: Test _MSDOS_, not MSDOS.
11782
11783 1996-07-30 Richard Stallman <rms@gnu.org>
11784
11785 * bison.simple: Comment change.
11786
11787 * bison.simple: Test _MSDOS_, not MSDOS.
11788
11789 1996-06-01 Richard Stallman <rms@gnu.org>
11790
11791 * 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:
11792 Insert `_' macro around many string constants.
11793
11794 * src/main.c:
11795 Insert `_' macro around many string constants.
11796
11797 (main): Call setlocale, bindtextdomain and textdomain.
11798
11799 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11800 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11801 [ENABLE_NLS]: Include libintl.h.
11802 [ENABLE_NLS] (gettext): Define.
11803 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11804 (N_, PACKAGE, LOCALEDIR): New macros.
11805
11806 1996-06-01 Richard Stallman <rms@gnu.org>
11807
11808 * POTFILES.in: New file.
11809
11810 * Makefile.in (allocate.o):
11811 Define target explicitly.
11812
11813 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11814 (LDFLAGS): Set to @LDFLAGS@.
11815 (configure): Run autoconf only if preceding `cd' succeeds.
11816 (bison.s1): Redirect output to temporary file then move the
11817 temporary to the target, rather than redirecting directly to bison.s1.
11818 (clean): Remove config.status and config.log.
11819 (distclean): Don't remove config.status here.
11820
11821 1996-05-12 Richard Stallman <rms@gnu.org>
11822
11823 * src/bison.s1:
11824 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11825
11826 1996-05-12 Richard Stallman <rms@gnu.org>
11827
11828 * bison.simple:
11829 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11830
11831 1996-05-11 Richard Stallman <rms@gnu.org>
11832
11833 * src/bison.s1 (__yy_memcpy):
11834 Really reorder the args, as was supposedly done on Feb 14 1995.
11835 (yyparse): Calls changed accordingly.
11836
11837 1996-05-11 Richard Stallman <rms@gnu.org>
11838
11839 * Makefile.in (dist): Don't use $(srcdir).
11840
11841 * bison.simple (__yy_memcpy):
11842 Really reorder the args, as was supposedly done on Feb 14 1995.
11843 (yyparse): Calls changed accordingly.
11844
11845 1996-01-27 Richard Stallman <rms@gnu.org>
11846
11847 * src/output.c (output_rule_data):
11848 Test YYERROR_VERBOSE in the conditional
11849 around the definition of ttyname.
11850
11851 1995-12-29 Richard Stallman <rms@gnu.org>
11852
11853 * src/bison.s1:
11854 Fix line numbers in #line commands.
11855
11856 1995-12-29 Richard Stallman <rms@gnu.org>
11857
11858 * bison.simple:
11859 Fix line numbers in #line commands.
11860
11861 1995-12-27 Richard Stallman <rms@gnu.org>
11862
11863 * src/bison.s1 (YYPARSE_PARAM_DECL):
11864 In C++, make it always null.
11865 (YYPARSE_PARAM_ARG): New macro.
11866 (yyparse): Use YYPARSE_PARAM_ARG.
11867
11868 1995-12-27 Richard Stallman <rms@gnu.org>
11869
11870 * bison.simple (YYPARSE_PARAM_DECL):
11871 In C++, make it always null.
11872 (YYPARSE_PARAM_ARG): New macro.
11873 (yyparse): Use YYPARSE_PARAM_ARG.
11874
11875 1995-11-29 Richard Stallman <rms@gnu.org>
11876
11877 * doc/bison.texinfo:
11878 Describe literal string tokens, %raw, %no_lines, %token_table.
11879
11880 1995-11-29 Daniel Hagerty <hag@gnu.org>
11881
11882 * doc/bison.texinfo: Fixed update date
11883
11884 1995-10-16 Richard Stallman <rms@gnu.org>
11885
11886 * src/version.c: Version 1.25.
11887
11888 1995-10-16 Richard Stallman <rms@gnu.org>
11889
11890 * NEWS: *** empty log message ***
11891
11892 1995-10-16 Richard Stallman <rms@gnu.org>
11893
11894 * doc/bison.1, doc/bison.rnh:
11895 Add new options.
11896
11897 1995-10-15 Richard Stallman <rms@gnu.org>
11898
11899 * src/vmsgetargs.c, src/getargs.c:
11900 Added -n, -k, and -raw switches.
11901 (noparserflag, toknumflag, rawtoknumflag): New variables.
11902
11903 * src/symtab.h (SALIAS):
11904 New #define for adding aliases to %token.
11905 (struct bucket): Added `alias' field.
11906
11907 * src/reduce.c (reduce_grammar):
11908 Revise error message.
11909 (print_notices): Remove final `.' from error message.
11910
11911 * src/reader.c (reader_output_yylsp):
11912 New function.
11913 (readgram): Use `#if 0' around code that accepted %command
11914 inside grammar rules: The documentation doesn't allow it,
11915 and it will fail since the %command processors scan for the next %.
11916 (parse_token_decl): Extended the %token
11917 declaration to allow a multi-character symbol as an alias.
11918 (parse_thong_decl): New function.
11919 (read_declarations): Added %thong declarations.
11920 (read_declarations): Handle NOOP to deal with allowing
11921 % declarations as another means to specify the flags.
11922 (readgram): Allow %prec prior to semantics embedded in a rule.
11923 (skip_to_char, read_declarations, copy_definition)
11924 (parse_token_decl, parse_start_decl, parse_type_decl)
11925 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
11926 (get_type_name, copy_guard, copy_action, readgram)
11927 (get_type, packsymbols): Revised most error messages.
11928 Changed `fatal' to `warnxxx' to avoid aborting for error.
11929 Revised and use multiple warnxxx functions to avoid using VARARGS1.
11930 (read_declarations): Improve the error message for
11931 an invalid character. Do not abort.
11932 (read_declarations, copy_guard, copy_action): Use
11933 printable_version to avoid unprintable characters in printed output.
11934 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
11935 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
11936 Allow the type of a non-terminal can be given
11937 more than once, as long as all specifications give the same type.
11938
11939 * src/output.c:
11940 (output_headers, output_trailers, output, output_gram)
11941 (output_rule_data): Implement noparserflag variable.
11942 Implement toknumflag variable.
11943 (output): Call reader_output_yylsp to output LTYPESTR.
11944
11945 * src/main.c (main):
11946 If reader sees an error, don't process the grammar.
11947 (fatals): Updated to not use VARARGS1.
11948 (printable_version, int_to_string, warn, warni, warns, warnss)
11949 (warnsss): New error reporting functions. Avoid abort for error.
11950
11951 * src/lex.h:
11952 Added THONG and NOOP for alias processing.
11953 Added SETOPT for the new code that allows setting options with %flags.
11954
11955 * src/lex.c:
11956 Include getopt.h. Add some extern decls.
11957 (safegetc): New function to deal with EOF gracefully.
11958 (literalchar); new function to deal with reading \ escapes.
11959 (lex): Use literalchar.
11960 (lex): Implemented "..." tokens.
11961 (literalchar, lex, parse_percent_token): Made tokenbuffer
11962 always contain the token. This includes growing the token
11963 buffer while reading an integer.
11964 (parse_percent_token): Replaced if-else statement with percent_table.
11965 (parse_percent_token): Added % declarations as another
11966 way to specify the flags -n, -l, and -r. Also added hooks for
11967 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
11968 major changes to files.c.
11969 (lex) Retain in the incoming stream a character following
11970 an incorrect '/'.
11971 (skip_white_space, lex): Revised most error messages
11972 and changed fatal to warn to avoid aborting.
11973 (percent_table): Added %thong declarations.
11974
11975 * src/gram.h: Comment changes.
11976
11977 * src/files.c (openfiles, open_extra_files, done):
11978 Add faction flag
11979 and actfile file. Handle noparserflag. Both for -n switch.
11980
11981 * src/conflicts.c (resolve_sr_conflict):
11982 Remove use of alloca.
11983
11984 1995-06-01 Jim Meyering <meyering@gnu.org>
11985
11986 * doc/bison.texinfo: *** empty log message ***
11987
11988 1995-05-06 Richard Stallman <rms@gnu.org>
11989
11990 * src/bison.s1: Comment change.
11991
11992 1995-05-06 Richard Stallman <rms@gnu.org>
11993
11994 * bison.simple: Comment change.
11995
11996 1995-05-03 Richard Stallman <rms@gnu.org>
11997
11998 * src/version.c: Version now 1.24.
11999
12000 * src/bison.s1: Change distribution terms.
12001
12002 * src/version.c: Version now 1.23.
12003
12004 1995-05-03 Richard Stallman <rms@gnu.org>
12005
12006 * doc/bison.texinfo:
12007 Rewrite "Conditions for Using Bison".
12008 Update version to 1.24.
12009
12010 1995-05-03 Richard Stallman <rms@gnu.org>
12011
12012 * bison.simple: Change distribution terms.
12013
12014 1995-02-23 Richard Stallman <rms@gnu.org>
12015
12016 * src/files.c: Test __VMS_POSIX as well as VMS.
12017
12018 1995-02-14 Jim Meyering <meyering@gnu.org>
12019
12020 * src/bison.s1 (__yy_memcpy):
12021 Renamed from __yy_bcopy to avoid
12022 confusion. Reverse FROM and TO arguments to be consistent with
12023 those of memcpy.
12024
12025 1995-02-14 Jim Meyering <meyering@gnu.org>
12026
12027 * bison.simple (__yy_memcpy):
12028 Renamed from __yy_bcopy to avoid
12029 confusion. Reverse FROM and TO arguments to be consistent with
12030 those of memcpy.
12031
12032 1994-11-10 David J. MacKenzie <djm@gnu.org>
12033
12034 * NEWS: reformat
12035
12036 * NEWS: New file.
12037
12038 * Makefile.in (DISTFILES): Include NEWS.
12039
12040 * Makefile.in (DISTFILES):
12041 Include install-sh, not install.sh.
12042
12043 * configure.in: Update to Autoconf v2 macro names.
12044
12045 1994-10-05 David J. MacKenzie <djm@gnu.org>
12046
12047 * Makefile.in: fix typo
12048
12049 * Makefile.in (prefix, exec_prefix):
12050 Let configure set them.
12051
12052 1994-09-28 David J. MacKenzie <djm@gnu.org>
12053
12054 * Makefile.in: Set datadir to $(prefix)/share.
12055
12056 1994-09-15 Richard Stallman <rms@gnu.org>
12057
12058 * src/bison.s1:
12059 Update copyright notice and GPL version.
12060
12061 1994-09-15 Richard Stallman <rms@gnu.org>
12062
12063 * bison.simple:
12064 Update copyright notice and GPL version.
12065
12066 1994-07-12 Richard Stallman <rms@gnu.org>
12067
12068 * src/reduce.c, src/reader.c:
12069 entered into RCS
12070
12071 1994-05-05 David J. MacKenzie <djm@gnu.org>
12072
12073 * Makefile.in: entered into RCS
12074
12075 1994-03-26 Richard Stallman <rms@gnu.org>
12076
12077 * src/bison.s1: entered into RCS
12078
12079 1994-03-26 Richard Stallman <rms@gnu.org>
12080
12081 * bison.simple: entered into RCS
12082
12083 1994-03-25 Richard Stallman <rms@gnu.org>
12084
12085 * src/main.c: entered into RCS
12086
12087 1994-03-24 Richard Stallman <rms@gnu.org>
12088
12089 * src/conflicts.c: entered into RCS
12090
12091 1994-01-02 Richard Stallman <rms@gnu.org>
12092
12093 * Makefile.in: *** empty log message ***
12094
12095 1993-11-21 Richard Stallman <rms@gnu.org>
12096
12097 * src/bison.s1: *** empty log message ***
12098
12099 1993-11-21 Richard Stallman <rms@gnu.org>
12100
12101 * doc/bison.texinfo: entered into RCS
12102
12103 * doc/bison.texinfo: *** empty log message ***
12104
12105 1993-11-21 Richard Stallman <rms@gnu.org>
12106
12107 * bison.simple: *** empty log message ***
12108
12109 1993-10-25 David J. MacKenzie <djm@gnu.org>
12110
12111 * doc/bison.texinfo: *** empty log message ***
12112
12113 1993-10-19 Richard Stallman <rms@gnu.org>
12114
12115 * src/bison.s1: *** empty log message ***
12116
12117 1993-10-19 Richard Stallman <rms@gnu.org>
12118
12119 * bison.simple: *** empty log message ***
12120
12121 1993-10-14 Richard Stallman <rms@gnu.org>
12122
12123 * src/bison.s1: *** empty log message ***
12124
12125 1993-10-14 Richard Stallman <rms@gnu.org>
12126
12127 * bison.simple: *** empty log message ***
12128
12129 1993-09-14 David J. MacKenzie <djm@gnu.org>
12130
12131 * doc/bison.texinfo: *** empty log message ***
12132
12133 1993-09-13 Noah Friedman <friedman@gnu.org>
12134
12135 * Makefile.in: *** empty log message ***
12136
12137 1993-09-10 Richard Stallman <rms@gnu.org>
12138
12139 * src/conflicts.c: *** empty log message ***
12140
12141 * src/system.h: entered into RCS
12142
12143 1993-09-10 Richard Stallman <rms@gnu.org>
12144
12145 * doc/bison.1: entered into RCS
12146
12147 1993-09-06 Noah Friedman <friedman@gnu.org>
12148
12149 * src/version.c: entered into RCS
12150
12151 1993-09-06 Noah Friedman <friedman@gnu.org>
12152
12153 * Makefile.in: *** empty log message ***
12154
12155 1993-07-30 David J. MacKenzie <djm@gnu.org>
12156
12157 * Makefile.in: *** empty log message ***
12158
12159 1993-07-24 Richard Stallman <rms@gnu.org>
12160
12161 * src/bison.s1: *** empty log message ***
12162
12163 1993-07-24 Richard Stallman <rms@gnu.org>
12164
12165 * bison.simple: *** empty log message ***
12166
12167 1993-07-08 David J. MacKenzie <djm@gnu.org>
12168
12169 * Makefile.in: *** empty log message ***
12170
12171 1993-07-04 Richard Stallman <rms@gnu.org>
12172
12173 * src/bison.s1: *** empty log message ***
12174
12175 1993-07-04 Richard Stallman <rms@gnu.org>
12176
12177 * bison.simple: *** empty log message ***
12178
12179 1993-06-26 David J. MacKenzie <djm@gnu.org>
12180
12181 * src/getargs.c: entered into RCS
12182
12183 1993-06-26 David J. MacKenzie <djm@gnu.org>
12184
12185 * doc/bison.texinfo: *** empty log message ***
12186
12187 * doc/bison.1: New file.
12188
12189 1993-06-25 Richard Stallman <rms@gnu.org>
12190
12191 * src/getargs.c: New file.
12192
12193 1993-06-16 Richard Stallman <rms@gnu.org>
12194
12195 * src/bison.s1: *** empty log message ***
12196
12197 1993-06-16 Richard Stallman <rms@gnu.org>
12198
12199 * bison.simple: *** empty log message ***
12200
12201 1993-06-03 Richard Stallman <rms@gnu.org>
12202
12203 * src/bison.s1: New file.
12204
12205 1993-06-03 Richard Stallman <rms@gnu.org>
12206
12207 * doc/bison.texinfo: *** empty log message ***
12208
12209 1993-06-03 Richard Stallman <rms@gnu.org>
12210
12211 * bison.simple: New file.
12212
12213 1993-05-19 Richard Stallman <rms@gnu.org>
12214
12215 * doc/bison.texinfo: New file.
12216
12217 1993-05-07 Noah Friedman <friedman@gnu.org>
12218
12219 * Makefile.in: *** empty log message ***
12220
12221 1993-04-28 Noah Friedman <friedman@gnu.org>
12222
12223 * src/reader.c: *** empty log message ***
12224
12225 1993-04-23 Noah Friedman <friedman@gnu.org>
12226
12227 * src/alloc.h: entered into RCS
12228
12229 1993-04-20 David J. MacKenzie <djm@gnu.org>
12230
12231 * src/version.c: *** empty log message ***
12232
12233 * src/files.c, src/allocate.c:
12234 entered into RCS
12235
12236 * src/reader.c: *** empty log message ***
12237
12238 * src/lex.c: entered into RCS
12239
12240 * src/conflicts.c: New file.
12241
12242 * src/symtab.c: entered into RCS
12243
12244 * src/alloc.h: New file.
12245
12246 * src/LR0.c: entered into RCS
12247
12248 1993-04-18 Noah Friedman <friedman@gnu.org>
12249
12250 * src/reader.c: New file.
12251
12252 * src/version.c: *** empty log message ***
12253
12254 1993-04-18 Noah Friedman <friedman@gnu.org>
12255
12256 * Makefile.in: *** empty log message ***
12257
12258 1993-04-17 Noah Friedman <friedman@gnu.org>
12259
12260 * Makefile.in: *** empty log message ***
12261
12262 1993-04-15 Richard Stallman <rms@gnu.org>
12263
12264 * src/main.c, src/files.c:
12265 New file.
12266
12267 1993-04-15 Noah Friedman <friedman@gnu.org>
12268
12269 * configure.in: entered into RCS
12270
12271 * configure.in: *** empty log message ***
12272
12273 * configure.in: New file.
12274
12275 1993-04-14 Richard Stallman <rms@gnu.org>
12276
12277 * Makefile.in: New file.
12278
12279 1993-04-13 Richard Stallman <rms@gnu.org>
12280
12281 * src/version.c: New file.
12282
12283 1993-03-25 Richard Stallman <rms@gnu.org>
12284
12285 * src/output.c: entered into RCS
12286
12287 1992-09-25 Richard Stallman <rms@gnu.org>
12288
12289 * configure.bat: entered into RCS
12290
12291 1992-06-22 Richard Stallman <rms@gnu.org>
12292
12293 * src/vmsgetargs.c: entered into RCS
12294
12295 1992-06-22 Richard Stallman <rms@gnu.org>
12296
12297 * doc/bison.rnh: entered into RCS
12298
12299 1992-04-20 David J. MacKenzie <djm@gnu.org>
12300
12301 * README: entered into RCS
12302
12303 1992-01-22 Richard Stallman <rms@gnu.org>
12304
12305 * src/machine.h: entered into RCS
12306
12307 1991-12-21 Richard Stallman <rms@gnu.org>
12308
12309 * src/lalr.c, src/closure.c:
12310 entered into RCS
12311
12312 1991-12-20 Richard Stallman <rms@gnu.org>
12313
12314 * src/state.h: entered into RCS
12315
12316 1991-12-18 Richard Stallman <rms@gnu.org>
12317
12318 * src/print.c, src/nullable.c, src/derives.c:
12319 entered into RCS
12320
12321 1991-11-03 David J. MacKenzie <djm@gnu.org>
12322
12323 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
12324 entered into RCS
12325
12326 1988-09-09 Richard Stallman <rms@gnu.org>
12327
12328 * src/bison.hairy: entered into RCS
12329
12330 1987-12-16 Richard Stallman <rms@gnu.org>
12331
12332 * REFERENCES: entered into RCS
12333
12334 -----
12335
12336 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
12337 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
12338
12339 This file is part of Bison, the GNU Compiler Compiler.
12340
12341 Bison is free software; you can redistribute it and/or modify
12342 it under the terms of the GNU General Public License as published by
12343 the Free Software Foundation; either version 2, or (at your option)
12344 any later version.
12345
12346 Bison is distributed in the hope that it will be useful,
12347 but WITHOUT ANY WARRANTY; without even the implied warranty of
12348 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12349 GNU General Public License for more details.
12350
12351 You should have received a copy of the GNU General Public License
12352 along with Bison; see the file COPYING. If not, write to
12353 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
12354 Boston, MA 02111-1307, USA.