]> git.saurik.com Git - bison.git/blame - ChangeLog
* doc/bison.texinfo (Initial Action Decl): New.
[bison.git] / ChangeLog
CommitLineData
18d192f0
AD
12004-09-20 Akim Demaille <akim@epita.fr>
2
3 * doc/bison.texinfo (Initial Action Decl): New.
4
b8458aa5
AD
52004-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
3fc16193
AD
162004-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
ecfe33e7
AD
412004-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
1576d44d
AD
512004-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
9c66f418
AD
662004-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
52d5733f
AD
922004-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
a0e68930
AD
982004-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
e757bb10
AD
1092004-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
0fe1f06d
AD
1182004-09-02 Akim Demaille <akim@epita.fr>
119
120 * data/lalr1.cc (translate_, destruct_): No reason to be static.
121
284acc8b
AD
1222004-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
a5eb1ed2
AD
1332004-09-02 Akim Demaille <akim@epita.fr>
134
b7c72fe1
AD
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.
a5eb1ed2
AD
139 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
140 %printer calls to use cdebug_ when using lalr1.cc.
141
417141dd
AD
1422004-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
2fa09258
AD
1472004-08-26 Akim Demaille <akim@epita.fr>
148
149 * doc/bison.texinfo (Implementing Loops): Rename as...
150 (Implementing Gotos/Loops): this.
151
9378b508
PE
1522004-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
87a8ad5c
PE
1632004-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
dca81a78
PE
1682004-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
c9cbf7c5
PE
1752004-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>.
2fa09258 180
c9cbf7c5
PE
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
fa7e68c3
PE
1942004-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".
2fa09258 200
fa7e68c3
PE
2012004-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
99a9344e
PE
2082004-06-21 Frank Heckenbach <frank@g-n-u.de>
209
210 * doc/bison.texinfo (Simple GLR Parsers): New section.
211
8dd162d3
PE
2122004-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
57a90331
PE
2372004-06-03 Paul Eggert <eggert@cs.ucla.edu>
238
239 * README: Update location of patched M4 distribution.
240
8ed3234a
PE
2412004-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
07971983
PE
2482004-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
29058652
PE
2612004-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
62cb8a99
PE
2662004-05-27 Paul Eggert <eggert@cs.ucla.edu>
267
fd418816
PE
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.
2fa09258 280
62cb8a99
PE
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
caa52c10
PE
2882004-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
4bfd5e4e
PE
2982004-05-25 Paul Eggert <eggert@cs.ucla.edu>
299
2cef3017
PE
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
b9c85d5c
PE
303 * bootstrap: Don't assume $(...) works; use `...` instead.
304 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
305 gettext better.
306
4bfd5e4e
PE
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
6a36ff94
PE
3112004-05-24 Paul Eggert <eggert@cs.ucla.edu>
312
6712933e
PE
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.
b9c85d5c 321
6a36ff94
PE
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
209ea708
PE
3292004-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
41ca2549
PE
3412004-05-21 Paul Eggert <eggert@cs.ucla.edu>
342
383e69dc
PE
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
41ca2549
PE
348 * configure.ac (AC_INIT): Update to 1.875e.
349
e476c87d
PE
3502004-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
233a88ad
PE
3632004-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.
e476c87d 370
12ffdd28
PE
3712004-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.
e476c87d 383
12ffdd28
PE
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.
9668e2be 389 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
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.
e476c87d 403
1f65350a
PE
4042004-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.
12ffdd28
PE
418 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
419 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 420 does this for us.
12ffdd28
PE
421 (AC_ISC_POSIX): Remove; we no longer support this
422 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
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
5062004-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
4f16766c
PE
5502004-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
779e7ceb
PE
5552004-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
d6328241
PH
5962004-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.
4f16766c 601
d6328241
PH
602 * src/scan-gram.l: Recognize %expect-rr.
603
4f16766c 604 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 605 expected_conflicts.
4f16766c 606 (expected_rr_conflicts): Declare.
d6328241
PH
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.
4f16766c 615
d6328241 616 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 617
1452af69
PE
6182004-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
006d217d
PE
6332004-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
c2729758
ADL
6402004-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
dd0e0635
PE
6582004-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
6692004-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
be16239b
PH
6752004-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
5fa90832
PE
6802003-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.
dd0e0635 694
b165c324
AD
6952003-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
26e06a21
ADL
7012003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
702
703 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
704
92ac3705
PE
7052003-10-07 Paul Eggert <eggert@twinsun.com>
706
6a5ecb38
PE
707 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
708 if testsuite doesn't exist.
709
92ac3705
PE
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
91d2c560
PE
7152003-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
0cc3da3a
PE
7222003-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
22fccf95
PE
7302003-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
fc8f2965
AD
7382003-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
39a06c25
PE
7452003-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.
fc8f2965 758
39a06c25
PE
7592003-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
62b6aef9
AD
7642003-08-27 Akim Demaille <akim@epita.fr>
765
766 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
767 GCC warnings.
768
89e1cc61
AD
7692003-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
a08460b0
AD
7742003-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
603f1cfd
AD
7812003-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
cd3684cf
AD
7882003-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
4e03e201
AD
8072003-08-25 Akim Demaille <akim@epita.fr>
808
809 * doc/bison.texinfo: Don't promote stdout for error messages.
810
8c182d05
AD
8112003-08-25 Akim Demaille <akim@epita.fr>
812
813 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
814 From Alexandre Duret-Lutz.
815
6a60c4cf
PE
8162003-08-25 Akim Demaille <akim@epita.fr>
817
818 Version 1.875c.
819
25f66e1a
AD
8202003-08-25 Akim Demaille <akim@epita.fr>
821
822 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
823 Use them.
824
5348bfbe
AD
8252003-08-25 Akim Demaille <akim@epita.fr>
826
827 * data/lalr1.cc (Parser::reduce_print_): New.
828 Use it.
829
47301314
AD
8302003-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
1f7a61ff
AD
8512003-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
327b5b56
PE
8642003-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
0051e3ed
PE
8712003-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.
1f7a61ff 878
137437c6
PE
8792003-07-25 Paul Eggert <eggert@twinsun.com>
880
5b620e06
PE
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
137437c6
PE
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
ddb85ca5
PE
8962003-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
39910e09
AD
9032003-06-25 Akim Demaille <akim@epita.fr>
904
905 * config/depcomp, config/install-sh: Update from masters.
906
0ae99356
PE
9072003-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
cd05d13c
PE
9172003-06-19 Paul Eggert <eggert@twinsun.com>
918
81fd08ca
PE
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>.
4dcf140b 924
cd05d13c
PE
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
4dcf140b
PE
9332003-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
8dd76bee
PE
9382003-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
f8e8262e 982 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 983 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 984 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 985
8dd76bee
PE
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
25005f6a
PH
10102003-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
8dd76bee 1018 (I can't quite reconstruct why these were not allowed before).
25005f6a 1019
137437c6 1020 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 1021 buffer overruns, corrupting state.
8dd76bee
PE
1022
1023 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
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.
8dd76bee 1041
25005f6a
PH
1042 * tests/cxx-type.at: Exercise location information; update tests
1043 to differentiate output with and without locations.
8dd76bee 1044 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
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.
8dd76bee 1052
711f40b7
PE
10532003-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
ac695f7d
PE
10702003-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
26ec81e0
PE
10762003-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
d0829076
PE
11292003-05-24 Paul Eggert <eggert@twinsun.com>
1130
c6ae27df
PE
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.
26ec81e0 1138
d0829076
PE
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
6b2584b7
PE
12022003-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
caf37a36
ADL
12132003-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
3ab37077
PE
12292003-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
12372003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
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
e743727f
PE
12442003-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
916708d5
AD
12512003-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
a06ea4aa
AD
12632003-04-29 Akim Demaille <akim@epita.fr>
1264
1265 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
1266
211074ca
AD
12672003-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
6175ffe3
PE
12732003-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
b1e95857
PE
12782003-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
acda9df6
PE
12862003-04-26 Paul Eggert <eggert@twinsun.com>
1287
3470c57b
PE
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
acda9df6
PE
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
b5250f26
PE
13012003-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
089ac0f1
PE
13062003-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
5ededac6
PE
13122003-04-17 Paul Eggert <eggert@twinsun.com>
1313
1b8f2fff
PE
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
5ededac6
PE
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
b8be9132
AD
13352003-03-31 Akim Demaille <akim@epita.fr>
1336
1337 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
1338
d423d460
AD
13392003-03-31 Akim Demaille <akim@epita.fr>
1340
1341 * src/output.c (prepare_symbols): Avoid trailing spaces in the
1342 output.
1343
c7e441b4
AD
13442003-03-31 Akim Demaille <akim@epita.fr>
1345
1346 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
1347 From Paul Hilfinger.
1348
231897ad
AD
13492003-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
5b066063
AD
13542003-03-29 Akim Demaille <akim@epita.fr>
1355
1356 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
1357
22a74fec
AD
13582003-03-29 Akim Demaille <akim@epita.fr>
1359
1360 * doc/bison.texinfo (Strings are Destroyed): New.
1361
0eee27e7
PE
13622003-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
f61aad93
PE
13692003-03-12 Paul Eggert <eggert@twinsun.com>
1370
537636c7
PE
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
f61aad93
PE
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}
5b066063 1399
f61aad93
PE
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
d2ffe116
AD
14342003-03-03 Akim Demaille <akim@epita.fr>
1435
1436 * ro.po: New.
1437
052826fd
AD
14382003-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
c4749565
AD
14432003-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
d5286af1
AD
14502003-03-02 Akim Demaille <akim@epita.fr>
1451
1452 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
1453 message.
1454
22e304a6
AD
14552003-03-02 Akim Demaille <akim@epita.fr>
1456
22e304a6
AD
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
67a25fed
AD
14612003-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
9c2b381f
PE
14752003-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
0433ba88
AD
14862003-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
b305ea69
PE
14932003-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
c3d25e01
PE
14992003-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
c267ffbc
PE
15072003-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
f939fc12
AD
15182003-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
95923bd6
AD
15242003-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
2cdc240e
AD
15302003-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
5d003116
AD
15382003-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.
ba1ecc07 1544 With the help of Benoit Perrot.
5d003116 1545
d02b25f9
AD
15462003-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
0d1c3a04
AD
15572003-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
60a777aa
AD
15622003-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
0b86fc41
AD
15692003-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
da99a5dc
PE
15772003-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
93b8c255
PE
15842003-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
7548fed2
AD
15962003-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)
d02b25f9 1627 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
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
43a176ef
AD
16332003-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
fc049e9c
AD
16382003-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
a737b216
PE
16432003-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
68e93ad5
AD
16962003-02-02 Akim Demaille <akim@epita.fr>
1697
1698 * src/scan-skel.l: Scan more than one inert character per yylex
1699 invocation.
1700
92898986
PE
17012003-02-01 Paul Eggert <eggert@twinsun.com>
1702
1703 Version 1.875a.
1704
1d9d5d71
PE
1705 * po/LINGUAS: Add ms.
1706
0435d061
AD
17072003-01-30 Akim Demaille <akim@epita.fr>
1708
1709 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
1710
6029a57f
PH
17112003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1712
1713 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
1714 of $1.
0435d061
AD
1715
1716 Changes in response to error report by S. Eken: GLR mode does not
6029a57f
PH
1717 handle negative $ indices or $ indices in embedded rules correctly.
1718 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 1719
6029a57f
PH
1720 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
1721 (b4_rhs_location): Ditto.
0435d061 1722 (yyfill): New function to copy from stack tree into array
6029a57f 1723 incrementally.
0435d061
AD
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
6029a57f
PH
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.
0435d061 1733 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
1734 (yyglrReduce): Ditto.
1735 (yydoAction): Ditto
0435d061 1736
6029a57f
PH
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
6cee6297
PE
17442003-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
b2a836b5
PE
17522003-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
4196b931
PE
17642003-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
3ae831b4
AD
17702003-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
e3aa65c5
PE
17812003-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
f0057011
AD
17962003-01-09 Akim Demaille <akim@epita.fr>
1797
1798 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
1799
1ee6d2a0
PE
18002003-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
d4fd77c4
PE
18072003-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
464c6927
PE
18122003-01-04 Paul Eggert <eggert@twinsun.com>
1813
d600ee67
PE
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
464c6927
PE
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
18252003-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.
d600ee67 1835
464c6927
PE
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.
d600ee67 1841
464c6927
PE
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.
d600ee67 1848
464c6927
PE
1849 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
1850
0f42c7d5
PE
18512003-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
dc546b0f
PE
18572003-01-01 Paul Eggert <eggert@twinsun.com>
1858
1859 * Version 1.875.
1860
2c09b6a7
PE
18612002-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
dc546b0f 1868 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
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
535c0f63
PE
18762002-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.
d600ee67 1881
963fcc17
PE
18822002-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
b1efe548
PE
19102002-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
e3aa65c5 1914 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
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.
d600ee67 1932
983c5c2c
PE
19332002-12-26 Paul Eggert <eggert@twinsun.com>
1934
b1efe548
PE
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
983c5c2c
PE
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 ".".
d600ee67 1948
983c5c2c
PE
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.
d600ee67 1957
983c5c2c
PE
19582002-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
e3aa65c5 1962 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
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
23f2d9dc
PE
19762002-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
19862002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
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",
dc546b0f 2037 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
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
879ca4f8
PE
20512002-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
1c5fe69d
PE
20572002-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
7ea9026a
PE
2062 disagreed with the Bison documentation. Bug
2063 reported by Andrew Walrond.
d600ee67 2064
1c5fe69d
PE
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
d1de5372
PE
20722002-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.
1c5fe69d 2080 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
2081 as an alias for bison y.
2082
2083 * po/LINGUAS: Add da.
d600ee67 2084
d1de5372
PE
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
e3aa65c5 2097 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
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
d0f3fe23
PE
21032002-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
26b4a969
PE
22152002-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
996b1c7e
PE
23712002-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
e3aa65c5 2378 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 2379
e19c4e5d
PE
23802002-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.
26b4a969 2385
e19c4e5d
PE
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.
26b4a969 2406 (rules): Use it.
e19c4e5d
PE
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
24612002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 2462
e19c4e5d
PE
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.
26b4a969 2470
b64755e3
PE
24712002-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
e3aa65c5 2476 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 2477
6e746484
PE
24782002-11-30 Paul Eggert <eggert@twinsun.com>
2479
b64755e3
PE
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
6ba55592
PE
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
6e746484
PE
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
88510f9c
PE
25012002-11-29 Paul Eggert <eggert@twinsun.com>
2502
6e746484
PE
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
88510f9c
PE
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
bb92250c
PE
25222002-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
e3aa65c5 2528 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
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
3af4feb2
PE
25492002-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
25662002-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.
26b4a969 2571
58004308
PE
25722002-11-20 Paul Eggert <eggert@twinsun.com>
2573
2574 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
2575
25762002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 2577
58004308
PE
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
76ae8198
PE
26212002-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
e3aa65c5 2626 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 2627
d3c4e709
AD
26282002-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
8d8a7238
PE
26342002-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
b0937b22
AD
26532002-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
c5e3e510
AD
26662002-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
4c6cc1db
AD
26812002-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
6d9e8019
PE
26912002-11-16 Paul Eggert <eggert@twinsun.com>
2692
2693 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
2694
6e649e65
PE
26952002-11-15 Paul Eggert <eggert@twinsun.com>
2696
b25d88f6
PE
2697 * tests/actions.at (Actions after errors): New test case.
2698
6e649e65
PE
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
0f39aab9
AD
27072002-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
761c1926
AD
27172002-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
b0f98b10
AD
27222002-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
970785f1
PH
27332002-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
8fcc7db1
PE
27382002-11-14 Paul Eggert <eggert@twinsun.com>
2739
7ec1b48e
PE
2740 * src/output.c (output_skeleton): Call xfopen instead of
2741 duplicating xfopen's body.
2742
cfff7583 2743 Fix bugs reported by Nelson H. F. Beebe in
e3aa65c5 2744 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 2745
8fcc7db1
PE
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
e3aa65c5 2755 test backslash-newline in C character constant.
8fcc7db1 2756
4e8d992c
AD
27572002-11-14 Akim Demaille <akim@epita.fr>
2758
2759 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
2760 status of the compiler.
f32b346d 2761 Calling `exit 1' is no longer needed.
4e8d992c
AD
2762 Reported by Nelson H. F. Beebe.
2763
9501dc6e
AD
27642002-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
18b519c0
AD
27772002-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
9a86cdb9
PE
27842002-11-13 Paul Eggert <eggert@twinsun.com>
2785
daa33def 2786 Fix some bugs reported by Albert Chin-A-Young in
e3aa65c5 2787 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 2788
daa33def 2789 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 2790 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
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
8fcc7db1 2795 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 2796
9a86cdb9
PE
2797 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
2798 comments, since they're not portable. Use GNU coding style.
2799
9c1e26bd
AD
28002002-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
87f721cc
PE
28082002-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
464c6927 2815 by Nelson H. F. Beebe in
e3aa65c5 2816 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
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'.
464c6927 2825 This fixes one of the bugs reported by Nelson H. F. Beebe in
e3aa65c5 2826 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 2827
87f721cc
PE
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:
e3aa65c5 2831 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
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
be14ade5
AD
28432002-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
05291fbc
AD
28492002-11-12 Akim Demaille <akim@epita.fr>
2850
2851 * Makefile.maint: Sync with Autoconf:
2852 (local_updates): New.
2853
1f5fd52e
AD
28542002-11-12 Akim Demaille <akim@epita.fr>
2855
2856 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
2857
283f1e64
AD
28582002-11-12 Akim Demaille <akim@epita.fr>
2859
2860 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
2861 locations.
2862
886b69d1
AD
28632002-11-12 Akim Demaille <akim@epita.fr>
2864
2865 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
2866 not yyvalue.
2867
3df37415
AD
28682002-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
7bd6c77e
AD
28732002-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
b0400cc6
AD
28922002-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
72f889cc
AD
29042002-11-12 Akim Demaille <akim@epita.fr>
2905
2906 * doc/bison.texinfo (Destructor Decl): New.
2907
b1ae9233
AD
29082002-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.
72f889cc 2916 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
2917 the file name.
2918
7ec2d4cd
AD
29192002-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
573a6cd3
AD
29312002-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
95612cfa
AD
29392002-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
3e6656f9
AD
29742002-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
7672019c
PE
29872002-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:
e3aa65c5 2992 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
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
acea4f3b
PE
30572002-11-09 Paul Eggert <eggert@twinsun.com>
3058
3059 Fix the test failure due to GCC warnings described in
e3aa65c5 3060 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
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
20ef1ad5
PE
30812002-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
93724f13
AD
31052002-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
6e40b4eb
AD
31182002-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
2dfbfc12
AD
31282002-11-06 Akim Demaille <akim@epita.fr>
3129
3130 * tests/regression.at (Invalid inputs): Adjust to the recent
3131 messages.
3132
437c2d80
AD
31332002-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'.
2dfbfc12 3143 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 3144
900c5db5
AD
31452002-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
e183b123 31552002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 3156
e183b123 3157 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 3158 either has GLR conflict entries.
e183b123 3159
193eb6b7
PE
31602002-11-05 Paul Eggert <eggert@twinsun.com>
3161
e183b123
PE
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
193eb6b7
PE
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
29c01725
AD
31782002-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
8aeac3ca
AD
31832002-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
793a58bb
AD
31882002-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
c4d720cd
AD
31972002-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
613a0dc5
PE
32072002-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
2a8d363a
AD
32142002-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
9e32add8
AD
32492002-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
b02d90a5
PE
32562002-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.
9e32add8 3260
b02d90a5
PE
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).
9e32add8 3282
b02d90a5
PE
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.
9e32add8 3287
b02d90a5
PE
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
33162002-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
762b212b
PE
33312002-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
56100c60
AD
33462002-10-30 Akim Demaille <akim@epita.fr>
3347
3348 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
3349 #if.
3350
51b4a04c
PH
33512002-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.
e183b123 3356
bf1ebda2
PE
33572002-10-24 Paul Eggert <eggert@twinsun.com>
3358
5c16c6b1
PE
3359 Version 1.75a.
3360
bf1ebda2
PE
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
b526ee61
AD
33672002-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
f1886bb2
AD
33742002-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
c5576256
PE
33832002-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
27b0ffea
AD
33912002-10-22 Akim Demaille <akim@epita.fr>
3392
3393 * src/system.h: Include sys/types.
3394 Reported by Bert Deknuydt.
3395
223a7883
PE
33962002-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
34012002-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:
e3aa65c5
PE
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
27b0ffea 3414
223a7883
PE
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
8b76775a
AD
34192002-10-22 Akim Demaille <akim@epita.fr>
3420
3421 * data/README: New.
3422
6db10d14
PE
34232002-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.
27b0ffea 3441
6db10d14
PE
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
92a060fd
PE
34612002-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.
8b76775a 3475
e7cb57c0
AD
34762002-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
0245f82d
AD
34862002-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
39912f52
AD
35002002-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
20c1e2ad
AD
35152002-10-20 Akim Demaille <akim@epita.fr>
3516
3517 * src/tables.h, src/tables.c, src/output.c: Comment changes.
3518
21964f43
AD
35192002-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
66d30cd4
AD
35242002-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
95f2c9fe
PE
35352002-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.
66d30cd4 3557
95f2c9fe
PE
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
c19988b7
AD
35702002-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
ae7453f2
AD
35782002-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
0e575721
AD
36022002-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
724ce7f5
PE
36112002-10-18 Paul Eggert <eggert@twinsun.com>
3612
3a781eb2
PE
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
724ce7f5
PE
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
473d0a75
AD
36212002-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
e76d2469
PE
36332002-10-16 Paul Eggert <eggert@twinsun.com>
3634
93e2236a
PE
3635 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
3636 MUSCLE_TAB_H.
3637
e76d2469
PE
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
5bd1c419
PE
36462002-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.
e76d2469 3657
5bd1c419
PE
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.
e76d2469 3721
ae26e1f0
AD
37222002-10-14 Akim Demaille <akim@epita.fr>
3723
3724 Version 1.75.
3725
d43baf71
AD
37262002-10-14 Akim Demaille <akim@epita.fr>
3727
3728 * tests/Makefile.am (maintainer-check-posix): New.
3729
7ebc83e3
AD
37302002-10-14 Akim Demaille <akim@epita.fr>
3731
3732 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
3733 member.
3734
05846dae
AD
37352002-10-14 Akim Demaille <akim@epita.fr>
3736
3737 * src/tables.c (table_ninf_remap): base -> tab.
3738 Reported by Matt Rosing.
3739
1318e37d
PE
37402002-10-14 Paul Eggert <eggert@twinsun.com>
3741
447fbb17
PE
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.
05846dae 3748
1318e37d
PE
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
cc0f0794
PE
37562002-10-13 Paul Eggert <eggert@twinsun.com>
3757
5038f418
PE
3758 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
3759 true due to limited range of data type" warning from GCC.
3760
cc0f0794
PE
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
6fed0802
AD
37652002-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
32f0598d
AD
37702002-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
7ea9a33f
AD
37752002-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
ea99527d
AD
37812002-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
f377f69f
AD
37982002-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
2a1fe6ed
AD
38092002-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
f50adbbd
AD
38142002-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
bcbad5b9
PE
38422002-10-13 Paul Eggert <eggert@twinsun.com>
3843
3844 Fix problem reported by Henrik Grubbstroem in
e3aa65c5 3845 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
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.
05846dae 3854
14904b89
PE
38552002-10-12 Paul Eggert <eggert@twinsun.com>
3856
1fe611e5
PE
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
e3aa65c5 3862 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 3863
1fe611e5
PE
3864 * lib/timevar.c: Update copyright date and clarify comments.
3865 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 3866
1fe611e5
PE
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
98194095
PE
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
e3aa65c5 3875 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 3876
14904b89
PE
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
e3aa65c5 3881 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 3882
ff6dca18
PE
38832002-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
eb714592
AD
38902002-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
b7195100
AD
38972002-10-11 Akim Demaille <akim@epita.fr>
3898
3899 * po/id.po: New.
3900
f28a0f2d
PE
39012002-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
6fbe4984
PE
40022002-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
e3aa65c5 4006 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
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
420f93c8
PE
40112002-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
40382002-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
ff68026d
PE
40442002-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.
420f93c8 4070
ff68026d
PE
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.
420f93c8 4084
ff68026d
PE
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.
420f93c8 4098
ff68026d
PE
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.
420f93c8 4106
ff68026d
PE
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
6aa452a6
AD
41242002-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
927f7817
AD
41302002-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
9738f41e
AD
41372002-09-27 Akim Demaille <akim@epita.fr>
4138
4139 Version 1.49c.
4140
a5c75d7f
AD
41412002-09-27 Akim Demaille <akim@epita.fr>
4142
4143 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
4144 (Because of AC_LIBSOURCE).
4145
8280e179
AD
41462002-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
ae64af35
AD
41552002-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
d1a1114f
AD
41652002-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
b906441c
AD
41702002-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
bd701811
AD
41792002-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
e0a13e7b
AD
41842002-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
c97011bf
AD
41922002-09-12 Akim Demaille <akim@epita.fr>
4193
4194 * m4/prereq.m4: Update, from Coreutils 4.5.1.
4195
d862b1be
AD
41962002-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
3d38c03a
AD
42022002-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
b6347355
AD
42082002-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
09ba4ab2
PE
42132002-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
21846f69
AD
42192002-09-06 Akim Demaille <akim@epita.fr>
4220
09ba4ab2
PE
4221 * data/c.m4 (b4_copyright): Move the GPL exception comment from
4222 here to...
4223 * data/yacc.c: here.
4224
21846f69
AD
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
c0ad8bf3
AD
42292002-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
3a93251e
AD
42342002-09-04 Akim Demaille <akim@epita.fr>
4235
4236 * configure.in: Rename as...
4237 * configure.ac: this.
4238 Bump to 1.49c.
4239
427c0dda
AD
42402002-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
6a254321
PE
42462002-08-12 Paul Eggert <eggert@twinsun.com>
4247
645e30d1
PE
4248 Version 1.49b.
4249
6a254321
PE
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
c8f002c7
AD
43902002-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
cd08e51e
AD
44092002-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
bb0027a9
AD
44342002-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
3325ddc4
AD
44492002-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
c6f1a33c
AD
44642002-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
1509d42f
AD
44902002-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
273a74fa
AD
45062002-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
217598da
AD
45262002-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
52489d44
AD
45362002-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
e8832397
AD
45462002-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
caf23d24
AD
45632002-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
640748ee
AD
45722002-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
88bce5a2
AD
45822002-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
1bfb97db
AD
45932002-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
fc5734fe
AD
46002002-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
3650b4b8
AD
46122002-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
4b3d3a8e
AD
46182002-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
4a2a22f4
AD
46382002-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
b8df3223
AD
46462002-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
a762e609
AD
46532002-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
12b0043a
AD
46612002-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
5dde258a
AD
46942002-07-19 Akim Demaille <akim@epita.fr>
4695
4696 * src/scan-gram.l (id): Can start with an underscore.
4697
a945ec39
AD
46982002-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
fae437e8
AD
47062002-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
1a715ef2
AD
47132002-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
a5d50994
AD
47212002-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
b275314e
AD
47312002-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
865b9df1
AD
47382002-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
c76e14da
AD
47442002-07-09 Akim Demaille <akim@epita.fr>
4745
4746 * data/yacc.c: Output the copyright notive in the header.
4747
7db2ed2d
AD
47482002-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
e68e0410
AD
47592002-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
e1a4f3a4
AD
47682002-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
536545f3
AD
47762002-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
8b752b00
AD
47862002-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
613f5e1a
AD
48102002-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
26e0cadc
PE
48182002-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
1154cced
AD
48232002-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
97650f4e
AD
48502002-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
d2576365
AD
48582002-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
ccaf65bc
AD
48642002-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
87675353
AD
48732002-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
ce4ccb4b
AD
48872002-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
bc933ef1
AD
49002002-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
53d4308d
AD
49072002-06-30 Akim Demaille <akim@epita.fr>
4908
4909 * src/output.c (action_row): Let default_rule be always a rule
4910 number.
4911
574fb2d5
AD
49122002-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
05811fd7
AD
49232002-06-30 Akim Demaille <akim@epita.fr>
4924
4925 * src/print_graph.c: Use report_flag.
4926
0e4d5753
AD
49272002-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
24c7d800
AD
49342002-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
9222837b
AD
49392002-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
260008e5
AD
49492002-06-30 Akim Demaille <akim@epita.fr>
4950
4951 * src/symtab.c (symbol_new): Initialize the `printer' member.
4952
8a731ca8
AD
49532002-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
32e1e0a4
AD
49612002-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
e5fb6710
AD
49762002-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
c7ca99d4
AD
49812002-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
df0e7316
AD
50012002-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
39f41916
AD
50102002-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
d57650a5
AD
50172002-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
5a08f1ce
AD
50242002-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
720623af
PH
50332002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5034
88e7e941 5035 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
5036 reorganize first lines parallel to yacc.c.
5037
fb8135fa
AD
50382002-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
41442480
AD
50442002-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
e0e5bf84
AD
50502002-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.
e0e5bf84 5056
676385e2
PH
50572002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5058
5059 Accumulated changelog for new GLR parsing features.
5060
6a254321 5061 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
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.
e0e5bf84 5069
676385e2
PH
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
e0e5bf84
AD
5078
5079 * src/getargs.c:
5080
676385e2
PH
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.
e0e5bf84 5083
676385e2
PH
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.
e0e5bf84 5103
676385e2
PH
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.
e0e5bf84 5118 (prepare_rules): Output dprec and merger tables.
676385e2 5119 (conflict_row): New function.
e0e5bf84 5120 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
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.
e0e5bf84 5140 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
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.
e0e5bf84 5170
676385e2
PH
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.
e0e5bf84 5176
b5480d74 51772002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
5178
5179 * src/options.h, src/options.c: Remove.
5180 * src/getargs.c (short_options, long_options): New.
5181
60491a94
AD
51822002-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
9be0c25b
AD
51882002-06-25 Raja R Harinath <harinath@cs.umn.edu>
5189
5190 * src/getargs.c (report_argmatch): Initialize strtok().
5191
1ae72863
AD
51922002-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
87542d29
AD
51992002-06-20 Akim Demaille <akim@epita.fr>
5200
5201 * data/bison.simple (yydestructor): Rename as...
5202 (yydestruct): this.
5203
1a31ed21
AD
52042002-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
e776192e
AD
52112002-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
5c1180b3
AD
52232002-06-20 Akim Demaille <akim@epita.fr>
5224
5225 * data/bison.simple (YYLEX): Fix the declaration when
5226 %pure-parser.
5227
e3170060
AD
52282002-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
253862fd
AD
52362002-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
366eea36
AD
52412002-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
4f25ebb0
AD
52602002-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
93b68a0e
AD
52662002-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
58612f1d
AD
52752002-06-19 Akim Demaille <akim@epita.fr>
5276
74310291
AD
5277 * data/bison.simple (b4_pure_if): New.
5278 Use it instead of #ifdef YYPURE.
5279
52802002-06-19 Akim Demaille <akim@epita.fr>
5281
5282 * data/bison.simple (b4_location_if): New.
58612f1d
AD
5283 Use it instead of #ifdef YYLSP_NEEDED.
5284
f25bfb75
AD
52852002-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
c732d2c6
AD
53012002-06-19 Zack Weinberg <zack@codesourcery.com>
5302
5303 * doc/bison.texinfo: Document ability to have multiple
5304 prologue sections.
5305
8c165d89
AD
53062002-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
ca98bf57
AD
53112002-06-18 Akim Demaille <akim@epita.fr>
5312
5313 * data/bison.simple.new: Comment changes.
5314 Reported by Andreas Schwab.
5315
0bfb02ff
AD
53162002-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
24c0aad7
AD
53222002-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
5719c109
AD
53322002-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
9280d3ef
AD
53392002-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
dafdc66f
AD
53592002-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
56c47203
AD
53702002-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
1e0bab92
AD
53812002-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
04e60654
AD
53922002-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
10e5b8bd
AD
53972002-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
9801d40c
AD
54022002-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
c0263492
AD
54142002-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
9757c359
AD
54232002-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
6b98e4b5
AD
54322002-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
6b98e4b5
AD
54422002-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
ee000ba4
AD
54612002-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
8efe435c
AD
54742002-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
1921f1d7
AD
54942002-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
4515534c
AD
55042002-06-14 Akim Demaille <akim@epita.fr>
5505
5506 * src/main.c (main): Invoke scanner_free.
5507
f958596b
AD
55082002-06-14 Akim Demaille <akim@epita.fr>
5509
5510 * src/output.c (m4_invoke): Extracted from...
5511 (output_skeleton): here.
5512 Free tempfile.
5513
2c569025
AD
55142002-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
592e8d4d
AD
55232002-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
0c15323d
AD
55362002-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
e96c9728
AD
55472002-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
75d1fe16
AD
55532002-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
6c35d22c
AD
55592002-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
1d6412ad
AD
55652002-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
4cdb01db
AD
55732002-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
44995b2e
AD
55792002-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
e9955c83
AD
55862002-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
2e047461
AD
57092002-06-11 Akim Demaille <akim@epita.fr>
5710
cd05d13c 5711 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
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
9af3fbce
AD
57192002-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
1485e106
AD
57282002-06-11 Akim Demaille <akim@epita.fr>
5729
5730 * src/reader.c (grammar_midrule_action): New, Eved out from
5731 (readgram): here.
5732
da4160c3
AD
57332002-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
f6d0f937
AD
57402002-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
69078d4b
AD
57462002-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
5e424082
AD
57562002-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
44536b35
AD
57652002-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
8b9f2372
AD
57732002-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
3ae2b51f
AD
57842002-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
2f1afb73
AD
57912002-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
e9bca3ad
AD
58142002-06-03 Akim Demaille <akim@epita.fr>
5815
5816 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
5817 then statements.
5818
86eff183
AD
58192002-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
717be197
AD
58292002-05-28 Akim Demaille <akim@epita.fr>
5830
5831 * data/bison.c++: Use C++ ostreams.
5832 (cdebug_): New member.
5833
670ddffd
AD
58342002-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
769b430f
AD
58392002-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
7067cb36
PH
58472002-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.
769b430f 5853
4a713ec2
PH
58542002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5855
769b430f 5856 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
5857 obstack_printf should be obstack_fgrow1.
5858
b408954b
AD
58592002-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
a49aecd5
AD
58782002-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
5504898e
AD
58902002-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
ec3bc396
AD
58992002-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
78df8250
PE
59222002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5923 and Paul Eggert <eggert@twinsun.com>
769b430f 5924
78df8250
PE
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
c0c9ea05
PH
59322002-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.
769b430f 5937 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
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.
769b430f 5942
c0c9ea05
PH
5943 * tests/regression.at: Modify expected output to agree with change
5944 to yyr1 and yytranslate.
769b430f 5945
6390a83f
FK
59462002-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
db7c8e9a
AD
59512002-05-13 Akim Demaille <akim@epita.fr>
5952
5953 * tests/regression.at (Token definitions): Prototype yylex and
5954 yyerror.
5955
fcc61800
PH
59562002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5957
158c687b 5958 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
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
5683e9b2
AD
59632002-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
0c2d3f4c
AD
59682002-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
1565b720
AD
59832002-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
cfaee611
AD
59912002-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
458be8e0
AD
59962002-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
a900a624
AD
60032002-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
d4e7d3a1
AD
60082002-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
39ceb25b
AD
60192002-05-05 Akim Demaille <akim@epita.fr>
6020
6021 * tests/torture.at (Many lookaheads): New test.
6022
5372019f
AD
60232002-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
5df5f6d5
AD
60402002-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
b87f8b21
AD
60522002-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
8bb936e4
PE
60612002-05-03 Paul Eggert <eggert@twinsun.com>
6062
6063 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
6064 for K&R C.
6065
60662002-05-03 gettextize <bug-gnu-gettext@gnu.org>
6067
6068 * Makefile.am (SUBDIRS): Remove intl.
6069 (EXTRA_DIST): Add config/config.rpath.
6070
53c71a12
AD
60712002-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
289dd0cf
AD
60762002-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
db85e524
AD
60832002-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
83ccf991
AD
60882002-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
1f418995
AD
60972002-05-03 Akim Demaille <akim@epita.fr>
6098
6099 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
6100
45119f04
RA
61012002-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
b2d52318
AD
61062002-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
3a8b4109
AD
61122002-05-02 Akim Demaille <akim@epita.fr>
6113
6114 * src/reader.c (parse_braces): Merge into...
6115 (parse_action): this.
6116
84614e13
AD
61172002-05-02 Akim Demaille <akim@epita.fr>
6118
6119 * configure.in (ALL_LINGUAS): Remove.
6120 * po/LINGUAS, hr.po: New.
6121
fdbcd8e2
AD
61222002-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
82b6cb3f
AD
61462002-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.
900c877b
AD
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'.
82b6cb3f
AD
6158 * data/bison.simple, data/bison.c++ (b4_lhs_value)
6159 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
6160
6cbfbcc5
AD
61612002-05-02 Akim Demaille <akim@epita.fr>
6162
6163 * configure.in (AC_INIT): Bump to 1.49b.
6164 (AM_INIT_AUTOMAKE): Short invocation.
6165
b8548114
AD
61662002-05-02 Akim Demaille <akim@epita.fr>
6167
6168 Version 1.49a.
6169
c20cd1fa
AD
61702002-05-01 Akim Demaille <akim@epita.fr>
6171
6172 * src/skeleton.h: Remove.
6173
8a9566d4
AD
61742002-05-01 Akim Demaille <akim@epita.fr>
6175
6176 * src/skeleton.h: Fix the #endif.
6177 Reported by Magnus Fromreide.
6178
8c6d399a
PE
61792002-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.
b756bb75 6183 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 6184
2b7ed18a
RA
61852002-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
34a89c50
AD
61992002-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
0dd1580a
RA
62052002-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
83c1796f
PE
62222002-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
1207eeac
AD
62352002-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
78ab8f67
AD
62432002-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
133c20e2
AD
62502002-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
9515e8a7
AD
62562002-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
23c5a174
AD
62622002-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
5fbb0954
AD
62742002-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
4f940944
AD
62882002-04-22 Akim Demaille <akim@epita.fr>
6289
6290 * src/output.h, src/output.c (get_lines_number): Remove.
6291
3ded9a63
AD
62922002-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
e0c471a9
AD
63002002-04-19 Akim Demaille <akim@epita.fr>
6301
6302 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
6303
fecc10cd
AD
63042002-04-10 Akim Demaille <akim@epita.fr>
6305
6306 * src/system.h: Rely on HAVE_LIMITS_H.
6307 Suggested by Paul Eggert.
6308
51dec47b
AD
63092002-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
007a50a4
AD
63222002-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
06446ccf
AD
63472002-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
62a3e4f0
AD
63572002-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
bb88b0fc
AD
63852002-04-08 Akim Demaille <akim@epita.fr>
6386
6387 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
6388 and then the grammar.
6389
9a636f47
AD
63902002-04-08 Akim Demaille <akim@epita.fr>
6391
6392 * src/system.h: No longer using strndup.
6393
680e8701
AD
63942002-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
817e9f41
AD
64072002-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
5123689b
AD
64132002-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
f3849179
AD
64192002-04-07 Akim Demaille <akim@epita.fr>
6420
6421 * src/reader.c: Normalize increments to prefix form.
6422
bd02036a
AD
64232002-04-07 Akim Demaille <akim@epita.fr>
6424
6425 * src/reader.c, symtab.c: Remove debugging code.
6426
db8837cb
AD
64272002-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
72a23c97
AD
64442002-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
280a38c3
AD
64652002-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
03b31c0c
AD
64752002-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
8b3df748
AD
64822002-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
e601aa1d
AD
64872002-04-07 Akim Demaille <akim@epita.fr>
6488
6489 * src/lalr.h (LA): Is a bitsetv, not bitset*.
6490
b0299a2e
AD
64912002-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
d7e1f00c
AD
64972002-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
cc9305dd
AD
65042002-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
b0940840
AD
65112002-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
643a5994
AD
65302002-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
b4c4ccc2
AD
65502002-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
bba97eb2
AD
65562002-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
c3b407f4
AD
65682002-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
11652ab3
AD
65812002-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
26b23c1a
AD
65872002-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
18bcecb0
AD
65932002-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
fa770c86
AD
65982002-04-07 Akim Demaille <akim@epita.fr>
6599
6600 * TODO: Update.
6601
d9b739c3
AD
66022002-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
99013900
AD
66072002-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
e966383b
PE
66142002-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
66222002-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.
c307773e 6628
8d6c48b9
PE
66292002-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
e53c6322
AD
66352002-03-20 Akim Demaille <akim@epita.fr>
6636
6637 * src/conflicts.c (log_resolution): Argument `resolution' is const.
6638
9ffbeca7
PE
66392002-03-19 Paul Eggert <eggert@twinsun.com>
6640
21db0b2a
PE
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
9ffbeca7
PE
6646 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
6647 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6648
642cb8f8
AD
66492002-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
3c31a486
AD
66602002-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
0d8bed56
AD
66672002-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
9208d17f
AD
66762002-03-14 Akim Demaille <akim@epita.fr>
6677
6678 Use Gettext 0.11.1.
6679
af27eacb
RA
66802002-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
9101a310
RA
66852002-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
fff9bf0b
RA
66912002-03-04 Robert Anisko <robert@lrde.epita.fr>
6692
6693 * src/reader.c: Warn about lacking semi-colons, do not complain.
6694
64dba31e
RA
66952002-03-04 Robert Anisko <robert@lrde.epita.fr>
6696
6697 * data/bison.c++: Remove a debug line.
6698
374f5a14
RA
66992002-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
bfcf1f3a
AD
67052002-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
65ccf9fc
AD
67142002-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
d0039cbc
AD
67232002-03-04 Akim Demaille <akim@epita.fr>
6724
6725 * src/output.c (output_skeleton): tempdir is const.
6726 bytes_read is unused.
6727
345cea78
AD
67282002-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
564801f7
AD
67352002-03-04 Akim Demaille <akim@epita.fr>
6736
6737 * src/closure.c (closure): `r' is unused.
6738
e5352bc7
AD
67392002-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
914feea9
AD
67452002-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
f0250de6
AD
67532002-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
ef017502
AD
67592002-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
76514394
AD
67662002-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
55024580
AD
67722002-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
f9abaa2c
AD
67782002-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
0e721e75
AD
67882002-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
0fb1ffb1
AD
67942002-03-04 Akim Demaille <akim@epita.fr>
6795
6796 * src/lalr.c (F): Now a bitset*.
6797 Adjust all dependencies.
6798
b86796bf
AD
67992002-03-04 Akim Demaille <akim@epita.fr>
6800
6801 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
6802 Adjust all dependencies.
6803
602bbf31
AD
68042002-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
d8a0245c
AD
68122002-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
34ba9743
AD
68192002-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
ed86e78c
AD
68242002-03-04 Akim Demaille <akim@epita.fr>
6825
6826 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
6827
dfdb1797
AD
68282002-03-04 Akim Demaille <akim@epita.fr>
6829
6830 * src/closure.c (ruleset): Be a bitset.
6831 (rulesetsize): Remove.
6832
7086e707
AD
68332002-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
98254360
RA
68402002-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
a75c057f
AD
68452002-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
06b00abc
AD
68502002-02-25 Akim Demaille <akim@epita.fr>
6851
6852 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
6853 translator friendly scheme for the bgr
6854 copyright notice.
06b00abc 6855
70e7d534
AD
68562002-02-25 Akim Demaille <akim@epita.fr>
6857
6858 * src/output.c (header_output): Remove, now handled completely via
6859 M4.
6860
abe017f6
AD
68612002-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
381fb12e
AD
68682002-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
6f38107f
PE
68812002-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
80cce3da
AD
68962002-02-14 Akim Demaille <akim@epita.fr>
6897
6898 * tests/regression.at (else): Adjust to Andreas' change.
6899
842e8679
AD
69002002-02-14 Akim Demaille <akim@epita.fr>
6901
6902 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
6903
4bda3f10
AD
69042002-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
4162fa07 69092002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 6910
4162fa07
RA
6911 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6912 (Copyright notice): Update.
b418ecd8 6913
bd16a5dc
AD
69142002-02-11 Akim Demaille <akim@epita.fr>
6915
6916 * tests/regression.at (%nonassoc and eof): Don't include
6917 nonportable headers.
6918
8d69a1a3
RA
69192002-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
9b2d0677
AD
69242002-02-07 Akim Demaille <akim@epita.fr>
6925
6926 * tests/input.at: New.
6927
69e2658b
RA
69282002-02-07 Robert Anisko <robert@lrde.epita.fr>
6929
6930 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 6931 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
6932 directives around tables only needed for debugging.
6933
4aacc3a7
RA
69342002-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
762a801e
RA
69402002-02-07 Robert Anisko <robert@lrde.epita.fr>
6941
6942 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6943
4bb2bc3f
RA
69442002-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
6b45a3ca
RA
69502002-02-06 Robert Anisko <robert@lrde.epita.fr>
6951
6952 * data/bison.c++: Fix m4 quoting in comments.
6953
50997c6e
RA
69542002-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
3f3eed27
AD
69592002-02-05 Akim Demaille <akim@epita.fr>
6960
6961 * data/bison.c++: Adjust to the M4 back end.
6962 More is certainly needed.
6963
be2a1a68
AD
69642002-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
beda758b
AD
70012002-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
5ece6d43
AD
70072002-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
5bb18f9a
AD
70122002-02-05 Akim Demaille <akim@epita.fr>
7013
7014 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
7015 * data/: here.
7016
894dd62e
PE
70172002-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
82841af7
AD
70232002-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
318b76e9
AD
70362002-01-27 Akim Demaille <akim@epita.fr>
7037
7038 * tests/sets.at (AT_EXTRACT_SETS): New.
7039 (Nullable): Use it.
7040 (Firsts): New.
7041
30d2f3d5
AD
70422002-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
30f8c395
AD
70482002-01-25 Akim Demaille <akim@epita.fr>
7049
7050 * tests/regression.at (%nonassoc and eof): New.
7051 Suggested by Robert Anisko.
7052
29ae55f1
AD
70532002-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
2b548aa6
RA
70632002-01-24 Robert Anisko <robert.anisko@epita.fr>
7064
7065 * src/Makefile.am: Add bison.c++.
7066 * src/bison.c++: New skeleton.
7067
bb0146c2
AD
70682002-01-21 Paolo Bonzini <bonzini@gnu.org>
7069
7070 * po/it.po: New.
7071
bec30531
AD
70722002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
7073
7074 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
7075
fc6edc45
MA
70762002-01-20 Marc Autret <marc@gnu.org>
7077
7078 * src/files.c (compute_output_file_names): Fix
7079
5e5d5415
MA
70802002-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
44ea3fbd
MA
70872002-01-20 Marc Autret <marc@gnu.org>
7088
bb0146c2 7089 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
7090 compilers as well (i.e. the vendor C compiler).
7091 Suggested by Albert Chin-A-Young.
7092
338963d1
TVH
70932002-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
c57b2479
AD
71002002-01-11 Akim Demaille <akim@epita.fr>
7101
7102 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 7103 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 7104
b85810ae
AD
71052002-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
cae60122
AD
71192002-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
ae404801
AD
71272002-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
22312b71
AD
71362002-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
a67cef01
TVH
71442002-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
2b25d624
AD
71522002-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
3460813b
AD
71602002-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
73784c64
AD
71672002-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
25d81090
AD
71742002-01-06 Akim Demaille <akim@epita.fr>
7175
7176 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
7177 skeleton.h.
7178
a9b8959e
PE
71792002-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
25d81090
AD
71852002-01-03 Akim Demaille <akim@epita.fr>
7186
7187 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
7188
1109455c
AD
71892002-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
7ea5e977
AD
71952002-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
fab5b110
AD
72042002-01-03 Akim Demaille <akim@epita.fr>
7205
7206 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
7207 for non system headers.
7208
aed7fd9b
AD
72092002-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
24fad99e
AD
72262001-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
a4b36db4
AD
72322001-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
1239777d
AD
72452001-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
9b3add5b
RA
72622001-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
fab5b110 7283 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
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
fab5b110 7295 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
7296 parse-skel.y.
7297
7298 * src/parse-skel.y: New file.
7299 * src/scan-skel.l: New file.
7300
b5b61c61
AD
73012001-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
8c9a50be
AD
73152001-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
d99361e6
AD
73212001-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
b9cecb91
AD
73282001-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
aea13e97
AD
73372001-12-29 Akim Demaille <akim@epita.fr>
7338
7339 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
7340
931394cb
AD
73412001-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
704a47c4
AD
73462001-12-29 Akim Demaille <akim@epita.fr>
7347
7348 * doc/bison.texinfo: Formatting changes.
7349
091e20bb
AD
73502001-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
cce71710
AD
73592001-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
82c035a8
AD
73652001-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
8419d367
AD
73742001-12-29 Akim Demaille <akim@epita.fr>
7375
7376 Memory leak.
7377
7378 * src/reader.c (reader): Free grammar.
7379
375d5806
AD
73802001-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
f51cb8ff
AD
73882001-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
29e88316
AD
73962001-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
b9f71f19
AD
74022001-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
1a2b5d37
AD
74072001-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
1cca533e
AD
74142001-12-29 Akim Demaille <akim@epita.fr>
7415
7416 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
7417 ago.
7418
c03ae966
AD
74192001-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
5a670b1e
AD
74242001-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
ad949da9
AD
74292001-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
0e78e603
AD
74342001-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
213e640e
AD
74452001-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
e7b8bef1
AD
74512001-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
b68e7744
AD
74602001-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
78d5bae9
AD
74672001-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
ff442794
AD
74722001-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
610ab194
AD
74792001-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
29d29c8f
AD
74922001-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
7c6b64d0
AD
75012001-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
3d4daee3
AD
75082001-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
9e7f6bbd
AD
75202001-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
255ef638
AD
75302001-12-29 Akim Demaille <akim@epita.fr>
7531
7532 * src/output.c: Comment changes.
7533
0d8a7363
AD
75342001-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
3db472b9
AD
75432001-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
b365aa05
AD
75542001-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
30171f79
AD
75602001-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
75142d45
AD
75802001-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
b7c49edf
AD
75962001-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
ec2da99f
AD
76162001-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
8adfa272
AD
76252001-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
80dac38c
AD
76332001-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
2cec70b9
AD
76432001-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
13ca549a
AD
76522001-12-27 Akim Demaille <akim@epita.fr>
7653
7654 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
7655
5092aba5
AD
76562001-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
11e2beca
AD
76672001-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
dac3c910
AD
76722001-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
d0b0fefa
AD
76772001-12-27 Akim Demaille <akim@epita.fr>
7678
7679 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
7680 duplication.
7681
adc8c848
AD
76822001-12-27 Akim Demaille <akim@epita.fr>
7683
7684 * src/reader.c (packgram): Catch nitems overflows.
7685
14d293ac
AD
76862001-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
f499b062
AD
76962001-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
d945f5cd
AD
77242001-12-27 Akim Demaille <akim@epita.fr>
7725
7726 * src/reader.c (symbol_list_new): Be sure to initialize all the
7727 fields.
7728
d200e455
AD
77292001-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
f9507c28
AD
77382001-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
065fbd27
AD
77442001-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
1b177bd7
AD
77622001-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
7742ddeb
AD
77692001-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
1fa14068
AD
77772001-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
b9752825
AD
77842001-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
776209d6
AD
77942001-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
275fc3ad
AD
78022001-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
897668ee
MA
78112001-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
ab3399e0
PE
78172001-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
3877f72b
AD
78252001-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.
776209d6 7833
331dbc1b
AD
78342001-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.
776209d6 7840
be750e4c
AD
78412001-12-17 Akim Demaille <akim@epita.fr>
7842
7843 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 7844
709ae8c6
AD
78452001-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.
776209d6 7850
f87685c3
AD
78512001-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
837491d8
AD
78592001-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
796d61fb
AD
78652001-12-17 Akim Demaille <akim@epita.fr>
7866
7867 * src/output.c: Various formatting changes.
776209d6 7868
64d15509
AD
78692001-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
fbc8ecb7
MA
78772001-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
f0440388
MA
78822001-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.
776209d6 7887 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
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
a79986b8
MA
78942001-12-15 Marc Autret <autret_m@epita.fr>
7895
7896 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
7897
4ec8e00f
MA
78982001-12-15 Marc Autret <autret_m@epita.fr>
7899
7900 * src/output.c (output_gram): Keep track of the hairy one.
7901
1a4648ff
AD
79022001-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
9c2c67e6
AD
79092001-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
93ede233
AD
79162001-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
2666f928
AD
79352001-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
428046f8
AD
79452001-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
ea52d706
AD
79502001-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
3f96f4dc
AD
79622001-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
51576fb3
AD
79782001-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.
dee049eb 7982 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 7983
2648a72d
AD
79842001-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
92790e5b
AD
79902001-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
927c1557
PE
79982001-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
ed8e1f68
AD
80072001-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
cb581495
AD
80292001-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
2e729273
AD
80342001-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
107f7dfb
AD
80482001-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
9b53a24f
AD
80542001-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
dbfb6dcd
AD
80592001-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
c25fb648
MA
80672001-12-11 Marc Autret <autret_m@epita.fr>
8068
8069 * src/output.c (output_parser): Remove useless muscle.
8070
710ddc4f
MA
80712001-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
e83d80b8
MA
80782001-12-10 Marc Autret <autret_m@epita.fr>
8079
927c1557 8080 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
8081 replace precedent remove.
8082 * src/bison.simple: Remove #line before %%prologue because
8083 %%input-line is wrong at this time.
8084
971d5158
MA
80852001-12-10 Marc Autret <autret_m@epita.fr>
8086
8087 * src/reader.c (symbols_output): Clean up.
927c1557 8088 * src/output.c (output_gram, output): Clean up.
971d5158 8089
5edafffd
AD
80902001-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
0279f8e9
AD
80962001-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
190c4f5f
AD
81022001-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
2a73b93d
AD
81152001-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
74392f6a
AD
81222001-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
37c82725
AD
81292001-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
6a164e0c
AD
81342001-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
7215de24
AD
81422001-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
80e25d4d
AD
81482001-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
0ab3728b
AD
81552001-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
78af9bbc
AD
81672001-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
bdef2a41
AD
81772001-12-10 Akim Demaille <akim@epita.fr>
8178
8179 * src/muscle_tab.c (muscle_init): NULL is a better default than
8180 `"0"'.
8181
3735969c
AD
81822001-12-10 Akim Demaille <akim@epita.fr>
8183
8184 * src/reader.c (reader): Calling symbols_output once is enough.
8185
49701457
AD
81862001-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
0edad749
AD
82032001-12-10 Akim Demaille <akim@epita.fr>
8204
8205 * src/options.c (OPTN, DRTV, BOTH): New.
8206 (option_table): Use them.
8207
0edad749
AD
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
5449dd0f
AD
82132001-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
a870c567
AD
82182001-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
80df8768
AD
82302001-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
f693ad14
AD
82372001-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
74ffbcb6
AD
82532001-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
07708e19
AD
82642001-12-05 Akim Demaille <akim@epita.fr>
8265
8266 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
8267 its argument.
ba1ecc07 8268 Reported by Peter Hamorsky.
07708e19 8269
92b16366
AD
82702001-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
076ab033
AD
82782001-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
3843c413
AD
82872001-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
43168960
AD
82922001-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
b2872512
AD
83022001-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
23cbcc6c
AD
83082001-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
03ec521c
AD
83132001-12-05 Akim Demaille <akim@epita.fr>
8314
8315 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
8316 indexed by nonterminals.
8317
3a7456dd
AD
83182001-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
1cbcf2e7
AD
83242001-12-05 Akim Demaille <akim@epita.fr>
8325
8326 * src/closure.c (set_fderives): De-obfuscate.
8327
84182270
AD
83282001-12-05 Akim Demaille <akim@epita.fr>
8329
8330 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
8331
3f6f053c
AD
83322001-12-05 Akim Demaille <akim@epita.fr>
8333
8334 * src/closure.c (set_firsts): De-obfuscate.
8335
7a5350ba
AD
83362001-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
d954473d
AD
83422001-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
9839bbe5
AD
83522001-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
9f136c07
AD
83592001-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
b608206e
AD
83652001-12-05 Akim Demaille <akim@epita.fr>
8366
8367 * src/state.h (SHIFT_SYMBOL): New.
8368 * src/conflicts.c: Use it to deobfuscate.
8369
52afa962
AD
83702001-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
e74dc321
AD
83762001-12-05 Akim Demaille <akim@epita.fr>
8377
8378 * src/conflicts.c (print_reductions): Arrays, not pointers.
8379 Use BITISSET.
8380
768fca83
AD
83812001-12-05 Akim Demaille <akim@epita.fr>
8382
8383 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8384
a17e599f
AD
83852001-12-05 Akim Demaille <akim@epita.fr>
8386
8387 * src/conflicts.c (print_reductions): Improve variable locality.
8388
a04bc341
AD
83892001-12-05 Akim Demaille <akim@epita.fr>
8390
8391 * src/conflicts.c (print_reductions): Pessimize, but clarify.
8392
c8ea038e
AD
83932001-12-05 Akim Demaille <akim@epita.fr>
8394
8395 * src/conflicts.c (print_reductions): Improve variable locality.
8396
aa2aab3c
AD
83972001-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
b178c8cc
AD
84022001-12-05 Akim Demaille <akim@epita.fr>
8403
8404 * src/LR0.c (augment_automaton): Formatting changes.
8405 Better variable locality.
8406
f67d13aa
AD
84072001-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
c2713865
AD
84132001-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
9887c18a
AD
84192001-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
4d4f699c
AD
84292001-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
80a69750
AD
84342001-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
fe961097
AD
84412001-12-05 Akim Demaille <akim@epita.fr>
8442
8443 * src/lalr.c (traverse): Use arrays instead of pointers.
8444
e3e4e814
AD
84452001-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
630e182b
AD
84512001-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
81b51460
AD
84732001-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
3067fbef
AD
84792001-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
c2bea5f9
PE
84882001-12-04 Paul Eggert <eggert@twinsun.com>
8489
7d27c823
PE
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.
c2bea5f9
PE
8495 (yystpcpy): Use prototype if __STDC__ is defined, not just
8496 if __cplusplus is defined.
35687a9d 8497
2c8a9dfa
AD
84982001-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
f4e421e6
AD
85082001-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
7093d0f5
AD
85192001-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
fd51e5ff
AD
85562001-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
7d13ff5f
AD
85622001-11-30 Akim Demaille <akim@epita.fr>
8563
8564 * tests/reduce.at (Useless Nonterminals): Fix.
8565
892a3995
AD
85662001-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
68f1e3ed
AD
85712001-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
d2d1b42b
AD
85832001-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
760b53a8
AD
85902001-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
00238958
AD
85972001-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
396452de
PE
86042001-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
147e184c
MA
86232001-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
426cf563
MA
86292001-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
c7925b99
MA
86362001-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
5b5d1929
MA
86542001-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
8850be4b
MA
86612001-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
4a38e613
AD
86662001-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
4b35e1c1
AD
86712001-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
d2b04478
AD
86762001-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
2c4c30aa
AD
86812001-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
576890b7
AD
86872001-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
cb487d7d
AD
86922001-11-28 Akim Demaille <akim@epita.fr>
8693
8694 * src/reduce.c (reduce_print): Use ngettext.
8695 (dump_grammar): Improve the trace accuracy.
8696
6013d43f
AD
86972001-11-28 Akim Demaille <akim@epita.fr>
8698
8699 * src/reduce.c (dump_grammar): Don't translate trace messages.
8700
cb4956ee
AD
87012001-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
648185ab
PE
87082001-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
68254a03
MA
87132001-11-27 Marc Autret <autret_m@epita.fr>
8714
9113b58f
AD
8715 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
8716 initialization.
68254a03
MA
8717 * src/output.c (prepare): Remove its update.
8718
04d843a2
MA
87192001-11-27 Marc Autret <autret_m@epita.fr>
8720
8721 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
8722 Use %error-verbose.
8723
d2079671 87242001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
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
e0327bc8
AD
87372001-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
000f1a3c
AD
87422001-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
26cfe0be
AD
87472001-11-27 Akim Demaille <akim@epita.fr>
8748
8749 * src/files.c: Include error.h.
8750 Reported by Hans Aberg.
8751
f6bd5427
MA
87522001-11-26 Marc Autret <autret_m@epita.fr>
8753
d2079671 8754 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
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
2ca209c1
AD
87632001-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
0e41b407
AD
87702001-11-26 Akim Demaille <akim@epita.fr>
8771
8772 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
8773 size_ts.
8774
87752001-11-26 Akim Demaille <akim@epita.fr>
8776
8777 * src/complain.c, src/complain.h (error): Remove, provided by
8778 lib/error.[ch].
8779
e0c40012
AD
87802001-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
5e147124
AD
87872001-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
a034c8b8
AD
87922001-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
c64a20f3
AD
87992001-11-23 Akim Demaille <akim@epita.fr>
8800
8801 * lib/alloca.c: Update, from fileutils.
8802
5b0d29bb
AD
88032001-11-23 Akim Demaille <akim@epita.fr>
8804
8805 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
8806
722c4bfe
AD
88072001-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
6255b435
AD
88122001-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
b29b2ed5
AD
88202001-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
a81b1d4a
MA
88352001-11-22 Marc Autret <autret_m@epita.fr>
8836
8837 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
8838
c1ecb3c1
MA
88392001-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
fbe01355
AD
88452001-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
81e895c0
AD
88522001-11-19 Akim Demaille <akim@epita.fr>
8853
8854 * src/conflicts.c (conflicts_print): Add a missing \n.
8855
6bb1878b
AD
88562001-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
d9ec2d07
AD
88622001-11-19 Akim Demaille <akim@epita.fr>
8863
8864 * src/print.c (print_actions): Better locality of variables.
8865
720e5c1b
AD
88662001-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
fb908786
AD
88712001-11-19 Akim Demaille <akim@epita.fr>
8872
8873 * src/closure.c (itemsetend): Remove, replaced with...
8874 (itemsetsize): new.
8875
125ecb56
AD
88762001-11-19 Akim Demaille <akim@epita.fr>
8877
8878 * src/LR0.c (kernel_end): Remove, replaced with...
8879 (kernel_size): new.
8880
d8cf039f
AD
88812001-11-19 Akim Demaille <akim@epita.fr>
8882
8883 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
8884 to clarify.
8885
7bec0760
AD
88862001-11-19 Akim Demaille <akim@epita.fr>
8887
8888 * src/closure.c (closure): Use arrays instead of pointers to clarify.
8889
c87d4863
AD
88902001-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
9bfe901c
AD
88972001-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
97db7bd4
AD
89062001-11-19 Akim Demaille <akim@epita.fr>
8907
cc72668c 8908 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
8909 pointers to clarify the code.
8910 (save_reductions, save_shifts): Factor common parts of alternatives.
8911
2c5f66ed
AD
89122001-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
300f275f
AD
89242001-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
f59c437a
AD
89312001-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
6986fd9e
AD
89382001-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
4bc30f78
AD
89432001-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
08a946e0
AD
89482001-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,
9bfe901c 8956 and ask for its output.
08a946e0 8957
f0473484
AD
89582001-11-19 Akim Demaille <akim@epita.fr>
8959
cc72668c
AD
8960 * src/bison.simple (yyparse): When verbosely reporting an error,
8961 no longer put additional quotes around token names.
f0473484
AD
8962 * tests/calc.at: Adjust.
8963
e41dc700
AD
89642001-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
652a871c
AD
89702001-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
b2ed6e58
AD
89762001-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
edad7067
AD
89852001-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
3feec034
AD
89912001-11-19 Akim Demaille <akim@epita.fr>
8992
8993 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8994 (maxrhs): this new function.
8995
ddcd5fdf
AD
89962001-11-19 Akim Demaille <akim@epita.fr>
8997
cc72668c 8998 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
8999 Adjust.
9000
bb527fc2
AD
90012001-11-19 Akim Demaille <akim@epita.fr>
9002
cc72668c 9003 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
9004 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9005 * src/lalr.c: Adjust.
9006
a845a697
AD
90072001-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
f004bf6a
AD
90122001-11-19 Akim Demaille <akim@epita.fr>
9013
cc72668c
AD
9014 * src/lalr.h (lookaheads): Removed array, whose contents is now
9015 a member of...
f004bf6a
AD
9016 (state_t): this structure.
9017 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9018 Adjust.
9019
de326cc0
AD
90202001-11-19 Akim Demaille <akim@epita.fr>
9021
cc72668c
AD
9022 * src/lalr.h (consistent): Removed array, whose contents is now
9023 a member of...
de326cc0
AD
9024 (state_t): this structure.
9025 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9026 Adjust.
9027
90b4416b
AD
90282001-11-19 Akim Demaille <akim@epita.fr>
9029
cc72668c
AD
9030 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
9031 contents are now members of...
90b4416b
AD
9032 (state_t): this structure.
9033 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9034 Adjust.
9035
9703cc49
AD
90362001-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
d803322e
AD
90462001-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
3d76b07d
AD
90592001-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
09b503c8
AD
90662001-11-14 Akim Demaille <akim@epita.fr>
9067
9068 * src/print.c: Include reduce.h.
9069 Reported by Hans Aberg.
9070
90712001-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
0f37a994
AD
90832001-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
d39d93b8
AD
90902001-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
9edcd895
AD
90952001-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
7da99ede
AD
91062001-11-12 Akim Demaille <akim@epita.fr>
9107
e3aa65c5 9108 %expect was not functioning at all.
7da99ede
AD
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
ba9dda1a
AD
91182001-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
337c5bd1
AD
91242001-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
c73a41af
AD
91362001-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
0df87bb6
AD
91422001-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.
0f37a994 9152 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
9153 * tests/regression.at (Conflicts): New.
9154 Reported by Tom Lane.
9155
e4d3d4de
AD
91562001-11-12 Akim Demaille <akim@epita.fr>
9157
9158 * tests/regression.at (Invalid input): Remove, duplicate with
9159 ``Invalid input: 1''.
9160
6d7d248e
AD
91612001-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
e9e4c321
AD
91672001-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.
0f37a994 9171 Reported by Per Allansson.
e9e4c321 9172
5f7e0832
AD
91732001-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
e3f1699f
AD
91832001-11-05 Akim Demaille <akim@epita.fr>
9184
9185 * src/reader.c (symbols_output): New, extracted from...
9186 (packsymbols): here.
9187 (reader): Adjust.
9188
65be0866
AD
91892001-11-05 Akim Demaille <akim@epita.fr>
9190
9191 * src/lex.c (parse_percent_token): s/quotearg/quote/.
9192
e4d910bf
AD
91932001-11-05 Akim Demaille <akim@epita.fr>
9194
9195 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
9196 pattern.
9197
951366c1
AD
91982001-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
d8988b2f
AD
92122001-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
6468d18e
AD
92262001-11-02 Akim Demaille <akim@epita.fr>
9227
9228 * doc/refcard.tex: Update.
9229
6b7e85b9
AD
92302001-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
cd5aafcf
AD
92432001-11-02 Akim Demaille <akim@epita.fr>
9244
9245 * tests/regression.at (Mixing %token styles): New test.
9246
037ca2f1
AD
92472001-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
270a173c
AD
92542001-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
561f9a30
AD
92622001-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
f987e9d2
AD
92702001-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
0846f581
PB
92762001-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
3c1a79b3
AD
92832001-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
5d52e7d0
MA
92912001-10-14 Marc Autret <autret_m@epita.fr>
9292
9293 * src/options.c (create_long_option_table): Fix.
9294
631aa1d3
AD
92952001-10-10 Akim Demaille <akim@epita.fr>
9296
9297 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
9298
f6ec6d13
AD
92992001-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
342b8b6e
AD
93042001-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
1c8c2190
PB
97522001-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
180d45ba
PB
97592001-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
c51d1a19
PB
97702001-09-23 Pascal Bart <pascal.bart@epita.fr>
9771
9772 * src/bison.simple: Add new `#line' directive.
9773
6f9344da
PB
97742001-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
652def80
MA
97792001-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
25b222fa
MA
97842001-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
6bc35ae5
MA
97922001-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
c0629aa1
PB
97972001-09-20 Pascal Bart <pascal.bart@epita.fr>
9798
9799 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 9800
82b6d266
PB
98012001-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
75f5aaea
MA
98262001-09-20 Marc Autret <autret_m@epita.fr>
9827
9828 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
9829 sections of Bison.
9830
f508cb0a
PB
98312001-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
13105fc1
PB
98372001-09-18 Pascal Bart <pascal.bart@epita.fr>
9838
9839 * src/output.c (output_parser): Delete unused variable actions_dumped.
9840
b0c4483e
PB
98412001-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.
342b8b6e 9846
11d82f03
MA
98472001-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.
342b8b6e 9856
11d82f03 9857 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 9858
11d82f03
MA
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.
342b8b6e 9870
11d82f03
MA
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
93a37297
MA
98822001-09-02 Marc Autret <autret_m@epita.fr>
9883
f753cd62 9884 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 9885
f753cd62
MA
9886 * src/muscle_tab.c, src/muscle_tab.h: Add files.
9887
98882001-09-02 Marc Autret <autret_m@epita.fr>
9889
9890 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 9891
682d48cd
PB
98922001-09-01 Pascal Bart <pascal.bart@epita.fr>
9893
342b8b6e 9894 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
9895 filename.
9896
087c8fda
MA
98972001-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
dda680cb
PB
99022001-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
9e644e64
MA
99092001-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
17da6427
PB
99142001-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'.
342b8b6e 9920 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
9921 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9922 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 9923 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
9924 name_prefix.
9925
e8cb70b9
PB
99262001-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
63c2d5de
MA
99322001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9933
342b8b6e 9934 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
9935 %%epilogue.
9936 * src/output.c (output): Rename %%declarations to %%prologue.
9937 * src/bison.simple: Echo modifications.
342b8b6e 9938
d8cb5183
MA
99392001-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
6c686258
PB
99472001-08-31 Pascal Bart <pascal.bart@epita.fr>
9948
342b8b6e 9949 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
9950 output_trailers and output_headers.
9951 * src/output.h: Remove obsolete functions prototypes of output_headers
9952 and output_trailers.
9953
8f451ef7
PB
99542001-08-30 Pascal Bart <pascal.bart@epita.fr>
9955
9956 * src/main.c: Include macrotab.h.
342b8b6e 9957 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
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
997b6fd0 99672001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
9968
9969 * src/reader.c (parse_skel_decl): New.
342b8b6e 9970 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
9971 * src/lex.h (token_t): New token `tok_skel'.
9972 * src/lex.c (percent_table): Add skeleton option entry.
9973 Standardize.
9974
ff48177d
MA
99752001-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
b33160bf
MA
99832001-08-28 Marc Autret <autret_m@epita.fr>
9984
9985 * src/output.c (output_actions): Clean up.
4e5caae2 9986 (output_gram): CPP-out useless code.
b33160bf
MA
9987 * src/reader.c (reader): Clean up, CPP-out useless code.
9988
d1a2daf7
PB
99892001-08-28 Pascal Bart <pascal.bart@epita.fr>
9990
342b8b6e 9991 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 9992 directive.
d1a2daf7
PB
9993 * src/bison.simple: Add `%%definitions'.
9994
2b763dfe
MA
99952001-08-28 Marc Autret <autret_m@epita.fr>
9996
9997 * config/depcomp: New file.
9998
f1a87ef6
PE
99992001-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
82e236e2
RA
100052001-08-27 Robert Anisko <robert.anisko@epita.fr>
10006
f1a87ef6 10007 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
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
b0cfa28a
RA
100172001-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
6fc74234
AD
100222001-08-27 Akim Demaille <akim@epita.fr>
10023
10024 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
10025
9c76d118
RA
100262001-08-25 Robert Anisko <robert.anisko@epita.fr>
10027
10028 * lib/Makefile.am: Adjust.
10029
a8289c62
RA
100302001-08-25 Robert Anisko <robert.anisko@epita.fr>
10031
10032 * src/bison.simple: Update and add '%%' directives.
10033
b6610515
RA
100342001-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.
6fc74234 10043
b6610515
RA
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.
6fc74234 10053 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
10054 rather than lex.
10055
26f609ff
RA
100562001-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.
6fc74234 10061
26f609ff
RA
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.
6fc74234 10071
26f609ff
RA
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'.
6fc74234 10082
26f609ff
RA
10083 * src/output.c (output_table_data): New function.
10084 (output_short_table): Remove.
10085 (output_short_or_char_table): Remove.
6fc74234 10086
26f609ff
RA
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
6f43b113
RA
100932001-08-25 Robert Anisko <robert.anisko@epita.fr>
10094
10095 * src/main.c (main): Initialize the macro table.
10096
dd3127cf
RA
100972001-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
aa321494
RA
101022001-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
68bd3b6b
RA
101082001-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
45f8dd1e
AD
101142001-08-15 Akim Demaille <akim@epita.fr>
10115
10116 Version 1.28c.
10117
40a64a7a 101182001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
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
f9a8293a
AD
101282001-08-15 Akim Demaille <akim@epita.fr>
10129
10130 * doc/bison.texinfo (Table of Symbols): Document
10131 YYSTACK_USE_ALLOCA.
10132
150ca7a7
AD
101332001-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
69b5cec4
AD
101392001-08-15 Akim Demaille <akim@epita.fr>
10140
10141 * Makefile.maint: Sync with CVS Autoconf.
10142
f2b5126e
PB
101432001-08-14 Pascal Bart <pascal.bart@epita.fr>
10144
69b5cec4 10145 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
10146 `fdl.texi'.
10147 * doc/fdl.texi: Add to package.
10148
4ecbf796
MA
101492001-08-14 Marc Autret <autret_m@epita.fr>
10150
10151 Turn on %{source,header}_extension features.
10152
69b5cec4 10153 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
10154 source_extension.
10155 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 10156 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
10157 between options.
10158
95fb5662
MA
101592001-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
78d09da9
MA
101652001-08-13 Marc Autret <autret_m@epita.fr>
10166
69b5cec4 10167 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
10168 defining it (defined but null disables alloca).
10169
5a009f2c
MA
101702001-08-13 Marc Autret <autret_m@epita.fr>
10171
10172 * src/bison.simple (_yy_memcpy): CPP reformat.
10173
1e41465a
PB
101742001-08-13 Pascal Bart <pascal.bart@epita.fr>
10175
10176 * tests/atconfig.in (CPPFLAGS): Fix.
10177
c67a198d
PB
101782001-08-10 Pascal Bart <pascal.bart@epita.fr>
10179
79282c6c 10180 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
10181 `gpl.texi'.
10182 * doc/gpl.texi: Add to package.
10183
09a6de7e
MA
101842001-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
b77b9ee0
AD
101892001-08-10 Akim Demaille <akim@epita.fr>
10190
10191 * src/system.h: Provide default declarations for stpcpy, strndup,
10192 and strnlen.
10193
3e259915
MA
101942001-08-10 Robert Anisko <anisko_r@epita.fr>
10195
10196 * doc/bison.texinfo (Locations): Update @$ stuff.
10197
ca96bc2d
MA
101982001-08-09 Robert Anisko <anisko_r@epita.fr>
10199
10200 * src/bison.simple (YYLLOC_DEFAULT): Update.
10201 (yyparse): Adjust.
10202
fdc6758b
MA
102032001-08-08 Marc Autret <autret_m@epita.fr>
10204
b77b9ee0 10205 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
10206 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
10207 Reported by Fabrice Bauzac.
957d4dbf 10208
600cad3b
MA
102092001-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.
b77b9ee0 10215 (node_output_size): New global variable. Simplify the formatting of
600cad3b 10216 the VCG graph output.
b77b9ee0 10217 (print_actions): Unused code is now used. It notifies the final state
600cad3b 10218 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 10219 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
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
976e528f
AD
102282001-08-07 Pascal Bart <pascal.bart@epita.fr>
10229
10230 * tests/atconfig.in (CPPFLAGS): Fix.
10231
20e8e5ca
AD
102322001-08-07 Akim Demaille <akim@epita.fr>
10233
10234 * src/print_graph.c (quote): New.
10235 (print_core): Use it.
10236
957d4dbf 102372001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 10238
3e3da797
AD
10239 * src/vcg.c (complain.h): Include it.
10240 Unepitaize `return' invocations.
c4b66126 10241 [NDEBUG] (main): Remove.
79282c6c 10242 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
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 ();
3e3da797 10249
957d4dbf 102502001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
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
927c1557 102692001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
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
7333d403
AD
102752001-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
84163231
AD
102922001-08-06 Marc Autret <autret_m@epita.fr>
10293
10294 * configure.in: Bump to 1.28c.
10295 * doc/bison.texinfo: Texinfo thingies.
10296
8303fc42
AD
102972001-08-04 Pascal Bart <pascal.bart@epita.fr>
10298
10299 * tests/atconfig.in (CPPFLAGS): Add.
10300 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
10301
70a84437
AD
103022001-08-03 Akim Demaille <akim@epita.fr>
10303
10304 Version 1.28b.
10305
2ce10144
AD
103062001-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
1e3e4bc1
AD
103122001-08-03 Akim Demaille <akim@epita.fr>
10313
10314 * configure.in: Try using -Wformat when compiling.
10315
42b45b7f
AD
103162001-08-03 Akim Demaille <akim@epita.fr>
10317
10318 * configure.in: Bump to 1.28b.
10319
8f13fe33
AD
103202001-08-03 Akim Demaille <akim@epita.fr>
10321
10322 * src/complain.c: Adjust strerror_r portability issues.
10323
b37ba92c
AD
103242001-08-03 Akim Demaille <akim@epita.fr>
10325
10326 Version 1.28a.
10327
b0ce6046
AD
103282001-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
d01c415b
AD
103362001-08-03 Akim Demaille <akim@epita.fr>
10337
10338 * src/reader.c (readgram): Display hidden chars in error messages.
10339
459dd1a6
AD
103402001-08-03 Akim Demaille <akim@epita.fr>
10341
10342 Update to gettext 0.10.39.
10343
53b74c0c
AD
103442001-08-03 Akim Demaille <akim@epita.fr>
10345
10346 * lib/strspn.c: New.
10347
234a3be3
AD
103482001-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
847bf1f5
AD
103662001-08-01 Robert Anisko <anisko_r@epita.fr>
10367
d995fee7 10368 * doc/bison.texi: Document @$.
847bf1f5
AD
10369 (Locations): New section.
10370
d074a105
AD
103712001-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
3419715d
AD
103772001-07-08 Pascal Bart <pascal.bart@epita.fr>
10378
10379 * src/bison.simple (yyparse): Suppress warning `comparaison
10380 between signed and unsigned'.
10381
62ab6972
AD
103822001-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
1e24cc5b
AD
103902001-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
32dfccf8
AD
103962001-03-16 Akim Demaille <akim@epita.fr>
10397
10398 * doc/bison.texinfo: ANSIfy the examples.
10399
cd5bd6ac
AD
104002001-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
5141b016
AD
104082001-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
447992b9
AD
104142001-03-16 Akim Demaille <akim@epita.fr>
10415
10416 * src/getargs.c (longopts): Clean up.
10417
274d42ce
AD
104182001-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
22c821f3
AD
104242001-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
18569462
AD
104302001-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
0d8f3c8a
AD
104402001-02-02 Akim Demaille <akim@epita.fr>
10441
10442 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 10443 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 10444
f17bcd1f
AD
104452001-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
511e79b3
AD
104552001-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
0d6508ef
AD
104642001-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
6deb4447
AD
104692001-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
ff4423cc
AD
104892000-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
956dba3a
AD
105012000-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
337bab46
AD
105062000-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
5d3214b8
AD
105122000-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
29092a57
AD
105182000-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
ea5607fd
AD
105242000-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
27110317
AD
105322000-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
19c50364
AD
105412000-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
573c1d9f
AD
105512000-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
ef7ddedd
AD
105602000-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
ff61dabd
AD
105672000-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
55b96341
AD
105822000-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
358c15b7
AD
105872000-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
7de3329e
AD
105922000-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
3abcd459
AD
105982000-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
2a91a95e
AD
106062000-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
14d3eb9b
AD
106122000-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
d7045ec6
AD
106192000-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
6fd54b73
AD
106312000-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
4c50eae6
AD
106382000-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
a35f64ea
AD
106432000-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
7de23534
AD
106502000-11-17 Akim Demaille <akim@epita.fr>
10651
10652 * acconfig.h: Remove, no longer used.
10653
aa7815f5
AD
106542000-11-07 Akim Demaille <akim@epita.fr>
10655
10656 * src: s/Copyright (C)/Copyright/g.
10657
5af1f549
AD
106582000-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
553e2b22
AD
106642000-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
8a4f41d6
AD
106692000-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
095a3fb5
AD
106822000-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
d1cdce7c
AD
106882000-11-03 Akim Demaille <akim@epita.fr>
10689
090c5ebf 10690 For some reason, this was not applied.
d1cdce7c
AD
10691
10692 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
10693 `unlink': it's no longer used.
10694
9311529b
AD
106952000-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
d8880f69
AD
107002000-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
0dbb648e
AD
107122000-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
896fe5c1
AD
107182000-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.
1f65350a 10731 * po/POTFILES.in: Adjust.
896fe5c1 10732
dd60faec
AD
107332000-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
8c7ebe49
AD
107432000-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
77aee789
AD
107532000-10-20 Akim Demaille <akim@epita.fr>
10754
10755 * lib/quote.h (PARAMS): New macro. Use it.
10756
43591cec
AD
107572000-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
1e9798d5
AD
107632000-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
f282676b
AD
107742000-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
550a72a3
AD
107802000-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
131e2fef
AD
107882000-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
79282c5a
AD
107932000-10-16 Akim Demaille <akim@epita.fr>
10794
10795 * src/reader.c (copy_dollar): New function.
10796 (copy_guard, copy_action): Use it.
10797
ff4a34be
AD
107982000-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
108062000-10-04 Akim Demaille <akim@epita.fr>
10807
10808 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
10809
14ded682
AD
108102000-10-04 Akim Demaille <akim@epita.fr>
10811
10812 * doc/bison.texinfo: Various typos spotted by Neil Booth.
10813
8e03724b
AD
108142000-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
a9e64249
AD
108252000-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
da9abf43
AD
108312000-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
c33638bb
AD
108372000-10-02 Akim Demaille <akim@epita.fr>
10838
10839 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
10840 options.
10841
444c570a
AD
108422000-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
89cab50d
AD
108472000-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
d6c2cba0
AD
108702000-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
5a35a6cb
AD
108832000-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
71da9eea
AD
109152000-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
95e36146
AD
109272000-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
d7020c20
AD
109352000-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
1916f98e
AD
109482000-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
d7913476
AD
109542000-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
340ef489
AD
109722000-10-02 Akim Demaille <akim@epita.fr>
10973
10974 Various anti-`extern in *.c' changes.
10975
10976 * src/system.h: Include `assert.h'.
10977
b2ca4022
AD
109782000-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
403b315b
AD
109902000-10-02 Akim Demaille <akim@epita.fr>
10991
10992 * src/LR0.h: New file.
10993 Propagate its use.
10994
07a58c13
AD
109952000-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
0619caf0
AD
110042000-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
3519ec76
AD
110132000-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
015acc48
AD
110192000-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
8963a27b
AD
110272000-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
a70083a3
AD
110362000-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
abadc117
AD
110442000-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
720d742f
AD
110522000-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
f2acea59
AD
110582000-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
d019d655
AD
110642000-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
6c89f1c1
AD
110812000-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
d9efd181
AD
110902000-09-21 Akim Demaille <akim@epita.fr>
11091
11092 * src/atgeneral.m4: Update from Autoconf.
11093
c29240e7 110942000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
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
499daa50
AD
111072000-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
cc84fd5d
AD
111172000-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
db5b3a89
AD
111242000-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
ceed8467
AD
111322000-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
05a1d24b
AD
111492000-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
cbd25751
AD
111542000-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
13863333
AD
111602000-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
0d533154
AD
111662000-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
e79137ac
AD
111802000-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
27821bff
AD
111952000-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
cfe5fbc0
AD
112082000-03-31 Akim Demaille <akim@epita.fr>
11209
11210 * src/files.c (tryopen, tryclose): Move to the top.
11211 Be static.
11212
cb7db13e
AD
112132000-03-31 Akim Demaille <akim@epita.fr>
11214
11215 * src/main.c (main): Don't call `done', exit does it.
11216
a0f6b076
AD
112172000-03-31 Akim Demaille <akim@epita.fr>
11218
36281465
AD
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
112272000-03-31 Akim Demaille <akim@epita.fr>
11228
11229 Clean up the error reporting functions.
a0f6b076
AD
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
18539825
AD
112482000-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
9f306f2a
AD
112642000-03-28 Akim Demaille <akim@epita.fr>
11265
11266 * src/getargs.c (usage): Refresh the help message.
11267
0ba347b6
AD
112682000-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
dbe7f271
AD
112742000-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
75bbe78d
AD
112792000-03-17 Akim Demaille <akim@epita.fr>
11280
11281 On syntax errors, report the token on which we choked.
11282
aa5fd0ee
AD
11283 * src/bison.s1 (yyparse): In the label yyerrlab, when
11284 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 11285
7b306f52
AD
112862000-03-17 Akim Demaille <akim@epita.fr>
11287
aa5fd0ee 11288 * src/reader.c (copy_at): New function.
7b306f52
AD
11289 (copy_guard): Use it.
11290 (copy_action): Use it.
11291
e87b5700
AD
112922000-03-17 Akim Demaille <akim@epita.fr>
11293
11294 Be kind to translators, save some useless translations.
11295
aa5fd0ee 11296 * src/main.c (banner): New function.
e87b5700
AD
11297 (fatal_banner): Use it.
11298 (warn_banner): Use it.
11299
ae3c3164
AD
113002000-03-17 Akim Demaille <akim@epita.fr>
11301
aa5fd0ee
AD
11302 * src/reader.c (copy_definition): Use copy_string and
11303 copy_comment. Removed now unused `match', `ended',
11304 `cplus_comment'.
ae3c3164
AD
11305 (copy_comment, copy_string): Moved, to be visible from
11306 copy_definition.
11307
4dc58e7c
AD
113082000-03-17 Akim Demaille <akim@epita.fr>
11309
aa5fd0ee
AD
11310 * src/reader.c (copy_string): Declare `static inline'. No
11311 problems with inline, since it is checked by configure.
4dc58e7c
AD
11312 (copy_comment): Likewise.
11313
0a6384c4
AD
113142000-03-17 Akim Demaille <akim@epita.fr>
11315
aa5fd0ee 11316 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 11317
3cef001a
AD
113182000-03-17 Akim Demaille <akim@epita.fr>
11319
aa5fd0ee 11320 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
11321 (copy_action): Use it. Removed now unused `match', `ended',
11322 `cplus_comment'.
11323 (copy_guard): Likewise.
11324
ca36d2ef
AD
113252000-03-17 Akim Demaille <akim@epita.fr>
11326
aa5fd0ee 11327 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
11328 (copy_action): Use it.
11329 (copy_guard): Likewise.
11330
6666f98f
AD
113312000-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
41aca2e0
AD
113512000-03-17 Akim Demaille <akim@epita.fr>
11352
aa5fd0ee
AD
11353 * src/bison.s1: Formatting and cosmetics changes.
11354 * src/reader.c: Likewise.
41aca2e0
AD
11355 Update the Copyright notice.
11356
dc08c1d5
AD
113572000-03-17 Akim Demaille <akim@epita.fr>
11358
aa5fd0ee
AD
11359 * src/bison.s1 (#line): All set to `#line' only, since the
11360 Makefile now handles them.
dc08c1d5 11361
9ee3c97b
AD
113622000-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
0de741ca
AD
113692000-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
bb10be54
AD
113762000-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
b07b484a
AD
113812000-03-16 Akim Demaille <akim@epita.fr>
11382
11383 * src/bison.s1: Properly indent CPP directives.
11384
361f60b3
AD
113852000-03-16 Akim Demaille <akim@epita.fr>
11386
11387 * src/bison.s1: Properly indent the `alloca' CPP section.
11388
8c44d3ec
AD
113892000-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
f95997e7
AD
114202000-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
114271999-12-13 Jesse Thilo <jthilo@gnu.org>
11428
11429 * src/files.c:
11430 OS/2 honors TMPDIR environment variable.
11431
114321999-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
114391999-12-13 Jesse Thilo <jthilo@gnu.org>
11440
11441 * configure.in, NEWS:
11442 Bison 1.29 released.
11443
114441999-10-27 Jesse Thilo <jthilo@gnu.org>
11445
11446 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
11447 Added reference card.
11448
114491999-07-26 Jesse Thilo <jthilo@gnu.org>
11450
11451 * po/ru.po: Added Russian translation.
11452
114531999-07-26 Jesse Thilo <jthilo@gnu.org>
11454
11455 * configure.in: Added Russian translation.
11456
114571999-07-06 Jesse Thilo <jthilo@gnu.org>
11458
11459 * configure.in, NEWS, README:
11460 Released version 1.28.
11461
114621999-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
114711999-06-14 Jesse Thilo <jthilo@gnu.org>
11472
11473 * po/POTFILES.in: Got rid of version.c.
11474
114751999-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
114811999-06-08 Jesse Thilo <jthilo@gnu.org>
11482
11483 * doc/bison.1:
11484 Dropped mention of `+' for long-named options.
11485
114861999-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
114931999-05-30 Jesse Thilo <jthilo@gnu.org>
11494
11495 * README: Added a FAQ list.
11496
11497 * configure.in, acconfig.h:
11498 I18n fixes.
11499
115001999-05-30 Jesse Thilo <jthilo@gnu.org>
11501
11502 * doc/FAQ, doc/Makefile.am:
11503 Added a FAQ list.
11504
115051999-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
115101999-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
115191999-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
115241999-04-18 Jesse Thilo <jthilo@gnu.org>
11525
11526 * doc/.cvsignore, doc/Makefile.am:
11527 Reorganized: sources in `src', documentation in `doc'.
11528
115291999-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
115371999-04-13 Jesse Thilo <jthilo@gnu.org>
11538
11539 * src/allocate.c:
11540 Don't declare calloc() and realloc() if not necessary.
11541
115421999-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
115471999-03-23 Jesse Thilo <jthilo@gnu.org>
11548
11549 * po/.cvsignore: Added i18n support.
11550
115511999-03-23 Jesse Thilo <jthilo@gnu.org>
11552
11553 * acconfig.h, configure.in, Makefile.am:
11554 Added i18n support.
11555
115561999-03-22 Jesse Thilo <jthilo@gnu.org>
11557
11558 * src/bison.s1: Fixed #line numbers.
11559
115601999-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
115651999-03-03 Jesse Thilo <jthilo@gnu.org>
11566
11567 * Makefile.am:
11568 Added support for non-ANSI compilers (ansi2knr).
11569
115701999-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
115771999-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
115821999-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
115871999-02-09 Jesse Thilo <jthilo@gnu.org>
11588
11589 * Makefile.am:
11590 Removed inappropriate use of $< macro.
11591
115921999-02-05 Jesse Thilo <jthilo@gnu.org>
11593
11594 * po/Makefile.in.in, po/POTFILES.in:
11595 Add `po' directory skeleton.
11596
115971999-01-27 Jesse Thilo <jthilo@gnu.org>
11598
11599 * README: Document help-bison list.
11600
11601 * configure.in: Add check for mkstemp().
11602
116031999-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
116121999-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
116181999-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
116231999-01-14 Jesse Thilo <jthilo@gnu.org>
11624
11625 * doc/bison.texinfo: Fix formatting glitch.
11626
11627 * doc/bison.texinfo: Update FSF address.
11628
116291999-01-14 Jesse Thilo <jthilo@gnu.org>
11630
11631 * acconfig.h: Update FSF address.
11632
116331999-01-08 Jesse Thilo <jthilo@gnu.org>
11634
11635 * src/system.h:
11636 Don't define PACKAGE here, since config.h defines it.
11637
116381998-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
116611998-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
116671998-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
116791998-12-29 Jesse Thilo <jthilo@gnu.org>
11680
11681 * src/version.c:
11682 Use VERSION symbol from automake for version number.
11683
116841998-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
116891998-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
116951998-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
117021998-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
117071998-11-26 Jesse Thilo <jthilo@gnu.org>
11708
11709 * doc/bison.1:
11710 Document the BISON_HAIRY and BISON_SIMPLE variables.
11711
117121998-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
117261998-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
117441998-11-25 Jesse Thilo <jthilo@gnu.org>
11745
11746 * doc/bison.texinfo: Clean up some formatting.
11747
117481998-05-05 Richard Stallman <rms@gnu.org>
11749
11750 * doc/bison.texinfo:
11751 Explain better why to make a pure parser.
11752
117531998-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
117601997-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
117671997-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
117741997-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
117821997-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
117911997-06-18 Richard Stallman <rms@gnu.org>
11792
11793 * Makefile.in: new.h renamed to alloc.h.
11794
117951997-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
118031997-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
118131997-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
118231997-04-23 Richard Stallman <rms@gnu.org>
11824
11825 * src/bison.s1:
11826 (alloca) [__hpux]: Always define as __builtin_alloca.
11827
118281997-04-23 Richard Stallman <rms@gnu.org>
11829
11830 * bison.simple:
11831 (alloca) [__hpux]: Always define as __builtin_alloca.
11832
118331997-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
118431997-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
118531997-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
118581997-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
118671997-01-02 Richard Stallman <rms@gnu.org>
11868
11869 * Makefile.in (dist):
11870 Explicitly check for symlinks, and copy them.
11871
118721996-12-19 Richard Stallman <rms@gnu.org>
11873
11874 * src/files.c:
11875 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
11876
118771996-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
118831996-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
118891996-12-17 Richard Stallman <rms@gnu.org>
11890
11891 * src/reduce.c (nbits): Add some casts.
11892
118931996-08-12 Richard Stallman <rms@gnu.org>
11894
11895 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
11896
118971996-08-12 Richard Stallman <rms@gnu.org>
11898
11899 * bison.simple: Test _MSDOS as well as _MSDOS_.
11900
119011996-07-31 Richard Stallman <rms@gnu.org>
11902
11903 * src/bison.s1:
11904 [__sun && __i386]: Include alloca.h.
11905
119061996-07-31 Richard Stallman <rms@gnu.org>
11907
11908 * bison.simple:
11909 [__sun && __i386]: Include alloca.h.
11910
119111996-07-30 Richard Stallman <rms@gnu.org>
11912
11913 * src/bison.s1: Comment change.
11914
11915 * src/bison.s1: Test _MSDOS_, not MSDOS.
11916
119171996-07-30 Richard Stallman <rms@gnu.org>
11918
11919 * bison.simple: Comment change.
11920
11921 * bison.simple: Test _MSDOS_, not MSDOS.
11922
119231996-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
119401996-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
119551996-05-12 Richard Stallman <rms@gnu.org>
11956
11957 * src/bison.s1:
11958 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11959
119601996-05-12 Richard Stallman <rms@gnu.org>
11961
11962 * bison.simple:
11963 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11964
119651996-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
119711996-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
119791996-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
119851995-12-29 Richard Stallman <rms@gnu.org>
11986
11987 * src/bison.s1:
11988 Fix line numbers in #line commands.
11989
119901995-12-29 Richard Stallman <rms@gnu.org>
11991
11992 * bison.simple:
11993 Fix line numbers in #line commands.
11994
119951995-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
120021995-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
120091995-11-29 Richard Stallman <rms@gnu.org>
12010
12011 * doc/bison.texinfo:
12012 Describe literal string tokens, %raw, %no_lines, %token_table.
12013
120141995-11-29 Daniel Hagerty <hag@gnu.org>
12015
12016 * doc/bison.texinfo: Fixed update date
12017
120181995-10-16 Richard Stallman <rms@gnu.org>
12019
12020 * src/version.c: Version 1.25.
12021
120221995-10-16 Richard Stallman <rms@gnu.org>
12023
12024 * NEWS: *** empty log message ***
12025
120261995-10-16 Richard Stallman <rms@gnu.org>
12027
12028 * doc/bison.1, doc/bison.rnh:
12029 Add new options.
12030
120311995-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
121181995-06-01 Jim Meyering <meyering@gnu.org>
12119
12120 * doc/bison.texinfo: *** empty log message ***
12121
121221995-05-06 Richard Stallman <rms@gnu.org>
12123
12124 * src/bison.s1: Comment change.
12125
121261995-05-06 Richard Stallman <rms@gnu.org>
12127
12128 * bison.simple: Comment change.
12129
121301995-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
121381995-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
121441995-05-03 Richard Stallman <rms@gnu.org>
12145
12146 * bison.simple: Change distribution terms.
12147
121481995-02-23 Richard Stallman <rms@gnu.org>
12149
12150 * src/files.c: Test __VMS_POSIX as well as VMS.
12151
121521995-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
121591995-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
121661994-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
121791994-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
121861994-09-28 David J. MacKenzie <djm@gnu.org>
12187
12188 * Makefile.in: Set datadir to $(prefix)/share.
12189
121901994-09-15 Richard Stallman <rms@gnu.org>
12191
12192 * src/bison.s1:
12193 Update copyright notice and GPL version.
12194
121951994-09-15 Richard Stallman <rms@gnu.org>
12196
12197 * bison.simple:
12198 Update copyright notice and GPL version.
12199
122001994-07-12 Richard Stallman <rms@gnu.org>
12201
12202 * src/reduce.c, src/reader.c:
12203 entered into RCS
12204
122051994-05-05 David J. MacKenzie <djm@gnu.org>
12206
12207 * Makefile.in: entered into RCS
12208
122091994-03-26 Richard Stallman <rms@gnu.org>
12210
12211 * src/bison.s1: entered into RCS
12212
122131994-03-26 Richard Stallman <rms@gnu.org>
12214
12215 * bison.simple: entered into RCS
12216
122171994-03-25 Richard Stallman <rms@gnu.org>
12218
12219 * src/main.c: entered into RCS
12220
122211994-03-24 Richard Stallman <rms@gnu.org>
12222
12223 * src/conflicts.c: entered into RCS
12224
122251994-01-02 Richard Stallman <rms@gnu.org>
12226
12227 * Makefile.in: *** empty log message ***
12228
122291993-11-21 Richard Stallman <rms@gnu.org>
12230
12231 * src/bison.s1: *** empty log message ***
12232
122331993-11-21 Richard Stallman <rms@gnu.org>
12234
12235 * doc/bison.texinfo: entered into RCS
12236
12237 * doc/bison.texinfo: *** empty log message ***
12238
122391993-11-21 Richard Stallman <rms@gnu.org>
12240
12241 * bison.simple: *** empty log message ***
12242
122431993-10-25 David J. MacKenzie <djm@gnu.org>
12244
12245 * doc/bison.texinfo: *** empty log message ***
12246
122471993-10-19 Richard Stallman <rms@gnu.org>
12248
12249 * src/bison.s1: *** empty log message ***
12250
122511993-10-19 Richard Stallman <rms@gnu.org>
12252
12253 * bison.simple: *** empty log message ***
12254
122551993-10-14 Richard Stallman <rms@gnu.org>
12256
12257 * src/bison.s1: *** empty log message ***
12258
122591993-10-14 Richard Stallman <rms@gnu.org>
12260
12261 * bison.simple: *** empty log message ***
12262
122631993-09-14 David J. MacKenzie <djm@gnu.org>
12264
12265 * doc/bison.texinfo: *** empty log message ***
12266
122671993-09-13 Noah Friedman <friedman@gnu.org>
12268
12269 * Makefile.in: *** empty log message ***
12270
122711993-09-10 Richard Stallman <rms@gnu.org>
12272
12273 * src/conflicts.c: *** empty log message ***
12274
12275 * src/system.h: entered into RCS
12276
122771993-09-10 Richard Stallman <rms@gnu.org>
12278
12279 * doc/bison.1: entered into RCS
12280
122811993-09-06 Noah Friedman <friedman@gnu.org>
12282
12283 * src/version.c: entered into RCS
12284
122851993-09-06 Noah Friedman <friedman@gnu.org>
12286
12287 * Makefile.in: *** empty log message ***
12288
122891993-07-30 David J. MacKenzie <djm@gnu.org>
12290
12291 * Makefile.in: *** empty log message ***
12292
122931993-07-24 Richard Stallman <rms@gnu.org>
12294
12295 * src/bison.s1: *** empty log message ***
12296
122971993-07-24 Richard Stallman <rms@gnu.org>
12298
12299 * bison.simple: *** empty log message ***
12300
123011993-07-08 David J. MacKenzie <djm@gnu.org>
12302
12303 * Makefile.in: *** empty log message ***
12304
123051993-07-04 Richard Stallman <rms@gnu.org>
12306
12307 * src/bison.s1: *** empty log message ***
12308
123091993-07-04 Richard Stallman <rms@gnu.org>
12310
12311 * bison.simple: *** empty log message ***
12312
123131993-06-26 David J. MacKenzie <djm@gnu.org>
12314
12315 * src/getargs.c: entered into RCS
12316
123171993-06-26 David J. MacKenzie <djm@gnu.org>
12318
12319 * doc/bison.texinfo: *** empty log message ***
12320
12321 * doc/bison.1: New file.
12322
123231993-06-25 Richard Stallman <rms@gnu.org>
12324
12325 * src/getargs.c: New file.
12326
123271993-06-16 Richard Stallman <rms@gnu.org>
12328
12329 * src/bison.s1: *** empty log message ***
12330
123311993-06-16 Richard Stallman <rms@gnu.org>
12332
12333 * bison.simple: *** empty log message ***
12334
123351993-06-03 Richard Stallman <rms@gnu.org>
12336
12337 * src/bison.s1: New file.
12338
123391993-06-03 Richard Stallman <rms@gnu.org>
12340
12341 * doc/bison.texinfo: *** empty log message ***
12342
123431993-06-03 Richard Stallman <rms@gnu.org>
12344
12345 * bison.simple: New file.
12346
123471993-05-19 Richard Stallman <rms@gnu.org>
12348
12349 * doc/bison.texinfo: New file.
12350
123511993-05-07 Noah Friedman <friedman@gnu.org>
12352
12353 * Makefile.in: *** empty log message ***
12354
123551993-04-28 Noah Friedman <friedman@gnu.org>
12356
12357 * src/reader.c: *** empty log message ***
12358
123591993-04-23 Noah Friedman <friedman@gnu.org>
12360
12361 * src/alloc.h: entered into RCS
12362
123631993-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
123821993-04-18 Noah Friedman <friedman@gnu.org>
12383
12384 * src/reader.c: New file.
12385
12386 * src/version.c: *** empty log message ***
12387
123881993-04-18 Noah Friedman <friedman@gnu.org>
12389
12390 * Makefile.in: *** empty log message ***
12391
123921993-04-17 Noah Friedman <friedman@gnu.org>
12393
12394 * Makefile.in: *** empty log message ***
12395
123961993-04-15 Richard Stallman <rms@gnu.org>
12397
12398 * src/main.c, src/files.c:
12399 New file.
12400
124011993-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
124091993-04-14 Richard Stallman <rms@gnu.org>
12410
12411 * Makefile.in: New file.
12412
124131993-04-13 Richard Stallman <rms@gnu.org>
12414
12415 * src/version.c: New file.
12416
124171993-03-25 Richard Stallman <rms@gnu.org>
12418
12419 * src/output.c: entered into RCS
12420
124211992-09-25 Richard Stallman <rms@gnu.org>
12422
12423 * configure.bat: entered into RCS
12424
124251992-06-22 Richard Stallman <rms@gnu.org>
12426
12427 * src/vmsgetargs.c: entered into RCS
12428
124291992-06-22 Richard Stallman <rms@gnu.org>
12430
12431 * doc/bison.rnh: entered into RCS
12432
124331992-04-20 David J. MacKenzie <djm@gnu.org>
12434
12435 * README: entered into RCS
12436
124371992-01-22 Richard Stallman <rms@gnu.org>
12438
12439 * src/machine.h: entered into RCS
12440
124411991-12-21 Richard Stallman <rms@gnu.org>
12442
12443 * src/lalr.c, src/closure.c:
12444 entered into RCS
12445
124461991-12-20 Richard Stallman <rms@gnu.org>
12447
12448 * src/state.h: entered into RCS
12449
124501991-12-18 Richard Stallman <rms@gnu.org>
12451
12452 * src/print.c, src/nullable.c, src/derives.c:
12453 entered into RCS
12454
124551991-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
124601988-09-09 Richard Stallman <rms@gnu.org>
12461
12462 * src/bison.hairy: entered into RCS
12463
124641987-12-16 Richard Stallman <rms@gnu.org>
12465
12466 * REFERENCES: entered into RCS
dc546b0f 12467
f294a2c2
AD
12468-----
12469
33167b8b 12470Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
dd0e0635 124711998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
f294a2c2 12472
33167b8b 12473This file is part of Bison, the GNU Compiler Compiler.
f294a2c2 12474
33167b8b 12475Bison is free software; you can redistribute it and/or modify
f294a2c2
AD
12476it under the terms of the GNU General Public License as published by
12477the Free Software Foundation; either version 2, or (at your option)
12478any later version.
12479
33167b8b 12480Bison is distributed in the hope that it will be useful,
f294a2c2
AD
12481but WITHOUT ANY WARRANTY; without even the implied warranty of
12482MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12483GNU General Public License for more details.
12484
12485You should have received a copy of the GNU General Public License
33167b8b 12486along with Bison; see the file COPYING. If not, write to
f294a2c2
AD
12487the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
12488Boston, MA 02111-1307, USA.