]> git.saurik.com Git - bison.git/blob - ChangeLog
* doc/bison.texinfo (Initial Action Decl): New.
[bison.git] / ChangeLog
1 2004-09-20 Akim Demaille <akim@epita.fr>
2
3 * doc/bison.texinfo (Initial Action Decl): New.
4
5 2004-09-20 Akim Demaille <akim@epita.fr>
6
7 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8 clearer criterion to define it.
9 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10 When reducing on an empty RHS, use the latest stacked location as
11 location.
12 yylloc is not always available.
13 * data/glr.c: Likewise.
14 Also, honor initial-actions.
15
16 2004-09-20 Akim Demaille <akim@epita.fr>
17
18 * data/yacc.c (YY_LOCATION_PRINT): New.
19 Define when we know YYLTYPE's structure, i.e., when the default
20 YYLLOC_DEFAULT is used.
21 * data/c.m4 (b4_yysymprint_generate): Use it.
22 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
23 value of the result.
24 (error_start_): Replace with...
25 (error_range_): this location array.
26 This allows to replace code relying on the implementation of
27 locations by portable code.
28 * data/yacc.c (yylerrsp): Replace with...
29 (yyerror_range): this.
30 Every time a token is popped, update yyerror_range[0], to have an
31 accurate location for the error token.
32 * data/glr.c (YY_LOCATION_PRINT): New.
33 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
34 deference a pointer.
35 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
36 report the location in %printers.
37
38 * src/scan-skel.l: Instead of abort, report error messages to ease
39 understanding skeleton scanning failures.
40
41 2004-09-16 Akim Demaille <akim@epita.fr>
42
43 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
44 (iterator, const_iterator): these, to be more in the C++ spirit.
45 Also, return reverse iterators so that when displaying the stack
46 we display its bottom first.
47 (Parser::stack_print_, Parser::reduce_print_): Match the messages
48 from yacc.c.
49 We should probably use vector here though.
50
51 2004-09-16 Akim Demaille <akim@epita.fr>
52
53 Have more complete shift traces.
54
55 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
56 to report Shifts instead of ad hoc YYDPRINTF invocations,
57 including for the error token.
58 * data/lalr1.cc (symprint_): Output the location.
59 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
60 output the location within the %printer.
61 Activate GLR tests, at least to make sure they compile properly.
62 They still don't pass though.
63 * tests/calc.at: Adjust expect verbose output, since now "Entering
64 state..." is on a different line than the "Shifting" message.
65
66 2004-09-08 Akim Demaille <akim@epita.fr>
67
68 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
69 Bison directive from the Bison file to the invocation of this
70 macro, so that these directives are passed to
71 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
72 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
73 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
74 the extra Bison directives instead of the whole series.
75 Change the grammar so that there are recoverable errors, and
76 unrecoverable errors. Now we can have the parser give up before
77 consuming the whole input. As a result we now can observe that
78 the lookahead is freed when needed.
79 Change the parser source to parse argv[1] instead of a hard coded
80 string.
81 Simplify yylex, and give a value and location to EOF.
82 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
83 passed directives already coded in the file.
84 Add some tests to check the location of "error".
85 For some tests, the C++ parser is correct, and not yacc.c.
86 For other tests, they provide different, but unsatisfying, values,
87 so keep the C++ value so that at least one parser is "correct"
88 according to the test suite.
89 (Actions after errors): Remove, this is subsumed by the
90 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
91
92 2004-09-06 Akim Demaille <akim@epita.fr>
93
94 * data/lalr1.cc: Adjust the indentation of the labels.
95 (Parser::pop): New.
96 Use it.
97
98 2004-09-06 Akim Demaille <akim@epita.fr>
99
100 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
101 argument, an informative message.
102 Call YY_SYMBOL_PRINT.
103 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
104 * data/lalr1.cc (destruct_): Likewise.
105 In addition, no longer depend on b4_yysymprint_generate and
106 b4_yydestruct_generate to generate these functions, do it "by
107 hand".
108
109 2004-09-03 Akim Demaille <akim@epita.fr>
110
111 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
112 invoked, yydestruct the lookahead.
113 * tests/calc.at (Calculator $1): Update the expected lengths of
114 traces: there is an added line for the discarded lookahead.
115 * doc/bison.texinfo (Destructor Decl): Some rewording.
116 Define "discarded" symbols.
117
118 2004-09-02 Akim Demaille <akim@epita.fr>
119
120 * data/lalr1.cc (translate_, destruct_): No reason to be static.
121
122 2004-09-02 Akim Demaille <akim@epita.fr>
123
124 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
125 (YYDSYMPRINTF): Rename as...
126 (YY_SYMBOL_PRINT): this.
127 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
128 two.
129 Use it instead of direct symprint_ calls.
130 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
131 one.
132
133 2004-09-02 Akim Demaille <akim@epita.fr>
134
135 * data/lalr1.cc (b4_yysymprint_generate): New.
136 (symprint_): New member function, defined when YYDEBUG.
137 Use it consistently instead of token/nterm debugging output by
138 hand.
139 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
140 %printer calls to use cdebug_ when using lalr1.cc.
141
142 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
143
144 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
145 with #ifdef YYDEBUG.
146
147 2004-08-26 Akim Demaille <akim@epita.fr>
148
149 * doc/bison.texinfo (Implementing Loops): Rename as...
150 (Implementing Gotos/Loops): this.
151
152 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
153
154 Adjust to latest gnulib.
155 * bootstrap (gnulib_modules): Add xalloc-die.
156 Set LC_ALL=C so that file names sort consistently.
157 Prefer the gnulib copies of gettext.m4, glibc21.m4,
158 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
159 uintmax_t.m4, ulonglong.m4.
160 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
161 po.m4 since we are now using _gl.m4 instead.
162
163 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
164
165 * src/scan-action.l: Remove. Scanning of semantic actions is
166 handled in scan-gram.l.
167
168 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
169
170 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
171
172 * src/location.h (struct): The file member is a uniqstr.
173 (equal_boundaries): Use UNIQSTR_EQ for comparison.
174
175 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
176
177 Fix bug with non-%union parsers that have printers or destructors,
178 which led to a Bison core dump. Reported by Peter Fales in
179 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
180
181 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
182 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
183 not to our own type.
184 * src/output.c (symbol_destructors_output, symbol_printers_output):
185 Don't assume %union.
186 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
187 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
188 UNION-FLAG. All callers changed.
189 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
190 Use type char, not unsigned int, when declaring an array of char;
191 this lets us remove a cast.
192 (Printers and Destructors): Add non-%union test cases.
193
194 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
195
196 * doc/bison.texinfo: Minor editorial changes, mostly to the new
197 GLR writeups. E.g., avoid frenchspacing and the future tense,
198 change "lookahead" to "look-ahead", and change "wrt" to "with
199 respect to".
200
201 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
202
203 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
204 New sections, split off from the GLR Parsers section. Put the new
205 Simple GLR Parser near the start of the GLR section, for clarity.
206 Rewrite connective text.
207
208 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
209
210 * doc/bison.texinfo (Simple GLR Parsers): New section.
211
212 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
213
214 * NEWS, TODO, doc/bison.texinfo:
215 Use "look-ahead" instead of "lookahead", to be consistent.
216 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
217 while we're fixing "look-ahead".
218 * src/conflicts.c (shift_set): Renamed from shiftset.
219 (look_ahead_set): Renamed from lookaheadset.
220 * src/print.c: Likewise.
221 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
222 name for "lookahead".
223 (report_types, usage): Likewise.
224 * src/getargs.h (report_look_ahead_tokens): Renamed from
225 report_lookaheads.
226 * src/lalr.c (compute_look_ahead_tokens): Renamed from
227 compute_lookaheads.
228 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
229 (look_ahead_tokens_print): Renamed from lookaheads_print.
230 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
231 state_rule_lookaheads_print.
232 * src/state.h: Likewise.
233 (reductions.look_ahead_tokens): Renamed from lookaheads.
234 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
235 AT_DATA_LOOKAHEADS_GRAMMAR.
236
237 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
238
239 * README: Update location of patched M4 distribution.
240
241 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
242
243 Don't assume the C++ compiler takes the same arguments as the C compiler
244 (trivial change).
245 * configure.ac (O0CXXFLAGS): New var.
246 * tests/atlocal.in (CXXFLAGS): Use it.
247
248 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
249
250 Fix some "make check" problems with C++ reported by
251 Albert Chin-A-Young for Tru64 C++ in this thread:
252 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
253
254 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
255 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
256 Output to a .cc file for C++, not to a .c file.
257 * tests/calc.at (AT_CHECK_CALC): Likewise.
258 * tests/regression.at (AT_CHECK_DANCER): Likewise.
259 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
260
261 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
262
263 * tests/calc.at, tests/actions.at: Workaround for SGI
264 C++ compiler. (trivial change)
265
266 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
267
268 Spent a few hours checking out which prerequisite versions the
269 current sources actually require. I went all the way back to
270 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
271 a seemingly endless set of combinations of versions more recent
272 than that. The bottom line is that the current sources require
273 fairly recent versions of the build tools, and it'll be some work
274 to change this.
275 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
276 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
277 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
278 Add comments explaining why those particular versions are
279 currently needed.
280
281 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
282 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
283 <http://mail.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
284
285 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
286 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
287
288 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
289
290 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
291 0.11.5. Suggested by Bruno Haible.
292 * bootstrap: Remove gettext version checking.
293
294 * doc/bison.texinfo (Decl Summary): Also mention that %union
295 can depend on prerequisite types. Problem reported by Tim
296 Van Holder.
297
298 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
299
300 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
301 * README-alpha: Don't tell people not to package this.
302
303 * bootstrap: Don't assume $(...) works; use `...` instead.
304 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
305 gettext better.
306
307 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
308 put into the -d output file, and mention what to do if YYSTYPE is
309 defined as a macro.
310
311 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
312
313 Undo change made earlier today: it caused autopoint to not bring
314 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
315 autopoint's.
316
317 * bootstrap: Check that gettext version matches what's in
318 configure.ac. Warn users to ignore robots.txt ERROR 404.
319 * bootstrap: Undo today's earlier change (logged below).
320 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
321
322 The gettext version checking is causing more trouble than it's
323 curing; remove it. Problem reported by Paul Hilfinger.
324
325 * bootstrap: Issue a warning that one can expect a message
326 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
327 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
328
329 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
330
331 Ensure that the C++ compiler used for testing actually works on a
332 simple test program; if not, skip the C++-related tests. Problem
333 reported by Vin Shelton in:
334 http://mail.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
335
336 * m4/cxx.m4: New file.
337 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
338 * tests/atlocal.in (BISON_CXX_WORKS): Add.
339 * tests/local.at (AT_COMPILE_CXX): Use it.
340
341 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
342
343 * data/glr.c (yylloc): Output this macro even if locations are not
344 being generated, as the GLR parser needs it even in that case.
345 Problem reported by Troy A. Johnson
346 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
347
348 * configure.ac (AC_INIT): Update to 1.875e.
349
350 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
351
352 * NEWS: Version 1.875d.
353 * configure.ac (AC_INIT): Likewise.
354 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
355
356 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
357 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
358 lalr1.cc runs afoul of the first, and the last two are no longer
359 supported by GCC 3.4.0.
360 * README: Mention GNU m4 1.4 or later; mention m4 patches.
361 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
362
363 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
364
365 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
366 unsigned int, for compatibility with latest gnulib hash module.
367 * src/state.c (state_hash, state_hasher): Likewise.
368 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
369 * src/uniqstr.c (hash_uniqstr): Likewise.
370
371 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
372
373 * NEWS: Unescaped newlines are no longer allowed in char & strings.
374
375 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
376 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
377 character and string literals.
378 (unexpected_end): New function.
379 (unexpected_eof): Use it.
380 (unexpected_newline): New function.
381 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
382 actions.
383
384 * NEWS: Document %expect-rr.
385
386 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
387 Fix typo by replacing $1 with $option.
388 Remove more 'intl'-related files.
389 Don't DEFUN AM_INTL_SUBDIR twice.
390
391 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
392 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
393 strtoul.c.
394 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
395 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
396 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
397 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
398 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
399 * src/.cvsignore: Add *.output.
400
401 * src/parse-gram.y: Put copyright notice inside %{ %} so it
402 gets copied to the output file.
403
404 2004-04-28 Paul Eggert <eggert@twinsun.com>
405
406 Get files from the gnulib and po repositories, instead of relying
407 on them being in our CVS. Upgrade to latest versions of gnulib
408 and Automake.
409
410 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
411 * bootstrap: Bootstrap from gnulib and po repositories.
412 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
413 * README-cvs: Document these changes. Remove version numbers from
414 mentions of build tools, since they change so often. Mention Flex.
415
416 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
417 (gl_USE_SYSTEM_EXTENSIONS): Add.
418 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
419 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
420 does this for us.
421 (AC_ISC_POSIX): Remove; we no longer support this
422 ancient OS, as it gets in the way of latest Autoconf & gnulib.
423 (AC_HEADER_STDC): Remove: we now assume C89 or better.
424 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
425 Do not check for C89 headers, except for locale.h which is used
426 by the Yacc library and must port to K&R hosts.
427 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
428 Do not check for C89 functions, except for setlocale which is
429 used by the Yacc library.
430 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
431 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
432 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
433 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
434 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
435 AM_GNU_GETTEXT): Remove; now done by:
436 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
437 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
438 for us.
439
440 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
441 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
442 Define to empty, as gnulib.mk will do the rest for us.
443 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
444 for us.
445 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
446 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
447
448 * src/files.c: Include gnulib's xstrndup.h.
449
450 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
451 (REALLOC): Use xnrealloc, for likewise.
452 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
453 (strnlen, memrchr): Remove decls; functions no longer used.
454 Include <stpcpy.h>.
455
456 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
457 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
458 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
459 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
460 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
461 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
462 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
463 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
464 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
465 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
466 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
467 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
468 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
469 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
470 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
471 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
472 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
473 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
474 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
475 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
476 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
477 Remove, as these files are now generated automatically
478 by bootstrap or automake.
479
480 * po/ChangeLog: Remove: all but one entry was a duplicate
481 of this file, and I moved that 2000-11-02 entry here.
482
483 * config/.cvsignore: Add Makefile, depcomp, install-sh.
484 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
485 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
486 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
487 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
488 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
489 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
490 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
491 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
492 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
493 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
494 xstrndup.h.
495 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
496 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
497 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
498 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
499 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
500 * src/.cvsignore: Remove *_.c.
501
502
503 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
504 support it. (The latest stable gzip doesn't.)
505
506 2004-04-27 Paul Eggert <eggert@twinsun.com>
507
508 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
509 case, as stos_ is now used by destructors due to the 2004-02-09
510 change.
511
512 Remove more K&R C support.
513 * lib/libiberty.y (PARAMS): Remove. All uses removed.
514 * lib/subpipe.c (errno): Remove decl.
515 Include <stdlib.h> unconditionally.
516 (EXIT_FAILURE): Remove macro.
517 * src/complain.c (vfprintf, strerror): Remove.
518 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
519 unconditionally.
520 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
521 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
522 (strchr, strspn, memchr): Remove decls.
523 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
524 unconditionally. Do not declare perror.
525 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
526 unconditionally.
527
528 * src/complain.c (_): Remove useless defn, as system.h defines this.
529
530 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
531 with latest obstack.h.
532 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
533 to procedure types, as obstack.h now does that for us.
534 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
535
536 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
537 so that this include file can stand alone.
538 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
539 does this now. Include subpipe.h first after config.h, to
540 test whether it can stand alone.
541
542 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
543 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
544 unused declaration.
545
546 * tests/synclines.at (%union synch line): Put a dummy member in
547 the union, because empty unions aren't allowed in C. Caught
548 by GCC 3.4.0.
549
550 2004-04-13 Jim Meyering <jim@meyering.net>
551
552 * src/conflicts.c (conflicts_print): Correct format string typo:
553 use `%%' to produce literal `%'. (trivial change)
554
555 2004-03-30 Paul Eggert <eggert@twinsun.com>
556
557 * src/getargs.c (version): Update copyright year to 2004.
558
559 * data/c.m4 (b4_int_type): Use 'short int' rather than
560 'short', and similarly for 'long', 'unsigned', etc.
561 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
562 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
563 yy_yypstack, yydumpstack): Likewise.
564 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
565 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
566 Likewise.
567 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
568 yy_stack_print, yyparse): Likewise.
569 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
570 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
571 * lib/bitset.c (bitset_print): Likewise.
572 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
573 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
574 * lib/bitsetv.c (bitsetv_dump): Likewise.
575 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
576 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
577 Likewise.
578 * src/LR0.c (allocate_itemsets): Likewise.
579 * src/gram.h (rule_number, rule): Likewise.
580 * src/lalr.h (goto_number): Likewise.
581 * src/nullable.c (nullable_compute): Likewise.
582 * src/output.c (prepare_rules): Likewise.
583 * src/relation.c (relation_print, relation_digraph): Likewise.
584 * src/relation.h (relation_node): Likewise.
585 * src/state.h (state_number, transitions, errs, reductions,
586 struct state): Likewise.
587 * src/symtab.h (symbol_number, struct symbol): Likewise.
588 * src/tables.c (vector_number, tally, action_number,
589 default_goto, goto_actions): Likewise.
590 * tests/existing.at (GNU Cim Grammar): Likewise.
591 * tests/regression.at (Web2c Actions): Likewise.
592
593 * src/output.c (muscle_insert_short_int_table): Renamed from
594 muscle_insert_short_table. All uses changed.
595
596 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
597
598 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
599 (declaration): Replace expected_conflicts with expected_sr_conflicts.
600 Add %expect-rr rule.
601
602 * src/scan-gram.l: Recognize %expect-rr.
603
604 * src/conflicts.h (expected_sr_conflicts): Rename from
605 expected_conflicts.
606 (expected_rr_conflicts): Declare.
607
608 * src/conflicts.c (expected_sr_conflicts): Rename from
609 expected_conflicts.
610 (expected_rr_conflicts): Define.
611 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
612 for GLR parsers.
613 Use expected_sr_conflicts in place of expected_conflicts.
614 Warn if expected_rr_conflicts used in non-GLR parser.
615
616 * doc/bison.texinfo: Add documentation for %expect-rr.
617
618 2004-03-08 Paul Eggert <eggert@gnu.org>
619
620 Add support for hex token numbers. Suggested by Odd Arild Olsen in
621 <http://mail.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
622
623 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
624 in lalr1.cc.
625 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
626 * src/scan-gram.l (scan_integer): New function.
627 ({int}): Use it.
628 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
629 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
630 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
631 Say "long int", not "long", for uniformity with GNU style.
632
633 2004-02-25 Paul Eggert <eggert@twinsun.com>
634
635 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
636 compilers. This fixes a problem with Intel's C++ compiler being
637 chatty, reported by Guido Trentalancia in
638 <http://mail.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
639
640 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
641
642 Support %destructor and merge error locations in lalr1.cc.
643
644 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
645 (Parser::stos_): Define unconditionally.
646 (Parser::destruct_): New method. Generate its body with
647 b4_yydestruct_generate.
648 (Parser::error_start_): New attribute.
649 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
650 token which are discarded.
651 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
652 error_start_ when erroneous token are discarded.
653 (Parser::parse) <yyerrlab1>: Compute the location of the error
654 token so that it covers all the discarded tokens.
655 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
656 it can be called with `%skeleton "lalr1.cc"', and do that.
657
658 2004-02-02 Paul Eggert <eggert@twinsun.com>
659
660 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
661 $(top_srcdir)/lib and ../lib. This fixes a bug reported
662 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
663 There's no need to mention top_builddir since Automake does that
664 for us.
665 (INCLUDES): Remove, as Automake says it's obsolescent.
666 Contents migrated into AM_CPPFLAGS as described above.
667 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
668
669 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
670
671 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
672 (yyreportSyntaxError): Handle case where lookahead token is
673 YYEMPTY.
674
675 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
676
677 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
678 resulting parsers are compilable with C++.
679
680 2003-12-23 Paul Eggert <eggert@twinsun.com>
681
682 * config/depcomp, config/install-sh: Sync with Automake 1.8.
683 * src/output.c (output_skeleton): Rename local var.
684 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
685 Bison tokens, as this runs afoul of the 2003-10-07 change that
686 disallowed NUL bytes in character constants or string literals.
687
688 * tests/local.at: Require Autoconf 2.59's Autotest.
689 * tests/testsuite.at: Don't include local.at, since we now assume
690 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
691 including it.
692 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
693 multiple inclusion warnings.
694
695 2003-12-02 Akim Demaille <akim@epita.fr>
696
697 * doc/bison.texinfo (How Can I Reset the Parser): More about start
698 conditions.
699 From Bruno Haible.
700
701 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
702
703 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
704
705 2003-10-07 Paul Eggert <eggert@twinsun.com>
706
707 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
708 if testsuite doesn't exist.
709
710 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
711 literals, unfortunately.
712 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
713 Complain about NUL bytes in character constants or string literals.
714
715 2003-10-05 Paul Eggert <eggert@twinsun.com>
716
717 * NEWS: Don't document %no-default-prec, as it's still
718 too experimental.
719 * doc/bison.texinfo: Document %no-default-prec only if
720 the defaultprec flag is set. Normally it's not.
721
722 2003-10-04 Paul Eggert <eggert@twinsun.com>
723
724 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
725 non-modifiable lvalue, instead of a modifiable one.
726 * doc/bison.texinfo (Actions): Document that $$ can
727 be assigned to. Do not claim that $$ and $N are
728 array element references: user code should not rely on this.
729
730 2003-10-01 Paul Eggert <eggert@twinsun.com>
731
732 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
733 (grammar_declaration): Use it.
734 * src/scan-gram.l: New token %no-default-prec.
735 * tests/conflicts.at: Revamp tests to use %no-default-prec.
736 * NEWS, doc/bison.texinfo: Document the above.
737
738 2003-10-01 Akim Demaille <akim@epita.fr>
739
740 VCG no longer supports long_straight_phase.
741
742 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
743 * src/print_graph.c (print_graph): Adjust.
744
745 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
746 and Paul Eggert <eggert@twinsun.com>
747
748 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
749 Table of Symbols): Document %default-prec.
750 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
751 (grammar_declaration): Set default_prec on %default-prec.
752 * src/scan-gram.l (%default-prec): New token.
753 * src/reader.h (default_prec): New flag.
754 * src/reader.c: Likewise.
755 (packgram): Handle it.
756 * tests/conflicts.at (%default-prec without %prec,
757 %default-prec with %prec, %default-prec 1): New tests.
758
759 2003-09-30 Paul Eggert <eggert@twinsun.com>
760
761 * tests/testsuite.at: Include local.at, not input.at, fixing
762 a typo in the 2003-08-25 patch.
763
764 2003-08-27 Akim Demaille <akim@epita.fr>
765
766 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
767 GCC warnings.
768
769 2003-08-26 Akim Demaille <akim@epita.fr>
770
771 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
772 "<\#" to avoid magic from Gnus when posting parts of this script.
773
774 2003-08-26 Akim Demaille <akim@epita.fr>
775
776 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
777 (Parser::parse): here.
778 Adjust: nerrs and errstatus is now replaced by...
779 (Parser::nerrs_, Parser::errstatus_): New.
780
781 2003-08-25 Akim Demaille <akim@epita.fr>
782
783 * config/announce-gen, Makefile.cfg: New.
784 * Makefile.am: Adjust.
785 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
786 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
787
788 2003-08-25 Akim Demaille <akim@epita.fr>
789
790 When reducing initial empty rules, Bison parser read an initial
791 location that is not defined. This results in garbage, and that
792 affects Bison's own parser. Therefore we need (i) to extend Bison
793 to support a means to initialize this location, and (ii) to use
794 this CVS Bison to fix CVS Bison's parser.
795
796 * src/reader.h, reader.c (epilogue_augment): Remove, replace
797 with...
798 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
799 * src/parse-gram.y: Adjust.
800 (%initial-action): New.
801 (%error-verbose): Since we require CVS Bison, there is no reason
802 not to use it.
803 * src/scan-gram.l: Adjust.
804 * src/Makefile.am (YACC): New, to make sure we use our own parser.
805 * data/yacc.c (yyparse): Use b4_initial_action.
806
807 2003-08-25 Akim Demaille <akim@epita.fr>
808
809 * doc/bison.texinfo: Don't promote stdout for error messages.
810
811 2003-08-25 Akim Demaille <akim@epita.fr>
812
813 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
814 From Alexandre Duret-Lutz.
815
816 2003-08-25 Akim Demaille <akim@epita.fr>
817
818 Version 1.875c.
819
820 2003-08-25 Akim Demaille <akim@epita.fr>
821
822 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
823 Use them.
824
825 2003-08-25 Akim Demaille <akim@epita.fr>
826
827 * data/lalr1.cc (Parser::reduce_print_): New.
828 Use it.
829
830 2003-08-25 Akim Demaille <akim@epita.fr>
831
832 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
833 error recovery loops. This patch is based on
834 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
835 Also, augment the similarity between lalr1.cc and yacc.c.
836 Note: the locations of error recovery rules are not correct yet.
837
838 * data/lalr1.cc: Comment changes to augment the similarity between
839 lalr1.cc and yacc.c.
840 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
841 (yyerrlab1): Remove, but where it used to be (now the bottom part of
842 yyerrlab), when hitting EOF, pop the whole stack here instead of
843 merely falling thru the default error handling mechanism.
844 (yyerrorlab): New label, with the old contents of YYERROR,
845 plus the following change: pop the stack of rhs corresponding
846 to the production that invoked YYERROR. That is how Yacc
847 behaves (required by POSIX).
848 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
849 fail.
850
851 2003-08-25 Akim Demaille <akim@epita.fr>
852
853 Tune local.at so that people can "autom4te -l autotest calc.at -o
854 calc" for instance, to extract a sub test suite.
855
856 * tests/testsuite.at: Move the initialization, Autotest version
857 requirement, and AT_TESTED invocation into...
858 * tests/local.at: here.
859 * tests/testsuite.at: Include it for compatibility with Autoconf
860 2.57.
861 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
862 be ignore.
863
864 2003-08-04 Paul Eggert <eggert@twinsun.com>
865
866 Rework code slightly to avoid gcc -Wtraditional warnings.
867 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
868 The returned value is now stored in *YY0. All callers changed.
869 * src/output.c (merge_output): Adjust to the above change.
870
871 2003-07-26 Paul Eggert <eggert@twinsun.com>
872
873 * data/glr.c (YYASSERT): New macro.
874 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
875 yyresolveStates, yyprocessOneStack):
876 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
877 Derived from a suggestion by Frank Heckenbach.
878
879 2003-07-25 Paul Eggert <eggert@twinsun.com>
880
881 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
882 for portability to K&R C (after ansi2knr, presumably). See
883 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
884 by Frank Heckenbach, though I have omitted the structure-initialization
885 part of his glr-knr.diff patch since I recall that the Portable
886 C Compiler didn't require that change.
887
888 Let the user specify how to allocate and free memory.
889 Derived from a suggestion by Frank Heckenbach in
890 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
891 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
892 All uses of free, malloc, realloc changed to use these macros,
893 and unnecessary casts removed.
894 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
895
896 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
897
898 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
899 use s.empty() rather than s == "" to test for empty string; see
900 <http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
901 (trivial change)
902
903 2003-06-25 Akim Demaille <akim@epita.fr>
904
905 * config/depcomp, config/install-sh: Update from masters.
906
907 2003-06-20 Paul Eggert <eggert@twinsun.com>
908
909 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
910 and return properly parenthesized result.
911 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
912 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
913 Remove unnecessary parentheses from uses.
914 * doc/bison.texinfo (Location Default Action): Describe the
915 conventions for parentheses.
916
917 2003-06-19 Paul Eggert <eggert@twinsun.com>
918
919 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
920 yyreportTree): Do not assume that size_t is the same width as int,
921 when printing sizes. Print sizes using an unsigned format.
922 Problem reported by Frank Heckenbach in
923 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
924
925 Port to Forte Developer 7 C compiler.
926 * data/glr.c (struct YYLTYPE): If locations are not being used,
927 declare a single dummy member, as empty structs do not conform
928 to the C standard.
929 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
930 the Forte Developer 7 C compiler complains that end-of-loop
931 code is not reached.
932
933 2003-06-17 Paul Eggert <eggert@twinsun.com>
934
935 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
936 avoid warnings from picky compilers about redefinition of PARAMS.
937
938 2003-06-17 Paul Eggert <eggert@twinsun.com>
939
940 Version 1.875b.
941
942 * NEWS: Document 1.875b.
943
944 * lib/bbitset.h: Do not include config.h; that's the includer's job.
945 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
946 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
947 Don't use 'index' in comments, as it's a builtin fn on some hosts.
948 * lib/bitset_stats.c: Include gettext.h unconditionally, as
949 per recent gettext manual's suggestion.
950 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
951 Use prototypes, not old-style definitions.
952 * lib/lbitset.c (lbitset_unused_clear): Likewise.
953 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
954 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
955 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
956 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
957 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
958 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
959 vbitset_or_and_cmp, vbitset_copy): Likewise.
960
961 * lib/libiberty.h: Do not include config.h; that's the includer's job.
962 Do not include <stdlib.h>.
963 (PARAMS): Define unconditionally for C89.
964 (ATTRIBUTE_NORETURN): Remove.
965 (ATTRIBUTE_UNUSED): Define unconditionally.
966
967 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
968 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
969 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
970 * lib/vbitset.c, lib/vbitset.h: New files.
971 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
972 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
973 from libbitset.
974
975 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
976 `How Can I Reset @code{yyparse}', since texinfo does not allow
977 arbitrary @ in node names.
978
979 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
980 shouldn't be needed according to the gettext 0.12.1 documentation
981 but which seem to be needed anyway: codeset.m4 glibc21.m4
982 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
983 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
984 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
985
986 * lib/.cvsignore: Add stdbool.h.
987 * m4/.cvsignore: Add nls.m4, po.m4.
988
989 Upgrade to CVS gnulib.
990 * stdbool_.h: File renamed from stdbool.h.in.
991 * configure.ac (AM_STDBOOL_H): Invoke this instead of
992 AC_HEADER_STDBOOL.
993 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
994 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
995 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
996 (MOSTLYCLEANFILES): New var.
997 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
998 (stdbool.h): New rule.
999 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
1000 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
1001 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
1002 m4/quote.m4: Upgrade to today's gnulib.
1003
1004 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
1005 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
1006 the tests right now.
1007 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
1008 yyerror are declared before use; C99 requires this.
1009
1010 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1011
1012 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
1013 first.
1014 (yyrecoverSyntaxError): Correct the logic for setting and testing
1015 yyerrState.
1016 Correct comment on handling EOF.
1017 Allow states with only a default reduction, rather than failing
1018 (I can't quite reconstruct why these were not allowed before).
1019
1020 Fixes to avoid problem that $-N rules in GLR parsers can cause
1021 buffer overruns, corrupting state.
1022
1023 * src/output.c (prepare_rules): Output max_left_semantic_context
1024 definition.
1025 * src/reader.h (max_left_semantic_context): New variable declaration.
1026 * src/scan-gram.l (max_left_semantic_context): Define.
1027 (handle_action_dollar): Update max_left_semantic_context.
1028 * data/glr.c (YYMAXLEFT): New definition.
1029 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
1030 (yyresolveAction): Ditto.
1031
1032 Fixes to problems with location handling in GLR parsers reported by
1033 Frank Heckenbach (2003/06/05).
1034
1035 * data/glr.c (YYLTYPE): Make trivial if locations not used.
1036 (YYRHSLOC): Add parentheses, and define only if locations used.
1037 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
1038 locations not used.
1039 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
1040 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
1041
1042 * tests/cxx-type.at: Exercise location information; update tests
1043 to differentiate output with and without locations.
1044 Remove forward declarations of yylex and yyerror---caused errors
1045 because default YYLTYPE not yet defined.
1046 Change semantic actions to compute strings, rather than printing
1047 them directly (to test proper passing of semantics values). Change
1048 output to prefix notation and update test data and expected results.
1049 (yylex): Track locations.
1050 (stmtMerge): Return value rather than printing, and include arguments
1051 in value.
1052
1053 2003-06-03 Paul Eggert <eggert@twinsun.com>
1054
1055 Avoid warnings generated by GCC 2.95.4 when Bison is
1056 configured with --enable-gcc-warnings.
1057 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
1058 yy::]b4_parser_class_name[::translate_,
1059 yy::Stack::operator[] (unsigned),
1060 yy::Stack::operator[] (unsigned) const,
1061 yy::Slice::operator[] (unsigned),
1062 yy::Slice::operator[] (unsigned) const):
1063 Rename local vars to avoid warnings.
1064 * tests/glr-regression.at (Improper handling of embedded actions
1065 and $-N in GLR parsers): Remove unused local variable from yylex.
1066 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
1067 (void) as arg when not pure, since we now assume C89 when building
1068 Bison. Pacify GCC by using parameter.
1069
1070 2003-06-02 Paul Eggert <eggert@twinsun.com>
1071
1072 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
1073 yy::Location::lines, yy::Location::columns): Rename arguments
1074 to avoid shadowing; this removes a warning generated by GCC 3.3.
1075
1076 2003-06-01 Paul Eggert <eggert@twinsun.com>
1077
1078 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
1079 to g++, as GCC 3.3 complains if you do it.
1080 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
1081 everything that WARNING_CFLAGS has, except omit warnings
1082 not suitable for C++.
1083 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
1084 * tests/atlocal.in (CXXFLAGS): New var.
1085 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
1086
1087 Fix a GLR parser bug I reported in February; see
1088 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
1089 The problem was that GLR parsers did not conform to the C standard,
1090 because actions like { $1 = $2 + $3; } expanded to expressions
1091 that invoked YYFILL in separate subexpressions, and YYFILL assigned
1092 to a local variable. The C standard says that expressions
1093 like (var = f ()) + (var = f ()) have undefined behavior.
1094 Another problem was that GCC sometimes issues warnings that
1095 yyfill and its parameters are unused.
1096
1097 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
1098 as possibly unused.
1099 (yyfill): New function.
1100 (YYFILL): Use it.
1101 (yyuserAction): Change type of yynormal to bool, so that it matches
1102 the new yyfill signature. Mark it as possibly unused.
1103
1104
1105 Follow up on a bug I reported in February, where a Bison-generated
1106 parser can loop. Provide a test case and a fix for yacc.c. I
1107 don't have a fix for lalr1.cc or for glr.c, unfortunately.
1108 The original bug report is in:
1109 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
1110
1111 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
1112 macro's size was becoming unwieldy.
1113 (yyerrlab): Do not discard an empty lookahead symbol, as this
1114 might destroy garbage.
1115 (yyerrorlab): New label, with the old contents of YYERROR,
1116 plus the following change: pop the stack of rhs corresponding
1117 to the production that invoked YYERROR. That is how Yacc
1118 behaves, and POSIX requires this behavior.
1119 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
1120 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
1121 Define 'alarm' to do nothing if unistd.h is not available.
1122 Add a new rule "exp: '-' error;" to test the above change to
1123 data/yacc.c. Use 'alarm' to abort any test taking longer than
1124 10 seconds, as it's probably looping.
1125 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
1126 Also, the new yacc.c generates two fewer diagnostics for an
1127 existing test.
1128
1129 2003-05-24 Paul Eggert <eggert@twinsun.com>
1130
1131 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
1132 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
1133 This fixes a problem reported by John Bowman when the Compaq/HP
1134 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
1135 -ansi -Wall -gall).
1136 * data/yacc.c (union yyalloc): Likewise.
1137 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
1138
1139 Switch from 'int' to 'bool' where that makes sense.
1140
1141 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
1142 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
1143 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
1144 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
1145 Return or accept bool, not int. All callers changed.
1146 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
1147 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
1148 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
1149 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
1150 bitset_or_and_cmp_): Likewise.
1151 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
1152 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
1153 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
1154 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
1155 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
1156 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
1157 bitset_stats_or_and_cmp): Likewise.
1158 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
1159 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
1160 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
1161 ebitset_xor_cmp): Likewise.
1162 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
1163 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
1164 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
1165 lbitset_xor_cmp): Likewise.
1166 * lib/bbitset.h: Include <stdbool.h>.
1167 (struct bitset_vtable): The following members now return bool, not
1168 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
1169 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
1170 or_and_cmp).
1171 * src/conflicts.c (count_rr_conflicts): Likewise.
1172 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
1173 All uses changed.
1174 * lib/ebitset.c (ebitset_obstack_init): Likewise.
1175 * lib/lbitset.c (lbitset_obstack_init): Likewise.
1176 * src/getargs.c (debug_flag, defines_flag, locations_flag,
1177 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
1178 graph_flag): Likewise.
1179 * src/getargs.h (debug_flag, defines_flag, locations_flag,
1180 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
1181 graph_flag): Likewise.
1182 * src/output.c (error_verbose): Likewise.
1183 * src/output.h (error_verbose): Likewise.
1184 * src/reader.c (start_flag, typed): Likewise.
1185 * src/reader.h (typed): Likewise.
1186 * src/getargs.c (LOCATIONS_OPTION): New constant.
1187 (long_options, getargs): Use it.
1188 * src/lalr.c (build_relations): Use bool, not int.
1189 * src/nullable.c (nullable_compute): Likewise.
1190 * src/print.c (print_reductions): Likewise.
1191 * src/tables.c (action_row, pack_vector): Likewise.
1192 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
1193 * src/output.c (prepare): Use it.
1194 * src/output.c (token_definitions_output,
1195 symbol_destructors_output, symbol_destructors_output): Use string,
1196 not boolean integer, to keep track of whether to output separator.
1197 * src/print_graph.c (print_core): Likewise.
1198 * src/state.c (state_rule_lookaheads_print): Likewise.
1199
1200 * config/install-sh: Sync from automake 1.7.5.
1201
1202 2003-05-14 Paul Eggert <eggert@twinsun.com>
1203
1204 * src/parse-gram.y (rules_or_grammar_declaration): Require a
1205 semicolon after a grammar declaration, in the interest of possible
1206 future changes to the Bison input language.
1207 Do not allow a stray semicolon at the start of the grammar.
1208 (rhses.1): Allow one or more semicolons after any rule, including
1209 just before "|" as required by POSIX.
1210 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
1211 grammar.
1212
1213 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
1214
1215 %parse-param support for lalr1.cc.
1216
1217 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
1218 b4_cc_constructor_calls, b4_cc_constructor_call,
1219 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
1220 definitions.
1221 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
1222 parse-param arguments.
1223 (yy::b4_parser_class_name): Declare instance variables to
1224 hold parse-param arguments.
1225 * tests/calc.at: s/value/semantic_value/ because value clashes
1226 with a member of yy::b4_parser_class_name. Adjust C++ code
1227 to handle %parse-param. Enable %parse-param test in C++.
1228
1229 2003-05-12 Paul Eggert <eggert@twinsun.com>
1230
1231 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
1232 English a bit. Fix fclose typo. Change "const char" to "char
1233 const", and use ANSI C rather than K&R for "main". Suggest
1234 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
1235 and suggest yy_switch_to_buffer.
1236
1237 2003-05-05 Paul Eggert <eggert@twinsun.com>
1238
1239 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
1240 C89. This avoids a diagnostic on compilers that define __STDC__
1241 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
1242 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
1243
1244 2003-05-03 Paul Eggert <eggert@twinsun.com>
1245
1246 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
1247 Do not overrun array bounds.
1248 This should fix a bug reported today by Olatunji Oluwabukunmi in
1249 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
1250
1251 2003-04-29 Akim Demaille <akim@epita.fr>
1252
1253 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
1254 * src/getargs.c, src/getargs.h: here, as bool, not int.
1255 (nondeterministic_parser): New.
1256 * src/parse-gram.y, src/scan-gram.l: Support
1257 %nondeterministic-parser.
1258 * src/output.c (prepare): Use nondeterministic_parser instead
1259 of glr_parser where appropriate.
1260 * src/tables.c (conflict_row, action_row, save_row)
1261 (token_actions, token_actions, pack_vector): Ditto.
1262
1263 2003-04-29 Akim Demaille <akim@epita.fr>
1264
1265 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
1266
1267 2003-04-29 Akim Demaille <akim@epita.fr>
1268
1269 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
1270 with %pure-parser and %locations to exercise the patch from Yakov
1271 Markovitch below.
1272
1273 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
1274
1275 * data/yacc.c: (b4_lex_param): Corrected for the case where
1276 %lex-param is provided and %pure-parser isn't.
1277
1278 2003-04-27 Paul Eggert <eggert@twinsun.com>
1279
1280 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
1281 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
1282 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
1283 if it is not defined.
1284 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
1285
1286 2003-04-26 Paul Eggert <eggert@twinsun.com>
1287
1288 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
1289 Declare to be of type suitable for the ninf value itself, not of
1290 type suitable for the corresponding table, since the latter might
1291 be unsigned but the ninf value might be negative. This fixes a
1292 bug reported by Alexandre Duret-Lutz in
1293 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
1294
1295 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
1296 invokes it. We shouldn't invoke it twice because it will attempt
1297 to put error.o in the archive twice. This fixes a glitch reported
1298 by Martin Mokrejs in
1299 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
1300
1301 2003-04-21 Paul Eggert <eggert@twinsun.com>
1302
1303 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
1304 to gnulib.
1305
1306 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
1307
1308 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
1309 Fix obvious typo that results in uncompilable GLR parsers
1310 when both %pure-parser and %locations are used. (trivial change)
1311
1312 2003-04-17 Paul Eggert <eggert@twinsun.com>
1313
1314 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
1315 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
1316 Do not insert the expected token via unput, as this runs afoul
1317 of a POSIX-compatibility bug in flex 2.5.31.
1318 All uses changed to BEGIN the parent state,
1319 since we no longer insert the expected token via unput.
1320 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
1321 that is no longer emitted after the above change.
1322
1323 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
1324 the first one. This change is from Paul Hilfinger, and it fixes
1325 regression reported by Werner Lemberg in
1326 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
1327
1328 (resolve_sr_conflict): Don't invoke state_errs_set
1329 unless one or more tokens have been explicitly made errors.
1330 Otherwise, the above change causes Bison to abort.
1331
1332 * tests/existing.at (GNU pic Grammar): New test case, taken from
1333 Lemberg's email.
1334
1335 2003-03-31 Akim Demaille <akim@epita.fr>
1336
1337 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
1338
1339 2003-03-31 Akim Demaille <akim@epita.fr>
1340
1341 * src/output.c (prepare_symbols): Avoid trailing spaces in the
1342 output.
1343
1344 2003-03-31 Akim Demaille <akim@epita.fr>
1345
1346 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
1347 From Paul Hilfinger.
1348
1349 2003-03-29 Akim Demaille <akim@epita.fr>
1350
1351 * m4/error.m4: Do not put under dynamic conditions some code which
1352 expansion is under static control.
1353
1354 2003-03-29 Akim Demaille <akim@epita.fr>
1355
1356 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
1357
1358 2003-03-29 Akim Demaille <akim@epita.fr>
1359
1360 * doc/bison.texinfo (Strings are Destroyed): New.
1361
1362 2003-03-13 Paul Eggert <eggert@twinsun.com>
1363
1364 * .cvsignore: Add configure.lineno.
1365 * src/.cvsignore: Add yacc.
1366 * tests/.cvsignore: Add testsuite.log.
1367 * doc/fdl.texi: Sync with latest FSF version.
1368
1369 2003-03-12 Paul Eggert <eggert@twinsun.com>
1370
1371 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
1372 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
1373 cursor, instead of leaving it undefined. This fixes a bug
1374 reported by Tim Van Holder in
1375 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
1376 * tests/input.at (Torturing the Scanner): Test the scanner on
1377 an empty input file, which was Tim Van Holder's test case.
1378
1379 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
1380 <sys/resource.h> can be included, include sys/time.h and
1381 sys/times.h first, if available. This works around the SunOS
1382 4.1.4 porting bug reported by Bruce Becker in
1383 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
1384
1385 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
1386 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
1387 AC_HEADER_SYS_WAIT.
1388
1389 Merge changes from gnulib. This was prompted because the CVS
1390 snapshot didn't build on Solaris 7 due to strnlen problems.
1391
1392 These changes need to be merged back into gnulib:
1393 * lib/hash.c: Include <stdbool.h> unconditionally.
1394 * m4/onceonly.m4 (m4_quote): New macro.
1395 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
1396 Quote AC_FOREACH variable-expansions properly.
1397 The 2003-01-03 obstack.h change also needs merging.
1398 {end of changes requiring merging}
1399
1400 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
1401 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
1402 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
1403 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
1404 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
1405 New files, imported from gnulib.
1406 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
1407 above.
1408
1409 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
1410 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
1411 gnulib sources.
1412
1413 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
1414 Add.
1415 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
1416 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
1417 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
1418 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
1419 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
1420 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
1421 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
1422 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
1423 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
1424 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
1425 (jm_PREREQ_ARGMATCH): Remove.
1426 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
1427 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
1428
1429 * src/system.h: Include <stdbool.h> unconditionally.
1430
1431 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
1432 assuming at least C89 in the bitset code for some time now.
1433
1434 2003-03-03 Akim Demaille <akim@epita.fr>
1435
1436 * ro.po: New.
1437
1438 2003-03-02 Akim Demaille <akim@epita.fr>
1439
1440 * doc/bison.texinfo (Table of Symbols): Reactivate the
1441 documentation for %lex-param, and %parse-param.
1442
1443 2003-03-02 Akim Demaille <akim@epita.fr>
1444
1445 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
1446 generate verbose error messages.
1447 Use the number of tokens as an upper bound in yytname, as it
1448 cannot be a non terminal.
1449
1450 2003-03-02 Akim Demaille <akim@epita.fr>
1451
1452 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
1453 message.
1454
1455 2003-03-02 Akim Demaille <akim@epita.fr>
1456
1457 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
1458 Use them to exercise yycheck overrun.
1459 Based on Andrew Suffield's grammar.
1460
1461 2003-03-02 Akim Demaille <akim@epita.fr>
1462
1463 Create tests/local.at for Bison generic testing macros.
1464
1465 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
1466 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
1467 This new file.
1468 * tests/calc.at (AT_CHECK_CALC): Adjust.
1469 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
1470 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
1471 * tests/local.at: here.
1472 (AT_COMPILE_CXX): Tags the tests using it as c++.
1473 Ignore the test if CXX is not functional.
1474
1475 2003-03-01 Paul Eggert <eggert@twinsun.com>
1476
1477 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
1478 not loc->end, since loc->end might contain garbage and this leads
1479 to undefined behavior on some platforms.
1480 (id_loc, token_start): Use (IF_LINTed) initial values that do not
1481 depend on *loc, so that the reader doesn't give the the false
1482 impression that *loc is initialized.
1483 (<INITIAL>"%%"): Do not bother setting code_start, since its value
1484 does not survive the return.
1485
1486 2003-03-01 Akim Demaille <akim@epita.fr>
1487
1488 * src/scan-gram.l (code_start): Always initialize it when entering
1489 into yylex, as SC_EPILOGUE is activated *before* the corresponding
1490 yylex invocation. An alternative would be making it static, but
1491 then it starts with the second %%'s beginning, instead of its end.
1492
1493 2003-02-28 Paul Eggert <eggert@twinsun.com>
1494
1495 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
1496 around a UnixWare 7.1.1 porting bug reported by John Hughes in
1497 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
1498
1499 2003-02-26 Paul Eggert <eggert@twinsun.com>
1500
1501 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
1502 Remove Sequent/Pyramid discussion (nobody uses them any more).
1503 Merge VMS and MS-DOS discussion; these ports may well be dead
1504 but let's keep mentioning them for now. Put <> around email
1505 addresses. Add copyright notice.
1506
1507 2003-02-24 Paul Eggert <eggert@twinsun.com>
1508
1509 * data/glr.c (yy_reduce_print): yylineno -> yylno,
1510 to avoid collision with flex use of yylineno.
1511 Problem reported by Bruce Lilly in
1512 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
1513 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1514 * data/yacc.c (yy_reduce_print): Likewise.
1515
1516 * config/depcomp: Sync with Automake 1.7.3.
1517
1518 2003-02-21 Akim Demaille <akim@epita.fr>
1519
1520 * data/lalr1.cc: Use temporary variables instead of casts to
1521 change integer types.
1522 Suggested by Paul Eggert.
1523
1524 2003-02-21 Akim Demaille <akim@epita.fr>
1525
1526 * doc/bison.texinfo: Use "location" consistently to refer to @n,
1527 to avoid confusions with lalr1.cc's notion of Position.
1528 Suggested by Paul Eggert.
1529
1530 2003-02-20 Akim Demaille <akim@epita.fr>
1531
1532 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
1533 before initial_columns.
1534 (location.hh): Use consistent variable names when defining the
1535 operator<<.
1536 Use "last" so that we subtract from Positions, not from unsigned.
1537
1538 2003-02-20 Akim Demaille <akim@epita.fr>
1539
1540 * data/lalr1.cc (position.hh): New subfile, including the extended
1541 and Doxygen'ed documentation of class Position.
1542 (location.hh): Use it.
1543 Document a` la Doxygen.
1544 With the help of Benoit Perrot.
1545
1546 2003-02-20 Akim Demaille <akim@epita.fr>
1547
1548 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
1549 AT_YACC_IF.
1550 Redefine AT_YYERROR_SEES_LOC_IF using it.
1551 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
1552 not defined.
1553 Don't use the location in yy::Parser::error_ and
1554 yy::Parser::print_ when not %locations.
1555 Activate more lalr1.cc tests.
1556
1557 2003-02-19 Akim Demaille <akim@epita.fr>
1558
1559 * data/lalr1.cc: When displaying a line number, be sure to make it
1560 an int.
1561
1562 2003-02-19 Akim Demaille <akim@epita.fr>
1563
1564 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
1565 Remove, useless.
1566 (YYABORT, YYACCEPT, YYERROR): New.
1567 * tests/calc.at: Renable the lalr1.cc test.
1568
1569 2003-02-19 Akim Demaille <akim@epita.fr>
1570
1571 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
1572 error recovery, mixing with/without pops and discarding of the
1573 lookahead.
1574 Exercise YYERROR.
1575 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
1576
1577 2003-02-17 Paul Eggert <eggert@twinsun.com>
1578
1579 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
1580 * tests/testsuite.at (AT_COMPILE): Use them.
1581 This fixes the testsuite problem reported by Robert Lentz in
1582 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
1583
1584 2003-02-12 Paul Eggert <eggert@twinsun.com>
1585
1586 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
1587 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
1588 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
1589 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
1590 Check for malloc failure, for consistency with yacc.c.
1591 (yytname_size): Remove, for consistency with yacc.c.
1592
1593 The bug still remains in data/lalr1.cc, as I didn't have time
1594 to fix it there.
1595
1596 2003-02-06 Akim Demaille <akim@epita.fr>
1597
1598 * configure.ac (GXX): Rename as...
1599 (CXX): this, to keep the original Autoconf semantics.
1600 Require 2.57.
1601 * data/lalr1.cc: Fix b4_copyright invocations.
1602 If YYDEBUG is not defined, don't depend upon name_ being defined.
1603 (location.hh): Include string and iostream.
1604 (Position::filename): New member.
1605 (Position::Position ()): New.
1606 (operator<< (Position)): New.
1607 (operator- (Position, int)): New.
1608 (Location::first, Location::last): Rename as...
1609 (Location::begin, Location::end): these, to mock the conventional
1610 iterator names.
1611 (operator<< (Location)): New.
1612 * tests/atlocal.in (CXX): New.
1613 * tests/testsuite.at (AT_COMPILE_CXX): New.
1614 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
1615 locations in a more synthetic way.
1616 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
1617 lalr1.cc is used.
1618 Adjust the C locations to match those from Emacs: first column is
1619 column 0.
1620 Change all the expected results.
1621 Conform to the GCS: simplify the locations when applicable.
1622 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
1623 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
1624 these CPP macros with the m4 macros new defined by...
1625 (AT_CHECK_PUSHDEFS): this, i.e.:
1626 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
1627 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
1628 New macros.
1629 (AT_CHECK_POPDEFS): Undefine them.
1630 (AT_CHECK_CALC_LALR1_CC): New.
1631 Use it for the first lalr1.cc test.
1632
1633 2003-02-04 Akim Demaille <akim@epita.fr>
1634
1635 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
1636 Location as is defined.
1637
1638 2003-02-04 Akim Demaille <akim@epita.fr>
1639
1640 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
1641 name_ being defined.
1642
1643 2003-02-03 Paul Eggert <eggert@twinsun.com>
1644
1645 * src/gram.h (start_symbol): Remove unused decl.
1646
1647 Use more-consistent naming conventions for local vars.
1648
1649 * src/derives.c (derives_compute): Change type of local var from
1650 int to rule_number.
1651 * src/gram.c (grammar_rules_partial_print): Likewise.
1652 * src/print.c (print_core): Likewise.
1653 * src/reduce.c (reduce_grammar_tables): Likewise.
1654
1655 * src/gram.c (grammar_dump): Change name of item_number *
1656 local var from r to rp.
1657 * src/nullable.c (nullable_compute): Likewise.
1658
1659 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
1660
1661 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
1662 for symbol or symbol_number var.
1663 * src/reader.c (grammar_start_symbol_set): Likewise.
1664 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
1665 Likewise.
1666 * src/state.c (transitions_to): Likewise.
1667 * src/state.h: Likewise.
1668 * src/tables.c (symbol_number_to_vector_number): Likewise.
1669
1670 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
1671 char * var.
1672
1673 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
1674 var.
1675
1676 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
1677 var.
1678
1679 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
1680 Use str, not s, for char * var. Use ch, not c, for character var.
1681 Use size for size var.
1682
1683 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
1684 char * var.
1685 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
1686 uniqstr var.
1687 * src/uniqstr.h: Likewise.
1688
1689 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1690 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1691 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
1692 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
1693 param to have same name as that of enum, so that we don't use
1694 "s" to stand for a non-state.
1695
1696 2003-02-02 Akim Demaille <akim@epita.fr>
1697
1698 * src/scan-skel.l: Scan more than one inert character per yylex
1699 invocation.
1700
1701 2003-02-01 Paul Eggert <eggert@twinsun.com>
1702
1703 Version 1.875a.
1704
1705 * po/LINGUAS: Add ms.
1706
1707 2003-01-30 Akim Demaille <akim@epita.fr>
1708
1709 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
1710
1711 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1712
1713 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
1714 of $1.
1715
1716 Changes in response to error report by S. Eken: GLR mode does not
1717 handle negative $ indices or $ indices in embedded rules correctly.
1718 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
1719
1720 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
1721 (b4_rhs_location): Ditto.
1722 (yyfill): New function to copy from stack tree into array
1723 incrementally.
1724 (yyuserAction): Modify to allow incremental move of semantic values
1725 to rhs array when in GLR mode.
1726 Define YYFILL to use in user-defined actions to fill semantic array
1727 as needed.
1728 Remove dummy use of yystack, as there is now a guaranteed use.
1729 (yydoAction): Modify to allow incremental move of semantic values
1730 to rhs array when in GLR mode.
1731 (yyresolveAction): Ditto.
1732 (yyglrShiftDefer): Update comment.
1733 (yyresolveStates): Use X == NULL for pointers, not !X.
1734 (yyglrReduce): Ditto.
1735 (yydoAction): Ditto
1736
1737 * tests/glr-regr1.at: Rename to ...
1738 * tests/glr-regression.at: Add new regression test for the problems
1739 described above (adapted from S. Eken).
1740 Update copyright notice.
1741 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
1742 * tests/Makefile.am: Ditto.
1743
1744 2003-01-28 Paul Eggert <eggert@twinsun.com>
1745
1746 * data/lalr1.cc: Do not use @output_header_name@ unless
1747 b4_defines_flag is set. This fixes two bugs reported by
1748 Tim Van Holder in
1749 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
1750 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
1751
1752 2003-01-21 Paul Eggert <eggert@twinsun.com>
1753
1754 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
1755 we don't need to worry about yyerrlab1 being reported as an
1756 "unused label" by non-GCC C compilers. The downside is that if
1757 locations are used then a couple of statements are duplicated each
1758 time YYERROR is invoked, but the upside is that the warnings
1759 should vanish.
1760 (yyerrlab1): Move code to YERROR.
1761 (yyerrlab2): Remove. Change uses back to yyerrlab1.
1762 This reverts some of the 2002-12-27 change.
1763
1764 2003-01-17 Paul Eggert <eggert@twinsun.com>
1765
1766 * src/output.c (symbol_printers_output): Fix typo that led
1767 to core dump. Problem reported by Antonio Rus in
1768 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
1769
1770 2003-01-13 Akim Demaille <akim@epita.fr>,
1771 Quoc Peyrot <chojin@lrde.epita.fr>,
1772 Robert Anisko <anisko_r@lrde.epita.fr>
1773
1774 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
1775 when the stacks contain one element, as the loop would otherwise
1776 free the last state, and then use the top state (the one we just
1777 popped). This means that the initial elements will not be freed
1778 explicitly, as is the case in yacc.c; it is not a problem, as
1779 these elements have fake values.
1780
1781 2003-01-11 Paul Eggert <eggert@twinsun.com>
1782
1783 * NEWS: %expect-violations are now just warnings, reverting
1784 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
1785 bootstrapping problem reported by Matthias Klose; see
1786 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
1787 * src/conflicts.c (conflicts_print): Likewise.
1788 * tests/conflicts.at (%expect not enough, %expect too much,
1789 %expect with reduce conflicts): Likewise.
1790 * doc/bison.texinfo (Expect Decl): Document this. Also mention
1791 that the warning is enabled if the number of conflicts changes
1792 (not necessarily increases).
1793
1794 * src/getargs.c (version): Update copyright year.
1795
1796 2003-01-09 Akim Demaille <akim@epita.fr>
1797
1798 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
1799
1800 2003-01-08 Paul Eggert <eggert@twinsun.com>
1801
1802 * Makefile.maint (WGETFLAGS):
1803 New macro, containing "-C off" to disable proxy caches.
1804 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
1805 (rel-check): Use $(WGET) instead of wget.
1806
1807 2003-01-06 Paul Eggert <eggert@twinsun.com>
1808
1809 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
1810 the GLR paper of Scott, Johnstone and Hussain.
1811
1812 2003-01-04 Paul Eggert <eggert@twinsun.com>
1813
1814 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
1815 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
1816 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
1817 (EXTRA_LIBRARIES): New var, for liby.a.
1818 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
1819 (EXTRA_SCRIPTS): New var, for yacc.
1820
1821 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
1822 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
1823 Problem reported by Nelson H. F. Beebe.
1824
1825 2003-01-03 Paul Eggert <eggert@twinsun.com>
1826
1827 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
1828 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1829 when compiling Bison 1.875's `bitset bset = obstack_alloc
1830 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
1831
1832 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
1833 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
1834 grow to a huge size with typical invocation.
1835
1836 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
1837 Use the pattern recommended by Autoconf 2.57, except also protect
1838 against double-definition.
1839 * src/system.h: Likewise.
1840 Portability issues reported by Nelson H. F. Beebe.
1841
1842 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
1843 All uses changed. Provide a definition in both C and C++.
1844 (yytrue, yyfalse): Define even if defined (__cplusplus).
1845
1846 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
1847 Reported by Nelson H. F. Beebe.
1848
1849 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
1850
1851 2003-01-02 Paul Eggert <eggert@twinsun.com>
1852
1853 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
1854 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
1855 Bug reported by Nelson H. F. Beebe.
1856
1857 2003-01-01 Paul Eggert <eggert@twinsun.com>
1858
1859 * Version 1.875.
1860
1861 2002-12-30 Paul Eggert <eggert@twinsun.com>
1862
1863 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
1864 Moved here from...
1865 (<INITIAL>","): Here. This causes stray "," to be treated
1866 more uniformly.
1867
1868 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
1869 last brace in braced code when not in Yacc mode, for compatibility
1870 with Bison 1.35. This resurrects the 2001-12-15 patch to
1871 src/reader.c.
1872
1873 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
1874 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
1875
1876 2002-12-28 Paul Eggert <eggert@twinsun.com>
1877
1878 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
1879 that of SYM's type. This fixes Debian bug 168069, reported by
1880 Thomas Olsson.
1881
1882 2002-12-28 Paul Eggert <eggert@twinsun.com>
1883
1884 Version 1.75f.
1885
1886 Switch back to the Yacc style of conflict reports, undoing some
1887 of the 2002-07-30 change.
1888 * doc/bison.texinfo (Understanding): Use Yacc style for
1889 conflict reports. Also, use new way of locating rules.
1890 * src/conflicts.c (conflict_report):
1891 Renamed from conflict_report_yacc, removing the old
1892 'conflict_report'. Translate the entire conflict report at once,
1893 so that we don't assume that "," has the same interpretation in
1894 all languages.
1895 (conflicts_output): Use Yacc-style conflict report for each state,
1896 instead of our more-complicated style.
1897 (conflicts_print): Use Yacc-style conflict report, except print
1898 the input file name when not emulating Yacc.
1899 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
1900 Conflicted Reduction, %expect not enough, %expect too much,
1901 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
1902 * tests/existing.at (GNU Cim Grammar): Likewise.
1903 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
1904
1905 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
1906 fatal): Don't invoke fflush; it's not needed and it might even be
1907 harmful for stdout, as stdout might not be open.
1908 * src/reduce.c (reduce_print): Likewise.
1909
1910 2002-12-27 Paul Eggert <eggert@twinsun.com>
1911
1912 Fix a bug where error locations were not being recorded correctly.
1913 This problem was originally reported by Paul Hilfinger in
1914 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
1915
1916 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1917 top of the location stack's error locations.
1918 (yyerrlab): Set it. When discarding a token, push its location
1919 onto yylerrsp so that we don't lose track of the error's end.
1920 (yyerrlab1): Now is only the target of YYERROR, so that we can
1921 properly record the location of the action that failed. For GCC
1922 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1923 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1924 (yyerrlab2): New label, which yyerrlab now falls through to.
1925 Compute the error's location by applying YYLLOC_DEFAULT to
1926 the locations of all the symbols that went into the error.
1927 * doc/bison.texinfo (Location Default Action): Mention that
1928 YYLLOC_DEFAULT is also invoked for syntax errors.
1929 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1930 Error locations include the locations of all the tokens that were
1931 discarded, not just the last token.
1932
1933 2002-12-26 Paul Eggert <eggert@twinsun.com>
1934
1935 * src/files.c: Include quote.h.
1936 (compute_output_file_names): Warn if we detect conflicting
1937 outputs to the same file. This should catch the misunderstanding
1938 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1939
1940 * src/conflicts.c (conflicts_print): If the user specifies
1941 "%expect N", report an error if there are any reduce/reduce
1942 conflicts. This is what the manual says should happen.
1943 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1944 * tests/conflicts.at (%expect with reduce conflicts): New test.
1945
1946 Don't use m4_include on relative file names, as it doesn't work as
1947 desired if there happens to be a file with that name under ".".
1948
1949 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1950 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1951 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1952 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1953 * src/output.c (output_skeleton): Use full path names when
1954 specifying a file to include; don't rely on include path, as
1955 it's unreliable when the working file contains a file with
1956 that name.
1957
1958 2002-12-25 Paul Eggert <eggert@twinsun.com>
1959
1960 Remove obsolete references to bison.simple and bison.hairy.
1961 Problem mentioned by Aubin Mahe in
1962 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
1963 * data/glr.c: Comment fix.
1964 * doc/bison.1: Remove references. Also, mention "yacc".
1965
1966 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1967 with -g option.
1968
1969 * src/parse-gram.y (declaration): Use enum "report_states" rather
1970 than its numeric value 1.
1971
1972 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1973 opening a new one. This fixes Debian bug 165349, reported by
1974 Bruce Stephens.
1975
1976 2002-12-24 Paul Eggert <eggert@twinsun.com>
1977
1978 Version 1.75e.
1979
1980 * Makefile.maint (cvs-update): Don't assume that the shell
1981 supports $(...), as Solaris sh doesn't.
1982
1983 * src/parse-gram.y (lloc_default): Remove test for empty
1984 nonterminals at the end, since it didn't change the result.
1985
1986 2002-12-24 Paul Eggert <eggert@twinsun.com>
1987
1988 If the user does not define YYSTYPE as a macro, Bison now declares it
1989 using typedef instead of defining it as a macro. POSIX requires this.
1990 For consistency, YYLTYPE is also declared instead of defined.
1991
1992 %union directives can now have a tag before the `{', e.g., the
1993 directive `%union foo {...}' now generates the C code
1994 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1995 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1996 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1997 instead of `yyltype'.
1998
1999 `yystype' and `yyltype' are now obsolescent macros instead of being
2000 typedefs or tags; they are no longer documented and will be
2001 withdrawn in a future release.
2002
2003 * data/glr.c (b4_location_type): Remove.
2004 (YYSTYPE): Renamed from yystype.
2005 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
2006 (struct YYLTYPE): Renamed from struct yyltype.
2007 (YYLTYPE): Renamed from yyltype.
2008 (yyltype, yystype): New (and obsolescent) macros,
2009 for backward compatibility.
2010 * data/yacc.c: Likewise.
2011
2012 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
2013 does not specify a union tag. This is for compatibility with
2014 Solaris 9 yacc.
2015
2016 * src/parse-gram.y (add_param): 2nd arg is now char * not char
2017 const *, since it is now modified by stripping surrounding { }.
2018 (current_braced_code): Remove.
2019 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
2020 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
2021 trailing " {...}". Now of type <chars>.
2022 (grammar_declaration): Adjust to bundled tokens.
2023 (code_content): Remove; stripping is now done by add_param.
2024 (print_token_value): Print contents of bundled tokens.
2025 (token_name): New function.
2026
2027 * src/reader.h (braced_code, current_braced_code): Remove.
2028 (token_name): New decl.
2029
2030 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
2031 token_type, not braced_code code_kind. All uses changed.
2032 (SC_PRE_CODE): New state, for scanning after a keyword that
2033 has (or usually has) an immediately-following braced code.
2034 (token_type): New local var, to keep track of which token type
2035 to return when scanning braced code.
2036 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
2037 <INITIAL>"%parse-param", <INITIAL>"%printer",
2038 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
2039 instead of returning a token type immediately.
2040 (<INITIAL>"{"): Set token type.
2041 (<SC_BRACED_CODE>"}"): Use it.
2042 (handle_action_dollar, handle_action_at): Now returns bool
2043 indicating success. Fail if ! current_rule; this prevents a core dump.
2044 (handle_symbol_code_dollar, handle_symbol_code_at):
2045 Remove; merge body into caller.
2046 (handle_dollar, handle_at): Complain in invalid contexts.
2047
2048 * NEWS, doc/bison.texinfo: Document the above.
2049 * NEWS: Fix years and program names in copyright notice.
2050
2051 2002-12-17 Paul Eggert <eggert@twinsun.com>
2052
2053 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
2054 Reporting, Table of Symbols): Omit mentions of %lex-param and
2055 %parse-param from the documentation for now.
2056
2057 2002-12-15 Paul Eggert <eggert@twinsun.com>
2058
2059 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
2060 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
2061 lookahead symbol, and which sets yychar in parser actions) and it
2062 disagreed with the Bison documentation. Bug
2063 reported by Andrew Walrond.
2064
2065 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
2066 as the caller now does that.
2067 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
2068 (YYEMPTY): Parenthesize right hand side, since others use it.
2069 (yyparse): Don't assume that our generated code is the only code
2070 that sets yychar.
2071
2072 2002-12-13 Paul Eggert <eggert@twinsun.com>
2073
2074 Version 1.75d.
2075
2076 POSIX requires a "yacc" command.
2077 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
2078 (MOSTLYCLEANFILES): Add yacc.
2079 (yacc): New rule.
2080 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
2081 as an alias for bison y.
2082
2083 * po/LINGUAS: Add da.
2084
2085 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
2086 problem with latest <getopt.h>.
2087 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
2088
2089 * doc/fdl.texi: Upgrade to 1.2.
2090 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
2091 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
2092 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
2093 gnulib.
2094 * config/install-sh: Sync with autotools.
2095
2096 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
2097 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
2098 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
2099 locations are requested.
2100 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
2101 locations are requested.
2102
2103 2002-12-12 Paul Eggert <eggert@twinsun.com>
2104
2105 Remove unportable casts and storage allocation tricks.
2106 While we're at it, remove almost all casts, since they
2107 usually aren't needed and are a sign of trouble.
2108
2109 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
2110
2111 * src/derives.c (derives_compute): Do not subtract NTOKENS from
2112 the pointer DSET returned by malloc; this isn't portable.
2113 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
2114 Similarly for DERIVES.
2115 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
2116 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
2117 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
2118
2119 * src/derives.c (derives_compute): Do not bother invoking
2120 int_of_rule_number, since rule numbers are integers.
2121
2122 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
2123 rather than XMALLOC (char, N).
2124
2125 * src/files.c (filename_split): Rewrite to avoid cast.
2126
2127 * src/gram.h (symbol_number_as_item_number,
2128 item_number_as_symbol_number, rule_number_as_item_number,
2129 item_number_as_rule_number):
2130 Now inline functions rather than macros, to avoid casts.
2131 * src/state.h (state_number_as_int): Likewise.
2132 * src/tables.c (state_number_to_vector_number,
2133 symbol_number_to_vector_number): Likewise.
2134
2135 * src/gram.h (int_of_rule_number): Remove; no longer used.
2136
2137 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
2138 since the resulting storage is always stored into.
2139
2140 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
2141 where it's needed.
2142
2143 * src/muscle_tab.c (muscle_m4_output):
2144 Now inline. Return bool, not int.
2145 * src/state.c (state_compare): Likewise.
2146 * src/symtab.c (symbol_check_defined,
2147 symbol_check_alias_consistency, symbol_pack, symbol_translation,
2148 hash_compare_symbol, hash_symbol):
2149 Likewise.
2150 * src/uniqstr.c (uniqstr_print): Likewise.
2151 * src/muscle_tab.c (muscle_m4_output_processor):
2152 New function, to avoid casts.
2153 * src/state.c (state_comparator, stage_hasher): Likewise.
2154 * src/symtab.c (symbol_check_defined_processor,
2155 symbol_check_alias_consistency_processor, symbol_pack_processor,
2156 symbol_translation_processor, hash_symbol_comparator,
2157 hash_symbol_hasher): Likewise.
2158 * src/uniqstr.c (uniqstr_print_processor): Likewise.
2159 * src/muscle_tab.c (muscles_m4_output):
2160 Use new functions instead of casting old functions unportably.
2161 * src/state.c (state_hash_new): Likewise.
2162 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
2163 symbols_token_translations_init):
2164 Likewise.
2165 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
2166
2167 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
2168 var instead of casting to long, to avoid casts.
2169 (prepare_states): Use MALLOC rather than alloca, so that we don't
2170 have to worry about alloca.
2171 * src/state.c (state_hash_lookup): Likewise.
2172
2173 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
2174 local var instead of casting to unsigned char, to avoid casts.
2175
2176 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
2177 STATE_ALLOC): Remove.
2178 (transitions_new, errs_new, reductions_new, state_new): Use malloc
2179 rather than calloc, and use offsetof to avoid allocating slightly
2180 too much storage.
2181 (state_new): Initialize all members.
2182
2183 * src/state.c (state_hash): Use unsigned accumulator, not signed.
2184
2185 * src/symtab.c (symbol_free): Remove; unused.
2186 (symbol_get): Remove cast in lhs of assignment.
2187 (symbols_do): Now static. Accept generic arguments, not
2188 hashing-related ones.
2189
2190 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
2191 (symbol_processor): Remove.
2192 (symbols_do): Remove decl; now static.
2193
2194 * src/system.h (alloca): Remove; decl no longer needed.
2195 (<stddef.h>): Include, for offsetof.
2196 (<inttypes.>, <stdint.h>): Include if available.
2197 (uintptr_t): New type, if system lacks it.
2198 (CALLOC, MALLOC, REALLOC): New macros.
2199 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
2200 new macros.
2201
2202 * src/tables.c (table_size): Now int, to pacify GCC.
2203 (table_grow, table_ninf_remap): Use signed table size.
2204 (save_row): Don't bother initializing locals when not needed.
2205 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
2206 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
2207
2208 * src/vcg.h: Correct misspellings.
2209
2210 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
2211
2212
2213 * src/getargs.c (getargs): Don't assume EOF == -1.
2214
2215 2002-12-09 Paul Eggert <eggert@twinsun.com>
2216
2217 Change identifier spellings to avoid collisions with names
2218 that are reserved by POSIX.
2219
2220 Don't use names ending in _t, since POSIX reserves them.
2221 For consistency, remove _e and _s endings -- they're weren't
2222 needed to remove ambiguity. All uses changed.
2223 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
2224 turn was just renamed from struniq_t.
2225 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
2226 which in turn was just renamed from struniq_processor_t.
2227 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
2228 in turn was renamed from hash_compare_struniq_t.
2229 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
2230 (state_list): Renamed from state_list_t.
2231 * src/assoc.h (assoc): Renamed from assoc_t.
2232 * src/conflicts.c (enum conflict_resolution): Renamed from
2233 enum conflict_resolution_e.
2234 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
2235 (rule_list): Renamed from rule_list_t.
2236 * src/getargs.h (enum trace): Renamed from enum trace_e.
2237 (enum report): Renamed from enum report_e.
2238 * src/gram.h (item_number): Renamed from item_number_t.
2239 (rule_number): Renamed from rule_number_t.
2240 (struct rule_s): Remove the "rule_s" part; not used.
2241 (rule): Renamed from rule_t.
2242 (rule_filter): Renamed from rule_filter_t.
2243 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
2244 (goto_list): Renamed from goto_list_t.
2245 * src/lalr.h (goto_number): Renamed from goto_number_t.
2246 * src/location.h (location): Renamed from location_t.
2247 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
2248 and moved here from:
2249 * src/muscle_tab.h (muscle_entry_t): here.
2250 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
2251 (rule_list): Renamed from rule_list_t.
2252 * src/print_graph.c (static_graph): Renamed from graph.
2253 * src/reader.h (braced_code): Renamed from braced_code_t.
2254 Remove brace_code_e tag.
2255 * src/relation.h (relation_node): Renamed from relation_node_t.
2256 (relation_nodes): Renamed from relation_nodes_t.
2257 (relation): Renamed from relation_t.
2258 * src/state.h (state_number): Renamed from state_number_t.
2259 (struct state): Renamed from struct state_s.
2260 (state): Renamed from state_t.
2261 (transitions): Renamed from transitions_t. Unused (and
2262 misspelled) transtion_s tag removed.
2263 (errs): Renamed from errs_t. Unused errs_s tag removed.
2264 (reductions): Renamed from reductions_t. Unused tag
2265 reductions_s removed.
2266 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
2267 (struct symbol_list): Renamed from struct symbol_list_s.
2268 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
2269 (struct symbol): Renamed from struct symbol_s.
2270 (symbol): Renamed from symbol_t.
2271 * src/tables.c (vector_number): Renamed from vector_number_t.
2272 (action_number): Renamed from action_t.
2273 * src/tables.h (base_number): Renamed from base_t.
2274 * src/vcg.h (enum color): Renamed from enum color_e.
2275 (enum textmode): Renamed from enum textmode_e.
2276 (enum shape): Renamed from enum shape_e.
2277 (struct colorentry): Renamed from struct colorentry_s.
2278 (struct classname): Renamed from struct classname_s.
2279 (struct infoname): Renamed from struct infoname_s.
2280 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
2281 (enum decision): Renamed from enum decision_e.
2282 (enum orientation): Renamed from enum orientation_e.
2283 (enum alignment): Renamed from enum alignment_e.
2284 (enum arrow_mode): Renamed from enum arrow_mode_e.
2285 (enum crossing_type): Renamed from enum crossing_type_e.
2286 (enum view): Renamed from enum view_e.
2287 (struct node): Renamed from struct node_s.
2288 (node): Renamed from node_t.
2289 (enum linestyle): Renamed from enum linestyle_e.
2290 (enum arrowstyle): Renamed from enum arrowstyle_e.
2291 (struct edge): Renamed from struct edge.
2292 (edge): Renamed from edge_t.
2293 (struct graph): Renamed from struct graph_s.
2294 (graph): Renamed from graph_t.
2295 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
2296 Rename value_t -> value.
2297 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
2298 value_t_as_yystype -> value_as_yystype.
2299
2300 Don't include <errno.h> in the mainstream code, since it
2301 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
2302 * lib/get-errno.c, lib/get-errno.h: New files.
2303 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
2304 get-errno.c.
2305 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
2306 * src/output.c (output_skeleton): Likewise.
2307 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
2308 instead of errno.
2309 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
2310 Likewise.
2311 (handle_action_dollar, handle_action_at): Likewise.
2312 * src/system.h: Do not include <errno.h>.
2313 (TAB_EXT): Renamed from EXT_TAB.
2314 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
2315
2316 Avoid str[a-z]*, since <string.h> reserves that name space.
2317 Change all instances of "struniq" in names to "uniqstr", and
2318 likewise for "STRUNIQ" and "UNIQSTR".
2319 * src/uniqstr.c: Renamed from src/struniq.c.
2320 * src/uniqstr.h: Renamed from src/struniq.h.
2321 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
2322 * src/files.c (strsuffix): Remove; unused.
2323 (concat2): Renamed from stringappend. Now static.
2324 * src/files.h (strsuffix, stringappend): Remove; unused.
2325 * src/parse-gram.y (<chars>): Renamed from <string>.
2326 (<uniqstr>): Renamed from <struniq>.
2327 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
2328 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
2329 (struct graph_s.expand): Renamed from struct graph_s.stretch.
2330 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
2331 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
2332 (N_EXPAND): Renamed from N_STRETCH.
2333
2334 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
2335 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
2336 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
2337 Remove; unused.
2338 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
2339 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
2340 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
2341 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
2342 (BASE_MAXIMUM): Renamed from BASE_MAX.
2343 (BASE_MINIMUM): Renamed from BASE_MIN.
2344 (ACTION_MAX): Remove; unused.
2345 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
2346 Unnecessary casts removed from above defines.
2347
2348
2349 Fix misspelling in names.
2350 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
2351 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
2352 G_NODE_ALIGNEMENT.
2353
2354
2355 * lib/timevar.c (timevar_report): Renamed from time_report,
2356 for consistency with other names.
2357 * lib/timevar.h (timevar_report): New decl.
2358 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
2359
2360
2361 Sort include-file uses.
2362
2363 Reorder all include files under src to be in the order "system.h".
2364 then the ../lib include files in angle brackets (alphabetized),
2365 then the . include files in double-quotes (alphabetized). Fix
2366 dependency breakages encountered in this process, as follows:
2367 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
2368 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
2369 * src/state.h: Include "symtab.h".
2370
2371 2002-12-08 Paul Eggert <eggert@twinsun.com>
2372
2373 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
2374 since this causes problems when __file__ contains character
2375 sequences like "@" that are treated specially by src/scan-skel.l.
2376 Instead, just use the file's basename. This fixes the bug
2377 reported by Martin Mokrejs in
2378 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
2379
2380 2002-12-06 Paul Eggert <eggert@twinsun.com>
2381
2382 Add support for rules that do not have trailing semicolons, as
2383 POSIX requires. Improve the quality of locations in Bison
2384 diagnostics.
2385
2386 * src/location.c: Include <quotearg.h>.
2387 (empty_location): Now const.
2388 (location_print): New function. Follow the recommendation of the
2389 GNU Coding Standards for locations that span file boundaries.
2390 * src/location.h: Do not include <quotearg.h>; no longer needed.
2391 (boundary): New type.
2392 (location_t): Use it. This allows locations to span file boundaries.
2393 All member uses changed: file -> start.file or end.file (as needed),
2394 first_line -> start.line, first_column -> start.column,
2395 last_line -> end.line, last_column -> end.column.
2396 (equal_boundaries): New function.
2397 (LOCATION_RESET, LOCATION_STEP): Remove.
2398 (LOCATION_PRINT): Remove. All callers changed to use location_print.
2399 (empty_location): Now const.
2400 (location_print): New decl.
2401 * src/parse-gram.y (lloc_default): New function, which handles
2402 empty locations more accurately.
2403 (YYLLOC_DEFAULT): Use it.
2404 (%token COLON): Remove.
2405 (%token ID_COLON): New token.
2406 (rules): Use it.
2407 (declarations, rules): Remove trailing semicolon.
2408 (declaration, rules_or_grammar_declaration):
2409 Allow empty (";") declaration.
2410 (symbol_def): Remove empty actions; no longer needed.
2411 (rules_or_grammar_declaration): Remove trailing semicolon.
2412 (semi_colon.opt): Remove.
2413 * src/reader.h: Include location.h.
2414 (scanner_cursor): New decl.
2415 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
2416 rolling our own.
2417 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
2418 of *loc.
2419 (STEP): Remove. No longer needed, now that adjust_location does
2420 the work. All uses removed.
2421 (scanner_cursor): New var.
2422 (adjust_location): Renamed from extend_location. It now sets
2423 *loc and adjusts the scanner cursor. All uses changed.
2424 Don't bother testing for CR.
2425 (handle_syncline): Remove location arg; now updates scanner cursor.
2426 All callers changed.
2427 (unexpected_end_of_file): Now accepts start boundary of token or
2428 comment, not location. All callers changed. Update scanner cursor,
2429 not the location.
2430 (SC_AFTER_IDENTIFIER): New state.
2431 (context_state): Renamed from c_context. All uses changed.
2432 (id_loc, code_start, token_start): New local vars.
2433 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
2434 processing of Yacc white space and equivalents here.
2435 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
2436 instead of returning ID immediately, since we need to search for
2437 a subsequent colon.
2438 (<INITIAL>"'", "\""): Save token_start.
2439 (<INITIAL>"%{", "{", "%%"): Save code_start.
2440 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
2441 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
2442 BEGIN context_state at end, not INITIAL.
2443 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
2444 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
2445 Return correct token start.
2446 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
2447 the start of a character, string or multiline comment is found.
2448 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
2449 Reduction): Adjust reported locations to match the more-precise
2450 results now expected.
2451 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
2452 * tests/reduce.at (Useless Rules, Reduced Automaton,
2453 Underivable Rules): Likewise.
2454 * tests/regression.at (Invalid inputs): No longer `expecting ";"
2455 or "|"' now that so many other tokens are allowed by the new grammar.
2456
2457 * src/complain.h (current_file): Remove duplicate decl;
2458 current_file is now owned by files.h.
2459 * src/complain.c, src/scan-gram.l: Include files.h.
2460
2461 2002-12-06 Paul Eggert <eggert@twinsun.com>
2462
2463 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
2464 promotes to int; it might be unsigned int.
2465 * data/yacc.c (yy_reduce_print): Likewise.
2466
2467 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
2468 be #defined in the prologue, not in the Bison declarations.
2469 This fixes Debian Bug 102878, reported by Shaul Karl.
2470
2471 2002-12-02 Paul Eggert <eggert@twinsun.com>
2472
2473 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
2474 * lib/strtoul.c: New file, from gnulib.
2475 This fixes a porting bug reported by Peter Klein in
2476 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
2477
2478 2002-11-30 Paul Eggert <eggert@twinsun.com>
2479
2480 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
2481 and put only a forward declaration in the prologue. This is for
2482 consistency with the other scanner helper functions.
2483
2484 Type clashes now generate warnings, not errors, since it
2485 appears that POSIX may allow some grammars with type clashes.
2486 * src/reader.c (grammar_current_rule_check): Warn about
2487 type clashes instead of complaining.
2488 * tests/input.at (Type Clashes): Expect warnings, not complaints.
2489
2490 Add Yacc library, since POSIX requires it.
2491 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
2492 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
2493 * lib/main.c, lib/yyerror.c: New files.
2494
2495 gram_error can be static; it need not be extern.
2496 * src/reader.h (gram_error): Remove decl.
2497 * src/parse-gram.y (gram_error): Now static. Add static decl.
2498 (print_token_value): Omit parameter names from forward decl,
2499 for consistency.
2500
2501 2002-11-29 Paul Eggert <eggert@twinsun.com>
2502
2503 * doc/bison.texinfo: Emphasize that yylex and yyerror must
2504 be declared before being used. E.g., one should typically
2505 declare them in the prologue. Use GNU coding style in examples.
2506 Put "const" consistently after the type it modifies. Mention
2507 that C99 supports "inline". Mention that yyerror traditionally
2508 returns "int".
2509
2510 %parse-param and %lex-param now take just one argument, the
2511 declaration; the argument name is deduced from the declaration.
2512
2513 * doc/bison.texinfo (Parser Function, Pure Calling, Error
2514 Reporting, Table of Symbols): Document this.
2515 * src/parse-gram.y (add_param): New function.
2516 (COMMA): Remove.
2517 (declaration): Implement new rule for %parse-param and %lex-param.
2518 * src/scan-gram.l: "," now elicits a warning, rather than being
2519 a token; this is more compatible with byacc.
2520 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
2521
2522 2002-11-27 Paul Eggert <eggert@twinsun.com>
2523
2524 Rename identifiers to avoid real and potential collisions.
2525
2526 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
2527 to avoid collision with lex macro described by Bruce Lilly in
2528 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
2529 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2530 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
2531 * src/parse-gram.y (print_token_value): Renamed from yyprint.
2532 All uses changed.
2533 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
2534 The name "yycontrol" violates the name space rules, and this stuff
2535 wasn't being used anyway.
2536 (input): Remove action; this stuff wasn't being used.
2537 (gram_error): Rename local variable yylloc -> loc.
2538 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
2539 (YY_DECL): Don't use "yy" at start of local variables.
2540 All uses changed, e.g., yylloc -> loc.
2541 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
2542 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
2543 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
2544 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
2545
2546 * src/parse-gram.y (gram_error): loc is now const *.
2547 * src/reader.h (gram_error): Likewise.
2548
2549 2002-11-24 Paul Eggert <eggert@twinsun.com>
2550
2551 Version 1.75c.
2552
2553 * tests/actions.at (Actions after errors): Use an output format
2554 more similar to that of the Printers and Destructors test.
2555 Test the position of the ';' token too.
2556 (Printers and Destructors): Likewise.
2557 (Printers and Destructors: %glr-parser): Remove for now, to avoid
2558 unnecessarily alarming people when the test fails.
2559
2560 * data/yacc.c (yyerrlab1): Move this label down, so that the
2561 parser does not discard the lookahead token if the user code
2562 invokes YYERROR. This change is required for POSIX conformance.
2563
2564 * lib/error.c: Sync with gnulib.
2565
2566 2002-11-22 Paul Eggert <eggert@twinsun.com>
2567
2568 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
2569 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
2570 * lib/xmalloc.c: Likewise.
2571
2572 2002-11-20 Paul Eggert <eggert@twinsun.com>
2573
2574 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
2575
2576 2002-11-20 Paul Eggert <eggert@twinsun.com>
2577
2578 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
2579 should use `if (! x) abort ();' rather than `assert (x);', and
2580 anyway it's one less thing to worry about configuring.
2581
2582 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
2583 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
2584 and replace all instances of assert with abort.
2585 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2586 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
2587
2588 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
2589 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
2590 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
2591 hash_find_entry, hash_rehash, hash_insert): Likewise.
2592 * src/conflicts.c (resolve_sr_conflict): Likewise.
2593 * src/lalr.c (set_goto_map, map_goto): Likewise.
2594 * src/nullable.c (nullable_compute): Likewise.
2595 * src/output.c (prepare_rules, token_definitions_output): Likewise.
2596 * src/reader.c (packgram, reader): Likewise.
2597 * src/state.c (state_new, state_free, state_transitions_set,
2598 state_reduction_find): Likewise.
2599 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
2600 symbol_pack): Likewise.
2601 * src/tables.c (conflict_row, pack_vector): Likewise.
2602 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
2603 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
2604 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
2605 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
2606
2607 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
2608 (ARGMATCH_CONSTRAINT): New macro.
2609 (ARGMATCH_ASSERT): Use it.
2610
2611 * src/system.h (verify): New macro.
2612 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
2613 rather than assert.
2614 * src/tables.c (tables_generate): Likewise.
2615
2616 * src/struniq.c (struniq_assert): Now returns void, and aborts
2617 if the assertion is false.
2618 (struniq_assert_p): Remove.
2619 * src/struniq.h: Likewise.
2620
2621 2002-11-18 Paul Eggert <eggert@twinsun.com>
2622
2623 * data/glr.c (yygetLRActions): Replace `yyindex' with
2624 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
2625 This fixes the regression with Sun ONE Studio 7 cc that I reported in
2626 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
2627
2628 2002-11-18 Akim Demaille <akim@epita.fr>
2629
2630 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
2631 space.
2632 From Tim Van Holder.
2633
2634 2002-11-17 Paul Eggert <eggert@twinsun.com>
2635
2636 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
2637 to "SyntaxError" for consistency with my 2002-11-15 change.
2638
2639 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
2640 not define to {}, since this breaks the common use of `YYDPRINTF
2641 ((...));' if a single statement is desired (e.g. before `else').
2642 Work around GCC warnings by surrounding corresponding calls with
2643 {} if needed.
2644 (yyhasResolvedValue): Remove unused function.
2645 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
2646 loop body.
2647 (yyreportSyntaxError): Renamed from yyreportParseError.
2648 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
2649 All uses changed.
2650 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
2651 extern when possible. Remove unused initializations.
2652
2653 2002-11-16 Akim Demaille <akim@epita.fr>
2654
2655 Augment the similarity between GLR and LALR traces.
2656
2657 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
2658 (YY_REDUCE_PRINT): New.
2659 (yyparse): Use them.
2660 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
2661 YYDPRINT here.
2662 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
2663 state reached after the reduction/recovery, since...
2664 (yyparse, yyprocessOneStack): Report the state we are entering in.
2665
2666 2002-11-16 Akim Demaille <akim@epita.fr>
2667
2668 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
2669 Add support for --trace=skeleton.
2670 * src/scan-skel.l: %option debug.
2671 Scan strings of non-@ or \n instead of character by character.
2672 (scan_skel): Handle trace_skeleton.
2673 (QPUTS): New.
2674 (@output_parser_name@, @output_header_name@): ``Restore'' their
2675 support (used to be M4 macros).
2676 * data/yacc.c: Quote larger chunks, a la glr.c.
2677 * data/lalr1.cc: Likewise.
2678 The header guards are no longer available, so use some other
2679 string than `YYLSP_NEEDED'.
2680
2681 2002-11-16 Akim Demaille <akim@epita.fr>
2682
2683 Make the ``Printers and Destructors'' test more verbose, taking
2684 `yacc.c''s behavior as (possibly wrong) reference.
2685
2686 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
2687 instead of fprint on stdout.
2688 Set and report the last_line of the symbols.
2689 Consistently display values and locations.
2690
2691 2002-11-16 Paul Eggert <eggert@twinsun.com>
2692
2693 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
2694
2695 2002-11-15 Paul Eggert <eggert@twinsun.com>
2696
2697 * tests/actions.at (Actions after errors): New test case.
2698
2699 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
2700 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
2701 tests/action.at, tests/calc.at, tests/conflicts.at,
2702 tests/cxx-type.at, tests/regression.at:
2703 "parse error" -> "syntax error" for POSIX compatibility.
2704 "parsing stack overflow..." -> "parser stack overflow" so
2705 that code matches Bison documentation.
2706
2707 2002-11-15 Akim Demaille <akim@epita.fr>
2708
2709 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
2710 take two BRACED_CODE, not two string_content.
2711 Free the scanner's obstack when we are done.
2712 (code_content): New.
2713 * tests/calc.at: Adjust.
2714 * doc/bison.texinfo: Adjust.
2715 Also, make sure to include the `,' for these declarations.
2716
2717 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
2718
2719 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
2720 definition; avoids potential autoreconf problems.
2721
2722 2002-11-15 Akim Demaille <akim@epita.fr>
2723
2724 Always check the value returned by yyparse.
2725
2726 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
2727 returned by yyparse.
2728 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
2729 Adjust calls.
2730 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
2731 returned by yyparse.
2732
2733 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2734
2735 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
2736 on input.at test.
2737
2738 2002-11-14 Paul Eggert <eggert@twinsun.com>
2739
2740 * src/output.c (output_skeleton): Call xfopen instead of
2741 duplicating xfopen's body.
2742
2743 Fix bugs reported by Nelson H. F. Beebe in
2744 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
2745
2746 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
2747 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
2748 Group compiler. Instead, use "$CC -E bar.c". Include the .h
2749 file twice in the grammar, as an extra check.
2750
2751 * tests/input.at (Torturing the Scanner): Surround the
2752 backslash-newline tests with "#if 0", to make it less likely that
2753 we'll run into compiler bugs. Bring back solitary \ inside
2754 comment, but add a closing comment to work around HP C bug. Don't
2755 test backslash-newline in C character constant.
2756
2757 2002-11-14 Akim Demaille <akim@epita.fr>
2758
2759 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
2760 status of the compiler.
2761 Calling `exit 1' is no longer needed.
2762 Reported by Nelson H. F. Beebe.
2763
2764 2002-11-14 Akim Demaille <akim@epita.fr>
2765
2766 * tests/atlocal.in (CPPFLAGS): We have config.h.
2767 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
2768 New.
2769 * tests/actions.at, tests/calc.at, tests/conflicts.at,
2770 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
2771 * tests/regression.at, tests/torture.at: Use them for all the
2772 grammars that are to be compiled.
2773 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
2774 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
2775 * doc/bison.texinfo (GLR Parsers): Document `inline'.
2776
2777 2002-11-14 Akim Demaille <akim@epita.fr>
2778
2779 * doc/bison.texinfo: Various formatting changes (alignments in
2780 samples, additional @group/@end group, GCS in samples.
2781 Use @deffn instead of simple @table to define the directives,
2782 macros, variables etc.
2783
2784 2002-11-13 Paul Eggert <eggert@twinsun.com>
2785
2786 Fix some bugs reported by Albert Chin-A-Young in
2787 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
2788
2789 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
2790 -o c"; the HP C compiler chatters during compilation.
2791 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
2792 * tests/headers.at (export YYLTYPE): Likewise.
2793
2794 * tests/input.at (Torturing the Scanner): Remove lines containing
2795 solitary backslashes, as they tickle a bug in the HP C compiler.
2796
2797 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
2798 comments, since they're not portable. Use GNU coding style.
2799
2800 2002-11-13 Akim Demaille <akim@epita.fr>
2801
2802 * data/yacc.c: Leave bigger chunks of quoted text.
2803 (YYDSYMPRINTF): New.
2804 Use it to report symbol activities.
2805 * data/glr.c (YYDSYMPRINTF): New.
2806 Use it.
2807
2808 2002-11-12 Paul Eggert <eggert@twinsun.com>
2809
2810 Version 1.75b.
2811
2812 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
2813 (yyglrReduce): Return yyok, not 0.
2814 This should avoid the enumerated-type warnings reported
2815 by Nelson H. F. Beebe in
2816 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
2817
2818 * lib/bbitset.h (BITSET_INLINE): Remove.
2819 * lib/bitset.h [! BITSET_INLINE]: Remove.
2820 (bitset_set, bitset_reset, bitset_test): Rename local vars
2821 to avoid shadowing warnings by GCC.
2822
2823 * data/glr.c (inline): Remove #define. It's the user's
2824 responsibility to #define it away, just like 'const'.
2825 This fixes one of the bugs reported by Nelson H. F. Beebe in
2826 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
2827
2828 * Makefile.maint (po-check): Scan .l and .y files instead of the
2829 .c and the .h files that they generate. This fixes the bug
2830 reported by Tim Van Holder in:
2831 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
2832 Look for N_ as well as for _. Try to avoid matching #define for
2833 N_ and _.
2834 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
2835 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
2836 * src/scan-gram.l: Revamp regular expressions so that " and '
2837 do not confuse xgettext.
2838
2839 * src/struniq.h (struniq_new): Do not declare the return type
2840 to be 'const'; this violates the C standard.
2841 * src/struniq.c (struniq_new): Likewise.
2842
2843 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
2844
2845 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
2846 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
2847 linker.
2848
2849 2002-11-12 Akim Demaille <akim@epita.fr>
2850
2851 * Makefile.maint: Sync with Autoconf:
2852 (local_updates): New.
2853
2854 2002-11-12 Akim Demaille <akim@epita.fr>
2855
2856 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
2857
2858 2002-11-12 Akim Demaille <akim@epita.fr>
2859
2860 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
2861 locations.
2862
2863 2002-11-12 Akim Demaille <akim@epita.fr>
2864
2865 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
2866 not yyvalue.
2867
2868 2002-11-12 Akim Demaille <akim@epita.fr>
2869
2870 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
2871 Use it to test the GLR parser.
2872
2873 2002-11-12 Akim Demaille <akim@epita.fr>
2874
2875 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
2876 defines it.
2877 * data/glr.c (yystos): New.
2878 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
2879 (YYDSYMPRINT): New.
2880 (yyval): Don't define it, it is handled via M4.
2881 (yyrecoverParseError): Free verbosely the discarded symbols.
2882 * data/yacc.c (yysymprint): Remove, rather...
2883 (b4_yysymprint_generate): invoke.
2884 * data/c.m4 (b4_yysymprint_generate): New.
2885 Accept pointers as arguments, as opposed to the version from
2886 yacc.c.
2887 (b4_yydestruct_generate): Likewise.
2888 * tests/cations.at (Printers and Destructors): Use Bison directives
2889 instead of CPP macros.
2890 Don't rely on internal details.
2891
2892 2002-11-12 Akim Demaille <akim@epita.fr>
2893
2894 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
2895 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
2896 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
2897 it against YYEMPTY and so forth), work on yytoken (i.e., set
2898 it to YYEMPTY etc.).
2899 (yydestruct): Replace with a b4_yydestruct_generate invocation.
2900 (b4_symbol_actions): Remove.
2901 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
2902 for 0, end-of-input.
2903
2904 2002-11-12 Akim Demaille <akim@epita.fr>
2905
2906 * doc/bison.texinfo (Destructor Decl): New.
2907
2908 2002-11-12 Akim Demaille <akim@epita.fr>
2909
2910 * src/tables.c (tables_generate): Use free for pointers that
2911 cannot be NULL, not XFREE.
2912 (pack_vector): Use assert, not fatal, for bound violations.
2913 * src/state.c (state_new): Likewise.
2914 * src/reader.c (reader): Likewise.
2915 * src/lalr.c (set_goto_map): Likewise.
2916 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
2917 the file name.
2918
2919 2002-11-12 Akim Demaille <akim@epita.fr>
2920
2921 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2922 Restore.
2923 * src/scan-gram.l (last_string): Is global to the file, not to
2924 yylex.
2925 * src/parse-gram.y (input): Don't append the epilogue here,
2926 (epilogue.opt): do it here, and free the scanner's obstack.
2927 * src/reader.c (epilogue_set): Rename as...
2928 (epilogue_augment): this.
2929 * data/c.m4 (b4_epilogue): Defaults to empty.
2930
2931 2002-11-12 Akim Demaille <akim@epita.fr>
2932
2933 * src/getargs.c (long_options): Remove duplicates.
2934 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2935 Remove.
2936 * doc/bison.rnh: Remove.
2937 * doc/bison.texinfo (VMS Invocation): Remove.
2938
2939 2002-11-12 Akim Demaille <akim@epita.fr>
2940
2941 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2942 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2943
2944 Use struniq for symbols.
2945
2946 * src/symtab.h (symbol_t): The tag member is a struniq.
2947 (symbol_type_set): Adjust.
2948 * src/symtab.c (symbol_new): Takes a struniq.
2949 (symbol_free): Don't free the tag member.
2950 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2951 (hash_compare_symbol, hash_symbol): these.
2952 Use the fact that tags as struniqs.
2953 (symbol_get): Use struniq_new.
2954 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2955 Returns a strniq.
2956 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2957 and type members are struniqs.
2958 * src/reader.c (get_merge_function)
2959 (grammar_current_rule_merge_set): Adjust.
2960 (TYPE, current_type): Are struniq.
2961
2962 Use struniq for file names.
2963
2964 * src/files.h, src/files.c (infile): Split into...
2965 (grammar_file, current_file): these.
2966 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2967 * src/reduce.c (reduce_print): Likewise.
2968 * src/getargs.c (getargs): Likewise.
2969 * src/complain.h, src/complain.c: Likewise.
2970 * src/main.c (main): Call struniqs_new early enough to use it for
2971 file names.
2972 Don't free the input file name.
2973
2974 2002-11-12 Akim Demaille <akim@epita.fr>
2975
2976 * src/symtab.c (symbol_free): Remove dead deactivated code:
2977 type_name are properly removed.
2978 Don't use XFREE to free items that cannot be NULL.
2979 * src/struniq.h, src/struniq.c: New.
2980 * src/main.c (main): Initialize/free struniqs.
2981 * src/parse-gram.y (%union): Add astruniq member.
2982 (yyprint): Adjust.
2983 * src/scan-gram.l (<{tag}>): Return a struniq.
2984 Free the obstack bit that used to store it.
2985 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2986
2987 2002-11-11 Paul Eggert <eggert@twinsun.com>
2988
2989 Revamp to fix many (but not all) of the C- and M4-related quoting
2990 problems. Among other things, this fixes the Bison bug reported
2991 by Jan Hubicka when processing the Bash grammar; see:
2992 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
2993
2994 Use new @ escapes consistently. Represent brackets with @{ and @}
2995 rather than @<:@ and @:>@, since this works a bit better with dumb
2996 editors like vi. Represent @ with @@, since @ is now consistently
2997 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2998 __ofile__, to avoid unexpected expansions. Similarly, use @output
2999 rather than #output.
3000
3001 * data/c.m4 (b4_copyright): Omit file name from comment, since
3002 the file name could contain "*/".
3003 (b4_synclines_flag): Don't quote the 2nd argument; it should already
3004 be quoted. All uses changed.
3005
3006 * data/glr.c: Use new @ escapes consistently.
3007 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
3008 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
3009 Remove, since they couldn't handle arbitrary characters in file
3010 names.
3011 * data/lalr1.cc: Likewise.
3012 * data/yacc.c: Likewise.
3013
3014 * src/files.c (output_infix): Remove; all uses removed.
3015 * src/files.h: Likewise.
3016
3017 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
3018 mishandled funny characters in file names, and anyway it isn't
3019 needed any more.
3020 * data/yacc.c: Likewise.
3021 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
3022
3023 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
3024 * data/yacc.c: Likewise.
3025
3026 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
3027 strings now.
3028 (muscle_init): Quote filename as a C string.
3029 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
3030 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
3031 * src/output.c (escaped_file_name_output): New function.
3032 (prepare_symbols): Quote tokens for M4.
3033 (prepare): Don't insert output_infix, output_prefix,
3034 output_parser_name, output_header_name; this is now down by scan-skel.
3035 Insert skeleton as a C string.
3036
3037 * src/output.c (user_actions_output, symbol_destructors_output,
3038 symbol_printers_output): Quote filenames for C and M4.
3039 * src/reader.c (prologue_augment, epilogue_set): Likewise.
3040
3041 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
3042 escapes other than \\ and \'; this simplifies the code.
3043 (<SC_STRING>): Likewise, for \\ and \".
3044 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
3045 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
3046 Use new escapes @{ and @} for [ and ].
3047
3048 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
3049 them with auto vars.
3050 Switch to new escape scheme, where @ is the escape character uniformly.
3051 Abort if a stray escape character is found. Avoid unbounded input
3052 buffer when parsing non-escaped text.
3053
3054 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
3055 __oline__, #output, $@, and @{ do not have unintended meanings.
3056
3057 2002-11-09 Paul Eggert <eggert@twinsun.com>
3058
3059 Fix the test failure due to GCC warnings described in
3060 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
3061 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
3062 evaluate to 0 if it's impossible for NINF to be in the respective
3063 table.
3064 (yygetLRActions, yyrecoverParseError): Use them.
3065
3066 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
3067 counted in the token inserted at end of file. Now takes
3068 location_t *, not location_t, so that the location can be
3069 adjusted. All uses changed.
3070
3071 * tests/regression.at (Invalid inputs): Adjust wording in
3072 diagnostic to match the new behavior.
3073
3074 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
3075 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
3076 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
3077 abort ();'. This reduces the runtime of the "Many lookaheads"
3078 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
3079 GCC 3.2.
3080
3081 2002-11-07 Paul Eggert <eggert@twinsun.com>
3082
3083 * src/parse-gram.y (CHARACTER): Remove unused token.
3084 All uses removed.
3085
3086 * src/scan-gram.l: Remove stack option. We no longer use the
3087 stack, since the stack was never deeper than 1; instead, use the
3088 new auto var c_context to record the stacked value.
3089
3090 Remove nounput option. At an unexpected end of file, we now unput
3091 the minimal input necessary to end cleanly; this simplifies the
3092 code.
3093
3094 Avoid unbounded token sizes where this is easy.
3095
3096 (unexpected_end_of_file): New function.
3097 Use it to systematize the error message on unexpected EOF.
3098 (last-string): Now auto, not static.
3099 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
3100 (scanner_last_string_free): Remove; not used.
3101 (percent_percent_count): Move decl to just before use.
3102 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
3103 not the (never otherwised-used) CHARACTER.
3104
3105 2002-11-07 Akim Demaille <akim@epita.fr>
3106
3107 Let yyerror always receive the msg as last argument, so that
3108 yyerror can be variadic.
3109
3110 * data/yacc.c (b4_yyerror_args): New.
3111 Use it when calling yyerror.
3112 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
3113 Use it when calling yyerror.
3114 * doc/bison.texinfo (Error Reporting): Adjust.
3115 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
3116 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
3117
3118 2002-11-06 Akim Demaille <akim@epita.fr>
3119
3120 #line should have quoted strings.
3121 Ideally, this should be done by m4_quotearg.
3122
3123 * src/scan-skel.l: Include quotearg.h.
3124 Quote __ofile__.
3125 * src/output.c (symbol_printers_output)
3126 (symbol_destructors_output): Quote the file name.
3127
3128 2002-11-06 Akim Demaille <akim@epita.fr>
3129
3130 * tests/regression.at (Invalid inputs): Adjust to the recent
3131 messages.
3132
3133 2002-11-06 Akim Demaille <akim@epita.fr>
3134
3135 Restore --no-lines.
3136 Reported by Jim Kent.
3137
3138 * data/c.m4 (b4_syncline): New.
3139 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
3140 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
3141 * src/output.c (user_actions_output): Likewise.
3142 (prepare): Define 'b4_synclines_flag'.
3143 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
3144
3145 2002-11-06 Akim Demaille <akim@epita.fr>
3146
3147 * src/main.c (main): Free `infile'.
3148 * src/scan-gram.l (handle_syncline): New.
3149 Recognize `#line'.
3150 * src/output.c (user_actions_output, symbol_destructors_output)
3151 (symbol_printers_output): Use the location's file name, not
3152 infile.
3153 * src/reader.c (prologue_augment, epilogue_set): Likewise.
3154
3155 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3156
3157 * src/tables.c (matching_state): Don't allow states to match if
3158 either has GLR conflict entries.
3159
3160 2002-11-05 Paul Eggert <eggert@twinsun.com>
3161
3162 * src/scan-gram.l: Use more accurate diagnostics, e.g.
3163 "integer out of range" rather than "invalid value".
3164 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
3165 accordingly.
3166
3167 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
3168 Also, remove one static variable in the scanner.
3169
3170 * src/scan-gram.l (braces_level): Now auto, not static.
3171 Initialize to zero if the compiler is being picky.
3172 (INITIAL): Clear braces_level instead of incrementing it.
3173 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
3174 as POSIX 1003.1-2001 requires.
3175 * src/system.h (IF_LINT): New macro, taken from coreutils.
3176 * configure.ac: Define "lint" if --enable-gcc-warnings.
3177
3178 2002-11-05 Akim Demaille <akim@epita.fr>
3179
3180 * src/scan-gram.l: When it starts with `%', complain about the
3181 whole directive, not just that `invalid character: %'.
3182
3183 2002-11-04 Akim Demaille <akim@epita.fr>
3184
3185 * Makefile.maint: Update from Autoconf.
3186 (update, cvs-update, po-update, do-po-update): New.
3187
3188 2002-11-04 Akim Demaille <akim@epita.fr>
3189
3190 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
3191 and yyerror.
3192 Have yyerror `use' its arguments.
3193 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
3194 returns true when location & yacc & pure & parse-param.
3195 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
3196
3197 2002-11-04 Akim Demaille <akim@epita.fr>
3198
3199 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
3200 clashes.
3201 * src/scan-gram.l: Use [\'] instead of ['] to pacify
3202 font-lock-mode.
3203 Use complain_at.
3204 Use quote, not quote_n since LOCATION_PRINT no longer uses the
3205 slot 0.
3206
3207 2002-11-03 Paul Eggert <eggert@twinsun.com>
3208
3209 * src/reader.c (get_merge_function, grammar_current_rule_check):
3210 Use consistent diagnostics for reporting type name clashes.
3211 Quote the types with <>, for consistency with Yacc.
3212 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
3213
3214 2002-11-03 Akim Demaille <akim@epita.fr>
3215
3216 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
3217 New.
3218 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
3219 (b4_parse_param): Remove.
3220 Use b4_identification.
3221 Propagate b4_pure_args where needed to pass them to yyerror.
3222 * data/glr.m4 (b4_parse_param): Remove.
3223 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
3224 (b4_lpure_formals): New.
3225 Use b4_identification.
3226 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
3227 b4_user_formals and b4_user_args.
3228 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
3229 (yyreportAmbiguity): When using a pure parser, also need
3230 the location, and the parse-params.
3231 Adjust callers.
3232 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
3233 When using a pure parser, also need the parse-params.
3234 Adjust callers.
3235 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
3236 (%pure-parser + %parse-param) LALR and GLR parsers.
3237 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
3238 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
3239 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
3240 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
3241 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
3242 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
3243 * doc/bison.texinfo: Untabify the whole file.
3244 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
3245 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
3246 (Error Reporting): Adjust to these new directives.
3247 Document %error-verbose, deprecate YYERROR_VERBOSE.
3248
3249 2002-11-03 Akim Demaille <akim@epita.fr>
3250
3251 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
3252 AT_CHECK_CALC_GLR invocations to use % directives, instead of
3253 command line options.
3254 * tests/cxx-type.at: Formatting changes.
3255
3256 2002-11-03 Paul Eggert <eggert@twinsun.com>
3257
3258 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
3259 to count columns correctly, and to check for invalid inputs.
3260
3261 Use mbsnwidth to count columns correctly. Account for tabs, too.
3262 Include mbswidth.h.
3263 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
3264 (extend_location): New function.
3265 (YY_LINES): Remove.
3266
3267 Handle CRLF in C code rather than in Lex code.
3268 (YY_INPUT): New macro.
3269 (no_cr_read): New function.
3270
3271 Scan UCNs, even though we don't fully handle them yet.
3272 (convert_ucn_to_byte): New function.
3273
3274 Handle backslash-newline correctly in C code.
3275 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
3276 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
3277 all uses changed.
3278 (tag, splice): New EREs. Do not allow NUL or newline in tags.
3279 Use {splice} wherever C allows backslash-newline.
3280 YY_STEP after space, newline, vertical-tab.
3281 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
3282
3283 (letter, id): Don't assume ASCII; e.g., spell out a-z.
3284
3285 ({int}, handle_action_dollar, handle_action_at): Check for integer
3286 overflow.
3287
3288 (YY_STEP): Omit trailing semicolon, so that it's more like C.
3289
3290 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
3291 as well as \000. Check for UCHAR_MAX, not 255.
3292 Allow \x with an arbitrary positive number of digits, as in C.
3293 Check for overflow here.
3294 Allow \? and UCNs, for compatibility with C.
3295
3296 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
3297 with quote slot used by complain_at.
3298
3299 * tests/input.at: Add tests for backslash-newline, m4 quotes
3300 in symbols, long literals, and funny escapes in strings.
3301
3302 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
3303 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
3304 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
3305 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
3306 * m4/mbswidth.m4: New file, from GNU coreutils.
3307
3308 * doc/bison.texinfo (Grammar Outline): Document // comments.
3309 (Symbols): Document that trigraphs have no special meaning in Bison,
3310 nor is backslash-newline allowed.
3311 (Actions): Document that trigraphs have no special meaning.
3312
3313 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
3314 no longer used.
3315
3316 2002-11-02 Paul Eggert <eggert@twinsun.com>
3317
3318 * src/reader.c: Don't include quote.h; not needed.
3319 (get_merge_function): Reword warning to be consistent with
3320 type clash diagnostic in grammar_current_rule_check.
3321
3322 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
3323 bug in trigraph handling.
3324
3325 * src/output.c (prepare_symbols): When printing token names,
3326 escape "[" as "@<:@" and likewise for "]".
3327
3328 * src/system.h (errno): Remove declaration, as we are now
3329 assuming C89 or better, and C89 guarantees errno.
3330
3331 2002-10-30 Paul Eggert <eggert@twinsun.com>
3332
3333 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
3334 Check for close failures.
3335 * src/files.h (xfclose): Return void, not int, since it always
3336 returned zero.
3337 * src/files.c (xfclose): Likewise. Report I/O error if ferror
3338 indicates one.
3339 * src/output.c (output_skeleton): Use xfclose rather than fclose
3340 and ferror. xfclose now checks ferror.
3341
3342 * data/glr.c (YYLEFTMOST_STATE): Remove.
3343 (yyreportTree): Use a stack-based leftmost state. This avoids
3344 our continuing battles with bogus warnings about initializers.
3345
3346 2002-10-30 Akim Demaille <akim@epita.fr>
3347
3348 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
3349 #if.
3350
3351 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3352
3353 * tests/glr-regr1.at: New test for reported regressions.
3354 * tests/testsuite.at: Add glr-regr1.at test.
3355 * tests/Makefile.am: Add glr-regr1.at test.
3356
3357 2002-10-24 Paul Eggert <eggert@twinsun.com>
3358
3359 Version 1.75a.
3360
3361 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
3362 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
3363 we use malloc. Don't assume 'A' through 'Z' are contiguous.
3364 Don't assume strdup exists; POSIX says its an XSI extension.
3365 Check for buffer overflow on input.
3366
3367 2002-10-24 Akim Demaille <akim@epita.fr>
3368
3369 * src/output.c (output_skeleton): Don't disable M4sugar comments
3370 too soon: it results in comments being expanded.
3371 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
3372 first output.
3373
3374 2002-10-24 Akim Demaille <akim@epita.fr>
3375
3376 * data/yacc.c (m4_int_type): New.
3377 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
3378 char' as only yacc.c wants K&R portability.
3379 * data/glr.c (yysigned_char): Remove.
3380 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
3381 Reported by Quoc Peyrot.
3382
3383 2002-10-23 Paul Eggert <eggert@twinsun.com>
3384
3385 * src/main.c (main): With --trace=time, report times even if a
3386 non-fatal error occurs. Formerly, the times were reported in some
3387 such cases but not in others.
3388 * src/reader.c (reader): Just return if a complaint has been issued,
3389 instead of exiting, so that 'main' can report times.
3390
3391 2002-10-22 Akim Demaille <akim@epita.fr>
3392
3393 * src/system.h: Include sys/types.
3394 Reported by Bert Deknuydt.
3395
3396 2002-10-23 Paul Eggert <eggert@twinsun.com>
3397
3398 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
3399 Suggested by Art Haas.
3400
3401 2002-10-22 Paul Eggert <eggert@twinsun.com>
3402
3403 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
3404 decl; not needed any more.
3405 * src/main.c (main): Use return to exit, undoing yesterday's change.
3406 The last OS that we could find where this wouldn't work is
3407 SunOS 3.5, and that's too old to worry about now.
3408
3409 * data/glr.c (struct yyltype): Define members even when not
3410 doing locations. This is more consistent with yacc.c, and it
3411 works around the following bug reports:
3412 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
3413 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
3414
3415 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
3416 @acronym consistently. Standardize on "Yacc" instead of "YACC",
3417 "Algol" instead of "ALGOL". Give a bit more history about BNF.
3418
3419 2002-10-22 Akim Demaille <akim@epita.fr>
3420
3421 * data/README: New.
3422
3423 2002-10-21 Paul Eggert <eggert@twinsun.com>
3424
3425 Be consistent about 'bool'; the old code used an enum in one
3426 module and an int in another, and this violates the C standard.
3427 * m4/stdbool.m4: New file, from coreutils 4.5.3.
3428 * configure.ac (AC_HEADER_STDBOOL): Add.
3429 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
3430 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
3431 * src/symtab.c (hash_compare_symbol_t): Likewise.
3432 * src/system.h (bool, false, true): Use a definition consistent
3433 with ../lib/hash.c. All uses changed.
3434
3435 * src/complain.c (warning_issued): Renamed from warn_message_count,
3436 so that we needn't worry about integer overflow (!).
3437 Now of type bool. All uses changed.
3438 (complaint_issued): Renamed from complain_message_count; likewise.
3439
3440 * src/main.c (main): Use exit to exit with failure.
3441
3442 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
3443 rather than 1 and 0.
3444 * src/main.c (main): Likewise.
3445 * src/getargs.c (getargs): Likewise.
3446 * src/reader.c (reader): Likewise.
3447
3448 * src/getarg.c (getargs): Remove duplicate code for
3449 "Try `bison --help'".
3450
3451 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
3452 What was that "2" for?
3453
3454 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
3455 * src/getargs.c (usage): Likewise.
3456
3457 * src/getargs.c (getargs): When there are too few operands, report
3458 the last one. When there are too many, report the first extra
3459 one. This is how diffutils does it.
3460
3461 2002-10-20 Paul Eggert <eggert@twinsun.com>
3462
3463 Remove K&R vestiges.
3464 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
3465 * src/complain.c (VA_START): Remove. Assume prototypes.
3466 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
3467 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
3468 fatal): Assume prototypes.
3469 * src/complain.h: Assume prototypes.
3470 * src/system.h (PARAMS): Remove.
3471 Include <limits.h> unconditionally, since it's guaranteeed even
3472 for a freestanding C89 compiler.
3473 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
3474 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
3475
3476 2002-10-20 Akim Demaille <akim@epita.fr>
3477
3478 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
3479 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
3480 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
3481 (yyresolveStates, yyresolveAction, yyresolveStack)
3482 (yyprocessOneStack): Use them.
3483 (yy_reduce_print): New.
3484 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
3485
3486 2002-10-20 Akim Demaille <akim@epita.fr>
3487
3488 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
3489 arguments and output `void'.
3490 (b4_c_function): Rename as...
3491 (b4_c_function_def): this.
3492 (b4_c_function_decl, b4_c_ansi_function_def)
3493 (b4_c_ansi_function_decl): New.
3494 Change the interpretation of the arguments: before `int, foo', now
3495 `int foo, foo'.
3496 * data/yacc.c (yyparse): Prototype and define thanks to these.
3497 Adjust b4_c_function_def uses.
3498 * data/glr.c (yyparse): Likewise, but ANSI only.
3499
3500 2002-10-20 Akim Demaille <akim@epita.fr>
3501
3502 * src/output.c (prepare): Move the definition of `tokens_number',
3503 `nterms_number', `undef_token_number', `user_token_number_max'
3504 to...
3505 (prepare_tokens): Here.
3506 (prepare_tokens): Rename as...
3507 (prepare_symbols): this.
3508 (prepare): Move the definition of `rules_number' to...
3509 (prepare_rules): here.
3510 (prepare): Move the definition of `last', `final_state_number',
3511 `states_number' to...
3512 (prepare_states): here.
3513 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
3514
3515 2002-10-20 Akim Demaille <akim@epita.fr>
3516
3517 * src/tables.h, src/tables.c, src/output.c: Comment changes.
3518
3519 2002-10-20 Akim Demaille <akim@epita.fr>
3520
3521 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
3522 * data/c.m4: here.
3523
3524 2002-10-20 Akim Demaille <akim@epita.fr>
3525
3526 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
3527 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
3528 `pair'.
3529 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
3530 `name' to...
3531 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
3532 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
3533 These.
3534
3535 2002-10-19 Paul Eggert <eggert@twinsun.com>
3536
3537 Do not create a temporary file, as that involves security and
3538 cleanup headaches. Instead, use a pair of pipes.
3539 Derived from a suggestion by Florian Krohm.
3540 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
3541 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
3542 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
3543 (BISON_PREREQ_SUBPIPE): Add.
3544 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
3545 Add subpipe.h, subpipe.c.
3546 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
3547 * po/POTFILES.in: Add lib/subpipe.c.
3548 * src/output.c: Include "subpipe.h".
3549 (m4_invoke): Remove decl.
3550 (scan_skel): New decl.
3551 (output_skeleton): Use pipe rather than temporary file for m4 input.
3552 Check that m4sugar.m4 is readable, to avoid deadlock.
3553 Check for pipe I/O error.
3554 * src/scan-skel.l (readpipe): Remove decl.
3555 (scan_skel): New function, to be used in place of m4_invoke.
3556 Read from stream rather than file.
3557
3558 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
3559 float, as this generates a warning on Solaris 8 + GCC 3.2 with
3560 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
3561 this generates a more-accurate value anyway.
3562
3563 * lib/timevar.c (timervar_accumulate): Rename locals to
3564 avoid confusion with similarly-named more-global.
3565 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
3566
3567 * src/output.c (prepare): Use xstrdup to convert char const *
3568 to char *, to avoid GCC warning.
3569
3570 2002-10-19 Akim Demaille <akim@epita.fr>
3571
3572 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
3573 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
3574 Use them to have `calc.y' ready for %pure-parser.
3575 * data/yacc.c (YYLEX): Pass a yylex return type to
3576 b4_c_function_call.
3577
3578 2002-10-19 Akim Demaille <akim@epita.fr>
3579
3580 Prototype support of %lex-param and %parse-param.
3581
3582 * src/parse-gram.y: Add the definition of the %lex-param and
3583 %parse-param tokens, plus their rules.
3584 Drop the `_' version of %glr-parser.
3585 Add the "," token.
3586 * src/scan-gram.l (INITIAL): Scan them.
3587 * src/muscle_tab.c: Comment changes.
3588 (muscle_insert, muscle_find): Rename `pair' as `probe'.
3589 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
3590 (muscle_entry_s): The `value' member is no longer const.
3591 Adjust all dependencies.
3592 * src/muscle_tab.c (muscle_init): Adjust: use
3593 MUSCLE_INSERT_STRING.
3594 Initialize the obstack earlier.
3595 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
3596 (muscle_pair_list_grow): New.
3597 * data/c.m4 (b4_c_function_call, b4_c_args): New.
3598 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
3599 * tests/calc.at: Use %locations, not --locations.
3600 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
3601
3602 2002-10-19 Akim Demaille <akim@epita.fr>
3603
3604 * src/getargs.c (usage): Take status as argument and exit
3605 accordingly.
3606 Report the traditional `Try ... --help' message when status != 0.
3607 (usage, version): Don't take a FILE * as arg, it is pointless.
3608 (getargs): When there is an incorrect number of arguments, make it
3609 an error, and report it GNUlically thanks to `usage ()'.
3610
3611 2002-10-18 Paul Eggert <eggert@twinsun.com>
3612
3613 * data/glr.c (yyreportParseError): Don't assume that sprintf
3614 yields the length of the printed string, as this is not true
3615 on SunOS 4.1.4. Reported by Peter Klein.
3616
3617 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
3618 * tests/conflicts.at (%nonassoc and eof): Likewise.
3619 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
3620
3621 2002-10-17 Akim Demaille <akim@epita.fr>
3622
3623 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
3624 * src/getargs.c (trace_types, trace_args): Adjust.
3625 * src/reader.c (grammar_current_rule_prec_set)
3626 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
3627 Standardize error messages.
3628 And s/@prec/%prec/!
3629 (reader): Use trace_flag to enable scanner/parser debugging,
3630 instead of an adhoc scheme.
3631 * src/scan-gram.l: Remove trailing debugging code.
3632
3633 2002-10-16 Paul Eggert <eggert@twinsun.com>
3634
3635 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
3636 MUSCLE_TAB_H.
3637
3638 * NEWS: Officially drop support for building Bison with K&R C,
3639 since it didn't work anyway and it's not worth worrying about.
3640 * Makefile.maint (wget_files): Remove ansi2knr.c.
3641 (ansi2knr.c-url_prefix): Remove.
3642 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
3643 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3644 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3645
3646 2002-10-15 Paul Eggert <eggert@twinsun.com>
3647
3648 Stop using the "enum_" trick for K&R-style function definitions;
3649 it confused me, and I was the author! Instead, assume that people
3650 who want to use K&R C compilers (when using these modules in GCC,
3651 perhaps?) will run ansi2knr.
3652
3653 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
3654 All uses of "enum_" changed to "enum ".
3655 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3656 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3657
3658 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
3659 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
3660 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
3661 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
3662 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
3663 abitset_not, abitset_ones, abitset_or, abitset_or_and,
3664 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
3665 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
3666 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
3667 Use function prototypes; this removes the need for declaring
3668 static functions simply to provide their prototypes.
3669 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
3670 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
3671 bitset_count_, bitset_create, bitset_dump, bitset_first,
3672 bitset_free, bitset_init, bitset_last, bitset_next,
3673 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
3674 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
3675 bitset_print, bitset_release_memory, bitset_toggle_,
3676 bitset_type_choose, bitset_type_get, bitset_type_name_get,
3677 debug_bitset): Likewise.
3678 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
3679 * lib/bitset_stats.c (bitset_log_histogram_print,
3680 bitset_percent_histogram_print, bitset_stats_and,
3681 bitset_stats_and_cmp, bitset_stats_and_or,
3682 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
3683 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
3684 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
3685 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
3686 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
3687 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
3688 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
3689 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
3690 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
3691 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
3692 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
3693 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
3694 bitset_stats_zero): Likewise.
3695 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3696 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3697 bitsetv_dump, debug_bitsetv): Likewise.
3698 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
3699 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
3700 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
3701 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
3702 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
3703 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
3704 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
3705 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
3706 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
3707 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
3708 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
3709 Likewise.
3710 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
3711 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
3712 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
3713 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
3714 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
3715 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
3716 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
3717 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
3718 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
3719 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
3720 lbitset_xor_cmp, lbitset_zero): Likewise.
3721
3722 2002-10-14 Akim Demaille <akim@epita.fr>
3723
3724 Version 1.75.
3725
3726 2002-10-14 Akim Demaille <akim@epita.fr>
3727
3728 * tests/Makefile.am (maintainer-check-posix): New.
3729
3730 2002-10-14 Akim Demaille <akim@epita.fr>
3731
3732 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
3733 member.
3734
3735 2002-10-14 Akim Demaille <akim@epita.fr>
3736
3737 * src/tables.c (table_ninf_remap): base -> tab.
3738 Reported by Matt Rosing.
3739
3740 2002-10-14 Paul Eggert <eggert@twinsun.com>
3741
3742 * tests/action.at, tests/calc.at, tests/conflicts.at,
3743 tests/cxx-type.at, tests/headers.at, tests/input.at,
3744 tests/regression.at, tests/synclines.at, tests/torture.at:
3745 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
3746 so that the tests still work even if POSIXLY_CORRECT is set.
3747 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
3748
3749 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
3750 for portability to K&R hosts. Fix typo: signed char is guaranteed
3751 only to 127, not to 128.
3752 * data/glr.c (yysigned_char): New type.
3753 * data/yacc.c (yysigned_char): Likewise.
3754 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
3755
3756 2002-10-13 Paul Eggert <eggert@twinsun.com>
3757
3758 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
3759 true due to limited range of data type" warning from GCC.
3760
3761 * data/c.m4 (b4_token_defines): Protect against double-inclusion
3762 by wrapping enum yytokentype's definition inside #ifndef
3763 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
3764
3765 2002-10-13 Akim Demaille <akim@epita.fr>
3766
3767 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
3768 Un yy- yyrhs to avoid the name clash with the global YYRHS.
3769
3770 2002-10-13 Akim Demaille <akim@epita.fr>
3771
3772 * Makefile.maint: Update from Autoconf 2.54.
3773 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
3774
3775 2002-10-13 Akim Demaille <akim@epita.fr>
3776
3777 * src/print.c (print_state): Separate the list of solved conflicts
3778 from the other items.
3779 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
3780
3781 2002-10-13 Akim Demaille <akim@epita.fr>
3782
3783 Let nondeterministic skeletons be usable with deterministic
3784 tables.
3785
3786 With the patch, GAWK compiled by GCC without -O2 passes its test
3787 suite using a GLR parser driven by LALR tables. It fails with -O2
3788 because `struct stat' gives two different answers on my machine:
3789 88 (definition of an auto var) and later 96 (memset on this var).
3790 Hence the stack is badly corrumpted. The headers inclusion is to
3791 blame: if I move the awk.h inclusion before GLR's system header
3792 inclusion, the two struct stat have the same size.
3793
3794 * src/tables.c (pack_table): Always create conflict_table.
3795 (token_actions): Always create conflict_list.
3796 * data/glr.c (YYFLAG): Remove, unused.
3797
3798 2002-10-13 Akim Demaille <akim@epita.fr>
3799
3800 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
3801 (O0FLAGS): New.
3802 (VALGRIND, GXX): New.
3803 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
3804 * tests/bison.in: Run $PREBISON a pre-command.
3805 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
3806 (maintainer-check-g++): New.
3807 * Makefile.am (maintainer-check): New.
3808
3809 2002-10-13 Akim Demaille <akim@epita.fr>
3810
3811 * data/glr.c: Formatting changes.
3812 Tweak some trace messages to match yacc.c's.
3813
3814 2002-10-13 Akim Demaille <akim@epita.fr>
3815
3816 GLR parsers sometimes raise parse errors instead of performing the
3817 default reduction.
3818 Reported by Charles-Henry de Boysson.
3819
3820 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
3821 check the length of the traces when %glr.
3822 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
3823 GLR's traces.
3824 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
3825 Test GLR parsers.
3826 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
3827 (yyltype): Remove the yy prefix from the member names.
3828 (yytable): Complete its comment.
3829 (yygetLRActions): Map error action number from YYTABLE from
3830 YYTABLE_NINF to 0.
3831 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
3832 (which was a bug: it should have been YYTABEL_NINF, and yet it was
3833 not satisfying as we could compare an YYACTION computed from
3834 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
3835 only value for error actions.
3836 (yyreportParseError): In verbose parse error messages, don't issue
3837 `error' in the list of expected tokens.
3838 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
3839 next action to perform to match glr.c's decoding.
3840 (yytable): Complete its comment.
3841
3842 2002-10-13 Paul Eggert <eggert@twinsun.com>
3843
3844 Fix problem reported by Henrik Grubbstroem in
3845 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
3846 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
3847 because the Bison parser reads the second action before reducing
3848 the first one.
3849 * src/scan-gram.l (rule_length): New static var.
3850 Use it to keep track of the rule length in the scanner, since
3851 we can't expect the parser to be in lock-step sync with the scanner.
3852 (handle_action_dollar, handle_action_at): Use this var.
3853 * tests/actions.at (Exotic Dollars): Test for the problem.
3854
3855 2002-10-12 Paul Eggert <eggert@twinsun.com>
3856
3857 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
3858 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
3859 Include <sys/time.h> when checking for clock_t and struct tms.
3860 Use same include order as source.
3861 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
3862 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
3863
3864 * lib/timevar.c: Update copyright date and clarify comments.
3865 (get_time) [IN_GCC]: Keep the GCC version for reference.
3866
3867 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
3868 GCC version as of today, then merge Bison's changes.
3869 Change "GCC" to "Bison" in copyright notice. timevar.def's
3870 author is Akim, so change that too.
3871
3872 * src/reader.c (grammar_current_rule_check):
3873 Don't worry about the default action if $$ is untyped.
3874 Prevents bogus warnings reported by Jim Gifford in
3875 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
3876
3877 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
3878 * data/glr.c, data/lalr1.cc, data/yacc.c:
3879 Output token definitions before the first part of user declarations.
3880 Fixes compatibility problem reported by Jim Gifford for kbd in
3881 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
3882
3883 2002-10-11 Paul Eggert <eggert@twinsun.com>
3884
3885 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
3886 (yyparse): here. This undoes some of the 2002-07-25 change.
3887 Compatibility problem reported by Ralf S. Engelschall with
3888 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
3889
3890 2002-10-11 Akim Demaille <akim@epita.fr>
3891
3892 * tests/regression.at Characters Escapes): New.
3893 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
3894 characters.
3895 Reported by Jan Nieuwenhuizen.
3896
3897 2002-10-11 Akim Demaille <akim@epita.fr>
3898
3899 * po/id.po: New.
3900
3901 2002-10-10 Paul Eggert <eggert@twinsun.com>
3902
3903 Portability fixes for bitsets; this also avoids several GCC
3904 warnings.
3905
3906 * lib/abitset.c: Include <stddef.h>, for offsetof.
3907 * lib/lbitset.c: Likewise.
3908
3909 * lib/abitset.c (abitset_bytes): Return a size that is aligned
3910 properly for vectors of objects. Do not assume that adding a
3911 header size to a multiple of a word size yields a value that is
3912 properly aligned for the whole union.
3913 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3914
3915 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3916 unique names for structures.
3917 * lib/ebitset.c (ebitset_bytes): Likewise.
3918 * lib/lbitset.c (lbitset_bytes): Likewise.
3919
3920 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3921 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3922 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3923 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3924 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3925 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3926 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3927 to improve the type-checking that GCC can do.
3928 * lib/bitset.c (bitset_op4_cmp): Likewise.
3929 * lib/bitset_stats.c (bitset_stats_count,
3930 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3931 bitset_stats_copy, bitset_stats_disjoint_p,
3932 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3933 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3934 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3935 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3936 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3937 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3938 bitset_stats_or_and_cmp): Likewise.
3939 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3940 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3941 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3942 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3943
3944 * lib/abitset.h: Include bitset.h, not bbitset.h.
3945 * lib/ebitset.h: Likewise.
3946 * lib/lbitset.h: Likewise.
3947
3948 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3949 All instances of parameters of type enum bitset_opts are now of
3950 type enum_bitset_opts, to conform to the C Standard, and similarly
3951 for enum_bitset_type.
3952 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3953 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3954
3955 Do not use "struct bitset_struct" to mean different things in
3956 different modules. Not only is this confusing, it violates
3957 the C Standard, which requires that structure types in different
3958 modules must be compatible if one is to be passed to the other.
3959 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3960 All instances of "struct bitset_struct *" replaced with "bitset".
3961 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3962 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3963 struct lbitset_struct, struct bitset_stats_struct): New types.
3964 All uses of struct bitset_struct changed to union bitset_union,
3965 etc.
3966 * lib/abitset.c (struct abitset_struct, abitset,
3967 struct bitset_struct): Remove.
3968 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3969 struct bitset_struct): Remove.
3970 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3971 bitset_struct): Remove.
3972 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3973 Likewise.
3974
3975 Do not call a function of type T using a call that assumes the
3976 function is of a different type U. Standard C requires that a
3977 function must be called with a type that is compatible with its
3978 definition.
3979 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3980 New decls.
3981 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3982 New functions.
3983 * lib/ebitset.c (PFV): Remove.
3984 * lib/lbitset.c (PFV): Likewise.
3985 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3986 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3987 decls.
3988 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3989 (ebitset_vtable): Use them.
3990 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3991 lbitset_xor): New functions.
3992 (lbitset_vtable): Use them.
3993
3994 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3995 Declare.
3996
3997 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3998 GCC warning.
3999 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
4000 Use offsetof, for simplicity.
4001
4002 2002-10-06 Paul Eggert <eggert@twinsun.com>
4003
4004 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
4005 the same width as int. This reapplies a hunk of the 2002-08-12 patch
4006 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
4007 which was inadvertently undone by the 2002-09-30 patch.
4008 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
4009 the same width as int.
4010
4011 2002-10-04 Paul Eggert <eggert@twinsun.com>
4012
4013 Version 1.50.
4014
4015 * configure.ac (AC_INIT), NEWS: Increment version number.
4016
4017 * doc/bison.texinfo: Minor spelling, grammar, and white space
4018 fixes.
4019 (Symbols): Mention that any negative value returned from yylex
4020 signifies end-of-input. Warn about negative chars. Mention
4021 the portable Standard C character set.
4022
4023 The GNU coding standard says CFLAGS and YFLAGS are reserved
4024 for the installer to set.
4025 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
4026 * src/Makefile.am (AM_CFLAGS): Likewise.
4027 (AM_YFLAGS): Renamed from YFLAGS.
4028
4029 Fix some MAX and MIN problems.
4030 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
4031 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
4032 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
4033 * src/reader.c (reader): Use it.
4034
4035 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
4036 POSIX 1003.1-2001 has removed fgrep.
4037
4038 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
4039
4040 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
4041 interpreted as signed.
4042 * lib/ebitset.c (ebitset_list): Fix bug.
4043
4044 2002-10-01 Paul Eggert <eggert@twinsun.com>
4045
4046 More fixes for 64-bit hosts and large bitsets.
4047
4048 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
4049 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
4050 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
4051 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
4052 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
4053 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
4054 bitset_count_): Likewise.
4055 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
4056 bitset_first, bitset_last): Likewise.
4057 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
4058 bitset_stats_list_reverse, bitset_stats_size,
4059 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
4060 Likewise.
4061 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
4062 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
4063 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
4064 bitsetv_reflexive_transitive_closure): Likewise.
4065 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
4066 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
4067 Likewise.
4068 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
4069 Likewise.
4070
4071 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
4072 Use size_t, not unsigned int, to count bytes.
4073 * lib/abitset.h (abitset_bytes): Likewise.
4074 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
4075 Likewise.
4076 * lib/bitset.h (bitset_bytes): Likewise.
4077 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
4078 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
4079 * lib/bitsetv.c (bitsetv_alloc): Likewise.
4080 * lib/ebitset.c (ebitset_bytes): Likewise.
4081 * lib/ebitset.h (ebitset_bytes): Likewise.
4082 * lib/lbitset.c (lbitset_bytes): Likewise.
4083 * lib/lbitset.h (lbitset_bytes): Likewise.
4084
4085 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
4086 abitset_subset_p, abitset_disjoint_p, abitset_and,
4087 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
4088 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
4089 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
4090 abitset_or_and, abitset_or_and_cmp):
4091 Use bitset_windex instead of unsigned int.
4092 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
4093 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
4094 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
4095 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
4096 Likewise.
4097 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
4098
4099 * lib/bitset.c (bitset_print):
4100 Use proper printf formats for widths of integer types.
4101 * lib/bitset_stats.c (bitset_percent_histogram_print,
4102 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
4103 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
4104 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
4105 * lib/lbitset.c (lbitset_bytes): Likewise.
4106
4107 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
4108 BITSET_SIZE_MAX): New macros.
4109 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
4110 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
4111 to BITSET_WINDEX_MAX.
4112
4113 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
4114 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
4115 since we now return the bitset_bindex type (not int).
4116
4117 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
4118 when computing sizes.
4119 * lib/ebitset.c (ebitset_elts_grow): Likewise.
4120
4121 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
4122 and avoid cast to unsigned.
4123
4124 2002-09-30 Akim Demaille <akim@epita.fr>
4125
4126 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
4127 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
4128 Updates from Michael Hayes.
4129
4130 2002-09-30 Art Haas <ahaas@neosoft.com>
4131
4132 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
4133 invocations.
4134 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
4135 defined.
4136
4137 2002-09-27 Akim Demaille <akim@epita.fr>
4138
4139 Version 1.49c.
4140
4141 2002-09-27 Akim Demaille <akim@epita.fr>
4142
4143 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
4144 (Because of AC_LIBSOURCE).
4145
4146 2002-09-27 Akim Demaille <akim@epita.fr>
4147
4148 Playing with Autoscan.
4149
4150 * configure.ac: Remove the old LIBOBJ tweaks.
4151 (AC_REPLACE_FUNCS): Add strrchr and strtol.
4152 * lib/strrchr.c: New.
4153 * lib/strtol.c: New, from the Coreutils 4.5.1.
4154
4155 2002-09-27 Akim Demaille <akim@epita.fr>
4156
4157 Playing with Autoscan.
4158
4159 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
4160 * lib/Makefile.am (libbison_a_SOURCES): No longer include
4161 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
4162 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
4163 Coreutils 4.5.1.
4164
4165 2002-09-24 Akim Demaille <akim@epita.fr>
4166
4167 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
4168 (Frequently Asked Questions, Parser Stack Overflow): New.
4169
4170 2002-09-13 Akim Demaille <akim@epita.fr>
4171
4172 Playing with autoscan.
4173
4174 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
4175 * src/files.c (skeleton_find): Remove, unused.
4176 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
4177 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
4178
4179 2002-09-13 Akim Demaille <akim@epita.fr>
4180
4181 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
4182 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
4183
4184 2002-09-13 Akim Demaille <akim@epita.fr>
4185
4186 * configure.ac: Require 2.54.
4187 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
4188 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
4189 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
4190 Remove, provided by Autoconf macros.
4191
4192 2002-09-12 Akim Demaille <akim@epita.fr>
4193
4194 * m4/prereq.m4: Update, from Coreutils 4.5.1.
4195
4196 2002-09-12 Akim Demaille <akim@epita.fr>
4197
4198 * m4/prereq.m4: Update, from Fileutils 4.1.5.
4199 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
4200 Reported by Martin Mokrejs.
4201
4202 2002-09-10 Akim Demaille <akim@epita.fr>
4203
4204 * src/parse-gram.y: Associate a human readable string to each
4205 token type.
4206 * tests/regression.at (Invalid inputs): Adjust.
4207
4208 2002-09-10 Gary V. Vaughan <gary@gnu.org>
4209
4210 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
4211 with an Autoconf-2.5x style configure.ac.
4212
4213 2002-09-06 Paul Eggert <eggert@twinsun.com>
4214
4215 * doc/bison.texinfo (Conditions): Make explicit that the GPL
4216 exception applies only to yacc.c. This is a modification of a
4217 patch originally suggested by Akim Demaille.
4218
4219 2002-09-06 Akim Demaille <akim@epita.fr>
4220
4221 * data/c.m4 (b4_copyright): Move the GPL exception comment from
4222 here to...
4223 * data/yacc.c: here.
4224
4225 * data/lalr1.cc (struct yyltype): Don't define it, since we use
4226 LocationType.
4227 (b4_ltype): Default to yy::Location from location.hh.
4228
4229 2002-09-04 Jim Meyering <jim@meyering.net>
4230
4231 * data/yacc.c: Guard the declaration of yytoknum also with
4232 `#ifdef YYPRINT', so it is declared only when used.
4233
4234 2002-09-04 Akim Demaille <akim@epita.fr>
4235
4236 * configure.in: Rename as...
4237 * configure.ac: this.
4238 Bump to 1.49c.
4239
4240 2002-09-04 Akim Demaille <akim@epita.fr>
4241
4242 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
4243 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
4244 translate maintainer only messages.
4245
4246 2002-08-12 Paul Eggert <eggert@twinsun.com>
4247
4248 Version 1.49b.
4249
4250 * Makefile.am (SUBDIRS): Remove intl.
4251 (DISTCLEANFILES): Remove.
4252 * NEWS: Mention that GNU M4 is now required. Clarify what is
4253 meant by "larger grammars". Mention the pt_BR translation.
4254 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
4255 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
4256 Bump version from 0.11.2 to 0.11.5.
4257 (BISON_PREREQ_STAGE): Remove.
4258 (AM_GNU_GETTEXT): Use external gettext.
4259 (AC_OUTPUT): Remove intl/Makefile.
4260
4261 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
4262
4263 * data/glr.c: Include string.h, for strlen.
4264 (yyreportParseError): Use size_t for yysize.
4265 (yy_yypstack): No longer nested inside yypstates, as nested
4266 functions are not portable. Do not assume size_t is the
4267 same width as int.
4268 (yypstates): Do not assume that ptrdiff_t is the same width
4269 as int, and similarly for yyposn and YYINDEX.
4270
4271 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
4272
4273 * lib/Makefile.am (INCLUDES): Do not include from the intl
4274 directory, which has been removed.
4275 * src/Makefile.am (INCLUDES): Likewise.
4276
4277 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
4278 (bitsets_sources, additional_bitsets_sources, timevars_sources):
4279 New vars.
4280
4281 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
4282 * tests/Makefile.am (EXTRA_DIST): Likewise.
4283
4284 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
4285 Do not assume that bitset_windex is the same width as unsigned.
4286
4287 * lib/abitset.c (abitset_unused_clear): Do not assume that
4288 bitset_word is the same width as int.
4289 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
4290 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
4291 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
4292 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
4293 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
4294
4295 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
4296 portability to one's complement hosts!).
4297 * lib/ebitset.c (ebitset_op1): Likewise.
4298 * lib/lbitset.c (lbitset_op1): Likewise.
4299
4300 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
4301 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4302 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
4303 Sync with fileutils.
4304 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
4305 lib/gettext.h: Sync with diffutils.
4306
4307 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
4308 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
4309
4310 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
4311 PROTOTYPES to check for prototypes, and "defined __STDC__" to
4312 check for void *.
4313
4314 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
4315 size_t; the old version tried to do this but casted improperly.
4316 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
4317 (bitset_test): Now returns int, not unsigned long.
4318
4319 * lib/bitset_stats.c: Include "gettext.h".
4320 (_): New macro.
4321 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
4322 name locals "index", as it generates unnecessary warnings on some
4323 hosts that have an "index" function.
4324
4325 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
4326 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
4327 they need translation.
4328 * src/LR0.c (state_list_append, new_itemsets, get_state,
4329 append_states, generate_states): Likewise.
4330 * src/assoc.c (assoc_to_string): Likewise.
4331 * src/closure.c (print_closure, set_firsts, closure): Likewise.
4332 * src/gram.c (grammar_dump): Likewise.
4333 * src/injections.c (injections_compute): Likewise.
4334 * src/lalr.c (lookaheads_print): Likewise.
4335 * src/relation.c (relation_transpose): Likewise.
4336 * src/scan-gram.l: Likewise.
4337 * src/tables.c (table_grow, pack_vector): Likewise.
4338
4339 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
4340 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
4341 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
4342 * m4/mbstate_t.m4: Sync with fileutils.
4343 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
4344
4345 * po/LINGUAS: Add pt_BR.
4346 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
4347 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
4348 lib/timevar.c.
4349 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
4350 manual recommends.
4351 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
4352
4353 * src/complain.c (strerror_r): Remove decl; not needed.
4354 (strerror): Use same pattern as ../lib/error.c.
4355
4356 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
4357
4358 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
4359
4360 * src/main.c (main): Cast result of bindtextdomain and textdomain
4361 to void, to avoid a GCC warning when --disable-nls is in effect.
4362
4363 * src/scan-gram.l: Use strings rather than escapes when possible,
4364 to minimize the number of warnings from xgettext.
4365 (handle_action_dollar, handle_action_at): Don't use isdigit,
4366 as it mishandles negative chars and it may not work as expected
4367 outside the C locale.
4368
4369 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
4370 this is a GCC extension and is not portable to other compilers.
4371
4372 * src/system.h (alloca): Use same pattern as ../lib/error.c.
4373 Do not include <ctype.h>; no longer needed.
4374 Do not include <malloc.h>; no longer needed (and generates
4375 warnings on OpenBSD 3.0).
4376
4377 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
4378 it's not portable.
4379
4380 * tests/regression.at: Do not use 'cc -c input.c -o input';
4381 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
4382
4383 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
4384 exit status as failure, not just exit status 1. Sun C exits
4385 with status 2 sometimes.
4386
4387 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
4388 Use it for the two large tests.
4389
4390 2002-08-02 Akim Demaille <akim@epita.fr>
4391
4392 * src/conflicts.c (conflicts_output): Don't output rules never
4393 reduced here, since anyway that computation doesn't work.
4394 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
4395 (rule_useless_p, rule_never_reduced_p): New.
4396 (grammar_rules_partial_print): Use a filter instead of a range.
4397 Display the title only if needed.
4398 (grammar_rules_print): Adjust.
4399 (grammar_rules_never_reduced_report): New.
4400 * src/tables.c (action_row): Move the computation of rules never
4401 reduced to...
4402 (token_actions): here.
4403 * src/main.c (main): Make the parser before making the report, so
4404 that rules never reduced are computed.
4405 Call grammar_rules_never_reduced_report.
4406 * src/print.c (print_results): Report rules never reduced.
4407 * tests/conflicts.at, tests/reduce.at: Adjust.
4408
4409 2002-08-01 Akim Demaille <akim@epita.fr>
4410
4411 Instead of attaching lookaheads and duplicating the rules being
4412 reduced by a state, attach the lookaheads to the reductions.
4413
4414 * src/state.h (state_t): Remove the `lookaheads',
4415 `lookaheads_rule' member.
4416 (reductions_t): Add a `lookaheads' member.
4417 Use a regular array for the `rules'.
4418 * src/state.c (reductions_new): Initialize the lookaheads member
4419 to 0.
4420 (state_rule_lookaheads_print): Adjust.
4421 * src/state.h, src/state.c (state_reductions_find): New.
4422 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
4423 (count_rr_conflicts): Adjust.
4424 * src/lalr.c (LArule): Remove.
4425 (add_lookback_edge): Adjust.
4426 (state_lookaheads_count): New.
4427 (states_lookaheads_initialize): Merge into...
4428 (initialize_LA): this.
4429 (lalr_free): Adjust.
4430 * src/main.c (main): Don't free nullable and derives too early: it
4431 is used by --verbose.
4432 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
4433
4434 2002-08-01 Akim Demaille <akim@epita.fr>
4435
4436 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
4437 `rule_number_t**'.
4438 (set_derives, free_derives): Rename as...
4439 (derives_compute, derives_free): this.
4440 Adjust all dependencies.
4441 * src/nullable.c (set_nullable, free_nullable): Rename as...
4442 (nullable_compute, nullable_free): these.
4443 (rule_list_t): Store rule_t *, not rule_number_t.
4444 * src/state.c (state_rule_lookaheads_print): Directly compare rule
4445 pointers, instead of their numbers.
4446 * src/main.c (main): Call nullable_free, and derives_free earlier,
4447 as they were lo longer used.
4448
4449 2002-08-01 Akim Demaille <akim@epita.fr>
4450
4451 * lib/timevar.c (get_time): Include children time.
4452 * src/lalr.h (LA, LArule): Don't export them: used with the
4453 state_t.
4454 * src/lalr.c (LA, LArule): Static.
4455 * src/lalr.h, src/lalr.c (lalr_free): New.
4456 * src/main.c (main): Call it.
4457 * src/tables.c (pack_vector): Check whether loc is >= to the
4458 table_size, not >.
4459 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
4460 (tables_generate): do it, since that's also it which allocates
4461 them.
4462 Don't free LA and LArule, main does.
4463
4464 2002-07-31 Akim Demaille <akim@epita.fr>
4465
4466 Separate parser tables computation and output.
4467
4468 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
4469 (conflict_list, conflict_list_cnt, table, check, table_ninf)
4470 (yydefgoto, yydefact, high): Move to...
4471 * src/tables.h, src/tables.c: here.
4472 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4473 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4474 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
4475 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
4476 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
4477 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
4478 (action_row, save_row, token_actions, save_column, default_goto)
4479 (goto_actions, sort_actions, matching_state, pack_vector)
4480 (table_ninf_remap, pack_table, prepare_actions): Move to...
4481 * src/tables.c: here.
4482 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
4483 * src/output.c (token_actions, output_base, output_conflicts)
4484 (output_check): Merge into...
4485 (prepare_actions): this.
4486 (actions_output): Rename as...
4487 (user_actions_output): this.
4488 * src/main.c (main): Call tables_generate and tables_free.
4489
4490 2002-07-31 Akim Demaille <akim@epita.fr>
4491
4492 Steal GCC's --time-report support.
4493
4494 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
4495 stolen/adjusted from GCC.
4496 * m4/stage.m4: Remove time related checks.
4497 * m4/timevar.m4: New.
4498 * configure.in: Adjust.
4499 * src/system.h: Adjust to using timevar.h.
4500 * src/getargs.h, src/getargs.c: Support trace_time for
4501 --trace=time.
4502 * src/main.c (stage): Remove.
4503 (main): Replace `stage' invocations with timevar calls.
4504 * src/output.c: Insert pertinent timevar calls.
4505
4506 2002-07-31 Akim Demaille <akim@epita.fr>
4507
4508 Let --trace have arguments.
4509
4510 * src/getargs.h (enum trace_e): New.
4511 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
4512 (long_options, short_options): --trace/-T takes an optional
4513 argument.
4514 Change all the uses of trace_flag to reflect the new flags.
4515 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
4516
4517 Strengthen `stage' portability.
4518
4519 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
4520 * configure.in: Use it.
4521 Don't check for malloc.h and sys/times.h.
4522 * src/system.h: Include them when appropriate.
4523 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
4524 times and struct tms are available.
4525
4526 2002-07-30 Akim Demaille <akim@epita.fr>
4527
4528 In verbose parse error message, don't report `error' as an
4529 expected token.
4530 * tests/actions.at (Printers and Destructors): Adjust.
4531 * tests/calc.at (Calculator $1): Adjust.
4532 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
4533 error message, do not report the parser accepts the error token in
4534 that state.
4535
4536 2002-07-30 Akim Demaille <akim@epita.fr>
4537
4538 Normalize conflict related messages.
4539
4540 * src/complain.h, src/complain.c (warn, complain): New.
4541 * src/conflicts.c (conflicts_print): Use them.
4542 (conflict_report_yacc): New, extracted from...
4543 (conflicts_print): here.
4544 * tests/conflicts.at, tests/existing.at: Adjust.
4545
4546 2002-07-30 Akim Demaille <akim@epita.fr>
4547
4548 Report rules which are never reduced by the parser: those hidden
4549 by conflicts.
4550
4551 * src/LR0.c (save_reductions): Don't make the final state too
4552 different: save its reduction (accept) instead of having a state
4553 without any action (no shift or goto, no reduce).
4554 Note: the final state is now a ``regular'' state, i.e., the
4555 parsers now contain `reduce 0' as default reduction.
4556 Nevertheless, since they decide to `accept' when yystate =
4557 final_state, they still will not reduce rule 0.
4558 * src/print.c (print_actions, print_reduction): Adjust.
4559 * src/output.c (action_row): Track reduced rules.
4560 (token_actions): Report rules never reduced.
4561 * tests/conflicts.at, tests/regression.at: Adjust.
4562
4563 2002-07-30 Akim Demaille <akim@epita.fr>
4564
4565 `stage' was accidently included in a previous patch.
4566 Initiate its autoconfiscation.
4567
4568 * configure.in: Look for malloc.h and sys/times.h.
4569 * src/main.c (stage): Adjust.
4570 Report only when trace_flag.
4571
4572 2002-07-29 Akim Demaille <akim@epita.fr>
4573
4574 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
4575 state_number_t.
4576 (errs_t): symbol_t*, not symbol_number_t.
4577 (reductions_t): rule_t*, not rule_number_t.
4578 (FOR_EACH_SHIFT): New.
4579 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
4580 * src/print.c, src/print_graph.c: Adjust.
4581
4582 2002-07-29 Akim Demaille <akim@epita.fr>
4583
4584 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
4585
4586 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
4587 (endtoken, accept): these.
4588 * src/reader.c (reader): Set endtoken's default tag to "$end".
4589 Set undeftoken's tag to "$undefined" instead of "$undefined.".
4590 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
4591 Adjust.
4592
4593 2002-07-29 Akim Demaille <akim@epita.fr>
4594
4595 * src/reduce.c (reduce_grammar): When the language is empty,
4596 complain about the start symbol, not the axiom.
4597 Use its location.
4598 * tests/reduce.at (Empty Language): New.
4599
4600 2002-07-26 Akim Demaille <akim@epita.fr>
4601
4602 * src/reader.h, src/reader.c (gram_error): ... can't get
4603 yycontrol without making too strong assumptions on the parser
4604 itself.
4605 * src/output.c (prepare_tokens): Use the real 0th value of
4606 token_translations instead of `0'.
4607 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
4608 visible here.
4609 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
4610 for the time being: %locations ought to provide it to yyerror.
4611
4612 2002-07-25 Akim Demaille <akim@epita.fr>
4613
4614 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
4615 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
4616 * tests/regression.at (Web2c Actions): Adjust.
4617
4618 2002-07-25 Akim Demaille <akim@epita.fr>
4619
4620 Stop storing rules from 1 to nrules + 1.
4621
4622 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
4623 * src/nullable.c, src/output.c, src/print.c, src/reader.c
4624 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
4625 Iterate from 0 to nrules.
4626 Use rule_number_as_item_number and item_number_as_rule_number.
4627 Adjust to `derive' now containing possibly 0.
4628 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
4629 Handle the `- 1' part in rule numbers from/to item numbers.
4630 * src/conflicts.c (log_resolution): Fix the message which reversed
4631 shift and reduce.
4632 * src/output.c (action_row): Initialize default_rule to -1.
4633 (token_actions): Adjust.
4634 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
4635 expected output.
4636 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
4637
4638 2002-07-25 Akim Demaille <akim@epita.fr>
4639
4640 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
4641 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
4642 (b4_c_knr_arg_decl): New.
4643 * data/yacc.c: Use it to define yysymprint, yydestruct, and
4644 yyreport_parse_error.
4645
4646 2002-07-25 Akim Demaille <akim@epita.fr>
4647
4648 * data/yacc.c (yyreport_parse_error): New, extracted from...
4649 (yyparse): here.
4650 (yydestruct, yysymprint): Move above yyparse.
4651 Be K&R compliant.
4652
4653 2002-07-25 Akim Demaille <akim@epita.fr>
4654
4655 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
4656 replace...
4657 (b4_sint_type, b4_uint_type): these.
4658 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
4659 * tests/regression.at (Web2c Actions): Adjust.
4660
4661 2002-07-25 Akim Demaille <akim@epita.fr>
4662
4663 * src/gram.h (TIEM_NUMBER_MAX): New.
4664 (item_number_of_rule_number, rule_number_of_item_number): Rename
4665 as...
4666 (rule_number_as_item_number, item_number_as_rule_number): these.
4667 Adjust dependencies.
4668 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
4669 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
4670 (symbol_number_to_vector_number): New.
4671 (order): Of vector_number_t* type.
4672 (base_t, BASE_MAX, BASE_MIN): New.
4673 (froms, tos, width, pos, check): Of base_t type.
4674 (action_number_t, ACTION_MIN, ACTION_MAX): New.
4675 (actrow): Of action_number_t type.
4676 (conflrow): Of unsigned int type.
4677 (table_ninf, base_ninf): New.
4678 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
4679 (muscle_insert_int_table, muscle_insert_base_table)
4680 (muscle_insert_rule_number_table): New.
4681 (prepare_tokens): Output `toknum' as int_table.
4682 (action_row): Returns a rule_number_t.
4683 Use ACTION_MIN, not SHRT_MIN.
4684 (token_actions): yydefact is rule_number_t*.
4685 (table_ninf_remap): New.
4686 (pack_table): Use it for `base' and `table'.
4687 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
4688 replaced with...
4689 (YYPACT_NINF, YYTABLE_NINF): these.
4690 (yypact, yytable): Compute their types instead of hard-coded
4691 `short'.
4692 * tests/regression.at (Web2c Actions): Adjust.
4693
4694 2002-07-19 Akim Demaille <akim@epita.fr>
4695
4696 * src/scan-gram.l (id): Can start with an underscore.
4697
4698 2002-07-16 Akim Demaille <akim@epita.fr>
4699
4700 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
4701 Adjust all former `associativity' dependencies.
4702 * src/symtab.c (symbol_new): Default associativity is `undef', not
4703 `right'.
4704 (symbol_check_alias_consistence): Adjust.
4705
4706 2002-07-09 Akim Demaille <akim@epita.fr>
4707
4708 * doc/bison.texinfo: Properly set the ``header'' part.
4709 Use @dircategory ``GNU programming tools'' as per Texinfo's
4710 documentation.
4711 Use @copying.
4712
4713 2002-07-09 Akim Demaille <akim@epita.fr>
4714
4715 * lib/quotearg.h: Protect against multiple inclusions.
4716 * src/location.h (location_t): Add a `file' member.
4717 (LOCATION_RESET, LOCATION_PRINT): Adjust.
4718 * src/complain.c (warn_at, complain_at, fatal_at): Drop
4719 `error_one_per_line' support.
4720
4721 2002-07-09 Akim Demaille <akim@epita.fr>
4722
4723 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
4724 * src/reader.c (lineno): Remove.
4725 Adjust all dependencies.
4726 (get_merge_function): Take a location and use complain_at.
4727 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
4728 * tests/regression.at (Invalid inputs, Mixing %token styles):
4729 Adjust.
4730
4731 2002-07-09 Akim Demaille <akim@epita.fr>
4732
4733 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
4734 recovery rule, and forbid extensions when --yacc.
4735 (gram_error): Use complain_at.
4736 * src/reader.c (reader): Exit if there were parse errors.
4737
4738 2002-07-09 Akim Demaille <akim@epita.fr>
4739
4740 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
4741 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
4742 Reported by R Blake <blakers@mac.com>.
4743
4744 2002-07-09 Akim Demaille <akim@epita.fr>
4745
4746 * data/yacc.c: Output the copyright notive in the header.
4747
4748 2002-07-03 Akim Demaille <akim@epita.fr>
4749
4750 * src/output.c (froms, tos): Are state_number_t.
4751 (save_column): sp, sp1, and sp2 are state_number_t.
4752 (prepare): Rename `final' as `final_state_number', `nnts' as
4753 `nterms_number', `nrules' as `rules_number', `nstates' as
4754 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
4755 unused.
4756 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
4757 * data/lalr1.cc (nsym_): Remove, unused.
4758
4759 2002-07-03 Akim Demaille <akim@epita.fr>
4760
4761 * src/lalr.h, src/lalr.c (goto_number_t): New.
4762 * src/lalr.c (goto_list_t): New.
4763 Propagate them.
4764 * src/nullable.c (rule_list_t): New.
4765 Propagate.
4766 * src/types.h: Remove.
4767
4768 2002-07-03 Akim Demaille <akim@epita.fr>
4769
4770 * src/closure.c (print_fderives): Use rule_rhs_print.
4771 * src/derives.c (print_derives): Use rule_rhs_print.
4772 (rule_list_t): New, replaces `shorts'.
4773 (set_derives): Add comments.
4774 * tests/sets.at (Nullable, Firsts): Adjust.
4775
4776 2002-07-03 Akim Demaille <akim@epita.fr>
4777
4778 * src/output.c (prepare_actions): Free `tally' and `width'.
4779 (prepare_actions): Allocate and free `order'.
4780 * src/symtab.c (symbols_free): Free `symbols'.
4781 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
4782 * src/output.c (m4_invoke): Move to...
4783 * src/scan-skel.l: here.
4784 (<<EOF>>): Close yyout, and free its name.
4785
4786 2002-07-03 Akim Demaille <akim@epita.fr>
4787
4788 Fix some memory leaks, and fix a bug: state 0 was examined twice.
4789
4790 * src/LR0.c (new_state): Merge into...
4791 (state_list_append): this.
4792 (new_states): Merge into...
4793 (generate_states): here.
4794 (set_states): Don't ensure a proper `errs' state member here, do it...
4795 * src/conflicts.c (conflicts_solve): here.
4796 * src/state.h, src/state.c: Comment changes.
4797 (state_t): Rename member `shifts' as `transitions'.
4798 Adjust all dependencies.
4799 (errs_new): For consistency, also take the values as argument.
4800 (errs_dup): Remove.
4801 (state_errs_set): New.
4802 (state_reductions_set, state_transitions_set): Assert that no
4803 previous value was assigned.
4804 (state_free): New.
4805 (states_free): Use it.
4806 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
4807 temporary storage: use `errs' and `nerrs' as elsewhere.
4808 (set_conflicts): Allocate and free this `errs'.
4809
4810 2002-07-02 Akim Demaille <akim@epita.fr>
4811
4812 * lib/libiberty.h: New.
4813 * lib: Update the bitset implementation from upstream.
4814 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
4815 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
4816 * src/main.c: Adjust bitset stats calls.
4817
4818 2002-07-01 Paul Eggert <eggert@twinsun.com>
4819
4820 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
4821 char, so that negative chars don't collide with $.
4822
4823 2002-06-30 Akim Demaille <akim@epita.fr>
4824
4825 Have the GLR tests be `warning' checked, and fix the warnings.
4826
4827 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
4828 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
4829 (yyremoveDeletes): `yyi' and `yyj' are size_t.
4830 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
4831 (yyaddDeferredAction): static.
4832 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
4833 (yyreportParseError): yyprefix is const.
4834 yytokenp is used only when verbose.
4835 (yy__GNUC__): Replace with __GNUC__.
4836 (yypdumpstack): yyi is size_t.
4837 (yypreference): Un-yy local variables and arguments, to avoid
4838 clashes with `yyr1'. Anyway, we are not in the user name space.
4839 (yytname_size): be an int, as is compared with ints.
4840 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
4841 Use them.
4842 * tests/cxx-gram.at: Use quotation to protect $1.
4843 Use AT_COMPILE to enable warnings hunts.
4844 Prototype yylex and yyerror.
4845 `Use' argc.
4846 Include `string.h', not `strings.h'.
4847 Produce and prototype stmtMerge only when used.
4848 yylex takes a location.
4849
4850 2002-06-30 Akim Demaille <akim@epita.fr>
4851
4852 We spend a lot of time in quotearg, in particular when --verbose.
4853
4854 * src/symtab.c (symbol_get): Store a quoted version of the key.
4855 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
4856 Adjust all callers.
4857
4858 2002-06-30 Akim Demaille <akim@epita.fr>
4859
4860 * src/state.h (reductions_t): Rename member `nreds' as num.
4861 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
4862 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
4863
4864 2002-06-30 Akim Demaille <akim@epita.fr>
4865
4866 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
4867 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
4868 (shifts_to): Rename as...
4869 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
4870 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
4871 (TRANSITION_IS_DISABLED, transitions_to): these.
4872
4873 2002-06-30 Akim Demaille <akim@epita.fr>
4874
4875 * src/print.c (print_shifts, print_gotos): Merge into...
4876 (print_transitions): this.
4877 (print_transitions, print_errs, print_reductions): Align the
4878 lookaheads columns.
4879 (print_core, print_transitions, print_errs, print_state,
4880 print_grammar): Output empty lines separator before, not after.
4881 (state_default_rule_compute): Rename as...
4882 (state_default_rule): this.
4883 * tests/conflicts.at (Defaulted Conflicted Reduction),
4884 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
4885 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
4886
4887 2002-06-30 Akim Demaille <akim@epita.fr>
4888
4889 Display items as we display rules.
4890
4891 * src/gram.h, src/gram.c (rule_lhs_print): New.
4892 * src/gram.c (grammar_rules_partial_print): Use it.
4893 * src/print.c (print_core): Likewise.
4894 * tests/conflicts.at (Defaulted Conflicted Reduction),
4895 (Unresolved SR Conflicts): Adjust.
4896 (Unresolved SR Conflicts): Adjust and rename as...
4897 (Resolved SR Conflicts): this, as was meant.
4898 * tests/regression.at (Web2c Report): Adjust.
4899
4900 2002-06-30 Akim Demaille <akim@epita.fr>
4901
4902 * src/print.c (state_default_rule_compute): New, extracted from...
4903 (print_reductions): here.
4904 Pessimize, but clarify the code.
4905 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
4906
4907 2002-06-30 Akim Demaille <akim@epita.fr>
4908
4909 * src/output.c (action_row): Let default_rule be always a rule
4910 number.
4911
4912 2002-06-30 Akim Demaille <akim@epita.fr>
4913
4914 * src/closure.c (print_firsts, print_fderives, closure):
4915 Use BITSET_EXECUTE.
4916 * src/lalr.c (lookaheads_print): Likewise.
4917 * src/state.c (state_rule_lookaheads_print): Likewise.
4918 * src/print_graph.c (print_core): Likewise.
4919 * src/print.c (print_reductions): Likewise.
4920 * src/output.c (action_row): Likewise.
4921 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4922
4923 2002-06-30 Akim Demaille <akim@epita.fr>
4924
4925 * src/print_graph.c: Use report_flag.
4926
4927 2002-06-30 Akim Demaille <akim@epita.fr>
4928
4929 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4930 to...
4931 * src/relation.h, src/relation.c (traverse, relation_digraph)
4932 (relation_print, relation_transpose): New.
4933
4934 2002-06-30 Akim Demaille <akim@epita.fr>
4935
4936 * src/state.h, src/state.c (shifts_to): New.
4937 * src/lalr.c (build_relations): Use it.
4938
4939 2002-06-30 Akim Demaille <akim@epita.fr>
4940
4941 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4942 (item_number_of_rule_number, rule_number_of_item_number): New.
4943 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4944 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4945 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4946 Propagate their use.
4947 Much remains to be done, in particular wrt `shorts' from types.h.
4948
4949 2002-06-30 Akim Demaille <akim@epita.fr>
4950
4951 * src/symtab.c (symbol_new): Initialize the `printer' member.
4952
4953 2002-06-30 Akim Demaille <akim@epita.fr>
4954
4955 * src/LR0.c (save_reductions): Remove, replaced by...
4956 * src/state.h, src/state.c (state_reductions_set): New.
4957 (reductions, errs): Rename as...
4958 (reductions_t, errs_t): these.
4959 Adjust all dependencies.
4960
4961 2002-06-30 Akim Demaille <akim@epita.fr>
4962
4963 * src/LR0.c (state_list_t, state_list_append): New.
4964 (first_state, last_state): Now symbol_list_t.
4965 (this_state): Remove.
4966 (new_itemsets, append_states, save_reductions): Take a state_t as
4967 argument.
4968 (set_states, generate_states): Adjust.
4969 (save_shifts): Remove, replaced by...
4970 * src/state.h, src/state.c (state_shifts_set): New.
4971 (shifts): Rename as...
4972 (shifts_t): this.
4973 Adjust all dependencies.
4974 * src/state.h (state_t): Remove the `next' member.
4975
4976 2002-06-30 Akim Demaille <akim@epita.fr>
4977
4978 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4979 escaped in slot 0.
4980
4981 2002-06-30 Akim Demaille <akim@epita.fr>
4982
4983 Use hash.h for the state hash table.
4984
4985 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4986 (allocate_storage): Use state_hash_new.
4987 (free_storage): Use state_hash_free.
4988 (new_state, get_state): Adjust.
4989 * src/lalr.h, src/lalr.c (states): Move to...
4990 * src/states.h (state_t): Remove the `link' member, no longer
4991 used.
4992 * src/states.h, src/states.c: here.
4993 (state_hash_new, state_hash_free, state_hash_lookup)
4994 (state_hash_insert, states_free): New.
4995 * src/states.c (state_table, state_compare, state_hash): New.
4996 * src/output.c (output_actions): Do not free states now, since we
4997 still need to know the final_state number in `prepare', called
4998 afterwards. Do it...
4999 * src/main.c (main): here: call states_free after `output'.
5000
5001 2002-06-30 Akim Demaille <akim@epita.fr>
5002
5003 * src/state.h, src/state.c (state_new): New, extracted from...
5004 * src/LR0.c (new_state): here.
5005 * src/state.h (STATE_ALLOC): Move to...
5006 * src/state.c: here.
5007 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
5008 * src/state.h, src/state.c: here.
5009
5010 2002-06-30 Akim Demaille <akim@epita.fr>
5011
5012 * src/reader.c (gensym): Rename as...
5013 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
5014 (getsym): Rename as...
5015 (symbol_get): this.
5016
5017 2002-06-30 Akim Demaille <akim@epita.fr>
5018
5019 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
5020 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
5021 * src/output.c, src/print.c, src/print_graph.c: Propagate.
5022 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
5023
5024 2002-06-30 Akim Demaille <akim@epita.fr>
5025
5026 Make the test suite pass with warnings checked.
5027
5028 * tests/actions.at (Printers and Destructors): Improve.
5029 Avoid unsigned vs. signed issues.
5030 * tests/calc.at: Don't exercise the scanner here, do it...
5031 * tests/input.at (Torturing the Scanner): here.
5032
5033 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5034
5035 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
5036 reorganize first lines parallel to yacc.c.
5037
5038 2002-06-28 Akim Demaille <akim@epita.fr>
5039
5040 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
5041 (b4_token_enum, b4_token_defines): New, factored from...
5042 * data/lalr1.cc, data/yacc.c, glr.c: here.
5043
5044 2002-06-28 Akim Demaille <akim@epita.fr>
5045
5046 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
5047 unused variables.
5048 * src/output.c (merger_output): static.
5049
5050 2002-06-28 Akim Demaille <akim@epita.fr>
5051
5052 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
5053 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
5054 pacify GCC.
5055 * src/output.c (save_row): Initialize all the variables to pacify GCC.
5056
5057 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5058
5059 Accumulated changelog for new GLR parsing features.
5060
5061 * src/conflicts.c (count_total_conflicts): Change name to
5062 conflicts_total_count.
5063 * src/conflicts.h: Ditto.
5064 * src/output.c (token_actions): Use the new name.
5065 (output_conflicts): Change conflp => conflict_list_heads, and
5066 confl => conflict_list for better readability.
5067 * data/glr.c: Use the new names.
5068 * NEWS: Add self to GLR announcement.
5069
5070 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
5071
5072 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
5073 Akim Demaille.
5074
5075 * data/bison.glr: Change name to glr.c
5076 * data/glr.c: Renamed from bison.glr.
5077 * data/Makefile.am: Add glr.c
5078
5079 * src/getargs.c:
5080
5081 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
5082 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
5083
5084 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5085
5086 * data/bison.glr: Be sure to restore the
5087 current #line when returning to the skeleton contents after having
5088 exposed the input file's #line.
5089
5090 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5091
5092 * data/bison.glr: Bring up to date with changes to bison.simple.
5093
5094 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5095
5096 * data/bison.glr: Correct definitions that use b4_prefix.
5097 Various reformatting.
5098 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
5099 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
5100 yytokenp argument; now part of stack.
5101 (yychar): Define to behave as documented.
5102 (yyclearin): Ditto.
5103
5104 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5105
5106 * src/reader.h: Add declaration for free_merger_functions.
5107
5108 * src/reader.c (merge_functions): New variable.
5109 (get_merge_function): New function.
5110 (free_merger_functions): New function.
5111 (readgram): Check for %prec that is not followed by a symbol.
5112 Handle %dprec and %merge declarations.
5113 (packgram): Initialize dprec and merger fields in rules array.
5114
5115 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
5116 conflict_list_cnt, conflict_list_free): New variables.
5117 (table_grow): Also grow conflict_table.
5118 (prepare_rules): Output dprec and merger tables.
5119 (conflict_row): New function.
5120 (action_row): Output conflict lists for GLR parser. Don't use
5121 default reduction in conflicted states for GLR parser so that there
5122 are spaces for the conflict lists.
5123 (save_row): Also save conflict information.
5124 (token_actions): Allocate conflict list.
5125 (merger_output): New function.
5126 (pack_vector): Pack conflict table, too.
5127 (output_conflicts): New function to output yyconflp and yyconfl.
5128 (output_check): Allocate conflict_tos.
5129 (output_actions): Output conflict tables, also.
5130 (output_skeleton): Output b4_mergers definition.
5131 (prepare): Output b4_max_rhs_length definition.
5132 Use 'bison.glr' as default skeleton for GLR parsers.
5133
5134 * src/gram.c (glr_parser): New flag.
5135 (grammar_free): Call free_merger_functions.
5136
5137 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
5138 all pairs of conflicting reductions, rather than just all tokens
5139 causing conflicts. Needed to size conflict tables.
5140 (conflicts_output): Modify call to count_rr_conflicts for new
5141 interface.
5142 (conflicts_print): Ditto.
5143 (count_total_conflicts): New function.
5144
5145 * src/reader.h (merger_list): New type.
5146 (merge_functions): New variable.
5147
5148 * src/lex.h (tok_dprec, tok_merge): New token types.
5149
5150 * src/gram.h (rule_s): Add dprec and merger fields.
5151 (glr_parser): New flag.
5152
5153 * src/conflicts.h (count_total_conflicts): New function.
5154
5155 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
5156
5157 * doc/bison.texinfo (Generalized LR Parsing): New section.
5158 (GLR Parsers): New section.
5159 (Language and Grammar): Mention GLR parsing.
5160 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
5161 Correct typo ("tge" -> "the").
5162
5163 * data/bison.glr: New skeleton for GLR parsing.
5164
5165 * tests/cxx-gram.at: New tests for GLR parsing.
5166
5167 * tests/testsuite.at: Include cxx-gram.at.
5168
5169 * tests/Makefile.am: Add cxx-gram.at.
5170
5171 * src/parse-gram.y:
5172
5173 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
5174
5175 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
5176
5177 2002-06-27 Akim Demaille <akim@epita.fr>
5178
5179 * src/options.h, src/options.c: Remove.
5180 * src/getargs.c (short_options, long_options): New.
5181
5182 2002-06-27 Akim Demaille <akim@epita.fr>
5183
5184 * data/bison.simple, data/bison.c++: Rename as...
5185 * data/yacc.c, data/lalr1.cc: these.
5186 * doc/bison.texinfo (Environment Variables): Remove.
5187
5188 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
5189
5190 * src/getargs.c (report_argmatch): Initialize strtok().
5191
5192 2002-06-20 Akim Demaille <akim@epita.fr>
5193
5194 * data/bison.simple (b4_symbol_actions): New, replaces...
5195 (b4_symbol_destructor, b4_symbol_printer): these.
5196 (yysymprint): Be sure to call YYPRINT only for tokens, and using
5197 user token numbers.
5198
5199 2002-06-20 Akim Demaille <akim@epita.fr>
5200
5201 * data/bison.simple (yydestructor): Rename as...
5202 (yydestruct): this.
5203
5204 2002-06-20 Akim Demaille <akim@epita.fr>
5205
5206 * src/symtab.h, src/symtab.c (symbol_type_set)
5207 (symbol_destructor_set, symbol_precedence_set): The location is
5208 the last argument.
5209 Adjust all callers.
5210
5211 2002-06-20 Akim Demaille <akim@epita.fr>
5212
5213 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
5214 internals.
5215 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
5216 Takes a location.
5217 * src/symtab.h, src/symtab.c (symbol_class_set)
5218 (symbol_user_token_number_set): Likewise.
5219 Adjust all callers.
5220 Promote complain_at.
5221 * tests/input.at (Type Clashes): Adjust.
5222
5223 2002-06-20 Akim Demaille <akim@epita.fr>
5224
5225 * data/bison.simple (YYLEX): Fix the declaration when
5226 %pure-parser.
5227
5228 2002-06-20 Akim Demaille <akim@epita.fr>
5229
5230 * data/bison.simple (yysymprint): Don't print the token number,
5231 just its name.
5232 * tests/actions.at (Destructors): Rename as...
5233 (Printers and Destructors): this.
5234 Also exercise %printer.
5235
5236 2002-06-20 Akim Demaille <akim@epita.fr>
5237
5238 * data/bison.simple (YYDSYMPRINT): New.
5239 Use it to remove many of the #if YYDEBUG/if (yydebug).
5240
5241 2002-06-20 Akim Demaille <akim@epita.fr>
5242
5243 * src/symtab.h, src/symtab.c (symbol_t): printer and
5244 printer_location are new members.
5245 (symbol_printer_set): New.
5246 * src/parse-gram.y (PERCENT_PRINTER): New token.
5247 Handle its associated rule.
5248 * src/scan-gram.l: Adjust.
5249 (handle_destructor_at, handle_destructor_dollar): Rename as...
5250 (handle_symbol_code_at, handle_symbol_code_dollar): these.
5251 * src/output.c (symbol_printers_output): New.
5252 (output_skeleton): Call it.
5253 * data/bison.simple (yysymprint): New. Cannot be named yyprint
5254 since there are already many grammar files with a user `yyprint'.
5255 Replace the calls to YYPRINT to calls to yysymprint.
5256 * tests/calc.at: Adjust.
5257 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
5258 taking advantage of parser very internal details (stack size!).
5259
5260 2002-06-20 Akim Demaille <akim@epita.fr>
5261
5262 * src/scan-gram.l: Complete the scanner with the missing patterns
5263 to pacify Flex.
5264 Use `quote' and `symbol_tag_get' where appropriate.
5265
5266 2002-06-19 Akim Demaille <akim@epita.fr>
5267
5268 * tests/actions.at (Destructors): Augment to test locations.
5269 * data/bison.simple (yydestructor): Pass it the current location
5270 if locations are enabled.
5271 Prototype only when __STDC__ or C++.
5272 Change the argument names to move into the yy name space: there is
5273 user code here.
5274
5275 2002-06-19 Akim Demaille <akim@epita.fr>
5276
5277 * data/bison.simple (b4_pure_if): New.
5278 Use it instead of #ifdef YYPURE.
5279
5280 2002-06-19 Akim Demaille <akim@epita.fr>
5281
5282 * data/bison.simple (b4_location_if): New.
5283 Use it instead of #ifdef YYLSP_NEEDED.
5284
5285 2002-06-19 Akim Demaille <akim@epita.fr>
5286
5287 Prepare @$ in %destructor, but currently don't bind it in the
5288 skeleton, as %location use is not cleaned up yet.
5289
5290 * src/scan-gram.l (handle_dollar, handle_destructor_at)
5291 (handle_action_at): New.
5292 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
5293 a braced_code_t and a location as additional arguments.
5294 (handle_destructor_dollar): Instead of requiring `b4_eval', just
5295 unquote one when outputting `b4_dollar_dollar'.
5296 Adjust callers.
5297 * data/bison.simple (b4_eval): Remove.
5298 (b4_symbol_destructor): Adjust.
5299 * tests/input.at (Invalid @n): Adjust.
5300
5301 2002-06-19 Zack Weinberg <zack@codesourcery.com>
5302
5303 * doc/bison.texinfo: Document ability to have multiple
5304 prologue sections.
5305
5306 2002-06-18 Akim Demaille <akim@epita.fr>
5307
5308 * src/files.c (compute_base_names): When computing the output file
5309 names from the input file name, strip the directory part.
5310
5311 2002-06-18 Akim Demaille <akim@epita.fr>
5312
5313 * data/bison.simple.new: Comment changes.
5314 Reported by Andreas Schwab.
5315
5316 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
5317
5318 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
5319 there are no `label `yyoverflowlab' defined but not used' warnings
5320 when yyoverflow is defined.
5321
5322 2002-06-18 Akim Demaille <akim@epita.fr>
5323
5324 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
5325 new member.
5326 (symbol_destructor_set): Adjust.
5327 * src/output.c (symbol_destructors_output): Output the destructor
5328 locations.
5329 Output the symbol name.
5330 * data/bison.simple (b4_symbol_destructor): Adjust.
5331
5332 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
5333 and Akim Demaille <akim@epita.fr>
5334
5335 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
5336 what's left on the stack when the error recovery hits EOF.
5337 * tests/actions.at (Destructors): Complete to exercise this case.
5338
5339 2002-06-17 Akim Demaille <akim@epita.fr>
5340
5341 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
5342 arguments is really empty, not only equal to `[]'.
5343 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
5344 member.
5345 (symbol_destructor_set): New.
5346 * src/output.c (symbol_destructors_output): New.
5347 * src/reader.h (brace_code_t, current_braced_code): New.
5348 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
5349 (handle_dollar): Rename as...
5350 (handle_action_dollar): this.
5351 (handle_destructor_dollar): New.
5352 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
5353 (grammar_declaration): Use it.
5354 * data/bison.simple (yystos): Is always defined.
5355 (yydestructor): New.
5356 * tests/actions.at (Destructors): New.
5357 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
5358
5359 2002-06-17 Akim Demaille <akim@epita.fr>
5360
5361 * src/symlist.h, src/symlist.c (symbol_list_length): New.
5362 * src/scan-gram.l (handle_dollar, handle_at): Compute the
5363 rule_length only when needed.
5364 * src/output.c (actions_output, token_definitions_output): Output
5365 the full M4 block.
5366 * src/symtab.c: Don't access directly to the symbol tag, use
5367 symbol_tag_get.
5368 * src/parse-gram.y: Use symbol_list_free.
5369
5370 2002-06-17 Akim Demaille <akim@epita.fr>
5371
5372 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
5373 (symbol_list_prepend, get_type_name): Move to...
5374 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
5375 (symbol_list_prepend, symbol_list_n_type_name_get): here.
5376 Adjust all callers.
5377 (symbol_list_free): New.
5378 * src/scan-gram.l (handle_dollar): Takes a location.
5379 * tests/input.at (Invalid $n): Adjust.
5380
5381 2002-06-17 Akim Demaille <akim@epita.fr>
5382
5383 * src/reader.h, src/reader.c (symbol_list_new): Export it.
5384 (symbol_list_prepend): New.
5385 * src/parse-gram.y (%union): `list' is a new member.
5386 (symbols.1): New, replaces...
5387 (terms_to_prec.1, nterms_to_type.1): these.
5388 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
5389 Take a location as additional argument.
5390 Adjust all callers.
5391
5392 2002-06-15 Akim Demaille <akim@epita.fr>
5393
5394 * src/parse-gram.y: Move %token in the declaration section so that
5395 we don't depend upon CVS Bison.
5396
5397 2002-06-15 Akim Demaille <akim@epita.fr>
5398
5399 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
5400 * src/print.c (print_core): Use it.
5401
5402 2002-06-15 Akim Demaille <akim@epita.fr>
5403
5404 * src/conflicts.c (log_resolution): Accept the rule involved in
5405 the sr conflicts instead of the lookahead number that points to
5406 that rule.
5407 (flush_reduce): Accept the current lookahead vector as argument,
5408 instead of the index in LA.
5409 (resolve_sr_conflict): Accept the current number of lookahead
5410 bitset to consider for the STATE, instead of the index in LA.
5411 (set_conflicts): Adjust.
5412 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
5413
5414 2002-06-15 Akim Demaille <akim@epita.fr>
5415
5416 * src/state.h (state_t): Replace the `lookaheadsp' member, a
5417 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
5418 Adjust all dependencies.
5419 * src/lalr.c (initialize_lookaheads): Split into...
5420 (states_lookaheads_count, states_lookaheads_initialize): these.
5421 (lalr): Adjust.
5422
5423 2002-06-15 Akim Demaille <akim@epita.fr>
5424
5425 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
5426 out of...
5427 (grammar_rules_print): here.
5428 * src/reduce.c (reduce_output): Use it.
5429 * tests/reduce.at (Useless Rules, Reduced Automaton)
5430 (Underivable Rules): Adjust.
5431
5432 2002-06-15 Akim Demaille <akim@epita.fr>
5433
5434 Copy BYacc's nice way to report the grammar.
5435
5436 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
5437 New.
5438 Don't print the rules' location, it is confusing and useless.
5439 (rule_print): Use grammar_rhs_print.
5440 * src/print.c (print_grammar): Use grammar_rules_print.
5441
5442 2002-06-15 Akim Demaille <akim@epita.fr>
5443
5444 Complete and rationalize `useless thing' warnings.
5445
5446 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
5447 (symbol_tag_print): New.
5448 Use them everywhere in place of accessing directly the tag member.
5449 * src/gram.h, src/gram.c (rule_print): New.
5450 Use it where a rule used to be printed `by hand'.
5451 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
5452 (reduce_grammar_tables): Report the useless rules.
5453 (reduce_print): Useless things are a warning, not an error.
5454 Report it as such.
5455 * tests/reduce.at (Useless Nonterminals, Useless Rules):
5456 (Reduced Automaton, Underivable Rules): Adjust.
5457 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
5458 * tests/conflicts.at (Unresolved SR Conflicts)
5459 (Solved SR Conflicts): Adjust.
5460
5461 2002-06-15 Akim Demaille <akim@epita.fr>
5462
5463 Let symbols have a location.
5464
5465 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
5466 (getsym): Adjust.
5467 Adjust all callers.
5468 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
5469 Use location_t, not int.
5470 * src/symtab.c (symbol_check_defined): Take advantage of the
5471 location.
5472 * tests/regression.at (Invalid inputs): Adjust.
5473
5474 2002-06-15 Akim Demaille <akim@epita.fr>
5475
5476 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
5477 (input): Don't try to initialize yylloc here, do it in the
5478 scanner.
5479 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
5480 * src/gram.h (rule_t): Change line and action_line into location
5481 and action_location, of location_t type.
5482 Adjust all dependencies.
5483 * src/location.h, src/location.c (empty_location): New.
5484 * src/reader.h, src/reader.c (grammar_start_symbol_set)
5485 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
5486 (grammar_current_rule_symbol_append)
5487 (grammar_current_rule_action_append): Expect a location as argument.
5488 * src/reader.c (grammar_midrule_action): Adjust to attach an
5489 action's location as dummy symbol location.
5490 * src/symtab.h, src/symtab.c (startsymbol_location): New.
5491 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
5492 the line numbers.
5493
5494 2002-06-14 Akim Demaille <akim@epita.fr>
5495
5496 Grammar declarations may be found in the grammar section.
5497
5498 * src/parse-gram.y (rules_or_grammar_declaration): New.
5499 (declarations): Each declaration may end with a semicolon, not
5500 just...
5501 (grammar_declaration): `"%union"'.
5502 (grammar): Branch to rules_or_grammar_declaration.
5503
5504 2002-06-14 Akim Demaille <akim@epita.fr>
5505
5506 * src/main.c (main): Invoke scanner_free.
5507
5508 2002-06-14 Akim Demaille <akim@epita.fr>
5509
5510 * src/output.c (m4_invoke): Extracted from...
5511 (output_skeleton): here.
5512 Free tempfile.
5513
5514 2002-06-14 Akim Demaille <akim@epita.fr>
5515
5516 * src/parse-gram.y (directives, directive, gram)
5517 (grammar_directives, precedence_directives, precedence_directive):
5518 Rename as...
5519 (declarations, declaration, grammar, grammar_declaration)
5520 (precedence_declaration, precedence_declarator): these.
5521 (symbol_declaration): New.
5522
5523 2002-06-14 Akim Demaille <akim@epita.fr>
5524
5525 * src/files.c (action_obstack): Remove, unused.
5526 (output_obstack): Remove it, and all its dependencies, as it is no
5527 longer needed.
5528 * src/reader.c (epilogue_set): Build the epilogue in the
5529 muscle_obstack.
5530 * src/output.h, src/output.c (muscle_obstack): Move to...
5531 * src/muscle_tab.h, src/muscle_tab.h: here.
5532 (muscle_init): Initialize muscle_obstack.
5533 (muscle_free): New.
5534 * src/main.c (main): Call it.
5535
5536 2002-06-14 Akim Demaille <akim@epita.fr>
5537
5538 * src/location.h: New, extracted from...
5539 * src/reader.h: here.
5540 * src/Makefile.am (noinst_HEADERS): Merge into
5541 (bison_SOURCES): this.
5542 Add location.h.
5543 * src/parse-gram.y: Use location_t instead of Bison's.
5544 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
5545 Use location_t instead of ints.
5546
5547 2002-06-14 Akim Demaille <akim@epita.fr>
5548
5549 * data/bison.simple, data/bison.c++: Be sure to restore the
5550 current #line when returning to the skeleton contents after having
5551 exposed the input file's #line.
5552
5553 2002-06-12 Akim Demaille <akim@epita.fr>
5554
5555 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
5556 eager.
5557 * tests/actions.at (Exotic Dollars): New.
5558
5559 2002-06-12 Akim Demaille <akim@epita.fr>
5560
5561 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
5562 ['"/] too eagerly.
5563 * tests/input.at (Torturing the Scanner): New.
5564
5565 2002-06-11 Akim Demaille <akim@epita.fr>
5566
5567 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
5568 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
5569 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
5570 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
5571 * src/reader.c (reader): Use it.
5572
5573 2002-06-11 Akim Demaille <akim@epita.fr>
5574
5575 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
5576 Adjust all callers.
5577 (scanner_last_string_free): New.
5578
5579 2002-06-11 Akim Demaille <akim@epita.fr>
5580
5581 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
5582 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
5583 (last_string, YY_OBS_FREE): New.
5584 Use them when returning an ID.
5585
5586 2002-06-11 Akim Demaille <akim@epita.fr>
5587
5588 Have Bison grammars parsed by a Bison grammar.
5589
5590 * src/reader.c, src/reader.h (prologue_augment): New.
5591 * src/reader.c (copy_definition): Remove.
5592
5593 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
5594 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
5595 (grammar_current_rule_prec_set, grammar_current_rule_check)
5596 (grammar_current_rule_symbol_append)
5597 (grammar_current_rule_action_append): Export.
5598 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
5599 (symbol_list_action_append): Remove.
5600 Hook the routines from reader.
5601 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
5602 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
5603
5604 * src/reader.c (read_declarations): Remove, unused.
5605
5606 * src/parse-gram.y: Handle the epilogue.
5607 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
5608 (grammar_start_symbol_set): this.
5609 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
5610 * src/reader.c (readgram): Remove, unused.
5611 (reader): Adjust to insert eoftoken and axiom where appropriate.
5612
5613 * src/reader.c (copy_dollar): Replace with...
5614 * src/scan-gram.h (handle_dollar): this.
5615 * src/parse-gram.y: Remove `%thong'.
5616
5617 * src/reader.c (copy_at): Replace with...
5618 * src/scan-gram.h (handle_at): this.
5619
5620 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
5621 New.
5622
5623 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
5624 time being.
5625
5626 * src/reader.h, src/reader.c (grammar_rule_end): New.
5627
5628 * src/parse.y (current_type, current_class): New.
5629 Implement `%nterm', `%token' support.
5630 Merge `%term' into `%token'.
5631 (string_as_id): New.
5632 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
5633 type name.
5634
5635 * src/parse-gram.y: Be sure to handle properly the beginning of
5636 rules.
5637
5638 * src/parse-gram.y: Handle %type.
5639 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
5640
5641 * src/parse-gram.y: More directives support.
5642 * src/options.c: No longer handle source directives.
5643
5644 * src/parse-gram.y: Fix %output.
5645
5646 * src/parse-gram.y: Handle %union.
5647 Use the prologue locations.
5648 * src/reader.c (parse_union_decl): Remove.
5649
5650 * src/reader.h, src/reader.c (epilogue_set): New.
5651 * src/parse-gram.y: Use it.
5652
5653 * data/bison.simple, data/bison.c++: b4_stype is now either not
5654 defined, then default to int, or to the contents of %union,
5655 without `union' itself.
5656 Adjust.
5657 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
5658
5659 * src/output.c (actions_output): Don't output braces, as they are
5660 already handled by the scanner.
5661
5662 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
5663 characters to themselves.
5664
5665 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
5666 that the epilogue has a proper #line.
5667
5668 * src/parse-gram.y: Handle precedence/associativity.
5669
5670 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
5671 a terminal.
5672 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
5673 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
5674 at all to define terminals that cannot be emitted.
5675
5676 * src/scan-gram.l: Escape M4 characters.
5677
5678 * src/scan-gram.l: Working properly with escapes in user
5679 strings/characters.
5680
5681 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
5682 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
5683 grammar.
5684 Use more modest sizes, as for the time being the parser does not
5685 release memory, and therefore the process swallows a huge amount
5686 of memory.
5687
5688 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
5689 stricter %token grammar.
5690
5691 * src/symtab.h (associativity): Add `undef_assoc'.
5692 (symbol_precedence_set): Do nothing when passed an undef_assoc.
5693 * src/symtab.c (symbol_check_alias_consistence): Adjust.
5694
5695 * tests/regression.at (Invalid %directive): Remove, as it is now
5696 meaningless.
5697 (Invalid inputs): Adjust to the new error messages.
5698 (Token definitions): The new grammar doesn't allow too many
5699 eccentricities.
5700
5701 * src/lex.h, src/lex.c: Remove.
5702 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
5703 (copy_character, copy_string2, copy_string, copy_identifier)
5704 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
5705 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
5706 (parse_action): Remove.
5707 * po/POTFILES.in: Adjust.
5708
5709 2002-06-11 Akim Demaille <akim@epita.fr>
5710
5711 * src/reader.c (parse_action): Don't store directly into the
5712 rule's action member: return the action as a string.
5713 Don't require `rule_length' as an argument: compute it.
5714 (grammar_current_rule_symbol_append)
5715 (grammar_current_rule_action_append): New, eved out from
5716 (readgram): here.
5717 Remove `action_flag', `rulelength', unused now.
5718
5719 2002-06-11 Akim Demaille <akim@epita.fr>
5720
5721 * src/reader.c (grammar_current_rule_prec_set).
5722 (grammar_current_rule_check): New, eved out from...
5723 (readgram): here.
5724 Remove `xaction', `first_rhs': useless.
5725 * tests/input.at (Type clashes): New.
5726 * tests/existing.at (GNU Cim Grammar): Adjust.
5727
5728 2002-06-11 Akim Demaille <akim@epita.fr>
5729
5730 * src/reader.c (grammar_midrule_action): New, Eved out from
5731 (readgram): here.
5732
5733 2002-06-11 Akim Demaille <akim@epita.fr>
5734
5735 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
5736 New.
5737 (readgram): Use them as replacement of inlined code, crule and
5738 crule1.
5739
5740 2002-06-11 Akim Demaille <akim@epita.fr>
5741
5742 * src/reader.c (grammar_end, grammar_symbol_append): New.
5743 (readgram): Use them.
5744 Make the use of `p' as local as possible.
5745
5746 2002-06-10 Akim Demaille <akim@epita.fr>
5747
5748 GCJ's parser requires the tokens to be defined before the prologue.
5749
5750 * data/bison.simple: Output the token definition before the user's
5751 prologue.
5752 * tests/regression.at (Braces parsing, Duplicate string)
5753 (Mixing %token styles): Check the output from bison.
5754 (Early token definitions): New.
5755
5756 2002-06-10 Akim Demaille <akim@epita.fr>
5757
5758 * src/symtab.c (symbol_user_token_number_set): Don't complain when
5759 assigning twice the same user number to a token, so that we can
5760 use it in...
5761 * src/lex.c (lex): here.
5762 Also use `symbol_class_set' instead of hand written code.
5763 * src/reader.c (parse_assoc_decl): Likewise.
5764
5765 2002-06-10 Akim Demaille <akim@epita.fr>
5766
5767 * src/symtab.c, src/symtab.c (symbol_class_set)
5768 (symbol_user_token_number_set): New.
5769 * src/reader.c (parse_token_decl): Use them.
5770 Use a switch instead of ifs.
5771 Use a single argument.
5772
5773 2002-06-10 Akim Demaille <akim@epita.fr>
5774
5775 Remove `%thong' support as it is undocumented, unused, duplicates
5776 `%token's job, and creates useless e-mail traffic with people who
5777 want to know what it is, why it is undocumented, unused, and
5778 duplicates `%token's job.
5779
5780 * src/reader.c (parse_thong_decl): Remove.
5781 * src/options.c (option_table): Remove "thong".
5782 * src/lex.h (tok_thong): Remove.
5783
5784 2002-06-10 Akim Demaille <akim@epita.fr>
5785
5786 * src/symtab.c, src/symtab.c (symbol_type_set)
5787 (symbol_precedence_set): New.
5788 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
5789 (value_components_used): Remove, unused.
5790
5791 2002-06-09 Akim Demaille <akim@epita.fr>
5792
5793 Move symbols handling code out of the reader.
5794
5795 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
5796 (axiom): Move to...
5797 * src/symtab.h, src/symtab.c: here.
5798
5799 * src/gram.c (start_symbol): Remove: use startsymbol->number.
5800 * src/reader.c (startval): Rename as...
5801 * src/symtab.h, src/symtab.c (startsymbol): this.
5802 * src/reader.c: Adjust.
5803
5804 * src/reader.c (symbol_check_defined, symbol_make_alias)
5805 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5806 (token_translations_init)
5807 Move to...
5808 * src/symtab.c: here.
5809 * src/reader.c (packsymbols): Move to...
5810 * src/symtab.h, src/symtab.c (symbols_pack): here.
5811 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
5812 argument.
5813
5814 2002-06-03 Akim Demaille <akim@epita.fr>
5815
5816 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
5817 then statements.
5818
5819 2002-06-03 Akim Demaille <akim@epita.fr>
5820
5821 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
5822 structs with non literals.
5823 * src/scan-skel.l: never-interactive.
5824 * src/conflicts.c (enum conflict_resolution_e): No trailing
5825 comma.
5826 * src/getargs.c (usage): Split long literal strings.
5827 Reported by Hans Aberg.
5828
5829 2002-05-28 Akim Demaille <akim@epita.fr>
5830
5831 * data/bison.c++: Use C++ ostreams.
5832 (cdebug_): New member.
5833
5834 2002-05-28 Akim Demaille <akim@epita.fr>
5835
5836 * src/output.c (output_skeleton): Be sure to allocate enough room
5837 for `/' _and_ for `\0' in full_skeleton.
5838
5839 2002-05-28 Akim Demaille <akim@epita.fr>
5840
5841 * data/bison.c++: Catch up with bison.simple:
5842 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5843 and Paul Eggert <eggert@twinsun.com>: `error' handing.
5844 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
5845 and popping traces.
5846
5847 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5848
5849 * src/output.c (output_skeleton): Put an explicit path in front of
5850 the skeleton file name, rather than relying on the -I directory,
5851 to partially alleviate effects of having a skeleton file lying around
5852 in the current directory.
5853
5854 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5855
5856 * src/conflicts.c (log_resolution): Correct typo:
5857 obstack_printf should be obstack_fgrow1.
5858
5859 2002-05-26 Akim Demaille <akim@epita.fr>
5860
5861 * src/state.h (state_t): `solved_conflicts' is a new member.
5862 * src/LR0.c (new_state): Set it to 0.
5863 * src/conflicts.h, src/conflicts.c (print_conflicts)
5864 (free_conflicts, solve_conflicts): Rename as...
5865 (conflicts_print, conflicts_free, conflicts_solve): these.
5866 Adjust callers.
5867 * src/conflicts.c (enum conflict_resolution_e)
5868 (solved_conflicts_obstack): New, used by...
5869 (log_resolution): this.
5870 Adjust to attach the conflict resolution to each state.
5871 Complete the description with the precedence/associativity
5872 information.
5873 (resolve_sr_conflict): Adjust.
5874 * src/print.c (print_state): Output its solved_conflicts.
5875 * tests/conflicts.at (Unresolved SR Conflicts)
5876 (Solved SR Conflicts): Exercise --report=all.
5877
5878 2002-05-26 Akim Demaille <akim@epita.fr>
5879
5880 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5881 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5882 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
5883 (token_number_t, item_number_as_token_number)
5884 (token_number_as_item_number, muscle_insert_token_number_table):
5885 Rename as...
5886 (symbol_number_t, item_number_as_symbol_number)
5887 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
5888 these, since it is more appropriate.
5889
5890 2002-05-26 Akim Demaille <akim@epita.fr>
5891
5892 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
5893 `Error:' lines.
5894 * data/bison.simple (yystos) [YYDEBUG]: New.
5895 (yyparse) [YYDEBUG]: Display the symbols which are popped during
5896 error recovery.
5897 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
5898
5899 2002-05-25 Akim Demaille <akim@epita.fr>
5900
5901 * doc/bison.texinfo (Debugging): Split into...
5902 (Tracing): this new section, its former contents, and...
5903 (Understanding): this new section.
5904 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
5905 by...
5906 (report_flag): this.
5907 Adjust all dependencies.
5908 (report_args, report_types, report_argmatch): New.
5909 (usage, getargs): Report/support -r, --report.
5910 * src/options.h
5911 (struct option_table_struct): Rename as..,
5912 (struct option_table_s): this.
5913 Rename the `set_flag' member to `flag' to match with getopt_long's
5914 struct.
5915 * src/options.c (option_table): Split verbose into an entry for
5916 %verbose, and another for --verbose.
5917 Support --report/-r, so remove -r from the obsolete --raw.
5918 * src/print.c: Attach full item sets and lookaheads reports to
5919 report_flag instead of trace_flag.
5920 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5921
5922 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5923 and Paul Eggert <eggert@twinsun.com>
5924
5925 * data/bison.simple (yyparse): Correct error handling to conform to
5926 POSIX and yacc. Specifically, after syntax error is discovered,
5927 do not reduce further before shifting the error token.
5928 Clean up the code a bit by removing the labels yyerrdefault,
5929 yyerrhandle, yyerrpop.
5930 * NEWS: Document the above.
5931
5932 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5933
5934 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5935 type; it isn't always big enough, since it doesn't necessarily
5936 include non-terminals.
5937 (yytranslate): Expand definition of yy_token_number_type, so that
5938 the latter can be removed.
5939 (yy_token_number_type): Remove, only one use.
5940 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5941 don't use TokenNumberType as element type.
5942
5943 * tests/regression.at: Modify expected output to agree with change
5944 to yyr1 and yytranslate.
5945
5946 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5947
5948 * src/reader.c (parse_action): Use copy_character instead of
5949 obstack_1grow.
5950
5951 2002-05-13 Akim Demaille <akim@epita.fr>
5952
5953 * tests/regression.at (Token definitions): Prototype yylex and
5954 yyerror.
5955
5956 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5957
5958 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
5959 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5960 32-bit arithmetic.
5961 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5962
5963 2002-05-07 Akim Demaille <akim@epita.fr>
5964
5965 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5966 avoid GCC warnings.
5967
5968 2002-05-07 Akim Demaille <akim@epita.fr>
5969
5970 Kill GCC warnings.
5971
5972 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5973 over the RHS of each rule.
5974 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5975 * src/state.h (state_t): Member `nitems' is unsigned short.
5976 * src/LR0.c (get_state): Adjust.
5977 * src/reader.c (packgram): Likewise.
5978 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5979 `Type'.
5980 (muscle_insert_int_table): Remove, unused.
5981 (prepare_rules): Remove `max'.
5982
5983 2002-05-06 Akim Demaille <akim@epita.fr>
5984
5985 * src/closure.c (print_firsts): Display of the symbol tags.
5986 (bitmatrix_print): Move to...
5987 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5988 here.
5989 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5990
5991 2002-05-06 Akim Demaille <akim@epita.fr>
5992
5993 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5994 hash_do_for_each.
5995
5996 2002-05-06 Akim Demaille <akim@epita.fr>
5997
5998 * src/LR0.c (new_state, get_state): Instead of using the global
5999 `kernel_size' and `kernel_base', have two new arguments:
6000 `core_size' and `core'.
6001 Adjust callers.
6002
6003 2002-05-06 Akim Demaille <akim@epita.fr>
6004
6005 * src/reader.c (packgram): No longer end `ritem' with a 0
6006 sentinel: it is not used.
6007
6008 2002-05-05 Akim Demaille <akim@epita.fr>
6009
6010 New experimental feature: display the lookaheads in the report and
6011 graph.
6012
6013 * src/print (print_core): When --trace-flag, display the rules
6014 lookaheads.
6015 * src/print_graph.c (print_core): Likewise.
6016 Swap the arguments.
6017 Adjust caller.
6018
6019 2002-05-05 Akim Demaille <akim@epita.fr>
6020
6021 * tests/torture.at (Many lookaheads): New test.
6022
6023 2002-05-05 Akim Demaille <akim@epita.fr>
6024
6025 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
6026 (GENERATE_MUSCLE_INSERT_TABLE): this.
6027 (output_int_table, output_unsigned_int_table, output_short_table)
6028 (output_token_number_table, output_item_number_table): Replace with...
6029 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
6030 (muscle_insert_short_table, muscle_insert_token_number_table)
6031 (muscle_insert_item_number_table): these.
6032 Adjust all callers.
6033 (prepare_tokens): Don't free `translations', since...
6034 * src/reader.h, src/reader.c (grammar_free): do it.
6035 Move to...
6036 * src/gram.h, src/gram.c (grammar_free): here.
6037 * data/bison.simple, data/bison.c++: b4_token_number_max is now
6038 b4_translate_max.
6039
6040 2002-05-05 Akim Demaille <akim@epita.fr>
6041
6042 * src/output.c (output_unsigned_int_table): New.
6043 (prepare_rules): `i' is unsigned.
6044 `prhs', `rline', `r2' are unsigned int.
6045 Rename muscle `rhs_number_max' as `rhs_max'.
6046 Output muscles `prhs_max', `rline_max', and `r2_max'.
6047 Free rline and r1.
6048 * data/bison.simple, data/bison.c++: Adjust to use these muscles
6049 to compute types instead of constant types.
6050 * tests/regression.at (Web2c Actions): Adjust.
6051
6052 2002-05-04 Akim Demaille <akim@epita.fr>
6053
6054 * src/symtab.h (SALIAS, SUNDEF): Rename as...
6055 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
6056 Adjust dependencies.
6057 * src/output.c (token_definitions_output): Be sure not to output a
6058 `#define 'a'' when fed with `%token 'a' "a"'.
6059 * tests/regression.at (Token definitions): New.
6060
6061 2002-05-03 Paul Eggert <eggert@twinsun.com>
6062
6063 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
6064 for K&R C.
6065
6066 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
6067
6068 * Makefile.am (SUBDIRS): Remove intl.
6069 (EXTRA_DIST): Add config/config.rpath.
6070
6071 2002-05-03 Akim Demaille <akim@epita.fr>
6072
6073 * data/bison.simple (m4_if): Don't output empty enums.
6074 And actually, output valid enum definitions :(.
6075
6076 2002-05-03 Akim Demaille <akim@epita.fr>
6077
6078 * configure.bat: Remove, completely obsolete.
6079 * Makefile.am (EXTRA_DIST): Adjust.
6080 Don't distribute config.rpath...
6081 * config/Makefile.am (EXTRA_DIST): Do it.
6082
6083 2002-05-03 Akim Demaille <akim@epita.fr>
6084
6085 * configure.in (GETTEXT_VERSION): New.
6086 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
6087
6088 2002-05-03 Akim Demaille <akim@epita.fr>
6089
6090 * data/bison.simple (b4_token_enum): New.
6091 (b4_token_defines): Use it to output tokens both as #define and
6092 enums.
6093 Suggested by Paul Eggert.
6094 * src/output.c (token_definitions_output): Don't output spurious
6095 white spaces.
6096
6097 2002-05-03 Akim Demaille <akim@epita.fr>
6098
6099 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6100
6101 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
6102
6103 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
6104 Update the stack class, give a try to deque as the default container.
6105
6106 2002-05-02 Akim Demaille <akim@epita.fr>
6107
6108 * data/bison.simple (yyparse): Do not implement @$ = @1.
6109 (YYLLOC_DEFAULT): Adjust to do it.
6110 * doc/bison.texinfo (Location Default Action): Fix.
6111
6112 2002-05-02 Akim Demaille <akim@epita.fr>
6113
6114 * src/reader.c (parse_braces): Merge into...
6115 (parse_action): this.
6116
6117 2002-05-02 Akim Demaille <akim@epita.fr>
6118
6119 * configure.in (ALL_LINGUAS): Remove.
6120 * po/LINGUAS, hr.po: New.
6121
6122 2002-05-02 Akim Demaille <akim@epita.fr>
6123
6124 Remove the so called hairy (semantic) parsers.
6125
6126 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
6127 * src/gram.h, src/gram.c (semantic_parser): Remove.
6128 (rule_t): Remove the guard and guard_line members.
6129 * src/lex.h (token_t): remove tok_guard.
6130 * src/options.c (option_table): Remove %guard and %semantic_parser
6131 support.
6132 * src/output.c, src/output.h (guards_output): Remove.
6133 (prepare): Adjust.
6134 (token_definitions_output): Don't output the `T'
6135 tokens (???).
6136 (output_skeleton): Don't output the guards.
6137 * src/files.c, src/files.c (attrsfile): Remove.
6138 * src/reader.c (symbol_list): Remove the guard and guard_line
6139 members.
6140 Adjust dependencies.
6141 (parse_guard): Remove.
6142 * data/bison.hairy: Remove.
6143 * doc/bison.texinfo (Environment Variables): Remove occurrences of
6144 BISON_HAIRY.
6145
6146 2002-05-02 Akim Demaille <akim@epita.fr>
6147
6148 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
6149 (parse_guard): Rename the formal argument `stack_offset' as
6150 `rule_length', which is more readable.
6151 Adjust callers.
6152 (copy_at, copy_dollar): Instead of outputting the hard coded
6153 values of $$, $n and so forth, output invocation to b4_lhs_value,
6154 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
6155 Note: this patch partially drops `semantic-parser' support: it
6156 always does `rule_length - n', where semantic parsers ought to
6157 always use `-n'.
6158 * data/bison.simple, data/bison.c++ (b4_lhs_value)
6159 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
6160
6161 2002-05-02 Akim Demaille <akim@epita.fr>
6162
6163 * configure.in (AC_INIT): Bump to 1.49b.
6164 (AM_INIT_AUTOMAKE): Short invocation.
6165
6166 2002-05-02 Akim Demaille <akim@epita.fr>
6167
6168 Version 1.49a.
6169
6170 2002-05-01 Akim Demaille <akim@epita.fr>
6171
6172 * src/skeleton.h: Remove.
6173
6174 2002-05-01 Akim Demaille <akim@epita.fr>
6175
6176 * src/skeleton.h: Fix the #endif.
6177 Reported by Magnus Fromreide.
6178
6179 2002-04-26 Paul Eggert <eggert@twinsun.com>
6180
6181 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
6182 Define if we define YYSTYPE and YYLTYPE, respectively.
6183 (YYCOPY): Fix [] quoting problem in the non-GCC case.
6184
6185 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
6186
6187 * src/scan-skel.l: Postprocess quadrigraphs.
6188
6189 * src/reader.c (copy_character): New function, used to output
6190 single characters while replacing `[' and `]' with quadrigraphs, to
6191 avoid troubles with M4 quotes.
6192 (copy_comment): Output characters with copy_character.
6193 (read_additionnal_code): Likewise.
6194 (copy_string2): Likewise.
6195 (copy_definition): Likewise.
6196
6197 * tests/calc.at: Exercise M4 quoting.
6198
6199 2002-04-25 Akim Demaille <akim@epita.fr>
6200
6201 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
6202 between `!' and the command.
6203 Reported by Paul Eggert.
6204
6205 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
6206
6207 * tests/calc.at: Exercise prologue splitting.
6208
6209 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
6210 `b4_post_prologue' instead of `b4_prologue'.
6211
6212 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
6213 muscles.
6214 (output): Free pre_prologue_obstack and post_prologue_obstack.
6215 * src/files.h, src/files.c (attrs_obstack): Remove.
6216 (pre_prologue_obstack, post_prologue_obstack): New.
6217 * src/reader.c (copy_definition): Add a parameter to specify the
6218 obstack to fill, instead of using attrs_obstack unconditionally.
6219 (read_declarations): Pass pre_prologue_obstack to copy_definition if
6220 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
6221
6222 2002-04-23 Paul Eggert <eggert@twinsun.com>
6223
6224 * data/bison.simple: Remove unnecessary commentary and white
6225 space differences from 1_29-branch.
6226 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
6227
6228 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
6229 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
6230 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
6231 constructors or destructors.
6232
6233 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
6234
6235 2002-04-23 Akim Demaille <akim@epita.fr>
6236
6237 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
6238 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
6239 location with columns.
6240 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
6241 All reported by Paul Eggert.
6242
6243 2002-04-22 Akim Demaille <akim@epita.fr>
6244
6245 * src/reduce.c (dump_grammar): Move to...
6246 * src/gram.h, src/gram.c (grammar_dump): here.
6247 Be sure to separate long item numbers.
6248 Don't read the members of a rule's prec if its nil.
6249
6250 2002-04-22 Akim Demaille <akim@epita.fr>
6251
6252 * src/output.c (table_size, table_grow): New.
6253 (MAXTABLE): Remove, replace uses with table_size.
6254 (pack_vector): Instead of dying when the table is too big, grow it.
6255
6256 2002-04-22 Akim Demaille <akim@epita.fr>
6257
6258 * data/bison.simple (yyr1): Its type is that of a token number.
6259 * data/bison.c++ (r1_): Likewise.
6260 * tests/regression.at (Web2c Actions): Adjust.
6261
6262 2002-04-22 Akim Demaille <akim@epita.fr>
6263
6264 * src/reader.c (token_translations_init): 256 is now the default
6265 value for the error token, i.e., it will be assigned another
6266 number if the user assigned 256 to one of her tokens.
6267 (reader): Don't force 256 to error.
6268 * doc/bison.texinfo (Symbols): Adjust.
6269 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
6270 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
6271 etc. instead of 10, 20, 30 (which was used to `jump' over error
6272 (256) and undefined (2)).
6273
6274 2002-04-22 Akim Demaille <akim@epita.fr>
6275
6276 Propagate more token_number_t.
6277
6278 * src/gram.h (token_number_as_item_number)
6279 (item_number_as_token_number): New.
6280 * src/output.c (GENERATE_OUTPUT_TABLE): New.
6281 Use it to create output_item_number_table and
6282 output_token_number_table.
6283 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
6284 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
6285 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
6286 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
6287
6288 2002-04-22 Akim Demaille <akim@epita.fr>
6289
6290 * src/output.h, src/output.c (get_lines_number): Remove.
6291
6292 2002-04-19 Akim Demaille <akim@epita.fr>
6293
6294 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
6295 as Lex/Flex'.
6296 (Debugging): More details about enabling the debugging features.
6297 (Table of Symbols): Describe $$, $n, @$, and @n.
6298 Suggested by Tim Josling.
6299
6300 2002-04-19 Akim Demaille <akim@epita.fr>
6301
6302 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
6303
6304 2002-04-10 Akim Demaille <akim@epita.fr>
6305
6306 * src/system.h: Rely on HAVE_LIMITS_H.
6307 Suggested by Paul Eggert.
6308
6309 2002-04-09 Akim Demaille <akim@epita.fr>
6310
6311 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
6312 full stderr, and strip it according to the bison options, instead
6313 of composing the error message from different bits.
6314 This makes it easier to check for several error messages.
6315 Adjust all the invocations.
6316 Add an invocation exercising the error token.
6317 Add an invocation demonstrating a stupid error message.
6318 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
6319 Adjust the tests.
6320 Error message are for stderr, not stdout.
6321
6322 2002-04-09 Akim Demaille <akim@epita.fr>
6323
6324 * src/gram.h, src/gram.c (error_token_number): Remove, use
6325 errtoken->number.
6326 * src/reader.c (reader): Don't specify the user token number (2)
6327 for $undefined, as it uselessly prevents using it.
6328 * src/gram.h (token_number_t): Move to...
6329 * src/symtab.h: here.
6330 (state_t.number): Is a token_number_t.
6331 * src/print.c, src/reader.c: Use undeftoken->number instead of
6332 hard coded 2.
6333 (Even though this 2 is not the same as above: the number of the
6334 undeftoken remains being 2, it is its user token number which
6335 might not be 2).
6336 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
6337 `user_token_number_max'.
6338 Output `undef_token_number'.
6339 * data/bison.simple, data/bison.c++: Use them.
6340 Be sure to map invalid yylex return values to
6341 `undef_token_number'. This saves us from gratuitous SEGV.
6342
6343 * tests/conflicts.at (Solved SR Conflicts)
6344 (Unresolved SR Conflicts): Adjust.
6345 * tests/regression.at (Web2c Actions): Adjust.
6346
6347 2002-04-08 Akim Demaille <akim@epita.fr>
6348
6349 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
6350 Adding #line.
6351 Remove the duplicate `typedefs'.
6352 (RhsNumberType): Fix the declaration and various other typos.
6353 Use __ofile__.
6354 * data/bison.simple: Use __ofile__.
6355 * src/scan-skel.l: Handle __ofile__.
6356
6357 2002-04-08 Akim Demaille <akim@epita.fr>
6358
6359 * src/gram.h (item_number_t): New, the type of item numbers in
6360 RITEM. Note that it must be able to code symbol numbers as
6361 positive number, and the negation of rule numbers as negative
6362 numbers.
6363 Adjust all dependencies (pretty many).
6364 * src/reduce.c (rule): Remove this `short *' pointer: use
6365 item_number_t.
6366 * src/system.h (MINSHORT, MAXSHORT): Remove.
6367 Include `limits.h'.
6368 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
6369 (shortcpy): Remove.
6370 (MAXTABLE): Move to...
6371 * src/output.c (MAXTABLE): here.
6372 (prepare_rules): Use output_int_table to output rhs.
6373 * data/bison.simple, data/bison.c++: Adjust.
6374 * tests/torture.at (Big triangle): Move the limit from 254 to
6375 500.
6376 * tests/regression.at (Web2c Actions): Ajust.
6377
6378 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
6379 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
6380 passes, but produces negative #line number, once fixed, GCC is
6381 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
6382 C), it passes.
6383 * src/state.h (state_h): Code input lines on ints, not shorts.
6384
6385 2002-04-08 Akim Demaille <akim@epita.fr>
6386
6387 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
6388 and then the grammar.
6389
6390 2002-04-08 Akim Demaille <akim@epita.fr>
6391
6392 * src/system.h: No longer using strndup.
6393
6394 2002-04-07 Akim Demaille <akim@epita.fr>
6395
6396 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
6397 * src/output.c (output_table_data): Return the longest number.
6398 (prepare_tokens): Output `token_number_max').
6399 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
6400 New.
6401 Use them to define yy_token_number_type/TokenNumberType.
6402 Use this type for yytranslate.
6403 * tests/torture.at (Big triangle): Push the limit from 124 to
6404 253.
6405 * tests/regression.at (Web2c Actions): Adjust.
6406
6407 2002-04-07 Akim Demaille <akim@epita.fr>
6408
6409 * tests/torture.at (Big triangle): New.
6410 (GNU AWK Grammar, GNU Cim Grammar): Move to...
6411 * tests/existing.at: here.
6412
6413 2002-04-07 Akim Demaille <akim@epita.fr>
6414
6415 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
6416 nritems.
6417 Adjust dependencies.
6418
6419 2002-04-07 Akim Demaille <akim@epita.fr>
6420
6421 * src/reader.c: Normalize increments to prefix form.
6422
6423 2002-04-07 Akim Demaille <akim@epita.fr>
6424
6425 * src/reader.c, symtab.c: Remove debugging code.
6426
6427 2002-04-07 Akim Demaille <akim@epita.fr>
6428
6429 Rename all the `bucket's as `symbol_t'.
6430
6431 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
6432 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
6433 * src/symtab.c, src/symtab.h (bucket): Rename as...
6434 (symbol_t): this.
6435 (symbol_list_new, bucket_check_defined, bucket_make_alias)
6436 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
6437 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6438 (buckets_new, buckets_free, buckets_do): Rename as...
6439 (symbol_list_new, symbol_check_defined, symbol_make_alias)
6440 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
6441 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
6442 (symbols_new, symbols_free, symbols_do): these.
6443
6444 2002-04-07 Akim Demaille <akim@epita.fr>
6445
6446 Use lib/hash for the symbol table.
6447
6448 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
6449 EOF.
6450 * src/lex.c (lex): Set the `number' member of new terminals.
6451 * src/reader.c (bucket_check_defined, bucket_make_alias)
6452 (bucket_check_alias_consistence, bucket_translation): New.
6453 (reader, grammar_free, readgram, token_translations_init)
6454 (packsymbols): Adjust.
6455 (reader): Number the predefined tokens.
6456 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
6457 for predefined tokens.
6458 * src/symtab.h (bucket): Remove all the hash table related
6459 members.
6460 * src/symtab.c (symtab): Replace by...
6461 (bucket_table): this.
6462 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
6463 (buckets_new, buckets_do): New.
6464
6465 2002-04-07 Akim Demaille <akim@epita.fr>
6466
6467 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
6468 (start_symbol, max_user_token_number, semantic_parser)
6469 (error_token_number): Initialize.
6470 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
6471 Initialize.
6472 (reader): Don't.
6473 (errtoken, eoftoken, undeftoken, axiom): Extern.
6474
6475 2002-04-07 Akim Demaille <akim@epita.fr>
6476
6477 * src/gram.h (rule_s): prec and precsym are now pointers
6478 to the bucket giving the priority/associativity.
6479 Member `associativity' removed: useless.
6480 * src/reduce.c, src/conflicts.c: Adjust.
6481
6482 2002-04-07 Akim Demaille <akim@epita.fr>
6483
6484 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
6485 Properly escape the symbols' TAG when outputting them.
6486
6487 2002-04-07 Akim Demaille <akim@epita.fr>
6488
6489 * src/lalr.h (LA): Is a bitsetv, not bitset*.
6490
6491 2002-04-07 Akim Demaille <akim@epita.fr>
6492
6493 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
6494 (LArule): this, which is an array to rule_t*.
6495 * src/print.c, src/conflicts.c: Adjust.
6496
6497 2002-04-07 Akim Demaille <akim@epita.fr>
6498
6499 * src/gram.h (rule_t): Rename `number' as `user_number'.
6500 `number' is a new member.
6501 Adjust dependencies.
6502 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
6503
6504 2002-04-07 Akim Demaille <akim@epita.fr>
6505
6506 As a result of the previous patch, it is no longer needed
6507 to reorder ritem itself.
6508
6509 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
6510
6511 2002-04-07 Akim Demaille <akim@epita.fr>
6512
6513 Be sure never to walk through RITEMS, but use only data related to
6514 the rules themselves. RITEMS should be banished.
6515
6516 * src/output.c (output_token_translations): Rename as...
6517 (prepare_tokens): this.
6518 In addition to `translate', prepare the muscles `tname' and
6519 `toknum', which were handled by...
6520 (output_rule_data): this.
6521 Remove, and move the remainder of its outputs into...
6522 (prepare_rules): this new routines, which also merges content from
6523 (output_gram): this.
6524 (prepare_rules): Be sure never to walk through RITEMS.
6525 (output_stos): Rename as...
6526 (prepare_stos): this.
6527 (output): Always invoke prepare_states, after all, just don't use it
6528 in the output if you don't need it.
6529
6530 2002-04-07 Akim Demaille <akim@epita.fr>
6531
6532 * src/LR0.c (new_state): Display `nstates' as the name of the
6533 newly created state.
6534 Adjust to initialize first_state and last_state if needed.
6535 Be sure to distinguish the initial from the final state.
6536 (new_states): Create the itemset of the initial state, and use
6537 new_state.
6538 * src/closure.c (closure): Now that the initial state has its
6539 items properly set, there is no need for a special case when
6540 creating `ruleset'.
6541
6542 As a result, now the rule 0, reducing to $axiom, is visible in the
6543 outputs. Adjust the test suite.
6544
6545 * tests/conflicts.at (Solved SR Conflicts)
6546 (Unresolved SR Conflicts): Adjust.
6547 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
6548 * tests/conflicts.at (S/R in initial): New.
6549
6550 2002-04-07 Akim Demaille <akim@epita.fr>
6551
6552 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
6553 the RHS of the rules.
6554 * src/output.c (output_gram): Likewise.
6555
6556 2002-04-07 Akim Demaille <akim@epita.fr>
6557
6558 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
6559 bucket.
6560 Adjust all dependencies.
6561 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
6562 `number' of the buckets too.
6563 * src/gram.h: Include `symtab.h'.
6564 (associativity): Move to...
6565 * src/symtab.h: here.
6566 No longer include `gram.h'.
6567
6568 2002-04-07 Akim Demaille <akim@epita.fr>
6569
6570 * src/gram.h, src/gram.c (rules_rhs_length): New.
6571 (ritem_longest_rhs): Use it.
6572 * src/gram.h (rule_t): `number' is a new member.
6573 * src/reader.c (packgram): Set it.
6574 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
6575 the end of `rules', and count them out of `nrules'.
6576 (reduce_output, dump_grammar): Adjust.
6577 * src/print.c (print_grammar): It is no longer needed to check for
6578 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
6579 * tests/reduce.at (Reduced Automaton): New test.
6580
6581 2002-04-07 Akim Demaille <akim@epita.fr>
6582
6583 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
6584 lacking `+ 1' to nrules, Bison reported as useless a token if it
6585 was used solely to set the precedence of the last rule...
6586
6587 2002-04-07 Akim Demaille <akim@epita.fr>
6588
6589 * data/bison.c++, data/bison.simple: Don't output the current file
6590 name in #line, to avoid useless diffs between two identical
6591 outputs under different names.
6592
6593 2002-04-07 Akim Demaille <akim@epita.fr>
6594
6595 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
6596 Normalize loops to using `< nrules + 1', not `<= nrules'.
6597
6598 2002-04-07 Akim Demaille <akim@epita.fr>
6599
6600 * TODO: Update.
6601
6602 2002-04-07 Akim Demaille <akim@epita.fr>
6603
6604 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
6605 bucket.value as bucket.number.
6606
6607 2002-04-07 Akim Demaille <akim@epita.fr>
6608
6609 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
6610 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
6611 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
6612 RHS, instead of being an index in RITEMS.
6613
6614 2002-04-04 Paul Eggert <eggert@twinsun.com>
6615
6616 * doc/bison.texinfo: Update copyright date.
6617 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
6618 (Symbols): Warn about running Bison in one character set,
6619 but compiling and/or running in an incompatible one.
6620 Warn about character code 256, too.
6621
6622 2002-04-03 Paul Eggert <eggert@twinsun.com>
6623
6624 * src/bison.data (YYSTACK_ALLOC): Depend on whether
6625 YYERROR_VERBOSE is nonzero, not whether it is defined.
6626
6627 Merge changes from bison-1_29-branch.
6628
6629 2002-03-20 Paul Eggert <eggert@twinsun.com>
6630
6631 Merge fixes from Debian bison_1.34-1.diff.
6632
6633 * configure.in (AC_PREREQ): 2.53.
6634
6635 2002-03-20 Akim Demaille <akim@epita.fr>
6636
6637 * src/conflicts.c (log_resolution): Argument `resolution' is const.
6638
6639 2002-03-19 Paul Eggert <eggert@twinsun.com>
6640
6641 * src/bison.simple (YYCOPY): New macro.
6642 (YYSTACK_RELOCATE): Use it.
6643 Remove Type arg; no longer needed. All callers changed.
6644 (yymemcpy): Remove; no longer needed.
6645
6646 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
6647 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6648
6649 2002-03-19 Akim Demaille <akim@epita.fr>
6650
6651 Test and fix the #line outputs.
6652
6653 * tests/atlocal.at (GCC): New.
6654 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
6655 (Prologue synch line, ,%union synch line, Postprologue synch line)
6656 (Action synch line, Epilogue synch line): New tests.
6657 * src/reader.c (parse_union_decl): Define the muscle stype_line.
6658 * data/bison.simple, data/bison.c++: Use it.
6659
6660 2002-03-19 Akim Demaille <akim@epita.fr>
6661
6662 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
6663 (Solved SR Conflicts, %expect not enough, %expect right)
6664 (%expect too much): Move to...
6665 * tests/conflicts.at: this new file.
6666
6667 2002-03-19 Akim Demaille <akim@epita.fr>
6668
6669 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6670 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
6671 that we can move to enums for instance.
6672 * src/output.c (token_definitions_output): Output a list of
6673 `token-name, token-number' instead of the #define.
6674 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
6675
6676 2002-03-14 Akim Demaille <akim@epita.fr>
6677
6678 Use Gettext 0.11.1.
6679
6680 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
6681
6682 * data/bison.c++: Make the user able to add members to the generated
6683 parser by subclassing.
6684
6685 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
6686
6687 * src/reader.c (read_additionnal_code): `c' should be an integer, not
6688 a character.
6689 Reported by Nicolas Tisserand and Nicolas Burrus.
6690
6691 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6692
6693 * src/reader.c: Warn about lacking semi-colons, do not complain.
6694
6695 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6696
6697 * data/bison.c++: Remove a debug line.
6698
6699 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
6700
6701 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
6702 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
6703 provide a default implementation.
6704
6705 2002-03-04 Akim Demaille <akim@epita.fr>
6706
6707 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
6708 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
6709 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
6710 * tests/semantic.at (Parsing Guards): Similarly.
6711 * src/reader.at (readgram): Complain if the last rule is not ended
6712 with a semi-colon.
6713
6714 2002-03-04 Akim Demaille <akim@epita.fr>
6715
6716 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
6717 * src/closure.c: here.
6718 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
6719 RTC.
6720 * src/warshall.h, src/warshall.c: Remove.
6721 * tests/sets.at (Broken Closure): Adjust.
6722
6723 2002-03-04 Akim Demaille <akim@epita.fr>
6724
6725 * src/output.c (output_skeleton): tempdir is const.
6726 bytes_read is unused.
6727
6728 2002-03-04 Akim Demaille <akim@epita.fr>
6729
6730 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6731 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
6732 Update.
6733 From Michael Hayes.
6734
6735 2002-03-04 Akim Demaille <akim@epita.fr>
6736
6737 * src/closure.c (closure): `r' is unused.
6738
6739 2002-03-04 Akim Demaille <akim@epita.fr>
6740
6741 * tests/sets.at (Broken Closure): Add the ending `;'.
6742 * src/reader.at (readgram): Complain if a rule is not ended with a
6743 semi-colon.
6744
6745 2002-03-04 Akim Demaille <akim@epita.fr>
6746
6747 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
6748 (count_sr_conflicts): Use bitset_count.
6749 * src/reduce.c (inaccessable_symbols): Ditto.
6750 (bits_size): Remove.
6751 * src/warshall.h, src/warshall.c: Convert to bitsetv.
6752
6753 2002-03-04 Akim Demaille <akim@epita.fr>
6754
6755 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
6756 * src/reduce.c: Remove the `bitset_zero's following the
6757 `bitset_create's, as now it is performed by the latter.
6758
6759 2002-03-04 Akim Demaille <akim@epita.fr>
6760
6761 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
6762 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
6763 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
6764 latest sources from Michael.
6765
6766 2002-03-04 Akim Demaille <akim@epita.fr>
6767
6768 * src/output.c (output): Don't free the grammar.
6769 * src/reader.c (grammar_free): New.
6770 * src/main.c (main): Call it and don't free symtab here.
6771
6772 2002-03-04 Akim Demaille <akim@epita.fr>
6773
6774 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
6775 before returning.
6776 Reported by Benoit Perrot.
6777
6778 2002-03-04 Akim Demaille <akim@epita.fr>
6779
6780 Use bitset operations when possible, not loops over bits.
6781
6782 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
6783 bitset_or.
6784 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
6785 * src/reduce.c (useless_nonterminals): Formatting changes.
6786 * src/warshall.c (TC): Use bitset_or.
6787
6788 2002-03-04 Akim Demaille <akim@epita.fr>
6789
6790 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
6791 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
6792 Ditto.
6793
6794 2002-03-04 Akim Demaille <akim@epita.fr>
6795
6796 * src/lalr.c (F): Now a bitset*.
6797 Adjust all dependencies.
6798
6799 2002-03-04 Akim Demaille <akim@epita.fr>
6800
6801 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
6802 Adjust all dependencies.
6803
6804 2002-03-04 Akim Demaille <akim@epita.fr>
6805
6806 * src/L0.c, src/LR0.h (nstates): Be size_t.
6807 Adjust comparisons (signed vs unsigned).
6808 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
6809 bitset*.
6810 Adjust all dependencies.
6811
6812 2002-03-04 Akim Demaille <akim@epita.fr>
6813
6814 * src/closure.c (firsts): Now, also a bitset.
6815 Adjust all dependencies.
6816 (varsetsize): Remove, now unused.
6817 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
6818
6819 2002-03-04 Akim Demaille <akim@epita.fr>
6820
6821 * src/print.c: Convert to use bitset.h, not hand coded iterations
6822 over ints.
6823
6824 2002-03-04 Akim Demaille <akim@epita.fr>
6825
6826 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
6827
6828 2002-03-04 Akim Demaille <akim@epita.fr>
6829
6830 * src/closure.c (ruleset): Be a bitset.
6831 (rulesetsize): Remove.
6832
6833 2002-03-04 Akim Demaille <akim@epita.fr>
6834
6835 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
6836 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
6837 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
6838 * src/closure.c (fderives): Be an array of bitsets.
6839
6840 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
6841
6842 * data/bison.c++: Merge the two generated headers. Insert a copyright
6843 notice in each output file.
6844
6845 2002-02-28 Akim Demaille <akim@epita.fr>
6846
6847 * data/bison.c++: Copy the prologue of bison.simple to fetch
6848 useful M4 definitions, such as b4_header_guard.
6849
6850 2002-02-25 Akim Demaille <akim@epita.fr>
6851
6852 * src/getargs.c (version): Give the name of the authors, and use a
6853 translator friendly scheme for the bgr
6854 copyright notice.
6855
6856 2002-02-25 Akim Demaille <akim@epita.fr>
6857
6858 * src/output.c (header_output): Remove, now handled completely via
6859 M4.
6860
6861 2002-02-25 Akim Demaille <akim@epita.fr>
6862
6863 * m4/m4.m4: New, from CVS Autoconf.
6864 * configure.in: Invoke it.
6865 * src/output.c (output_skeleton): Use its result instead of the
6866 hard coded name.
6867
6868 2002-02-25 Akim Demaille <akim@epita.fr>
6869
6870 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
6871 Fileutils 4.1.5.
6872 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
6873 * src/output.c (output_skeleton): Use mkstemp to create a real
6874 temporary file.
6875 Move the filling of `skeleton' and its muscle to...
6876 (prepare): here.
6877 (output): Move the definition of the prologue muscle to...
6878 (prepare): here.
6879 * src/system.h (DEFAULT_TMPDIR): New.
6880
6881 2002-02-14 Paul Eggert <eggert@twinsun.com>
6882
6883 Remove the support for C++ namespace cleanliness; it was
6884 causing more problems than it was curing, since it didn't work
6885 properly on some nonstandard C++ compilers. This can wait
6886 for a proper C++ parser.
6887
6888 * NEWS: Document this.
6889 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
6890 of C++, as it's treated like C now.
6891 * src/bison.simple (YYSTD): Remove.
6892 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
6893 Treat C++ just like Standard C instead of trying to support
6894 namespace cleanliness.
6895
6896 2002-02-14 Akim Demaille <akim@epita.fr>
6897
6898 * tests/regression.at (else): Adjust to Andreas' change.
6899
6900 2002-02-14 Akim Demaille <akim@epita.fr>
6901
6902 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
6903
6904 2002-02-13 Andreas Schwab <schwab@suse.de>
6905
6906 * src/output.c (output_rule_data): Don't output NULL, it might
6907 not be defined yet.
6908
6909 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
6910
6911 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6912 (Copyright notice): Update.
6913
6914 2002-02-11 Akim Demaille <akim@epita.fr>
6915
6916 * tests/regression.at (%nonassoc and eof): Don't include
6917 nonportable headers.
6918
6919 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
6920
6921 * data/bison.c++: Correct error recovery. Make the user able to
6922 initialize the starting location.
6923
6924 2002-02-07 Akim Demaille <akim@epita.fr>
6925
6926 * tests/input.at: New.
6927
6928 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6929
6930 * data/bison.c++: Replace some direct m4 expansions by constants. Be
6931 more consistent when naming methods and variables. Put preprocessor
6932 directives around tables only needed for debugging.
6933
6934 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6935
6936 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6937 C++ parsers.
6938 (yy::b4_name::parse): Use print_.
6939
6940 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6941
6942 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6943
6944 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6945
6946 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6947 C++ parsers.
6948 (yy::b4_name::parse): Build verbose error messages, and use error_.
6949
6950 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6951
6952 * data/bison.c++: Fix m4 quoting in comments.
6953
6954 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6955
6956 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6957 not expanded by m4.
6958
6959 2002-02-05 Akim Demaille <akim@epita.fr>
6960
6961 * data/bison.c++: Adjust to the M4 back end.
6962 More is certainly needed.
6963
6964 2002-02-05 Akim Demaille <akim@epita.fr>
6965
6966 Give a try to M4 as a back end.
6967
6968 * lib/readpipe.c: New, from wdiff.
6969 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6970 BISON_HAIRY.
6971 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6972 specific values. Now it is m4 that performs the lookup.
6973 * src/parse-skel.y: Remove.
6974 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6975 * src/output.c (actions_output, guards_output)
6976 (token_definitions_output): No longer keeps track of the output
6977 line number, hence remove the second argument.
6978 (guards_output): Check against the guard member of a rule, not the
6979 action member.
6980 Adjust callers.
6981 (output_skeleton): Don't look for the skeleton location, let m4 do
6982 that.
6983 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6984 file will be used.
6985 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6986 (prepare): Given that for the time being changesyntax is not
6987 usable in M4, rename the muscles using `-' to `_'.
6988 Define `defines_flag', `output_parser_name' and `output_header_name'.
6989 * src/output.h (actions_output, guards_output)
6990 (token_definitions_output): Adjust prototypes.
6991 * src/scan-skel.l: Instead of scanning the skeletons, it now
6992 processes the output of m4: `__oline__' and `#output'.
6993 * data/bison.simple: Adjust to be used by M4(sugar).
6994 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6995 to date.
6996 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6997 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6998 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6999 shamelessly stolen from CVS Autoconf.
7000
7001 2002-02-05 Akim Demaille <akim@epita.fr>
7002
7003 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
7004 * configure.in: Check for the declarations of free and malloc.
7005 * src/muscle_tab.c: Adjust.
7006
7007 2002-02-05 Akim Demaille <akim@epita.fr>
7008
7009 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
7010 which have no values.
7011
7012 2002-02-05 Akim Demaille <akim@epita.fr>
7013
7014 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
7015 * data/: here.
7016
7017 2002-01-29 Paul Eggert <eggert@twinsun.com>
7018
7019 * src/bison.simple (YYSIZE_T): Do not define merely because
7020 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
7021 On some platforms, <alloca.h> does not declare YYSTD (size_t).
7022
7023 2002-01-27 Akim Demaille <akim@epita.fr>
7024
7025 Fix `%nonassoc and eof'.
7026
7027 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
7028 which were not properly copied! Replace
7029 memcpy (res->errs, src->errs, src->nerrs);
7030 with
7031 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
7032 !!!
7033 * tests/regression.at (%nonassoc and eof): Adjust to newest
7034 Autotest: `.' is not in the PATH.
7035
7036 2002-01-27 Akim Demaille <akim@epita.fr>
7037
7038 * tests/sets.at (AT_EXTRACT_SETS): New.
7039 (Nullable): Use it.
7040 (Firsts): New.
7041
7042 2002-01-26 Akim Demaille <akim@epita.fr>
7043
7044 * tests/actions.at, tests/calc.at, tests/headers.at,
7045 * tests/torture.at: Adjust to the newest Autotest which no longer
7046 forces `.' in the PATH.
7047
7048 2002-01-25 Akim Demaille <akim@epita.fr>
7049
7050 * tests/regression.at (%nonassoc and eof): New.
7051 Suggested by Robert Anisko.
7052
7053 2002-01-24 Akim Demaille <akim@epita.fr>
7054
7055 Bison dumps core when trying to complain about broken input files.
7056 Reported by Cris van Pelt.
7057
7058 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
7059 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
7060 into...
7061 (Invalid inputs): Strengthen: exercise parse_percent_token.
7062
7063 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
7064
7065 * src/Makefile.am: Add bison.c++.
7066 * src/bison.c++: New skeleton.
7067
7068 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
7069
7070 * po/it.po: New.
7071
7072 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
7073
7074 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
7075
7076 2002-01-20 Marc Autret <marc@gnu.org>
7077
7078 * src/files.c (compute_output_file_names): Fix
7079
7080 2002-01-20 Marc Autret <marc@gnu.org>
7081
7082 * tests/output.at: New test.
7083 * src/files.c (compute_base_names): Don't map extensions when
7084 the YACC flag is set, use defaults.
7085 Reported by Evgeny Stambulchik.
7086
7087 2002-01-20 Marc Autret <marc@gnu.org>
7088
7089 * src/system.h: Need to define __attribute__ away for non-GCC
7090 compilers as well (i.e. the vendor C compiler).
7091 Suggested by Albert Chin-A-Young.
7092
7093 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
7094
7095 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
7096 canonical definition.
7097 * src/system.h: Use the canonical definition for PARAMS (avoids
7098 a conflict with the macro from lib/hash.h).
7099
7100 2002-01-11 Akim Demaille <akim@epita.fr>
7101
7102 * configure.in: Use AC_FUNC_STRNLEN.
7103 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
7104
7105 2002-01-09 Akim Demaille <akim@epita.fr>
7106
7107 * src/files.c, src/files.h (output_infix): New.
7108 (tab_extension): Remove.
7109 (compute_base_names): Compute the former, drop the latter.
7110 * src/output.c (prepare): Insert the muscles `output-infix', and
7111 `output-suffix'.
7112 * src/parse-skel.y (string, string.1): New.
7113 (section.header): Use it.
7114 (section.yacc): Remove.
7115 (prefix): Remove too.
7116 * src/scan-skel.l: Adjust.
7117 * src/bison.simple, src/bison.hairy: Adjust.
7118
7119 2002-01-09 Akim Demaille <akim@epita.fr>
7120
7121 * configure.in (WERROR_CFLAGS): Compute it.
7122 * src/Makefile.am (CFLAGS): Pass it.
7123 * tests/atlocal.in (CFLAGS): Idem.
7124 * src/files.c: Fix a few warnings.
7125 (get_extension_index): Remove, unused.
7126
7127 2002-01-08 Akim Demaille <akim@epita.fr>
7128
7129 * src/getargs.c (AS_FILE_NAME): New.
7130 (getargs): Use it to convert DOSish file names.
7131 * src/files.c (base_name): Rename as full_base_name to avoid
7132 clashes with `base_name ()'.
7133 (filename_split): New.
7134 (compute_base_names): N-th rewrite, using filename_split.
7135
7136 2002-01-08 Akim Demaille <akim@epita.fr>
7137
7138 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
7139 New, stolen from the Fileutils 4.1.
7140 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7141 * configure.in: Check for the presence of memrchr, and of its
7142 prototype.
7143
7144 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
7145
7146 * lib/hash.h (__P): Added definition for this macro.
7147 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
7148 BUILT_SOURCES, to ensure they are generated first.
7149 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
7150 %error-verbose to allow bootstrapping with bison 1.30x.
7151
7152 2002-01-06 Akim Demaille <akim@epita.fr>
7153
7154 * src/reader.c (parse_braces): Don't fetch the next char, the
7155 convention is to fetch on entry.
7156 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
7157 'switch' without a following semicolon.
7158 * tests/regression.at (braces parsing): New.
7159
7160 2002-01-06 Akim Demaille <akim@epita.fr>
7161
7162 Bison is dead wrong in its RR conflict reports.
7163
7164 * tests/torture.at (GNU Cim Grammar): New.
7165 * src/conflicts.c (count_rr_conflicts): Fix.
7166
7167 2002-01-06 Akim Demaille <akim@epita.fr>
7168
7169 Creating package.m4 from configure.ac causes too many problems.
7170
7171 * tests/Makefile.am (package.m4): Create it by hand,
7172 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
7173
7174 2002-01-06 Akim Demaille <akim@epita.fr>
7175
7176 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
7177 skeleton.h.
7178
7179 2002-01-04 Paul Eggert <eggert@twinsun.com>
7180
7181 * doc/bison.texinfo (Debugging):
7182 Remove YYSTDERR; it's no longer defined or used.
7183 Also, s/cstdio.h/cstdio/.
7184
7185 2002-01-03 Akim Demaille <akim@epita.fr>
7186
7187 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
7188
7189 2002-01-03 Akim Demaille <akim@epita.fr>
7190
7191 * src/parse-skel.y (process_skeleton): Don't bind the parser's
7192 tracing code to --trace, wait for a better --trace option, with
7193 args.
7194
7195 2002-01-03 Akim Demaille <akim@epita.fr>
7196
7197 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
7198 The ISO C++ standard is extremely clear about it: stderr is
7199 considered a macro, not a regular symbol (see table 94 `Header
7200 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
7201 Therefore std:: does not apply to it. It still does with fprintf.
7202 Also, s/cstdio.h/cstdio/.
7203
7204 2002-01-03 Akim Demaille <akim@epita.fr>
7205
7206 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
7207 for non system headers.
7208
7209 2002-01-02 Akim Demaille <akim@epita.fr>
7210
7211 Equip the skeleton chain with location tracking, runtime trace,
7212 pure parser and scanner.
7213
7214 * src/parse-skel.y: Request a pure parser, locations, and prefix
7215 renaming.
7216 (%union): Having several members with the same type does not help
7217 type mismatches, simplify.
7218 (YYPRINT, yyprint): New.
7219 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
7220 (skel_error): this.
7221 Handle locations.
7222 * src/scan-skel.l: Adjust to these changes.
7223 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
7224 (LOCATION_PRINT, skel_control_t): New.
7225
7226 2001-12-30 Akim Demaille <akim@epita.fr>
7227
7228 * src/parse-skel.y: Get rid of the shift/reduce conflict:
7229 replace `gb' with BLANKS.
7230 * src/scan-skel.l: Adjust.
7231
7232 2001-12-30 Akim Demaille <akim@epita.fr>
7233
7234 * src/system.h: We don't need nor want bcopy.
7235 Throw away MS-DOS crap: we don't need getpid.
7236 * configure.in: We don't need strndup. It was even causing
7237 problems: because Flex includes the headers *before* us,
7238 _GNU_SOURCE is not defined by config.h, and therefore strndup was
7239 not visible.
7240 * lib/xstrndup.c: New.
7241 * src/scan-skel.l: Use it.
7242 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
7243 * src/parse-skel.y: Use %directives instead of #defines.
7244
7245 2001-12-30 Akim Demaille <akim@epita.fr>
7246
7247 * src/skeleton.h: New.
7248 * src/output.c (output_parser, output_master_parser): Remove, dead
7249 code.
7250 * src/output.h (get_lines_number, actions_output, guards_output)
7251 (token_definitions_output): Prototype them.
7252 * src/parse-skel.y: Add the license notice.
7253 Include output.h and skeleton.h.
7254 (process_skeleton): Returns void, and takes a single parameter.
7255 * src/scan-skel.l: Add the license notice.
7256 Include skeleton.h.
7257 Don't use %option yylineno: it seems that then Flex imagines
7258 REJECT has been used, and therefore it won't reallocate its
7259 buffers (which makes no other sense to me than a bug). It results
7260 in warnings for `unused: yy_flex_realloc'.
7261
7262 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
7263
7264 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
7265 (MUSCLE_INSERT_PREFIX): ...to there.
7266 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
7267 (MUSCLE_INSERT_PREFIX): Move from here...
7268
7269 * src/bison.hairy: Add a section directive. Put braces around muscle
7270 names. This parser skeleton is still broken, but Bison should not
7271 choke on a bad muscle 'syntax'.
7272 * src/bison.simple: Add a section directive. Put braces around muscle
7273 names.
7274
7275 * src/files.h (strsuffix, stringappend): Add declarations.
7276 (tab_extension): Add declaration.
7277 (short_base_name): Add declaration.
7278
7279 * src/files.c (strsuffix, stringappend): No longer static. These
7280 functions are used in the skeleton parser.
7281 (tab_extension): New.
7282 (compute_base_names): Use the computations done in this function
7283 to guess if the generated parsers should have '.tab' in their
7284 names.
7285 (short_base_name): No longer static.
7286
7287 * src/output.c (output_skeleton): New.
7288 (output): Disable call to output_master_parser, and give a try to
7289 a new skeleton handling system.
7290 (guards_output, actions_output): No longer static.
7291 (token_definitions_output, get_lines_number): No longer static.
7292
7293 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
7294
7295 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
7296 parse-skel.y.
7297
7298 * src/parse-skel.y: New file.
7299 * src/scan-skel.l: New file.
7300
7301 2001-12-29 Akim Demaille <akim@epita.fr>
7302
7303 %name-prefix is broken.
7304
7305 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
7306 Adjust all dependencies.
7307 * tests/headers.at (export YYLTYPE): Strengthen this test: use
7308 %name-prefix.
7309
7310 Renaming yylval but not yylloc is not consistent. Now we do.
7311
7312 * src/bison.simple: Prefix yylloc if used.
7313 * doc/bison.texinfo (Decl Summary): Document that.
7314
7315 2001-12-29 Akim Demaille <akim@epita.fr>
7316
7317 * doc/bison.texinfo: Promote `%long-directive' over
7318 `%long_directive'.
7319 Remove all references to fixed-output-files, yacc is enough.
7320
7321 2001-12-29 Akim Demaille <akim@epita.fr>
7322
7323 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
7324 user prologue. These are defaults.
7325 * tests/actions.at (Mid-rule actions): Make sure the user can
7326 define YYDEBUG and YYERROR_VERBOSE.
7327
7328 2001-12-29 Akim Demaille <akim@epita.fr>
7329
7330 * src/output.c (header_output): Don't forget to export YYLTYPE and
7331 yylloc.
7332 * tests/headers.at (export YYLTYPE): New, make sure it does.
7333 * tests/regression.at (%union and --defines, Invalid CPP headers):
7334 Move to...
7335 * tests/headers.at: here.
7336
7337 2001-12-29 Akim Demaille <akim@epita.fr>
7338
7339 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
7340
7341 2001-12-29 Akim Demaille <akim@epita.fr>
7342
7343 * tests/actions.at (Mid-rule actions): Output on a single line
7344 instead of several.
7345
7346 2001-12-29 Akim Demaille <akim@epita.fr>
7347
7348 * doc/bison.texinfo: Formatting changes.
7349
7350 2001-12-29 Akim Demaille <akim@epita.fr>
7351
7352 Don't store the token defs in a muscle, just be ready to output it
7353 on command. Now possible via `symbols'. Fixes a memory leak.
7354
7355 * src/output.c (token_definitions_output): New.
7356 (output_parser, header_output): Use it.
7357 * src/reader.c (symbols_save): Remove.
7358
7359 2001-12-29 Akim Demaille <akim@epita.fr>
7360
7361 * src/bison.simple: Do not provide a default for YYSTYPE and
7362 YYLTYPE before the user's prologue. Otherwise it's hardly... a
7363 default.
7364
7365 2001-12-29 Akim Demaille <akim@epita.fr>
7366
7367 Mid-rule actions are simply... ignored!
7368
7369 * src/reader.c (readgram): Be sure to attach mid-rule actions to
7370 the empty-rule associated to the dummy symbol, not to the host
7371 rule.
7372 * tests/actions.at (Mid-rule actions): New.
7373
7374 2001-12-29 Akim Demaille <akim@epita.fr>
7375
7376 Memory leak.
7377
7378 * src/reader.c (reader): Free grammar.
7379
7380 2001-12-29 Akim Demaille <akim@epita.fr>
7381
7382 Memory leak.
7383
7384 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
7385 since it allocates it for each state, although only one is needed.
7386 (allocate_storage): Do it here.
7387
7388 2001-12-29 Akim Demaille <akim@epita.fr>
7389
7390 * src/options.h, src/options.c (create_long_option_table): Rename
7391 as...
7392 (long_option_table_new): this, with a clearer prototype.
7393 (percent_table): Remove, unused,
7394 * src/getargs.c (getargs): Adjust.
7395
7396 2001-12-29 Akim Demaille <akim@epita.fr>
7397
7398 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
7399 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
7400 as states.
7401
7402 2001-12-29 Akim Demaille <akim@epita.fr>
7403
7404 * src/lalr.c (build_relations): Rename `states' as `states1'.
7405 Sorry, I don't understand exactly what it is, no better name...
7406
7407 2001-12-29 Akim Demaille <akim@epita.fr>
7408
7409 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
7410 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
7411 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
7412 as rules.
7413
7414 2001-12-29 Akim Demaille <akim@epita.fr>
7415
7416 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
7417 ago.
7418
7419 2001-12-29 Akim Demaille <akim@epita.fr>
7420
7421 * src/reader.c, src/reader.h (user_toknums): Remove.
7422 Adjust all users to use symbols[i]->user_token_number.
7423
7424 2001-12-29 Akim Demaille <akim@epita.fr>
7425
7426 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
7427 Adjust all users to use symbols[i]->prec or ->assoc.
7428
7429 2001-12-29 Akim Demaille <akim@epita.fr>
7430
7431 * src/reader.c, src/reader.h (tags): Remove.
7432 Adjust all users to use symbols[i]->tag.
7433
7434 2001-12-29 Akim Demaille <akim@epita.fr>
7435
7436 * src/gram.h, src/gram.c (symbols): New, similar to state_table
7437 and rule_table.
7438 * src/reader.c (packsymbols): Fill this table.
7439 Drop sprec.
7440 * src/conflicts.c (resolve_sr_conflict): Adjust.
7441 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
7442 single table.
7443 Use symbols[i]->tag instead of tags[i].
7444
7445 2001-12-29 Akim Demaille <akim@epita.fr>
7446
7447 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
7448 In addition, put a comment in there, to replace...
7449 * tests/regression.at (%union and C comments): Remove.
7450
7451 2001-12-29 Akim Demaille <akim@epita.fr>
7452
7453 * tests/regression.at (Web2c Actions): Blindly move the actual
7454 output as expected output. The contents *seem* right to me, but I
7455 can't pretend reading perfectly parser tables... Nonetheless, all
7456 the other tests pass correctly, the table look OK, even though the
7457 presence of `$axiom' is to be noted: AFAICS it is useless (but
7458 harmless).
7459
7460 2001-12-29 Akim Demaille <akim@epita.fr>
7461
7462 * src/reader.c (readgram): Don't add the rule 0 if there were no
7463 rules read. In other words, add it _after_ having performed
7464 grammar sanity checks.
7465 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
7466
7467 2001-12-29 Akim Demaille <akim@epita.fr>
7468
7469 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
7470 visible, and some states have now a different number.
7471
7472 2001-12-29 Akim Demaille <akim@epita.fr>
7473
7474 * src/reader.c (readgram): Bind the initial rule's lineno to that
7475 of the first rule.
7476 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
7477 (Solved SR Conflicts): Adjust rule 0's line number.
7478
7479 2001-12-29 Akim Demaille <akim@epita.fr>
7480
7481 Fix the `GAWK Grammar' failure.
7482
7483 * src/LR0.c (final_state): Initialize to -1 so that we do compute
7484 the reductions of the first state which was mistakenly confused
7485 with the final state because precisely final_state was initialized
7486 to 0.
7487 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
7488 now noticed by Bison.
7489 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
7490 have a reduction on $default.
7491
7492 2001-12-29 Akim Demaille <akim@epita.fr>
7493
7494 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
7495 rule line numbers.
7496 * src/closure.c (print_closure): Likewise.
7497 * src/derives.c (print_derives): Likewise.
7498 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
7499 now.
7500
7501 2001-12-29 Akim Demaille <akim@epita.fr>
7502
7503 * src/lalr.c (lookaheads_print): New.
7504 (lalr): Call it when --trace-flag.
7505 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
7506 are dumped.
7507
7508 2001-12-29 Akim Demaille <akim@epita.fr>
7509
7510 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
7511 when walking through ritem, even via rule->rhs.
7512 * src/reduce.c (dump_grammar, useful_production, reduce_output)
7513 (useful_production, useless_nonterminals): Likewise.
7514 (reduce_grammar_tables): Likewise, plus update nritems.
7515 * src/nullable.c (set_nullable): Likewise.
7516 * src/lalr.c (build_relations): Likewise.
7517 * tests/sets.at (Nullable): Adjust.
7518 Fortunately, now, the $axiom is no longer nullable.
7519
7520 2001-12-29 Akim Demaille <akim@epita.fr>
7521
7522 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
7523 the 0-sentinel.
7524 * src/gram.c (ritem_longest_rhs): Likewise.
7525 * src/reduce.c (nonterminals_reduce): Likewise.
7526 * src/print_graph.c (print_graph): Likewise.
7527 * src/output.c (output_rule_data): Likewise.
7528 * src/nullable.c (set_nullable): Likewise.
7529
7530 2001-12-29 Akim Demaille <akim@epita.fr>
7531
7532 * src/output.c: Comment changes.
7533
7534 2001-12-27 Paul Eggert <eggert@twinsun.com>
7535
7536 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
7537 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
7538 Sparc, as they were causing more porting problems than the
7539 (minor) performance improvement was worth.
7540
7541 Also, catch up with 1.31's YYSTD.
7542
7543 2001-12-27 Akim Demaille <akim@epita.fr>
7544
7545 * src/output.c (output_gram): Rely on nritems, not the
7546 0-sentinel. See below.
7547 Use -1 as separator, not 0.
7548 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
7549 Rely on -1 as separator in yyrhs, instead of 0.
7550 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
7551 twice `Now at end of input', therefore there are two lines less to
7552 expect.
7553
7554 2001-12-27 Akim Demaille <akim@epita.fr>
7555
7556 * tests/regression.at (Unresolved SR Conflicts):
7557 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
7558 below.
7559
7560 2001-12-27 Akim Demaille <akim@epita.fr>
7561
7562 * src/LR0.c (new_state): Recognize the final state by the fact it
7563 is reached by eoftoken.
7564 (insert_start_shifting_state, insert_eof_shifting_state)
7565 (insert_accepting_state, augment_automaton): Remove, since now
7566 these states are automatically computed from the initial state.
7567 (generate_states): Adjust.
7568 * src/print.c: When reporting a rule number to the user, substract
7569 1, so that the axiom rule is rule 0, and the first user rule is 1.
7570 * src/reduce.c: Likewise.
7571 * src/print_graph.c (print_core): For the time being, just as for
7572 the report, depend upon --trace-flags to dump the full set of
7573 items.
7574 * src/reader.c (readgram): Once the grammar read, insert the rule
7575 0: `$axiom: START-SYMBOL $'.
7576 * tests/set.at: Adjust: rule 0 is now displayed, and since the
7577 number of the states has changed (the final state is no longer
7578 necessarily the last), catch up.
7579
7580 2001-12-27 Akim Demaille <akim@epita.fr>
7581
7582 Try to make the use of the eoftoken valid. Given that its value
7583 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
7584 is used instead of > 0 where appropriate, (ii), depend upon nritems
7585 instead of the 0-sentinel.
7586
7587 * src/gram.h, src/gram.c (nritems): New.
7588 Expected to be duplication of nitems, but for the time being...
7589 * src/reader.c (packgram): Assert nritems and nitems are equal.
7590 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
7591 * src/closure.c (print_closure, print_fderives): Likewise.
7592 * src/gram.c (ritem_print): Likewise.
7593 * src/print.c (print_core, print_grammar): Likewise.
7594 * src/print_graph.c: Likewise.
7595
7596 2001-12-27 Akim Demaille <akim@epita.fr>
7597
7598 * src/main.c (main): If there are complains after grammar
7599 reductions, then output the report anyway if requested, then die.
7600 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
7601 * src/reader.c (eoftoken): New.
7602 (parse_token_decl): If the token being defined has value `0', it
7603 is the eoftoken.
7604 (packsymbols): No longer hack `tags' to insert `$' by hand.
7605 Be sure to preserve the value of the eoftoken.
7606 (reader): Make sure eoftoken is defined.
7607 Initialize nsyms to 0: now eoftoken is created just like the others.
7608 * src/print.c (print_grammar): Don't special case the eof token.
7609 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
7610 lie anyway, albeit pleasant.
7611 * tests/calc.at: Exercise error messages with eoftoken.
7612 Change the grammar so that empty input is invalid.
7613 Adjust expectations.
7614 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
7615
7616 2001-12-27 Akim Demaille <akim@epita.fr>
7617
7618 * configure.in: Check the protos of strchr ans strspn.
7619 Replace strchr if needed.
7620 * src/system.h: Provide the protos of strchr, strspn and memchr if
7621 missing.
7622 * lib/strchr.c: New.
7623 * src/reader.c (symbols_save): Use strchr.
7624
7625 2001-12-27 Akim Demaille <akim@epita.fr>
7626
7627 * src/print.c, src/print_graph.c (escape): New.
7628 Use it to quote the TAGS outputs.
7629 * src/print_graph.c (print_state): Now errors are in red, and
7630 reductions in green.
7631 Prefer high to wide: output the state number on a line of its own.
7632
7633 2001-12-27 Akim Demaille <akim@epita.fr>
7634
7635 * src/state.h, src/state.c (reductions_new): New.
7636 * src/LR0.c (set_state_table): Let all the states have a
7637 `reductions', even if reduced to 0.
7638 (save_reductions): Adjust.
7639 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
7640 * src/print.c (print_reductions, print_actions): Adjust.
7641 * src/output.c (action_row): Adjust.
7642
7643 2001-12-27 Akim Demaille <akim@epita.fr>
7644
7645 * src/state.h, src/state.c (errs_new, errs_dup): New.
7646 * src/LR0.c (set_state_table): Let all the states have an errs,
7647 even if reduced to 0.
7648 * src/print.c (print_errs, print_reductions): Adjust.
7649 * src/output.c (output_actions, action_row): Adjust.
7650 * src/conflicts.c (resolve_sr_conflict): Adjust.
7651
7652 2001-12-27 Akim Demaille <akim@epita.fr>
7653
7654 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
7655
7656 2001-12-27 Akim Demaille <akim@epita.fr>
7657
7658 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
7659 * src/print.c: here.
7660 (lookaheadset, shiftset): New, used as additional storage by
7661 print_reductions.
7662 (print_results): Adjust.
7663 (print_shifts, print_gotos, print_errs): New, extracted from...
7664 (print_actions): here.
7665 * src/print_graph.c (print_actions): Remove dead code.
7666
7667 2001-12-27 Akim Demaille <akim@epita.fr>
7668
7669 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
7670 `$n' and `@n'.
7671
7672 2001-12-27 Akim Demaille <akim@epita.fr>
7673
7674 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
7675 (build_relations): Adjust.
7676
7677 2001-12-27 Akim Demaille <akim@epita.fr>
7678
7679 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
7680 duplication.
7681
7682 2001-12-27 Akim Demaille <akim@epita.fr>
7683
7684 * src/reader.c (packgram): Catch nitems overflows.
7685
7686 2001-12-27 Akim Demaille <akim@epita.fr>
7687
7688 * src/files.c, src/files.h (guard_obstack): Remove.
7689 * src/output.c (output): Adjust.
7690 * src/reader.c (parse_braces): New, factoring...
7691 (copy_action, copy_guard): these two which are renamed as...
7692 (parse_action, parse_guard): these.
7693 As a voluntary consequence, using braces around guards is now
7694 mandatory.
7695
7696 2001-12-27 Akim Demaille <akim@epita.fr>
7697
7698 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
7699 * src/reader.c (symbol_list): `guard' and `guard_line' are new
7700 members.
7701 (symbol_list_new): Adjust.
7702 (copy_action): action_line is the first line, not the last.
7703 (copy_guard): Just as for actions, store the `action' only, not
7704 the switch/case/break flesh.
7705 Don't parse the user action that might follow the guard, let...
7706 (readgram): do it, i.e., now, there can be an action after a
7707 guard.
7708 In other words the guard is just explicitly optional.
7709 (packgram): Adjust.
7710 * src/output.c (guards_output): New.
7711 (output_parser): Call it when needed.
7712 (output): Also free the guard and attrs obstacks.
7713 * src/files.c, src/files.h (obstack_save): Remove.
7714 (output_files): Remove.
7715 As a result, if one needs the former `.act' file, using an
7716 appropriate skeleton which requires actions and guards is now
7717 required.
7718 * src/main.c (main): Adjust.
7719 * tests/semantic.at: New.
7720 * tests/regression.at: Use `input.y' as input file name.
7721 Avoid 8+3 problems by requiring input.c when the test needs the
7722 parser.
7723
7724 2001-12-27 Akim Demaille <akim@epita.fr>
7725
7726 * src/reader.c (symbol_list_new): Be sure to initialize all the
7727 fields.
7728
7729 2001-12-27 Akim Demaille <akim@epita.fr>
7730
7731 All the hacks using a final pseudo state are now useless.
7732
7733 * src/LR0.c (set_state_table): state_table holds exactly nstates.
7734 * src/lalr.c (nLA): New.
7735 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
7736 instead of lookaheadsp from the pseudo state (nstate + 1).
7737
7738 2001-12-27 Akim Demaille <akim@epita.fr>
7739
7740 * src/output.c (action_row, token_actions): Use a state_t instead
7741 of a integer, and nlookaheads instead of the following state's
7742 lookaheadsp.
7743
7744 2001-12-27 Akim Demaille <akim@epita.fr>
7745
7746 * src/conflicts.c (log_resolution, flush_shift)
7747 (resolve_sr_conflict, set_conflicts, solve_conflicts)
7748 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
7749 (conflicts_print, print_reductions): Use a state_t instead of an
7750 integer when referring to a state.
7751 As much as possible, depend upon nlookaheads, instead of the
7752 `lookaheadsp' member of the following state (since lookaheads of
7753 successive states are successive, the difference between state n + 1
7754 and n served as the number of lookaheads for state n).
7755 * src/lalr.c (add_lookback_edge): Likewise.
7756 * src/print.c (print_core, print_actions, print_state)
7757 (print_results): Likewise.
7758 * src/print_graph.c (print_core, print_actions, print_state)
7759 (print_graph): Likewise.
7760 * src/conflicts.h: Adjust.
7761
7762 2001-12-27 Akim Demaille <akim@epita.fr>
7763
7764 * src/bison.hairy: Formatting/comment changes.
7765 ANSIfy.
7766 Remove `register' indications.
7767 Add plenty of `static'.
7768
7769 2001-12-27 Akim Demaille <akim@epita.fr>
7770
7771 * src/output.c (prepare): Drop the muscle `ntbase' which
7772 duplicates ntokens.
7773 * src/bison.simple: Formatting/comment changes.
7774 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
7775 is an undocumented synonym.
7776
7777 2001-12-22 Akim Demaille <akim@epita.fr>
7778
7779 * src/output.c (output_table_data): Change the prototype to use
7780 `int' for array ranges: some invocations do pass an int, not a
7781 short.
7782 Reported by Wayne Green.
7783
7784 2001-12-22 Akim Demaille <akim@epita.fr>
7785
7786 Some actions of web2c.y are improperly triggered.
7787 Reported by Mike Castle.
7788
7789 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
7790 * tests/regression.at (Web2c): Rename as...
7791 (Web2c Report): this.
7792 (Web2c Actions): New.
7793
7794 2001-12-22 Akim Demaille <akim@epita.fr>
7795
7796 Reductions in web2c.y are improperly reported.
7797 Reported by Mike Castle.
7798
7799 * src/conflicts.c (print_reductions): Fix.
7800 * tests/regression.at (Web2c): New.
7801
7802 2001-12-18 Akim Demaille <akim@epita.fr>
7803
7804 Some host fail on `assert (!"foo")', which expands to
7805 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
7806 Reported by Nelson Beebee.
7807
7808 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
7809 `#define it_succeeded 0' and `assert (it_succeeded)'.
7810
7811 2001-12-17 Marc Autret <autret_m@epita.fr>
7812
7813 * src/bison.simple: Don't hard code the skeleton line and filename.
7814 * src/output.c (output_parser): Rename 'line' as 'output_line'.
7815 New line counter 'skeleton_line' (skeleton-line muscle).
7816
7817 2001-12-17 Paul Eggert <eggert@twinsun.com>
7818
7819 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
7820 YYDEBUG must be defined to a nonzero value.
7821
7822 * src/bison.simple (yytname): Do not assume that the user defines
7823 YYDEBUG to a properly parenthesized expression.
7824
7825 2001-12-17 Akim Demaille <akim@epita.fr>
7826
7827 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
7828 nlookaheads is a new member.
7829 Adjust all users.
7830 * src/lalr.h (nlookaheads): Remove this orphan declaration.
7831 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
7832 state.
7833
7834 2001-12-17 Akim Demaille <akim@epita.fr>
7835
7836 * src/files.h, src/files.c (open_files, close_files): Remove.
7837 * src/main.c (main): Don't open/close files, nor invoke lex_free,
7838 let...
7839 * src/reader.c (reader): Do it.
7840
7841 2001-12-17 Akim Demaille <akim@epita.fr>
7842
7843 * src/conflicts.c (print_reductions): Formatting changes.
7844
7845 2001-12-17 Akim Demaille <akim@epita.fr>
7846
7847 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
7848 (flush_reduce): New.
7849 (resolve_sr_conflict): Adjust.
7850
7851 2001-12-17 Akim Demaille <akim@epita.fr>
7852
7853 * src/output.c (output_obstack): Be static and rename as...
7854 (format_obstack): this, to avoid any confusion with files.c's
7855 output_obstack.
7856 * src/reader.h (muscle_obstack): Move to...
7857 * src/output.h: here, since it's defined in output.c.
7858
7859 2001-12-17 Akim Demaille <akim@epita.fr>
7860
7861 * src/output.c (action_row, save_column, default_goto)
7862 (sort_actions, matching_state, pack_vector): Better variable
7863 locality.
7864
7865 2001-12-17 Akim Demaille <akim@epita.fr>
7866
7867 * src/output.c: Various formatting changes.
7868
7869 2001-12-17 Akim Demaille <akim@epita.fr>
7870
7871 * src/files.c (output_files): Free the output_obstack.
7872 * src/main.c (main): Call print and print_graph conditionally.
7873 * src/print.c (print): Work unconditionally.
7874 * src/print_graph.c (print_graph): Work unconditionally.
7875 * src/conflicts.c (log_resolution): Output only if verbose_flag.
7876
7877 2001-12-16 Marc Autret <autret_m@epita.fr>
7878
7879 * src/output.c (actions_output): Fix. When we use %no-lines,
7880 there is one less line per action.
7881
7882 2001-12-16 Marc Autret <autret_m@epita.fr>
7883
7884 * src/bison.simple: Remove a useless #line directive.
7885 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
7886 * src/output.c (get_lines_number): New.
7887 (output_parser): Adjust, now takes care about the lines of a
7888 output muscles.
7889 Fix line numbering.
7890 (actions_output): Computes the number of lines taken by actions.
7891 (output_master_parser): Insert new skeleton which is the name of
7892 the output parser file name.
7893
7894 2001-12-15 Marc Autret <autret_m@epita.fr>
7895
7896 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
7897
7898 2001-12-15 Marc Autret <autret_m@epita.fr>
7899
7900 * src/output.c (output_gram): Keep track of the hairy one.
7901
7902 2001-12-15 Akim Demaille <akim@epita.fr>
7903
7904 Make `make distcheck' work.
7905
7906 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
7907 system.h which uses libgettext.h.
7908
7909 2001-12-15 Akim Demaille <akim@epita.fr>
7910
7911 * src/nullable.c (set_nullable): Useless rules must be skipped,
7912 otherwise, since we range over their symbols, we might look at a
7913 nonterminal which no longer ``exists'', i.e., it is not counted in
7914 `nvars', hence we overflow our arrays.
7915
7916 2001-12-15 Akim Demaille <akim@epita.fr>
7917
7918 The header can also be produced directly, without any obstack!
7919 Yahoo!
7920
7921 * src/files.c, src/files.h (defines_obstack): Remove.
7922 (compute_header_macro): Global.
7923 (defines_obstack_save): Remove.
7924 * src/reader.c (parse_union_decl): No longer output to
7925 defines_obstack: its content can be found in the `stype' muscle
7926 anyway.
7927 (output_token_translations): Merge into...
7928 (symbols_output): this.
7929 Rename as...
7930 (symbols_save): this.
7931 (reader): Adjust.
7932 * src/output.c (header_output): New.
7933 (output): Call it.
7934
7935 2001-12-15 Akim Demaille <akim@epita.fr>
7936
7937 * src/reader.c (parse_union_decl): Instead of handling two obstack
7938 simultaneously, use one to define the `stype' muscle, and use the
7939 value of the latter to fill defines_obstack.
7940 (copy_comment): Remove.
7941 (copy_comment2): Work for a single obstack.
7942 Rename as...
7943 (copy_comment): this.
7944
7945 2001-12-15 Akim Demaille <akim@epita.fr>
7946
7947 * src/lex.c, src/lex.h (xgetc): No longer static.
7948 * src/reader.c (parse_union_decl): Revamp.
7949
7950 2001-12-15 Akim Demaille <akim@epita.fr>
7951
7952 Still making progress in separating Bison into (i) input, (ii)
7953 process, (iii) output: now we can directly output the parser file
7954 without using table_obstack at all.
7955
7956 * src/files.c, src/files.h (table_obstack): Bye bye.
7957 (parser_file_name): New.
7958 * src/files.c (compute_output_file_names): Compute it.
7959 * src/output.c (actions_output, output_parser)
7960 (output_master_parser): To a file instead of an obstack.
7961
7962 2001-12-15 Akim Demaille <akim@epita.fr>
7963
7964 Attach actions to rules, instead of pre-outputting them to
7965 actions_obstack.
7966
7967 * src/gram.h (rule_t): action and action_line are new members.
7968 * src/reader.c (symbol_list): Likewise.
7969 (copy_action): Save the actions within the rule.
7970 (packgram): Save them in rule_table.
7971 * src/output.c (actions_output): New.
7972 (output_parser): Use it on `%%actions'.
7973 (output_rule_data): Don't free rule_table.
7974 (output): Do it.
7975 (prepare): Don't save the `action' muscle.
7976 * src/bison.simple: s/%%action/%%actions/.
7977
7978 2001-12-15 Akim Demaille <akim@epita.fr>
7979
7980 * src/reader.c (copy_action): When --yacc, don't append a `;'
7981 to the user action: let it fail if lacking.
7982 Suggested by Arnold Robbins and Tom Tromey.
7983
7984 2001-12-14 Akim Demaille <akim@epita.fr>
7985
7986 * src/lex.c (literalchar): Simply return the char you decoded, non
7987 longer mess around with obstacks and int pointers.
7988 Adjust all callers.
7989
7990 2001-12-14 Akim Demaille <akim@epita.fr>
7991
7992 * src/lex.c (literalchar): Don't escape the special characters,
7993 just decode them, and keep them as char (before, eol was output as
7994 the 2 char string `\n' etc.).
7995 * src/output.c (output_rule_data): Use quotearg to output the
7996 token strings.
7997
7998 2001-12-13 Paul Eggert <eggert@twinsun.com>
7999
8000 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
8001 Do not infringe on the global user namespace when using C++.
8002 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
8003 All uses of `fprintf' and `stderr' changed.
8004
8005 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
8006
8007 2001-12-13 Akim Demaille <akim@epita.fr>
8008
8009 The computation of nullable is broken: it doesn't handle empty
8010 RHS's properly.
8011
8012 * tests/torture.at (GNU AWK Grammar): New.
8013 * tests/sets.at (Nullable): New.
8014 * src/nullable.c (set_nullable): Instead of blindly looping over
8015 `ritems', loop over the rules, and then over their rhs's.
8016
8017 Work around Autotest bugs.
8018
8019 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
8020 frame, because Autotest understand lines starting with a `+' as
8021 traces from the shell. Then, they are not processed properly.
8022 Admittedly an Autotest bug, but we don't have time to wait for
8023 Autotest to catch up.
8024 * tests/regression.at (Broken Closure): Adjust to the new table
8025 frames.
8026 Move to...
8027 * tests/sets.at: here.
8028
8029 2001-12-13 Akim Demaille <akim@epita.fr>
8030
8031 * src/closure.c (closure): Use nrules instead of playing tricks
8032 with BITS_PER_WORD.
8033
8034 2001-12-13 Akim Demaille <akim@epita.fr>
8035
8036 * src/print.c (print_actions): Output the handling of `$' as the
8037 traces do: shifting the token EOF. Before EOF was treated as a
8038 nonterminal.
8039 * tests/regression.at: Adjust some tests.
8040 * src/print_graph.c (print_core): Complete the set of items via
8041 closure. The next-to-final and final states are still unsatisfying,
8042 but that's to be addressed elsewhere.
8043 No longer output the rule numbers, but do output the state number.
8044 A single loop for the shifts + gotos is enough, but picked a
8045 distinct color for each.
8046 (print_graph): Initialize and finalize closure.
8047
8048 2001-12-13 Akim Demaille <akim@epita.fr>
8049
8050 * src/reader.c (readgram): Remove dead code, an strip useless
8051 braces.
8052 (get_type): Remove, unused.
8053
8054 2001-12-12 Akim Demaille <akim@epita.fr>
8055
8056 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
8057 on that of lib/error.c.
8058
8059 2001-12-12 Akim Demaille <akim@epita.fr>
8060
8061 Some hosts don't like `/' in includes.
8062
8063 * src/system.h: Include libgettext.h without qualifying the path.
8064 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
8065 $(top_srcdir).
8066
8067 2001-12-11 Marc Autret <autret_m@epita.fr>
8068
8069 * src/output.c (output_parser): Remove useless muscle.
8070
8071 2001-12-11 Marc Autret <autret_m@epita.fr>
8072
8073 * src/bison.simple: Remove #line just before %%epilogue. It
8074 is now handled in ...
8075 * src/reader.c (read_additionnal_code): Add the output of a
8076 #line for the epilogue.
8077
8078 2001-12-10 Marc Autret <autret_m@epita.fr>
8079
8080 * src/reader.c (copy_definition): Re-use CPP-outed code which
8081 replace precedent remove.
8082 * src/bison.simple: Remove #line before %%prologue because
8083 %%input-line is wrong at this time.
8084
8085 2001-12-10 Marc Autret <autret_m@epita.fr>
8086
8087 * src/reader.c (symbols_output): Clean up.
8088 * src/output.c (output_gram, output): Clean up.
8089
8090 2001-12-10 Akim Demaille <akim@epita.fr>
8091
8092 * src/lalr.c (initialize_lookaheads): New. Extracted from...
8093 * src/LR0.c (set_state_table): here.
8094 * src/lalr.c (lalr): Call it.
8095
8096 2001-12-10 Akim Demaille <akim@epita.fr>
8097
8098 * src/state.h (shifts): Remove the `number' member: shifts are
8099 attached to state, hence no longer need to be labelled with a
8100 state number.
8101
8102 2001-12-10 Akim Demaille <akim@epita.fr>
8103
8104 Now that states have a complete set of members, the linked list of
8105 shifts is useless: just fill directly the state's shifts member.
8106
8107 * src/state.h (shifts): Remove the `next' member.
8108 * src/LR0.c (first_state, last_state): Remove.
8109 Adjust the callers.
8110 (augment_automaton): Don't look for the shifts that must be added
8111 a shift on EOF: it is those of the state we looked for! But now,
8112 since shifts are attached, it is no longer needed to looking
8113 merely by its id: its number.
8114
8115 2001-12-10 Akim Demaille <akim@epita.fr>
8116
8117 * src/LR0.c (augment_automaton): Better variable locality.
8118 Remove an impossible branch: if there is a state corresponding to
8119 the start symbol being shifted, then there is shift for the start
8120 symbol from the initial state.
8121
8122 2001-12-10 Akim Demaille <akim@epita.fr>
8123
8124 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
8125 only when appropriate: when insert_start_shifting_state' is not
8126 invoked.
8127 * tests/regression.at (Rule Line Numbers): Adjust.
8128
8129 2001-12-10 Akim Demaille <akim@epita.fr>
8130
8131 * src/LR0.c (augment_automaton): Now that all states have shifts,
8132 merge the two cases addition shifts to the initial state.
8133
8134 2001-12-10 Akim Demaille <akim@epita.fr>
8135
8136 * src/lalr.c (set_state_table): Move to...
8137 * src/LR0.c: here.
8138 * src/lalr.c (lalr): Don't call it...
8139 * src/LR0.c (generate_states): do it.
8140 * src/LR0.h (first_state): Remove, only the table is used.
8141
8142 2001-12-10 Akim Demaille <akim@epita.fr>
8143
8144 * src/LR0.h (first_shift, first_reduction): Remove.
8145 * src/lalr.c: Don't use first_shift: find shifts through the
8146 states.
8147
8148 2001-12-10 Akim Demaille <akim@epita.fr>
8149
8150 * src/LR0.c: Attach shifts to states as soon as they are
8151 computed.
8152 * src/lalr.c (set_state_table): Instead of assigning shifts to
8153 state, just assert that the mapping was properly done.
8154
8155 2001-12-10 Akim Demaille <akim@epita.fr>
8156
8157 * src/LR0.c (insert_start_shift): Rename as...
8158 (insert_start_shifting_state): this.
8159 (insert_eof_shifting_state, insert_accepting_state): New.
8160 (augment_automaton): Adjust.
8161 Better locality of the variables.
8162 When looking if the start_symbol is shifted from the initial
8163 state, using `while (... symbol != start_symbol ...)' sounds
8164 better than `while (... symbol < start_symbol ...)': If fail
8165 to see how the order between symbols could be relevant!
8166
8167 2001-12-10 Akim Demaille <akim@epita.fr>
8168
8169 * src/getargs.h: Don't declare `spec_name_prefix' and
8170 `spec_file_prefix', declared by src/files.h.
8171 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
8172 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
8173 * src/output.c (prepare): Adjust.
8174 * src/reader.c (symbols_output): Likewise.
8175 * src/vmsgetargs.c: Vaguely adjust, but who cares?
8176
8177 2001-12-10 Akim Demaille <akim@epita.fr>
8178
8179 * src/muscle_tab.c (muscle_init): NULL is a better default than
8180 `"0"'.
8181
8182 2001-12-10 Akim Demaille <akim@epita.fr>
8183
8184 * src/reader.c (reader): Calling symbols_output once is enough.
8185
8186 2001-12-10 Akim Demaille <akim@epita.fr>
8187
8188 Now that states have a complete set of members, the linked list of
8189 reductions is useless: just fill directly the state's reductions
8190 member.
8191
8192 * src/state.h (struct reductions): Remove member `number' and
8193 `next'.
8194 * src/LR0.c (first_reduction, last_reduction): Remove.
8195 (save_reductions): Don't link the new reductions, store them in
8196 this_state.
8197 * src/lalr.c (set_state_table): No need to attach reductions to
8198 states, it's already done.
8199 * src/output.c (output_actions): No longer free the shifts, then
8200 the reductions, then the states: free all the states and their
8201 members.
8202
8203 2001-12-10 Akim Demaille <akim@epita.fr>
8204
8205 * src/options.c (OPTN, DRTV, BOTH): New.
8206 (option_table): Use them.
8207
8208 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
8209 the job of system.h.
8210 * src/options.c: Don't include stdio.h and xalloc.h for the same
8211 reasons.
8212
8213 2001-12-10 Akim Demaille <akim@epita.fr>
8214
8215 * src/output.c (output, prepare): Make sure the values of the
8216 muscles `action' and `prologue' are 0-terminated.
8217
8218 2001-12-10 Akim Demaille <akim@epita.fr>
8219
8220 Clean up GCC warnings.
8221
8222 * src/reader.c (copy_action): `buf' is not used.
8223 (parse_skel_decl): Be static.
8224 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
8225 * src/options.h (create_long_option_table): Have a real prototype.
8226 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
8227 (hash_delete_at): Return const void *.
8228 Adjust casts to preserve the const.
8229
8230 2001-12-10 Akim Demaille <akim@epita.fr>
8231
8232 * configure.in: Require 2.52g.
8233 M4 is not needed, but AUTOM4TE is.
8234 * m4/m4.m4: Remove.
8235 * tests/Makefile.am: Adjust.
8236
8237 2001-12-10 Akim Demaille <akim@epita.fr>
8238
8239 One structure for states is enough, even though theoretically
8240 there are LR(0) states and LALR(1) states.
8241
8242 * src/lalr.h (state_t): Remove.
8243 (state_table): Be state_t **, not state_t *.
8244 * src/state.h (core, CORE_ALLOC): Rename as...
8245 (state_t, STATE_ALLOC): this.
8246 Add the LALR(1) members: shifts, reductions, errs.
8247 * src/LR0.c (state_table): Rename as...
8248 (state_hash): this, to avoid name clashes with the global
8249 `state_table'.
8250 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
8251 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
8252
8253 2001-12-10 Akim Demaille <akim@epita.fr>
8254
8255 Bison dumps core on bash.y.
8256 Reported by Pascal Bart.
8257
8258 * src/warshall.c (bitmatrix_print): New.
8259 (TC): Use it.
8260 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
8261 j must be the outer loop.
8262 * tests/regression.at (Broken Closure): New.
8263
8264 2001-12-05 Akim Demaille <akim@epita.fr>
8265
8266 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
8267 its argument.
8268 Reported by Peter Hamorsky.
8269
8270 2001-12-05 Akim Demaille <akim@epita.fr>
8271
8272 * src/conflicts.c (err_table): Remove.
8273 (resolve_sr_conflict): Adjust.
8274 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
8275 Rename as...
8276 (state_t.reductions, state_t.shifts): this.
8277
8278 2001-12-05 Akim Demaille <akim@epita.fr>
8279
8280 * src/reduce.c (reduce_grammar_tables): No longer disable the
8281 removal of useless rules via CPP but via `if (0)', so that the
8282 compiler still check the code is valid.
8283 For instance, it should have noticed `rline' no longer exists: use
8284 the `line' member of rule_t.
8285 * src/gram.c (dummy, rline): Remove, unused.
8286
8287 2001-12-05 Akim Demaille <akim@epita.fr>
8288
8289 * src/output.c (pack_vector): Use assert, not berror.
8290 * src/main.c (berror): Remove, unused.
8291
8292 2001-12-05 Akim Demaille <akim@epita.fr>
8293
8294 New experimental feature: if --verbose --trace output all the
8295 items of a state, not only its kernel.
8296
8297 * src/print.c (print_core): If `trace_flag', then invoke closure
8298 before outputting the items of the state (print_core is no longer
8299 a correct name them).
8300 (print_results): Invoke new_closure/free_closure if needed.
8301
8302 2001-12-05 Akim Demaille <akim@epita.fr>
8303
8304 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
8305 * src/closure.c, src/closure.h (itemsetsize): Rename as...
8306 (nitemset): for consistency with the rest of the project.
8307
8308 2001-12-05 Akim Demaille <akim@epita.fr>
8309
8310 * src/closure.c (print_closure): Improve.
8311 (closure): Use it for printing input and output.
8312
8313 2001-12-05 Akim Demaille <akim@epita.fr>
8314
8315 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
8316 indexed by nonterminals.
8317
8318 2001-12-05 Akim Demaille <akim@epita.fr>
8319
8320 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
8321 what it was!).
8322 * src/warshall.h: Remove accidental duplication of the content.
8323
8324 2001-12-05 Akim Demaille <akim@epita.fr>
8325
8326 * src/closure.c (set_fderives): De-obfuscate.
8327
8328 2001-12-05 Akim Demaille <akim@epita.fr>
8329
8330 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
8331
8332 2001-12-05 Akim Demaille <akim@epita.fr>
8333
8334 * src/closure.c (set_firsts): De-obfuscate.
8335
8336 2001-12-05 Akim Demaille <akim@epita.fr>
8337
8338 * src/output.c (action_row): De-obfuscate
8339 using the good o' techniques: arrays not pointers, variable
8340 locality, BITISSET, RESETBIT etc.
8341
8342 2001-12-05 Akim Demaille <akim@epita.fr>
8343
8344 Pessimize the code to simplify it: from now on, all the states
8345 have a valid SHIFTS, which NSHIFTS is possibly 0.
8346
8347 * src/LR0.c (shifts_new): Be global and move to..
8348 * src/state.c, src/state.h: here.
8349 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
8350 * src/print_graph: Adjust.
8351
8352 2001-12-05 Akim Demaille <akim@epita.fr>
8353
8354 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
8355 * src/conflicts.c: Use it.
8356 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
8357 incorrectly ``simplified''.
8358
8359 2001-12-05 Akim Demaille <akim@epita.fr>
8360
8361 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
8362 using the good o' techniques: arrays not pointers, variable
8363 locality, BITISSET, RESETBIT etc.
8364
8365 2001-12-05 Akim Demaille <akim@epita.fr>
8366
8367 * src/state.h (SHIFT_SYMBOL): New.
8368 * src/conflicts.c: Use it to deobfuscate.
8369
8370 2001-12-05 Akim Demaille <akim@epita.fr>
8371
8372 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
8373 (print_reductions): De-obfuscate using the good o' techniques:
8374 arrays not pointers, variable locality, BITISSET.
8375
8376 2001-12-05 Akim Demaille <akim@epita.fr>
8377
8378 * src/conflicts.c (print_reductions): Arrays, not pointers.
8379 Use BITISSET.
8380
8381 2001-12-05 Akim Demaille <akim@epita.fr>
8382
8383 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8384
8385 2001-12-05 Akim Demaille <akim@epita.fr>
8386
8387 * src/conflicts.c (print_reductions): Improve variable locality.
8388
8389 2001-12-05 Akim Demaille <akim@epita.fr>
8390
8391 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8392
8393 2001-12-05 Akim Demaille <akim@epita.fr>
8394
8395 * src/conflicts.c (print_reductions): Improve variable locality.
8396
8397 2001-12-05 Akim Demaille <akim@epita.fr>
8398
8399 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
8400 * src/lalr.c: Use them.
8401
8402 2001-12-05 Akim Demaille <akim@epita.fr>
8403
8404 * src/LR0.c (augment_automaton): Formatting changes.
8405 Better variable locality.
8406
8407 2001-12-05 Akim Demaille <akim@epita.fr>
8408
8409 * src/lalr.c (matrix_print): New.
8410 (transpose): Use it.
8411 Use arrays instead of pointers.
8412
8413 2001-12-05 Akim Demaille <akim@epita.fr>
8414
8415 * src/lalr.c (maxrhs): Move to...
8416 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
8417 * src/lalr.c (build_relations): Adjust.
8418
8419 2001-12-05 Akim Demaille <akim@epita.fr>
8420
8421 * src/lalr.c (transpose): Free the memory allocated to the
8422 argument, as it is replaced by the results by the unique caller.
8423 (build_relations): Merely invoke transpose: it handles the memory
8424 deallocation.
8425 Improve variable locality.
8426 Avoid variables used as mere abbreviations.
8427 (compute_lookaheads): Use arrays instead of pointers.
8428
8429 2001-12-05 Akim Demaille <akim@epita.fr>
8430
8431 * src/lalr.c (initialize_F): Improve variable locality.
8432 Avoid variables used as mere abbreviations.
8433
8434 2001-12-05 Akim Demaille <akim@epita.fr>
8435
8436 * src/derives.c (print_derives): Display the ruleno.
8437 * src/lalr.c (initialize_F, transpose): Better variable locality
8438 to improve readability.
8439 Avoid variables used as mere abbreviations.
8440
8441 2001-12-05 Akim Demaille <akim@epita.fr>
8442
8443 * src/lalr.c (traverse): Use arrays instead of pointers.
8444
8445 2001-12-05 Akim Demaille <akim@epita.fr>
8446
8447 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
8448 the handling of squeue.
8449 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8450
8451 2001-12-05 Akim Demaille <akim@epita.fr>
8452
8453 Because useless nonterminals are now kept alive (instead of being
8454 `destroyed'), we now sometimes examine them, and store information
8455 related to them. Hence we need to know their number, and adjust
8456 memory allocations.
8457
8458 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
8459 static.
8460 * src/LR0.c (allocate_itemsets): The memory allocated to
8461 `symbol_count' was used for two different purpose: once to count
8462 the number of occurrences of each symbol, and later reassigned to
8463 `shift_symbol', containing the symbol that can be shifted from a
8464 given state.
8465 Deobfuscate, i.e., allocate, use and free `symbol_count' here
8466 only, and...
8467 (new_itemsets): Allocate `shift_symbol' here.
8468 (allocate_itemsets): symbol_count includes useless nonterminals.
8469 Make room for them.
8470 (free_storage): Use `free', not `XFREE', for pointers that cannot
8471 be null.
8472
8473 2001-12-05 Akim Demaille <akim@epita.fr>
8474
8475 * src/nullable.c (set_nullable): Deobfuscate the handling of
8476 ritem.
8477 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
8478
8479 2001-12-05 Akim Demaille <akim@epita.fr>
8480
8481 * src/gram.c, src/gram.h (ritem_print): New.
8482 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
8483 (This useless function was defined only to work around VMS linkers
8484 that can't handle compilation units with variables only).
8485 * src/reduce.c (dump_grammar): Use it to trace the construction of
8486 ritem.
8487
8488 2001-12-04 Paul Eggert <eggert@twinsun.com>
8489
8490 * src/bison.simple (union yyalloc): Change member names
8491 to be the same as the stack names.
8492 (yyparse): yyptr is now union yyalloc *, not char *.
8493 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
8494 and may generate better code on some machines.
8495 (yystpcpy): Use prototype if __STDC__ is defined, not just
8496 if __cplusplus is defined.
8497
8498 2001-11-30 Akim Demaille <akim@epita.fr>
8499
8500 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
8501 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
8502 Gettext doesn't compile cleanly, and dies with -Werror.
8503 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
8504 Include WARNING_CFLAGS here.
8505 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
8506 before being defined.
8507
8508 2001-11-27 Paul Eggert <eggert@twinsun.com>
8509
8510 * lib/quotearg.h (quotearg_n, quotearg_n_style):
8511 First arg is int, not unsigned.
8512 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
8513 (SIZE_MAX, UINT_MAX): New macros.
8514 (quotearg_n_options): Abort if N is negative.
8515 Avoid overflow check on hosts where size_t is 64 bits and int
8516 is 32 bits, as overflow is impossible there.
8517 Fix off-by-one typo that caused unnecessary reallocation.
8518
8519 2001-11-29 Paul Eggert <eggert@twinsun.com>
8520
8521 Name space cleanup in generated parser.
8522
8523 * doc/bison.texinfo (Bison Parser): Discuss system headers
8524 and their effect on the user name space.
8525
8526 * src/bison.simple:
8527 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
8528 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
8529 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
8530
8531 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
8532 on user names when possible.
8533
8534 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
8535 Simplify test for whather <alloca.h> exists.
8536
8537 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
8538
8539 (<stdio.h>): Include if YYDEBUG.
8540
8541 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
8542 ! defined (yyoverflow) && ! defined (yymemcpy).
8543
8544 (yymemcpy, yyparse): Rename local variables as needed so that
8545 they all begin with 'yy'.
8546
8547 (yystrlen, yystpcpy): New functions.
8548
8549 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
8550 All uses changed.
8551
8552 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
8553 instead of relying on string.h functions. Use YYSTACK_ALLOC
8554 and YYSTACK_FREE instead of malloc and free.
8555
8556 2001-11-30 Akim Demaille <akim@epita.fr>
8557
8558 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
8559 before their first uses.
8560 (YYBISON, YYPURE): Move to the top of the output.
8561
8562 2001-11-30 Akim Demaille <akim@epita.fr>
8563
8564 * tests/reduce.at (Useless Nonterminals): Fix.
8565
8566 2001-11-30 Akim Demaille <akim@epita.fr>
8567
8568 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
8569 if body instead of `;' to pacify GCC's warnings.
8570
8571 2001-11-30 Akim Demaille <akim@epita.fr>
8572
8573 Instead of mapping the LHS of unused rules to -1, keep the LHS
8574 valid, but flag the rules as invalid.
8575
8576 * src/gram.h (rule_t): `useful' is a new member.
8577 * src/print.c (print_grammar): Adjust.
8578 * src/derives.c (set_derives): Likewise.
8579 * src/reader.c (packgram, reduce_output): Likewise.
8580 * src/reduce.c (reduce_grammar_tables): Likewise.
8581 * tests/reduce.at (Underivable Rules, Useless Rules): New.
8582
8583 2001-11-30 Akim Demaille <akim@epita.fr>
8584
8585 * src/reduce.c (reduce_output): Formatting changes.
8586 * src/print.c (print_results, print_grammar): Likewise.
8587 * tests/regression.at (Rule Line Numbers)
8588 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
8589
8590 2001-11-30 Akim Demaille <akim@epita.fr>
8591
8592 * src/reduce.c (nonterminals_reduce): Instead of throwing away
8593 useless nonterminals, move them at the end of the symbol arrays.
8594 (reduce_output): Adjust.
8595 * tests/reduce.at (Useless Nonterminals): Adjust.
8596
8597 2001-11-30 Akim Demaille <akim@epita.fr>
8598
8599 * src/reduce.c: Various comment/formatting changes.
8600 (nonterminals_reduce): New, extracted from...
8601 (reduce_grammar_tables): here.
8602 (reduce_grammar): Call nonterminals_reduce.
8603
8604 2001-11-29 Paul Eggert <eggert@twinsun.com>
8605
8606 * src/bison.simple (YYSTACK_REALLOC): Remove.
8607 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
8608 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
8609 New macros.
8610 (union yyalloc): New type.
8611 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
8612 an arbitrary restriction on hosts where size_t is wider than int.
8613
8614 (yyparse): Don't dump core if alloca or malloc fails; instead, report
8615 a parser stack overflow. Allocate just one block of memory for all
8616 three stacks, instead of allocating three blocks; this typically is
8617 faster and reduces fragmentation.
8618
8619 Do not limit the number of items in the stack to a value that fits
8620 in 'int', as this is an arbitrary limit on hosts with 64-bit
8621 size_t and 32-bit int.
8622
8623 2001-11-29 Marc Autret <autret_m@epita.fr>
8624
8625 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
8626 of defining YYERROR_VERBOSE.
8627 [AT_DATA]: $4 is now out of C declarations in the prologue.
8628
8629 2001-11-28 Marc Autret <autret_m@epita.fr>
8630
8631 * src/reader.c (parse_dquoted_param): New.
8632 (parse_skel_decl): Use it.
8633 * src/lex.h: Add its prototype.
8634 * src/lex.c (literalchar): Become not static.
8635
8636 2001-11-28 Marc Autret <autret_m@epita.fr>
8637
8638 * src/output.h: And put its extern declaration here.
8639 * src/output.c (error_verbose): Define here.
8640 (prepare): Echo name modification.
8641 * src/getargs.h: Clean its extern declaration.
8642 * src/getargs.c (error_verbose_flag): Remove.
8643 (getargs): Remove case 'e'.
8644 * src/options.c (option_table): 'error-verbose' is now seen as simple
8645 percent option.
8646 Include output.h.
8647
8648 * src/reader.c (read_declarations): Remove case tok_include.
8649 (parse_include_decl): Remove.
8650 * src/lex.h (token_t): Remove tok_include.
8651 * src/options.c (option_table): 'include' is now a simple command line
8652 option.
8653
8654 2001-11-28 Marc Autret <autret_m@epita.fr>
8655
8656 * src/bison.simple: Adjust muscle names.
8657 * src/muscle_tab.c (muscle_init): Also rename the muscles.
8658 * src/output.c (prepare): s/_/-/ for the muscles names.
8659 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
8660
8661 2001-11-28 Marc Autret <autret_m@epita.fr>
8662
8663 * src/bison.simple: Fix debug.
8664 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
8665
8666 2001-11-28 Akim Demaille <akim@epita.fr>
8667
8668 * src/LR0.c (shifts_new): New.
8669 (save_shifts, insert_start_shift, augment_automaton): Use it.
8670
8671 2001-11-28 Akim Demaille <akim@epita.fr>
8672
8673 * src/closure.c (closure): `b' and `ruleno' denote the same value:
8674 keep ruleno only.
8675
8676 2001-11-28 Akim Demaille <akim@epita.fr>
8677
8678 * src/closure.c (closure): Instead of looping over word in array
8679 then bits in words, loop over bits in array.
8680
8681 2001-11-28 Akim Demaille <akim@epita.fr>
8682
8683 * src/closure.c (closure): No longer optimize the special case
8684 where all the bits of `ruleset[r]' are set to 0, to make the code
8685 clearer.
8686
8687 2001-11-28 Akim Demaille <akim@epita.fr>
8688
8689 * src/closure.c (closure): `r' and `c' are new variables, used to
8690 de-obfuscate accesses to RULESET and CORE.
8691
8692 2001-11-28 Akim Demaille <akim@epita.fr>
8693
8694 * src/reduce.c (reduce_print): Use ngettext.
8695 (dump_grammar): Improve the trace accuracy.
8696
8697 2001-11-28 Akim Demaille <akim@epita.fr>
8698
8699 * src/reduce.c (dump_grammar): Don't translate trace messages.
8700
8701 2001-11-28 Akim Demaille <akim@epita.fr>
8702
8703 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
8704 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
8705 as all tags are free'ed afterwards.
8706 From Enrico Scholz.
8707
8708 2001-11-27 Paul Eggert <eggert@twinsun.com>
8709
8710 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
8711 use alloca when we didn't want to, and vice versa.
8712
8713 2001-11-27 Marc Autret <autret_m@epita.fr>
8714
8715 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
8716 initialization.
8717 * src/output.c (prepare): Remove its update.
8718
8719 2001-11-27 Marc Autret <autret_m@epita.fr>
8720
8721 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
8722 Use %error-verbose.
8723
8724 2001-11-27 Marc Autret <autret_m@epita.fr>
8725
8726 * src/bison.simple: Remove YYERROR_VERBOSE using.
8727 Use %%error_verbose.
8728 (yyparse): Likewise.
8729 * src/output.c (prepare): Give its final value.
8730 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
8731 * src/getargs.h: Add its extern declaration.
8732 * src/getargs.c (error_verbose_flag): New int.
8733 (getargs): Update to catch new case.
8734 * src/options.c (option_table): 'error-verbose' is a new option.
8735 (shortopts): Update.
8736
8737 2001-11-27 Akim Demaille <akim@epita.fr>
8738
8739 * src/system.h: Use intl/libgettext.h.
8740 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
8741
8742 2001-11-27 Akim Demaille <akim@epita.fr>
8743
8744 * tests/torture.at (Exploding the Stack Size with Malloc):
8745 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
8746
8747 2001-11-27 Akim Demaille <akim@epita.fr>
8748
8749 * src/files.c: Include error.h.
8750 Reported by Hans Aberg.
8751
8752 2001-11-26 Marc Autret <autret_m@epita.fr>
8753
8754 * src/reader.c (parse_include_decl): New, not yet implemented.
8755 (read_declarations): Add case tok_include.
8756 * src/getargs.h (include): Add its extern definition.
8757 * src/getargs.c (include): New const char *.
8758 (getargs): Add case '-I'.
8759 * src/options.c (option_table): Add include as command line and
8760 percent option.
8761 * src/lex.h (token_t): Add tok_include.
8762
8763 2001-11-26 Akim Demaille <akim@epita.fr>
8764
8765 * src/reader.c (readgram): Make sure rules for mid-rule actions
8766 have a lineno equal to that of their host rule.
8767 Reported by Hans Aberg.
8768 * tests/regression.at (Rule Line Numbers): New.
8769
8770 2001-11-26 Akim Demaille <akim@epita.fr>
8771
8772 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
8773 size_ts.
8774
8775 2001-11-26 Akim Demaille <akim@epita.fr>
8776
8777 * src/complain.c, src/complain.h (error): Remove, provided by
8778 lib/error.[ch].
8779
8780 2001-11-26 Akim Demaille <akim@epita.fr>
8781
8782 * src/reader.c (read_declarations): Don't abort on tok_illegal,
8783 issue an error message.
8784 * tests/regression.at (Invalid %directive): New.
8785 Reported by Hans Aberg.
8786
8787 2001-11-26 Akim Demaille <akim@epita.fr>
8788
8789 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
8790 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8791
8792 2001-11-26 Akim Demaille <akim@epita.fr>
8793
8794 * src/conflicts.c (conflicts_print): Don't complain at all when
8795 there are no reduce/reduce conflicts, and as many shift/reduce
8796 conflicts as expected.
8797 * tests/regression.at (%expect right): Adjust.
8798
8799 2001-11-23 Akim Demaille <akim@epita.fr>
8800
8801 * lib/alloca.c: Update, from fileutils.
8802
8803 2001-11-23 Akim Demaille <akim@epita.fr>
8804
8805 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
8806
8807 2001-11-23 Akim Demaille <akim@epita.fr>
8808
8809 * src/system.h: Include alloca.h.
8810 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
8811
8812 2001-11-23 Akim Demaille <akim@epita.fr>
8813
8814 * src/print_graph.c (print_actions): Remove `rule', unused.
8815 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
8816 pacify GCC's signed < unsigned warnings.
8817 * src/closure.c (itemsetsize): Likewise.
8818 * src/reader.c (symbol_list_new): Static.
8819
8820 2001-11-23 Akim Demaille <akim@epita.fr>
8821
8822 Attaching lineno to buckets is stupid, since only one copy of each
8823 symbol is kept, only the line of the first occurrence is kept too.
8824
8825 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
8826 * src/reader.c (rline_allocated): Remove, unused.
8827 (symbol_list): Have a `line' member.
8828 (symbol_list_new): New.
8829 (readgram): Use it.
8830 * src/print.c (print_grammar): Output the rule line numbers.
8831 * tests/regression.at (Solved SR Conflicts)
8832 (Unresolved SR Conflicts): Adjust.
8833 Reported by Hans Aberg.
8834
8835 2001-11-22 Marc Autret <autret_m@epita.fr>
8836
8837 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
8838
8839 2001-11-22 Marc Autret <autret_m@epita.fr>
8840
8841 * src/muscle_tab.c (muscle_init): Remove initialization of
8842 skeleton muscle.
8843 * src/output.c (output_master_parser): Do it here.
8844
8845 2001-11-20 Akim Demaille <akim@epita.fr>
8846
8847 * po/sv.po: New.
8848 * configure.in (ALL_LINGUAS): Adjust.
8849 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
8850 longer contains strings to translate.
8851
8852 2001-11-19 Akim Demaille <akim@epita.fr>
8853
8854 * src/conflicts.c (conflicts_print): Add a missing \n.
8855
8856 2001-11-19 Akim Demaille <akim@epita.fr>
8857
8858 * src/nullable.c (nullable_print): New.
8859 (set_nullable): Call it when tracing.
8860 Better locality of variables.
8861
8862 2001-11-19 Akim Demaille <akim@epita.fr>
8863
8864 * src/print.c (print_actions): Better locality of variables.
8865
8866 2001-11-19 Akim Demaille <akim@epita.fr>
8867
8868 * src/derives.c (print_derives): Fix and enrich.
8869 * src/closure.c (print_fderives): Likewise.
8870
8871 2001-11-19 Akim Demaille <akim@epita.fr>
8872
8873 * src/closure.c (itemsetend): Remove, replaced with...
8874 (itemsetsize): new.
8875
8876 2001-11-19 Akim Demaille <akim@epita.fr>
8877
8878 * src/LR0.c (kernel_end): Remove, replaced with...
8879 (kernel_size): new.
8880
8881 2001-11-19 Akim Demaille <akim@epita.fr>
8882
8883 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
8884 to clarify.
8885
8886 2001-11-19 Akim Demaille <akim@epita.fr>
8887
8888 * src/closure.c (closure): Use arrays instead of pointers to clarify.
8889
8890 2001-11-19 Akim Demaille <akim@epita.fr>
8891
8892 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
8893 trace messages.
8894 * src/LR0.c: Likewise.
8895 (allocate_itemsets): Use arrays instead of pointers to clarify.
8896
8897 2001-11-19 Akim Demaille <akim@epita.fr>
8898
8899 * src/getargs.c (statistics_flag): Replace with...
8900 (trace_flag): New.
8901 (longopts): Accept --trace instead of --statistics.
8902 * src/getargs.h, src/options.c: Adjust.
8903 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
8904 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
8905
8906 2001-11-19 Akim Demaille <akim@epita.fr>
8907
8908 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
8909 pointers to clarify the code.
8910 (save_reductions, save_shifts): Factor common parts of alternatives.
8911
8912 2001-11-19 Akim Demaille <akim@epita.fr>
8913
8914 * src/LR0.c (new_state, get_state): Complete TRACE code.
8915 * src/closure.c: Include `reader.h' to get `tags', needed by the
8916 trace code.
8917 Rename the conditional DEBUG as TRACE.
8918 Output consistently TRACEs to stderr, not stdout.
8919 * src/derives.c: Likewise.
8920 * src/reduce.c: (inaccessable_symbols): Using if is better style
8921 than goto.
8922 Use `#if TRACE' instead of `#if 0' for tracing code.
8923
8924 2001-11-19 Akim Demaille <akim@epita.fr>
8925
8926 * src/system.h (LIST_FREE, shortcpy): New.
8927 * src/LR0.c: Use them.
8928 * src/output.c (free_itemsets, free_reductions, free_shifts):
8929 Remove, replaced by LIST_FREE.
8930
8931 2001-11-19 Akim Demaille <akim@epita.fr>
8932
8933 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8934 (REDUCTIONS_ALLOC): New.
8935 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8936 allocation.
8937
8938 2001-11-19 Akim Demaille <akim@epita.fr>
8939
8940 * src/LR0.c (new_state): Complete trace code.
8941 * src/nullable.c (set_nullable): Don't translate traces.
8942
8943 2001-11-19 Akim Demaille <akim@epita.fr>
8944
8945 * src/print_graph.c (print_core): Better locality of variables.
8946 * src/print.c (print_core): Likewise.
8947
8948 2001-11-19 Akim Demaille <akim@epita.fr>
8949
8950 * src/vcg.c: You do the output, so you are responsible of the
8951 handling of VCG syntax, in particular: use quotearg.
8952 * src/print_graph.c: Don't.
8953 (print_actions): Don't output the actions as part of the nodes,
8954 since that's the job of the edges.
8955 (print_state): Don't output by hand: fill the node description,
8956 and ask for its output.
8957
8958 2001-11-19 Akim Demaille <akim@epita.fr>
8959
8960 * src/bison.simple (yyparse): When verbosely reporting an error,
8961 no longer put additional quotes around token names.
8962 * tests/calc.at: Adjust.
8963
8964 2001-11-19 Akim Demaille <akim@epita.fr>
8965
8966 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8967 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8968 * src/output.c: Adjust.
8969
8970 2001-11-19 Akim Demaille <akim@epita.fr>
8971
8972 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8973 (rule_t): this.
8974 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8975
8976 2001-11-19 Akim Demaille <akim@epita.fr>
8977
8978 * src/gram.h (rule_t): New.
8979 (rule_table): New.
8980 (rrhs, rlhs): Remove, part of state_t.
8981 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8982 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8983 * src/reader.c, src/reduce.c: Adjust.
8984
8985 2001-11-19 Akim Demaille <akim@epita.fr>
8986
8987 * src/reader.c (symbols_output): New, extracted from...
8988 (packsymbols): Here.
8989 (reader): Call it.
8990
8991 2001-11-19 Akim Demaille <akim@epita.fr>
8992
8993 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8994 (maxrhs): this new function.
8995
8996 2001-11-19 Akim Demaille <akim@epita.fr>
8997
8998 * src/lalr.c (F): New macro to access the variable F.
8999 Adjust.
9000
9001 2001-11-19 Akim Demaille <akim@epita.fr>
9002
9003 * src/lalr.h (LA): New macro to access the variable LA.
9004 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9005 * src/lalr.c: Adjust.
9006
9007 2001-11-19 Akim Demaille <akim@epita.fr>
9008
9009 * src/lalr.c (initialize_LA): Only initialize LA. Let...
9010 (set_state_table): handle the `lookaheads' members.
9011
9012 2001-11-19 Akim Demaille <akim@epita.fr>
9013
9014 * src/lalr.h (lookaheads): Removed array, whose contents is now
9015 a member of...
9016 (state_t): this structure.
9017 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9018 Adjust.
9019
9020 2001-11-19 Akim Demaille <akim@epita.fr>
9021
9022 * src/lalr.h (consistent): Removed array, whose contents is now
9023 a member of...
9024 (state_t): this structure.
9025 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9026 Adjust.
9027
9028 2001-11-19 Akim Demaille <akim@epita.fr>
9029
9030 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
9031 contents are now members of...
9032 (state_t): this structure.
9033 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9034 Adjust.
9035
9036 2001-11-19 Akim Demaille <akim@epita.fr>
9037
9038 * src/lalr.h (state_t): New.
9039 (state_table): Be a state_t * instead of a core **.
9040 (accessing_symbol): Remove, part of state_t.
9041 * src/lalr.c: Adjust.
9042 (set_accessing_symbol): Merge into...
9043 (set_state_table): this.
9044 * src/print_graph.c, src/conflicts.c: Adjust.
9045
9046 2001-11-14 Akim Demaille <akim@epita.fr>
9047
9048 * tests/calc.at, tests/output.at, tests/regression.at,
9049 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
9050 now the tests are run in private dirs, therefore AC_CLEANUP and
9051 family can be simplified to 0-ary.
9052 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
9053 use abs. path to find config.h.
9054 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
9055 stderr, there can be way too much random noise.
9056 Instead pass -Werror to GCC and rely on the exit status.
9057 Reported by Wolfram Wagner.
9058
9059 2001-11-14 Akim Demaille <akim@epita.fr>
9060
9061 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
9062 defined only if yyoverflow is defined, to avoid `warning: unused
9063 variable `yyvs1''.
9064 Reported by The Test Suite.
9065
9066 2001-11-14 Akim Demaille <akim@epita.fr>
9067
9068 * src/print.c: Include reduce.h.
9069 Reported by Hans Aberg.
9070
9071 2001-11-14 Akim Demaille <akim@epita.fr>
9072
9073 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
9074 Revert a previous patch: these are really const.
9075 * src/conflicts.c (conflict_report): Additional useless pair of
9076 braces to pacify GCC's warnings for `if () if () {} else {}'.
9077 * src/lex.c (parse_percent_token): Replace equal_offset with
9078 arg_offset.
9079 arg is const.
9080 Be sure to strdup `arg' when used, since there is no reason for
9081 token_buffer not to change.
9082
9083 2001-11-14 Akim Demaille <akim@epita.fr>
9084
9085 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
9086 definition.
9087 * src/main.c (main): Use them.
9088 Suggested by Hans Aberg.
9089
9090 2001-11-12 Akim Demaille <akim@epita.fr>
9091
9092 * src/system.h (ngettext): Now that we use ngettext, be sure to
9093 provide a default definition when NLS are not used.
9094
9095 2001-11-12 Akim Demaille <akim@epita.fr>
9096
9097 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
9098 Use @kbd to denote user input.
9099 (Language and Grammar): ANSIfy the example.
9100 Adjust its layout for info/notinfo.
9101 (Location Tracking Calc): Output error messages to stderr.
9102 Output locations in a more GNUtically correct way.
9103 Fix a couple of Englishos.
9104 Adjust @group/@end group pairs.
9105
9106 2001-11-12 Akim Demaille <akim@epita.fr>
9107
9108 %expect was not functioning at all.
9109
9110 * src/conflicts.c (expected_conflicts): Set to -1.
9111 (conflict_report): Use ngettext.
9112 (conflicts_print): Check %expect and make its violation an error.
9113 * doc/bison.texinfo (Expect Decl): Adjust.
9114 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
9115 * tests/regression.at (%expect not enough, %expect right)
9116 (%expect too much): New.
9117
9118 2001-11-12 Akim Demaille <akim@epita.fr>
9119
9120 * tests/regression.at (Conflicts): Rename as...
9121 (Unresolved SR Conflicts): this.
9122 (Solved SR Conflicts): New.
9123
9124 2001-11-12 Akim Demaille <akim@epita.fr>
9125
9126 * src/reduce.c (print_results): Rename as...
9127 (reduce_output): This.
9128 Output to OUT, passed as argument, instead of output_obstack.
9129 (dump_grammar): Likewise.
9130 (reduce_free): New.
9131 Also free V1.
9132 (reduce_grammar): No longer call reduce_output, since...
9133 * src/print.c (print_results): do it.
9134 * src/main.c (main): Call reduce_free;
9135
9136 2001-11-12 Akim Demaille <akim@epita.fr>
9137
9138 * src/conflicts.c (print_reductions): Accept OUT as argument.
9139 Output to it, not to output_obstack.
9140 * src/print.c (print_actions): Adjust.
9141
9142 2001-11-12 Akim Demaille <akim@epita.fr>
9143
9144 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
9145 the result instead of using...
9146 (src_total, rrc_total, src_count, rrc_count): Remove.
9147 (any_conflicts): Remove.
9148 (print_conflicts): Split into...
9149 (conflicts_print, conflicts_output): New.
9150 * src/conflicts.h: Adjust.
9151 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
9152 * src/print.c (print_grammar): Issue `\n' between two rules.
9153 * tests/regression.at (Conflicts): New.
9154 Reported by Tom Lane.
9155
9156 2001-11-12 Akim Demaille <akim@epita.fr>
9157
9158 * tests/regression.at (Invalid input): Remove, duplicate with
9159 ``Invalid input: 1''.
9160
9161 2001-11-12 Akim Demaille <akim@epita.fr>
9162
9163 * tests/torture.at (AT_DATA_STACK_TORTURE)
9164 (Exploding the Stack Size with Alloca)
9165 (Exploding the Stack Size with Malloc): New.
9166
9167 2001-11-12 Akim Demaille <akim@epita.fr>
9168
9169 * src/bison.simple (YYSTACK_REALLOC): New.
9170 (yyparse) [!yyoverflow]: Use it and free the old stack.
9171 Reported by Per Allansson.
9172
9173 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
9174
9175 * src/bison.simple: Define type yystype instead of YYSTYPE, and
9176 define CPP macro, which substitute YYSTYPE by yystype.
9177 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
9178 with yyltype/YYLTYPE. This allows inclusion of the generated
9179 header within the parser if the compiler, such as GGC, accepts
9180 multiple equivalent #defines.
9181 From Akim.
9182
9183 2001-11-05 Akim Demaille <akim@epita.fr>
9184
9185 * src/reader.c (symbols_output): New, extracted from...
9186 (packsymbols): here.
9187 (reader): Adjust.
9188
9189 2001-11-05 Akim Demaille <akim@epita.fr>
9190
9191 * src/lex.c (parse_percent_token): s/quotearg/quote/.
9192
9193 2001-11-05 Akim Demaille <akim@epita.fr>
9194
9195 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
9196 pattern.
9197
9198 2001-11-05 Akim Demaille <akim@epita.fr>
9199
9200 * src/options.h (struct option_table_struct): set_flags is void*.
9201 * src/options.c (longopts): Support `--output' and `%output'.
9202 (usage): Adjust.
9203 * src/lex.h (tok_setopt): Remove, replaced with...
9204 (tok_intopt, tok_stropt): these new guys.
9205 * src/lex.c (getopt.h): Not needed.
9206 (token_buffer, unlexed_token_buffer): Not const.
9207 (percent_table): Promote `-' over `_' in directive names.
9208 Active `%name-prefix', `file-prefix', and `output'.
9209 (parse_percent_token): Accept possible arguments to directives.
9210 Promote `-' over `_' in directive names.
9211
9212 2001-11-04 Akim Demaille <akim@epita.fr>
9213
9214 * doc/bison.texinfo (Decl Summary): Split the list into
9215 `directives for grammars' and `directives for bison'.
9216 Sort'em.
9217 Add description of `%name-prefix', `file-prefix', and `output'.
9218 Promote `-' over `_' in directive names.
9219 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
9220 Simplify the description of `--name-prefix'.
9221 Promote `-' over `_' in directive names.
9222 Promote `--output' over `--output-file'.
9223 Fix the description of `--defines'.
9224 * tests/output.at: Exercise %file-prefix and %output.
9225
9226 2001-11-02 Akim Demaille <akim@epita.fr>
9227
9228 * doc/refcard.tex: Update.
9229
9230 2001-11-02 Akim Demaille <akim@epita.fr>
9231
9232 * src/symtab.h (SUNDEF): New.
9233 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
9234 stand for `uninitialized', instead of 0.
9235 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
9236 * src/lex.c (lex): Adjust.
9237
9238 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
9239 Number it 0.
9240 Let yylex return it instead of a plain 0.
9241 Reported by Dick Streefland.
9242
9243 2001-11-02 Akim Demaille <akim@epita.fr>
9244
9245 * tests/regression.at (Mixing %token styles): New test.
9246
9247 2001-11-02 Akim Demaille <akim@epita.fr>
9248
9249 * src/reader.c (parse_thong_decl): Formatting changes.
9250 (token_translations_init): New, extracted from...
9251 (packsymbols): Here.
9252 Adjust.
9253
9254 2001-11-01 Akim Demaille <akim@epita.fr>
9255
9256 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
9257 Check that `9foo.y' produces correct cpp guards.
9258 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
9259 guards.
9260 Reported by Wwp.
9261
9262 2001-11-01 Akim Demaille <akim@epita.fr>
9263
9264 * tests/regression.at (Invalid input: 2): New.
9265 * src/lex.c (unlexed_token_buffer): New.
9266 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
9267 too.
9268 Reported by Wwp.
9269
9270 2001-11-01 Akim Demaille <akim@epita.fr>
9271
9272 * tests/calc.at: Catch up with 1.30.
9273 * configure.in: Bump to 1.49a.
9274 Adjust to newer Autotest.
9275
9276 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
9277
9278 * src/conflicts.c: Move global variables rrc_total and src_total ...
9279 (print_conflicts): here.
9280 * src/output.c (output): Free global variable user_toknums.
9281 * src/lex.c (token_obstack): Become static.
9282
9283 2001-10-18 Akim Demaille <akim@epita.fr>
9284
9285 * tests/atlocal.in (GCC): Add.
9286 * tests/calc.at: s/m4_match/m4_bmatch/.
9287 s/m4_patsubst/m4_bpatsubst/.
9288 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
9289 * configure.in: AC_SUBST(GCC).
9290
9291 2001-10-14 Marc Autret <autret_m@epita.fr>
9292
9293 * src/options.c (create_long_option_table): Fix.
9294
9295 2001-10-10 Akim Demaille <akim@epita.fr>
9296
9297 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
9298
9299 2001-10-04 Akim Demaille <akim@epita.fr>
9300
9301 * src/reader.c (parse_union_decl): Push the caracters in
9302 union_obstack, not attrs_obstack.
9303
9304 2001-10-04 Akim Demaille <akim@epita.fr>
9305
9306 Merge in the branch 1.29.
9307
9308 * src/reader.c (packsymbols): Use a temporary obstack for
9309 `%%tokendef', since output_stack is already used elsewhere.
9310
9311 2001-10-02 Akim Demaille <akim@epita.fr>
9312
9313 Bump 1.29d.
9314
9315 2001-10-02 Akim Demaille <akim@epita.fr>
9316
9317 Version 1.29c.
9318
9319 2001-10-02 Akim Demaille <akim@epita.fr>
9320
9321 * tests/regression.at (Invalid CPP headers): New.
9322 From Alexander Belopolsky.
9323 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
9324
9325 2001-10-02 Akim Demaille <akim@epita.fr>
9326
9327 * tests/regression.at (Invalid input): New.
9328 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
9329 Reported by Shura.
9330
9331 2001-10-02 Akim Demaille <akim@epita.fr>
9332
9333 * tests/calc.at: Now that --debug works, the tests must be adjusted.
9334
9335 2001-10-02 Akim Demaille <akim@epita.fr>
9336
9337 * src/output.c (output_parser): Assert `skeleton'.
9338 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
9339 systems.
9340 From Shura.
9341
9342 2001-10-01 Marc Autret <autret_m@epita.fr>
9343
9344 * src/lex.h: Echo modifications.
9345 * src/lex.c (unlex): Parameter is now token_t.
9346 From Hans Aberg.
9347
9348 2001-10-01 Marc Autret <autret_m@epita.fr>
9349
9350 * src/main.c: Include lex.h.
9351 From Hans Aberg.
9352
9353 2001-09-29 Akim Demaille <akim@epita.fr>
9354
9355 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
9356
9357 2001-09-28 Akim Demaille <akim@epita.fr>
9358
9359 * tests/testsuite.at: Update to newer Autotest.
9360 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
9361
9362 2001-09-27 Akim Demaille <akim@epita.fr>
9363
9364 Position independent wrapper.
9365
9366 * tests/bison: Remove.
9367 * tests/bison.in: New.
9368 * configure.in: Adjust.
9369
9370 2001-09-27 Paul Eggert <eggert@twinsun.com>
9371
9372 Port quotearg fixes from tar 1.13.24.
9373
9374 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
9375 tm to be declared.
9376 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
9377 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
9378
9379 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
9380 * m4/mbrtowc.m4: New file.
9381 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
9382 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
9383
9384 2001-09-27 Akim Demaille <akim@epita.fr>
9385
9386 Bump to 1.29c.
9387
9388 2001-09-27 Akim Demaille <akim@epita.fr>
9389
9390 Version 1.29b.
9391
9392 2001-09-25 Akim Demaille <akim@epita.fr>
9393
9394 * src/system.h: Include `xalloc.h'.
9395 Remove it from the C files.
9396 * src/files.c (output_files): Free the obstacks.
9397 * src/lex.c (init_lex): Rename as...
9398 (lex_init): this.
9399 (lex_free): New.
9400 * src/main.c (main): Use it.
9401
9402 2001-09-24 Marc Autret <autret_m@epita.fr>
9403
9404 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
9405 to output informations in fout (FILE*).
9406 (open_graph, close_graph): Likewise.
9407 (output_graph, output_edge, output_node): Likewise.
9408 * src/vcg.h: Update function prototypes.
9409 * src/print_graph.c (print_graph): Open output graph file.
9410 (print_actions): Adjust.
9411 * src/files.h: Remove extern declaration.
9412 * src/files.c: Remove graph_obstack declaration.
9413 (open_files): Remove graph_obstack initialization.
9414 (output_files): Remove graph_obstack saving.
9415
9416 2001-09-24 Marc Autret <autret_m@epita.fr>
9417
9418 * src/files.c (compute_output_file_names): Fix.
9419
9420 2001-09-24 Marc Autret <autret_m@epita.fr>,
9421 Akim Demaille <akim@epita.fr>
9422
9423 * src/reader.c (reader): Remove call to free_symtab ().
9424 * src/main.c (main): Call it here.
9425 Include symtab.h.
9426 * src/conflicts.c (initialize_conflicts): Rename as...
9427 (solve_conflicts): this.
9428 * src/print.c (print_core, print_actions, print_state)
9429 (print_grammar): Dump to a file instead a `output_obstack'.
9430 (print_results): Dump `output_obstack', and then proceed with the
9431 FILE *.
9432 * src/files.c (compute_output_file_names, close_files): New.
9433 (output_files): Adjust.
9434 * src/main.c (main): Adjust.
9435
9436 2001-09-23 Marc Autret <autret_m@epita.fr>
9437
9438 * src/files.c (compute_header_macro): Computes header macro name
9439 from spec_defines_file when given.
9440
9441 2001-09-23 Marc Autret <autret_m@epita.fr>
9442
9443 * src/files.c (output_files): Add default extensions.
9444
9445 2001-09-22 Akim Demaille <akim@epita.fr>
9446
9447 * src/conflicts.c (finalize_conflicts): Rename as...
9448 (free_conflicts): this.
9449
9450 2001-09-22 Akim Demaille <akim@epita.fr>
9451
9452 * src/gram.c (gram_free): Rename back as...
9453 (dummy): this.
9454 (output_token_translations): Free `token_translations'.
9455 * src/symtab.c (free_symtab): Free the tag field.
9456
9457 2001-09-22 Akim Demaille <akim@epita.fr>
9458
9459 Remove `translations' as it is always set to true.
9460
9461 * src/gram.h: Adjust.
9462 * src/reader.c (packsymbols, parse_token_decl): Adjust
9463 * src/print.c (print_grammar): Adjust.
9464 * src/output.c (output_token_translations): Adjust.
9465 * src/lex.c (lex): Adjust.
9466 * src/gram.c: Be sure the set pointers to NULL.
9467 (dummy): Rename as...
9468 (gram_free): this.
9469
9470 2001-09-22 Akim Demaille <akim@epita.fr>
9471
9472 * configure.in: Invoke AM_LIB_DMALLOC.
9473 * src/system.h: Use dmalloc.
9474 * src/LR0.c: Be sure to have pointers initialized to NULL.
9475 (allocate_itemsets): Allocate kernel_items only if needed.
9476
9477 2001-09-22 Akim Demaille <akim@epita.fr>
9478
9479 * configure.in: Bump to 1.29b.
9480 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
9481 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
9482 need xmalloc.c in calc.y.
9483 From Pascal Bart.
9484
9485 2001-09-21 Akim Demaille <akim@epita.fr>
9486
9487 Version 1.29a.
9488 * Makefile.maint, config/config.guess, config/config.sub,
9489 * config/missing: Update from masters.
9490 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
9491 upon package.m4.
9492 * configure.in (ALL_LINGUAS): Add `tr'.
9493
9494 2001-09-21 Akim Demaille <akim@epita.fr>
9495
9496 * tests/Makefile.am (package.m4): Move to...
9497 ($(srcdir)/$(TESTSUITE)): here.
9498
9499 2001-09-20 Akim Demaille <akim@epita.fr>
9500
9501 * src/complain.c: No longer try to be standalone: use system.h.
9502 Don't assume __STDC__ is defined to 1. Just test if it is defined.
9503 * src/complain.h: Likewise.
9504 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
9505 Remove the unused variable `n'.
9506 From Albert Chin-A-Young.
9507
9508 2001-09-18 Marc Autret <autret_m@epita.fr>
9509
9510 * doc/bison.1: Update.
9511 * doc/bison.texinfo (Bison Options): Update --defines and --graph
9512 descriptions.
9513 (Option Cross Key): Update.
9514 Add --graph.
9515
9516 2001-09-18 Marc Autret <autret_m@epita.fr>
9517
9518 * tests/regression.at: New test (comment in %union).
9519
9520 2001-09-18 Marc Autret <autret_m@epita.fr>
9521
9522 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
9523 do that.
9524 Reported by Keith Browne.
9525
9526 2001-09-18 Marc Autret <autret_m@epita.fr>
9527
9528 * tests/output.at: Add tests for --defines and --graph.
9529
9530 2001-09-18 Marc Autret <autret_m@epita.fr>
9531
9532 * tests/output.at: Removes tests of %{header,src}_extension features.
9533
9534 2001-09-18 Akim Demaille <akim@epita.fr>
9535
9536 * tests/Makefile.am (package.m4): New.
9537 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
9538 (_AT_CHECK_CALC_ERROR): Likewise.
9539 Factor the `, ' part of verbose error messages.
9540
9541 2001-09-18 Marc Autret <autret_m@epita.fr>
9542
9543 * src/getargs.c (longopts): Declare --defines and --graph as options
9544 with optional arguments.
9545 * src/files.h: Add extern declarations.
9546 * src/files.c (spec_graph_file, spec_defines_file): New.
9547 (output_files): Update.
9548 Remove CPP-outed code.
9549
9550 2001-09-18 Marc Autret <autret_m@epita.fr>
9551
9552 Turn off %{source,header}_extension feature.
9553
9554 * src/files.c (compute_exts_from_gf): Update.
9555 (compute_exts_from_src): Update.
9556 (output_files): CPP-out useless code.
9557 * src/files.h: Remove {header,source}_extension extern declarations.
9558 * src/reader.c (parse_dquoted_param): CPP-out.
9559 (parse_header_extension_decl): Remove.
9560 (parse_source_extension_decl): Remove.
9561 (read_declarations): Remove cases tok_{hdrext,srcext}.
9562 * src/lex.c (percent_table): Remove {header,source}_extension entries.
9563 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
9564
9565 2001-09-10 Akim Demaille <akim@epita.fr>
9566
9567 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
9568 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
9569 (AT_CHECK_OUTPUT): this.
9570 Merely check ls' exit status, its output is useless.
9571
9572 2001-09-10 Akim Demaille <akim@epita.fr>
9573
9574 * tests/calc.at: Use m4_match.
9575 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
9576
9577 2001-09-10 Marc Autret <autret_m@epita.fr>,
9578 Akim Demaille <akim@epita.fr>
9579
9580 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
9581 enum color_e.
9582 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
9583 to `normal'.
9584 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
9585 * src/lex.h: Adjust prototype.
9586 (token_t): Add `tok_undef'.
9587 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
9588 (parse_percent_token): Now returns token_t.
9589 Add default statement in switch.
9590 (lex): Separate `c' as an input variable, from the token_t result
9591 part.
9592 (unlexed): Is a token_t.
9593
9594 2001-09-10 Akim Demaille <akim@epita.fr>
9595
9596 * configure.in: Bump to 1.29a.
9597
9598 2001-09-07 Akim Demaille <akim@epita.fr>
9599
9600 Version 1.29.
9601
9602 2001-08-30 Akim Demaille <akim@epita.fr>
9603
9604 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
9605 * m4/atconfig.m4: Remove.
9606 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
9607 * tests/bison: New.
9608 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
9609 m4_if, m4_patsubst, and m4_regexp.
9610 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
9611 `input' file instead of echo.
9612
9613 2001-08-29 Akim Demaille <akim@epita.fr>
9614
9615 Bump to 1.28e.
9616
9617 2001-08-29 Akim Demaille <akim@epita.fr>
9618
9619 Version 1.28d.
9620
9621 2001-08-29 Paul Eggert <eggert@twinsun.com>
9622
9623 * src/bison.simple (yyparse): Don't take the address of an
9624 item before the start of an array, as that doesn't conform to
9625 the C Standard.
9626
9627 2001-08-29 Robert Anisko <anisko_r@epita.fr>
9628
9629 * doc/bison.texinfo (Location Tracking Calc): New node.
9630
9631 2001-08-29 Paul Eggert <eggert@twinsun.com>
9632
9633 * src/output.c (output): Do not define const, as this now
9634 causes more problems than it cures.
9635
9636 2001-08-29 Akim Demaille <akim@epita.fr>
9637
9638 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
9639 the nodes.
9640 Be sure to tag the `detailmenu'.
9641
9642 2001-08-29 Akim Demaille <akim@epita.fr>
9643
9644 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
9645 download in a tmp dir.
9646
9647 2001-08-28 Marc Autret <autret_m@epita.fr>
9648
9649 * config/depcomp: New file.
9650
9651 2001-08-28 Marc Autret <autret_m@epita.fr>
9652
9653 * doc/bison.1 (mandoc): Adjust.
9654 From Juan Manuel Guerrero.
9655
9656 2001-08-28 Marc Autret <autret_m@epita.fr>
9657
9658 * src/print_graph.c (print_state): Fix.
9659
9660 2001-08-27 Marc Autret <autret_m@epita.fr>
9661
9662 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
9663 char * members.
9664 Echo modifications to the functions prototypes.
9665 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
9666
9667 2001-08-27 Marc Autret <autret_m@epita.fr>
9668
9669 * src/vcg.c: Include `xalloc.h'.
9670 (add_colorentry): New.
9671 (add_classname): New.
9672 (add_infoname): New.
9673 * src/vcg.h: Add new prototypes.
9674
9675 2001-08-27 Akim Demaille <akim@epita.fr>
9676
9677 * Makefile.maint: Sync. again with CVS Autoconf.
9678
9679 2001-08-27 Akim Demaille <akim@epita.fr>
9680
9681 * Makefile.maint: Formatting changes.
9682 (po-update, cvs-update, update): New targets.
9683 (AMTAR): Remove.
9684
9685 2001-08-27 Akim Demaille <akim@epita.fr>
9686
9687 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9688 * Makefile.maint: Sync. with CVS Autoconf.
9689
9690 2001-08-27 Marc Autret <autret_m@epita.fr>
9691
9692 * src/vcg.h (struct infoname_s): New.
9693 (struct colorentry_s): New.
9694 (graph_s): New fields {vertical,horizontal}_order in structure.
9695 Add `infoname' field.
9696 Add `colorentry' field;
9697 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
9698 (G_HORIZONTAL_ORDER): New.
9699 (G_INFONAME): New.
9700 (G_COLORENTRY): New.
9701 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
9702 Add output of `infoname'.
9703 Add output of `colorentry'.
9704
9705 2001-08-27 Marc Autret <autret_m@epita.fr>
9706
9707 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
9708 This one shadowed a global parameter.
9709
9710 2001-08-24 Marc Autret <autret_m@epita.fr>
9711
9712 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
9713 instead of `unsigned'.
9714 (print_state): Do not call obstack_object_size () in obstack_grow ()
9715 to avoid macro variables shadowing.
9716
9717 2001-08-23 Marc Autret <autret_m@epita.fr>
9718
9719 * src/lex.c (percent_table): Typo: s/naem/name/.
9720 Add graph option.
9721 Normalize new options declarations.
9722
9723 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
9724
9725 * tests/suite.at: Exercise %header_extension and %source_extension.
9726
9727 2001-08-16 Marc Autret <autret_m@epita.fr>
9728
9729 * src/reader.c (parse_dquoted_param): New.
9730 (parse_header_extension_decl): Use it.
9731 (parse_source_extension_decl): Likewise.
9732
9733 2001-08-16 Marc Autret <autret_m@epita.fr>
9734
9735 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
9736 (get_xxxx_str): Use assert () instead of complain ().
9737 Remove return invokations in default cases.
9738 (get_decision_str): Modify default behaviour. Remove second argument.
9739 Echo modifications on calls.
9740 (output_graph): Fix.
9741
9742 2001-08-16 Marc Autret <autret_m@epita.fr>
9743
9744 * src/getargs.c (usage): Update with ``-g, --graph''.
9745
9746 2001-08-16 Marc Autret <autret_m@epita.fr>
9747
9748 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
9749 (Option Cross Key): Likewise.
9750 * doc/bison.1: Update.
9751
9752 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
9753
9754 * src/output.c (output_master_parser): Don't finish action_obstack.
9755 (output_parser): Don't care about the muscle action, here.
9756 (prepare): Copy the action_obstack in the action muscle.
9757 (output): Free action_obstack.
9758
9759 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9760
9761 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
9762 will contain `%union' declaration.
9763 (parse_union_decl): Delete #line directive output.
9764 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
9765 informations about %union.
9766 (parse_union_decl): Copy the union_obstack in the muscle stype.
9767 * src/bison.simple: Add new #line directive.
9768 Add typdef %%stype YYSTYPE.
9769
9770 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
9771
9772 * src/bison.simple: Add new `#line' directive.
9773
9774 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
9775
9776 * src/bison.simple: New `#line' directive.
9777 * src/output.c (output_parser): Support new dynamic muscle input_line.
9778
9779 2001-09-22 Marc Autret <autret_m@epita.fr>
9780
9781 * src/output.c (output_master_parser): New.
9782 (output_parser): Be more re-entrant.
9783
9784 2001-09-21 Marc Autret <autret_m@epita.fr>
9785
9786 * src/reader.c (copy_definition, parse_union_decl): Update and use
9787 `linef' muscle.
9788 (copy_action): Likewise.
9789 Use obstack_1grow ().
9790 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
9791
9792 2001-09-21 Marc Autret <autret_m@epita.fr>
9793
9794 * src/options.c (option_table): Adjust.
9795 * src/lex.c (parse_percent_token): Fix.
9796
9797 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9798
9799 * src/options.c (symtab.h): Include it, need by lex.h.
9800
9801 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
9802
9803 * src/lex.c (parse_percent_token): Change type of variable `tx', which
9804 is now an option_table_struct*.
9805 (option_strcmp): New function option_strcmp.
9806 (parse_percent_token): Call option_strcmp.
9807 * src/getargs.c (xalloc.h, options.h): Include it.
9808 (getargs): Call create_long_option_table.
9809 (getargs): Free longopts at the end of the function.
9810 (shortopts): Move in options.c.
9811 * src/options.c (create_long_option_table): New function. Convert
9812 information from option_table to option structure.
9813 * src/reader.c (options.h): Include it.
9814
9815 * src/Makefile.am: Adjust.
9816 * src/options.c (option_table): Create from longopts and percent_table.
9817 * src/getargs.c (longopts): Delete.
9818 * src/lex.c (struct percent_table_struct): Delete.
9819 (percent_table): Delete.
9820 (options.h): Include it.
9821 * src/options.c: Create.
9822 * src/options.h: Create.
9823 Declare enum opt_access_e.
9824 Define struct option_table_struct.
9825
9826 2001-09-20 Marc Autret <autret_m@epita.fr>
9827
9828 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
9829 sections of Bison.
9830
9831 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
9832
9833 * src/bison.simple: s/%%filename/%%skeleton.
9834 * src/muscle_tab.c (getargs.h): Include it.
9835 (muscle_init): Insert new muscle skeleton.
9836
9837 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
9838
9839 * src/output.c (output_parser): Delete unused variable actions_dumped.
9840
9841 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
9842
9843 * src/output.c (output): Delete call to reader_output_yylsp.
9844 * src/reader.c (reader): Likewise.
9845 * src/reader.h: Delete declaration of reader_output_yylsp.
9846
9847 2001-09-02 Marc Autret <autret_m@epita.fr>
9848
9849 * src/reader.c: Include muscle_tab.h.
9850 (parse_union_decl): Update.
9851 (parse_macro_decl): Rename parse_muscle_decl.
9852 Update to use renamed functions and variable.
9853 (read_declarations, copy_action, read_additionnal_code, : Updated
9854 with correct variables and functions names.
9855 (packsymbols, reader): Likewise.
9856
9857 * src/reader.h (muscle_obstack): Extern declaration update.
9858
9859 * src/output.c: Include muscle_tab.h
9860 In all functions using macro_insert, change by using muscle_insert ().
9861 (macro_obstack): Rename muscle_obstack.
9862 Echo modifications in the whole file.
9863 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
9864 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
9865 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
9866
9867 * src/muscle_tab.h: Update double inclusion macros.
9868 (macro_entry_s): Rename muscle_entry_s.
9869 Update prototypes.
9870
9871 * src/muscle_tab.c: Include muscle_tab.h.
9872 Rename macro_tabble to muscle_table.
9873 (mhash1, mhash2, mcmp): Use muscle_entry.
9874 (macro_init): Rename muscle_init. Update.
9875 (macro_insert): Rename muscle_insert. Update.
9876 (macro_find): Rename muscle_find. Update.
9877
9878 * src/main.c: Include muscle_tab.h.
9879 (main): Call muscle_init ().
9880 * src/Makefile.am (bison_SOURCES): Echo modifications.
9881
9882 2001-09-02 Marc Autret <autret_m@epita.fr>
9883
9884 Now the files macro_tab.[ch] are named muscle_tab.[ch].
9885
9886 * src/muscle_tab.c, src/muscle_tab.h: Add files.
9887
9888 2001-09-02 Marc Autret <autret_m@epita.fr>
9889
9890 * src/macrotab.c, src/macrotab.h: Remove.
9891
9892 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
9893
9894 * src/reader.c (copy_guard): Use muscle to specify the `#line'
9895 filename.
9896
9897 2001-09-01 Marc Autret <autret_m@epita.fr>
9898
9899 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
9900 to an explicit value to activate the feature. We do it here.
9901
9902 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9903
9904 * src/output.c (prepare): Delete the `filename' muscule insertion.
9905 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
9906 (parse_union_decl): Likewise.
9907 * src/macrotab.c (macro_init): Initialize filename by infile.
9908
9909 2001-08-31 Marc Autret <autret_m@epita.fr>
9910
9911 * src/bison.simple (YYLSP_NEEDED): New definition.
9912 * src/output.c (prepare): Add macro insertion of `locations_flag'
9913
9914 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9915
9916 * src/output.c (prepare): Delete insertion of previous muscles,
9917 and insert the `prefix' muscles.
9918 * src/macrotab.c (macro_init): Likewise.
9919 (macro_init): Initialization prefix directive by `yy'.
9920 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
9921 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9922 yylval, yydebug, yyerror, yynerrs and yyparse.
9923 New directive `#define' to substitute yydebug, ... with option
9924 name_prefix.
9925
9926 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9927
9928 * src/main.c (main): Standardize.
9929 * src/output.c (output_table_data, output_parser): Likewise.
9930 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9931
9932 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9933
9934 * src/reader.c (read_additionnal_code): Rename %%user_code to
9935 %%epilogue.
9936 * src/output.c (output): Rename %%declarations to %%prologue.
9937 * src/bison.simple: Echo modifications.
9938
9939 2001-08-31 Marc Autret <autret_m@epita.fr>
9940
9941 * src/reader.c (readgram): CleanUp.
9942 (output_token_defines): Likewise.
9943 (packsymbols): Likewise.
9944 (reader): Likewise.
9945 * src/output.c (output): CPP-out useless code.
9946
9947 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9948
9949 * src/reader.c (reader): Delete obsolete call to function
9950 output_trailers and output_headers.
9951 * src/output.h: Remove obsolete functions prototypes of output_headers
9952 and output_trailers.
9953
9954 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
9955
9956 * src/main.c: Include macrotab.h.
9957 * src/macrotab.h (macro_entry_s): Constify fields.
9958 Adjust functions prototypes.
9959 * src/macrotab.c (macro_insert): Constify key and value.
9960 (macro_find): Constify key.
9961 (macro_insert): Include 'xalloc.h'
9962 (macro_insert): Use XMALLOC.
9963 (macro_find): Constify return value.
9964 * src/output.c (output_table_data): Rename table to table_data.
9965 (output_parser): Constify macro_key, macro_value.
9966
9967 2001-08-30 Marc Autret <autret_m@epita.fr>
9968
9969 * src/reader.c (parse_skel_decl): New.
9970 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
9971 * src/lex.h (token_t): New token `tok_skel'.
9972 * src/lex.c (percent_table): Add skeleton option entry.
9973 Standardize.
9974
9975 2001-08-29 Marc Autret <autret_m@epita.fr>
9976
9977 * src/bison.simple: Add %%user_code directive at the end.
9978 * src/reader.c (read_additionnal_code): New.
9979 (reader): Use it.
9980 * src/output.c (output_program): Remove.
9981 (output): Update.
9982
9983 2001-08-28 Marc Autret <autret_m@epita.fr>
9984
9985 * src/output.c (output_actions): Clean up.
9986 (output_gram): CPP-out useless code.
9987 * src/reader.c (reader): Clean up, CPP-out useless code.
9988
9989 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
9990
9991 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
9992 directive.
9993 * src/bison.simple: Add `%%definitions'.
9994
9995 2001-08-28 Marc Autret <autret_m@epita.fr>
9996
9997 * config/depcomp: New file.
9998
9999 2001-08-27 Paul Eggert <eggert@twinsun.com>
10000
10001 * src/bison.simple (yyparse): Don't take the address of an
10002 item before the start of an array, as that doesn't conform to
10003 the C Standard.
10004
10005 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
10006
10007 * src/output.c (output): Remove the initialization of the macro
10008 obstack. It was done too late here.
10009
10010 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
10011 completely wrong.
10012 (reader): Initialize the macro obstack here, since we need it to grow
10013 '%define' directives.
10014
10015 * src/reader.h: Declare the macro obstack as extern.
10016
10017 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
10018
10019 * src/output.c (output_parser): Fix. Store single '%' characters in
10020 the output obstack instead of throwing them away.
10021
10022 2001-08-27 Akim Demaille <akim@epita.fr>
10023
10024 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
10025
10026 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10027
10028 * lib/Makefile.am: Adjust.
10029
10030 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10031
10032 * src/bison.simple: Update and add '%%' directives.
10033
10034 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10035
10036 * src/reader.c (reader): Remove calls to 'output_headers' and
10037 'output_trailers'. Remove some C output.
10038 (readgram): Disable a piece of code that was writing a default
10039 definition for 'YYSTYPE'.
10040 (reader_output_yylsp): Remove.
10041 (packsymbols): Output token defintions to a macro.
10042 (copy_definition): Disable C output.
10043
10044 * src/reader.c (parse_macro_decl): New function used to parse macro
10045 declarations.
10046 (copy_string2): Put the body of copy_string into this new function.
10047 Add a parameter to let the caller choose whether he wants to copy the
10048 string delimiters or not.
10049 (copy_string): Be a simple call to copy_string2 with the last argument
10050 bound to true.
10051 (read_declarations): Add case for macro definition.
10052 (copy_identifier): New.
10053 (parse_macro_decl): Read macro identifiers using copy_identifier
10054 rather than lex.
10055
10056 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10057
10058 * src/output.c (prepare): Add prefixed names.
10059 (output_parser): Output semantic actions.
10060 (output_parser): Fix bug on '%%line' directives.
10061
10062 * src/output.c (output_headers): Remove. The C code printed by this
10063 function should now be in the skeletons.
10064 (output_trailers): Remove.
10065 (output): Disable call to 'reader_output_yylsp'.
10066 (output_rule_data): Do not output tables to the table obstack.
10067
10068 * src/output.c: Remove some C dedicated output.
10069 Improve the use of macro and output obstacks.
10070 (output_defines): Remove.
10071
10072 * src/output.c (output_token_translations): Associate 'translate'
10073 table with a macro. No output to the table obstack.
10074 (output_gram): Same for 'rhs' and 'prhs'.
10075 (output_stos): Same for 'stos'.
10076 (output_rule_data): Same for 'r1' and 'r2'.
10077 (token_actions): Same for 'defact'.
10078 (goto_actions): Same for 'defgoto'.
10079 (output_base): Same for 'pact' and 'pgoto'.
10080 (output_table): Same for 'table'.
10081 (output_check): Same for 'check'.
10082
10083 * src/output.c (output_table_data): New function.
10084 (output_short_table): Remove.
10085 (output_short_or_char_table): Remove.
10086
10087 * src/output.c (output_parser): Replace most of the skeleton copy code
10088 with something new. Skeletons are now processed character by character
10089 rather than line by line, and Bison looks for '%%' macros. This is the
10090 first step in making Bison's output process (a lot) more flexible.
10091 (output_parser): Use the macro table.
10092
10093 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10094
10095 * src/main.c (main): Initialize the macro table.
10096
10097 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10098
10099 * src/lex.c (percent_table): Add tok_define.
10100 * src/lex.h: Add tok_define.
10101
10102 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10103
10104 * src/macrotab.c: New file.
10105 * src/macrotab.h: New file.
10106 * src/Makefile.am: Update.
10107
10108 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
10109
10110 * lib/hash.c: New file.
10111 * lib/hash.h: New file.
10112 * lib/Makefile.am: Update.
10113
10114 2001-08-15 Akim Demaille <akim@epita.fr>
10115
10116 Version 1.28c.
10117
10118 2001-08-15 Marc Autret <autret_m@epita.fr>
10119
10120 * src/reader.c (readgram): Indent output macro YYSTYPE.
10121 (packsymbols): Likewise.
10122 (output_token_defines): Likewise.
10123 * src/files.c: Standardize.
10124 (compute_header_macro): New.
10125 (defines_obstack_save): New. Use compute_header_macro.
10126 (output_files): Update. Use defines_obstack_save.
10127
10128 2001-08-15 Akim Demaille <akim@epita.fr>
10129
10130 * doc/bison.texinfo (Table of Symbols): Document
10131 YYSTACK_USE_ALLOCA.
10132
10133 2001-08-15 Akim Demaille <akim@epita.fr>
10134
10135 * missing: Update from CVS Automake.
10136 * config/config.guess, config/config.sub, config/texinfo.tex:
10137 Update from gnu.org.
10138
10139 2001-08-15 Akim Demaille <akim@epita.fr>
10140
10141 * Makefile.maint: Sync with CVS Autoconf.
10142
10143 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
10144
10145 * doc/bison.texinfo: Include GNU Free Documentation License from
10146 `fdl.texi'.
10147 * doc/fdl.texi: Add to package.
10148
10149 2001-08-14 Marc Autret <autret_m@epita.fr>
10150
10151 Turn on %{source,header}_extension features.
10152
10153 * src/lex.c (percent_table): Un-CPP out header_extension and
10154 source_extension.
10155 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
10156 (compute_exts_from_src): Remove conditions. It restores priorities
10157 between options.
10158
10159 2001-08-14 Marc Autret <autret_m@epita.fr>
10160
10161 * src/files.c (compute_base_names): Add extensions computing when
10162 `--file-prefix' used.
10163 Standardize function calls.
10164
10165 2001-08-13 Marc Autret <autret_m@epita.fr>
10166
10167 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
10168 defining it (defined but null disables alloca).
10169
10170 2001-08-13 Marc Autret <autret_m@epita.fr>
10171
10172 * src/bison.simple (_yy_memcpy): CPP reformat.
10173
10174 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
10175
10176 * tests/atconfig.in (CPPFLAGS): Fix.
10177
10178 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
10179
10180 * doc/bison.texinfo: Include GNU General Public License from
10181 `gpl.texi'.
10182 * doc/gpl.texi: Add to package.
10183
10184 2001-08-10 Marc Autret <autret_m@epita.fr>
10185
10186 * src/print_graph.h: Fix.
10187 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
10188
10189 2001-08-10 Akim Demaille <akim@epita.fr>
10190
10191 * src/system.h: Provide default declarations for stpcpy, strndup,
10192 and strnlen.
10193
10194 2001-08-10 Robert Anisko <anisko_r@epita.fr>
10195
10196 * doc/bison.texinfo (Locations): Update @$ stuff.
10197
10198 2001-08-09 Robert Anisko <anisko_r@epita.fr>
10199
10200 * src/bison.simple (YYLLOC_DEFAULT): Update.
10201 (yyparse): Adjust.
10202
10203 2001-08-08 Marc Autret <autret_m@epita.fr>
10204
10205 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
10206 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
10207 Reported by Fabrice Bauzac.
10208
10209 2001-08-08 Marc Autret <autret_m@epita.fr>
10210
10211 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
10212 * src/vcg.c (output_node): Fix.
10213 * src/vcg.h: Cleanup.
10214 * src/print_graph.c: Add comments.
10215 (node_output_size): New global variable. Simplify the formatting of
10216 the VCG graph output.
10217 (print_actions): Unused code is now used. It notifies the final state
10218 and no action states in the VCG graph. It also give the reduce actions.
10219 The `shift and goto' edges are red and the `go to state' edges are
10220 blue.
10221 Get the current node name and node_obstack by argument.
10222 (node_obstack): New variable.
10223 (print_state): Manage node_obstack.
10224 (print_core): Use node_obstack given by argument.
10225 A node is not only computed here but in print_actions also.
10226 (print_graph): CPP out useless code instead of commenting it.
10227
10228 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
10229
10230 * tests/atconfig.in (CPPFLAGS): Fix.
10231
10232 2001-08-07 Akim Demaille <akim@epita.fr>
10233
10234 * src/print_graph.c (quote): New.
10235 (print_core): Use it.
10236
10237 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
10238
10239 * src/vcg.c (complain.h): Include it.
10240 Unepitaize `return' invocations.
10241 [NDEBUG] (main): Remove.
10242 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
10243 * src/files.c (open_files): Initialize graph_obstack.
10244 * src/print_graph.c (print_actions): CPP out useless code.
10245 (print_core): Don't output the last `\n' in labels.
10246 Use `quote'.
10247 * src/files.c (output_files): Output the VCG file.
10248 * src/main.c (main): Invoke print_graph ();
10249
10250 2001-08-06 Marc Autret <autret_m@epita.fr>
10251
10252 Automaton VCG graph output.
10253 Using option ``-g'' or long option ``--graph'', you can generate
10254 a gram_filename.vcg file containing a VCG description of the LALR (1)
10255 automaton of your grammar.
10256
10257 * src/main.c: Call to print_graph() function.
10258 * src/getargs.h: Update.
10259 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
10260 (graph_flag): New flag.
10261 (longopts): Update.
10262 (getargs): Add case `g'.
10263 * src/files.c (graph_obstack): New obstack struct.
10264 (open_files): Initialize new obstack.
10265 (output_files): Saves graph_obstack if required.
10266 * src/files.h (graph_obstack): New extern declaration.
10267 * src/Makefile.am: Add new source files.
10268
10269 2001-08-06 Marc Autret <autret_m@epita.fr>
10270
10271 * src/print_graph.c, src/print_graph.h (graph): New.
10272 * src/vcg.h: New file.
10273 * src/vcg.c: New file, VCG graph handling.
10274
10275 2001-08-06 Marc Autret <autret_m@epita.fr>
10276
10277 Add of %source_extension and %header_extension which specify
10278 the source or/and the header output file extension.
10279
10280 * src/files.c (compute_base_names): Remove initialisation of
10281 src_extension and header_extension.
10282 (compute_exts_from_gf): Update.
10283 (compute_exts_from_src): Update.
10284 (output_files): Update.
10285 * src/reader.c (parse_header_extension_decl): New.
10286 (parse_source_extension_decl): New.
10287 (read_declarations): New case statements for the new tokens.
10288 * src/lex.c (percent_table): Add entries for %source_extension
10289 and %header_extension.
10290 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
10291
10292 2001-08-06 Marc Autret <autret_m@epita.fr>
10293
10294 * configure.in: Bump to 1.28c.
10295 * doc/bison.texinfo: Texinfo thingies.
10296
10297 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
10298
10299 * tests/atconfig.in (CPPFLAGS): Add.
10300 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
10301
10302 2001-08-03 Akim Demaille <akim@epita.fr>
10303
10304 Version 1.28b.
10305
10306 2001-08-03 Akim Demaille <akim@epita.fr>
10307
10308 * tests/Makefile.am (check-local): Ship testsuite.
10309 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
10310 Include `string.h'.
10311
10312 2001-08-03 Akim Demaille <akim@epita.fr>
10313
10314 * configure.in: Try using -Wformat when compiling.
10315
10316 2001-08-03 Akim Demaille <akim@epita.fr>
10317
10318 * configure.in: Bump to 1.28b.
10319
10320 2001-08-03 Akim Demaille <akim@epita.fr>
10321
10322 * src/complain.c: Adjust strerror_r portability issues.
10323
10324 2001-08-03 Akim Demaille <akim@epita.fr>
10325
10326 Version 1.28a.
10327
10328 2001-08-03 Akim Demaille <akim@epita.fr>
10329
10330 * src/getargs.c, src/getarg.h (skeleton)): Constify.
10331 * src/lex.c (literalchar): Avoid name clashes on `buf'.
10332 * src/getargs.c: Include complain.h.
10333 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
10334 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
10335
10336 2001-08-03 Akim Demaille <akim@epita.fr>
10337
10338 * src/reader.c (readgram): Display hidden chars in error messages.
10339
10340 2001-08-03 Akim Demaille <akim@epita.fr>
10341
10342 Update to gettext 0.10.39.
10343
10344 2001-08-03 Akim Demaille <akim@epita.fr>
10345
10346 * lib/strspn.c: New.
10347
10348 2001-08-01 Marc Autret <autret_m@epita.fr>
10349
10350 * doc/bison.texinfo: Update.
10351 * doc/bison.1 (mandoc): Update.
10352 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
10353 * src/files.c: Support output files extensions computing.
10354 (src_extension): New static variable.
10355 (header_extension): New static variable.
10356 (tr): New function.
10357 (get_extension_index): New function, gets the index of an extension
10358 filename in a string.
10359 (compute_exts_from_gf): New function, computes extensions from the
10360 grammar file extension.
10361 (compute_exts_from_src): New functions, computes extensions from the
10362 C source file extension, file given by ``-o'' option.
10363 (compute_base_names): Update.
10364 (output_files): Update.
10365
10366 2001-08-01 Robert Anisko <anisko_r@epita.fr>
10367
10368 * doc/bison.texi: Document @$.
10369 (Locations): New section.
10370
10371 2001-07-18 Akim Demaille <akim@epita.fr>
10372
10373 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
10374 * config/prev-version.txt, config/move-if-change: New.
10375 * Makefile.am: Adjust.
10376
10377 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
10378
10379 * src/bison.simple (yyparse): Suppress warning `comparaison
10380 between signed and unsigned'.
10381
10382 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
10383
10384 * src/getargs.h (raw_flag): Remove.
10385 * src/getargs.c: Die on `-r'/`--raw'.
10386 * src/lex.c (parse_percent_token): Die on `%raw'.
10387 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
10388 * tests/calc.at: Suppress test with option `--raw'.
10389
10390 2001-07-14 Akim Demaille <akim@epita.fr>
10391
10392 * config/: New.
10393 * configure.in: Require Autoconf 2.50.
10394 Update to gettext 0.10.38.
10395
10396 2001-03-16 Akim Demaille <akim@epita.fr>
10397
10398 * doc/bison.texinfo: ANSIfy the examples.
10399
10400 2001-03-16 Akim Demaille <akim@epita.fr>
10401
10402 * getargs.c (skeleton): New variable.
10403 (longopts): --skeleton is a new option.
10404 (shortopts, getargs): -S is a new option.
10405 * getargs.h: Declare skeleton.
10406 * output.c (output_parser): Use it.
10407
10408 2001-03-16 Akim Demaille <akim@epita.fr>
10409
10410 * m4/strerror_r.m4: New.
10411 * m4/error.m4: Run AC_FUNC_STRERROR_R.
10412 * lib/error.h, lib/error.c: Update.
10413
10414 2001-03-16 Akim Demaille <akim@epita.fr>
10415
10416 * src/getargs.c (longopts): Clean up.
10417
10418 2001-02-21 Akim Demaille <akim@epita.fr>
10419
10420 * src/reader.c (gensym): `gensym_count' is your own.
10421 Use a static buf to create the symbol name, as token_buffer is no
10422 longer a buffer.
10423
10424 2001-02-08 Akim Demaille <akim@epita.fr>
10425
10426 * src/conflicts.c (conflict_report): Be sure not to append to res
10427 between two calls, which could happen if both first sprintf were
10428 skipped, but not the first cp += strlen.
10429
10430 2001-02-08 Akim Demaille <akim@epita.fr>
10431
10432 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
10433 New, from fileutils 4.0.37.
10434 * configure.in: Require Autoconf 2.49c. I took some time before
10435 making this decision. This is the only way out for portability
10436 issues in Bison, it would mean way too much duplicate effort to
10437 import in Bison features implemented in 2.49c since 2.13.
10438 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
10439
10440 2001-02-02 Akim Demaille <akim@epita.fr>
10441
10442 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
10443 * lib/xalloc.h, lib/xmalloc.c: Update.
10444
10445 2001-01-19 Akim Demaille <akim@epita.fr>
10446
10447 Get rid of the ad hoc handling of token_buffer in the scanner: use
10448 the obstacks.
10449
10450 * src/lex.c (token_obstack): New.
10451 (init_lex): Initialize it. No longer call...
10452 (grow_token_buffer): this. Remove it.
10453 Adjust all the places which used it to use the obstack.
10454
10455 2001-01-19 Akim Demaille <akim@epita.fr>
10456
10457 * src/lex.h: Rename all the tokens:
10458 s/\bENDFILE\b/tok_eof/g;
10459 s/\bIDENTIFIER\b/tok_identifier/g;
10460 etc.
10461 Let them be enums, not #define, to ease debugging.
10462 Adjust all the code.
10463
10464 2001-01-18 Akim Demaille <akim@epita.fr>
10465
10466 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
10467 * src/lex.c (maxtoken, grow_token_buffer): Static.
10468
10469 2001-01-18 Akim Demaille <akim@epita.fr>
10470
10471 Since we now use obstacks, more % directives can be enabled.
10472
10473 * src/lex.c (percent_table): Also accept `%yacc',
10474 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
10475 `%debug'.
10476 Handle the actions for `%semantic_parser' and `%pure_parser' here,
10477 instead of returning a token.
10478 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
10479 * src/reader.c (read_declarations): Adjust.
10480 * src/files.c (open_files): Don't call `compute_base_names', don't
10481 compute `attrsfile' since they depend upon data which might be
10482 *in* the input file now.
10483 (output_files): Do it here.
10484 * src/output.c (output_headers): Document the fact that this patch
10485 introduces a guaranteed SEGV for semantic parsers.
10486 * doc/bison.texinfo: Document them.
10487 * tests/suite.at: Exercise these %options.
10488
10489 2000-12-20 Akim Demaille <akim@epita.fr>
10490
10491 Also handle the output file (--verbose) with obstacks.
10492
10493 * files.c (foutput): Remove.
10494 (output_obstack): New.
10495 Adjust all dependencies.
10496 * src/conflicts.c: Return a string.
10497 * src/system.h (obstack_grow_string): Rename as...
10498 (obstack_sgrow): this. Be ready to work with non literals.
10499 (obstack_fgrow4): New.
10500
10501 2000-12-20 Akim Demaille <akim@epita.fr>
10502
10503 * src/files.c (open_files): Fix the computation of short_base_name
10504 in the case of `-o foo.tab.c'.
10505
10506 2000-12-20 Akim Demaille <akim@epita.fr>
10507
10508 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
10509 (copy_dollar): Now that everything uses obstacks, get rid of the
10510 FILE * parameters.
10511
10512 2000-12-20 Akim Demaille <akim@epita.fr>
10513
10514 * src/files.c (open_files): Actually the `.output' file is based
10515 on the short_base_name, not base_name.
10516 * tests/suite.at (Checking output file names): Adjust.
10517
10518 2000-12-20 Akim Demaille <akim@epita.fr>
10519
10520 * src/bison.s1: Remove, we now use directly...
10521 * src/bison.simple: this.
10522 * src/Makefile.am: Use pkgdata instead of data.
10523
10524 2000-12-20 Akim Demaille <akim@epita.fr>
10525
10526 * src/files.c (guard_obstack): New.
10527 (open_files): Initialize it.
10528 (output_files): Dump it...
10529 * src/files.h: Export it.
10530 * src/reader.c (copy_guard): Use it.
10531
10532 2000-12-19 Akim Demaille <akim@epita.fr>
10533
10534 * src/files.c (outfile, defsfile, actfile): Removed as global
10535 vars.
10536 (open_files): Don't compute them.
10537 (output_files): Adjust.
10538 (base_name, short_base_name): Be global.
10539 Adjust dependencies.
10540
10541 2000-12-19 Akim Demaille <akim@epita.fr>
10542
10543 * src/files.c (strsuffix): New.
10544 (stringappend): Be just like strcat but allocate.
10545 (base_names): Eve out from open_files.
10546 Try to simplify the rather hairy computation of base_name and
10547 short_base_name.
10548 (open_files): Use it.
10549 * tests/suite.at (Checking output file names): New test.
10550
10551 2000-12-19 Akim Demaille <akim@epita.fr>
10552
10553 * src/system.h (obstack_grow_literal_string): Rename as...
10554 (obstack_grow_string): this.
10555 * src/output.c (output_parser): Recognize `%% actions' instead of
10556 `$'.
10557 * src/bison.s1: s/$/%% actions/.
10558 * src/bison.hairy: Likewise.
10559
10560 2000-12-19 Akim Demaille <akim@epita.fr>
10561
10562 * src/output.c (output_parser): Compute the `#line' lines when
10563 there are.
10564 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
10565 Suggested by Hans Aberg.
10566
10567 2000-12-19 Akim Demaille <akim@epita.fr>
10568
10569 Let the handling of the skeleton files be local to the procedures
10570 that use it.
10571
10572 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
10573 longer static.
10574 (fparser, open_extra_files): Remove.
10575 (open_files, output_files): Don't take care of fparser.
10576 * src/files.h: Adjust.
10577 * src/output.c (output_parser): Open and close the file to the
10578 skeleton.
10579 * src/reader.c (read_declarations): When %semantic_parser, open
10580 fguard.
10581
10582 2000-12-19 Akim Demaille <akim@epita.fr>
10583
10584 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
10585 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
10586
10587 2000-12-19 Akim Demaille <akim@epita.fr>
10588
10589 * src/files.c (open_files): Yipee! We no longer need all the code
10590 looking for `/tmp' since we have no tmp file.
10591
10592 2000-12-19 Akim Demaille <akim@epita.fr>
10593
10594 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
10595 New macros.
10596 * src/files.c (open_files): Less dependency on MSDOS etc.
10597
10598 2000-12-14 Akim Demaille <akim@epita.fr>
10599
10600 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
10601 Provide a default definition.
10602 Use it when executing the default @ action.
10603 * src/reader.c (reader_output_yylsp): No longer include
10604 `timestamp' and `text' in the default YYLTYPE.
10605
10606 2000-12-12 Akim Demaille <akim@epita.fr>
10607
10608 * src/reader.c (copy_definition, parse_union_decl, copy_action)
10609 (copy_guard): Quote the file names.
10610 Reported by Laurent Mascherpa.
10611
10612 2000-12-12 Akim Demaille <akim@epita.fr>
10613
10614 * src/output.c (output_headers, output_program, output): Be sure
10615 to escape special characters when outputting filenames.
10616 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
10617 (output_headers): Don't depend on them, Use ACTSTR.
10618
10619 2000-11-17 Akim Demaille <akim@epita.fr>
10620
10621 * lib/obstack.h: Formatting changes.
10622 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
10623 prevents type checking.
10624 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
10625 cast the value to (void *): assigning a `foo *' to a `void *'
10626 variable is valid.
10627 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
10628 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
10629 append characters.
10630
10631 2000-11-17 Akim Demaille <akim@epita.fr>
10632
10633 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
10634 as...
10635 (suite.m4, regression.m4, calc.m4): these.
10636 * tests/atgeneral.m4: Update from CVS Autoconf.
10637
10638 2000-11-17 Akim Demaille <akim@epita.fr>
10639
10640 * tests/regression.m4 (%union and --defines): New test,
10641 demonstrating a current bug in the obstack implementation.
10642
10643 2000-11-17 Akim Demaille <akim@epita.fr>
10644
10645 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
10646 macros.
10647 Use them to declare the variables which are global or local to
10648 `yyparse'.
10649
10650 2000-11-17 Akim Demaille <akim@epita.fr>
10651
10652 * acconfig.h: Remove, no longer used.
10653
10654 2000-11-07 Akim Demaille <akim@epita.fr>
10655
10656 * src: s/Copyright (C)/Copyright/g.
10657
10658 2000-11-07 Akim Demaille <akim@epita.fr>
10659
10660 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
10661 defining.
10662 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
10663
10664 2000-11-07 Akim Demaille <akim@epita.fr>
10665
10666 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
10667 Merge in a single CPP if/else.
10668
10669 2000-11-07 Akim Demaille <akim@epita.fr>
10670
10671 * src/output.c (output): Remove useless variables.
10672 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
10673 argument `data' for consistency with the prototypes.
10674 Qualify it `const'.
10675 (obstack_copy, obstack_copy0): Rename the second argument as
10676 `address' for consistency. Qualify it `const'.
10677 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
10678 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
10679 `const' their input argument (`data' or `address').
10680 Adjust the corresponding macros to include `const' in casts.
10681
10682 2000-11-03 Akim Demaille <akim@epita.fr>
10683
10684 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
10685 s/PFILE1/BISON_HAIRY/.
10686 Adjust dependencies.
10687
10688 2000-11-03 Akim Demaille <akim@epita.fr>
10689
10690 For some reason, this was not applied.
10691
10692 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10693 `unlink': it's no longer used.
10694
10695 2000-11-03 Akim Demaille <akim@epita.fr>
10696
10697 * src/files.c (skeleton_find): New function, eved out of...
10698 (open_files, open_extra_files): here.
10699
10700 2000-11-03 Akim Demaille <akim@epita.fr>
10701
10702 Don't use `atexit'.
10703
10704 * src/files.c (obstack_save): New function.
10705 (done): Rename as...
10706 (output_files): this.
10707 Use `obstack_save'.
10708 * src/main.c (main): Don't use `atexit' to register `done', since
10709 it no longer has to remove tmp files, just call `output_files'
10710 when there are no errors.
10711
10712 2000-11-02 Akim Demaille <akim@epita.fr>
10713
10714 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10715 `unlink': it's no longer used.
10716 * src/files.h: Formatting changes.
10717
10718 2000-11-02 Akim Demaille <akim@epita.fr>
10719
10720 Remove the last uses of mktemp and unlink/delete.
10721
10722 * src/files.c (fdefines, ftable): Removed.
10723 (defines_ostack, table_obstack): New.
10724 Adjust dependencies of the former into uses of the latter.
10725 * src/output.c (output_short_or_char_table, output_short_table):
10726 Convert to using obstacks.
10727 * src/reader.c (copy_comment2): Accept one FILE * and two
10728 obstacks.
10729 (output_token_defines, reader_output_yylsp): Use obstacks.
10730 * src/system.h (obstack_fgrow3): New.
10731 * po/POTFILES.in: Adjust.
10732
10733 2000-11-01 Akim Demaille <akim@epita.fr>
10734
10735 Change each use of `fattrs' into a use of `attrs_obstack'.
10736
10737 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
10738 * src/files.c (fattrs): Remove.
10739 (attrs_obstack): New.
10740 Adjust all dependencies.
10741 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
10742
10743 2000-11-01 Akim Demaille <akim@epita.fr>
10744
10745 Introduce obstacks.
10746 Change each use of `faction' into a use of `action_obstack'.
10747
10748 * lib/obstack.h, lib/obstack.c: New files.
10749 * src/files.c (faction): Remove.
10750 (action_obstack): New.
10751 Adjust all dependencies.
10752
10753 2000-10-20 Akim Demaille <akim@epita.fr>
10754
10755 * lib/quote.h (PARAMS): New macro. Use it.
10756
10757 2000-10-16 Akim Demaille <akim@epita.fr>
10758
10759 * src/output.c (output_short_or_char_table): New function.
10760 (output_short_table, output_token_translations): Use it.
10761 (goto_actions): Use output_short_table.
10762
10763 2000-10-16 Akim Demaille <akim@epita.fr>
10764
10765 * src/symtab.c (bucket_new): New function.
10766 (getsym): Use it.
10767
10768 * src/output.c (output_short_table): New argument to display the
10769 comment associated with the table.
10770 Adjust dependencies.
10771 (output_gram): Use it.
10772 (output_rule_data): Nicer output layout for YYTNAME.
10773
10774 2000-10-16 Akim Demaille <akim@epita.fr>
10775
10776 * src/lex.c (read_typename): New function.
10777 (lex): Use it.
10778 * src/reader.c (copy_dollar): Likewise.
10779
10780 2000-10-16 Akim Demaille <akim@epita.fr>
10781
10782 * src/reader.c (copy_comment2): Expect the input stream to be on
10783 the `/' which is suspected to open a comment, instead of being
10784 called after `//' or `/*' was read.
10785 (copy_comment, copy_definition, parse_union_decl, copy_action)
10786 (copy_guard): Adjust.
10787
10788 2000-10-16 Akim Demaille <akim@epita.fr>
10789
10790 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
10791 `read_signed_integer'.
10792
10793 2000-10-16 Akim Demaille <akim@epita.fr>
10794
10795 * src/reader.c (copy_dollar): New function.
10796 (copy_guard, copy_action): Use it.
10797
10798 2000-10-16 Akim Demaille <akim@epita.fr>
10799
10800 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
10801 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
10802 New files, from Fileutils 4.0.27.
10803 * src/main.c (printable_version): Remove.
10804 * src/lex.c, src/reader.c: Use `quote'.
10805
10806 2000-10-04 Akim Demaille <akim@epita.fr>
10807
10808 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
10809
10810 2000-10-04 Akim Demaille <akim@epita.fr>
10811
10812 * doc/bison.texinfo: Various typos spotted by Neil Booth.
10813
10814 2000-10-04 Akim Demaille <akim@epita.fr>
10815
10816 When a literal string is used to define two different tokens,
10817 `bison -v' segfaults.
10818 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
10819
10820 * tests/regression.m4: New file.
10821 Include the core of the sample provided by Piotr Gackiewicz.
10822 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
10823 properly.
10824
10825 2000-10-04 Akim Demaille <akim@epita.fr>
10826
10827 * src/reader.c (parse_expect_decl): Keep `count' within the size
10828 of `buffer'.
10829 From Neil Booth.
10830
10831 2000-10-02 Paul Eggert <eggert@twinsun.com>
10832
10833 * bison.s1 (yyparse): Assign the default value
10834 unconditionally, to avoid a GCC warning and make the parser a
10835 tad smaller.
10836
10837 2000-10-02 Akim Demaille <akim@epita.fr>
10838
10839 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
10840 options.
10841
10842 2000-10-02 Akim Demaille <akim@epita.fr>
10843
10844 * src/derives.c, src/print.c, src/reduce.c: To ease the
10845 translation, move some `\n' out of the translated strings.
10846
10847 2000-10-02 Akim Demaille <akim@epita.fr>
10848
10849 The location tracking mechanism is precious for parse error
10850 messages. Nevertheless, it is enabled only when `@n' is used in
10851 the grammar, which is a different issue (you can use it in error
10852 message, but not in the grammar per se). Therefore, there should
10853 be another means to enable it.
10854
10855 * src/getargs.c (getargs): Support `--locations'.
10856 (usage): Report it.
10857 * src/getargs.h (locationsflag): Export it.
10858 * src/lex.c (percent_table): Support `%locations'.
10859 * src/reader.c (yylsp_needed): Remove this variable, now replaced
10860 with `locationsflag'.
10861 * doc/bison.texinfo: Document `--locations' and `%locations'.
10862 Sort the options.
10863 * tests/calc.m4: Test it.
10864
10865 For regularity of the names, replace each
10866 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
10867 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
10868 In addition replace each `flag' with `_flag'.
10869
10870 2000-10-02 Akim Demaille <akim@epita.fr>
10871
10872 Also test parse error messages, including with YYERROR_VERBOSE.
10873
10874 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
10875 associative).
10876 Use it to check the computations.
10877 Use it to check `nonassoc' is honored.
10878 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
10879 `--yyerror-verbose'.
10880 (_AT_CHECK_CALC): Adjust to this option.
10881 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
10882
10883 2000-10-02 Akim Demaille <akim@epita.fr>
10884
10885 Test also `--verbose', `--defines' and `--name-prefix'. Testing
10886 the latter demonstrates a flaw in the handling of non debugging
10887 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
10888 was used in order to simplify:
10889
10890 #if YYDEBUG
10891 if (yydebug)
10892 {
10893 ...
10894 }
10895 #endif
10896
10897 into
10898
10899 if (yydebug)
10900 {
10901 ...
10902 }
10903
10904 unfortunately this leads to a CPP conflict when
10905 `--name-prefix=foo' is used since it produces `#define yydebug
10906 foodebug'.
10907
10908 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
10909 (YYDPRINTF): New macro.
10910 Spread its use.
10911 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10912 the bison options.
10913 Also test `--verbose', `--defines' and `--name-prefix'.
10914
10915 2000-10-02 Akim Demaille <akim@epita.fr>
10916
10917 Improve the readability of the produced parsers.
10918
10919 * src/bison.s1: Formatting changes.
10920 Improve the comment related to the `$' mark.
10921 (yydefault): Don't fall through to `yyresume': `goto' there.
10922 * src/output.c (output_parser): When the `$' is met, skip the end
10923 of its line.
10924 New variable, `number_of_dollar_signs', to check there's exactly
10925 one `$' in the parser skeleton.
10926
10927 2000-10-02 Akim Demaille <akim@epita.fr>
10928
10929 * lib/xstrdup.c: New file, from the fileutils.
10930 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10931 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10932 instead of strlen + xmalloc + strcpy.
10933 * src/symtab.c (copys): Remove, use xstrdup instead.
10934
10935 2000-10-02 Akim Demaille <akim@epita.fr>
10936
10937 * src/gram.h (associativity): New enum type which replaces the
10938 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10939 `right_assoc', `left_assoc' and `non_assoc'.
10940 Adjust all dependencies.
10941 * src/reader.c: Formatting changes.
10942 (LTYPESTR): Don't define it, use it as a literal in
10943 `reader_output_yylsp'.
10944 * src/symtab.h (symbol_class): New enum type which replaces the
10945 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10946 `sunknown', `stoken and `snterm'.
10947
10948 2000-10-02 Akim Demaille <akim@epita.fr>
10949
10950 * src/getargs.c (fixed_outfiles): Rename as...
10951 (yaccflag): for consistency and accuracy.
10952 Adjust dependencies.
10953
10954 2000-10-02 Akim Demaille <akim@epita.fr>
10955
10956 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10957 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10958 difficult and introduced a lot of core dump. It turns out that
10959 Bison used an implementation of `xmalloc' based on `calloc', and
10960 at various places it does depend upon the initialization to 0. I
10961 have not tried to isolate the pertinent places, and all the former
10962 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10963 someone should address this issue.
10964
10965 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10966 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10967 files.
10968 Adjust dependencies.
10969 * src/warshall.h: New file.
10970 Propagate.
10971
10972 2000-10-02 Akim Demaille <akim@epita.fr>
10973
10974 Various anti-`extern in *.c' changes.
10975
10976 * src/system.h: Include `assert.h'.
10977
10978 2000-10-02 Akim Demaille <akim@epita.fr>
10979
10980 * src/state.h (nstates, final_state, first_state, first_shift)
10981 (first_reduction): Move their exportation from here...
10982 * src/LR0.h: to here.
10983 Adjust dependencies.
10984 * src/getargs.c (statisticsflag): New variable.
10985 Add support for `--statistics'.
10986 Adjust dependencies.
10987
10988 Remove a lot of now useless `extern' statements in most files.
10989
10990 2000-10-02 Akim Demaille <akim@epita.fr>
10991
10992 * src/LR0.h: New file.
10993 Propagate its use.
10994
10995 2000-10-02 Akim Demaille <akim@epita.fr>
10996
10997 * src/print.h: New file.
10998 Propagate its use.
10999 * src/print.c: Formatting and ordering changes.
11000 (verbose, terse): Replace with...
11001 (print_results): this new function.
11002 Adjust dependencies.
11003
11004 2000-10-02 Akim Demaille <akim@epita.fr>
11005
11006 * src/conflicts.c (conflict_report): New function.
11007 (conflict_log, verbose_conflict_log): Replace with...
11008 (print_conflicts): this function.
11009 Adjust dependencies.
11010 * src/conflicts.h: New file.
11011 Propagate its inclusion.
11012
11013 2000-10-02 Akim Demaille <akim@epita.fr>
11014
11015 * src/nullable.h: New file.
11016 Propagate its inclusion.
11017 * src/nullable.c: Formatting changes.
11018
11019 2000-10-02 Akim Demaille <akim@epita.fr>
11020
11021 * src/reduce.h: New file.
11022 Propagate its inclusion.
11023 * src/reduce.c: Topological sort and other formatting changes.
11024 (bool, TRUE, FALSE): Move their definition to...
11025 * src/system.h: here.
11026
11027 2000-10-02 Akim Demaille <akim@epita.fr>
11028
11029 * src/files.c: Formatting changes.
11030 (tryopen, tryclose, openfiles): Rename as...
11031 (xfopen, xfclose, open_files): this.
11032 (stringappend): static.
11033 * src/files.h: Complete the list of exported symbols.
11034 Propagate its use.
11035
11036 2000-10-02 Akim Demaille <akim@epita.fr>
11037
11038 * src/reader.h: New file.
11039 Propagate its use instead of tedious list of `extern' and
11040 prototypes.
11041 * src/reader.c: Formatting changes, topological sort,
11042 s/register//.
11043
11044 2000-10-02 Akim Demaille <akim@epita.fr>
11045
11046 * src/lex.h: Prototype `lex.c' exported functions.
11047 * src/reader.c: Adjust.
11048 * src/lex.c: Formatting changes.
11049 (safegetc): Rename as...
11050 (xgetc): this.
11051
11052 2000-10-02 Akim Demaille <akim@epita.fr>
11053
11054 * src/lalr.h: New file.
11055 Propagate its inclusion instead of prototypes and `extern'.
11056 * src/lalr.c: Formatting changes, topological sorting etc.
11057
11058 2000-10-02 Akim Demaille <akim@epita.fr>
11059
11060 * src/output.c (token_actions): Introduce a temporary array,
11061 YYDEFACT, that makes it possible for this function to use
11062 output_short_table.
11063
11064 2000-10-02 Akim Demaille <akim@epita.fr>
11065
11066 `user_toknums' is output as a `short[]' in `output.c', while it is
11067 defined as a `int[]' in `reader.c'. For consistency with the
11068 other output tables, `user_toknums' is now defined as a table of
11069 shorts.
11070
11071 * src/reader.c (user_toknums): Be a short table instead of an int
11072 table.
11073 Adjust dependencies.
11074
11075 Factor the short table outputs.
11076
11077 * src/output.c (output_short_table): New function.
11078 * src/output.c (output_gram, output_stos, output_rule_data)
11079 (output_base, output_table, output_check): Use it.
11080
11081 2000-10-02 Akim Demaille <akim@epita.fr>
11082
11083 * src/output.c (output): Topological sort of the functions, in
11084 order to get rid of the `static' prototypes.
11085 No longer use `register'.
11086 * src/output.h: New file.
11087 Propagate its inclusion in files explicitly prototyping functions
11088 from output.c.
11089
11090 2000-09-21 Akim Demaille <akim@epita.fr>
11091
11092 * src/atgeneral.m4: Update from Autoconf.
11093
11094 2000-09-21 Akim Demaille <akim@epita.fr>
11095
11096 * src/closure.h: New file.
11097 * src/closure.c: Formatting changes, topological sort over the
11098 functions, use of closure.h.
11099 (initialize_closure, finalize_closure): Rename as...
11100 (new_closure, free_closure): these. Adjust dependencies.
11101 * src/LR0.c: Formatting changes, topological sort, use of
11102 cloture.h.
11103 (initialize_states): Rename as...
11104 (new_states): this.
11105 * src/Makefile.am (noinst_HEADERS): Adjust.
11106
11107 2000-09-20 Akim Demaille <akim@epita.fr>
11108
11109 * src/acconfig.h: Don't protect config.h against multiple
11110 inclusion.
11111 Don't define PARAMS.
11112 * src/system.h: Define PARAMS.
11113 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
11114 purpose of config.h. system.h must not try to fix wrong
11115 definitions in config.h.
11116
11117 2000-09-20 Akim Demaille <akim@epita.fr>
11118
11119 * src/derives.h: New file.
11120 * src/main.c, src/derives.h: Use it.
11121 Formatting changes.
11122 * src/Makefile.am (noinst_HEADERS): Adjust.
11123
11124 2000-09-20 Akim Demaille <akim@epita.fr>
11125
11126 * tests/atgeneral.m4: Update from Autoconf.
11127 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
11128 (AT_CHECK_CALC): New macros.
11129 Use these macros to test bison with options `', `--raw',
11130 `--debug', `--yacc', `--yacc --debug'.
11131
11132 2000-09-19 Akim Demaille <akim@epita.fr>
11133
11134 * src/output.c: Formatting changes.
11135 * src/machine.h: Remove, leaving its contents in...
11136 * src/system.h: here.
11137 Include stdio.h.
11138 Adjust all dependencies on stdio.h and machine.h.
11139 * src/getargs.h: New file.
11140 Let all `extern' declarations about getargs.c be replaced with
11141 inclusion of `getargs.h'.
11142 * src/Makefile.am (noinst_HEADERS): Adjust.
11143
11144 * tests/calc.m4 (yyin): Be initialized in main, not on the global
11145 scope.
11146 (yyerror): Returns void, not int.
11147 * doc/bison.texinfo: Formatting changes.
11148
11149 2000-09-19 Akim Demaille <akim@epita.fr>
11150
11151 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
11152 portable.
11153
11154 2000-09-18 Akim Demaille <akim@epita.fr>
11155
11156 * configure.in: Append WARNING_CFLAGS to CFLAGS.
11157 * src/Makefile.am (INCLUDES): Don't.
11158 Be ready to fetch headers in lib/.
11159
11160 2000-09-18 Akim Demaille <akim@epita.fr>
11161
11162 * doc/bison.texinfo: Update the copyright.
11163 ANSIfy and GNUify the examples.
11164 Remove the old menu.
11165
11166 2000-09-18 Akim Demaille <akim@epita.fr>
11167
11168 First set of tests: use the `calc' example from the documentation.
11169
11170 * src/bison.s1 (yyparse): Condition the code using `yytname' which
11171 is defined only when YYDEBUG is.
11172 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
11173 * src/files.c (tryopen, tryclose): Formatting changes.
11174 Move to the top and be static.
11175 * src/reader.c (read_signed_integer): Likewise.
11176 * tests/calc.m4: New file.
11177 * Makefile.am, suite.m4: Adjust.
11178 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
11179
11180 2000-09-18 Akim Demaille <akim@epita.fr>
11181
11182 Add support for an Autotest test suite for Bison.
11183
11184 * m4/m4.m4, m4/atconfig.m4: New files.
11185 * m4/Makefile.am (EXTRA_DIST): Adjust.
11186 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
11187 files.
11188 * src/getargs.c: Display a more standard --version message.
11189 * src/reader.c (reader): Formatting changes.
11190 No longer depend upon VERSION_STRING.
11191 * configure.in: No longer use `dnl'.
11192 Set up the test suite and the new directory `tests/.
11193 (VERSION_STRING): Remove.
11194
11195 2000-04-14 Akim Demaille <akim@epita.fr>
11196
11197 * src/reader.c (copy_comment2): New function, same as former
11198 `copy_comment', but outputs into two FILE *.
11199 (copy_comment): Use it.
11200 (parse_union_decl): Use it.
11201 (get_type, parse_start_decl): Use the same `invalid' message.
11202 (parse_start_decl, parse_union_decl): Use the same `multiple'
11203 message.
11204 (parse_union_decl, copy_guard, copy_action): Use the same
11205 `unmatched' message.
11206 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
11207
11208 2000-03-31 Akim Demaille <akim@epita.fr>
11209
11210 * src/files.c (tryopen, tryclose): Move to the top.
11211 Be static.
11212
11213 2000-03-31 Akim Demaille <akim@epita.fr>
11214
11215 * src/main.c (main): Don't call `done', exit does it.
11216
11217 2000-03-31 Akim Demaille <akim@epita.fr>
11218
11219 * allocate.c: s/return (foo)/return foo/.
11220 * lalr.c: Likewise.
11221 * LR0.c: Likewise.
11222 * output.c: Likewise.
11223 * reader.c: Likewise.
11224 * symtab.c: Likewise.
11225 * vmsgetargs.c: Likewise.
11226
11227 2000-03-31 Akim Demaille <akim@epita.fr>
11228
11229 Clean up the error reporting functions.
11230
11231 * src/report.c: New file.
11232 * src/report.h: Likewise.
11233 * src/Makefile.am: Adjust.
11234 * m4/error.m4: New file.
11235 * m4/Makefile.am: Adjust.
11236 * configure.in (jm_PREREQ_ERROR): Call it.
11237 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
11238 Remove.
11239 (fatal, fatals): Remove. All callers use complain.c::fatal.
11240 (warn, warni, warns, warnss, warnss): Remove. All callers use
11241 complain.c::complain.
11242 (toomany): Remove, use fatal instead.
11243 * src/files.c (done): No argument, use complain_message_count.
11244 * src/main.c (main): Register `done' to `atexit'.
11245
11246 * src/getargs.c (usage): More `fputs', less `fprintf'.
11247
11248 2000-03-28 Akim Demaille <akim@epita.fr>
11249
11250 * lib/: New directory.
11251 * Makefile.am (SUBDIRS): Adjust.
11252 * configure.in: Adjust.
11253 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
11254 useless.
11255 * src/alloca.c: Moved to lib/.
11256 * src/getopt.c: Likewise.
11257 * src/getopt1.c: Likewise.
11258 * src/getopt.h: Likewise.
11259 * src/ansi2knr.c: Likewise.
11260 * src/ansi2knr.1: Likewise.
11261 * src/Makefile.am: Adjust.
11262 * lib/Makefile.am: New file.
11263
11264 2000-03-28 Akim Demaille <akim@epita.fr>
11265
11266 * src/getargs.c (usage): Refresh the help message.
11267
11268 2000-03-17 Akim Demaille <akim@epita.fr>
11269
11270 * src/getopt1.c: Updated from textutils 2.0e
11271 * src/getopt.c: Likewise.
11272 * src/getopt.h: Likewise.
11273
11274 2000-03-17 Akim Demaille <akim@epita.fr>
11275
11276 * src/Makefile.am (bison.simple): Fix the awk program: quote only
11277 the file name, not the whole `#line LINE FILE'.
11278
11279 2000-03-17 Akim Demaille <akim@epita.fr>
11280
11281 On syntax errors, report the token on which we choked.
11282
11283 * src/bison.s1 (yyparse): In the label yyerrlab, when
11284 YYERROR_VERBOSE, add yychar in msg.
11285
11286 2000-03-17 Akim Demaille <akim@epita.fr>
11287
11288 * src/reader.c (copy_at): New function.
11289 (copy_guard): Use it.
11290 (copy_action): Use it.
11291
11292 2000-03-17 Akim Demaille <akim@epita.fr>
11293
11294 Be kind to translators, save some useless translations.
11295
11296 * src/main.c (banner): New function.
11297 (fatal_banner): Use it.
11298 (warn_banner): Use it.
11299
11300 2000-03-17 Akim Demaille <akim@epita.fr>
11301
11302 * src/reader.c (copy_definition): Use copy_string and
11303 copy_comment. Removed now unused `match', `ended',
11304 `cplus_comment'.
11305 (copy_comment, copy_string): Moved, to be visible from
11306 copy_definition.
11307
11308 2000-03-17 Akim Demaille <akim@epita.fr>
11309
11310 * src/reader.c (copy_string): Declare `static inline'. No
11311 problems with inline, since it is checked by configure.
11312 (copy_comment): Likewise.
11313
11314 2000-03-17 Akim Demaille <akim@epita.fr>
11315
11316 * src/reader.c (packsymbols): Formatting changes.
11317
11318 2000-03-17 Akim Demaille <akim@epita.fr>
11319
11320 * src/reader.c (copy_comment): New function, factored out from:
11321 (copy_action): Use it. Removed now unused `match', `ended',
11322 `cplus_comment'.
11323 (copy_guard): Likewise.
11324
11325 2000-03-17 Akim Demaille <akim@epita.fr>
11326
11327 * src/reader.c (copy_string): New function, factored out from:
11328 (copy_action): Use it.
11329 (copy_guard): Likewise.
11330
11331 2000-03-17 Akim Demaille <akim@epita.fr>
11332
11333 Change the handling of @s so that they behave exactly like $s.
11334 There is now a pseudo variable @$ (readble and writable), location
11335 of the lhs of the rule (by default ranging from the location of
11336 the first symbol of the rhs, to the location of the last symbol,
11337 or, if the rhs is empty, YYLLOC).
11338
11339 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
11340 yyval.
11341 (yyparse): When providing a default semantic action, provide a
11342 default location action.
11343 (after the $): No longer change `*YYLSP', just stack YYLOC the
11344 same way you stack YYVAL.
11345 * src/reader.c (read_declarations): Use warns.
11346 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
11347 (copy_action, case '@'): Likewise.
11348 Use a standard error message, to save useless work from
11349 translators.
11350
11351 2000-03-17 Akim Demaille <akim@epita.fr>
11352
11353 * src/bison.s1: Formatting and cosmetics changes.
11354 * src/reader.c: Likewise.
11355 Update the Copyright notice.
11356
11357 2000-03-17 Akim Demaille <akim@epita.fr>
11358
11359 * src/bison.s1 (#line): All set to `#line' only, since the
11360 Makefile now handles them.
11361
11362 2000-03-16 Akim Demaille <akim@epita.fr>
11363
11364 * src/output.c (output_rule_data): Output the documentation of
11365 some of the tables.
11366 (Copyright notice): Update.
11367 Formatting changes.
11368
11369 2000-03-16 Akim Demaille <akim@epita.fr>
11370
11371 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
11372 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
11373 One `#if YYDEBUG' remains, since it uses variables which are
11374 defined only if `YYDEBUG != 0'.
11375
11376 2000-03-16 Akim Demaille <akim@epita.fr>
11377
11378 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
11379 and related variables so that the similarities are highlighted.
11380
11381 2000-03-16 Akim Demaille <akim@epita.fr>
11382
11383 * src/bison.s1: Properly indent CPP directives.
11384
11385 2000-03-16 Akim Demaille <akim@epita.fr>
11386
11387 * src/bison.s1: Properly indent the `alloca' CPP section.
11388
11389 2000-03-16 Akim Demaille <akim@epita.fr>
11390
11391 Do not hard code values of directories in `configure.in'.
11392 Update the `configure' tool chain.
11393
11394 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
11395 src/makefile.am.
11396 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
11397 (AC_OUTPUT): Add m4/Makefile.
11398 Bump to bison 1.28a, 1.29 has never been released.
11399 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
11400 handled via src/Makefile.am.
11401 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
11402 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
11403 autoheader.
11404 * Makefile.am (SUBDIRS): Add m4.
11405 (ACLOCAL_AM_FLAGS): New variable.
11406 (AUTOMAKE_OPTIONS): Add check-news.
11407 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
11408 the proper line number and file name.
11409 (DEFS): Propagate the location of bison library files and of the
11410 locale files.
11411 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
11412 builddir.
11413 * acinclude.m4: Remove, replaced by the directory m4.
11414 * m4/Makefile.am (EXTRA_DIST): New variable.
11415 * m4/gettext.m4: New file, from the fileutils.
11416 * m4/lcmessage.m4: Likewise
11417 * m4/progtest.m4: Likewise.
11418 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
11419
11420 2000-03-10 Akim Demaille <akim@epita.fr>
11421
11422 * src/closure.c:
11423 Formatting changes of various comments.
11424 Respect the GNU coding standards at various places.
11425 Don't use `_()' when no translation is needed.
11426
11427 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11428
11429 * src/files.c:
11430 OS/2 honors TMPDIR environment variable.
11431
11432 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11433
11434 * doc/bison.texinfo: Tweaked spelling and grammar.
11435 Updated ISBN.
11436 Removed reference to price of printed copy.
11437 Mention BISON_SIMPLE and BISON_HAIRY.
11438
11439 1999-12-13 Jesse Thilo <jthilo@gnu.org>
11440
11441 * configure.in, NEWS:
11442 Bison 1.29 released.
11443
11444 1999-10-27 Jesse Thilo <jthilo@gnu.org>
11445
11446 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
11447 Added reference card.
11448
11449 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11450
11451 * po/ru.po: Added Russian translation.
11452
11453 1999-07-26 Jesse Thilo <jthilo@gnu.org>
11454
11455 * configure.in: Added Russian translation.
11456
11457 1999-07-06 Jesse Thilo <jthilo@gnu.org>
11458
11459 * configure.in, NEWS, README:
11460 Released version 1.28.
11461
11462 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11463
11464 * src/system.h:
11465 Squashed redefinition warning on some systems.
11466
11467 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
11468 Have configure build version string instead of relying on ANSI string
11469 concatentation.
11470
11471 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11472
11473 * po/POTFILES.in: Got rid of version.c.
11474
11475 1999-06-14 Jesse Thilo <jthilo@gnu.org>
11476
11477 * acconfig.h, configure.in:
11478 Have configure build version string instead of relying on ANSI string
11479 concatentation.
11480
11481 1999-06-08 Jesse Thilo <jthilo@gnu.org>
11482
11483 * doc/bison.1:
11484 Dropped mention of `+' for long-named options.
11485
11486 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11487
11488 * src/files.c: Added <unistd.h> for unlink().
11489
11490 * src/Makefile.am, src/system.h:
11491 I18n fixes.
11492
11493 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11494
11495 * README: Added a FAQ list.
11496
11497 * configure.in, acconfig.h:
11498 I18n fixes.
11499
11500 1999-05-30 Jesse Thilo <jthilo@gnu.org>
11501
11502 * doc/FAQ, doc/Makefile.am:
11503 Added a FAQ list.
11504
11505 1999-05-19 Jesse Thilo <jthilo@gnu.org>
11506
11507 * src/alloc.h, src/symtab.h, src/version.c:
11508 Protected inclusion of "config.h" with HAVE_CONFIG_H.
11509
11510 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11511
11512 * src/.cvsignore, src/Makefile.am:
11513 Reorganized: sources in `src', documentation in `doc'.
11514
11515 * src/lex.c (literalchar):
11516 fixed the code for escaping double quotes (thanks
11517 Jonathan Czisny.)
11518
11519 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11520
11521 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
11522 Adjusted paths to reflect directory reorganization.
11523
11524 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11525
11526 * doc/.cvsignore, doc/Makefile.am:
11527 Reorganized: sources in `src', documentation in `doc'.
11528
11529 1999-04-18 Jesse Thilo <jthilo@gnu.org>
11530
11531 * configure.in:
11532 Updated AC_INIT file to reflect directory reorganization.
11533
11534 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
11535 Reorganized: sources in `src', documentation in `doc'.
11536
11537 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11538
11539 * src/allocate.c:
11540 Don't declare calloc() and realloc() if not necessary.
11541
11542 1999-04-13 Jesse Thilo <jthilo@gnu.org>
11543
11544 * configure.in, acconfig.h, acinclude.m4:
11545 Don't declare calloc() and realloc() if not necessary.
11546
11547 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11548
11549 * po/.cvsignore: Added i18n support.
11550
11551 1999-03-23 Jesse Thilo <jthilo@gnu.org>
11552
11553 * acconfig.h, configure.in, Makefile.am:
11554 Added i18n support.
11555
11556 1999-03-22 Jesse Thilo <jthilo@gnu.org>
11557
11558 * src/bison.s1: Fixed #line numbers.
11559
11560 1999-03-15 Jesse Thilo <jthilo@gnu.org>
11561
11562 * po/es.po, po/fr.po, po/nl.po, po/de.po:
11563 Added PO files from Translation Project.
11564
11565 1999-03-03 Jesse Thilo <jthilo@gnu.org>
11566
11567 * Makefile.am:
11568 Added support for non-ANSI compilers (ansi2knr).
11569
11570 1999-02-16 Jesse Thilo <jthilo@gnu.org>
11571
11572 * configure.in: Bumped version number to 1.27.
11573
11574 * Makefile.am:
11575 Added `bison.simple' to list of files removed by `make distclean'.
11576
11577 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11578
11579 * src/files.c, src/files.h:
11580 Defined locations of parser files in config.h instead of Makefile.
11581
11582 1999-02-12 Jesse Thilo <jthilo@gnu.org>
11583
11584 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
11585 Defined locations of parser files in config.h instead of Makefile.
11586
11587 1999-02-09 Jesse Thilo <jthilo@gnu.org>
11588
11589 * Makefile.am:
11590 Removed inappropriate use of $< macro.
11591
11592 1999-02-05 Jesse Thilo <jthilo@gnu.org>
11593
11594 * po/Makefile.in.in, po/POTFILES.in:
11595 Add `po' directory skeleton.
11596
11597 1999-01-27 Jesse Thilo <jthilo@gnu.org>
11598
11599 * README: Document help-bison list.
11600
11601 * configure.in: Add check for mkstemp().
11602
11603 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11604
11605 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
11606 Hush a few compiler warnings.
11607
11608 * src/files.c:
11609 Add tryclose(), which verifies that fclose was successful.
11610 Hush a couple of compiler warnings.
11611
11612 1999-01-20 Jesse Thilo <jthilo@gnu.org>
11613
11614 * Makefile.am, OChangeLog:
11615 ChangeLog is now automatically generated. Include the old version as
11616 OChangeLog.
11617
11618 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11619
11620 * 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:
11621 Update FSF address.
11622
11623 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11624
11625 * doc/bison.texinfo: Fix formatting glitch.
11626
11627 * doc/bison.texinfo: Update FSF address.
11628
11629 1999-01-14 Jesse Thilo <jthilo@gnu.org>
11630
11631 * acconfig.h: Update FSF address.
11632
11633 1999-01-08 Jesse Thilo <jthilo@gnu.org>
11634
11635 * src/system.h:
11636 Don't define PACKAGE here, since config.h defines it.
11637
11638 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11639
11640 * src/reader.c: Update copyright date.
11641
11642 * src/main.c:
11643 Ditch sprintf to statically-sized buffers in fatal/warn functions in
11644 favor of output directly to stderr (avoids buffer overruns).
11645
11646 * src/reader.c: Some checks for premature EOF.
11647
11648 * 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:
11649 Use prototypes if the compiler understands them.
11650
11651 * src/files.c: Honor TMPDIR on Unix hosts.
11652 Use prototypes if the compiler understands them.
11653
11654 * src/reader.c:
11655 Fix a couple of buffer overrun bugs.
11656 Use prototypes if the compiler understands them.
11657
11658 * src/system.h: Include unistd.h and ctype.h.
11659 Use #ifdef instead of #if for NLS symbols.
11660
11661 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11662
11663 * doc/bison.texinfo:
11664 Delete comment "consider using @set for edition number, etc..." since
11665 we now are doing so.
11666
11667 1998-12-30 Jesse Thilo <jthilo@gnu.org>
11668
11669 * configure.in:
11670 Use prototypes if the compiler understands them.
11671
11672 * NEWS: Document 1.26 highlights.
11673
11674 * Makefile.am: Require Automake 1.3 or later.
11675
11676 * acconfig.h:
11677 Use prototypes if the compiler understands them.
11678
11679 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11680
11681 * src/version.c:
11682 Use VERSION symbol from automake for version number.
11683
11684 1998-12-29 Jesse Thilo <jthilo@gnu.org>
11685
11686 * acconfig.h, configure.in, version.cin:
11687 Use VERSION symbol from automake for version number.
11688
11689 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11690
11691 * Makefile.am:
11692 Distribute original version of simple parser (bison.s1), not built
11693 version (bison.simple).
11694
11695 1998-11-28 Jesse Thilo <jthilo@gnu.org>
11696
11697 * doc/bison.texinfo: Add info dir entry.
11698
11699 * doc/bison.texinfo:
11700 Let automake put version number into documentation.
11701
11702 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11703
11704 * src/bison.cld, src/build.com, src/vmshlp.mar:
11705 Add non-RCS files from /gd/gnu/bison.
11706
11707 1998-11-26 Jesse Thilo <jthilo@gnu.org>
11708
11709 * doc/bison.1:
11710 Document the BISON_HAIRY and BISON_SIMPLE variables.
11711
11712 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11713
11714 * src/version.c: Build version.c automatically.
11715
11716 * src/reader.c:
11717 Fix token numbering (used to start at 258, not 257).
11718
11719 * src/system.h: Include config.h.
11720
11721 * src/getargs.c: Update bug report address.
11722
11723 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
11724 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
11725
11726 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11727
11728 * Makefile.am:
11729 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11730
11731 * configure.in, version.cin:
11732 Build version.c automatically.
11733
11734 * AUTHORS: Add AUTHORS file.
11735
11736 * README: Update bug report address.
11737
11738 * bison.simple:
11739 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
11740
11741 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
11742 Add automake stuff.
11743
11744 1998-11-25 Jesse Thilo <jthilo@gnu.org>
11745
11746 * doc/bison.texinfo: Clean up some formatting.
11747
11748 1998-05-05 Richard Stallman <rms@gnu.org>
11749
11750 * doc/bison.texinfo:
11751 Explain better why to make a pure parser.
11752
11753 1998-01-05 Richard Stallman <rms@gnu.org>
11754
11755 * src/files.c (openfiles):
11756 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
11757 find a temporary directory, if possible. Do not unlink files while
11758 they are open.
11759
11760 1997-08-25 Richard Stallman <rms@gnu.org>
11761
11762 * src/reader.c (stack_offset;):
11763 Change some warni to warns.
11764
11765 * src/lex.c (literalchar): Use warns, not warni.
11766
11767 1997-06-28 Richard Stallman <rms@gnu.org>
11768
11769 * src/bison.s1: Add a Bison version comment.
11770
11771 * src/main.c (fatal, warn, berror):
11772 Use program_name.
11773
11774 1997-06-28 Richard Stallman <rms@gnu.org>
11775
11776 * Makefile.in (bison_version): New variable.
11777 (dist): Use that variable.
11778 (bison.s1): Substitute the Bison version into bison.simple.
11779
11780 * bison.simple: Add a Bison version comment.
11781
11782 1997-06-18 Richard Stallman <rms@gnu.org>
11783
11784 * src/main.c (fatal, warn, berror):
11785 Make error messages standard.
11786 (toomany): Improve error message text.
11787
11788 * 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:
11789 new.h renamed to alloc.h.
11790
11791 1997-06-18 Richard Stallman <rms@gnu.org>
11792
11793 * Makefile.in: new.h renamed to alloc.h.
11794
11795 1997-05-24 Richard Stallman <rms@gnu.org>
11796
11797 * src/lex.c (literalchar):
11798 Fix the code for escaping \, " and '.
11799
11800 (lex): Avoid trouble when there are many chars
11801 to discard in a char literal with just several chars in it.
11802
11803 1997-05-17 Richard Stallman <rms@gnu.org>
11804
11805 * src/bison.s1:
11806 Use malloc, if using alloca is troublesome.
11807 (YYSTACK_USE_ALLOCA): New flag macro.
11808 Define it for some systems and compilers.
11809 (YYSTACK_ALLOC): New macro.
11810 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11811 If it was malloc'd, free it.
11812
11813 1997-05-17 Richard Stallman <rms@gnu.org>
11814
11815 * bison.simple:
11816 Use malloc, if using alloca is troublesome.
11817 (YYSTACK_USE_ALLOCA): New flag macro.
11818 Define it for some systems and compilers.
11819 (YYSTACK_ALLOC): New macro.
11820 (yyparse): Use YYSTACK_ALLOC to allocate stack.
11821 If it was malloc'd, free it.
11822
11823 1997-04-23 Richard Stallman <rms@gnu.org>
11824
11825 * src/bison.s1:
11826 (alloca) [__hpux]: Always define as __builtin_alloca.
11827
11828 1997-04-23 Richard Stallman <rms@gnu.org>
11829
11830 * bison.simple:
11831 (alloca) [__hpux]: Always define as __builtin_alloca.
11832
11833 1997-04-22 Richard Stallman <rms@gnu.org>
11834
11835 * src/bison.s1:
11836 [__hpux]: Include alloca.h (right for HPUX 10)
11837 instead of declaring alloca (right for HPUX 9).
11838
11839 * src/bison.s1 (__yy_memcpy):
11840 Declare arg `count' as unsigned int.
11841 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11842
11843 1997-04-22 Richard Stallman <rms@gnu.org>
11844
11845 * bison.simple:
11846 [__hpux]: Include alloca.h (right for HPUX 10)
11847 instead of declaring alloca (right for HPUX 9).
11848
11849 * bison.simple (__yy_memcpy):
11850 Declare arg `count' as unsigned int.
11851 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
11852
11853 1997-01-03 Richard Stallman <rms@gnu.org>
11854
11855 * src/allocate.c: [__STDC__ or _MSC_VER]:
11856 Declare calloc and realloc to return void *.
11857
11858 1997-01-02 Richard Stallman <rms@gnu.org>
11859
11860 * src/system.h:
11861 [_MSC_VER]: Include stdlib.h and process.h.
11862 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
11863
11864 * src/main.c (main): Return FAILURE as a value.
11865 (printable_version): Declare arg as int, not char.
11866
11867 1997-01-02 Richard Stallman <rms@gnu.org>
11868
11869 * Makefile.in (dist):
11870 Explicitly check for symlinks, and copy them.
11871
11872 1996-12-19 Richard Stallman <rms@gnu.org>
11873
11874 * src/files.c:
11875 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
11876
11877 1996-12-18 Paul Eggert <eggert@gnu.org>
11878
11879 * src/bison.s1 (yyparse):
11880 If __GNUC__ and YYPARSE_PARAM are both defined,
11881 declare yyparse to have a void * argument.
11882
11883 1996-12-18 Paul Eggert <eggert@gnu.org>
11884
11885 * bison.simple (yyparse):
11886 If __GNUC__ and YYPARSE_PARAM are both defined,
11887 declare yyparse to have a void * argument.
11888
11889 1996-12-17 Richard Stallman <rms@gnu.org>
11890
11891 * src/reduce.c (nbits): Add some casts.
11892
11893 1996-08-12 Richard Stallman <rms@gnu.org>
11894
11895 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
11896
11897 1996-08-12 Richard Stallman <rms@gnu.org>
11898
11899 * bison.simple: Test _MSDOS as well as _MSDOS_.
11900
11901 1996-07-31 Richard Stallman <rms@gnu.org>
11902
11903 * src/bison.s1:
11904 [__sun && __i386]: Include alloca.h.
11905
11906 1996-07-31 Richard Stallman <rms@gnu.org>
11907
11908 * bison.simple:
11909 [__sun && __i386]: Include alloca.h.
11910
11911 1996-07-30 Richard Stallman <rms@gnu.org>
11912
11913 * src/bison.s1: Comment change.
11914
11915 * src/bison.s1: Test _MSDOS_, not MSDOS.
11916
11917 1996-07-30 Richard Stallman <rms@gnu.org>
11918
11919 * bison.simple: Comment change.
11920
11921 * bison.simple: Test _MSDOS_, not MSDOS.
11922
11923 1996-06-01 Richard Stallman <rms@gnu.org>
11924
11925 * 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:
11926 Insert `_' macro around many string constants.
11927
11928 * src/main.c:
11929 Insert `_' macro around many string constants.
11930
11931 (main): Call setlocale, bindtextdomain and textdomain.
11932
11933 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11934 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11935 [ENABLE_NLS]: Include libintl.h.
11936 [ENABLE_NLS] (gettext): Define.
11937 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11938 (N_, PACKAGE, LOCALEDIR): New macros.
11939
11940 1996-06-01 Richard Stallman <rms@gnu.org>
11941
11942 * POTFILES.in: New file.
11943
11944 * Makefile.in (allocate.o):
11945 Define target explicitly.
11946
11947 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11948 (LDFLAGS): Set to @LDFLAGS@.
11949 (configure): Run autoconf only if preceding `cd' succeeds.
11950 (bison.s1): Redirect output to temporary file then move the
11951 temporary to the target, rather than redirecting directly to bison.s1.
11952 (clean): Remove config.status and config.log.
11953 (distclean): Don't remove config.status here.
11954
11955 1996-05-12 Richard Stallman <rms@gnu.org>
11956
11957 * src/bison.s1:
11958 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11959
11960 1996-05-12 Richard Stallman <rms@gnu.org>
11961
11962 * bison.simple:
11963 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11964
11965 1996-05-11 Richard Stallman <rms@gnu.org>
11966
11967 * src/bison.s1 (__yy_memcpy):
11968 Really reorder the args, as was supposedly done on Feb 14 1995.
11969 (yyparse): Calls changed accordingly.
11970
11971 1996-05-11 Richard Stallman <rms@gnu.org>
11972
11973 * Makefile.in (dist): Don't use $(srcdir).
11974
11975 * bison.simple (__yy_memcpy):
11976 Really reorder the args, as was supposedly done on Feb 14 1995.
11977 (yyparse): Calls changed accordingly.
11978
11979 1996-01-27 Richard Stallman <rms@gnu.org>
11980
11981 * src/output.c (output_rule_data):
11982 Test YYERROR_VERBOSE in the conditional
11983 around the definition of ttyname.
11984
11985 1995-12-29 Richard Stallman <rms@gnu.org>
11986
11987 * src/bison.s1:
11988 Fix line numbers in #line commands.
11989
11990 1995-12-29 Richard Stallman <rms@gnu.org>
11991
11992 * bison.simple:
11993 Fix line numbers in #line commands.
11994
11995 1995-12-27 Richard Stallman <rms@gnu.org>
11996
11997 * src/bison.s1 (YYPARSE_PARAM_DECL):
11998 In C++, make it always null.
11999 (YYPARSE_PARAM_ARG): New macro.
12000 (yyparse): Use YYPARSE_PARAM_ARG.
12001
12002 1995-12-27 Richard Stallman <rms@gnu.org>
12003
12004 * bison.simple (YYPARSE_PARAM_DECL):
12005 In C++, make it always null.
12006 (YYPARSE_PARAM_ARG): New macro.
12007 (yyparse): Use YYPARSE_PARAM_ARG.
12008
12009 1995-11-29 Richard Stallman <rms@gnu.org>
12010
12011 * doc/bison.texinfo:
12012 Describe literal string tokens, %raw, %no_lines, %token_table.
12013
12014 1995-11-29 Daniel Hagerty <hag@gnu.org>
12015
12016 * doc/bison.texinfo: Fixed update date
12017
12018 1995-10-16 Richard Stallman <rms@gnu.org>
12019
12020 * src/version.c: Version 1.25.
12021
12022 1995-10-16 Richard Stallman <rms@gnu.org>
12023
12024 * NEWS: *** empty log message ***
12025
12026 1995-10-16 Richard Stallman <rms@gnu.org>
12027
12028 * doc/bison.1, doc/bison.rnh:
12029 Add new options.
12030
12031 1995-10-15 Richard Stallman <rms@gnu.org>
12032
12033 * src/vmsgetargs.c, src/getargs.c:
12034 Added -n, -k, and -raw switches.
12035 (noparserflag, toknumflag, rawtoknumflag): New variables.
12036
12037 * src/symtab.h (SALIAS):
12038 New #define for adding aliases to %token.
12039 (struct bucket): Added `alias' field.
12040
12041 * src/reduce.c (reduce_grammar):
12042 Revise error message.
12043 (print_notices): Remove final `.' from error message.
12044
12045 * src/reader.c (reader_output_yylsp):
12046 New function.
12047 (readgram): Use `#if 0' around code that accepted %command
12048 inside grammar rules: The documentation doesn't allow it,
12049 and it will fail since the %command processors scan for the next %.
12050 (parse_token_decl): Extended the %token
12051 declaration to allow a multi-character symbol as an alias.
12052 (parse_thong_decl): New function.
12053 (read_declarations): Added %thong declarations.
12054 (read_declarations): Handle NOOP to deal with allowing
12055 % declarations as another means to specify the flags.
12056 (readgram): Allow %prec prior to semantics embedded in a rule.
12057 (skip_to_char, read_declarations, copy_definition)
12058 (parse_token_decl, parse_start_decl, parse_type_decl)
12059 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
12060 (get_type_name, copy_guard, copy_action, readgram)
12061 (get_type, packsymbols): Revised most error messages.
12062 Changed `fatal' to `warnxxx' to avoid aborting for error.
12063 Revised and use multiple warnxxx functions to avoid using VARARGS1.
12064 (read_declarations): Improve the error message for
12065 an invalid character. Do not abort.
12066 (read_declarations, copy_guard, copy_action): Use
12067 printable_version to avoid unprintable characters in printed output.
12068 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
12069 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
12070 Allow the type of a non-terminal can be given
12071 more than once, as long as all specifications give the same type.
12072
12073 * src/output.c:
12074 (output_headers, output_trailers, output, output_gram)
12075 (output_rule_data): Implement noparserflag variable.
12076 Implement toknumflag variable.
12077 (output): Call reader_output_yylsp to output LTYPESTR.
12078
12079 * src/main.c (main):
12080 If reader sees an error, don't process the grammar.
12081 (fatals): Updated to not use VARARGS1.
12082 (printable_version, int_to_string, warn, warni, warns, warnss)
12083 (warnsss): New error reporting functions. Avoid abort for error.
12084
12085 * src/lex.h:
12086 Added THONG and NOOP for alias processing.
12087 Added SETOPT for the new code that allows setting options with %flags.
12088
12089 * src/lex.c:
12090 Include getopt.h. Add some extern decls.
12091 (safegetc): New function to deal with EOF gracefully.
12092 (literalchar); new function to deal with reading \ escapes.
12093 (lex): Use literalchar.
12094 (lex): Implemented "..." tokens.
12095 (literalchar, lex, parse_percent_token): Made tokenbuffer
12096 always contain the token. This includes growing the token
12097 buffer while reading an integer.
12098 (parse_percent_token): Replaced if-else statement with percent_table.
12099 (parse_percent_token): Added % declarations as another
12100 way to specify the flags -n, -l, and -r. Also added hooks for
12101 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
12102 major changes to files.c.
12103 (lex) Retain in the incoming stream a character following
12104 an incorrect '/'.
12105 (skip_white_space, lex): Revised most error messages
12106 and changed fatal to warn to avoid aborting.
12107 (percent_table): Added %thong declarations.
12108
12109 * src/gram.h: Comment changes.
12110
12111 * src/files.c (openfiles, open_extra_files, done):
12112 Add faction flag
12113 and actfile file. Handle noparserflag. Both for -n switch.
12114
12115 * src/conflicts.c (resolve_sr_conflict):
12116 Remove use of alloca.
12117
12118 1995-06-01 Jim Meyering <meyering@gnu.org>
12119
12120 * doc/bison.texinfo: *** empty log message ***
12121
12122 1995-05-06 Richard Stallman <rms@gnu.org>
12123
12124 * src/bison.s1: Comment change.
12125
12126 1995-05-06 Richard Stallman <rms@gnu.org>
12127
12128 * bison.simple: Comment change.
12129
12130 1995-05-03 Richard Stallman <rms@gnu.org>
12131
12132 * src/version.c: Version now 1.24.
12133
12134 * src/bison.s1: Change distribution terms.
12135
12136 * src/version.c: Version now 1.23.
12137
12138 1995-05-03 Richard Stallman <rms@gnu.org>
12139
12140 * doc/bison.texinfo:
12141 Rewrite "Conditions for Using Bison".
12142 Update version to 1.24.
12143
12144 1995-05-03 Richard Stallman <rms@gnu.org>
12145
12146 * bison.simple: Change distribution terms.
12147
12148 1995-02-23 Richard Stallman <rms@gnu.org>
12149
12150 * src/files.c: Test __VMS_POSIX as well as VMS.
12151
12152 1995-02-14 Jim Meyering <meyering@gnu.org>
12153
12154 * src/bison.s1 (__yy_memcpy):
12155 Renamed from __yy_bcopy to avoid
12156 confusion. Reverse FROM and TO arguments to be consistent with
12157 those of memcpy.
12158
12159 1995-02-14 Jim Meyering <meyering@gnu.org>
12160
12161 * bison.simple (__yy_memcpy):
12162 Renamed from __yy_bcopy to avoid
12163 confusion. Reverse FROM and TO arguments to be consistent with
12164 those of memcpy.
12165
12166 1994-11-10 David J. MacKenzie <djm@gnu.org>
12167
12168 * NEWS: reformat
12169
12170 * NEWS: New file.
12171
12172 * Makefile.in (DISTFILES): Include NEWS.
12173
12174 * Makefile.in (DISTFILES):
12175 Include install-sh, not install.sh.
12176
12177 * configure.in: Update to Autoconf v2 macro names.
12178
12179 1994-10-05 David J. MacKenzie <djm@gnu.org>
12180
12181 * Makefile.in: fix typo
12182
12183 * Makefile.in (prefix, exec_prefix):
12184 Let configure set them.
12185
12186 1994-09-28 David J. MacKenzie <djm@gnu.org>
12187
12188 * Makefile.in: Set datadir to $(prefix)/share.
12189
12190 1994-09-15 Richard Stallman <rms@gnu.org>
12191
12192 * src/bison.s1:
12193 Update copyright notice and GPL version.
12194
12195 1994-09-15 Richard Stallman <rms@gnu.org>
12196
12197 * bison.simple:
12198 Update copyright notice and GPL version.
12199
12200 1994-07-12 Richard Stallman <rms@gnu.org>
12201
12202 * src/reduce.c, src/reader.c:
12203 entered into RCS
12204
12205 1994-05-05 David J. MacKenzie <djm@gnu.org>
12206
12207 * Makefile.in: entered into RCS
12208
12209 1994-03-26 Richard Stallman <rms@gnu.org>
12210
12211 * src/bison.s1: entered into RCS
12212
12213 1994-03-26 Richard Stallman <rms@gnu.org>
12214
12215 * bison.simple: entered into RCS
12216
12217 1994-03-25 Richard Stallman <rms@gnu.org>
12218
12219 * src/main.c: entered into RCS
12220
12221 1994-03-24 Richard Stallman <rms@gnu.org>
12222
12223 * src/conflicts.c: entered into RCS
12224
12225 1994-01-02 Richard Stallman <rms@gnu.org>
12226
12227 * Makefile.in: *** empty log message ***
12228
12229 1993-11-21 Richard Stallman <rms@gnu.org>
12230
12231 * src/bison.s1: *** empty log message ***
12232
12233 1993-11-21 Richard Stallman <rms@gnu.org>
12234
12235 * doc/bison.texinfo: entered into RCS
12236
12237 * doc/bison.texinfo: *** empty log message ***
12238
12239 1993-11-21 Richard Stallman <rms@gnu.org>
12240
12241 * bison.simple: *** empty log message ***
12242
12243 1993-10-25 David J. MacKenzie <djm@gnu.org>
12244
12245 * doc/bison.texinfo: *** empty log message ***
12246
12247 1993-10-19 Richard Stallman <rms@gnu.org>
12248
12249 * src/bison.s1: *** empty log message ***
12250
12251 1993-10-19 Richard Stallman <rms@gnu.org>
12252
12253 * bison.simple: *** empty log message ***
12254
12255 1993-10-14 Richard Stallman <rms@gnu.org>
12256
12257 * src/bison.s1: *** empty log message ***
12258
12259 1993-10-14 Richard Stallman <rms@gnu.org>
12260
12261 * bison.simple: *** empty log message ***
12262
12263 1993-09-14 David J. MacKenzie <djm@gnu.org>
12264
12265 * doc/bison.texinfo: *** empty log message ***
12266
12267 1993-09-13 Noah Friedman <friedman@gnu.org>
12268
12269 * Makefile.in: *** empty log message ***
12270
12271 1993-09-10 Richard Stallman <rms@gnu.org>
12272
12273 * src/conflicts.c: *** empty log message ***
12274
12275 * src/system.h: entered into RCS
12276
12277 1993-09-10 Richard Stallman <rms@gnu.org>
12278
12279 * doc/bison.1: entered into RCS
12280
12281 1993-09-06 Noah Friedman <friedman@gnu.org>
12282
12283 * src/version.c: entered into RCS
12284
12285 1993-09-06 Noah Friedman <friedman@gnu.org>
12286
12287 * Makefile.in: *** empty log message ***
12288
12289 1993-07-30 David J. MacKenzie <djm@gnu.org>
12290
12291 * Makefile.in: *** empty log message ***
12292
12293 1993-07-24 Richard Stallman <rms@gnu.org>
12294
12295 * src/bison.s1: *** empty log message ***
12296
12297 1993-07-24 Richard Stallman <rms@gnu.org>
12298
12299 * bison.simple: *** empty log message ***
12300
12301 1993-07-08 David J. MacKenzie <djm@gnu.org>
12302
12303 * Makefile.in: *** empty log message ***
12304
12305 1993-07-04 Richard Stallman <rms@gnu.org>
12306
12307 * src/bison.s1: *** empty log message ***
12308
12309 1993-07-04 Richard Stallman <rms@gnu.org>
12310
12311 * bison.simple: *** empty log message ***
12312
12313 1993-06-26 David J. MacKenzie <djm@gnu.org>
12314
12315 * src/getargs.c: entered into RCS
12316
12317 1993-06-26 David J. MacKenzie <djm@gnu.org>
12318
12319 * doc/bison.texinfo: *** empty log message ***
12320
12321 * doc/bison.1: New file.
12322
12323 1993-06-25 Richard Stallman <rms@gnu.org>
12324
12325 * src/getargs.c: New file.
12326
12327 1993-06-16 Richard Stallman <rms@gnu.org>
12328
12329 * src/bison.s1: *** empty log message ***
12330
12331 1993-06-16 Richard Stallman <rms@gnu.org>
12332
12333 * bison.simple: *** empty log message ***
12334
12335 1993-06-03 Richard Stallman <rms@gnu.org>
12336
12337 * src/bison.s1: New file.
12338
12339 1993-06-03 Richard Stallman <rms@gnu.org>
12340
12341 * doc/bison.texinfo: *** empty log message ***
12342
12343 1993-06-03 Richard Stallman <rms@gnu.org>
12344
12345 * bison.simple: New file.
12346
12347 1993-05-19 Richard Stallman <rms@gnu.org>
12348
12349 * doc/bison.texinfo: New file.
12350
12351 1993-05-07 Noah Friedman <friedman@gnu.org>
12352
12353 * Makefile.in: *** empty log message ***
12354
12355 1993-04-28 Noah Friedman <friedman@gnu.org>
12356
12357 * src/reader.c: *** empty log message ***
12358
12359 1993-04-23 Noah Friedman <friedman@gnu.org>
12360
12361 * src/alloc.h: entered into RCS
12362
12363 1993-04-20 David J. MacKenzie <djm@gnu.org>
12364
12365 * src/version.c: *** empty log message ***
12366
12367 * src/files.c, src/allocate.c:
12368 entered into RCS
12369
12370 * src/reader.c: *** empty log message ***
12371
12372 * src/lex.c: entered into RCS
12373
12374 * src/conflicts.c: New file.
12375
12376 * src/symtab.c: entered into RCS
12377
12378 * src/alloc.h: New file.
12379
12380 * src/LR0.c: entered into RCS
12381
12382 1993-04-18 Noah Friedman <friedman@gnu.org>
12383
12384 * src/reader.c: New file.
12385
12386 * src/version.c: *** empty log message ***
12387
12388 1993-04-18 Noah Friedman <friedman@gnu.org>
12389
12390 * Makefile.in: *** empty log message ***
12391
12392 1993-04-17 Noah Friedman <friedman@gnu.org>
12393
12394 * Makefile.in: *** empty log message ***
12395
12396 1993-04-15 Richard Stallman <rms@gnu.org>
12397
12398 * src/main.c, src/files.c:
12399 New file.
12400
12401 1993-04-15 Noah Friedman <friedman@gnu.org>
12402
12403 * configure.in: entered into RCS
12404
12405 * configure.in: *** empty log message ***
12406
12407 * configure.in: New file.
12408
12409 1993-04-14 Richard Stallman <rms@gnu.org>
12410
12411 * Makefile.in: New file.
12412
12413 1993-04-13 Richard Stallman <rms@gnu.org>
12414
12415 * src/version.c: New file.
12416
12417 1993-03-25 Richard Stallman <rms@gnu.org>
12418
12419 * src/output.c: entered into RCS
12420
12421 1992-09-25 Richard Stallman <rms@gnu.org>
12422
12423 * configure.bat: entered into RCS
12424
12425 1992-06-22 Richard Stallman <rms@gnu.org>
12426
12427 * src/vmsgetargs.c: entered into RCS
12428
12429 1992-06-22 Richard Stallman <rms@gnu.org>
12430
12431 * doc/bison.rnh: entered into RCS
12432
12433 1992-04-20 David J. MacKenzie <djm@gnu.org>
12434
12435 * README: entered into RCS
12436
12437 1992-01-22 Richard Stallman <rms@gnu.org>
12438
12439 * src/machine.h: entered into RCS
12440
12441 1991-12-21 Richard Stallman <rms@gnu.org>
12442
12443 * src/lalr.c, src/closure.c:
12444 entered into RCS
12445
12446 1991-12-20 Richard Stallman <rms@gnu.org>
12447
12448 * src/state.h: entered into RCS
12449
12450 1991-12-18 Richard Stallman <rms@gnu.org>
12451
12452 * src/print.c, src/nullable.c, src/derives.c:
12453 entered into RCS
12454
12455 1991-11-03 David J. MacKenzie <djm@gnu.org>
12456
12457 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
12458 entered into RCS
12459
12460 1988-09-09 Richard Stallman <rms@gnu.org>
12461
12462 * src/bison.hairy: entered into RCS
12463
12464 1987-12-16 Richard Stallman <rms@gnu.org>
12465
12466 * REFERENCES: entered into RCS
12467
12468 -----
12469
12470 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
12471 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
12472
12473 This file is part of Bison, the GNU Compiler Compiler.
12474
12475 Bison is free software; you can redistribute it and/or modify
12476 it under the terms of the GNU General Public License as published by
12477 the Free Software Foundation; either version 2, or (at your option)
12478 any later version.
12479
12480 Bison is distributed in the hope that it will be useful,
12481 but WITHOUT ANY WARRANTY; without even the implied warranty of
12482 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12483 GNU General Public License for more details.
12484
12485 You should have received a copy of the GNU General Public License
12486 along with Bison; see the file COPYING. If not, write to
12487 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
12488 Boston, MA 02111-1307, USA.