]> git.saurik.com Git - bison.git/blob - ChangeLog
* data/yacc.c (yytnamerr): Fix typo: local var should be of type
[bison.git] / ChangeLog
1 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
2
3 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4 YYSIZE_T, not size_t.
5 * tests/regression.at (Trivial grammars): New test, to catch
6 the error fixed by the above patch.
7
8 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
9
10 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
11 scheme.
12 Reported by Steve Murphy.
13
14 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
15
16 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
17 * data/glr.cc: b4_location_flag is now b4_locations_flag.
18
19 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
20
21 Implement --trace=m4.
22 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
23 * src/output.c (output_skeleton): When set, pass -dV to m4.
24
25 Factor the handling of flags in m4.
26 * src/output.c (prepare): Rename the muscle names debug, defines,
27 error_verbose to debug_flag, defines_flag, error_verbose_flag.
28 * data/c.m4: Adjust.
29 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
30 Use b4_define_flag_if to define other b4_FLAG_if macros.
31 (b4_location_if): As a consequence, rename as...
32 (b4_locations_if): this, for consistency.
33 Adjust all the skeletons.
34
35 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
36
37 * etc/bench.pm: Shorten bench names.
38
39 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
40
41 * src/output.h, src/output.c (error_verbose): Move to...
42 * src/getargs.h, src/getargs.c: here.
43 Sort the flags.
44 Adjust dependencies.
45
46 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
47
48 * data/c.m4 (b4_copyright): Put the special exception for Bison
49 skeletons here, so we don't have to put it in each skeleton. All
50 uses changed. Suggested by Akim Demaille. Also, wrap the
51 copyright notice, in case it is longer than 80 columns. Replace
52 comma by newline after title.
53
54 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
55
56 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
57 incompatibility, not a bug. Mention that it wasn't fixed as of
58 flex 2.5.33.
59
60 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
61
62 * examples/extexi: Enforce the precedence of concatenation over
63 >>.
64 Reported by Tommy Nordgren.
65
66 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
67
68 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
69 with the member "token".
70 Reported by Martin Nylin.
71
72 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
73
74 * data/glr.c: Switch to Bison 2.2 special-exception language in
75 the copyright notice. Use more-regular format for titles and
76 copyright notices.
77 * data/glr.cc: Likewise.
78 * data/location.cc: Likewise.
79 * data/yacc.cc: Likewise.
80 * doc/bison.texinfo (Conditions): Document this.
81 * NEWS: likewise. Upgrade version to 2.2.
82
83 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
84
85 * data/glr.cc: Remove dead code.
86
87 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
88
89 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
90 that variable and the line breaks the bootstrap. Problem reported
91 by Juan M. Guerrero.
92
93 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
94
95 * doc/bison.texinfo (Multiple start-symbols): New.
96
97 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
98
99 * etc/README, etc/bench.pl: New.
100
101 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
102
103 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
104 rule.
105 Reported by Mickael Labau.
106 * tests/input.at (Torturing the Scanner): Test it.
107
108 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
109
110 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
111 Problem reported by Bob Rossi.
112
113 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
114
115 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
116 and didn't really work.
117 For the index, use @ifnotinfo, not @iftex.
118 Minor cleanups of spacing and terminology.
119
120 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
121
122 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
123 of AT_NAME_PREFIX when %name-prefix is not used.
124
125 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
126
127 Apply --prefix to C++ skeletons too: they change the namespace.
128 The test suite already exercize these cases.
129 * data/c++.m4 (b4_namespace): New.
130 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
131 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
132 * data/yacc.c, data/glr.c: Remove a useless `[]'.
133 * doc/bison.texinfo: Document it.
134 (Option Cross Key): Use @multitable in all formats. It looks
135 nicer, even in TeX outputs.
136 (Rules): Use the same code whatever the output type is.
137 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
138 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
139 * tests/calc.at: Use it, instead of hard coding `yy'.
140
141 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
142
143 * TODO: Remove dead items.
144
145 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
146
147 * doc/FAQ: Remove, merged into...
148 * doc/bison.texinfo (FAQ): this.
149 * doc/Makefile.am (EXTRA_DIST): Adjust.
150
151 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
152
153 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
154 even if empty.
155 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
156 * doc/bison.texinfo (Calc++ Scanner): Use it.
157
158 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
159
160 Fix two nits reported by twlevo, plus one more that I discovered.
161
162 * src/assoc.h (assoc_to_string): Give a name to the arg, as
163 this is the usual Bison style.
164 * src/location.h (location_print): Likewise.
165
166 * src/reader.h (token_name): Likewise.
167
168 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
169
170 Fix some nits reported by twlevo.
171 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
172 and "POSIX". Use more-modern syntax for URLs. Mention C++
173 and ask for Java. Don't hardwire OS version numbers. Add
174 copyright notice.
175 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
176 * src/conflicts.c (solved_conflicts_obstack): Now static.
177
178 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
179
180 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
181 page. Say "you can use it" not "you may use it" as on the web page;
182 we're describing capabilities not granting permission.
183
184 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
185
186 * data/glr.c (yyresolveLocations): Rename local variables to avoid
187 shadowing warnings. Use usual patter for iterating through RHS.
188 * tests/glr-regression.at
189 (Uninitialized location when reporting ambiguity):
190 Modify yylex so that it uses its argument, rather than trying
191 to rely on ARGSUSED (which doesn't work for gcc with warnings).
192 const char -> char const.
193
194 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
195 Don't use tabs inside commands; it messes up 'ps'.
196 Problem reported by twlevo.
197
198 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
199
200 * tests/glr-regression.at (Uninitialized location when reporting
201 ambiguity): New test case.
202 * data/glr.c (yyresolveLocations): New function, which uses
203 YYLLOC_DEFAULT.
204 (yyresolveValue): Invoke yyresolveLocations before reporting an
205 ambiguity.
206 * doc/bison.texinfo (Default Action for Locations): Note
207 YYLLOC_DEFAULT's usage for ambiguity locations.
208 (GLR Semantic Actions): Cross-reference those notes.
209
210 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
211
212 * tests/glr-regression.at (Leaked semantic values when reporting
213 ambiguity): Remove unnecessary union and type declarations.
214 (Leaked lookahead after nondeterministic parse syntax error): New test
215 case.
216 * data/glr.c (yyparse): Check for zero stacks remaining before
217 attempting to shift the lookahead so that you don't lose it.
218
219 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
220
221 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
222 * tests/glr-regression.at (Leaked semantic values when reporting
223 ambiguity): New test case.
224 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
225 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
226 now unnecessary yystackp parameter.
227 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
228 destructors can be called.
229
230 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
231 in existing testcases.
232
233 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
234
235 Don't leak semantic values for parent RHS when a user action cuts the
236 parser, and clean up related code a bit.
237 * tests/glr-regression.at (Leaked merged semantic value if user action
238 cuts parse): Rename to...
239 (Leaked semantic values if user action cuts parse): ... this. Add check
240 for leaked parent RHS values.
241 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
242 between an unresolved state (non-empty chain of semantic options) and
243 an incomplete one (signaled by an empty chain).
244 (yyresolveStates): Document the interface. Move all manipulation of a
245 successfully or unsuccessfully resolved yyGLRState to...
246 (yyresolveValue): ... here so that yyresolveValue always leaves a
247 yyGLRState with consistent data and thus is easier to understand.
248 Remove the yyvalp and yylocp parameters since they are always just
249 taken from the yys parameter. When reporting a discarded merged value
250 in debugging output, note that it is incompletely merged. Document the
251 interface.
252 (yyresolveAction): If resolving any of the RHS states fails, destroy
253 them all rather than leaking them. Thus, as long as user actions are
254 written to clean up the RHS correctly, yyresolveAction always cleans up
255 the RHS of a semantic option. Document the interface.
256
257 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
258
259 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
260 led to a segmentation fault in GNU Pascal. Problem reported
261 by Waldek Hebisch.
262
263 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
264
265 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
266 mid-rule action inside a nonterminal symbol in order to declare a
267 destructor for its semantic value.
268
269 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
270
271 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
272 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
273 __cplusplus && ! defined _STDLIB_H && !
274 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
275 defined free))]: Include <stdlib.h> rather than rolling our own
276 declarations of malloc and free, to avoid problems with
277 incompatible declarations (using 'throw') C++'s stdlib.h. This
278 should fix Debian bug 340012
279 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
280 reported by Guillaume Melquiond.
281
282 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
283
284 * NEWS: Clarify symbols versus types in unused-value warnings.
285
286 * configure.ac (AC_INIT): Bump version number.
287
288 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
289
290 * NEWS: Version 2.1a.
291 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
292 since C99 requires this.
293
294 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
295
296 * m4/c-working.m4: New file.
297 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
298
299 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
300
301 * Makefile.maint: Merge from coreutils.
302
303 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
304
305 More portability fixes for problems summarized by Nelson H. F. Beebe.
306
307 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
308 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
309 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
310 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
311 messes up because C++ code is compiled in 32-bit mode but linked
312 in 64-bit mode.
313
314 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
315
316 More portability fixes for problems summarized by Nelson H. F. Beebe.
317
318 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
319 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
320
321 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
322 nodist_PROGRAMS, since we don't need to actually compile the
323 example if we're just doing a plain 'make'. This avoids bothering
324 the installer unnecessarily about problems due to weird C++
325 compilers.
326
327 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
328
329 More portability fixes for problems summarized by Nelson H. F. Beebe.
330
331 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
332 than #include "...", and compile with -I'.'. The old method was
333 not portable, according to Posix and the C standard, and it does
334 not work with Sun C 5.7, where previous #line directives affect
335 the working directory used in later #include "..." directives.
336
337 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
338
339 Various DJGGP specific issues in /djgpp
340
341 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
342
343 More portability fixes for problems summarized by Nelson H. F. Beebe.
344
345 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
346 '#include <map>' works and that you can apply ++ to iterators.
347
348 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
349
350 Work around portability problems summarized by Nelson H. F. Beebe in
351 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
352
353 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
354 that '#include <string>' works.
355
356 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
357 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
358 "warning: sorry: semantics of inline function static data `const
359 unsigned char translate_table[262]' are wrong (you'll wind up with
360 multiple copies)".
361
362 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
363 or, xor to not_, and_, or_, and xor_, respectively. This works
364 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
365 random system header somewhere that includes the equivalent of
366 <iso646.h>.
367
368 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
369 -E" works; it apparently doesn't work with PathScale EKO Compiler
370 Suite Version 2.0.
371
372 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
373
374 During deterministic GLR operation, user actions should be able to
375 influence the parse by changing yychar. To make this easier to fix and
376 to make glr.c easier to evolve in general, don't maintain yytoken in
377 parallel with yychar; just compute yytoken when needed.
378 * tests/glr-regression.at (Incorrect lookahead during deterministic
379 GLR): Check that setting yychar in a user action has the intended
380 effect.
381 * data/glr.c (yyGLRStack): Remove yytokenp member.
382 (yyclearin): Don't set *yytokenp.
383 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
384 yychar rather than *yytokenp to determine the current lookahead.
385 Compute yytoken locally when needed.
386 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
387 point to.
388
389 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
390 after `--report' documentation.
391
392 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
393
394 * src/parse-gram.y (grammar_declaration): Location of printer
395 symbol is @1, not list->location. Bug reported by twlevo.
396 * tests/input.at (Incompatible Aliases): Adjust to above change.
397
398 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
399
400 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
401 all the test at once. This makes the output easier to read in the
402 normal case.
403
404 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
405 got from <http://bro-ids.org/download.html>. The bug is that
406 when two actions appeared in succession, the second one was
407 scanned before the first one was added to the grammar rule
408 as a midrule action. Bison then output the incorrect warning
409 "parse.y:905.17-906.36: warning: unused value: $3".
410 * src/parse-gram.y (BRACED_CODE, action): These are no longer
411 associated with a value.
412 (rhs): Don't invoke grammar_current_rule_action_append.
413 (action): Invoke it here instead.
414 * src/reader.c (grammar_midrule_action): Now extern.
415 (grammar_current_rule_action_append): Don't invoke
416 grammar_midrule_action; that is now the scanner's job.
417 * src/reader.h (last_string, last_braced_code_loc):
418 (grammar_midrule_action): New decls.
419 * src/scan-gram.l (last_string): Now extern, sigh.
420 (last_braced_code_loc): New extern variable.
421 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
422 rule already has an action.
423 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
424 * tests/input.at (AT_CHECK_UNUSED_VALUES):
425 Add some tests to check that the above changes fixed the bug.
426
427 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
428
429 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
430 All used changed. Check whether the symbol has a destructor,
431 not whether it is typed.
432 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
433 that the values are still reported as unused. All line numbers
434 adjusted.
435
436 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
437
438 Work around a bug in bro 0.8, which underparenthesizes its
439 definition of YYLLOC_DEFAULT.
440 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
441 their arguments.
442 * data/lalr1.cc: Likewise.
443 * data/yacc.cc: Likewise.
444
445 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
446
447 Work around a bug in Pike 7.0, and give the Pike folks a
448 better way to override the usual int widths.
449 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
450 user can override the types.
451 (short): #undef, to work around a bug in Pike 7.0.
452 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
453 (union yyalloc.yyss): Use yytype_int16 rather than short.
454 All uses changed.
455 (yysigned_char): Remove.
456 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
457 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
458 * tests/regression.at (Web2c Actions): Adjust to above changes.
459
460 * src/reader.c (check_and_convert_grammar): New function.
461 (reader): Close the input file even if something went wrong during
462 parsing. Minor file descriptor leak reported by twlevo.
463
464 * src/assoc.c (assoc_to_string): Use a default: abort (); case
465 to pacify gcc -Wswitch-default.
466 * src/scan-gram.l (adjust_location): Use a default: break; case
467 to pacify gcc -Wswitch-default.
468 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
469 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
470 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
471 Move these decls to scan-skel.l, since they don't need to be
472 visible elsewhere.
473 * src/scan-skel.l: Accept the above decls.
474 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
475 is used.
476
477 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
478
479 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
480 since we don't want to insist on a version number at the start
481 of the changelog every time.
482 * Makefile.maint: Sync from coreutils a bit better.
483 (sc_trailing_blank): Renamed from sc_trailing_space.
484 All uses changed.
485 (sc_no_if_have_config_h, sc_require_config_h):
486 (sc_prohibit_assert_without_use): New rules.
487 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
488 (sc_dd_max_sym_length): Fix leading spaces in rule.
489 (sc_system_h_headers): Prefix with @.
490 (sc_useless_cpp_parens, m4-check): Output line numbers.
491 (changelog-check): Allow version only in head.
492 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
493 satisfy new Makefile.maint rule.
494 * data/glr.c: Likewise.
495 * data/glr.cc: Likewise.
496 * data/lalr1.cc: Likewise.
497 * data/yacc.c: Likewise.
498 * lib/ebitsetv.c: Likewise.
499 * lib/lbitset.c: Likewise.
500 * lib/subpipe.c: Likewise.
501 * lib/timevar.c: Likewise.
502 * src/system.h: Likewise.
503 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
504 * djgpp/Makefile.maint: Add copyright notice.
505 * djgpp/README.in: Likewise.
506 * djgpp/config.bat: Likewise.
507 * djgpp/config.site: Likewise.
508 * djgpp/config_h.sed: Likewise.
509 * djgpp/djunpack.bat: Likewise.
510 * djgpp/config.sed: Fix copyright notice to match standard format.
511 * djgpp/subpipe.h: Likewise.
512 * lib/bitsetv-print.c: Likewise.
513 * lib/bitsetv.c: Likewise.
514 * lib/subpipe.h: Likewise.
515 * lib/timevar.c: Likewise.
516 * lib/timevar.h: Likewise.
517 * djgpp/subpipe.c: Use standard recipe for config.h.
518 * lib/abitset.c: Likewise.
519 * lib/bitset.c: Likewise.
520 * lib/bitset_stats.c: Likewise.
521 * lib/bitsetv-print.c: Likewise.
522 * lib/bitsetv.c: Likewise.
523 * lib/ebitsetv.c: Likewise.
524 * lib/get-errno.c: Likewise.
525 * lib/lbitset.c: Likewise.
526 * lib/subpipe.c: Likewise.
527 * lib/timevar.c: Likewise.
528 * lib/vbitset.c: Likewise.
529 * tests/local.at: Likewise.
530 * src/scan-gram.l: Don't include verify.h, since system.h does
531 that for us.
532 * .x-sc_require_config_h: New file.
533 * .x-sc_unmarked_diagnostics: New file.
534
535 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
536
537 Be a bit more systematic about using 'abort'.
538 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
539 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
540 Put 'default: abort ();' before some other case, to satisfy older
541 pedantic compilers.
542 * lib/bitset_stats.c (bitset_stats_init): Likewise.
543 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
544 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
545 * src/conflicts.c (resolve_sr_conflict): Likewise.
546 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
547 (get_decision_str, get_orientation_str, get_node_alignment_str):
548 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
549 (get_linestyle_str, get_arrowstyle_str): Likewise.
550 * src/conflicts.c (resolve_sr_conflict):
551 Use a default case rather than one for the one remaining enum
552 value, to catch invalid enum values as well.
553 * src/lalr.c (set_goto_map, map_goto):
554 Prefer "assert (FOO);" to "if (!FOO) abort ();".
555 * src/nullable.c (nullable_compute, token_definitions_output):
556 Likewise.
557 * src/reader.c (packgram, reader): Likewise.
558 * src/state.c (transitions_to, state_new, state_reduction_find):
559 Likewise.
560 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
561 (symbol_pack): Likewise.
562 * src/tables.c (conflict_row, pack_vector): Likewise.
563 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
564 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
565 * src/system.h: Don't include <assert.h>.
566 (assert): New macro.
567
568 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
569 (Destructor Decl, Parser Function, Pure Calling):
570 Describe rules for braces inside C code more carefully.
571
572 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
573
574 Fix some porting glitches found by Nelson H. F. Beebe.
575 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
576 compilers that don't understand that abort () does not return.
577 * src/state.c (transitions_to): Likewise.
578 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
579 that '#include <cstdlib>' works.
580 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
581 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
582 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
583 for the benefit of some pre-C99 compilers.
584
585 * bootstrap: Undo changes to gnulib files that autoreconf made.
586
587 Minor fixups to get 'make maintainer-check' to work.
588 * configure.ac: Don't use -Wnested-externs, as it's incompatible
589 with the new verify.h implementation.
590 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
591 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
592 * data/yacc.c (YYUSE): Likewise.
593 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
594 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
595 * src/parse-gram.y (declaration): Don't pass a string constant
596 to a function that expects char *, since GCC might complain
597 about the constant value.
598 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
599 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
600 before #defining them.
601 * tests/glr-regression.at
602 (Incorrectly initialized location for empty right-hand side in GLR):
603 In yyerror, use the msg arg.
604 (Corrupted semantic options if user action cuts parse):
605 (Incorrect lookahead during deterministic GLR):
606 (Incorrect lookahead during nondeterministic GLR):
607 Don't name a local var 'index'; it shadows string.h's 'index'.
608
609 2006-01-19 Akim Demaille <akim@epita.fr>
610
611 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
612 location, not just parts of it.
613
614 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
615
616 * NEWS: Document the fact that multiple %unions are now allowed.
617 * doc/bison.texinfo (Union Decl): Likewise.
618 * TODO: This feature is now implemented, so remove it from
619 the wishlist.
620
621 * Makefile.maint: Merge with coreutils Makefile.maint.
622 (CVS_LIST): Use build-aux version if available.
623 (VERSION_REGEXP): New macro.
624 (syntax-check-rules): Add sc_no_if_have_config_h,
625 sc_prohibit_assert_without_use, sc_require_config_h,
626 sc_useless_cpp_parens.
627 (sc_obsolete_symbols): Check for O_NDELAY.
628 (sc_dd_max_sym_length): Track coreutils.
629 (sc_unmarked_diagnostics): Look in all files, not just *.c.
630 (sc_useless_cpp_parens): New rule.
631 (news-date-check): Look for version or today's date.
632 (changelog-check): Don't require version number near head.
633 (copyright-check): Use current year instead of hardwiring 2005.
634 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
635 (announcement): Add --gpg-key-ID.
636
637 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
638 with "file system".
639
640 Avoid undefined behavior that addressed just before the start of an
641 array. Problem reported by twlevo.
642 * src/reader.c (packgram): Prepend a new sentinel before ritem.
643 * src/lalr.c (build_relations): Rely on new sentinel.
644 * src/gram.c (gram_free): Adjust to new sentinel.
645
646 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
647
648 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
649 yylookaheadNeeds. All uses updated.
650 (yysplitStack): Rename local yynewLookaheadStatuses to
651 yynewLookaheadNeeds.
652 * data/glr-regression.at (Incorrect lookahead during nondeterministic
653 GLR): In comments, change `lookahead status' to `lookahead need'.
654
655 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
656
657 * data/glr.c (yysplitStack): A little stylistic rewrite.
658
659 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
660
661 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
662
663 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
664
665 * doc/bison.texinfo: Fix some typos.
666 (GLR Semantic Actions): New subsection discussing special
667 considerations because GLR semantic actions might be deferred.
668 (Actions): Mention look-ahead usage of yylval.
669 (Actions and Locations): Mention look-ahead usage of yylloc.
670 (Special Features for Use in Actions): Add YYEOF entry and mention it
671 in the yychar entry.
672 In the yychar entry, remove mention of the local yychar case (pure
673 parser) since this is irrelevant information when writing semantic
674 actions and since it's already discussed in `Bison Symbols' where
675 yychar is otherwise described as an external variable.
676 In the yychar entry, don't call it the `current' look-ahead since it
677 isn't when semantic actions are deferred.
678 In the yychar and yyclearin entries, add note about deferred semantic
679 actions.
680 Add yylloc and yylval entries discussing look-ahead usage.
681 (Look-Ahead Tokens): When discussing yychar, don't call it the
682 `current' look-ahead, and do mention yylval and yylloc.
683 (Error Recovery): Cross-reference `Action Features' when mentioning
684 yyclearin.
685 (Bison Symbols): In the yychar entry, don't call it the `current'
686 look-ahead.
687 In the yylloc and yylval entries, mention look-ahead usage.
688
689 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
690
691 * tests/glr-regression.at: Update copyright year to 2006.
692
693 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
694
695 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
696 use during nondeterministic operation to track which stacks have
697 actually needed the current lookahead.
698 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
699 Allocate, deallocate, resize, and otherwise shuffle space for
700 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
701 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
702 appropriately during nondeterministic operation.
703 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
704 members to store the current lookahead to be used by the deferred
705 user action.
706 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
707 from which the RHS is taken. Set the lookahead members of the new
708 yySemanticOption according to the lookahead status for stack yyk.
709 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
710 yyaddDeferredAction.
711 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
712 members of yySemanticOption before invoking yyuserAction, and then set
713 them back to their current values afterward.
714 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
715 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
716 * tests/glr-regression.at: Remove `.' from the ends of recent test case
717 titles for consistency.
718 (Leaked merged semantic value if user action cuts parse): In order to
719 suppress lint warnings, use arguments in merge function, and assign
720 char value < 128 in main.
721 (Incorrect lookahead during deterministic GLR): New test case.
722 (Incorrect lookahead during nondeterministic GLR): New test case.
723
724 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
725
726 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
727 !yyvaluep as signal that no semantic value is available to print.
728 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
729 to print a semantic value.
730
731 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
732
733 * tests/glr-regression.at: For consistency with my newer test cases,
734 don't thank myself.
735
736 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
737
738 * data/glr.c (yyresolveValue): When merging semantic options, if at
739 least one user action succeeds but a later one cuts the parse, then
740 destroy the semantic value before returning rather than leaking it.
741 (yyresolveStates): If a user action cuts the parse and thus
742 yyresolveValue fails, ignore the (unset) semantic value rather than
743 corrupting the yyGLRState, and empty the semantic options list since
744 the user actions should have called all necessary destructors.
745 Simplify code with YYCHK.
746 * tests/glr-regression.at (Corrupted semantic options if user action
747 cuts parse): New test case.
748 (Undesirable destructors if user action cuts parse): New test case.
749 Before applying any of this patch, this test case never actually failed
750 for me... but only because the corrupted semantic options usually
751 masked this bug.
752 (Leaked merged semantic value if user action cuts parse): New test
753 case.
754
755 2006-01-05 Akim Demaille <akim@epita.fr>
756
757 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
758
759 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
760
761 * data/c.m4 (b4_c_modern): New macro, with a new provision for
762 _MSC_VER. Problem reported by Cenzato Marco.
763 (b4_c_function_def): Use it.
764 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
765 b4_c_modern.
766 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
767 than rolling our own.
768
769 2006-01-04 Akim Demaille <akim@epita.fr>
770
771 Also warn about non-used mid-rule values.
772 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
773 member.
774 (symbol_list_new): Adjust.
775 * src/reader.c (symbol_typed_p): New.
776 (grammar_rule_check): Use it.
777 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
778 Check its rule.
779 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
780 Use it.
781 * tests/actions.at (Exotic Dollars): Adjust.
782
783 2006-01-04 Akim Demaille <akim@epita.fr>
784
785 * src/reader.c (grammar_midrule_action): If $$ is set in a
786 mid-rule, move the `used' bit to its lhs.
787 * tests/input.at (Unused values): New.
788 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
789
790 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
791
792 * doc/bison.texinfo (Bison Options): Say more accurately what
793 --yacc does.
794 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
795 about declarations in the grammar when in Yacc mode, as POSIX does
796 not require a diagnostic when the grammar uses extensions.
797
798 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
799
800 Warn about dubious constructions like "%token T T".
801 Reported by twlevo.
802 * src/symtab.h (struct symbol.declared): New member.
803 * src/symtab.c (symbol_new): Initialize it to false.
804 (symbol_class_set): New arg DECLARING, specifying whether
805 this is a declaration that we want to warn about, if there
806 is more than one of them. All uses changed.
807
808 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
809 Allow multiple %union directives, whose contents concatenate.
810 * src/parse-gram.y (grammar_declaration): Likewise.
811 Use muscle_code_grow, so that we don't need stype_line any more.
812 All uses changed.
813
814 * src/muscle_tab.c (muscle_grow): Fix comment.
815
816 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
817 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
818 Update copyright year to 2006.
819
820 2006-01-03 Akim Demaille <akim@epita.fr>
821
822 Have glr.cc pass (some of) the calc.at tests.
823 * data/glr.cc (b4_parse_param_orig): New.
824 (b4_parse_param): Improve its definition, and bound it more
825 clearly in the skeleton.
826 (b4_epilogue): Append, instead of prepending, in order to keep
827 #line consistency.
828 Simplify the generation of auxiliary functions: locations and
829 purity are mandated.
830 (b4_global_tokens_and_yystype): Honor it.
831 * data/location.cc (c++.m4): Don't include it.
832 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
833 and AT_SKEL_CC_IF.
834 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
835 AT_LALR1_CC_IF.
836 Be sure to initialize the first position's filename.
837 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
838 mandated anyway.
839 (AT_CHECK_CALC_GLR_CC): New.
840 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
841
842 2006-01-02 Akim Demaille <akim@epita.fr>
843
844 * src/output.c (output_skeleton): Don't hard wire the inclusion of
845 c.m4.
846 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
847 * data/glr.cc: Do not include stack.hh.
848
849 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
850
851 * data/glr.c: Reformat whitespace with tabs.
852 (b4_lpure_formals): Remove this unused m4 macro.
853 * tests/cxx-type.at: Reformat whitespace with tabs.
854 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
855 since it's a member. Rename type to isNterm for clarity.
856
857 2005-12-29 Akim <akim@sulaco.local>
858
859 Let glr.cc catch up with symbol_value_print.
860 * data/glr.cc (b4_yysymprint_generate): Replace by...
861 (b4_yy_symbol_print_generate): this.
862 (yy_symbol_print, yy_symbol_value_print): Declare them.
863
864 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
865
866 * src/location.h (boundary): Note that a line or column equal
867 to INT_MAX indicates an overflow.
868 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
869 (rule_length_overflow, increment_rule_length, add_column_width):
870 New functions.
871 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
872 (<SC_BRACED_CODE>"}"):
873 Use increment_rule_length rather than incrementing it by hand.
874 (adjust_location, handle_syncline): Diagnose overflow.
875 (handle_action_dollar, handle_action_at):
876 Fix bug with monstrosities like $-2147483648.
877 Remove now-unnecessary checks.
878 (scan_integer): Verify assumptions and remove now-unnecessary checks.
879 (convert_ucn_to_byte): Verify assumptions.
880 (handle_syncline): New arg LOC. All callers changed.
881 Don't store through a value derived from char const * pointer.
882
883 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
884 GCC warnings.
885
886 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
887
888 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
889 Remove unnecessary forward static decls.
890
891 2005-12-27 Akim Demaille <akim@epita.fr>
892
893 * src/reader.c (grammar_current_rule_check): Also check that $$
894 is used.
895 Take the rule to check as argument, hence rename as...
896 (grammar_rule_check): this.
897 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
898 Rename as...
899 (grammar_rule_begin, grammar_rule_end): these, for consistency.
900 (grammar_midrule_action, grammar_symbol_append): Now static.
901 * tests/torture.at (input): Don't rely on the default action
902 being always performed.
903 * tests/calc.at: "Set" $$ even when the action is "cut" with
904 YYERROR or other.
905 * tests/actions.at (Exotic Dollars): Instead of using unused
906 values, check that the warning is issued.
907
908 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
909
910 * NEWS: Improve wording for unused-value warnings.
911
912 2005-12-22 Akim Demaille <akim@epita.fr>
913
914 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
915 (b4_yysymprint_generate): Rename as...
916 (b4_yy_symbol_print_generate): this.
917 Generate yy_symbol_print instead of yysymprint.
918 Generate also yy_symbol_value_print, and use it.
919
920 2005-12-22 Akim Demaille <akim@epita.fr>
921
922 * NEWS: Warn about unused values.
923 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
924 a `used' member.
925 (symbol_list_n_get, symbol_list_n_used_set): New.
926 (symbol_list_n_type_name_get): Use symbol_list_n_get.
927 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
928 * src/reader.c (grammar_current_rule_check): Check that values are
929 used.
930 * src/symtab.c (symbol_print): Accept 0.
931 * tests/existing.at: Remove the type information.
932 Empty the actions.
933 Remove useless actions (beware of mid-rule actions: perl -000
934 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
935 * tests/actions.at (Exotic Dollars): Use unused values.
936 * tests/calc.at: Likewise.
937 * tests/glr-regression.at (No users destructors if stack 0 deleted):
938 Likewise.
939
940 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
941 rule_useful_p.
942
943 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
944
945 Undo 2005-12-01 tentative license wording change. The wording is
946 still being reviewed by the lawyers, and we don't want to wait for
947 them before publishing a test release. For now, revert to the
948 previous wording.
949 * NEWS: Undo 2005-12-01 change.
950 * data/glr.c: Revert to previous license wording.
951 * data/glr.cc: Likewise.
952 * data/lalr1.cc: Likewise.
953 * data/location.cc: Likewise.
954 * data/yacc.c: Likewise.
955
956 * NEWS: Reword %destructor vs YYABORT etc.
957 * data/glr.c: Use American spacing, for consistency.
958 * data/glr.cc: Likewise.
959 * data/lalr1.cc: Likewise.
960 * data/yacc.c: Likewise.
961 * data/yacc.c: Reformat comments slightly.
962 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
963 for consistency. Fix some spelling errors and reword recently-included
964 text slightly.
965 * tests/cxx-type.at: Cast results of malloc, for C++.
966
967 2005-12-21 Joel E. Denny <address@hidden>
968
969 * tests/cxx-type.at: Construct a tree, count the parents of shared
970 nodes, and free each node once and only once. Previously, the memory
971 for semantic values was leaked instead.
972
973 2005-12-21 Joel E. Denny <address@hidden>
974
975 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
976 (yylval, yylloc): If pure, #define to yystackp->yyval and
977 yystackp->yyloc similar to yychar and yynerrs.
978 (yyparse): If pure, remove local yylval and yylloc. Add local
979 yystackp to accommodate pure definitions of yylval and yylloc.
980 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
981 yylvalp and yyllocp to &yylval and &yylloc.
982 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
983 namespace. Previously, nerrs and char were missing, but lval and lloc
984 weren't necessary.
985 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
986 yylvalp and yyllocp parameters since, if pure, these are now always
987 accessible through yystackp. If not pure, they are still accessible
988 globally.
989 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
990 `if (YYID (N))' to pacify lint.
991
992 2005-12-21 Akim Demaille <akim@epita.fr>
993
994 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
995 destroy the RHS symbols of a rule.
996 * data/yacc.c (yylen): Initialize to 0.
997 Keep its value to the number of items to possibly shift.
998 In particular, a regular successful parse that ends on YYFINAL by
999 a (internal) YYACCEPT must not have yylen != 0.
1000 (yyerrorlab, yyreturn): Pop the RHS.
1001 Reorder a bit to emphasize the `shifting' bits of code.
1002 (YYPOPSTACK): Now accept a number of items to pop.
1003 * data/lalr1.cc: Likewise.
1004 * data/glr.c: Formatting changes.
1005 Use goto instead of fall through.
1006 * doc/bison.texinfo (Destructor Decl): Complete.
1007
1008 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1009
1010 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
1011 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
1012 * djgpp/config.bat: Replace every occurence of the file name
1013 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1014 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1015 * djgpp/config.sed: Replace every occurence of the file name
1016 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1017 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1018 * djgpp/djunpack.bat: DJGPP specific file.
1019 * djgpp/fnchange.lst: DJGPP specific file.
1020 * djgpp/README.in: Add new information about how to unpack the bison
1021 source on MSDOS and other systems which have 8.3 file name restrictions
1022 using djunpack.bat and fnchange.lst.
1023
1024 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
1025
1026 * bootstrap (build_cvs_prefix): Remove; unused.
1027 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
1028 when getting gnulib.
1029
1030 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
1031
1032 * data/glr.c: Reorder typedef declarations for structs to match order
1033 of struct declarations.
1034 Rename yystack everywhere to yystackp except in yyparse where it's not
1035 a pointer.
1036 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
1037 consistency.
1038 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
1039 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
1040 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
1041 lint.
1042
1043 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
1044
1045 * tests/sets.at (Accept): Fix typos in regular expression used to
1046 sed out the final state number.
1047
1048 Work around portability problem on Solaris 10: flex-generated
1049 files include <stdio.h> before <config.h>, which messes up
1050 because the latter defines __EXTENSIONS__. Address the problem
1051 by creating two new little files that include <config.h> first,
1052 then include the flex-generated files. Rewrite everyone else
1053 to include <config.h> first, as well.
1054 * lib/timevar.c: Always include "config.h".
1055 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
1056 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
1057 (EXTRA_bison_SOURCES): New macro.
1058 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
1059 * src/system.h: Don't include config.h.
1060 * src/LR0.c: Include <config.h> first.
1061 * src/assoc.c: Likewise.
1062 * src/closure.c: Likewise.
1063 * src/complain.c: Likewise.
1064 * src/conflicts.c: Likewise.
1065 * src/derives.c: Likewise.
1066 * src/files.c: Likewise.
1067 * src/getargs.c: Likewise.
1068 * src/gram.c: Likewise.
1069 * src/lalr.c: Likewise.
1070 * src/location.c: Likewise.
1071 * src/main.c: Likewise.
1072 * src/muscle_tab.c: Likewise.
1073 * src/nullable.c: Likewise.
1074 * src/output.c: Likewise.
1075 * src/parse-gram.y: Likewise.
1076 * src/print.c: Likewise.
1077 * src/print_graph.c: Likewise.
1078 * src/reader.c: Likewise.
1079 * src/reduce.c: Likewise.
1080 * src/relation.c: Likewise.
1081 * src/state.c: Likewise.
1082 * src/symlist.c: Likewise.
1083 * src/symtab.c: Likewise.
1084 * src/tables.c: Likewise.
1085 * src/uniqstr.c: Likewise.
1086 * src/vcg.c: Likewise.
1087
1088 * src/parse-gram.y: Fix minor problems uncovered by lint.
1089 (current_lhs, current_lhs_location): Now static.
1090 (current_assoc): Remove unused variable.
1091
1092 Cleanups so that Bison-generated parsers have less lint.
1093 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
1094 Prepend /*ARGSUSED*/, for lint's sake.
1095 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
1096 definition if 'lint' is defined.
1097 (YYID): New macro (or function, if lint).
1098 All uses of /*CONSTCOND*/0 replaced by YYID(0).
1099 * data/yacc.c: Likewise.
1100 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
1101 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
1102 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
1103 is C++ only.
1104 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
1105 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
1106 Use YYID(0) rather than 0, for lint.
1107 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
1108 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
1109
1110 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
1111
1112 * tests/glr-regression.at
1113 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
1114 Close memory leak reported by twlevo.
1115
1116 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
1117
1118 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
1119 all stacks.
1120 (yyparse): Iterate another stack in order to call user destructors.
1121 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1122 New test case.
1123 (Duplicated user destructor for lookahead): This test now is expected
1124 to succeed.
1125
1126 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
1127
1128 * NEWS: Document the following change.
1129 * data/yacc.c: Say "parser skeleton" rather than "file", since
1130 it's no longer just a file.
1131 * data/glr.c: Grant a special exception for C GLR parsers, that
1132 reads like the already-existing exception for C LALR(1) parsers.
1133 * data/glr.cc: Likewise.
1134 * data/lalr1.cc: Likewise.
1135 * data/location.cc: Likewise.
1136 * data/yacc.c: Reword the "written by" statement to clarify that
1137 it was the parser skeleton, not the entire output file.
1138 * data/glr.c: Written by Paul Hilfinger.
1139 * data/glr.cc: Written by Akim Demaille.
1140 * data/lalr1.cc: Likewise.
1141
1142 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
1143
1144 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
1145 Fix typos in previous change that broke 'make check'.
1146 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
1147 supported in C.
1148 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
1149 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
1150 We can revert this once things settle down.
1151
1152 * src/conflicts.c (conflicts_print): Don't print file name twice
1153 when %expect fails because there were no conflicts.
1154 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
1155 change.
1156 * tests/conflicts.at (%expect not enough, %expect too much):
1157 (%expect with reduce conflicts): Adjust to new behavior.
1158
1159 2005-11-18 Akim Demaille <akim@epita.fr>
1160
1161 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
1162 errors.
1163 * NEWS: Document this.
1164 * doc/bison.texinfo (Expect Decl): Likewise.
1165
1166 2005-11-16 Akim Demaille <akim@epita.fr>
1167
1168 Generalize the display of semantic values and locations in traces.
1169 * data/glr.c (yy_reduce_print): Fix indices (again).
1170 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
1171 literal integers.
1172 * data/lalr1.cc (yyreduce_print): Rename as...
1173 (yy_reduce_print): this.
1174 Display values and locations.
1175 * data/yacc.c (yy_reduce_print): Likewise.
1176 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
1177 (yysymprint): Move higher to be visible from yy_reduce_print).
1178 (yyparse): Adjust.
1179 * tests/calc.at: Adjust the expected length of the traces.
1180
1181 2005-11-14 Akim Demaille <akim@epita.fr>
1182
1183 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
1184 from 1 to N, while values and location start at 0.
1185 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
1186
1187 2005-11-14 Akim Demaille <akim@epita.fr>
1188
1189 * data/glr.c (yy_reduce_print): Fix the $ number.
1190
1191 2005-11-14 Akim Demaille <akim@epita.fr>
1192
1193 "Use" parse parameters.
1194 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
1195 * data/glr.c, data/glr.cc: Use them.
1196 * data/glr.c (YYUSE): Have a C++ definition that supports
1197 non-pointer types.
1198
1199 2005-11-14 Akim Demaille <akim@epita.fr>
1200
1201 * data/glr.c (yyexpandGLRStack): Declare only if defined.
1202
1203 2005-11-14 Akim Demaille <akim@epita.fr>
1204
1205 * data/glr.cc: New.
1206 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
1207
1208 2005-11-12 Akim Demaille <akim@epita.fr>
1209
1210 Let position and location be PODs.
1211 * data/location.cc (position::initialize, location::initialize): New.
1212 (position::position, location::location): Define only if
1213 b4_location_constructors is defined.
1214 * data/lalr1.cc (b4_location_constructors): Define it for backward
1215 compatibility.
1216 * doc/bison.texinfo (Initial Action Decl): Use initialize.
1217
1218 2005-11-12 Akim Demaille <akim@epita.fr>
1219
1220 * data/lalr1.cc: Move the body of the ctor and dtor into the
1221 parser file (instead of the header).
1222 Wrap the implementations in a "namespace yy".
1223
1224 2005-11-12 Akim Demaille <akim@epita.fr>
1225
1226 Have glr.c include its header file when created.
1227 * data/glr.c (b4_shared_declarations): New.
1228 Output them verbatim in the parser if !%defines, otherwise
1229 output then in the header file, and include it instead.
1230
1231 2005-11-11 Akim Demaille <akim@epita.fr>
1232
1233 * data/glr.c: Comment changes.
1234
1235 2005-11-11 Akim Demaille <akim@epita.fr>
1236
1237 When yydebug, report semantic and location values for reductions.
1238 * data/glr.c (yy_reduce_print): Report the semantic values and the
1239 locations.
1240 (YY_REDUCE_PRINT): Adjust.
1241 (yyglrReduce): Use them.
1242 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
1243 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
1244 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
1245 traces.
1246
1247 2005-11-10 Akim Demaille <akim@epita.fr>
1248
1249 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
1250 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
1251 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
1252
1253 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
1254
1255 * m4/cxx.m4, examples/Makefile.am: Don't build
1256 examples/calc++ if no C++ compiler is available. (trivial change)
1257
1258 2005-11-09 Akim Demaille <akim@epita.fr>
1259
1260 * src/scan-skel.l: Use a couple of asserts.
1261
1262 2005-11-03 Akim Demaille <akim@epita.fr>
1263
1264 In some (weird) cases, the final state number is incorrect.
1265 Reported by Alexandre Duret-Lutz.
1266 * src/LR0.c (state_list_append): Remove the computation of
1267 final_state.
1268 (save_reductions): Do it here.
1269 (get_state): Alpha conversion.
1270 (generate_states): Use a for loop.
1271 * src/gram.h (item_number_is_rule_number)
1272 (item_number_is_symbol_number): New.
1273 * src/state.c: Use assert.
1274 * src/system.h: Include assert.h.
1275 * tests/sets.at (Accept): New.
1276
1277 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1278
1279 * data/glr.c (yyfill): Adjust comment.
1280 (yyresolveAction): Initialize default location properly
1281 for empty right-hand sides.
1282 (yydoAction): Ditto.
1283 Add comment explaining apparently dead code.
1284 * tests/glr-regression.at
1285 (Incorrectly initialized location for empty right-hand side in GLR):
1286 New test.
1287
1288 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
1289
1290 * bootstrap (cleanup_gnulib): New function. Use it to clean up
1291 gnulib when interrupted. This fixes some race conditions and
1292 works around some portability problems (one noted by Paul
1293 Hilfinger).
1294
1295 2005-10-22 Akim <akim@epita.fr>
1296
1297 * Makefile.cfg: Adjust to config -> build-aux.
1298 Reported by twledo.
1299
1300 2005-10-21 Akim Demaille <akim@epita.fr>
1301
1302 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
1303 the %parse-params.
1304 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
1305 * data/yacc.c (b4_Pure_if): Rename as...
1306 (b4_yacc_pure_if): this.
1307 (YY_SYMBOL_PRINT, yyparse): Adjust.
1308 * doc/bison.texinfo: Formatting changes.
1309
1310 2005-10-21 Akim Demaille <akim@epita.fr>
1311
1312 Finish the transition config -> build-aux.
1313 * configure.ac, Makefile.am: Use build-aux.
1314 * config/prev-version, config/announce-gen, config/Makefile.am:
1315 Move to...
1316 * build-aux/prev-version, build-aux/announce-gen,
1317 * build-aux/Makefile.am: here.
1318
1319 2005-10-14 Akim Demaille <akim@epita.fr>
1320
1321 * examples/calc++/test: Use set -x only when VERBOSE.
1322
1323 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
1324
1325 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
1326 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
1327
1328 2005-10-13 Akim Demaille <akim@epita.fr>
1329
1330 * src/scan-skel.l: Output the base name parts of the parser and
1331 header file names.
1332 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
1333 additional checks.
1334 Use this to exercise C++ outputs in subdirs.
1335 Reported by Oleg Smolsky.
1336
1337 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
1338
1339 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
1340 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
1341 Problem reported by John P. Hartmann.
1342 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
1343 already defined it.
1344
1345 2005-10-12 Akim Demaille <akim@epita.fr>
1346
1347 * src/parse-gram.y (version_check): Exit 63 to please missing
1348 (stands for "version mismatch).
1349 * tests/input.at, doc/bison.texinfo: Adjust.
1350
1351 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
1352
1353 Work around portability problems with Visual Age C compiler
1354 (xlc and xlC_r) reported by John P. Hartmann.
1355 * data/location.cc (initial_column, initial_line): Remove.
1356 All uses replaced by 0 and 1.
1357 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
1358 that xlc complains about.
1359 * src/scan-skel.l (skel_wrap): Likewise.
1360 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
1361 as __STDC__.
1362 * data/yacc.c (YYMODERN_C): New macro, which also looks at
1363 __STDC_VERSION__. Use it everywhere instead of looking at
1364 __STDC__ and __cplusplus.
1365
1366 2005-10-10 Akim Demaille <akim@epita.fr>
1367
1368 * examples/calc++/test: Be quiet unless VERBOSE.
1369
1370 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
1371
1372 * data/c.m4 (yydestruct, yysymprint):
1373 Use YYUSE instead of casting to void.
1374 * data/glr.c (YYUSE): New macro.
1375 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
1376 Use it instead of rolling our own.
1377 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
1378 (YYCHK1):
1379 Use /*CONSTCOND*/ to suppress lint warnings.
1380 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
1381 (YY_STACK_PRINT): Use 'false' not '0'.
1382 (YYUSE): New macro.
1383 (yysymprint_, yydestruct_): Use it instead of rolling our own.
1384 * data/yacc.c (YYUSE): New macro.
1385 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
1386 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
1387 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
1388
1389
1390 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
1391 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
1392
1393 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
1394
1395 Undo the parts of the unlocked-I/O change that substituted
1396 putc or puts for printf. This might hurt performance a bit,
1397 but some people prefer the printf style.
1398 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
1399 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
1400 All uses replaced by YYFPRINTF and YYDPRINTF.
1401 * data/yacc.c: Likewise.
1402 * lib/bitset.c (bitset_print): Likewise.
1403 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
1404 putc and puts.
1405 * lib/lbitset.c (debug_lbitset): Likewise.
1406 * src/closure.c (print_firsts, print_fderives): Likewise.
1407 * src/gram.c (grammar_dump): Likewise.
1408 * src/lalr.c (look_ahead_tokens_print): Likewise.
1409 * src/output.c (escaped_output): Likewise.
1410 (user_actions_output): Break apart two printfs.
1411 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
1412 * src/reduce.c (reduce_print): Likewise.
1413 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
1414 * src/system.h: Include unlocked-io.h rathe than stdio.h.
1415
1416 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
1417 Use assignments rather than casts-to-void to suppress
1418 unused-variable warnings. This pacifies 'lint'.
1419 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
1420 unused-variable warnings.
1421
1422 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1423
1424 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
1425
1426 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
1427
1428 Use unlocked I/O for a minor performance improvement on hosts like
1429 GNU/Linux and Solaris that support unlocked I/O. The basic idea
1430 is to use the gnlib unlocked-io module, and to prefer putc and
1431 puts to printf when either will work (since the latter doesn't
1432 come in an unlocked flavor).
1433 * bootstrap (gnulib_modules): Add unlocked-io.
1434 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
1435 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
1436 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
1437 and similarly for puts and putc and printf.
1438 * data/yacc.c: Likewise.
1439 * lib/bitset.c (bitset_print): Likewise.
1440 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
1441 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
1442 to printf.
1443 * lib/lbitset.c (debug_lbitset): Likewise.
1444 * src/closure.c (print_firsts, print_fderives): Likewise.
1445 * src/gram.c (grammar_dump): Likewise.
1446 * src/lalr.c (look_ahead_tokens_print): Likewise.
1447 * src/output.c (escaped_output): Likewise.
1448 (user_actions_output): Coalesce two printfs.
1449 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
1450 * src/reduce.c (reduce_print): Likewise.
1451 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
1452 * src/system.h: Include unlocked-io.h rather than stdio.h.
1453
1454 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
1455 this confuses xgettext.
1456
1457 2005-10-02 Akim Demaille <akim@epita.fr>
1458
1459 * bootstrap (gnulib_modules): Add strverscmp.
1460 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
1461 * m4/.cvsignore: Add strverscmp.m4.
1462 * src/parse-gram.y (%require): New token, new rule.
1463 (version_check): New.
1464 * src/scan-gram.l (%require): Adjust.
1465 * tests/input.at (AT_REQUIRE): New.
1466 Use it.
1467 * doc/bison.texinfo (Require Decl): New.
1468 (Calc++ Parser): Use %require.
1469
1470 2005-10-02 Akim Demaille <akim@epita.fr>
1471
1472 * data/location.cc: New.
1473
1474 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
1475 Akim Demaille <akim@epita.fr>
1476
1477 Make sure -odir/foo.cc creates dir/location.hh etc.
1478 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
1479 (spec_file_prefix, spec_verbose_file, spec_graph_file)
1480 (spec_defines_file): Now const.
1481 (dir_prefix): New.
1482 (short_base_name): Remove.
1483 * src/files.c: Adjust.
1484 (dirname.h): Include.
1485 (base_name): Don't prototype it.
1486 (finput): Remove, duplicates gram_in.
1487 (full_base_name, short_base_name): Replace by...
1488 (all_but_ext, all_but_tab_ext): these.
1489 (compute_base_names): Rename as...
1490 (compute_file_name_parts): this.
1491 Update to compute the new variables, including dir_prefix.
1492 Adjust dependencies.
1493 * src/output.c (prepare): Output them.
1494 * src/reader.c: Adjust to use gram_in, not finput.
1495 * src/scan-skel.l (@dir_prefix@): New.
1496
1497 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1498
1499 * lib/subpipe.c: New function end_of_output_subpipe() added
1500 to allow support for non-posix systems. This is a no-op function
1501 for posix systems.
1502
1503 * lib/subpipe.h: New function end_of_output_subpipe() added
1504 to allow support for non-posix systems. This is a no-op function
1505 for posix systems.
1506
1507 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
1508 handle the lack of pipe/fork functionality on non-posix systems.
1509
1510 * djgpp/Makefile.maint: DJGPP specific file.
1511
1512 * djgpp/README.in: DJGPP specific file.
1513
1514 * djgpp/config.bat: DJGPP specific configuration file.
1515
1516 * djgpp/config.sed: DJGPP specific configuration file.
1517
1518 * djgpp/config.site: DJGPP specific configuration file.
1519
1520 * djgpp/config_h.sed: DJGPP specific configuration file.
1521
1522 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
1523
1524 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
1525
1526 2005-10-02 Akim Demaille <akim@epita.fr>
1527
1528 * data/location.cc: New, extract from...
1529 * data/lalr1.cc: here.
1530 (location.hh): Include it after the user prologue, in case the
1531 filename type is defined by the user.
1532 Forward declation location and position before the pre-prologue.
1533 (yyresult_): Rename as...
1534 (yyresult): this, it's a local variable, not an attribute.
1535 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
1536
1537 2005-10-01 Akim Demaille <akim@epita.fr>
1538
1539 * examples/extexi: Restore the #line generation.
1540
1541 2005-09-30 Akim Demaille <akim@epita.fr>,
1542 Alexandre Duret-Lutz <adl@gnu.org>
1543
1544 Move the token type and YYSTYPE in the parser class.
1545 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
1546 (parser::token): New, from the moved free definition of tokens.
1547 (parser::semantic_value): Now a full definition instead of an
1548 indirection to YYSTYPE.
1549 (b4_post_prologue): No longer included in the header file, but
1550 in the implementation file.
1551 * doc/bison.texi (C+ Language Interface): Update.
1552 * src/parse-gram.y: Support unary %define.
1553 * tests/actions.at: Define global_tokens_and_yystype for backward
1554 compatibility until we update the tests.
1555 * tests/calc.at: Idem.
1556 (first_line, first_column, last_line, last_column): Define for lalr1.cc
1557 to simplify the code.
1558
1559 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
1560
1561 Port to SunOS 4.1.4, which lacks strtoul and strerror.
1562 Ah, the good old days! Problem reported by Peter Klein.
1563 * bootstrap (gnulib_modules): Add strerror, strtoul.
1564 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
1565 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
1566
1567 2005-09-29 Akim Demaille <akim@epita.fr>
1568
1569 * data/c.m4 (b4_error_verbose_if): New.
1570 * data/lalr1.cc: Use it.
1571 (YYERROR_VERBOSE_IF): Remove.
1572 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
1573 parser members, replaced by...
1574 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
1575 local variables.
1576 (yysyntax_error_): Takes the state number as argument.
1577 (yyreduce_print_): Use the argument yyrule, not the former
1578 attribute yyn_.
1579
1580 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
1581
1582 * bootstrap (gnulib_modules): Add verify.
1583 * lib/.cvsignore: Add verify.h.
1584 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
1585 * src/system.h (verify): Remove.
1586 Include verify.h instead.
1587 * src/tables.c (tables_generate): Use new API for 'verify'.
1588
1589 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
1590
1591 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
1592 local variables whose names begin with 'yy'.
1593 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1594 Trivial changes from Joel E. Denny.
1595
1596 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
1597 it itself.
1598 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
1599 don't use alloca any more.
1600
1601 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
1602 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
1603 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
1604 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
1605 to match yacc.c, to test more hosts.
1606
1607 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
1608
1609 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
1610 doesn't affect behavior.
1611 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
1612 Solaris, AIX, MSC.
1613 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
1614 This works a bit better with glibc, if user code has already included
1615 stdlib.h.
1616 * doc/bison.texinfo (Bison Parser): Document that users can't
1617 arbitrarily use malloc and free for other purposes. Document
1618 that <alloca.h> and <malloc.h> might be included.
1619 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
1620 user must declare alloca.
1621
1622 * HACKING (release): Forwarn the Translation Project about
1623 stable releses.
1624
1625 2005-09-20 Akim Demaille <akim@epita.fr>
1626
1627 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
1628
1629 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
1630
1631 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
1632 (YYSTACK_ALLOC_MAXIMUM): Use it.
1633 (yysyntax_error): New function.
1634 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
1635 multiple syntax errors are reported, and alloca is being used.
1636 Instead, reallocate buffers twice as big each time, so that
1637 we waste at most half the allocated memory. Start with a small
1638 (128-byte) buffer that will suffice in most cases anyway.
1639 Use yysyntax_error to do most of the work.
1640
1641 * doc/bison.texinfo (Error Reporting, Table of Symbols):
1642 yynerrs is the number of errors reported, not the number of
1643 errors encountered.
1644
1645 * tests/glr-regression.at (Duplicated user destructor for lookahead):
1646 Mark it as expected to fail.
1647 Cast result of malloc; problem reported by twlevo@xs4all.nl.
1648 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
1649 Don't start user-code symbols with "yy", to avoid name space problems.
1650
1651 2005-09-19 Akim Demaille <akim@epita.fr>
1652
1653 Remove the traits, failed experiment.
1654 It never proved useful, and anyway because of the current
1655 definition, it was not possible to have several specialization of
1656 this traits, making it useless.
1657 * data/lalr1.cc (yy:traits): Remove.
1658 Inline its definitions in the parser class.
1659
1660 2005-09-19 Akim Demaille <akim@epita.fr>
1661
1662 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
1663 least Mac OSX with a /usr/local install of gettext.
1664
1665 2005-09-19 Akim Demaille <akim@epita.fr>
1666
1667 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
1668 and yytoken for similarity with the other skeletons.
1669
1670 2005-09-19 Akim Demaille <akim@epita.fr>
1671
1672 * NEWS, configure.ac: update version number to 2.1a.
1673
1674 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
1675
1676 * NEWS: Version 2.1.
1677
1678 * NEWS: Remove notice of yytname change, since it was never in an
1679 official release.
1680 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
1681 diagnostic.
1682 * src/output.c (prepare): Likewise.
1683 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
1684 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
1685 is not defined. This is an awful hack, but it's enough for now.
1686 All callers changed.
1687 * tests/glr-regression-at (make_value): Args are const pointers now,
1688 to avoid GCC warning.
1689 (Duplicated user destructor for lookahead): New test. Currently
1690 skipped. It fails on my host but I'm not sure it'll always fail.
1691
1692 2005-09-16 Akim Demaille <akim@epita.fr>
1693
1694 * src/symtab.h (struct symbol): Declare the printer and destructor
1695 as const, to avoid accidental calls to free.
1696 (symbol_destructor_set, symbol_printer_set): Adjust.
1697 * src/symtab.c: Adjust.
1698
1699 2005-09-16 Akim Demaille <akim@epita.fr>
1700
1701 * data/c.m4 (b4_token_enums): New.
1702 (b4_token_defines): Rename as...
1703 (b4_token_enums_defines): this.
1704 (b4_token_defines): New, output only the #defines.
1705 * data/yacc.c, data/glr.c: Adjust.
1706 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
1707 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
1708 as default values.
1709
1710 2005-09-16 Akim Demaille <akim@epita.fr>
1711
1712 * data/lalr1.cc (yylex_): Remove, inline its code.
1713 (yyreport_syntax_error_): Remove, replaced by...
1714 (yysyntax_error_): this which returns a string and leaves to the
1715 caller the call to the users' error function.
1716 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
1717 Move from members of the parser object...
1718 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
1719 to local variables of the parse function.
1720
1721 2005-09-16 Akim Demaille <akim@epita.fr>
1722
1723 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
1724 since it's in Bison's name space.
1725
1726 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
1727
1728 * data/glr.c (yyresolveValue): Add default case to pacify
1729 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
1730
1731 * NEWS: Document when yyparse started to return 2.
1732 * doc/bison.texinfo (Parser Function): Document when yyparse
1733 returns 2.
1734
1735 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
1736 (b4_filename_type): Renamed back from b4_file_name_type. All uses
1737 changed.
1738 (class position): file_name -> filename (reverting). All uses changed.
1739
1740 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
1741
1742 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
1743 do anything if $@ exists. This reverts part of the 2005-07-07
1744 patch.
1745
1746 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
1747
1748 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
1749 contains obsolete information and isn't worth distributing as a
1750 separate file anyway.
1751 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
1752 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
1753 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
1754 (yyparse): Abort if user code uses longjmp to throw an unexpected
1755 value.
1756
1757 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
1758
1759 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
1760 Suggested by twlevo@xs4all.nl.
1761
1762 * data/glr.c (YYCHK1): Do not assume YYE is in range.
1763 This avoids a diagnostic from gcc -Wswitch-enum.
1764 Problem reported by twlevo@xs4all.nl.
1765
1766 * doc/bison.texinfo: Don't use "filename", as per GNU coding
1767 standards. Use "file name" or "file" or "name", depending on
1768 the context.
1769 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
1770 not to hack/foo.tab.c.
1771 (Calc++ Top Level): 2nd arg of main is not const.
1772 * data/glr.c: b4_filename -> b4_file_name.
1773 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
1774 All uses changed.
1775 (class position): filename -> file_name. All uses changed.
1776 * data/yacc.c: b4_filename -> b4_file_name.
1777 * lib/bitset.h: filename -> file_name in local vars.
1778 * lib/bitset_stats.c: Likewise.
1779 * src/files.c: Likewise.
1780 * src/scan-skel.l ("@output ".*\n): Likewise.
1781 * src/files.c (file_name_split): Renamed from filename_split.
1782 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
1783
1784 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
1785
1786 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
1787 to accommodate latest gnulib.
1788
1789 * tests/glr-regression.at (Duplicate representation of merged trees):
1790 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
1791
1792 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
1793 needed.
1794
1795 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
1796
1797 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
1798 All uses changed. Invoke user destructor after an error during a
1799 split parse (trivial change from Joel E. Denny).
1800
1801 * tests/glr-regression.at
1802 (User destructor after an error during a split parse): New test case.
1803 Problem reported by Joel E. Denny in:
1804 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
1805
1806 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
1807
1808 * README-cvs: Give URLs for recommended tools.
1809 Mention Gzip version problem, and bootstrapping issues.
1810 Remove troubleshooting section, as it's somewhat obsolete.
1811
1812 * bootstrap (no_cache): New var, to accommodate different wget
1813 variants. Use it instead of '-C off'. Problem reported by
1814 twlevo@xs4all.nl.
1815
1816 * data/glr.c (yydestroyStackItem): New function.
1817 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
1818 debugging information. Problem reported by Joel E. Denny.
1819
1820 2005-08-25 Akim Demaille <akim@epita.fr>
1821
1822 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
1823
1824 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
1825
1826 * data/glr.c (yyrecoverSyntaxError, yyreturn):
1827 Don't invoke destructor on unresolved entries.
1828 * tests/glr-regression.at
1829 (User destructor for unresolved GLR semantic value): New test case.
1830 Problem reported by Joel E. Denny in:
1831 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
1832
1833 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
1834
1835 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
1836 Add strnlen.c.
1837 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
1838 lib-prefix.m4, po.m4.
1839
1840 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
1841 in yydestruct diagnostic, since it might not be an error.
1842 Problem reported by Joel Denny near end of
1843 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
1844 * data/lalr1.cc (yyerturn): Likewise.
1845 * data/yacc.c (yyreturn): Likewise.
1846 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
1847
1848 * src/files.c: Remove obsolete FIXME comment.
1849
1850 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
1851 with the other templates, and to fix bogus run-on messages such
1852 as the one reported at the end of
1853 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
1854 All callers changed to avoid the newline.
1855 (yyprocessOneStack): Output two lines rather than one, to accommodate
1856 the above change. This changes the debug output format slightly.
1857
1858 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
1859 reported by Joel E. Denny in
1860 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
1861 (trivial change).
1862 * tests/glr-regression.at (Duplicate representation of merged trees):
1863 New test, from Joel E. Denny in:
1864 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
1865 * THANKS: Add Joel E. Denny.
1866
1867 * configure.ac (AC_INIT): Bump to 2.0c.
1868
1869 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
1870
1871 * NEWS: Version 2.0b.
1872
1873 * Makefile.am (SUBDIRS): Put examples before tests, so that
1874 "make check" doesn't finish with "All 1 tests passed".
1875
1876 * tests/regression.at (Token definitions): Don't rely on
1877 AT_PARSER_CHECK for data that contains backslashes. It currently
1878 uses 'echo', and 'echo' isn't portable if its argument contains
1879 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
1880 that the byte '\0xff' is not printable in the C locale; it is,
1881 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
1882 not printable, so use '\0x81' to test.
1883
1884 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
1885 version of GCC, since the macro is used with non-GCC compilers.
1886
1887 Fix core dump reported by Pablo De Napoli in
1888 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
1889 * tests/regression.at (Invalid inputs with {}): New test.
1890 * src/parse-gram.y (token_name): Translate type before using
1891 it as an index.
1892
1893 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
1894 the user's name space. All uses changed to __attribute__
1895 ((__unused__)).
1896 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
1897 Add __attribute__ ((__noreturn__)).
1898
1899 * etc/clcommit: Remove. We weren't using it, and it failed
1900 "make maintainer-distcheck".
1901 * Makefile.maint: Merge from coreutils.
1902 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
1903 (syntax-check-rules): Change list of rules as described below.
1904 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
1905 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
1906 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
1907 (sc_trailing_space): New rules.
1908 (sc_xalloc_h_in_src): Remove.
1909 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
1910 (sc_space_tab, sc_error_exit_success, sc_changelog):
1911 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
1912 (makefile-check, po-check, author_mark_check):
1913 (makefile_path_separator_check, copyright-check):
1914 Use grep -n, to make it easier to find violations.
1915 Use CVS_LIST and CVS_LIST_EXCEPT.
1916 (header_regexp, h_re): Remove.
1917 (dd_c): New macro.
1918 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
1919 (my-distcheck): Use more-modern GCC flags.
1920 (signatures, %.asc): Remove.
1921 (rel-files, announcement): Remove signatures.
1922 Restore old updating code, even though we don't use it, so
1923 that we're the same as coreutils.
1924 (alpha, beta, major): Depend on news-date-check.
1925 Make the upload commands.
1926
1927 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
1928 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
1929 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
1930 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
1931 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
1932 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
1933 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
1934 * tests/sets.at: Likewise.
1935
1936 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
1937 we comment out the Autoconf version number.
1938 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
1939 it's error-prone and "make maintainer-distcheck" rejects it.
1940
1941 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
1942 Indent calls to "error" to pacify "make maintainer-distcheck",
1943 when the calls are not intended to be translated.
1944 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
1945
1946 * src/Makefile.am (DEFS): Use +=, to pacify
1947 "make maintainer-distcheck".
1948 (bison_SOURCES): Add scan-skel.h.
1949 (sc_tight_scope): New rule, from coreutils.
1950
1951 * src/files.c (src_extension, header_extension):
1952 Now static, not extern.
1953 * src/getargs.c (short_options): Likewise.
1954 * src/muscle_tab.c (muscle_table): Likewise.
1955 * src/parse-gram.y (current_class, current_type, current_prec):
1956 Likewise.
1957 * src/reader.c (grammar_end, previous_rule_end): Likewise.
1958 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
1959 * src/main.c (main): Cast bindtextdomain and textdomain calls to
1960 void, to avoid warning when NLS is disabled.
1961 * src/output.c: Include scan-skel.h.
1962 (scan_skel): Remove decl, since scan-skel.h does this.
1963 (output_skeleton):
1964 Indent calls to "error" to pacify "make maintainer-distcheck".
1965 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
1966 * src/reader.h (gram_end, gram_lineno): New decls to pacify
1967 "make maintainer-distcheck".
1968 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
1969 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
1970 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
1971 (skel_lex_destroy, scan_skel): Move these decls to...
1972 * src/scan-skel.h: New file.
1973 * src/uniqstr.c (uniqstr_assert):
1974 Indent calls to "error" to pacify "make maintainer-distcheck".
1975
1976 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
1977 not @VAR@.
1978
1979 * tests/torture.at: Revamp to avoid misuse of atoi that
1980 "make maintainer-distcheck" complained about.
1981
1982 * examples/extexi (message): Don't print a message more than once,
1983 and omit line-number decoration that makes Emacs compile think
1984 that informative messages are worth worrying about.
1985
1986 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
1987
1988 * configure.ac: Update version number.
1989
1990 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
1991 accidentally.
1992 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
1993 autogenerated by the maintainer.
1994 * examples/calc++/.cvsignore: Add *.yy.
1995
1996 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
1997 * lib/bitset_stats.c (bitset_stats_init): Likewise.
1998 * lib/bitsetv.c (bitsetv_alloc): Likewise.
1999
2000 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
2001
2002 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
2003 from maintainer-distcheck about casting the argument of 'free'.
2004
2005 * NEWS: Mention recent yytname changes.
2006 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
2007
2008 * bootstrap: For translations that have not yet been upgraded to
2009 the new runtime-po domain, prime the pump by extracting the
2010 relevant strings from the obsolete translations. This code can be
2011 removed once the bison-runtime domain has been translated by each
2012 team.
2013
2014 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
2015 now that token names are already quoted.
2016
2017 Fix problem reported by Anthony Heading.
2018 * data/glr.c (YYTOKEN_TABLE): New macro.
2019 (yytname): Define if YYTOKEN_TABLE.
2020 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
2021 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
2022 (YYERROR_VERBOSE): Define the same way the other skeletons do.
2023 * src/output.c (prepare_symbols): Output token_table_flag.
2024
2025 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
2026
2027 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
2028 again if the first call fails.
2029
2030 * data/glr.c (yytnamerr): New function.
2031 (yyreportSyntaxError): Use it to dequote most string literals.
2032 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
2033 with other skeletons. All uses changed.
2034 (yytnameerr_): New function.
2035 (yyreport_syntax_error): Use it to dequote most string literals.
2036 * data/yacc.c (yytnamerr): New function.
2037 (yyerrlab): Use it to decode most string literals.
2038 * doc/bison.texinfo (Decl Summary, Calling Convention):
2039 Clarify quoting convention of yytname.
2040 * src/output.c (prepare_symbols): Quote all names. This undoes
2041 the 2005-04-17 change, which is now accomplished (mostly) via
2042 changes in the parsers as described above.
2043 * tests/regression.at (Token definitions, Web2c Actions):
2044 Undo most 2005-04-17 change here, too.
2045
2046 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
2047
2048 Fix more problems reported by twlevo@xs4all.nl.
2049 * tests/cxx-type.at: Don't pipe output of ./types through sed to
2050 remove trailing spaces. This loses the exit status of ./types,
2051 and isn't needed since ./types shouldn't be emitting trailing
2052 spaces.
2053 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
2054 as the stack isn't valid in that case.
2055
2056 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
2057 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
2058 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
2059 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
2060 is used.
2061 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
2062 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2063 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2064 Likewise.
2065
2066 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
2067 overly-picky compilers that reject 'char *foo = "bar";'.
2068
2069 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
2070 to FILE * parameter, not to stderr. This fixes a typo introduced
2071 in the 2005-07-12 change.
2072
2073 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
2074 warnings from GCC 4.
2075
2076 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
2077 (yyglrShiftDefer, yysplitStack):
2078 Remove unused parameters b4_pure_formals. All uses changed.
2079 (yyglrShift): Remove unused parameters b4_user_formals.
2080 All uses changed.
2081 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
2082
2083 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
2084
2085 Destructor cleanups and regularization among the three skeletons.
2086 * NEWS: Document the behavior changes.
2087 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
2088 stack before failing, as the cleanup code will do it for us now.
2089 * data/lalr1.cc (yyerrlab): Likewise.
2090 * data/glr.c (yyparse): Pop everything off the stack before
2091 freeing it, so that destructors get called properly.
2092 * data/lalr1.cc (yyreturn): Likewise.
2093 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
2094 This is more consistent.
2095 * doc/bison.texinfo (Destructor Decl): Mention more reasons
2096 why destructors might be called. 1.875 -> 2.1.
2097 (Destructor Decl, Decl Summary, Table of Symbols):
2098 Some English-language cleanups for %destructor.
2099 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2100 Add output line for destructor of start symbol.
2101 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
2102 because of that same extra output line.
2103
2104 * NEWS: Document minor wording changes in diagnostics of
2105 Bison-generated parsers.
2106 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
2107 Remove unused formals. All uses changed.
2108 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
2109 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
2110 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
2111 Rename yyoverflowab to yyexhaustedlab.
2112 When memory exhaustion occurs during syntax-error reporting,
2113 report it separately rather than in a single diagnostic; this
2114 eases translation.
2115 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
2116 (Memory Exhausted): Renamed from Parser Stack Overflow.
2117 Revamp wording slightly to prefer "memory exhaustion".
2118 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
2119
2120 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
2121
2122 Add i18n support to the GLR skeleton. Partially fix the C++
2123 skeleton; a C++ expert needs to finish this. Remove debugging
2124 msgids; there's little point to having them translated, since they
2125 can be understood only by someone who can read the
2126 (English-language) source code.
2127
2128 Generate runtime-po/bison-runtime.pot automatically, so that we
2129 don't have to worry about garbage getting in that file. We'll
2130 make sure after the next official release that old msgids don't
2131 get lost. See
2132 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
2133
2134 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
2135 Now auto-generated.
2136 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
2137 Fix typos in explanations of the runtime file.
2138 * bootstrap: Change gettext keyword from YYI18N to YY_.
2139 Use standard Makefile.in.in in runtime-po, since we'll arrange
2140 for backward-compatible bison-runtime.po files in a different way.
2141 * data/glr.c (YY_): New macro, from yacc.c.
2142 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
2143 Translate messages intended for users.
2144 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
2145 the wording in the other skeletons. We don't know that the memory
2146 is virtual.
2147 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
2148 Use same method that yacc.c uses.
2149 Don't translate debugging messages.
2150 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
2151 it doesn't work (yet), and requires C++ expertise to fix.
2152 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
2153 Move defn to a more logical place, to be consistent with other
2154 skeletons.
2155 Don't translate debugging messages.
2156 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
2157 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
2158 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
2159 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
2160
2161 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
2162 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
2163 void, not int.
2164 * tests/glr-regression.at (Badly Collapsed GLR States):
2165 Likewise.
2166 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2167 yylex should return 0 at EOF rather than aborting.
2168
2169 Improve tests for stack overflow in GLR parser.
2170 Problem reported by twlevo@xs4all.nl.
2171 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
2172 All uses removed.
2173 (yyStackOverflow): Just longjmp, but with value 2 so that caller
2174 can handle the problem.
2175 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
2176 (yyparse): New local variable yyresult to record the result.
2177 Use result of setjmp to set it, rather than storing itinto
2178 struct.
2179 (yyDone): Remove label.
2180 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
2181 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
2182 if YYABORT is used).
2183 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
2184 yyparse status; put status > 1 into diagnostic.
2185 Check that status==2 works.
2186 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
2187 Use exit status 3 for failure to open (which shouldn't happen).
2188
2189 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
2190
2191 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
2192 1 on syntax error; just let yyparse do its thing.
2193 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
2194 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
2195 (Exploding the Stack Size with Alloca):
2196 (Exploding the Stack Size with Malloc):
2197 Expect exit status 2, not 1, since the parser is supposed to blow
2198 its stack. Problem reported by twlevo@xs4all.nl.
2199
2200 * data/glr.c (yyparse): Don't assume that the initial calls
2201 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
2202 Print a stack-overflow message and fail instead.
2203 Initialize the line-number information before creating the stack,
2204 so that the stack-overflow message can report line zero safely.
2205
2206 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
2207
2208 Fix problems reported by twlevo@xs4all.nl.
2209 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
2210 (yyuserMerge): Provide a default case if b4_mergers is empty.
2211 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
2212 * tests/glr-regression.at
2213 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2214 Add casts to pacify C++ compilers.
2215 * tests/glr-regression.at (Improper merging of GLR delayed action
2216 sets): Declare yylex before using it.
2217 * tests/Makefile.am (maintainer-check-g++): Fix a stray
2218 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
2219 test for valgrind; valgrind is independent of g++.
2220 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
2221 for compatibility with POSIX 1003.1-2001 (if running coreutils).
2222 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
2223 Use a destructor, so that we can expand the stack. Change
2224 YYSTYPE to char * so that we can free it. Cast result of malloc.
2225
2226 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2227
2228 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
2229 a valgrind failure. Problem reported by twlevo@xs4all.nl.
2230
2231 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
2232
2233 * PACKAGING: New file, suggested by Bruno Haible and taken from
2234 similar wording in gettext's PACKAGING file.
2235 * NEWS: Mention PACKAGING.
2236 * Makefile.am (EXTRA_DIST): Add PACKAGING.
2237
2238 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
2239
2240 * NEWS: Document recent i18n improvements.
2241 * bootstrap: Get runtime translations into runtime-po.
2242 Create runtime-po files automatically, if possible.
2243 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
2244 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
2245 does not infringe on the user's name space.
2246 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
2247 * doc/bison.texinfo (Internationalization): Revamp the English
2248 and Texinfo syntax a bit, to try to make it clearer.
2249 (Bison Options, Option Cross Key): Mention --print-localedir.
2250 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
2251 YYENABLE_NLS. Quote a bit more.
2252 * runtime-po/.cvsignore: New file.
2253 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
2254 * runtime-po/Rules-quot: Remove; now created by bootstrap.
2255 * runtime-po/quot.sed: Likewise.
2256 * runtime-po/boldquot.sed: Likewise.
2257 * runtime-po/en@quot.header: Likewise.
2258 * runtime-po/en@boldquot.header: Likewise.
2259 * runtime-po/insert-header.sin: Likewise.
2260 * runtime-po/remove-potcdate.sin: Likewise.
2261 * runtime-po/Makevars: Likewise.
2262 * runtime-po/LINGUAS: Likewise.
2263 * runtime-po/de.po: Likewise; we will rely on the translation project
2264 to maintain this, so "bootstrap" should get it.
2265 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
2266 its value.
2267 * src/main.c (main): Bind the bison-runtime domain, too.
2268
2269 2005-07-12 Bruno Haible <bruno@clisp.org>
2270
2271 * data/yacc.c: Include <libintl.h> when NLS is enabled.
2272 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
2273 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
2274 * runtime-po: New directory.
2275 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
2276 $(DOMAIN).pot-update rule, so that old messages are never dropped.
2277 * runtime-po/Rules-quot: New file, copied from po/.
2278 * runtime-po/quot.sed: Likewise.
2279 * runtime-po/boldquot.sed: Likewise.
2280 * runtime-po/en@quot.header: Likewise.
2281 * runtime-po/en@boldquot.header: Likewise.
2282 * runtime-po/insert-header.sin: Likewise.
2283 * runtime-po/remove-potcdate.sin: Likewise.
2284 * runtime-po/Makevars: New file.
2285 * runtime-po/POTFILES.in: New file.
2286 * runtime-po/LINGUAS: New file.
2287 * runtime-po/bison-runtime.pot: New file.
2288 * runtime-po/de.po: New file.
2289 * m4/bison.m4: New file.
2290 * Makefile.am (SUBDIRS): Add runtime-po.
2291 (aclocaldir, aclocal_DATA): New variables.
2292 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
2293 Define aclocaldir.
2294 * src/getargs.c (usage): Document --print-localedir option.
2295 (PRINT_LOCALEDIR_OPTION): New enum item.
2296 (long_options): Add --print-localedir option.
2297 (getargs): Handle --print-localedir option.
2298 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
2299 (Internationalization): New section.
2300
2301 2005-07-12 Akim Demaille <akim@epita.fr>
2302
2303 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
2304 for consistency with the rest of the code.
2305 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
2306 Add separators.
2307
2308 2005-07-12 Akim Demaille <akim@epita.fr>
2309
2310 * src/parse-gram.y: Use %printer instead of YYPRINT.
2311
2312 2005-07-12 Akim Demaille <akim@epita.fr>
2313
2314 * src/symtab.h, src/symtab.c (symbol_print): New.
2315 * src/symlist.h, src/symlist.c (symbol_list_print): New.
2316 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
2317
2318 2005-07-12 Akim Demaille <akim@epita.fr>
2319
2320 * data/glr.c (b4_syncline): Fix (swap) the definitions of
2321 b4_at_dollar and b4_dollar_dollar.
2322
2323 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
2324
2325 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
2326 and Pennello's paper.
2327
2328 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
2329
2330 * data/yacc.c (yyparse): Undo previous patch. Instead,
2331 set yylsp[0] and yyvsp[0] only if the initial action
2332 sets yylloc and yylval, respectively.
2333
2334 * data/yacc.c (yyparse): In the initial action, set
2335 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
2336 This avoids the use of undefined variables if the initial
2337 action does not set yylloc and/or yylval.
2338
2339 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
2340
2341 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
2342 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
2343 Remove from CVS. These files are automatically generated.
2344 * examples/extexi: Clarify that this file is now part of Bison,
2345 not GNU M4, and that it works with any POSIX-compatible Awk.
2346 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
2347 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
2348 so that we also get calc++-parser.yy. Geneate it.
2349 Use $(AWK), not gawk, since any conforming Awk will do.
2350 Put comment before action, since older 'make' can't handle comment
2351 in action.
2352 $(BUILT_SOURCES): List all built sources, not just some of them.
2353 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
2354 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
2355 $($(calc_sources_generated)): Remove unnecessary test for existence
2356 of target. (This had a shell syntax error anyway; a stray "x".)
2357 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
2358 calc++-parser.yy.
2359 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
2360
2361 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
2362 implied by the other modules.
2363
2364 2005-07-06 Akim Demaille <akim@epita.fr>
2365
2366 Bind examples/calc++ to the package.
2367 * examples/calc++/Makefile: Remove, replaced by...
2368 * examples/calc++/Makefile.am: ... this new file.
2369 * examples/calc++/test: Remove input.
2370 * examples/calc++/compile: Remove.
2371 * examples/Makefile.am: New.
2372 * configure.ac, Makefile.am: Adjust.
2373 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
2374
2375 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
2376
2377 * data/glr.c (yyFail): Drastically simplify; since the format argument
2378 never had any % directives, we can simply pass it to yyerror.
2379 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
2380 be modified later, as that is the usual style in glr.c.
2381 Problems reported by Paul Hilfinger.
2382
2383 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
2384 and size overflow errors.
2385 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
2386 in case the user prolog sets feature-test macros like _GNU_SOURCE.
2387 (YYSIZEMAX): New macro.
2388 (yystpcpy): New function, taken from yacc.c.
2389 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
2390 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
2391 so that we don't have to maintain their signatures.
2392 (yyFail): Check for buffer overflow, by using vsnprintf rather
2393 than vsprintf. Allocate a bigger buffer if possible.
2394 Report an error if buffer allocation fails.
2395 (yyStackOverflow): New function.
2396 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
2397 the initialization was successful. It might fail if storage was
2398 exhausted.
2399 (yyexpandGLRStack): Add more checks for storage allocation failure.
2400 Use yyStackOverflow to report failures.
2401 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
2402 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
2403 Don't assume stack number fits in int.
2404 (yysplitStack): Check for storage allocation failure.
2405 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
2406 can print diagnostics on storage allocation failure. All callers
2407 changed.
2408 (yyresolveValue): Use yybool for boolean.
2409 (yyreportSyntaxError): Check for size-calculation overflow.
2410 This code is taken from yacc.c.
2411 (yyparse): Check for storage allocation errors when allocating
2412 the initial stack.
2413
2414 2005-07-05 Akim Demaille <akim@epita.fr>
2415
2416 Extract calc++ from the documentation.
2417 * doc/bison.texinfo (Calc++): Add the extraction marks.
2418 * examples/extexi: New, from the aborted GNU Programming 2E.
2419 Separate the different paragraph of a file with empty lines.
2420 * examples/Makefile: Use it to extract the whole calc++ example.
2421
2422 2005-06-24 Akim Demaille <akim@epita.fr>
2423
2424 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
2425 class typedefs.
2426
2427 2005-06-22 Akim Demaille <akim@epita.fr>
2428
2429 * doc/bison.texinfo (C++ Language Interface): First stab.
2430 (C++ Parsers): Remove.
2431
2432 2005-06-22 Akim Demaille <akim@epita.fr>
2433
2434 * data/lalr1.cc (yylex_): Honor %lex-param.
2435
2436 2005-06-22 Akim Demaille <akim@epita.fr>
2437
2438 Start a set of simple examples.
2439 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
2440 * examples/calc++/calc++-driver.hh,
2441 * examples/calc++/calc++-parser.yy,
2442 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
2443 * examples/calc++/compile, examples/calc++/test: New.
2444
2445 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
2446
2447 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
2448 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
2449 which stems from the 2005-05-27 patch.
2450
2451 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2452
2453 * data/glr.c: Modify treatment of unused parameters to permit use
2454 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
2455
2456 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
2457
2458 Fix infringement on user name space reported by Janos Zoltan Szabo.
2459 * data/yacc.c (yyparse): strlen -> yystrlen.
2460
2461 2005-05-30 Akim Demaille <akim@epita.fr>
2462
2463 * data/lalr1.cc (_): New.
2464 Translate the various messages.
2465
2466 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
2467
2468 Fix infringement on user name space reported by Bruno Haible.
2469 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
2470 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
2471 the user's name space.
2472 (alloca): Include <stdlib.h> to get it, if it's not built in.
2473 (YYMALLOC, YYFREE): Define only if needed.
2474 (malloc, free): Declare, but only if needed, as this infringes on
2475 the user name space.
2476
2477 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
2478
2479 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
2480 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
2481 with %d format.
2482 * lib/ebitset.c (min, max): Undef before defining.
2483 * lib/vbitset.c (min, max): Likewise.
2484 * lib/subpipe.c (create_subpipe): Save local variables in case
2485 vfork clobbers them.
2486
2487 2005-05-24 Bruno Haible <bruno@clisp.org>
2488
2489 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
2490 error message syntax used by gcc-4.0.
2491
2492 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
2493
2494 * README: Mention m4 1.4.3. Remove obsolete advice about
2495 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
2496
2497 * bootstrap: Remove workaround for problem I encountered with
2498 gettext 0.14.1; it seems to be fixed now.
2499
2500 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
2501
2502 * NEWS: Version 2.0a.
2503
2504 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
2505 the previous change.
2506
2507 Various maintainer cleanups.
2508 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
2509 conftest*, for benefit of CVS commands run at the same time as
2510 "configure". Add build-aux, since "bootstrap" now creates it and
2511 its subfiles.
2512 * Makefile.cfg (move_if_change): Remove.
2513 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
2514 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
2515 (po_repo, do-po-update, po-update, wget_files, get-targets):
2516 (config.guess-url_prefix, config.sub-url_prefix):
2517 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
2518 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
2519 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
2520 Remove.
2521 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
2522 this is now the recommended name.
2523 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
2524 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
2525 ylwrap. These files now go into build-aux.
2526 * config/move-if-change: Remove.
2527 * config/prev-version.txt: Bump from 1.75 to 2.0.
2528
2529 * bootstrap: Add stdio-safer, unistd-safer modules.
2530 Remove m4/glibc2.m4 (introduced by latest gnulib, but
2531 we don't need it).
2532 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
2533 fopen-safer.c, stdio-safer.h, unistd-safer.h.
2534 * lib/subpipe.c: Include "unistd-safer.h".
2535 (create_subpipe): Make sure all the newly-created
2536 file descriptors are > 2, so that diagnostics don't
2537 get sent down them (which might cause Bison to hang, in theory).
2538 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
2539 * src/files.c (xfopen): Use fopen_safer, not fopen.
2540
2541 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
2542 yesterday's yacc.c fix.
2543
2544 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
2545
2546 * data/glr.c, data/lalr1.cc: Update copyright date.
2547
2548 Fix a destructor bug reported by Wolfgang Spraul in
2549 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
2550 * data/yacc.c (yyabortlab): Don't call destructor, and
2551 don't set yychar to EMPTY.
2552 (yyoverflowlab): Don't call destructor.
2553 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
2554 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
2555 since we no longer output the message "discarding lookahead token
2556 end of input ()".
2557
2558 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2559
2560 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
2561 fix a small glitch in debugging output.
2562 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
2563 after YY_SYMBOL_PRINT where needed.
2564
2565 (struct yyGLRState): Add some comments.
2566 (struct yySemanticOption): Add some comments.
2567 (union yyGLRStackItem): Add comment.
2568
2569 (yymergeOptionSets): Correct this to properly perform the union,
2570 avoiding infinite reported by Michael Rosien.
2571 Update comment.
2572
2573 * tests/glr-regression.at: Add test for GLR merging error reported
2574 by M. Rosien.
2575
2576 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
2577
2578 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
2579 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
2580 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
2581 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
2582 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
2583 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
2584 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
2585 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
2586 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
2587 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
2588 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
2589 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
2590 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
2591 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
2592 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
2593 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
2594 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
2595 src/derives.h, src/files.c, src/files.h, src/getargs.c,
2596 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
2597 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
2598 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
2599 src/output.h, src/parse-gram.c, src/parse-gram.h,
2600 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
2601 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
2602 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
2603 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
2604 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
2605 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
2606 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
2607 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
2608 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
2609 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
2610 tests/reduce.at, tests/regression.at, tests/sets.at,
2611 tests/synclines.at, tests/testsuite.at, tests/torture.at:
2612 Update FSF postal mail address.
2613
2614 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
2615
2616 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
2617 Problem reported by Ralf Menzel.
2618
2619 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
2620
2621 * tests/actions.at: Test that stack overflow invokes destructors.
2622 From Marcus Holland-Moritz.
2623 * data/yacc.c (yyerrlab): Move the code that destroys the stack
2624 from here....
2625 (yyreturn): to here. That way, destructors are called properly
2626 even if the stack overflows, or the user calls YYACCEPT or
2627 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
2628 (yyoverflowlab): Destroy the lookahead.
2629
2630 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
2631
2632 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
2633
2634 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
2635
2636 * NEWS: Bison-generated C parsers no longer quote literal strings
2637 associated with tokens.
2638 * src/output.c (prepare_symbols): Don't escape strings,
2639 since users don't want to see C escapes.
2640 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
2641 in diagnostics.
2642 * tests/input.at (Torturing the Scanner): Likewise.
2643 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
2644
2645 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
2646
2647 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
2648 the data size is known to be too small and we can't increase it.
2649 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
2650
2651 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
2652
2653 * src/parse-gram.y: Include quotearg.h.
2654 (string_as_id): Quote $1 before using it as a key, since the
2655 lexer no longer quotes it for us.
2656 (string_content): Don't strip quotes, since lexer no longer
2657 quotes it for us.
2658 * src/scan-gram.l: Include quotearg.h.
2659 ("\""): Omit quote.
2660 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
2661 a key, since the rest of the lexer doesn't quote it.
2662 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
2663 * tests/regression.at (Token definitions): Check for backslashes
2664 in token strings.
2665
2666 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
2667 (YYSIZE_T): Define to unsigned long int when using an older compiler.
2668 (yyparse): Revamp code to generate long syntax error message, to
2669 make it easier to translate, and to avoid problems with arithmetic
2670 overflow. Change "virtual memory" to "memory" in diagnostic, since
2671 we don't know whether the memory is virtual.
2672
2673 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
2674
2675 * NEWS: Bison-generated C parsers now use the _ macro to
2676 translate strings.
2677 * data/yacc.c (_) [!defined _]: New macro.
2678 All English strings wrapped inside this macro.
2679 * doc/bison.texinfo (Bison Parser): Document _.
2680 * po/POTFILES.in: Include src/parse-gram.c, since it now
2681 includes translateable strings that parse-gram.y doesn't.
2682
2683 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
2684
2685 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
2686 reverting the 2004-10-11 change to this function.
2687 (symbol_check_alias_consistency): Don't call symbol_type_set
2688 if the type name is already correct.
2689 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
2690
2691 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
2692
2693 * tests/regression.at (Token definitions): Don't use a token named
2694 c, as that generates a "#define c ..." that runs afoul of buggy
2695 stdlib.h that uses the identifier c as a member of struct
2696 drand48_data. Problem reported by Horst Wente.
2697
2698 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
2699
2700 * bootstrap: Change translation URL from
2701 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
2702 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
2703 redirection glitches. Problem reported by twlevo@xs4all.nl.
2704
2705 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
2706
2707 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
2708 after operands; POSIX says this isn't portable for the c99 command.
2709
2710 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
2711
2712 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
2713 immediately if a data overrun has occurred; this may help us track
2714 down what may be a spurious failure on MacOS.
2715
2716 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
2717
2718 Respond to problems reported by twlevo@xs4all.nl.
2719
2720 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
2721
2722 * src/vcg.h: Comment fix.
2723 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
2724 (G_CMAX): Change to -1 instead of INT_MAX.
2725
2726 * data/yacc.c (yyparse): Omit spaces before #line.
2727
2728 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
2729
2730 * src/tables.c (state_number_to_vector_number): Put it inside an
2731 "#if 0", since it's not currently used. Problem reported by
2732 Roland McGrath.
2733
2734 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
2735
2736 * src/output.c (escaped_output): Renamed from
2737 escaped_file_name_output, since we now use it for symbol tags as
2738 well. All uses changed.
2739 (symbol_destructors_output, symbol_printers_output):
2740 Escape symbol tags too.
2741 Problem reported by Matyas Forstner in
2742 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
2743
2744 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
2745 not needed.
2746 * src/output.c (user_actions_output, token_definitions_output,
2747 symbol_destructors_output, symbol_printers_output): Likewise.
2748 * src/reader.c (prologue_augment): Likewise.
2749 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
2750
2751 * src/vcg.c (output_edge): Don't quote linestyle arg.
2752 Problem reported by twlevo@xs4all.nl.
2753
2754 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
2755
2756 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
2757 example, reported by Derek M Jones. Also, make the example even
2758 more outrageous, to better illustrate how bad the problem is.
2759
2760 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
2761
2762 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
2763 putsym. Typo reported by Sebastian Piping.
2764
2765 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
2766
2767 * doc/bison.texinfo (Language and Grammar): some -> same
2768 (Epilogue): int he -> in the
2769 Typos reported by Sebastian Piping via Justin Pence.
2770
2771 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
2772
2773 * tests/glr-regression.at (Improper handling of embedded actions
2774 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
2775 embedded actions and $-N in GLR parsers", work around an Autoconf bug
2776 with dollar signs in test names.
2777 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
2778 for a similar reason.
2779
2780 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
2781
2782 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
2783 wants to redefine G_VIEW.
2784
2785 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
2786
2787 * src/vcg.c (get_view_str): Remove case for normal_view.
2788 Problem reported by twlevo@xs4all.nl.
2789
2790 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
2791
2792 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
2793 Problem reported by twlevo@xs4all.nl.
2794
2795 * doc/bison.texinfo: Change @dircategory from "GNU programming
2796 tools" to "Software development". Requested by Richard Stallman
2797 via Karl Berry.
2798
2799 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
2800
2801 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
2802 Problem reported by twlevo@xs4all.nl.
2803
2804 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
2805
2806 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
2807 keyword; it's not needed with modern compilers, and it doesn't
2808 affect correctness with older compilers. Suggested by
2809 twlevo@xs4all.nl.
2810
2811 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
2812
2813 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
2814 gcc -Wswitch-default.
2815 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
2816 * data/yacc.c (yyparse): Likewise.
2817
2818 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
2819
2820 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
2821 already. Let config.h define any nonstandard values.
2822
2823 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
2824
2825 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
2826 for the benefit of slower hosts. Problem reported by
2827 Nelson H. F. Beebe.
2828
2829 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
2830
2831 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
2832 being defined and not used.
2833 * data/lalr1.cc (yyparse): Likewise.
2834 Use "if (false)" rather than "if (0)".
2835
2836 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
2837
2838 * TODO: Mention that we should allow NUL bytes in tokens.
2839
2840 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
2841
2842 * src/scan-skel.l (<<EOF>>): Don't close standard output.
2843 Problem reported by Hans Aberg.
2844
2845 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
2846
2847 * src/getargs.c (version): Happy new year; update overall
2848 program copyright date from 2004 to 2005.
2849
2850 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
2851 Problem reported by Hans Aberg.
2852 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
2853 (Output file names.): Add a test for the case when standard output
2854 is closed.
2855
2856 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
2857
2858 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
2859 to fix an oversight in the Bison 2.0 manual.
2860
2861 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
2862
2863 * NEWS: Version 2.0. Reformat the existing news items since
2864 1.875, so that related items are grouped together.
2865 * configure.ac (AC_INIT): Bump version to 2.0.
2866 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
2867
2868 * tests/torture.at (Exploding the Stack Size with Alloca): Set
2869 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
2870 otherwise, we're not testing alloca. Unfortunately there's no
2871 simple way to consult HAVE_ALLOCA here.
2872
2873 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
2874 for yymsg, too.
2875
2876 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
2877 hand. This avoids a warning about comparing int to size_t when
2878 GCC warnings are enabled.
2879
2880 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
2881
2882 * NEWS: Bison-generated parsers no longer default to using the
2883 alloca function (when available) to extend the parser stack, due
2884 to widespread problems in unchecked stack-overflow detection.
2885 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
2886 responsibility to set it to a positive value. This lets the user
2887 specify a value that is not a preprocessor constant.
2888 * data/yacc.c (YYMAXDEPTH): Likewise.
2889 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
2890 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
2891 to be a compile-time constant. However, explain the constraints on it.
2892 Also, explain the constraints on YYINITDEPTH.
2893 (Table of Symbols): Explain that alloca is no longer the default.
2894 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
2895 to 1.
2896
2897 * doc/bison.texinfo (Location Default Action): Mention that n must
2898 be zero when k is zero. Suggested by Frank Heckenbach.
2899
2900 2004-12-22 Akim Demaille <akim@epita.fr>
2901
2902 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
2903 (parser::state_type, parser::semantic_type, parser::location_type):
2904 Private, not public.
2905 (parser::parse): Return ints, not bool.
2906 Returning a bool introduces a problem: 0 corresponds to false, and
2907 it seems weird to return false on success. Returning true changes
2908 the conventions for yyparse.
2909 Alternatively we could return void and send an exception.
2910 There is no clear consensus (yet?).
2911 (state_stack, semantic_stack, location_stack): Rename as...
2912 (state_stack_type, semantic_stack_type, location_stack_type): these.
2913 Private, not public.
2914 * tests/c++.at: New.
2915 * tests/testsuite.at, tests/Makefile.am: Adjust.
2916
2917 2004-12-21 Akim Demaille <akim@epita.fr>
2918
2919 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
2920
2921 2004-12-21 Akim Demaille <akim@epita.fr>
2922
2923 Don't impose std::string for filenames.
2924
2925 * data/lalr1.cc (b4_filename_type): New.
2926 (position::filename): Use it.
2927 (parser.hh): Move the inclusion of stack.hh and location.hh below
2928 the user code, so that needed headers for the filename type can be
2929 included first.
2930 Forward declare them before the user code.
2931 * tests/Makefile.am (check-local, installcheck-local): Pass
2932 TESTSUITEFLAGS to the TESTSUITE.
2933
2934 2004-12-20 Akim Demaille <akim@epita.fr>
2935
2936 Use more STL like names: my_class instead of MyClass.
2937
2938 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
2939 (SemanticStack, SemanticType, StateStack, StateType)
2940 (TokenNumberType, Stack, Slice, Traits, Parser::location)
2941 (Parser::value): Rename as...
2942 (location_stack, location_type, rhs_number_type, semantic_stack)
2943 (semantic_type, state_stack, state_type, token_number_type, stack)
2944 (slice, traits, parser::yylloc, parser::yylval): these.
2945
2946 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
2947
2948 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
2949
2950 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
2951 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
2952
2953 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
2954
2955 Remove uses of 'short int' and 'unsigned short int'. This raises
2956 some arbitrary limits. It uses more memory but nowadays that's
2957 not much of an issue.
2958
2959 This change does not affect the generated parsers; that's a different
2960 task, as some users will want to conserve memory there.
2961
2962 Ideally we should use size_t to represent all object counts, and
2963 something like ptrdiff_t to represent signed differences of object
2964 counts; but that will require more code-cleanup than I have the
2965 time to do right now.
2966
2967 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
2968 Use size_t, not int or short int, to count objects.
2969 * src/closure.c (nritemset, closure): Likewise.
2970 * src/closure.h (nritemset, closure): Likewise.
2971 * src/nullable.c (nullable_compute): Likewise.
2972 * src/print.c (print_core): Likewise.
2973 * src/print_graph.c (print_core): Likewise.
2974 * src/state.c (state_compare, state_hash): Likewise.
2975 * src/state.h (struct state): Likewise.
2976 * src/tables.c (default_goto, goto_actions): Likewise.
2977
2978 * src/gram.h (rule_number, rule): Use int, not short int.
2979 * src/output.c (prepare_rules): Likewise.
2980 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
2981 errs, reductions): Likewise.
2982 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
2983 Likewise.
2984 * src/tables.c (vector_number, tally, action_number,
2985 ACTION_NUMBER_MINIMUM): Likewise.
2986 * src/output.c (muscle_insert_short_int_table): Remove.
2987
2988 2004-12-17 Akim Demaille <akim@epita.fr>
2989
2990 * data/lalr1.cc: Extensive Doxygenation.
2991 (error_): Rename as...
2992 (error): this, since it is visible to the user.
2993 Adjust callers.
2994 (Parser::message): Now an automatic variable from...
2995 (Parser::yyreport_syntax_error_): here.
2996 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
2997 Parser::error.
2998 * tests/input.at: Escape $.
2999
3000 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
3001
3002 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
3003 Parenthesize rhs to avoid obscure problems with mistakes like
3004 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
3005 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3006 b4_rhs_location): Likewise.
3007 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3008 b4_rhs_location): Likewise.
3009
3010 2004-12-16 Akim Demaille <akim@epita.fr>
3011
3012 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
3013 yacc.c: be sure to stay within yycheck_.
3014 * tests/actions.at: Re-enable C++ tests.
3015
3016 2004-12-16 Akim Demaille <akim@epita.fr>
3017
3018 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
3019 real.
3020
3021 2004-12-16 Akim Demaille <akim@epita.fr>
3022
3023 Use #define to handle the %name-prefix.
3024
3025 * data/glr.c, data/yacc.c: Comment changes.
3026 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
3027 so that one can refer to yylex in the parser file, and have it
3028 renamed, as is the case with other skeletons.
3029
3030 2004-12-16 Akim Demaille <akim@epita.fr>
3031
3032 Move lalr1.cc internals into yy*.
3033
3034 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
3035 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
3036 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
3037 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
3038 (empty_, final_, terror_, errcode_, ntokens_)
3039 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
3040 (looka_, ilooka_, error_range_, nerrs_):
3041 Rename as...
3042 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
3043 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
3044 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
3045 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
3046 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
3047 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
3048 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
3049 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
3050 these.
3051
3052 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
3053
3054 Fix some problems reported by twlevo at xs4all.
3055 * src/symtab.c (symbol_new): Report an error if the input grammar
3056 contains too many symbols. This is better than calling abort() later.
3057 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
3058 (struct node, struct graph):
3059 Rename member expand to stretch. All uses changed.
3060 (struct graph): Remove member layoutalgorithm. All uses removed.
3061 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
3062 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
3063 All uses changed.
3064 (N_STRETCH): Rename from N_EXPAND. All uses changed.
3065
3066 2004-12-15 Akim Demaille <akim@epita.fr>
3067
3068 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
3069 Add more Doxygen comments.
3070 (symprint_, stack_print_, reduce_print_, destruct_, pop)
3071 (report_syntax_error_, translate_): Rename as...
3072 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
3073 (yypop_, yyreport_syntax_error_, yytranslate_): this.
3074
3075 2004-12-15 Akim Demaille <akim@epita.fr>
3076
3077 * data/lalr1.cc (lex_): Rename as...
3078 (yylex_): this.
3079 Move the trace here.
3080 Take the %name-prefix into account.
3081 Reported by Alexandre Duret-Lutz.
3082
3083 2004-12-15 Akim Demaille <akim@epita.fr>
3084
3085 Simplify the C++ parser constructor.
3086
3087 * data/lalr1.cc (debug_): Rename as...
3088 (yydebug_): so that the parser's internals are always in the yy*
3089 pseudo namespace.
3090 Adjust uses.
3091 (b4_parse_param_decl): Remove the leading comma as it is now only
3092 called as unique argument list.
3093 (Parser::Parser): Remove the constructor accepting a location and
3094 an initial debugging level.
3095 Remove from the other ctor the argument for the debugging level.
3096 (debug_level_type, debug_level, set_debug_level): New.
3097
3098 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
3099 constructor calls.
3100
3101 2004-12-15 Akim Demaille <akim@epita.fr>
3102
3103 Remove b4_root related material: failure experiment
3104 (which goal was to allow to derive from a class).
3105
3106 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
3107 definitions and uses.
3108
3109 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
3110
3111 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
3112 not 2, since it's not portable to subtract 1 from the start of an
3113 array. The new item 0 is never set or used. All uses changed.
3114
3115 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
3116 the default definition of YYLLOC_DEFAULT. Problem reported
3117 by Frank Heckenbach.
3118
3119 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
3120
3121 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
3122 the normal case and one for the error case. Just use the
3123 first one uniformly. Problem reported by Frank Heckenbach.
3124 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
3125 use exactly the same macro in both places.
3126 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
3127 so that the normal-case YYRHSLOC works for the error case too.
3128 All uses changed.
3129 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
3130 (YYLLOC_DEFAULT): Use the same macro as glr.c.
3131 * doc/bison.texinfo (Location Default Action): Don't claim that
3132 we have an array of locations. Use the same macro for both glr
3133 and lalr parsers. Mention YYRHSLOC. Mention what happens when
3134 the index is 0.
3135
3136 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
3137
3138 * HACKING: Update email addresses to send announcements to.
3139
3140 * configure.ac (AC_INIT): Bump version to 1.875f.
3141
3142 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
3143
3144 * NEWS: Version 1.875e.
3145 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
3146
3147 * src/scan-skel.l: Include "complain.h", for "fatal".
3148
3149 * src/relation.h (relation_print, relation_digraph):
3150 Relation sizes are of type relation_node, not size_t (this is
3151 merely a doc fix, since the two types are equivalent).
3152 (relation_transpose): Relation sizes are of type relation_node,
3153 not int.
3154 * src/relation.c: Likewise.
3155 (top, infinity): Now of type relation_node, not int.
3156 (traverse, relation_transpose): Use relation_node, not int.
3157
3158 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
3159 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
3160 (yyparse): Remove unused local introduced in 2004-10-25 patch.
3161
3162 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
3163 specifying whether the test should be skipped. Use it tp
3164 specify that the [%defines %skeleton "lalr1.cc"] tests currently
3165 fail on some hosts, and should be skipped.
3166
3167 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
3168
3169 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
3170 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
3171 unless otherwise specified below.
3172
3173 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
3174 to allocate kernel_base, kernel_items, kernel_size, since
3175 they needn't be initialized to 0.
3176 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
3177 * src/closure.c (new_closure): Likewise, for itemset.
3178 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
3179 * src/lalr.c (set_goto_map): Likewise, for temp_map.
3180 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
3181 (build_relations): Likewise for edge, states1, includes.
3182 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
3183 * src/reader.c (packgram): Likewise, for ritem, rules.
3184 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
3185 * src/relation.c (relation_digraph): Likewise for VERTICES.
3186 (relation_transpose): Likewise for new_R, end_R.
3187 * src/symtab.c (symbols_token_translations_init): Likewise for
3188 token_translations.
3189 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
3190 (token_actions): Likewise for yydefact, actrow, conflrow,
3191 conflict_list.
3192 (save_column): Likewise for froms[symno], tos[symno].
3193 (goto_actions): Likewise for state_count.
3194 (pack_table): Likewise for base, pos, check.
3195 (tables_generate): Likewise for width.
3196
3197 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
3198 for initial core. Just have a separate core, so we needn't worry
3199 about whether kernel_size and kernel_base are initialized.
3200
3201 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
3202 kernel_size, kernel_items): Remove unnecessary initialization.
3203 * src/conflicts.c (conflicts): Likewise.
3204 * src/derives.c (derives): Likewise.
3205 * src/muscle_tablc (muscle_insert): Likewise.
3206 * src/relation.c (relation_digraph): Likewise.
3207 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
3208 conflrow, conflict_table, conflict_list, table, check):
3209 Likewise.
3210
3211 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
3212 This is because all callers pass unsigned int.
3213 * src/closure.h (new_closure): Likewise.
3214
3215 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
3216 (build_relations): Initialize includes[i] in all cases.
3217 * src/reader.c (packgram): Always initialize rules[ruleno].prec
3218 and rules[ruleno].precsym. Initialize members in order.
3219 * src/relation.c (relation_transpose): Always initialize new_R[i]
3220 and end_R[i].
3221 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
3222
3223 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
3224 conflict_list[0] was always 0, but now it isn't initialized.
3225
3226 * src/table.c (table_grow): When conflict_table grew, the grown
3227 area wasn't cleared. Fix this.
3228
3229 * lib/.cvsignore: Add strdup.c, strdup.h.
3230 * m4/.cvsignore: Add strdup.m4.
3231
3232 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
3233
3234 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
3235 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
3236 GOTO_NUMBER_MAXIMUM, since we occasionally compute
3237 ngotos + 1 without checking for overflow.
3238 (build_relations): Use END_NODE, not -1, to denote end of edges.
3239 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
3240 build_relations): Use goto_number, not int, for goto numbers.
3241 * src/tables.c (save_column, default_goto): Likewise.
3242
3243 2004-11-23 Akim Demaille <akim@epita.fr>
3244
3245 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
3246 of #defining from yystype.
3247 Don't typedef yystype, C++ does not need it.
3248 This lets it possible to forward declare it as union.
3249
3250 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
3251
3252 * bootstrap (gnulib_modules): Add extensions.
3253 Problem reported by Jim Meyering.
3254
3255 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
3256
3257 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
3258 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
3259 src/system.h, src/tables.c: XFREE -> free, to accommodate
3260 recent change to gnulib xalloc.h.
3261 Problem reported by Jim Meyering.
3262
3263 2004-11-17 Akim Demaille <akim@epita.fr>
3264
3265 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
3266
3267 2004-10-28 Akim Demaille <akim@epita.fr>,
3268 Alexandre Duret-Lutz <adl@gnu.org>
3269
3270 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
3271 changes.
3272 (YYCDEBUG): Adjust.
3273 Use it instead of cdebug_.
3274 (Parser::debug_stream, Parser::set_debug_stream): New.
3275 (Parser::symprint_): Define cdebug_ for temporary backward
3276 compatibility.
3277 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
3278 debug_stream ().
3279
3280 2004-11-17 Akim Demaille <akim@epita.fr>
3281
3282 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
3283 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
3284 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
3285 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
3286
3287 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
3288
3289 * data/glr.c (yyloc_default): Remove; not used.
3290 Problem reported by Frank Heckenbach.
3291
3292 2004-10-25 Akim Demaille <akim@epita.fr>
3293
3294 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
3295 Introduce another definition to address simple location arrays.
3296 (yyGLRStack): New member: yyerror_range.
3297 (yyrecoverSyntaxError, yyparse): Update it.
3298 (yyrecoverSyntaxError): Use it when shifting the error token to
3299 have an accurate range, equivalent to the one computed by both
3300 yacc.c and lalr1.cc.
3301 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
3302 that column numbers start at column 0, as per GNU Coding
3303 Standards, the others tests, and the doc.
3304 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
3305 Adjust to the above change (first column is 0).
3306 And adjust the location of the "<error>", now covering the whole
3307 line.
3308
3309 2004-10-22 Akim Demaille <akim@epita.fr>
3310 and Paul Eggert <eggert@cs.ucla.edu>
3311
3312 Remove some arbitrary limits on goto numbers and relations.
3313 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
3314 initial values, since they're never used.
3315 (set_goto_map): ngotos is now unsigned, so test for overflow
3316 by seeing whether it wraps around to zero.
3317 * src/lalr.h (goto_number): Now size_t, not short int.
3318 (GOTO_NUMBER_MAXIMUM): Remove.
3319 * src/relation.c (relation_print, traverse, relation_transpose):
3320 Check for END_NODE rather than looking at sign.
3321 * src/relation.h (END_NODE): New macro.
3322 (relation_node): Now size_t, not short int.
3323
3324 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
3325
3326 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
3327 keyword, not an identifier. Problem reported by Baron Schwartz in
3328 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
3329
3330 2004-10-11 Akim Demaille <akim@epita.fr>
3331
3332 * src/symtab.c (symbol_check_alias_consistency): Also check
3333 type names, destructors, and printers.
3334 Reported by Alexandre Duret-Lutz.
3335 Recode the handling of associativity and precedence in terms
3336 of symbol_precedence_set.
3337 Accept no redeclaration at all, not even equal to the previous
3338 value.
3339 (redeclaration): New.
3340 Use it to factor redeclaration complaints.
3341 (symbol_make_alias): Don't set the type of the alias, let
3342 symbol_check_alias_consistency do it as for other features.
3343 * src/symtab.h (symbol): Add new member prec_location, and
3344 type_location.
3345 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
3346 * tests/input.at (Incompatible Aliases): New.
3347
3348 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
3349
3350 .cvsignore fixes to accommodate gnulib changes,
3351 and the practice of naming build directories "_build".
3352 * .cvsignore: Add "_*". Sort.
3353 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
3354 * m4/.cvsignore: Add "*_gl.m4".
3355
3356 2004-10-06 Akim Demaille <akim@epita.fr>
3357
3358 * src/parse-gram.y (add_param): Fix the truncation of trailing
3359 spaces.
3360
3361 2004-10-05 Akim Demaille <akim@epita.fr>
3362
3363 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
3364 whether the reducion was empty or not. This leaves room to
3365 improve the use of YYLLOC_DEFAULT in such a case.
3366 lalr1.cc is still experimental, so changing this is acceptable.
3367 And finally, there are probably not many users who changed the
3368 handling of locations in GLR, so changing is admissible too.
3369
3370 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
3371 empty reduction, set @$ to an empty location ending the previously
3372 stacked symbol.
3373 Adjust uses to make sure the code is triggered on empty
3374 reductions.
3375 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
3376 expected output: empty reductions have empty locations.
3377
3378 2004-09-29 Akim Demaille <akim@epita.fr>
3379
3380 * data/lalr1.cc: Move towards a more standard C++ coding style
3381 for templates: Class < T > -> Class<T>.
3382
3383 2004-09-29 Akim Demaille <akim@epita.fr>
3384
3385 * data/lalr1.cc: Reinstall the former ctor, for sake of
3386 compatibility, but warn it will be removed.
3387 Move towards a more standard C++ coding style (i.e., type *var ->
3388 type* var).
3389
3390 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
3391
3392 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
3393 since it's less likely to work if NULs are involved in the future.
3394
3395 2004-09-27 Akim Demaille <akim@epita.fr>
3396
3397 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
3398
3399 2004-09-27 Akim Demaille <akim@epita.fr>
3400
3401 * data/lalr1.cc (b4_parse_param_decl_1): New.
3402 (b4_parse_param_decl): Use it to have different names between attribute
3403 and argument names.
3404 (b4_cc_constructor_call): Likewise.
3405
3406 2004-09-24 Akim Demaille <akim@epita.fr>
3407
3408 * src/parse-gram.y (add_param): Strip the leading and trailing
3409 blanks from a formal argument declaration.
3410 (YY_LOCATION_PRINT): New.
3411
3412 2004-09-24 Akim Demaille <akim@epita.fr>
3413
3414 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
3415 after the location.
3416
3417 2004-09-24 Akim Demaille <akim@epita.fr>
3418
3419 * doc/bison.texinfo (Table of Symbols): Sort.
3420
3421 2004-09-21 Akim Demaille <akim@epita.fr>
3422
3423 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
3424 the useless parentheses.
3425 Suggested by Paul Eggert.
3426
3427 2004-09-20 Akim Demaille <akim@epita.fr>
3428
3429 Let the initial-action act on the look-ahead, and use it for the
3430 "initial push" (corresponding to an hypothetical beginning-of-file).
3431 And let lalr1.cc honor %initial-action.
3432
3433 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
3434 example.
3435 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
3436 (Parser::Parser): Remove the ctor that used to initialize it.
3437 (Parser::parse): Like in the other skeletons, issue the "starting
3438 parse" message before any action.
3439 Honor %initial-action.
3440 Initialize the stacks with the lookahead.
3441 * data/yacc.c: Let $$ and @$ in %initial-action designate the
3442 look-ahead.
3443 Push them in the stacks.
3444 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
3445
3446 2004-09-20 Akim Demaille <akim@epita.fr>
3447
3448 * doc/bison.texinfo (Initial Action Decl): New.
3449
3450 2004-09-20 Akim Demaille <akim@epita.fr>
3451
3452 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
3453 clearer criterion to define it.
3454 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
3455 When reducing on an empty RHS, use the latest stacked location as
3456 location.
3457 yylloc is not always available.
3458 * data/glr.c: Likewise.
3459 Also, honor initial-actions.
3460
3461 2004-09-20 Akim Demaille <akim@epita.fr>
3462
3463 * data/yacc.c (YY_LOCATION_PRINT): New.
3464 Define when we know YYLTYPE's structure, i.e., when the default
3465 YYLLOC_DEFAULT is used.
3466 * data/c.m4 (b4_yysymprint_generate): Use it.
3467 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
3468 value of the result.
3469 (error_start_): Replace with...
3470 (error_range_): this location array.
3471 This allows to replace code relying on the implementation of
3472 locations by portable code.
3473 * data/yacc.c (yylerrsp): Replace with...
3474 (yyerror_range): this.
3475 Every time a token is popped, update yyerror_range[0], to have an
3476 accurate location for the error token.
3477 * data/glr.c (YY_LOCATION_PRINT): New.
3478 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
3479 deference a pointer.
3480 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
3481 report the location in %printers.
3482
3483 * src/scan-skel.l: Instead of abort, report error messages to ease
3484 understanding skeleton scanning failures.
3485
3486 2004-09-16 Akim Demaille <akim@epita.fr>
3487
3488 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
3489 (iterator, const_iterator): these, to be more in the C++ spirit.
3490 Also, return reverse iterators so that when displaying the stack
3491 we display its bottom first.
3492 (Parser::stack_print_, Parser::reduce_print_): Match the messages
3493 from yacc.c.
3494 We should probably use vector here though.
3495
3496 2004-09-16 Akim Demaille <akim@epita.fr>
3497
3498 Have more complete shift traces.
3499
3500 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
3501 to report Shifts instead of ad hoc YYDPRINTF invocations,
3502 including for the error token.
3503 * data/lalr1.cc (symprint_): Output the location.
3504 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
3505 output the location within the %printer.
3506 Activate GLR tests, at least to make sure they compile properly.
3507 They still don't pass though.
3508 * tests/calc.at: Adjust expect verbose output, since now "Entering
3509 state..." is on a different line than the "Shifting" message.
3510
3511 2004-09-08 Akim Demaille <akim@epita.fr>
3512
3513 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
3514 Bison directive from the Bison file to the invocation of this
3515 macro, so that these directives are passed to
3516 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
3517 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
3518 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
3519 the extra Bison directives instead of the whole series.
3520 Change the grammar so that there are recoverable errors, and
3521 unrecoverable errors. Now we can have the parser give up before
3522 consuming the whole input. As a result we now can observe that
3523 the lookahead is freed when needed.
3524 Change the parser source to parse argv[1] instead of a hard coded
3525 string.
3526 Simplify yylex, and give a value and location to EOF.
3527 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
3528 passed directives already coded in the file.
3529 Add some tests to check the location of "error".
3530 For some tests, the C++ parser is correct, and not yacc.c.
3531 For other tests, they provide different, but unsatisfying, values,
3532 so keep the C++ value so that at least one parser is "correct"
3533 according to the test suite.
3534 (Actions after errors): Remove, this is subsumed by the
3535 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
3536
3537 2004-09-06 Akim Demaille <akim@epita.fr>
3538
3539 * data/lalr1.cc: Adjust the indentation of the labels.
3540 (Parser::pop): New.
3541 Use it.
3542
3543 2004-09-06 Akim Demaille <akim@epita.fr>
3544
3545 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
3546 argument, an informative message.
3547 Call YY_SYMBOL_PRINT.
3548 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
3549 * data/lalr1.cc (destruct_): Likewise.
3550 In addition, no longer depend on b4_yysymprint_generate and
3551 b4_yydestruct_generate to generate these functions, do it "by
3552 hand".
3553
3554 2004-09-03 Akim Demaille <akim@epita.fr>
3555
3556 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
3557 invoked, yydestruct the lookahead.
3558 * tests/calc.at (Calculator $1): Update the expected lengths of
3559 traces: there is an added line for the discarded lookahead.
3560 * doc/bison.texinfo (Destructor Decl): Some rewording.
3561 Define "discarded" symbols.
3562
3563 2004-09-02 Akim Demaille <akim@epita.fr>
3564
3565 * data/lalr1.cc (translate_, destruct_): No reason to be static.
3566
3567 2004-09-02 Akim Demaille <akim@epita.fr>
3568
3569 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
3570 (YYDSYMPRINTF): Rename as...
3571 (YY_SYMBOL_PRINT): this.
3572 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
3573 two.
3574 Use it instead of direct symprint_ calls.
3575 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
3576 one.
3577
3578 2004-09-02 Akim Demaille <akim@epita.fr>
3579
3580 * data/lalr1.cc (b4_yysymprint_generate): New.
3581 (symprint_): New member function, defined when YYDEBUG.
3582 Use it consistently instead of token/nterm debugging output by
3583 hand.
3584 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
3585 %printer calls to use cdebug_ when using lalr1.cc.
3586
3587 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
3588
3589 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
3590 with #ifdef YYDEBUG.
3591
3592 2004-08-26 Akim Demaille <akim@epita.fr>
3593
3594 * doc/bison.texinfo (Implementing Loops): Rename as...
3595 (Implementing Gotos/Loops): this.
3596
3597 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
3598
3599 Adjust to latest gnulib.
3600 * bootstrap (gnulib_modules): Add xalloc-die.
3601 Set LC_ALL=C so that file names sort consistently.
3602 Prefer the gnulib copies of gettext.m4, glibc21.m4,
3603 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
3604 uintmax_t.m4, ulonglong.m4.
3605 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
3606 po.m4 since we are now using _gl.m4 instead.
3607
3608 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
3609
3610 * src/scan-action.l: Remove. Scanning of semantic actions is
3611 handled in scan-gram.l.
3612
3613 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
3614
3615 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
3616
3617 * src/location.h (struct): The file member is a uniqstr.
3618 (equal_boundaries): Use UNIQSTR_EQ for comparison.
3619
3620 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
3621
3622 Fix bug with non-%union parsers that have printers or destructors,
3623 which led to a Bison core dump. Reported by Peter Fales in
3624 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
3625
3626 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
3627 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
3628 not to our own type.
3629 * src/output.c (symbol_destructors_output, symbol_printers_output):
3630 Don't assume %union.
3631 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
3632 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
3633 UNION-FLAG. All callers changed.
3634 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
3635 Use type char, not unsigned int, when declaring an array of char;
3636 this lets us remove a cast.
3637 (Printers and Destructors): Add non-%union test cases.
3638
3639 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
3640
3641 * doc/bison.texinfo: Minor editorial changes, mostly to the new
3642 GLR writeups. E.g., avoid frenchspacing and the future tense,
3643 change "lookahead" to "look-ahead", and change "wrt" to "with
3644 respect to".
3645
3646 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3647
3648 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
3649 New sections, split off from the GLR Parsers section. Put the new
3650 Simple GLR Parser near the start of the GLR section, for clarity.
3651 Rewrite connective text.
3652
3653 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
3654
3655 * doc/bison.texinfo (Simple GLR Parsers): New section.
3656
3657 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
3658
3659 * NEWS, TODO, doc/bison.texinfo:
3660 Use "look-ahead" instead of "lookahead", to be consistent.
3661 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
3662 while we're fixing "look-ahead".
3663 * src/conflicts.c (shift_set): Renamed from shiftset.
3664 (look_ahead_set): Renamed from lookaheadset.
3665 * src/print.c: Likewise.
3666 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
3667 name for "lookahead".
3668 (report_types, usage): Likewise.
3669 * src/getargs.h (report_look_ahead_tokens): Renamed from
3670 report_lookaheads.
3671 * src/lalr.c (compute_look_ahead_tokens): Renamed from
3672 compute_lookaheads.
3673 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
3674 (look_ahead_tokens_print): Renamed from lookaheads_print.
3675 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
3676 state_rule_lookaheads_print.
3677 * src/state.h: Likewise.
3678 (reductions.look_ahead_tokens): Renamed from lookaheads.
3679 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
3680 AT_DATA_LOOKAHEADS_GRAMMAR.
3681
3682 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
3683
3684 * README: Update location of patched M4 distribution.
3685
3686 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
3687
3688 Don't assume the C++ compiler takes the same arguments as the C compiler
3689 (trivial change).
3690 * configure.ac (O0CXXFLAGS): New var.
3691 * tests/atlocal.in (CXXFLAGS): Use it.
3692
3693 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
3694
3695 Fix some "make check" problems with C++ reported by
3696 Albert Chin-A-Young for Tru64 C++ in this thread:
3697 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
3698
3699 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
3700 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3701 Output to a .cc file for C++, not to a .c file.
3702 * tests/calc.at (AT_CHECK_CALC): Likewise.
3703 * tests/regression.at (AT_CHECK_DANCER): Likewise.
3704 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
3705
3706 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
3707
3708 * tests/calc.at, tests/actions.at: Workaround for SGI
3709 C++ compiler. (trivial change)
3710
3711 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
3712
3713 Spent a few hours checking out which prerequisite versions the
3714 current sources actually require. I went all the way back to
3715 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
3716 a seemingly endless set of combinations of versions more recent
3717 than that. The bottom line is that the current sources require
3718 fairly recent versions of the build tools, and it'll be some work
3719 to change this.
3720 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
3721 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
3722 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
3723 Add comments explaining why those particular versions are
3724 currently needed.
3725
3726 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
3727 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
3728 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
3729
3730 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
3731 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
3732
3733 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
3734
3735 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
3736 0.11.5. Suggested by Bruno Haible.
3737 * bootstrap: Remove gettext version checking.
3738
3739 * doc/bison.texinfo (Decl Summary): Also mention that %union
3740 can depend on prerequisite types. Problem reported by Tim
3741 Van Holder.
3742
3743 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
3744
3745 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
3746 * README-alpha: Don't tell people not to package this.
3747
3748 * bootstrap: Don't assume $(...) works; use `...` instead.
3749 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
3750 gettext better.
3751
3752 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
3753 put into the -d output file, and mention what to do if YYSTYPE is
3754 defined as a macro.
3755
3756 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
3757
3758 Undo change made earlier today: it caused autopoint to not bring
3759 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
3760 autopoint's.
3761
3762 * bootstrap: Check that gettext version matches what's in
3763 configure.ac. Warn users to ignore robots.txt ERROR 404.
3764 * bootstrap: Undo today's earlier change (logged below).
3765 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
3766
3767 The gettext version checking is causing more trouble than it's
3768 curing; remove it. Problem reported by Paul Hilfinger.
3769
3770 * bootstrap: Issue a warning that one can expect a message
3771 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
3772 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
3773
3774 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
3775
3776 Ensure that the C++ compiler used for testing actually works on a
3777 simple test program; if not, skip the C++-related tests. Problem
3778 reported by Vin Shelton in:
3779 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
3780
3781 * m4/cxx.m4: New file.
3782 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
3783 * tests/atlocal.in (BISON_CXX_WORKS): Add.
3784 * tests/local.at (AT_COMPILE_CXX): Use it.
3785
3786 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
3787
3788 * data/glr.c (yylloc): Output this macro even if locations are not
3789 being generated, as the GLR parser needs it even in that case.
3790 Problem reported by Troy A. Johnson
3791 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
3792
3793 * configure.ac (AC_INIT): Update to 1.875e.
3794
3795 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
3796
3797 * NEWS: Version 1.875d.
3798 * configure.ac (AC_INIT): Likewise.
3799 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
3800
3801 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
3802 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
3803 lalr1.cc runs afoul of the first, and the last two are no longer
3804 supported by GCC 3.4.0.
3805 * README: Mention GNU m4 1.4 or later; mention m4 patches.
3806 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
3807
3808 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
3809
3810 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
3811 unsigned int, for compatibility with latest gnulib hash module.
3812 * src/state.c (state_hash, state_hasher): Likewise.
3813 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
3814 * src/uniqstr.c (hash_uniqstr): Likewise.
3815
3816 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
3817
3818 * NEWS: Unescaped newlines are no longer allowed in char & strings.
3819
3820 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
3821 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
3822 character and string literals.
3823 (unexpected_end): New function.
3824 (unexpected_eof): Use it.
3825 (unexpected_newline): New function.
3826 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
3827 actions.
3828
3829 * NEWS: Document %expect-rr.
3830
3831 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
3832 Fix typo by replacing $1 with $option.
3833 Remove more 'intl'-related files.
3834 Don't DEFUN AM_INTL_SUBDIR twice.
3835
3836 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
3837 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
3838 strtoul.c.
3839 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
3840 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
3841 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
3842 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
3843 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
3844 * src/.cvsignore: Add *.output.
3845
3846 * src/parse-gram.y: Put copyright notice inside %{ %} so it
3847 gets copied to the output file.
3848
3849 2004-04-28 Paul Eggert <eggert@twinsun.com>
3850
3851 Get files from the gnulib and po repositories, instead of relying
3852 on them being in our CVS. Upgrade to latest versions of gnulib
3853 and Automake.
3854
3855 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
3856 * bootstrap: Bootstrap from gnulib and po repositories.
3857 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
3858 * README-cvs: Document these changes. Remove version numbers from
3859 mentions of build tools, since they change so often. Mention Flex.
3860
3861 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
3862 (gl_USE_SYSTEM_EXTENSIONS): Add.
3863 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
3864 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
3865 does this for us.
3866 (AC_ISC_POSIX): Remove; we no longer support this
3867 ancient OS, as it gets in the way of latest Autoconf & gnulib.
3868 (AC_HEADER_STDC): Remove: we now assume C89 or better.
3869 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
3870 Do not check for C89 headers, except for locale.h which is used
3871 by the Yacc library and must port to K&R hosts.
3872 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
3873 Do not check for C89 functions, except for setlocale which is
3874 used by the Yacc library.
3875 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
3876 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
3877 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
3878 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
3879 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
3880 AM_GNU_GETTEXT): Remove; now done by:
3881 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
3882 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
3883 for us.
3884
3885 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
3886 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
3887 Define to empty, as gnulib.mk will do the rest for us.
3888 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
3889 for us.
3890 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
3891 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
3892
3893 * src/files.c: Include gnulib's xstrndup.h.
3894
3895 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
3896 (REALLOC): Use xnrealloc, for likewise.
3897 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
3898 (strnlen, memrchr): Remove decls; functions no longer used.
3899 Include <stpcpy.h>.
3900
3901 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
3902 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3903 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
3904 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
3905 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
3906 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
3907 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
3908 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
3909 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
3910 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
3911 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
3912 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3913 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
3914 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
3915 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
3916 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
3917 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
3918 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
3919 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
3920 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
3921 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
3922 Remove, as these files are now generated automatically
3923 by bootstrap or automake.
3924
3925 * po/ChangeLog: Remove: all but one entry was a duplicate
3926 of this file, and I moved that 2000-11-02 entry here.
3927
3928 * config/.cvsignore: Add Makefile, depcomp, install-sh.
3929 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
3930 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
3931 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
3932 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
3933 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
3934 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
3935 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
3936 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
3937 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
3938 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
3939 xstrndup.h.
3940 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
3941 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
3942 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
3943 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
3944 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
3945 * src/.cvsignore: Remove *_.c.
3946
3947
3948 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
3949 support it. (The latest stable gzip doesn't.)
3950
3951 2004-04-27 Paul Eggert <eggert@twinsun.com>
3952
3953 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
3954 case, as stos_ is now used by destructors due to the 2004-02-09
3955 change.
3956
3957 Remove more K&R C support.
3958 * lib/libiberty.y (PARAMS): Remove. All uses removed.
3959 * lib/subpipe.c (errno): Remove decl.
3960 Include <stdlib.h> unconditionally.
3961 (EXIT_FAILURE): Remove macro.
3962 * src/complain.c (vfprintf, strerror): Remove.
3963 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
3964 unconditionally.
3965 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
3966 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
3967 (strchr, strspn, memchr): Remove decls.
3968 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
3969 unconditionally. Do not declare perror.
3970 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
3971 unconditionally.
3972
3973 * src/complain.c (_): Remove useless defn, as system.h defines this.
3974
3975 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
3976 with latest obstack.h.
3977 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
3978 to procedure types, as obstack.h now does that for us.
3979 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
3980
3981 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
3982 so that this include file can stand alone.
3983 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
3984 does this now. Include subpipe.h first after config.h, to
3985 test whether it can stand alone.
3986
3987 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
3988 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
3989 unused declaration.
3990
3991 * tests/synclines.at (%union synch line): Put a dummy member in
3992 the union, because empty unions aren't allowed in C. Caught
3993 by GCC 3.4.0.
3994
3995 2004-04-13 Jim Meyering <jim@meyering.net>
3996
3997 * src/conflicts.c (conflicts_print): Correct format string typo:
3998 use `%%' to produce literal `%'. (trivial change)
3999
4000 2004-03-30 Paul Eggert <eggert@twinsun.com>
4001
4002 * src/getargs.c (version): Update copyright year to 2004.
4003
4004 * data/c.m4 (b4_int_type): Use 'short int' rather than
4005 'short', and similarly for 'long', 'unsigned', etc.
4006 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
4007 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
4008 yy_yypstack, yydumpstack): Likewise.
4009 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
4010 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
4011 Likewise.
4012 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
4013 yy_stack_print, yyparse): Likewise.
4014 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
4015 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
4016 * lib/bitset.c (bitset_print): Likewise.
4017 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
4018 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
4019 * lib/bitsetv.c (bitsetv_dump): Likewise.
4020 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
4021 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
4022 Likewise.
4023 * src/LR0.c (allocate_itemsets): Likewise.
4024 * src/gram.h (rule_number, rule): Likewise.
4025 * src/lalr.h (goto_number): Likewise.
4026 * src/nullable.c (nullable_compute): Likewise.
4027 * src/output.c (prepare_rules): Likewise.
4028 * src/relation.c (relation_print, relation_digraph): Likewise.
4029 * src/relation.h (relation_node): Likewise.
4030 * src/state.h (state_number, transitions, errs, reductions,
4031 struct state): Likewise.
4032 * src/symtab.h (symbol_number, struct symbol): Likewise.
4033 * src/tables.c (vector_number, tally, action_number,
4034 default_goto, goto_actions): Likewise.
4035 * tests/existing.at (GNU Cim Grammar): Likewise.
4036 * tests/regression.at (Web2c Actions): Likewise.
4037
4038 * src/output.c (muscle_insert_short_int_table): Renamed from
4039 muscle_insert_short_table. All uses changed.
4040
4041 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4042
4043 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
4044 (declaration): Replace expected_conflicts with expected_sr_conflicts.
4045 Add %expect-rr rule.
4046
4047 * src/scan-gram.l: Recognize %expect-rr.
4048
4049 * src/conflicts.h (expected_sr_conflicts): Rename from
4050 expected_conflicts.
4051 (expected_rr_conflicts): Declare.
4052
4053 * src/conflicts.c (expected_sr_conflicts): Rename from
4054 expected_conflicts.
4055 (expected_rr_conflicts): Define.
4056 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
4057 for GLR parsers.
4058 Use expected_sr_conflicts in place of expected_conflicts.
4059 Warn if expected_rr_conflicts used in non-GLR parser.
4060
4061 * doc/bison.texinfo: Add documentation for %expect-rr.
4062
4063 2004-03-08 Paul Eggert <eggert@gnu.org>
4064
4065 Add support for hex token numbers. Suggested by Odd Arild Olsen in
4066 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
4067
4068 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
4069 in lalr1.cc.
4070 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
4071 * src/scan-gram.l (scan_integer): New function.
4072 ({int}): Use it.
4073 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
4074 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
4075 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
4076 Say "long int", not "long", for uniformity with GNU style.
4077
4078 2004-02-25 Paul Eggert <eggert@twinsun.com>
4079
4080 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
4081 compilers. This fixes a problem with Intel's C++ compiler being
4082 chatty, reported by Guido Trentalancia in
4083 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
4084
4085 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
4086
4087 Support %destructor and merge error locations in lalr1.cc.
4088
4089 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
4090 (Parser::stos_): Define unconditionally.
4091 (Parser::destruct_): New method. Generate its body with
4092 b4_yydestruct_generate.
4093 (Parser::error_start_): New attribute.
4094 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
4095 token which are discarded.
4096 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
4097 error_start_ when erroneous token are discarded.
4098 (Parser::parse) <yyerrlab1>: Compute the location of the error
4099 token so that it covers all the discarded tokens.
4100 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
4101 it can be called with `%skeleton "lalr1.cc"', and do that.
4102
4103 2004-02-02 Paul Eggert <eggert@twinsun.com>
4104
4105 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
4106 $(top_srcdir)/lib and ../lib. This fixes a bug reported
4107 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
4108 There's no need to mention top_builddir since Automake does that
4109 for us.
4110 (INCLUDES): Remove, as Automake says it's obsolescent.
4111 Contents migrated into AM_CPPFLAGS as described above.
4112 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
4113
4114 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4115
4116 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
4117 (yyreportSyntaxError): Handle case where lookahead token is
4118 YYEMPTY.
4119
4120 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4121
4122 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
4123 resulting parsers are compilable with C++.
4124
4125 2003-12-23 Paul Eggert <eggert@twinsun.com>
4126
4127 * config/depcomp, config/install-sh: Sync with Automake 1.8.
4128 * src/output.c (output_skeleton): Rename local var.
4129 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
4130 Bison tokens, as this runs afoul of the 2003-10-07 change that
4131 disallowed NUL bytes in character constants or string literals.
4132
4133 * tests/local.at: Require Autoconf 2.59's Autotest.
4134 * tests/testsuite.at: Don't include local.at, since we now assume
4135 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
4136 including it.
4137 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
4138 multiple inclusion warnings.
4139
4140 2003-12-02 Akim Demaille <akim@epita.fr>
4141
4142 * doc/bison.texinfo (How Can I Reset the Parser): More about start
4143 conditions.
4144 From Bruno Haible.
4145
4146 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
4147
4148 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
4149
4150 2003-10-07 Paul Eggert <eggert@twinsun.com>
4151
4152 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
4153 if testsuite doesn't exist.
4154
4155 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
4156 literals, unfortunately.
4157 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
4158 Complain about NUL bytes in character constants or string literals.
4159
4160 2003-10-05 Paul Eggert <eggert@twinsun.com>
4161
4162 * NEWS: Don't document %no-default-prec, as it's still
4163 too experimental.
4164 * doc/bison.texinfo: Document %no-default-prec only if
4165 the defaultprec flag is set. Normally it's not.
4166
4167 2003-10-04 Paul Eggert <eggert@twinsun.com>
4168
4169 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
4170 non-modifiable lvalue, instead of a modifiable one.
4171 * doc/bison.texinfo (Actions): Document that $$ can
4172 be assigned to. Do not claim that $$ and $N are
4173 array element references: user code should not rely on this.
4174
4175 2003-10-01 Paul Eggert <eggert@twinsun.com>
4176
4177 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
4178 (grammar_declaration): Use it.
4179 * src/scan-gram.l: New token %no-default-prec.
4180 * tests/conflicts.at: Revamp tests to use %no-default-prec.
4181 * NEWS, doc/bison.texinfo: Document the above.
4182
4183 2003-10-01 Akim Demaille <akim@epita.fr>
4184
4185 VCG no longer supports long_straight_phase.
4186
4187 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
4188 * src/print_graph.c (print_graph): Adjust.
4189
4190 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
4191 and Paul Eggert <eggert@twinsun.com>
4192
4193 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
4194 Table of Symbols): Document %default-prec.
4195 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
4196 (grammar_declaration): Set default_prec on %default-prec.
4197 * src/scan-gram.l (%default-prec): New token.
4198 * src/reader.h (default_prec): New flag.
4199 * src/reader.c: Likewise.
4200 (packgram): Handle it.
4201 * tests/conflicts.at (%default-prec without %prec,
4202 %default-prec with %prec, %default-prec 1): New tests.
4203
4204 2003-09-30 Paul Eggert <eggert@twinsun.com>
4205
4206 * tests/testsuite.at: Include local.at, not input.at, fixing
4207 a typo in the 2003-08-25 patch.
4208
4209 2003-08-27 Akim Demaille <akim@epita.fr>
4210
4211 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
4212 GCC warnings.
4213
4214 2003-08-26 Akim Demaille <akim@epita.fr>
4215
4216 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
4217 "<\#" to avoid magic from Gnus when posting parts of this script.
4218
4219 2003-08-26 Akim Demaille <akim@epita.fr>
4220
4221 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
4222 (Parser::parse): here.
4223 Adjust: nerrs and errstatus is now replaced by...
4224 (Parser::nerrs_, Parser::errstatus_): New.
4225
4226 2003-08-25 Akim Demaille <akim@epita.fr>
4227
4228 * config/announce-gen, Makefile.cfg: New.
4229 * Makefile.am: Adjust.
4230 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
4231 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
4232
4233 2003-08-25 Akim Demaille <akim@epita.fr>
4234
4235 When reducing initial empty rules, Bison parser read an initial
4236 location that is not defined. This results in garbage, and that
4237 affects Bison's own parser. Therefore we need (i) to extend Bison
4238 to support a means to initialize this location, and (ii) to use
4239 this CVS Bison to fix CVS Bison's parser.
4240
4241 * src/reader.h, reader.c (epilogue_augment): Remove, replace
4242 with...
4243 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
4244 * src/parse-gram.y: Adjust.
4245 (%initial-action): New.
4246 (%error-verbose): Since we require CVS Bison, there is no reason
4247 not to use it.
4248 * src/scan-gram.l: Adjust.
4249 * src/Makefile.am (YACC): New, to make sure we use our own parser.
4250 * data/yacc.c (yyparse): Use b4_initial_action.
4251
4252 2003-08-25 Akim Demaille <akim@epita.fr>
4253
4254 * doc/bison.texinfo: Don't promote stdout for error messages.
4255
4256 2003-08-25 Akim Demaille <akim@epita.fr>
4257
4258 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
4259 From Alexandre Duret-Lutz.
4260
4261 2003-08-25 Akim Demaille <akim@epita.fr>
4262
4263 Version 1.875c.
4264
4265 2003-08-25 Akim Demaille <akim@epita.fr>
4266
4267 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
4268 Use them.
4269
4270 2003-08-25 Akim Demaille <akim@epita.fr>
4271
4272 * data/lalr1.cc (Parser::reduce_print_): New.
4273 Use it.
4274
4275 2003-08-25 Akim Demaille <akim@epita.fr>
4276
4277 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
4278 error recovery loops. This patch is based on
4279 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
4280 Also, augment the similarity between lalr1.cc and yacc.c.
4281 Note: the locations of error recovery rules are not correct yet.
4282
4283 * data/lalr1.cc: Comment changes to augment the similarity between
4284 lalr1.cc and yacc.c.
4285 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
4286 (yyerrlab1): Remove, but where it used to be (now the bottom part of
4287 yyerrlab), when hitting EOF, pop the whole stack here instead of
4288 merely falling thru the default error handling mechanism.
4289 (yyerrorlab): New label, with the old contents of YYERROR,
4290 plus the following change: pop the stack of rhs corresponding
4291 to the production that invoked YYERROR. That is how Yacc
4292 behaves (required by POSIX).
4293 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
4294 fail.
4295
4296 2003-08-25 Akim Demaille <akim@epita.fr>
4297
4298 Tune local.at so that people can "autom4te -l autotest calc.at -o
4299 calc" for instance, to extract a sub test suite.
4300
4301 * tests/testsuite.at: Move the initialization, Autotest version
4302 requirement, and AT_TESTED invocation into...
4303 * tests/local.at: here.
4304 * tests/testsuite.at: Include it for compatibility with Autoconf
4305 2.57.
4306 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
4307 be ignore.
4308
4309 2003-08-04 Paul Eggert <eggert@twinsun.com>
4310
4311 Rework code slightly to avoid gcc -Wtraditional warnings.
4312 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
4313 The returned value is now stored in *YY0. All callers changed.
4314 * src/output.c (merge_output): Adjust to the above change.
4315
4316 2003-07-26 Paul Eggert <eggert@twinsun.com>
4317
4318 * data/glr.c (YYASSERT): New macro.
4319 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
4320 yyresolveStates, yyprocessOneStack):
4321 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
4322 Derived from a suggestion by Frank Heckenbach.
4323
4324 2003-07-25 Paul Eggert <eggert@twinsun.com>
4325
4326 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
4327 for portability to K&R C (after ansi2knr, presumably). See
4328 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
4329 by Frank Heckenbach, though I have omitted the structure-initialization
4330 part of his glr-knr.diff patch since I recall that the Portable
4331 C Compiler didn't require that change.
4332
4333 Let the user specify how to allocate and free memory.
4334 Derived from a suggestion by Frank Heckenbach in
4335 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
4336 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
4337 All uses of free, malloc, realloc changed to use these macros,
4338 and unnecessary casts removed.
4339 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
4340
4341 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
4342
4343 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
4344 use s.empty() rather than s == "" to test for empty string; see
4345 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
4346 (trivial change)
4347
4348 2003-06-25 Akim Demaille <akim@epita.fr>
4349
4350 * config/depcomp, config/install-sh: Update from masters.
4351
4352 2003-06-20 Paul Eggert <eggert@twinsun.com>
4353
4354 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
4355 and return properly parenthesized result.
4356 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
4357 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4358 Remove unnecessary parentheses from uses.
4359 * doc/bison.texinfo (Location Default Action): Describe the
4360 conventions for parentheses.
4361
4362 2003-06-19 Paul Eggert <eggert@twinsun.com>
4363
4364 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
4365 yyreportTree): Do not assume that size_t is the same width as int,
4366 when printing sizes. Print sizes using an unsigned format.
4367 Problem reported by Frank Heckenbach in
4368 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4369
4370 Port to Forte Developer 7 C compiler.
4371 * data/glr.c (struct YYLTYPE): If locations are not being used,
4372 declare a single dummy member, as empty structs do not conform
4373 to the C standard.
4374 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
4375 the Forte Developer 7 C compiler complains that end-of-loop
4376 code is not reached.
4377
4378 2003-06-17 Paul Eggert <eggert@twinsun.com>
4379
4380 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
4381 avoid warnings from picky compilers about redefinition of PARAMS.
4382
4383 2003-06-17 Paul Eggert <eggert@twinsun.com>
4384
4385 Version 1.875b.
4386
4387 * NEWS: Document 1.875b.
4388
4389 * lib/bbitset.h: Do not include config.h; that's the includer's job.
4390 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
4391 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
4392 Don't use 'index' in comments, as it's a builtin fn on some hosts.
4393 * lib/bitset_stats.c: Include gettext.h unconditionally, as
4394 per recent gettext manual's suggestion.
4395 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
4396 Use prototypes, not old-style definitions.
4397 * lib/lbitset.c (lbitset_unused_clear): Likewise.
4398 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
4399 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
4400 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
4401 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
4402 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
4403 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
4404 vbitset_or_and_cmp, vbitset_copy): Likewise.
4405
4406 * lib/libiberty.h: Do not include config.h; that's the includer's job.
4407 Do not include <stdlib.h>.
4408 (PARAMS): Define unconditionally for C89.
4409 (ATTRIBUTE_NORETURN): Remove.
4410 (ATTRIBUTE_UNUSED): Define unconditionally.
4411
4412 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
4413 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
4414 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
4415 * lib/vbitset.c, lib/vbitset.h: New files.
4416 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
4417 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
4418 from libbitset.
4419
4420 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
4421 `How Can I Reset @code{yyparse}', since texinfo does not allow
4422 arbitrary @ in node names.
4423
4424 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
4425 shouldn't be needed according to the gettext 0.12.1 documentation
4426 but which seem to be needed anyway: codeset.m4 glibc21.m4
4427 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
4428 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
4429 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
4430
4431 * lib/.cvsignore: Add stdbool.h.
4432 * m4/.cvsignore: Add nls.m4, po.m4.
4433
4434 Upgrade to CVS gnulib.
4435 * stdbool_.h: File renamed from stdbool.h.in.
4436 * configure.ac (AM_STDBOOL_H): Invoke this instead of
4437 AC_HEADER_STDBOOL.
4438 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
4439 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
4440 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
4441 (MOSTLYCLEANFILES): New var.
4442 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
4443 (stdbool.h): New rule.
4444 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
4445 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
4446 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
4447 m4/quote.m4: Upgrade to today's gnulib.
4448
4449 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
4450 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
4451 the tests right now.
4452 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
4453 yyerror are declared before use; C99 requires this.
4454
4455 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4456
4457 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
4458 first.
4459 (yyrecoverSyntaxError): Correct the logic for setting and testing
4460 yyerrState.
4461 Correct comment on handling EOF.
4462 Allow states with only a default reduction, rather than failing
4463 (I can't quite reconstruct why these were not allowed before).
4464
4465 Fixes to avoid problem that $-N rules in GLR parsers can cause
4466 buffer overruns, corrupting state.
4467
4468 * src/output.c (prepare_rules): Output max_left_semantic_context
4469 definition.
4470 * src/reader.h (max_left_semantic_context): New variable declaration.
4471 * src/scan-gram.l (max_left_semantic_context): Define.
4472 (handle_action_dollar): Update max_left_semantic_context.
4473 * data/glr.c (YYMAXLEFT): New definition.
4474 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
4475 (yyresolveAction): Ditto.
4476
4477 Fixes to problems with location handling in GLR parsers reported by
4478 Frank Heckenbach (2003/06/05).
4479
4480 * data/glr.c (YYLTYPE): Make trivial if locations not used.
4481 (YYRHSLOC): Add parentheses, and define only if locations used.
4482 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
4483 locations not used.
4484 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
4485 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
4486
4487 * tests/cxx-type.at: Exercise location information; update tests
4488 to differentiate output with and without locations.
4489 Remove forward declarations of yylex and yyerror---caused errors
4490 because default YYLTYPE not yet defined.
4491 Change semantic actions to compute strings, rather than printing
4492 them directly (to test proper passing of semantics values). Change
4493 output to prefix notation and update test data and expected results.
4494 (yylex): Track locations.
4495 (stmtMerge): Return value rather than printing, and include arguments
4496 in value.
4497
4498 2003-06-03 Paul Eggert <eggert@twinsun.com>
4499
4500 Avoid warnings generated by GCC 2.95.4 when Bison is
4501 configured with --enable-gcc-warnings.
4502 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
4503 yy::]b4_parser_class_name[::translate_,
4504 yy::Stack::operator[] (unsigned),
4505 yy::Stack::operator[] (unsigned) const,
4506 yy::Slice::operator[] (unsigned),
4507 yy::Slice::operator[] (unsigned) const):
4508 Rename local vars to avoid warnings.
4509 * tests/glr-regression.at (Improper handling of embedded actions
4510 and $-N in GLR parsers): Remove unused local variable from yylex.
4511 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
4512 (void) as arg when not pure, since we now assume C89 when building
4513 Bison. Pacify GCC by using parameter.
4514
4515 2003-06-02 Paul Eggert <eggert@twinsun.com>
4516
4517 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
4518 yy::Location::lines, yy::Location::columns): Rename arguments
4519 to avoid shadowing; this removes a warning generated by GCC 3.3.
4520
4521 2003-06-01 Paul Eggert <eggert@twinsun.com>
4522
4523 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
4524 to g++, as GCC 3.3 complains if you do it.
4525 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
4526 everything that WARNING_CFLAGS has, except omit warnings
4527 not suitable for C++.
4528 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
4529 * tests/atlocal.in (CXXFLAGS): New var.
4530 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
4531
4532 Fix a GLR parser bug I reported in February; see
4533 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
4534 The problem was that GLR parsers did not conform to the C standard,
4535 because actions like { $1 = $2 + $3; } expanded to expressions
4536 that invoked YYFILL in separate subexpressions, and YYFILL assigned
4537 to a local variable. The C standard says that expressions
4538 like (var = f ()) + (var = f ()) have undefined behavior.
4539 Another problem was that GCC sometimes issues warnings that
4540 yyfill and its parameters are unused.
4541
4542 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
4543 as possibly unused.
4544 (yyfill): New function.
4545 (YYFILL): Use it.
4546 (yyuserAction): Change type of yynormal to bool, so that it matches
4547 the new yyfill signature. Mark it as possibly unused.
4548
4549
4550 Follow up on a bug I reported in February, where a Bison-generated
4551 parser can loop. Provide a test case and a fix for yacc.c. I
4552 don't have a fix for lalr1.cc or for glr.c, unfortunately.
4553 The original bug report is in:
4554 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
4555
4556 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
4557 macro's size was becoming unwieldy.
4558 (yyerrlab): Do not discard an empty lookahead symbol, as this
4559 might destroy garbage.
4560 (yyerrorlab): New label, with the old contents of YYERROR,
4561 plus the following change: pop the stack of rhs corresponding
4562 to the production that invoked YYERROR. That is how Yacc
4563 behaves, and POSIX requires this behavior.
4564 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
4565 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
4566 Define 'alarm' to do nothing if unistd.h is not available.
4567 Add a new rule "exp: '-' error;" to test the above change to
4568 data/yacc.c. Use 'alarm' to abort any test taking longer than
4569 10 seconds, as it's probably looping.
4570 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
4571 Also, the new yacc.c generates two fewer diagnostics for an
4572 existing test.
4573
4574 2003-05-24 Paul Eggert <eggert@twinsun.com>
4575
4576 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
4577 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
4578 This fixes a problem reported by John Bowman when the Compaq/HP
4579 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
4580 -ansi -Wall -gall).
4581 * data/yacc.c (union yyalloc): Likewise.
4582 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
4583
4584 Switch from 'int' to 'bool' where that makes sense.
4585
4586 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
4587 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
4588 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
4589 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
4590 Return or accept bool, not int. All callers changed.
4591 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
4592 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
4593 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
4594 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
4595 bitset_or_and_cmp_): Likewise.
4596 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
4597 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
4598 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
4599 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
4600 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
4601 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
4602 bitset_stats_or_and_cmp): Likewise.
4603 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
4604 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
4605 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
4606 ebitset_xor_cmp): Likewise.
4607 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
4608 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
4609 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
4610 lbitset_xor_cmp): Likewise.
4611 * lib/bbitset.h: Include <stdbool.h>.
4612 (struct bitset_vtable): The following members now return bool, not
4613 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
4614 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
4615 or_and_cmp).
4616 * src/conflicts.c (count_rr_conflicts): Likewise.
4617 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
4618 All uses changed.
4619 * lib/ebitset.c (ebitset_obstack_init): Likewise.
4620 * lib/lbitset.c (lbitset_obstack_init): Likewise.
4621 * src/getargs.c (debug_flag, defines_flag, locations_flag,
4622 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
4623 graph_flag): Likewise.
4624 * src/getargs.h (debug_flag, defines_flag, locations_flag,
4625 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
4626 graph_flag): Likewise.
4627 * src/output.c (error_verbose): Likewise.
4628 * src/output.h (error_verbose): Likewise.
4629 * src/reader.c (start_flag, typed): Likewise.
4630 * src/reader.h (typed): Likewise.
4631 * src/getargs.c (LOCATIONS_OPTION): New constant.
4632 (long_options, getargs): Use it.
4633 * src/lalr.c (build_relations): Use bool, not int.
4634 * src/nullable.c (nullable_compute): Likewise.
4635 * src/print.c (print_reductions): Likewise.
4636 * src/tables.c (action_row, pack_vector): Likewise.
4637 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
4638 * src/output.c (prepare): Use it.
4639 * src/output.c (token_definitions_output,
4640 symbol_destructors_output, symbol_destructors_output): Use string,
4641 not boolean integer, to keep track of whether to output separator.
4642 * src/print_graph.c (print_core): Likewise.
4643 * src/state.c (state_rule_lookaheads_print): Likewise.
4644
4645 * config/install-sh: Sync from automake 1.7.5.
4646
4647 2003-05-14 Paul Eggert <eggert@twinsun.com>
4648
4649 * src/parse-gram.y (rules_or_grammar_declaration): Require a
4650 semicolon after a grammar declaration, in the interest of possible
4651 future changes to the Bison input language.
4652 Do not allow a stray semicolon at the start of the grammar.
4653 (rhses.1): Allow one or more semicolons after any rule, including
4654 just before "|" as required by POSIX.
4655 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
4656 grammar.
4657
4658 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
4659
4660 %parse-param support for lalr1.cc.
4661
4662 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
4663 b4_cc_constructor_calls, b4_cc_constructor_call,
4664 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
4665 definitions.
4666 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
4667 parse-param arguments.
4668 (yy::b4_parser_class_name): Declare instance variables to
4669 hold parse-param arguments.
4670 * tests/calc.at: s/value/semantic_value/ because value clashes
4671 with a member of yy::b4_parser_class_name. Adjust C++ code
4672 to handle %parse-param. Enable %parse-param test in C++.
4673
4674 2003-05-12 Paul Eggert <eggert@twinsun.com>
4675
4676 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
4677 English a bit. Fix fclose typo. Change "const char" to "char
4678 const", and use ANSI C rather than K&R for "main". Suggest
4679 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
4680 and suggest yy_switch_to_buffer.
4681
4682 2003-05-05 Paul Eggert <eggert@twinsun.com>
4683
4684 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
4685 C89. This avoids a diagnostic on compilers that define __STDC__
4686 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
4687 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
4688
4689 2003-05-03 Paul Eggert <eggert@twinsun.com>
4690
4691 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
4692 Do not overrun array bounds.
4693 This should fix a bug reported today by Olatunji Oluwabukunmi in
4694 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
4695
4696 2003-04-29 Akim Demaille <akim@epita.fr>
4697
4698 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
4699 * src/getargs.c, src/getargs.h: here, as bool, not int.
4700 (nondeterministic_parser): New.
4701 * src/parse-gram.y, src/scan-gram.l: Support
4702 %nondeterministic-parser.
4703 * src/output.c (prepare): Use nondeterministic_parser instead
4704 of glr_parser where appropriate.
4705 * src/tables.c (conflict_row, action_row, save_row)
4706 (token_actions, token_actions, pack_vector): Ditto.
4707
4708 2003-04-29 Akim Demaille <akim@epita.fr>
4709
4710 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
4711
4712 2003-04-29 Akim Demaille <akim@epita.fr>
4713
4714 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
4715 with %pure-parser and %locations to exercise the patch from Yakov
4716 Markovitch below.
4717
4718 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
4719
4720 * data/yacc.c: (b4_lex_param): Corrected for the case where
4721 %lex-param is provided and %pure-parser isn't.
4722
4723 2003-04-27 Paul Eggert <eggert@twinsun.com>
4724
4725 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
4726 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
4727 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
4728 if it is not defined.
4729 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
4730
4731 2003-04-26 Paul Eggert <eggert@twinsun.com>
4732
4733 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
4734 Declare to be of type suitable for the ninf value itself, not of
4735 type suitable for the corresponding table, since the latter might
4736 be unsigned but the ninf value might be negative. This fixes a
4737 bug reported by Alexandre Duret-Lutz in
4738 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
4739
4740 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
4741 invokes it. We shouldn't invoke it twice because it will attempt
4742 to put error.o in the archive twice. This fixes a glitch reported
4743 by Martin Mokrejs in
4744 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
4745
4746 2003-04-21 Paul Eggert <eggert@twinsun.com>
4747
4748 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
4749 to gnulib.
4750
4751 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
4752
4753 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
4754 Fix obvious typo that results in uncompilable GLR parsers
4755 when both %pure-parser and %locations are used. (trivial change)
4756
4757 2003-04-17 Paul Eggert <eggert@twinsun.com>
4758
4759 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
4760 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
4761 Do not insert the expected token via unput, as this runs afoul
4762 of a POSIX-compatibility bug in flex 2.5.31.
4763 All uses changed to BEGIN the parent state,
4764 since we no longer insert the expected token via unput.
4765 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
4766 that is no longer emitted after the above change.
4767
4768 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
4769 the first one. This change is from Paul Hilfinger, and it fixes
4770 regression reported by Werner Lemberg in
4771 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4772
4773 (resolve_sr_conflict): Don't invoke state_errs_set
4774 unless one or more tokens have been explicitly made errors.
4775 Otherwise, the above change causes Bison to abort.
4776
4777 * tests/existing.at (GNU pic Grammar): New test case, taken from
4778 Lemberg's email.
4779
4780 2003-03-31 Akim Demaille <akim@epita.fr>
4781
4782 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
4783
4784 2003-03-31 Akim Demaille <akim@epita.fr>
4785
4786 * src/output.c (prepare_symbols): Avoid trailing spaces in the
4787 output.
4788
4789 2003-03-31 Akim Demaille <akim@epita.fr>
4790
4791 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
4792 From Paul Hilfinger.
4793
4794 2003-03-29 Akim Demaille <akim@epita.fr>
4795
4796 * m4/error.m4: Do not put under dynamic conditions some code which
4797 expansion is under static control.
4798
4799 2003-03-29 Akim Demaille <akim@epita.fr>
4800
4801 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
4802
4803 2003-03-29 Akim Demaille <akim@epita.fr>
4804
4805 * doc/bison.texinfo (Strings are Destroyed): New.
4806
4807 2003-03-13 Paul Eggert <eggert@twinsun.com>
4808
4809 * .cvsignore: Add configure.lineno.
4810 * src/.cvsignore: Add yacc.
4811 * tests/.cvsignore: Add testsuite.log.
4812 * doc/fdl.texi: Sync with latest FSF version.
4813
4814 2003-03-12 Paul Eggert <eggert@twinsun.com>
4815
4816 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
4817 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
4818 cursor, instead of leaving it undefined. This fixes a bug
4819 reported by Tim Van Holder in
4820 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
4821 * tests/input.at (Torturing the Scanner): Test the scanner on
4822 an empty input file, which was Tim Van Holder's test case.
4823
4824 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
4825 <sys/resource.h> can be included, include sys/time.h and
4826 sys/times.h first, if available. This works around the SunOS
4827 4.1.4 porting bug reported by Bruce Becker in
4828 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
4829
4830 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
4831 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
4832 AC_HEADER_SYS_WAIT.
4833
4834 Merge changes from gnulib. This was prompted because the CVS
4835 snapshot didn't build on Solaris 7 due to strnlen problems.
4836
4837 These changes need to be merged back into gnulib:
4838 * lib/hash.c: Include <stdbool.h> unconditionally.
4839 * m4/onceonly.m4 (m4_quote): New macro.
4840 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
4841 Quote AC_FOREACH variable-expansions properly.
4842 The 2003-01-03 obstack.h change also needs merging.
4843 {end of changes requiring merging}
4844
4845 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4846 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
4847 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
4848 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
4849 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
4850 New files, imported from gnulib.
4851 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
4852 above.
4853
4854 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
4855 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
4856 gnulib sources.
4857
4858 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
4859 Add.
4860 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
4861 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
4862 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
4863 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
4864 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
4865 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
4866 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
4867 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
4868 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
4869 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
4870 (jm_PREREQ_ARGMATCH): Remove.
4871 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
4872 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
4873
4874 * src/system.h: Include <stdbool.h> unconditionally.
4875
4876 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
4877 assuming at least C89 in the bitset code for some time now.
4878
4879 2003-03-03 Akim Demaille <akim@epita.fr>
4880
4881 * ro.po: New.
4882
4883 2003-03-02 Akim Demaille <akim@epita.fr>
4884
4885 * doc/bison.texinfo (Table of Symbols): Reactivate the
4886 documentation for %lex-param, and %parse-param.
4887
4888 2003-03-02 Akim Demaille <akim@epita.fr>
4889
4890 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
4891 generate verbose error messages.
4892 Use the number of tokens as an upper bound in yytname, as it
4893 cannot be a non terminal.
4894
4895 2003-03-02 Akim Demaille <akim@epita.fr>
4896
4897 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
4898 message.
4899
4900 2003-03-02 Akim Demaille <akim@epita.fr>
4901
4902 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
4903 Use them to exercise yycheck overrun.
4904 Based on Andrew Suffield's grammar.
4905
4906 2003-03-02 Akim Demaille <akim@epita.fr>
4907
4908 Create tests/local.at for Bison generic testing macros.
4909
4910 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
4911 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
4912 This new file.
4913 * tests/calc.at (AT_CHECK_CALC): Adjust.
4914 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
4915 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
4916 * tests/local.at: here.
4917 (AT_COMPILE_CXX): Tags the tests using it as c++.
4918 Ignore the test if CXX is not functional.
4919
4920 2003-03-01 Paul Eggert <eggert@twinsun.com>
4921
4922 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
4923 not loc->end, since loc->end might contain garbage and this leads
4924 to undefined behavior on some platforms.
4925 (id_loc, token_start): Use (IF_LINTed) initial values that do not
4926 depend on *loc, so that the reader doesn't give the the false
4927 impression that *loc is initialized.
4928 (<INITIAL>"%%"): Do not bother setting code_start, since its value
4929 does not survive the return.
4930
4931 2003-03-01 Akim Demaille <akim@epita.fr>
4932
4933 * src/scan-gram.l (code_start): Always initialize it when entering
4934 into yylex, as SC_EPILOGUE is activated *before* the corresponding
4935 yylex invocation. An alternative would be making it static, but
4936 then it starts with the second %%'s beginning, instead of its end.
4937
4938 2003-02-28 Paul Eggert <eggert@twinsun.com>
4939
4940 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
4941 around a UnixWare 7.1.1 porting bug reported by John Hughes in
4942 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
4943
4944 2003-02-26 Paul Eggert <eggert@twinsun.com>
4945
4946 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
4947 Remove Sequent/Pyramid discussion (nobody uses them any more).
4948 Merge VMS and MS-DOS discussion; these ports may well be dead
4949 but let's keep mentioning them for now. Put <> around email
4950 addresses. Add copyright notice.
4951
4952 2003-02-24 Paul Eggert <eggert@twinsun.com>
4953
4954 * data/glr.c (yy_reduce_print): yylineno -> yylno,
4955 to avoid collision with flex use of yylineno.
4956 Problem reported by Bruce Lilly in
4957 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
4958 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4959 * data/yacc.c (yy_reduce_print): Likewise.
4960
4961 * config/depcomp: Sync with Automake 1.7.3.
4962
4963 2003-02-21 Akim Demaille <akim@epita.fr>
4964
4965 * data/lalr1.cc: Use temporary variables instead of casts to
4966 change integer types.
4967 Suggested by Paul Eggert.
4968
4969 2003-02-21 Akim Demaille <akim@epita.fr>
4970
4971 * doc/bison.texinfo: Use "location" consistently to refer to @n,
4972 to avoid confusions with lalr1.cc's notion of Position.
4973 Suggested by Paul Eggert.
4974
4975 2003-02-20 Akim Demaille <akim@epita.fr>
4976
4977 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
4978 before initial_columns.
4979 (location.hh): Use consistent variable names when defining the
4980 operator<<.
4981 Use "last" so that we subtract from Positions, not from unsigned.
4982
4983 2003-02-20 Akim Demaille <akim@epita.fr>
4984
4985 * data/lalr1.cc (position.hh): New subfile, including the extended
4986 and Doxygen'ed documentation of class Position.
4987 (location.hh): Use it.
4988 Document a` la Doxygen.
4989 With the help of Benoit Perrot.
4990
4991 2003-02-20 Akim Demaille <akim@epita.fr>
4992
4993 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
4994 AT_YACC_IF.
4995 Redefine AT_YYERROR_SEES_LOC_IF using it.
4996 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
4997 not defined.
4998 Don't use the location in yy::Parser::error_ and
4999 yy::Parser::print_ when not %locations.
5000 Activate more lalr1.cc tests.
5001
5002 2003-02-19 Akim Demaille <akim@epita.fr>
5003
5004 * data/lalr1.cc: When displaying a line number, be sure to make it
5005 an int.
5006
5007 2003-02-19 Akim Demaille <akim@epita.fr>
5008
5009 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
5010 Remove, useless.
5011 (YYABORT, YYACCEPT, YYERROR): New.
5012 * tests/calc.at: Renable the lalr1.cc test.
5013
5014 2003-02-19 Akim Demaille <akim@epita.fr>
5015
5016 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
5017 error recovery, mixing with/without pops and discarding of the
5018 lookahead.
5019 Exercise YYERROR.
5020 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
5021
5022 2003-02-17 Paul Eggert <eggert@twinsun.com>
5023
5024 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
5025 * tests/testsuite.at (AT_COMPILE): Use them.
5026 This fixes the testsuite problem reported by Robert Lentz in
5027 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
5028
5029 2003-02-12 Paul Eggert <eggert@twinsun.com>
5030
5031 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
5032 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
5033 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
5034 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
5035 Check for malloc failure, for consistency with yacc.c.
5036 (yytname_size): Remove, for consistency with yacc.c.
5037
5038 The bug still remains in data/lalr1.cc, as I didn't have time
5039 to fix it there.
5040
5041 2003-02-06 Akim Demaille <akim@epita.fr>
5042
5043 * configure.ac (GXX): Rename as...
5044 (CXX): this, to keep the original Autoconf semantics.
5045 Require 2.57.
5046 * data/lalr1.cc: Fix b4_copyright invocations.
5047 If YYDEBUG is not defined, don't depend upon name_ being defined.
5048 (location.hh): Include string and iostream.
5049 (Position::filename): New member.
5050 (Position::Position ()): New.
5051 (operator<< (Position)): New.
5052 (operator- (Position, int)): New.
5053 (Location::first, Location::last): Rename as...
5054 (Location::begin, Location::end): these, to mock the conventional
5055 iterator names.
5056 (operator<< (Location)): New.
5057 * tests/atlocal.in (CXX): New.
5058 * tests/testsuite.at (AT_COMPILE_CXX): New.
5059 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
5060 locations in a more synthetic way.
5061 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
5062 lalr1.cc is used.
5063 Adjust the C locations to match those from Emacs: first column is
5064 column 0.
5065 Change all the expected results.
5066 Conform to the GCS: simplify the locations when applicable.
5067 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
5068 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
5069 these CPP macros with the m4 macros new defined by...
5070 (AT_CHECK_PUSHDEFS): this, i.e.:
5071 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
5072 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
5073 New macros.
5074 (AT_CHECK_POPDEFS): Undefine them.
5075 (AT_CHECK_CALC_LALR1_CC): New.
5076 Use it for the first lalr1.cc test.
5077
5078 2003-02-04 Akim Demaille <akim@epita.fr>
5079
5080 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
5081 Location as is defined.
5082
5083 2003-02-04 Akim Demaille <akim@epita.fr>
5084
5085 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
5086 name_ being defined.
5087
5088 2003-02-03 Paul Eggert <eggert@twinsun.com>
5089
5090 * src/gram.h (start_symbol): Remove unused decl.
5091
5092 Use more-consistent naming conventions for local vars.
5093
5094 * src/derives.c (derives_compute): Change type of local var from
5095 int to rule_number.
5096 * src/gram.c (grammar_rules_partial_print): Likewise.
5097 * src/print.c (print_core): Likewise.
5098 * src/reduce.c (reduce_grammar_tables): Likewise.
5099
5100 * src/gram.c (grammar_dump): Change name of item_number *
5101 local var from r to rp.
5102 * src/nullable.c (nullable_compute): Likewise.
5103
5104 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
5105
5106 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
5107 for symbol or symbol_number var.
5108 * src/reader.c (grammar_start_symbol_set): Likewise.
5109 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
5110 Likewise.
5111 * src/state.c (transitions_to): Likewise.
5112 * src/state.h: Likewise.
5113 * src/tables.c (symbol_number_to_vector_number): Likewise.
5114
5115 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
5116 char * var.
5117
5118 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
5119 var.
5120
5121 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
5122 var.
5123
5124 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
5125 Use str, not s, for char * var. Use ch, not c, for character var.
5126 Use size for size var.
5127
5128 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
5129 char * var.
5130 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
5131 uniqstr var.
5132 * src/uniqstr.h: Likewise.
5133
5134 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
5135 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
5136 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
5137 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
5138 param to have same name as that of enum, so that we don't use
5139 "s" to stand for a non-state.
5140
5141 2003-02-02 Akim Demaille <akim@epita.fr>
5142
5143 * src/scan-skel.l: Scan more than one inert character per yylex
5144 invocation.
5145
5146 2003-02-01 Paul Eggert <eggert@twinsun.com>
5147
5148 Version 1.875a.
5149
5150 * po/LINGUAS: Add ms.
5151
5152 2003-01-30 Akim Demaille <akim@epita.fr>
5153
5154 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
5155
5156 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5157
5158 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
5159 of $1.
5160
5161 Changes in response to error report by S. Eken: GLR mode does not
5162 handle negative $ indices or $ indices in embedded rules correctly.
5163 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
5164
5165 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
5166 (b4_rhs_location): Ditto.
5167 (yyfill): New function to copy from stack tree into array
5168 incrementally.
5169 (yyuserAction): Modify to allow incremental move of semantic values
5170 to rhs array when in GLR mode.
5171 Define YYFILL to use in user-defined actions to fill semantic array
5172 as needed.
5173 Remove dummy use of yystack, as there is now a guaranteed use.
5174 (yydoAction): Modify to allow incremental move of semantic values
5175 to rhs array when in GLR mode.
5176 (yyresolveAction): Ditto.
5177 (yyglrShiftDefer): Update comment.
5178 (yyresolveStates): Use X == NULL for pointers, not !X.
5179 (yyglrReduce): Ditto.
5180 (yydoAction): Ditto
5181
5182 * tests/glr-regr1.at: Rename to ...
5183 * tests/glr-regression.at: Add new regression test for the problems
5184 described above (adapted from S. Eken).
5185 Update copyright notice.
5186 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
5187 * tests/Makefile.am: Ditto.
5188
5189 2003-01-28 Paul Eggert <eggert@twinsun.com>
5190
5191 * data/lalr1.cc: Do not use @output_header_name@ unless
5192 b4_defines_flag is set. This fixes two bugs reported by
5193 Tim Van Holder in
5194 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
5195 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
5196
5197 2003-01-21 Paul Eggert <eggert@twinsun.com>
5198
5199 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
5200 we don't need to worry about yyerrlab1 being reported as an
5201 "unused label" by non-GCC C compilers. The downside is that if
5202 locations are used then a couple of statements are duplicated each
5203 time YYERROR is invoked, but the upside is that the warnings
5204 should vanish.
5205 (yyerrlab1): Move code to YERROR.
5206 (yyerrlab2): Remove. Change uses back to yyerrlab1.
5207 This reverts some of the 2002-12-27 change.
5208
5209 2003-01-17 Paul Eggert <eggert@twinsun.com>
5210
5211 * src/output.c (symbol_printers_output): Fix typo that led
5212 to core dump. Problem reported by Antonio Rus in
5213 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
5214
5215 2003-01-13 Akim Demaille <akim@epita.fr>,
5216 Quoc Peyrot <chojin@lrde.epita.fr>,
5217 Robert Anisko <anisko_r@lrde.epita.fr>
5218
5219 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
5220 when the stacks contain one element, as the loop would otherwise
5221 free the last state, and then use the top state (the one we just
5222 popped). This means that the initial elements will not be freed
5223 explicitly, as is the case in yacc.c; it is not a problem, as
5224 these elements have fake values.
5225
5226 2003-01-11 Paul Eggert <eggert@twinsun.com>
5227
5228 * NEWS: %expect-violations are now just warnings, reverting
5229 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
5230 bootstrapping problem reported by Matthias Klose; see
5231 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
5232 * src/conflicts.c (conflicts_print): Likewise.
5233 * tests/conflicts.at (%expect not enough, %expect too much,
5234 %expect with reduce conflicts): Likewise.
5235 * doc/bison.texinfo (Expect Decl): Document this. Also mention
5236 that the warning is enabled if the number of conflicts changes
5237 (not necessarily increases).
5238
5239 * src/getargs.c (version): Update copyright year.
5240
5241 2003-01-09 Akim Demaille <akim@epita.fr>
5242
5243 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
5244
5245 2003-01-08 Paul Eggert <eggert@twinsun.com>
5246
5247 * Makefile.maint (WGETFLAGS):
5248 New macro, containing "-C off" to disable proxy caches.
5249 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
5250 (rel-check): Use $(WGET) instead of wget.
5251
5252 2003-01-06 Paul Eggert <eggert@twinsun.com>
5253
5254 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
5255 the GLR paper of Scott, Johnstone and Hussain.
5256
5257 2003-01-04 Paul Eggert <eggert@twinsun.com>
5258
5259 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
5260 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
5261 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
5262 (EXTRA_LIBRARIES): New var, for liby.a.
5263 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
5264 (EXTRA_SCRIPTS): New var, for yacc.
5265
5266 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
5267 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
5268 Problem reported by Nelson H. F. Beebe.
5269
5270 2003-01-03 Paul Eggert <eggert@twinsun.com>
5271
5272 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
5273 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
5274 when compiling Bison 1.875's `bitset bset = obstack_alloc
5275 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
5276
5277 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
5278 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
5279 grow to a huge size with typical invocation.
5280
5281 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
5282 Use the pattern recommended by Autoconf 2.57, except also protect
5283 against double-definition.
5284 * src/system.h: Likewise.
5285 Portability issues reported by Nelson H. F. Beebe.
5286
5287 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
5288 All uses changed. Provide a definition in both C and C++.
5289 (yytrue, yyfalse): Define even if defined (__cplusplus).
5290
5291 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
5292 Reported by Nelson H. F. Beebe.
5293
5294 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
5295
5296 2003-01-02 Paul Eggert <eggert@twinsun.com>
5297
5298 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
5299 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
5300 Bug reported by Nelson H. F. Beebe.
5301
5302 2003-01-01 Paul Eggert <eggert@twinsun.com>
5303
5304 * Version 1.875.
5305
5306 2002-12-30 Paul Eggert <eggert@twinsun.com>
5307
5308 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
5309 Moved here from...
5310 (<INITIAL>","): Here. This causes stray "," to be treated
5311 more uniformly.
5312
5313 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
5314 last brace in braced code when not in Yacc mode, for compatibility
5315 with Bison 1.35. This resurrects the 2001-12-15 patch to
5316 src/reader.c.
5317
5318 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
5319 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
5320
5321 2002-12-28 Paul Eggert <eggert@twinsun.com>
5322
5323 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
5324 that of SYM's type. This fixes Debian bug 168069, reported by
5325 Thomas Olsson.
5326
5327 2002-12-28 Paul Eggert <eggert@twinsun.com>
5328
5329 Version 1.75f.
5330
5331 Switch back to the Yacc style of conflict reports, undoing some
5332 of the 2002-07-30 change.
5333 * doc/bison.texinfo (Understanding): Use Yacc style for
5334 conflict reports. Also, use new way of locating rules.
5335 * src/conflicts.c (conflict_report):
5336 Renamed from conflict_report_yacc, removing the old
5337 'conflict_report'. Translate the entire conflict report at once,
5338 so that we don't assume that "," has the same interpretation in
5339 all languages.
5340 (conflicts_output): Use Yacc-style conflict report for each state,
5341 instead of our more-complicated style.
5342 (conflicts_print): Use Yacc-style conflict report, except print
5343 the input file name when not emulating Yacc.
5344 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
5345 Conflicted Reduction, %expect not enough, %expect too much,
5346 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
5347 * tests/existing.at (GNU Cim Grammar): Likewise.
5348 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
5349
5350 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
5351 fatal): Don't invoke fflush; it's not needed and it might even be
5352 harmful for stdout, as stdout might not be open.
5353 * src/reduce.c (reduce_print): Likewise.
5354
5355 2002-12-27 Paul Eggert <eggert@twinsun.com>
5356
5357 Fix a bug where error locations were not being recorded correctly.
5358 This problem was originally reported by Paul Hilfinger in
5359 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
5360
5361 * data/yacc.c (yyparse): New local var yylerrsp, to record the
5362 top of the location stack's error locations.
5363 (yyerrlab): Set it. When discarding a token, push its location
5364 onto yylerrsp so that we don't lose track of the error's end.
5365 (yyerrlab1): Now is only the target of YYERROR, so that we can
5366 properly record the location of the action that failed. For GCC
5367 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
5368 GCC warning about yyerrlab1 being unused if YYERROR is unused.
5369 (yyerrlab2): New label, which yyerrlab now falls through to.
5370 Compute the error's location by applying YYLLOC_DEFAULT to
5371 the locations of all the symbols that went into the error.
5372 * doc/bison.texinfo (Location Default Action): Mention that
5373 YYLLOC_DEFAULT is also invoked for syntax errors.
5374 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5375 Error locations include the locations of all the tokens that were
5376 discarded, not just the last token.
5377
5378 2002-12-26 Paul Eggert <eggert@twinsun.com>
5379
5380 * src/files.c: Include quote.h.
5381 (compute_output_file_names): Warn if we detect conflicting
5382 outputs to the same file. This should catch the misunderstanding
5383 exemplified by Debian Bug 165349, reported by Bruce Stephens..
5384
5385 * src/conflicts.c (conflicts_print): If the user specifies
5386 "%expect N", report an error if there are any reduce/reduce
5387 conflicts. This is what the manual says should happen.
5388 This fixes Debian bug 130890, reported by Anthony DeRobertis.
5389 * tests/conflicts.at (%expect with reduce conflicts): New test.
5390
5391 Don't use m4_include on relative file names, as it doesn't work as
5392 desired if there happens to be a file with that name under ".".
5393
5394 * m4sugar/version.m4: Remove; it was included but it wasn't used.
5395 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
5396 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
5397 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
5398 * src/output.c (output_skeleton): Use full path names when
5399 specifying a file to include; don't rely on include path, as
5400 it's unreliable when the working file contains a file with
5401 that name.
5402
5403 2002-12-25 Paul Eggert <eggert@twinsun.com>
5404
5405 Remove obsolete references to bison.simple and bison.hairy.
5406 Problem mentioned by Aubin Mahe in
5407 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
5408 * data/glr.c: Comment fix.
5409 * doc/bison.1: Remove references. Also, mention "yacc".
5410
5411 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
5412 with -g option.
5413
5414 * src/parse-gram.y (declaration): Use enum "report_states" rather
5415 than its numeric value 1.
5416
5417 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
5418 opening a new one. This fixes Debian bug 165349, reported by
5419 Bruce Stephens.
5420
5421 2002-12-24 Paul Eggert <eggert@twinsun.com>
5422
5423 Version 1.75e.
5424
5425 * Makefile.maint (cvs-update): Don't assume that the shell
5426 supports $(...), as Solaris sh doesn't.
5427
5428 * src/parse-gram.y (lloc_default): Remove test for empty
5429 nonterminals at the end, since it didn't change the result.
5430
5431 2002-12-24 Paul Eggert <eggert@twinsun.com>
5432
5433 If the user does not define YYSTYPE as a macro, Bison now declares it
5434 using typedef instead of defining it as a macro. POSIX requires this.
5435 For consistency, YYLTYPE is also declared instead of defined.
5436
5437 %union directives can now have a tag before the `{', e.g., the
5438 directive `%union foo {...}' now generates the C code
5439 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
5440 The default union tag is `YYSTYPE', for compatibility with Solaris 9
5441 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
5442 instead of `yyltype'.
5443
5444 `yystype' and `yyltype' are now obsolescent macros instead of being
5445 typedefs or tags; they are no longer documented and will be
5446 withdrawn in a future release.
5447
5448 * data/glr.c (b4_location_type): Remove.
5449 (YYSTYPE): Renamed from yystype.
5450 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
5451 (struct YYLTYPE): Renamed from struct yyltype.
5452 (YYLTYPE): Renamed from yyltype.
5453 (yyltype, yystype): New (and obsolescent) macros,
5454 for backward compatibility.
5455 * data/yacc.c: Likewise.
5456
5457 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
5458 does not specify a union tag. This is for compatibility with
5459 Solaris 9 yacc.
5460
5461 * src/parse-gram.y (add_param): 2nd arg is now char * not char
5462 const *, since it is now modified by stripping surrounding { }.
5463 (current_braced_code): Remove.
5464 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
5465 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
5466 trailing " {...}". Now of type <chars>.
5467 (grammar_declaration): Adjust to bundled tokens.
5468 (code_content): Remove; stripping is now done by add_param.
5469 (print_token_value): Print contents of bundled tokens.
5470 (token_name): New function.
5471
5472 * src/reader.h (braced_code, current_braced_code): Remove.
5473 (token_name): New decl.
5474
5475 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
5476 token_type, not braced_code code_kind. All uses changed.
5477 (SC_PRE_CODE): New state, for scanning after a keyword that
5478 has (or usually has) an immediately-following braced code.
5479 (token_type): New local var, to keep track of which token type
5480 to return when scanning braced code.
5481 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
5482 <INITIAL>"%parse-param", <INITIAL>"%printer",
5483 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
5484 instead of returning a token type immediately.
5485 (<INITIAL>"{"): Set token type.
5486 (<SC_BRACED_CODE>"}"): Use it.
5487 (handle_action_dollar, handle_action_at): Now returns bool
5488 indicating success. Fail if ! current_rule; this prevents a core dump.
5489 (handle_symbol_code_dollar, handle_symbol_code_at):
5490 Remove; merge body into caller.
5491 (handle_dollar, handle_at): Complain in invalid contexts.
5492
5493 * NEWS, doc/bison.texinfo: Document the above.
5494 * NEWS: Fix years and program names in copyright notice.
5495
5496 2002-12-17 Paul Eggert <eggert@twinsun.com>
5497
5498 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
5499 Reporting, Table of Symbols): Omit mentions of %lex-param and
5500 %parse-param from the documentation for now.
5501
5502 2002-12-15 Paul Eggert <eggert@twinsun.com>
5503
5504 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
5505 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
5506 lookahead symbol, and which sets yychar in parser actions) and it
5507 disagreed with the Bison documentation. Bug
5508 reported by Andrew Walrond.
5509
5510 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
5511 as the caller now does that.
5512 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
5513 (YYEMPTY): Parenthesize right hand side, since others use it.
5514 (yyparse): Don't assume that our generated code is the only code
5515 that sets yychar.
5516
5517 2002-12-13 Paul Eggert <eggert@twinsun.com>
5518
5519 Version 1.75d.
5520
5521 POSIX requires a "yacc" command.
5522 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
5523 (MOSTLYCLEANFILES): Add yacc.
5524 (yacc): New rule.
5525 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
5526 as an alias for bison y.
5527
5528 * po/LINGUAS: Add da.
5529
5530 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
5531 problem with latest <getopt.h>.
5532 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
5533
5534 * doc/fdl.texi: Upgrade to 1.2.
5535 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
5536 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
5537 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
5538 gnulib.
5539 * config/install-sh: Sync with autotools.
5540
5541 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
5542 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
5543 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
5544 locations are requested.
5545 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
5546 locations are requested.
5547
5548 2002-12-12 Paul Eggert <eggert@twinsun.com>
5549
5550 Remove unportable casts and storage allocation tricks.
5551 While we're at it, remove almost all casts, since they
5552 usually aren't needed and are a sign of trouble.
5553
5554 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
5555
5556 * src/derives.c (derives_compute): Do not subtract NTOKENS from
5557 the pointer DSET returned by malloc; this isn't portable.
5558 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
5559 Similarly for DERIVES.
5560 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
5561 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
5562 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
5563
5564 * src/derives.c (derives_compute): Do not bother invoking
5565 int_of_rule_number, since rule numbers are integers.
5566
5567 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
5568 rather than XMALLOC (char, N).
5569
5570 * src/files.c (filename_split): Rewrite to avoid cast.
5571
5572 * src/gram.h (symbol_number_as_item_number,
5573 item_number_as_symbol_number, rule_number_as_item_number,
5574 item_number_as_rule_number):
5575 Now inline functions rather than macros, to avoid casts.
5576 * src/state.h (state_number_as_int): Likewise.
5577 * src/tables.c (state_number_to_vector_number,
5578 symbol_number_to_vector_number): Likewise.
5579
5580 * src/gram.h (int_of_rule_number): Remove; no longer used.
5581
5582 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
5583 since the resulting storage is always stored into.
5584
5585 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
5586 where it's needed.
5587
5588 * src/muscle_tab.c (muscle_m4_output):
5589 Now inline. Return bool, not int.
5590 * src/state.c (state_compare): Likewise.
5591 * src/symtab.c (symbol_check_defined,
5592 symbol_check_alias_consistency, symbol_pack, symbol_translation,
5593 hash_compare_symbol, hash_symbol):
5594 Likewise.
5595 * src/uniqstr.c (uniqstr_print): Likewise.
5596 * src/muscle_tab.c (muscle_m4_output_processor):
5597 New function, to avoid casts.
5598 * src/state.c (state_comparator, stage_hasher): Likewise.
5599 * src/symtab.c (symbol_check_defined_processor,
5600 symbol_check_alias_consistency_processor, symbol_pack_processor,
5601 symbol_translation_processor, hash_symbol_comparator,
5602 hash_symbol_hasher): Likewise.
5603 * src/uniqstr.c (uniqstr_print_processor): Likewise.
5604 * src/muscle_tab.c (muscles_m4_output):
5605 Use new functions instead of casting old functions unportably.
5606 * src/state.c (state_hash_new): Likewise.
5607 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
5608 symbols_token_translations_init):
5609 Likewise.
5610 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
5611
5612 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
5613 var instead of casting to long, to avoid casts.
5614 (prepare_states): Use MALLOC rather than alloca, so that we don't
5615 have to worry about alloca.
5616 * src/state.c (state_hash_lookup): Likewise.
5617
5618 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
5619 local var instead of casting to unsigned char, to avoid casts.
5620
5621 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
5622 STATE_ALLOC): Remove.
5623 (transitions_new, errs_new, reductions_new, state_new): Use malloc
5624 rather than calloc, and use offsetof to avoid allocating slightly
5625 too much storage.
5626 (state_new): Initialize all members.
5627
5628 * src/state.c (state_hash): Use unsigned accumulator, not signed.
5629
5630 * src/symtab.c (symbol_free): Remove; unused.
5631 (symbol_get): Remove cast in lhs of assignment.
5632 (symbols_do): Now static. Accept generic arguments, not
5633 hashing-related ones.
5634
5635 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
5636 (symbol_processor): Remove.
5637 (symbols_do): Remove decl; now static.
5638
5639 * src/system.h (alloca): Remove; decl no longer needed.
5640 (<stddef.h>): Include, for offsetof.
5641 (<inttypes.>, <stdint.h>): Include if available.
5642 (uintptr_t): New type, if system lacks it.
5643 (CALLOC, MALLOC, REALLOC): New macros.
5644 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
5645 new macros.
5646
5647 * src/tables.c (table_size): Now int, to pacify GCC.
5648 (table_grow, table_ninf_remap): Use signed table size.
5649 (save_row): Don't bother initializing locals when not needed.
5650 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
5651 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
5652
5653 * src/vcg.h: Correct misspellings.
5654
5655 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
5656
5657
5658 * src/getargs.c (getargs): Don't assume EOF == -1.
5659
5660 2002-12-09 Paul Eggert <eggert@twinsun.com>
5661
5662 Change identifier spellings to avoid collisions with names
5663 that are reserved by POSIX.
5664
5665 Don't use names ending in _t, since POSIX reserves them.
5666 For consistency, remove _e and _s endings -- they're weren't
5667 needed to remove ambiguity. All uses changed.
5668 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
5669 turn was just renamed from struniq_t.
5670 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
5671 which in turn was just renamed from struniq_processor_t.
5672 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
5673 in turn was renamed from hash_compare_struniq_t.
5674 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
5675 (state_list): Renamed from state_list_t.
5676 * src/assoc.h (assoc): Renamed from assoc_t.
5677 * src/conflicts.c (enum conflict_resolution): Renamed from
5678 enum conflict_resolution_e.
5679 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
5680 (rule_list): Renamed from rule_list_t.
5681 * src/getargs.h (enum trace): Renamed from enum trace_e.
5682 (enum report): Renamed from enum report_e.
5683 * src/gram.h (item_number): Renamed from item_number_t.
5684 (rule_number): Renamed from rule_number_t.
5685 (struct rule_s): Remove the "rule_s" part; not used.
5686 (rule): Renamed from rule_t.
5687 (rule_filter): Renamed from rule_filter_t.
5688 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
5689 (goto_list): Renamed from goto_list_t.
5690 * src/lalr.h (goto_number): Renamed from goto_number_t.
5691 * src/location.h (location): Renamed from location_t.
5692 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
5693 and moved here from:
5694 * src/muscle_tab.h (muscle_entry_t): here.
5695 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
5696 (rule_list): Renamed from rule_list_t.
5697 * src/print_graph.c (static_graph): Renamed from graph.
5698 * src/reader.h (braced_code): Renamed from braced_code_t.
5699 Remove brace_code_e tag.
5700 * src/relation.h (relation_node): Renamed from relation_node_t.
5701 (relation_nodes): Renamed from relation_nodes_t.
5702 (relation): Renamed from relation_t.
5703 * src/state.h (state_number): Renamed from state_number_t.
5704 (struct state): Renamed from struct state_s.
5705 (state): Renamed from state_t.
5706 (transitions): Renamed from transitions_t. Unused (and
5707 misspelled) transtion_s tag removed.
5708 (errs): Renamed from errs_t. Unused errs_s tag removed.
5709 (reductions): Renamed from reductions_t. Unused tag
5710 reductions_s removed.
5711 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
5712 (struct symbol_list): Renamed from struct symbol_list_s.
5713 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
5714 (struct symbol): Renamed from struct symbol_s.
5715 (symbol): Renamed from symbol_t.
5716 * src/tables.c (vector_number): Renamed from vector_number_t.
5717 (action_number): Renamed from action_t.
5718 * src/tables.h (base_number): Renamed from base_t.
5719 * src/vcg.h (enum color): Renamed from enum color_e.
5720 (enum textmode): Renamed from enum textmode_e.
5721 (enum shape): Renamed from enum shape_e.
5722 (struct colorentry): Renamed from struct colorentry_s.
5723 (struct classname): Renamed from struct classname_s.
5724 (struct infoname): Renamed from struct infoname_s.
5725 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
5726 (enum decision): Renamed from enum decision_e.
5727 (enum orientation): Renamed from enum orientation_e.
5728 (enum alignment): Renamed from enum alignment_e.
5729 (enum arrow_mode): Renamed from enum arrow_mode_e.
5730 (enum crossing_type): Renamed from enum crossing_type_e.
5731 (enum view): Renamed from enum view_e.
5732 (struct node): Renamed from struct node_s.
5733 (node): Renamed from node_t.
5734 (enum linestyle): Renamed from enum linestyle_e.
5735 (enum arrowstyle): Renamed from enum arrowstyle_e.
5736 (struct edge): Renamed from struct edge.
5737 (edge): Renamed from edge_t.
5738 (struct graph): Renamed from struct graph_s.
5739 (graph): Renamed from graph_t.
5740 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
5741 Rename value_t -> value.
5742 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
5743 value_t_as_yystype -> value_as_yystype.
5744
5745 Don't include <errno.h> in the mainstream code, since it
5746 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
5747 * lib/get-errno.c, lib/get-errno.h: New files.
5748 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
5749 get-errno.c.
5750 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
5751 * src/output.c (output_skeleton): Likewise.
5752 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
5753 instead of errno.
5754 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
5755 Likewise.
5756 (handle_action_dollar, handle_action_at): Likewise.
5757 * src/system.h: Do not include <errno.h>.
5758 (TAB_EXT): Renamed from EXT_TAB.
5759 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
5760
5761 Avoid str[a-z]*, since <string.h> reserves that name space.
5762 Change all instances of "struniq" in names to "uniqstr", and
5763 likewise for "STRUNIQ" and "UNIQSTR".
5764 * src/uniqstr.c: Renamed from src/struniq.c.
5765 * src/uniqstr.h: Renamed from src/struniq.h.
5766 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
5767 * src/files.c (strsuffix): Remove; unused.
5768 (concat2): Renamed from stringappend. Now static.
5769 * src/files.h (strsuffix, stringappend): Remove; unused.
5770 * src/parse-gram.y (<chars>): Renamed from <string>.
5771 (<uniqstr>): Renamed from <struniq>.
5772 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
5773 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
5774 (struct graph_s.expand): Renamed from struct graph_s.stretch.
5775 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
5776 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
5777 (N_EXPAND): Renamed from N_STRETCH.
5778
5779 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
5780 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
5781 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
5782 Remove; unused.
5783 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
5784 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
5785 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
5786 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
5787 (BASE_MAXIMUM): Renamed from BASE_MAX.
5788 (BASE_MINIMUM): Renamed from BASE_MIN.
5789 (ACTION_MAX): Remove; unused.
5790 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
5791 Unnecessary casts removed from above defines.
5792
5793
5794 Fix misspelling in names.
5795 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
5796 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
5797 G_NODE_ALIGNEMENT.
5798
5799
5800 * lib/timevar.c (timevar_report): Renamed from time_report,
5801 for consistency with other names.
5802 * lib/timevar.h (timevar_report): New decl.
5803 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
5804
5805
5806 Sort include-file uses.
5807
5808 Reorder all include files under src to be in the order "system.h".
5809 then the ../lib include files in angle brackets (alphabetized),
5810 then the . include files in double-quotes (alphabetized). Fix
5811 dependency breakages encountered in this process, as follows:
5812 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
5813 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
5814 * src/state.h: Include "symtab.h".
5815
5816 2002-12-08 Paul Eggert <eggert@twinsun.com>
5817
5818 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
5819 since this causes problems when __file__ contains character
5820 sequences like "@" that are treated specially by src/scan-skel.l.
5821 Instead, just use the file's basename. This fixes the bug
5822 reported by Martin Mokrejs in
5823 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
5824
5825 2002-12-06 Paul Eggert <eggert@twinsun.com>
5826
5827 Add support for rules that do not have trailing semicolons, as
5828 POSIX requires. Improve the quality of locations in Bison
5829 diagnostics.
5830
5831 * src/location.c: Include <quotearg.h>.
5832 (empty_location): Now const.
5833 (location_print): New function. Follow the recommendation of the
5834 GNU Coding Standards for locations that span file boundaries.
5835 * src/location.h: Do not include <quotearg.h>; no longer needed.
5836 (boundary): New type.
5837 (location_t): Use it. This allows locations to span file boundaries.
5838 All member uses changed: file -> start.file or end.file (as needed),
5839 first_line -> start.line, first_column -> start.column,
5840 last_line -> end.line, last_column -> end.column.
5841 (equal_boundaries): New function.
5842 (LOCATION_RESET, LOCATION_STEP): Remove.
5843 (LOCATION_PRINT): Remove. All callers changed to use location_print.
5844 (empty_location): Now const.
5845 (location_print): New decl.
5846 * src/parse-gram.y (lloc_default): New function, which handles
5847 empty locations more accurately.
5848 (YYLLOC_DEFAULT): Use it.
5849 (%token COLON): Remove.
5850 (%token ID_COLON): New token.
5851 (rules): Use it.
5852 (declarations, rules): Remove trailing semicolon.
5853 (declaration, rules_or_grammar_declaration):
5854 Allow empty (";") declaration.
5855 (symbol_def): Remove empty actions; no longer needed.
5856 (rules_or_grammar_declaration): Remove trailing semicolon.
5857 (semi_colon.opt): Remove.
5858 * src/reader.h: Include location.h.
5859 (scanner_cursor): New decl.
5860 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
5861 rolling our own.
5862 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
5863 of *loc.
5864 (STEP): Remove. No longer needed, now that adjust_location does
5865 the work. All uses removed.
5866 (scanner_cursor): New var.
5867 (adjust_location): Renamed from extend_location. It now sets
5868 *loc and adjusts the scanner cursor. All uses changed.
5869 Don't bother testing for CR.
5870 (handle_syncline): Remove location arg; now updates scanner cursor.
5871 All callers changed.
5872 (unexpected_end_of_file): Now accepts start boundary of token or
5873 comment, not location. All callers changed. Update scanner cursor,
5874 not the location.
5875 (SC_AFTER_IDENTIFIER): New state.
5876 (context_state): Renamed from c_context. All uses changed.
5877 (id_loc, code_start, token_start): New local vars.
5878 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
5879 processing of Yacc white space and equivalents here.
5880 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
5881 instead of returning ID immediately, since we need to search for
5882 a subsequent colon.
5883 (<INITIAL>"'", "\""): Save token_start.
5884 (<INITIAL>"%{", "{", "%%"): Save code_start.
5885 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
5886 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
5887 BEGIN context_state at end, not INITIAL.
5888 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
5889 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
5890 Return correct token start.
5891 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
5892 the start of a character, string or multiline comment is found.
5893 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
5894 Reduction): Adjust reported locations to match the more-precise
5895 results now expected.
5896 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
5897 * tests/reduce.at (Useless Rules, Reduced Automaton,
5898 Underivable Rules): Likewise.
5899 * tests/regression.at (Invalid inputs): No longer `expecting ";"
5900 or "|"' now that so many other tokens are allowed by the new grammar.
5901
5902 * src/complain.h (current_file): Remove duplicate decl;
5903 current_file is now owned by files.h.
5904 * src/complain.c, src/scan-gram.l: Include files.h.
5905
5906 2002-12-06 Paul Eggert <eggert@twinsun.com>
5907
5908 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
5909 promotes to int; it might be unsigned int.
5910 * data/yacc.c (yy_reduce_print): Likewise.
5911
5912 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
5913 be #defined in the prologue, not in the Bison declarations.
5914 This fixes Debian Bug 102878, reported by Shaul Karl.
5915
5916 2002-12-02 Paul Eggert <eggert@twinsun.com>
5917
5918 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
5919 * lib/strtoul.c: New file, from gnulib.
5920 This fixes a porting bug reported by Peter Klein in
5921 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
5922
5923 2002-11-30 Paul Eggert <eggert@twinsun.com>
5924
5925 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
5926 and put only a forward declaration in the prologue. This is for
5927 consistency with the other scanner helper functions.
5928
5929 Type clashes now generate warnings, not errors, since it
5930 appears that POSIX may allow some grammars with type clashes.
5931 * src/reader.c (grammar_current_rule_check): Warn about
5932 type clashes instead of complaining.
5933 * tests/input.at (Type Clashes): Expect warnings, not complaints.
5934
5935 Add Yacc library, since POSIX requires it.
5936 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
5937 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
5938 * lib/main.c, lib/yyerror.c: New files.
5939
5940 gram_error can be static; it need not be extern.
5941 * src/reader.h (gram_error): Remove decl.
5942 * src/parse-gram.y (gram_error): Now static. Add static decl.
5943 (print_token_value): Omit parameter names from forward decl,
5944 for consistency.
5945
5946 2002-11-29 Paul Eggert <eggert@twinsun.com>
5947
5948 * doc/bison.texinfo: Emphasize that yylex and yyerror must
5949 be declared before being used. E.g., one should typically
5950 declare them in the prologue. Use GNU coding style in examples.
5951 Put "const" consistently after the type it modifies. Mention
5952 that C99 supports "inline". Mention that yyerror traditionally
5953 returns "int".
5954
5955 %parse-param and %lex-param now take just one argument, the
5956 declaration; the argument name is deduced from the declaration.
5957
5958 * doc/bison.texinfo (Parser Function, Pure Calling, Error
5959 Reporting, Table of Symbols): Document this.
5960 * src/parse-gram.y (add_param): New function.
5961 (COMMA): Remove.
5962 (declaration): Implement new rule for %parse-param and %lex-param.
5963 * src/scan-gram.l: "," now elicits a warning, rather than being
5964 a token; this is more compatible with byacc.
5965 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
5966
5967 2002-11-27 Paul Eggert <eggert@twinsun.com>
5968
5969 Rename identifiers to avoid real and potential collisions.
5970
5971 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
5972 to avoid collision with lex macro described by Bruce Lilly in
5973 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
5974 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
5975 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
5976 * src/parse-gram.y (print_token_value): Renamed from yyprint.
5977 All uses changed.
5978 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
5979 The name "yycontrol" violates the name space rules, and this stuff
5980 wasn't being used anyway.
5981 (input): Remove action; this stuff wasn't being used.
5982 (gram_error): Rename local variable yylloc -> loc.
5983 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
5984 (YY_DECL): Don't use "yy" at start of local variables.
5985 All uses changed, e.g., yylloc -> loc.
5986 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
5987 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
5988 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
5989 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
5990
5991 * src/parse-gram.y (gram_error): loc is now const *.
5992 * src/reader.h (gram_error): Likewise.
5993
5994 2002-11-24 Paul Eggert <eggert@twinsun.com>
5995
5996 Version 1.75c.
5997
5998 * tests/actions.at (Actions after errors): Use an output format
5999 more similar to that of the Printers and Destructors test.
6000 Test the position of the ';' token too.
6001 (Printers and Destructors): Likewise.
6002 (Printers and Destructors: %glr-parser): Remove for now, to avoid
6003 unnecessarily alarming people when the test fails.
6004
6005 * data/yacc.c (yyerrlab1): Move this label down, so that the
6006 parser does not discard the lookahead token if the user code
6007 invokes YYERROR. This change is required for POSIX conformance.
6008
6009 * lib/error.c: Sync with gnulib.
6010
6011 2002-11-22 Paul Eggert <eggert@twinsun.com>
6012
6013 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
6014 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
6015 * lib/xmalloc.c: Likewise.
6016
6017 2002-11-20 Paul Eggert <eggert@twinsun.com>
6018
6019 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
6020
6021 2002-11-20 Paul Eggert <eggert@twinsun.com>
6022
6023 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
6024 should use `if (! x) abort ();' rather than `assert (x);', and
6025 anyway it's one less thing to worry about configuring.
6026
6027 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
6028 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
6029 and replace all instances of assert with abort.
6030 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6031 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
6032
6033 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
6034 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
6035 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
6036 hash_find_entry, hash_rehash, hash_insert): Likewise.
6037 * src/conflicts.c (resolve_sr_conflict): Likewise.
6038 * src/lalr.c (set_goto_map, map_goto): Likewise.
6039 * src/nullable.c (nullable_compute): Likewise.
6040 * src/output.c (prepare_rules, token_definitions_output): Likewise.
6041 * src/reader.c (packgram, reader): Likewise.
6042 * src/state.c (state_new, state_free, state_transitions_set,
6043 state_reduction_find): Likewise.
6044 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
6045 symbol_pack): Likewise.
6046 * src/tables.c (conflict_row, pack_vector): Likewise.
6047 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6048 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6049 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
6050 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
6051
6052 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
6053 (ARGMATCH_CONSTRAINT): New macro.
6054 (ARGMATCH_ASSERT): Use it.
6055
6056 * src/system.h (verify): New macro.
6057 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
6058 rather than assert.
6059 * src/tables.c (tables_generate): Likewise.
6060
6061 * src/struniq.c (struniq_assert): Now returns void, and aborts
6062 if the assertion is false.
6063 (struniq_assert_p): Remove.
6064 * src/struniq.h: Likewise.
6065
6066 2002-11-18 Paul Eggert <eggert@twinsun.com>
6067
6068 * data/glr.c (yygetLRActions): Replace `yyindex' with
6069 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
6070 This fixes the regression with Sun ONE Studio 7 cc that I reported in
6071 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
6072
6073 2002-11-18 Akim Demaille <akim@epita.fr>
6074
6075 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
6076 space.
6077 From Tim Van Holder.
6078
6079 2002-11-17 Paul Eggert <eggert@twinsun.com>
6080
6081 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
6082 to "SyntaxError" for consistency with my 2002-11-15 change.
6083
6084 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
6085 not define to {}, since this breaks the common use of `YYDPRINTF
6086 ((...));' if a single statement is desired (e.g. before `else').
6087 Work around GCC warnings by surrounding corresponding calls with
6088 {} if needed.
6089 (yyhasResolvedValue): Remove unused function.
6090 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
6091 loop body.
6092 (yyreportSyntaxError): Renamed from yyreportParseError.
6093 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
6094 All uses changed.
6095 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
6096 extern when possible. Remove unused initializations.
6097
6098 2002-11-16 Akim Demaille <akim@epita.fr>
6099
6100 Augment the similarity between GLR and LALR traces.
6101
6102 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
6103 (YY_REDUCE_PRINT): New.
6104 (yyparse): Use them.
6105 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
6106 YYDPRINT here.
6107 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
6108 state reached after the reduction/recovery, since...
6109 (yyparse, yyprocessOneStack): Report the state we are entering in.
6110
6111 2002-11-16 Akim Demaille <akim@epita.fr>
6112
6113 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
6114 Add support for --trace=skeleton.
6115 * src/scan-skel.l: %option debug.
6116 Scan strings of non-@ or \n instead of character by character.
6117 (scan_skel): Handle trace_skeleton.
6118 (QPUTS): New.
6119 (@output_parser_name@, @output_header_name@): ``Restore'' their
6120 support (used to be M4 macros).
6121 * data/yacc.c: Quote larger chunks, a la glr.c.
6122 * data/lalr1.cc: Likewise.
6123 The header guards are no longer available, so use some other
6124 string than `YYLSP_NEEDED'.
6125
6126 2002-11-16 Akim Demaille <akim@epita.fr>
6127
6128 Make the ``Printers and Destructors'' test more verbose, taking
6129 `yacc.c''s behavior as (possibly wrong) reference.
6130
6131 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
6132 instead of fprint on stdout.
6133 Set and report the last_line of the symbols.
6134 Consistently display values and locations.
6135
6136 2002-11-16 Paul Eggert <eggert@twinsun.com>
6137
6138 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
6139
6140 2002-11-15 Paul Eggert <eggert@twinsun.com>
6141
6142 * tests/actions.at (Actions after errors): New test case.
6143
6144 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
6145 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
6146 tests/action.at, tests/calc.at, tests/conflicts.at,
6147 tests/cxx-type.at, tests/regression.at:
6148 "parse error" -> "syntax error" for POSIX compatibility.
6149 "parsing stack overflow..." -> "parser stack overflow" so
6150 that code matches Bison documentation.
6151
6152 2002-11-15 Akim Demaille <akim@epita.fr>
6153
6154 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
6155 take two BRACED_CODE, not two string_content.
6156 Free the scanner's obstack when we are done.
6157 (code_content): New.
6158 * tests/calc.at: Adjust.
6159 * doc/bison.texinfo: Adjust.
6160 Also, make sure to include the `,' for these declarations.
6161
6162 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
6163
6164 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
6165 definition; avoids potential autoreconf problems.
6166
6167 2002-11-15 Akim Demaille <akim@epita.fr>
6168
6169 Always check the value returned by yyparse.
6170
6171 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
6172 returned by yyparse.
6173 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
6174 Adjust calls.
6175 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
6176 returned by yyparse.
6177
6178 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6179
6180 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
6181 on input.at test.
6182
6183 2002-11-14 Paul Eggert <eggert@twinsun.com>
6184
6185 * src/output.c (output_skeleton): Call xfopen instead of
6186 duplicating xfopen's body.
6187
6188 Fix bugs reported by Nelson H. F. Beebe in
6189 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
6190
6191 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
6192 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
6193 Group compiler. Instead, use "$CC -E bar.c". Include the .h
6194 file twice in the grammar, as an extra check.
6195
6196 * tests/input.at (Torturing the Scanner): Surround the
6197 backslash-newline tests with "#if 0", to make it less likely that
6198 we'll run into compiler bugs. Bring back solitary \ inside
6199 comment, but add a closing comment to work around HP C bug. Don't
6200 test backslash-newline in C character constant.
6201
6202 2002-11-14 Akim Demaille <akim@epita.fr>
6203
6204 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
6205 status of the compiler.
6206 Calling `exit 1' is no longer needed.
6207 Reported by Nelson H. F. Beebe.
6208
6209 2002-11-14 Akim Demaille <akim@epita.fr>
6210
6211 * tests/atlocal.in (CPPFLAGS): We have config.h.
6212 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
6213 New.
6214 * tests/actions.at, tests/calc.at, tests/conflicts.at,
6215 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
6216 * tests/regression.at, tests/torture.at: Use them for all the
6217 grammars that are to be compiled.
6218 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
6219 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
6220 * doc/bison.texinfo (GLR Parsers): Document `inline'.
6221
6222 2002-11-14 Akim Demaille <akim@epita.fr>
6223
6224 * doc/bison.texinfo: Various formatting changes (alignments in
6225 samples, additional @group/@end group, GCS in samples.
6226 Use @deffn instead of simple @table to define the directives,
6227 macros, variables etc.
6228
6229 2002-11-13 Paul Eggert <eggert@twinsun.com>
6230
6231 Fix some bugs reported by Albert Chin-A-Young in
6232 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
6233
6234 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
6235 -o c"; the HP C compiler chatters during compilation.
6236 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
6237 * tests/headers.at (export YYLTYPE): Likewise.
6238
6239 * tests/input.at (Torturing the Scanner): Remove lines containing
6240 solitary backslashes, as they tickle a bug in the HP C compiler.
6241
6242 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
6243 comments, since they're not portable. Use GNU coding style.
6244
6245 2002-11-13 Akim Demaille <akim@epita.fr>
6246
6247 * data/yacc.c: Leave bigger chunks of quoted text.
6248 (YYDSYMPRINTF): New.
6249 Use it to report symbol activities.
6250 * data/glr.c (YYDSYMPRINTF): New.
6251 Use it.
6252
6253 2002-11-12 Paul Eggert <eggert@twinsun.com>
6254
6255 Version 1.75b.
6256
6257 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
6258 (yyglrReduce): Return yyok, not 0.
6259 This should avoid the enumerated-type warnings reported
6260 by Nelson H. F. Beebe in
6261 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
6262
6263 * lib/bbitset.h (BITSET_INLINE): Remove.
6264 * lib/bitset.h [! BITSET_INLINE]: Remove.
6265 (bitset_set, bitset_reset, bitset_test): Rename local vars
6266 to avoid shadowing warnings by GCC.
6267
6268 * data/glr.c (inline): Remove #define. It's the user's
6269 responsibility to #define it away, just like 'const'.
6270 This fixes one of the bugs reported by Nelson H. F. Beebe in
6271 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
6272
6273 * Makefile.maint (po-check): Scan .l and .y files instead of the
6274 .c and the .h files that they generate. This fixes the bug
6275 reported by Tim Van Holder in:
6276 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
6277 Look for N_ as well as for _. Try to avoid matching #define for
6278 N_ and _.
6279 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
6280 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
6281 * src/scan-gram.l: Revamp regular expressions so that " and '
6282 do not confuse xgettext.
6283
6284 * src/struniq.h (struniq_new): Do not declare the return type
6285 to be 'const'; this violates the C standard.
6286 * src/struniq.c (struniq_new): Likewise.
6287
6288 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
6289
6290 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
6291 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
6292 linker.
6293
6294 2002-11-12 Akim Demaille <akim@epita.fr>
6295
6296 * Makefile.maint: Sync with Autoconf:
6297 (local_updates): New.
6298
6299 2002-11-12 Akim Demaille <akim@epita.fr>
6300
6301 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
6302
6303 2002-11-12 Akim Demaille <akim@epita.fr>
6304
6305 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
6306 locations.
6307
6308 2002-11-12 Akim Demaille <akim@epita.fr>
6309
6310 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
6311 not yyvalue.
6312
6313 2002-11-12 Akim Demaille <akim@epita.fr>
6314
6315 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
6316 Use it to test the GLR parser.
6317
6318 2002-11-12 Akim Demaille <akim@epita.fr>
6319
6320 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
6321 defines it.
6322 * data/glr.c (yystos): New.
6323 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
6324 (YYDSYMPRINT): New.
6325 (yyval): Don't define it, it is handled via M4.
6326 (yyrecoverParseError): Free verbosely the discarded symbols.
6327 * data/yacc.c (yysymprint): Remove, rather...
6328 (b4_yysymprint_generate): invoke.
6329 * data/c.m4 (b4_yysymprint_generate): New.
6330 Accept pointers as arguments, as opposed to the version from
6331 yacc.c.
6332 (b4_yydestruct_generate): Likewise.
6333 * tests/cations.at (Printers and Destructors): Use Bison directives
6334 instead of CPP macros.
6335 Don't rely on internal details.
6336
6337 2002-11-12 Akim Demaille <akim@epita.fr>
6338
6339 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
6340 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
6341 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
6342 it against YYEMPTY and so forth), work on yytoken (i.e., set
6343 it to YYEMPTY etc.).
6344 (yydestruct): Replace with a b4_yydestruct_generate invocation.
6345 (b4_symbol_actions): Remove.
6346 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
6347 for 0, end-of-input.
6348
6349 2002-11-12 Akim Demaille <akim@epita.fr>
6350
6351 * doc/bison.texinfo (Destructor Decl): New.
6352
6353 2002-11-12 Akim Demaille <akim@epita.fr>
6354
6355 * src/tables.c (tables_generate): Use free for pointers that
6356 cannot be NULL, not XFREE.
6357 (pack_vector): Use assert, not fatal, for bound violations.
6358 * src/state.c (state_new): Likewise.
6359 * src/reader.c (reader): Likewise.
6360 * src/lalr.c (set_goto_map): Likewise.
6361 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
6362 the file name.
6363
6364 2002-11-12 Akim Demaille <akim@epita.fr>
6365
6366 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
6367 Restore.
6368 * src/scan-gram.l (last_string): Is global to the file, not to
6369 yylex.
6370 * src/parse-gram.y (input): Don't append the epilogue here,
6371 (epilogue.opt): do it here, and free the scanner's obstack.
6372 * src/reader.c (epilogue_set): Rename as...
6373 (epilogue_augment): this.
6374 * data/c.m4 (b4_epilogue): Defaults to empty.
6375
6376 2002-11-12 Akim Demaille <akim@epita.fr>
6377
6378 * src/getargs.c (long_options): Remove duplicates.
6379 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
6380 Remove.
6381 * doc/bison.rnh: Remove.
6382 * doc/bison.texinfo (VMS Invocation): Remove.
6383
6384 2002-11-12 Akim Demaille <akim@epita.fr>
6385
6386 * src/struniq.h, src/struniq.c (struniq_t): Is const.
6387 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
6388
6389 Use struniq for symbols.
6390
6391 * src/symtab.h (symbol_t): The tag member is a struniq.
6392 (symbol_type_set): Adjust.
6393 * src/symtab.c (symbol_new): Takes a struniq.
6394 (symbol_free): Don't free the tag member.
6395 (hash_compare_symbol_t, hash_symbol_t): Rename as...
6396 (hash_compare_symbol, hash_symbol): these.
6397 Use the fact that tags as struniqs.
6398 (symbol_get): Use struniq_new.
6399 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
6400 Returns a strniq.
6401 * src/reader.h (merger_list, grammar_currentmerge_set): The name
6402 and type members are struniqs.
6403 * src/reader.c (get_merge_function)
6404 (grammar_current_rule_merge_set): Adjust.
6405 (TYPE, current_type): Are struniq.
6406
6407 Use struniq for file names.
6408
6409 * src/files.h, src/files.c (infile): Split into...
6410 (grammar_file, current_file): these.
6411 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
6412 * src/reduce.c (reduce_print): Likewise.
6413 * src/getargs.c (getargs): Likewise.
6414 * src/complain.h, src/complain.c: Likewise.
6415 * src/main.c (main): Call struniqs_new early enough to use it for
6416 file names.
6417 Don't free the input file name.
6418
6419 2002-11-12 Akim Demaille <akim@epita.fr>
6420
6421 * src/symtab.c (symbol_free): Remove dead deactivated code:
6422 type_name are properly removed.
6423 Don't use XFREE to free items that cannot be NULL.
6424 * src/struniq.h, src/struniq.c: New.
6425 * src/main.c (main): Initialize/free struniqs.
6426 * src/parse-gram.y (%union): Add astruniq member.
6427 (yyprint): Adjust.
6428 * src/scan-gram.l (<{tag}>): Return a struniq.
6429 Free the obstack bit that used to store it.
6430 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
6431
6432 2002-11-11 Paul Eggert <eggert@twinsun.com>
6433
6434 Revamp to fix many (but not all) of the C- and M4-related quoting
6435 problems. Among other things, this fixes the Bison bug reported
6436 by Jan Hubicka when processing the Bash grammar; see:
6437 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
6438
6439 Use new @ escapes consistently. Represent brackets with @{ and @}
6440 rather than @<:@ and @:>@, since this works a bit better with dumb
6441 editors like vi. Represent @ with @@, since @ is now consistently
6442 an escape. Use @oline@ and @ofile@ rather than __oline__ and
6443 __ofile__, to avoid unexpected expansions. Similarly, use @output
6444 rather than #output.
6445
6446 * data/c.m4 (b4_copyright): Omit file name from comment, since
6447 the file name could contain "*/".
6448 (b4_synclines_flag): Don't quote the 2nd argument; it should already
6449 be quoted. All uses changed.
6450
6451 * data/glr.c: Use new @ escapes consistently.
6452 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
6453 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
6454 Remove, since they couldn't handle arbitrary characters in file
6455 names.
6456 * data/lalr1.cc: Likewise.
6457 * data/yacc.c: Likewise.
6458
6459 * src/files.c (output_infix): Remove; all uses removed.
6460 * src/files.h: Likewise.
6461
6462 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
6463 mishandled funny characters in file names, and anyway it isn't
6464 needed any more.
6465 * data/yacc.c: Likewise.
6466 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
6467
6468 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
6469 * data/yacc.c: Likewise.
6470
6471 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
6472 strings now.
6473 (muscle_init): Quote filename as a C string.
6474 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
6475 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
6476 * src/output.c (escaped_file_name_output): New function.
6477 (prepare_symbols): Quote tokens for M4.
6478 (prepare): Don't insert output_infix, output_prefix,
6479 output_parser_name, output_header_name; this is now down by scan-skel.
6480 Insert skeleton as a C string.
6481
6482 * src/output.c (user_actions_output, symbol_destructors_output,
6483 symbol_printers_output): Quote filenames for C and M4.
6484 * src/reader.c (prologue_augment, epilogue_set): Likewise.
6485
6486 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
6487 escapes other than \\ and \'; this simplifies the code.
6488 (<SC_STRING>): Likewise, for \\ and \".
6489 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
6490 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
6491 Use new escapes @{ and @} for [ and ].
6492
6493 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
6494 them with auto vars.
6495 Switch to new escape scheme, where @ is the escape character uniformly.
6496 Abort if a stray escape character is found. Avoid unbounded input
6497 buffer when parsing non-escaped text.
6498
6499 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
6500 __oline__, #output, $@, and @{ do not have unintended meanings.
6501
6502 2002-11-09 Paul Eggert <eggert@twinsun.com>
6503
6504 Fix the test failure due to GCC warnings described in
6505 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
6506 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
6507 evaluate to 0 if it's impossible for NINF to be in the respective
6508 table.
6509 (yygetLRActions, yyrecoverParseError): Use them.
6510
6511 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
6512 counted in the token inserted at end of file. Now takes
6513 location_t *, not location_t, so that the location can be
6514 adjusted. All uses changed.
6515
6516 * tests/regression.at (Invalid inputs): Adjust wording in
6517 diagnostic to match the new behavior.
6518
6519 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
6520 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
6521 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
6522 abort ();'. This reduces the runtime of the "Many lookaheads"
6523 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
6524 GCC 3.2.
6525
6526 2002-11-07 Paul Eggert <eggert@twinsun.com>
6527
6528 * src/parse-gram.y (CHARACTER): Remove unused token.
6529 All uses removed.
6530
6531 * src/scan-gram.l: Remove stack option. We no longer use the
6532 stack, since the stack was never deeper than 1; instead, use the
6533 new auto var c_context to record the stacked value.
6534
6535 Remove nounput option. At an unexpected end of file, we now unput
6536 the minimal input necessary to end cleanly; this simplifies the
6537 code.
6538
6539 Avoid unbounded token sizes where this is easy.
6540
6541 (unexpected_end_of_file): New function.
6542 Use it to systematize the error message on unexpected EOF.
6543 (last-string): Now auto, not static.
6544 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
6545 (scanner_last_string_free): Remove; not used.
6546 (percent_percent_count): Move decl to just before use.
6547 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
6548 not the (never otherwised-used) CHARACTER.
6549
6550 2002-11-07 Akim Demaille <akim@epita.fr>
6551
6552 Let yyerror always receive the msg as last argument, so that
6553 yyerror can be variadic.
6554
6555 * data/yacc.c (b4_yyerror_args): New.
6556 Use it when calling yyerror.
6557 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
6558 Use it when calling yyerror.
6559 * doc/bison.texinfo (Error Reporting): Adjust.
6560 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
6561 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
6562
6563 2002-11-06 Akim Demaille <akim@epita.fr>
6564
6565 #line should have quoted strings.
6566 Ideally, this should be done by m4_quotearg.
6567
6568 * src/scan-skel.l: Include quotearg.h.
6569 Quote __ofile__.
6570 * src/output.c (symbol_printers_output)
6571 (symbol_destructors_output): Quote the file name.
6572
6573 2002-11-06 Akim Demaille <akim@epita.fr>
6574
6575 * tests/regression.at (Invalid inputs): Adjust to the recent
6576 messages.
6577
6578 2002-11-06 Akim Demaille <akim@epita.fr>
6579
6580 Restore --no-lines.
6581 Reported by Jim Kent.
6582
6583 * data/c.m4 (b4_syncline): New.
6584 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
6585 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
6586 * src/output.c (user_actions_output): Likewise.
6587 (prepare): Define 'b4_synclines_flag'.
6588 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
6589
6590 2002-11-06 Akim Demaille <akim@epita.fr>
6591
6592 * src/main.c (main): Free `infile'.
6593 * src/scan-gram.l (handle_syncline): New.
6594 Recognize `#line'.
6595 * src/output.c (user_actions_output, symbol_destructors_output)
6596 (symbol_printers_output): Use the location's file name, not
6597 infile.
6598 * src/reader.c (prologue_augment, epilogue_set): Likewise.
6599
6600 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6601
6602 * src/tables.c (matching_state): Don't allow states to match if
6603 either has GLR conflict entries.
6604
6605 2002-11-05 Paul Eggert <eggert@twinsun.com>
6606
6607 * src/scan-gram.l: Use more accurate diagnostics, e.g.
6608 "integer out of range" rather than "invalid value".
6609 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
6610 accordingly.
6611
6612 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
6613 Also, remove one static variable in the scanner.
6614
6615 * src/scan-gram.l (braces_level): Now auto, not static.
6616 Initialize to zero if the compiler is being picky.
6617 (INITIAL): Clear braces_level instead of incrementing it.
6618 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
6619 as POSIX 1003.1-2001 requires.
6620 * src/system.h (IF_LINT): New macro, taken from coreutils.
6621 * configure.ac: Define "lint" if --enable-gcc-warnings.
6622
6623 2002-11-05 Akim Demaille <akim@epita.fr>
6624
6625 * src/scan-gram.l: When it starts with `%', complain about the
6626 whole directive, not just that `invalid character: %'.
6627
6628 2002-11-04 Akim Demaille <akim@epita.fr>
6629
6630 * Makefile.maint: Update from Autoconf.
6631 (update, cvs-update, po-update, do-po-update): New.
6632
6633 2002-11-04 Akim Demaille <akim@epita.fr>
6634
6635 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
6636 and yyerror.
6637 Have yyerror `use' its arguments.
6638 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
6639 returns true when location & yacc & pure & parse-param.
6640 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
6641
6642 2002-11-04 Akim Demaille <akim@epita.fr>
6643
6644 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
6645 clashes.
6646 * src/scan-gram.l: Use [\'] instead of ['] to pacify
6647 font-lock-mode.
6648 Use complain_at.
6649 Use quote, not quote_n since LOCATION_PRINT no longer uses the
6650 slot 0.
6651
6652 2002-11-03 Paul Eggert <eggert@twinsun.com>
6653
6654 * src/reader.c (get_merge_function, grammar_current_rule_check):
6655 Use consistent diagnostics for reporting type name clashes.
6656 Quote the types with <>, for consistency with Yacc.
6657 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
6658
6659 2002-11-03 Akim Demaille <akim@epita.fr>
6660
6661 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
6662 New.
6663 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
6664 (b4_parse_param): Remove.
6665 Use b4_identification.
6666 Propagate b4_pure_args where needed to pass them to yyerror.
6667 * data/glr.m4 (b4_parse_param): Remove.
6668 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
6669 (b4_lpure_formals): New.
6670 Use b4_identification.
6671 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
6672 b4_user_formals and b4_user_args.
6673 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
6674 (yyreportAmbiguity): When using a pure parser, also need
6675 the location, and the parse-params.
6676 Adjust callers.
6677 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
6678 When using a pure parser, also need the parse-params.
6679 Adjust callers.
6680 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
6681 (%pure-parser + %parse-param) LALR and GLR parsers.
6682 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
6683 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
6684 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
6685 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
6686 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
6687 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
6688 * doc/bison.texinfo: Untabify the whole file.
6689 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
6690 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
6691 (Error Reporting): Adjust to these new directives.
6692 Document %error-verbose, deprecate YYERROR_VERBOSE.
6693
6694 2002-11-03 Akim Demaille <akim@epita.fr>
6695
6696 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
6697 AT_CHECK_CALC_GLR invocations to use % directives, instead of
6698 command line options.
6699 * tests/cxx-type.at: Formatting changes.
6700
6701 2002-11-03 Paul Eggert <eggert@twinsun.com>
6702
6703 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
6704 to count columns correctly, and to check for invalid inputs.
6705
6706 Use mbsnwidth to count columns correctly. Account for tabs, too.
6707 Include mbswidth.h.
6708 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
6709 (extend_location): New function.
6710 (YY_LINES): Remove.
6711
6712 Handle CRLF in C code rather than in Lex code.
6713 (YY_INPUT): New macro.
6714 (no_cr_read): New function.
6715
6716 Scan UCNs, even though we don't fully handle them yet.
6717 (convert_ucn_to_byte): New function.
6718
6719 Handle backslash-newline correctly in C code.
6720 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
6721 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
6722 all uses changed.
6723 (tag, splice): New EREs. Do not allow NUL or newline in tags.
6724 Use {splice} wherever C allows backslash-newline.
6725 YY_STEP after space, newline, vertical-tab.
6726 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
6727
6728 (letter, id): Don't assume ASCII; e.g., spell out a-z.
6729
6730 ({int}, handle_action_dollar, handle_action_at): Check for integer
6731 overflow.
6732
6733 (YY_STEP): Omit trailing semicolon, so that it's more like C.
6734
6735 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
6736 as well as \000. Check for UCHAR_MAX, not 255.
6737 Allow \x with an arbitrary positive number of digits, as in C.
6738 Check for overflow here.
6739 Allow \? and UCNs, for compatibility with C.
6740
6741 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
6742 with quote slot used by complain_at.
6743
6744 * tests/input.at: Add tests for backslash-newline, m4 quotes
6745 in symbols, long literals, and funny escapes in strings.
6746
6747 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
6748 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
6749 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
6750 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
6751 * m4/mbswidth.m4: New file, from GNU coreutils.
6752
6753 * doc/bison.texinfo (Grammar Outline): Document // comments.
6754 (Symbols): Document that trigraphs have no special meaning in Bison,
6755 nor is backslash-newline allowed.
6756 (Actions): Document that trigraphs have no special meaning.
6757
6758 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
6759 no longer used.
6760
6761 2002-11-02 Paul Eggert <eggert@twinsun.com>
6762
6763 * src/reader.c: Don't include quote.h; not needed.
6764 (get_merge_function): Reword warning to be consistent with
6765 type clash diagnostic in grammar_current_rule_check.
6766
6767 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
6768 bug in trigraph handling.
6769
6770 * src/output.c (prepare_symbols): When printing token names,
6771 escape "[" as "@<:@" and likewise for "]".
6772
6773 * src/system.h (errno): Remove declaration, as we are now
6774 assuming C89 or better, and C89 guarantees errno.
6775
6776 2002-10-30 Paul Eggert <eggert@twinsun.com>
6777
6778 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
6779 Check for close failures.
6780 * src/files.h (xfclose): Return void, not int, since it always
6781 returned zero.
6782 * src/files.c (xfclose): Likewise. Report I/O error if ferror
6783 indicates one.
6784 * src/output.c (output_skeleton): Use xfclose rather than fclose
6785 and ferror. xfclose now checks ferror.
6786
6787 * data/glr.c (YYLEFTMOST_STATE): Remove.
6788 (yyreportTree): Use a stack-based leftmost state. This avoids
6789 our continuing battles with bogus warnings about initializers.
6790
6791 2002-10-30 Akim Demaille <akim@epita.fr>
6792
6793 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
6794 #if.
6795
6796 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6797
6798 * tests/glr-regr1.at: New test for reported regressions.
6799 * tests/testsuite.at: Add glr-regr1.at test.
6800 * tests/Makefile.am: Add glr-regr1.at test.
6801
6802 2002-10-24 Paul Eggert <eggert@twinsun.com>
6803
6804 Version 1.75a.
6805
6806 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
6807 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
6808 we use malloc. Don't assume 'A' through 'Z' are contiguous.
6809 Don't assume strdup exists; POSIX says its an XSI extension.
6810 Check for buffer overflow on input.
6811
6812 2002-10-24 Akim Demaille <akim@epita.fr>
6813
6814 * src/output.c (output_skeleton): Don't disable M4sugar comments
6815 too soon: it results in comments being expanded.
6816 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
6817 first output.
6818
6819 2002-10-24 Akim Demaille <akim@epita.fr>
6820
6821 * data/yacc.c (m4_int_type): New.
6822 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
6823 char' as only yacc.c wants K&R portability.
6824 * data/glr.c (yysigned_char): Remove.
6825 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
6826 Reported by Quoc Peyrot.
6827
6828 2002-10-23 Paul Eggert <eggert@twinsun.com>
6829
6830 * src/main.c (main): With --trace=time, report times even if a
6831 non-fatal error occurs. Formerly, the times were reported in some
6832 such cases but not in others.
6833 * src/reader.c (reader): Just return if a complaint has been issued,
6834 instead of exiting, so that 'main' can report times.
6835
6836 2002-10-22 Akim Demaille <akim@epita.fr>
6837
6838 * src/system.h: Include sys/types.
6839 Reported by Bert Deknuydt.
6840
6841 2002-10-23 Paul Eggert <eggert@twinsun.com>
6842
6843 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
6844 Suggested by Art Haas.
6845
6846 2002-10-22 Paul Eggert <eggert@twinsun.com>
6847
6848 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
6849 decl; not needed any more.
6850 * src/main.c (main): Use return to exit, undoing yesterday's change.
6851 The last OS that we could find where this wouldn't work is
6852 SunOS 3.5, and that's too old to worry about now.
6853
6854 * data/glr.c (struct yyltype): Define members even when not
6855 doing locations. This is more consistent with yacc.c, and it
6856 works around the following bug reports:
6857 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
6858 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
6859
6860 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
6861 @acronym consistently. Standardize on "Yacc" instead of "YACC",
6862 "Algol" instead of "ALGOL". Give a bit more history about BNF.
6863
6864 2002-10-22 Akim Demaille <akim@epita.fr>
6865
6866 * data/README: New.
6867
6868 2002-10-21 Paul Eggert <eggert@twinsun.com>
6869
6870 Be consistent about 'bool'; the old code used an enum in one
6871 module and an int in another, and this violates the C standard.
6872 * m4/stdbool.m4: New file, from coreutils 4.5.3.
6873 * configure.ac (AC_HEADER_STDBOOL): Add.
6874 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
6875 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
6876 * src/symtab.c (hash_compare_symbol_t): Likewise.
6877 * src/system.h (bool, false, true): Use a definition consistent
6878 with ../lib/hash.c. All uses changed.
6879
6880 * src/complain.c (warning_issued): Renamed from warn_message_count,
6881 so that we needn't worry about integer overflow (!).
6882 Now of type bool. All uses changed.
6883 (complaint_issued): Renamed from complain_message_count; likewise.
6884
6885 * src/main.c (main): Use exit to exit with failure.
6886
6887 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
6888 rather than 1 and 0.
6889 * src/main.c (main): Likewise.
6890 * src/getargs.c (getargs): Likewise.
6891 * src/reader.c (reader): Likewise.
6892
6893 * src/getarg.c (getargs): Remove duplicate code for
6894 "Try `bison --help'".
6895
6896 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
6897 What was that "2" for?
6898
6899 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
6900 * src/getargs.c (usage): Likewise.
6901
6902 * src/getargs.c (getargs): When there are too few operands, report
6903 the last one. When there are too many, report the first extra
6904 one. This is how diffutils does it.
6905
6906 2002-10-20 Paul Eggert <eggert@twinsun.com>
6907
6908 Remove K&R vestiges.
6909 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
6910 * src/complain.c (VA_START): Remove. Assume prototypes.
6911 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
6912 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
6913 fatal): Assume prototypes.
6914 * src/complain.h: Assume prototypes.
6915 * src/system.h (PARAMS): Remove.
6916 Include <limits.h> unconditionally, since it's guaranteeed even
6917 for a freestanding C89 compiler.
6918 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
6919 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
6920
6921 2002-10-20 Akim Demaille <akim@epita.fr>
6922
6923 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
6924 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
6925 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
6926 (yyresolveStates, yyresolveAction, yyresolveStack)
6927 (yyprocessOneStack): Use them.
6928 (yy_reduce_print): New.
6929 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
6930
6931 2002-10-20 Akim Demaille <akim@epita.fr>
6932
6933 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
6934 arguments and output `void'.
6935 (b4_c_function): Rename as...
6936 (b4_c_function_def): this.
6937 (b4_c_function_decl, b4_c_ansi_function_def)
6938 (b4_c_ansi_function_decl): New.
6939 Change the interpretation of the arguments: before `int, foo', now
6940 `int foo, foo'.
6941 * data/yacc.c (yyparse): Prototype and define thanks to these.
6942 Adjust b4_c_function_def uses.
6943 * data/glr.c (yyparse): Likewise, but ANSI only.
6944
6945 2002-10-20 Akim Demaille <akim@epita.fr>
6946
6947 * src/output.c (prepare): Move the definition of `tokens_number',
6948 `nterms_number', `undef_token_number', `user_token_number_max'
6949 to...
6950 (prepare_tokens): Here.
6951 (prepare_tokens): Rename as...
6952 (prepare_symbols): this.
6953 (prepare): Move the definition of `rules_number' to...
6954 (prepare_rules): here.
6955 (prepare): Move the definition of `last', `final_state_number',
6956 `states_number' to...
6957 (prepare_states): here.
6958 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
6959
6960 2002-10-20 Akim Demaille <akim@epita.fr>
6961
6962 * src/tables.h, src/tables.c, src/output.c: Comment changes.
6963
6964 2002-10-20 Akim Demaille <akim@epita.fr>
6965
6966 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
6967 * data/c.m4: here.
6968
6969 2002-10-20 Akim Demaille <akim@epita.fr>
6970
6971 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
6972 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
6973 `pair'.
6974 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
6975 `name' to...
6976 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
6977 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
6978 These.
6979
6980 2002-10-19 Paul Eggert <eggert@twinsun.com>
6981
6982 Do not create a temporary file, as that involves security and
6983 cleanup headaches. Instead, use a pair of pipes.
6984 Derived from a suggestion by Florian Krohm.
6985 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
6986 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
6987 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
6988 (BISON_PREREQ_SUBPIPE): Add.
6989 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
6990 Add subpipe.h, subpipe.c.
6991 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
6992 * po/POTFILES.in: Add lib/subpipe.c.
6993 * src/output.c: Include "subpipe.h".
6994 (m4_invoke): Remove decl.
6995 (scan_skel): New decl.
6996 (output_skeleton): Use pipe rather than temporary file for m4 input.
6997 Check that m4sugar.m4 is readable, to avoid deadlock.
6998 Check for pipe I/O error.
6999 * src/scan-skel.l (readpipe): Remove decl.
7000 (scan_skel): New function, to be used in place of m4_invoke.
7001 Read from stream rather than file.
7002
7003 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
7004 float, as this generates a warning on Solaris 8 + GCC 3.2 with
7005 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
7006 this generates a more-accurate value anyway.
7007
7008 * lib/timevar.c (timervar_accumulate): Rename locals to
7009 avoid confusion with similarly-named more-global.
7010 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
7011
7012 * src/output.c (prepare): Use xstrdup to convert char const *
7013 to char *, to avoid GCC warning.
7014
7015 2002-10-19 Akim Demaille <akim@epita.fr>
7016
7017 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
7018 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
7019 Use them to have `calc.y' ready for %pure-parser.
7020 * data/yacc.c (YYLEX): Pass a yylex return type to
7021 b4_c_function_call.
7022
7023 2002-10-19 Akim Demaille <akim@epita.fr>
7024
7025 Prototype support of %lex-param and %parse-param.
7026
7027 * src/parse-gram.y: Add the definition of the %lex-param and
7028 %parse-param tokens, plus their rules.
7029 Drop the `_' version of %glr-parser.
7030 Add the "," token.
7031 * src/scan-gram.l (INITIAL): Scan them.
7032 * src/muscle_tab.c: Comment changes.
7033 (muscle_insert, muscle_find): Rename `pair' as `probe'.
7034 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
7035 (muscle_entry_s): The `value' member is no longer const.
7036 Adjust all dependencies.
7037 * src/muscle_tab.c (muscle_init): Adjust: use
7038 MUSCLE_INSERT_STRING.
7039 Initialize the obstack earlier.
7040 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
7041 (muscle_pair_list_grow): New.
7042 * data/c.m4 (b4_c_function_call, b4_c_args): New.
7043 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
7044 * tests/calc.at: Use %locations, not --locations.
7045 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
7046
7047 2002-10-19 Akim Demaille <akim@epita.fr>
7048
7049 * src/getargs.c (usage): Take status as argument and exit
7050 accordingly.
7051 Report the traditional `Try ... --help' message when status != 0.
7052 (usage, version): Don't take a FILE * as arg, it is pointless.
7053 (getargs): When there is an incorrect number of arguments, make it
7054 an error, and report it GNUlically thanks to `usage ()'.
7055
7056 2002-10-18 Paul Eggert <eggert@twinsun.com>
7057
7058 * data/glr.c (yyreportParseError): Don't assume that sprintf
7059 yields the length of the printed string, as this is not true
7060 on SunOS 4.1.4. Reported by Peter Klein.
7061
7062 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
7063 * tests/conflicts.at (%nonassoc and eof): Likewise.
7064 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
7065
7066 2002-10-17 Akim Demaille <akim@epita.fr>
7067
7068 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
7069 * src/getargs.c (trace_types, trace_args): Adjust.
7070 * src/reader.c (grammar_current_rule_prec_set)
7071 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
7072 Standardize error messages.
7073 And s/@prec/%prec/!
7074 (reader): Use trace_flag to enable scanner/parser debugging,
7075 instead of an adhoc scheme.
7076 * src/scan-gram.l: Remove trailing debugging code.
7077
7078 2002-10-16 Paul Eggert <eggert@twinsun.com>
7079
7080 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
7081 MUSCLE_TAB_H.
7082
7083 * NEWS: Officially drop support for building Bison with K&R C,
7084 since it didn't work anyway and it's not worth worrying about.
7085 * Makefile.maint (wget_files): Remove ansi2knr.c.
7086 (ansi2knr.c-url_prefix): Remove.
7087 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
7088 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7089 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7090
7091 2002-10-15 Paul Eggert <eggert@twinsun.com>
7092
7093 Stop using the "enum_" trick for K&R-style function definitions;
7094 it confused me, and I was the author! Instead, assume that people
7095 who want to use K&R C compilers (when using these modules in GCC,
7096 perhaps?) will run ansi2knr.
7097
7098 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
7099 All uses of "enum_" changed to "enum ".
7100 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
7101 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
7102
7103 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
7104 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
7105 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
7106 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
7107 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
7108 abitset_not, abitset_ones, abitset_or, abitset_or_and,
7109 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
7110 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
7111 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
7112 Use function prototypes; this removes the need for declaring
7113 static functions simply to provide their prototypes.
7114 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
7115 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
7116 bitset_count_, bitset_create, bitset_dump, bitset_first,
7117 bitset_free, bitset_init, bitset_last, bitset_next,
7118 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
7119 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
7120 bitset_print, bitset_release_memory, bitset_toggle_,
7121 bitset_type_choose, bitset_type_get, bitset_type_name_get,
7122 debug_bitset): Likewise.
7123 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
7124 * lib/bitset_stats.c (bitset_log_histogram_print,
7125 bitset_percent_histogram_print, bitset_stats_and,
7126 bitset_stats_and_cmp, bitset_stats_and_or,
7127 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
7128 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
7129 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
7130 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
7131 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
7132 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
7133 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
7134 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
7135 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
7136 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
7137 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
7138 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
7139 bitset_stats_zero): Likewise.
7140 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
7141 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
7142 bitsetv_dump, debug_bitsetv): Likewise.
7143 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
7144 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
7145 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
7146 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
7147 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
7148 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
7149 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
7150 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
7151 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
7152 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
7153 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
7154 Likewise.
7155 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
7156 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
7157 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
7158 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
7159 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
7160 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
7161 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
7162 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
7163 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
7164 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
7165 lbitset_xor_cmp, lbitset_zero): Likewise.
7166
7167 2002-10-14 Akim Demaille <akim@epita.fr>
7168
7169 Version 1.75.
7170
7171 2002-10-14 Akim Demaille <akim@epita.fr>
7172
7173 * tests/Makefile.am (maintainer-check-posix): New.
7174
7175 2002-10-14 Akim Demaille <akim@epita.fr>
7176
7177 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
7178 member.
7179
7180 2002-10-14 Akim Demaille <akim@epita.fr>
7181
7182 * src/tables.c (table_ninf_remap): base -> tab.
7183 Reported by Matt Rosing.
7184
7185 2002-10-14 Paul Eggert <eggert@twinsun.com>
7186
7187 * tests/action.at, tests/calc.at, tests/conflicts.at,
7188 tests/cxx-type.at, tests/headers.at, tests/input.at,
7189 tests/regression.at, tests/synclines.at, tests/torture.at:
7190 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
7191 so that the tests still work even if POSIXLY_CORRECT is set.
7192 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
7193
7194 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
7195 for portability to K&R hosts. Fix typo: signed char is guaranteed
7196 only to 127, not to 128.
7197 * data/glr.c (yysigned_char): New type.
7198 * data/yacc.c (yysigned_char): Likewise.
7199 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
7200
7201 2002-10-13 Paul Eggert <eggert@twinsun.com>
7202
7203 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
7204 true due to limited range of data type" warning from GCC.
7205
7206 * data/c.m4 (b4_token_defines): Protect against double-inclusion
7207 by wrapping enum yytokentype's definition inside #ifndef
7208 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
7209
7210 2002-10-13 Akim Demaille <akim@epita.fr>
7211
7212 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
7213 Un yy- yyrhs to avoid the name clash with the global YYRHS.
7214
7215 2002-10-13 Akim Demaille <akim@epita.fr>
7216
7217 * Makefile.maint: Update from Autoconf 2.54.
7218 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
7219
7220 2002-10-13 Akim Demaille <akim@epita.fr>
7221
7222 * src/print.c (print_state): Separate the list of solved conflicts
7223 from the other items.
7224 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
7225
7226 2002-10-13 Akim Demaille <akim@epita.fr>
7227
7228 Let nondeterministic skeletons be usable with deterministic
7229 tables.
7230
7231 With the patch, GAWK compiled by GCC without -O2 passes its test
7232 suite using a GLR parser driven by LALR tables. It fails with -O2
7233 because `struct stat' gives two different answers on my machine:
7234 88 (definition of an auto var) and later 96 (memset on this var).
7235 Hence the stack is badly corrumpted. The headers inclusion is to
7236 blame: if I move the awk.h inclusion before GLR's system header
7237 inclusion, the two struct stat have the same size.
7238
7239 * src/tables.c (pack_table): Always create conflict_table.
7240 (token_actions): Always create conflict_list.
7241 * data/glr.c (YYFLAG): Remove, unused.
7242
7243 2002-10-13 Akim Demaille <akim@epita.fr>
7244
7245 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
7246 (O0FLAGS): New.
7247 (VALGRIND, GXX): New.
7248 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
7249 * tests/bison.in: Run $PREBISON a pre-command.
7250 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
7251 (maintainer-check-g++): New.
7252 * Makefile.am (maintainer-check): New.
7253
7254 2002-10-13 Akim Demaille <akim@epita.fr>
7255
7256 * data/glr.c: Formatting changes.
7257 Tweak some trace messages to match yacc.c's.
7258
7259 2002-10-13 Akim Demaille <akim@epita.fr>
7260
7261 GLR parsers sometimes raise parse errors instead of performing the
7262 default reduction.
7263 Reported by Charles-Henry de Boysson.
7264
7265 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
7266 check the length of the traces when %glr.
7267 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
7268 GLR's traces.
7269 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
7270 Test GLR parsers.
7271 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
7272 (yyltype): Remove the yy prefix from the member names.
7273 (yytable): Complete its comment.
7274 (yygetLRActions): Map error action number from YYTABLE from
7275 YYTABLE_NINF to 0.
7276 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
7277 (which was a bug: it should have been YYTABEL_NINF, and yet it was
7278 not satisfying as we could compare an YYACTION computed from
7279 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
7280 only value for error actions.
7281 (yyreportParseError): In verbose parse error messages, don't issue
7282 `error' in the list of expected tokens.
7283 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
7284 next action to perform to match glr.c's decoding.
7285 (yytable): Complete its comment.
7286
7287 2002-10-13 Paul Eggert <eggert@twinsun.com>
7288
7289 Fix problem reported by Henrik Grubbstroem in
7290 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
7291 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
7292 because the Bison parser reads the second action before reducing
7293 the first one.
7294 * src/scan-gram.l (rule_length): New static var.
7295 Use it to keep track of the rule length in the scanner, since
7296 we can't expect the parser to be in lock-step sync with the scanner.
7297 (handle_action_dollar, handle_action_at): Use this var.
7298 * tests/actions.at (Exotic Dollars): Test for the problem.
7299
7300 2002-10-12 Paul Eggert <eggert@twinsun.com>
7301
7302 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
7303 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
7304 Include <sys/time.h> when checking for clock_t and struct tms.
7305 Use same include order as source.
7306 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
7307 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
7308
7309 * lib/timevar.c: Update copyright date and clarify comments.
7310 (get_time) [IN_GCC]: Keep the GCC version for reference.
7311
7312 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
7313 GCC version as of today, then merge Bison's changes.
7314 Change "GCC" to "Bison" in copyright notice. timevar.def's
7315 author is Akim, so change that too.
7316
7317 * src/reader.c (grammar_current_rule_check):
7318 Don't worry about the default action if $$ is untyped.
7319 Prevents bogus warnings reported by Jim Gifford in
7320 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
7321
7322 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
7323 * data/glr.c, data/lalr1.cc, data/yacc.c:
7324 Output token definitions before the first part of user declarations.
7325 Fixes compatibility problem reported by Jim Gifford for kbd in
7326 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
7327
7328 2002-10-11 Paul Eggert <eggert@twinsun.com>
7329
7330 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
7331 (yyparse): here. This undoes some of the 2002-07-25 change.
7332 Compatibility problem reported by Ralf S. Engelschall with
7333 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
7334
7335 2002-10-11 Akim Demaille <akim@epita.fr>
7336
7337 * tests/regression.at Characters Escapes): New.
7338 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
7339 characters.
7340 Reported by Jan Nieuwenhuizen.
7341
7342 2002-10-11 Akim Demaille <akim@epita.fr>
7343
7344 * po/id.po: New.
7345
7346 2002-10-10 Paul Eggert <eggert@twinsun.com>
7347
7348 Portability fixes for bitsets; this also avoids several GCC
7349 warnings.
7350
7351 * lib/abitset.c: Include <stddef.h>, for offsetof.
7352 * lib/lbitset.c: Likewise.
7353
7354 * lib/abitset.c (abitset_bytes): Return a size that is aligned
7355 properly for vectors of objects. Do not assume that adding a
7356 header size to a multiple of a word size yields a value that is
7357 properly aligned for the whole union.
7358 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7359
7360 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
7361 unique names for structures.
7362 * lib/ebitset.c (ebitset_bytes): Likewise.
7363 * lib/lbitset.c (lbitset_bytes): Likewise.
7364
7365 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
7366 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
7367 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
7368 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
7369 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
7370 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
7371 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
7372 to improve the type-checking that GCC can do.
7373 * lib/bitset.c (bitset_op4_cmp): Likewise.
7374 * lib/bitset_stats.c (bitset_stats_count,
7375 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
7376 bitset_stats_copy, bitset_stats_disjoint_p,
7377 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
7378 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
7379 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
7380 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
7381 bitset_stats_and_or_cmp, bitset_stats_andn_or,
7382 bitset_stats_andn_or_cmp, bitset_stats_or_and,
7383 bitset_stats_or_and_cmp): Likewise.
7384 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
7385 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
7386 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
7387 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
7388
7389 * lib/abitset.h: Include bitset.h, not bbitset.h.
7390 * lib/ebitset.h: Likewise.
7391 * lib/lbitset.h: Likewise.
7392
7393 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
7394 All instances of parameters of type enum bitset_opts are now of
7395 type enum_bitset_opts, to conform to the C Standard, and similarly
7396 for enum_bitset_type.
7397 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
7398 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
7399
7400 Do not use "struct bitset_struct" to mean different things in
7401 different modules. Not only is this confusing, it violates
7402 the C Standard, which requires that structure types in different
7403 modules must be compatible if one is to be passed to the other.
7404 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
7405 All instances of "struct bitset_struct *" replaced with "bitset".
7406 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
7407 (union bitset_union, struct abitset_struct, struct ebitset_struct,
7408 struct lbitset_struct, struct bitset_stats_struct): New types.
7409 All uses of struct bitset_struct changed to union bitset_union,
7410 etc.
7411 * lib/abitset.c (struct abitset_struct, abitset,
7412 struct bitset_struct): Remove.
7413 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
7414 struct bitset_struct): Remove.
7415 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
7416 bitset_struct): Remove.
7417 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
7418 Likewise.
7419
7420 Do not call a function of type T using a call that assumes the
7421 function is of a different type U. Standard C requires that a
7422 function must be called with a type that is compatible with its
7423 definition.
7424 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
7425 New decls.
7426 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
7427 New functions.
7428 * lib/ebitset.c (PFV): Remove.
7429 * lib/lbitset.c (PFV): Likewise.
7430 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
7431 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
7432 decls.
7433 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
7434 (ebitset_vtable): Use them.
7435 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
7436 lbitset_xor): New functions.
7437 (lbitset_vtable): Use them.
7438
7439 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
7440 Declare.
7441
7442 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
7443 GCC warning.
7444 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
7445 Use offsetof, for simplicity.
7446
7447 2002-10-06 Paul Eggert <eggert@twinsun.com>
7448
7449 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
7450 the same width as int. This reapplies a hunk of the 2002-08-12 patch
7451 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
7452 which was inadvertently undone by the 2002-09-30 patch.
7453 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
7454 the same width as int.
7455
7456 2002-10-04 Paul Eggert <eggert@twinsun.com>
7457
7458 Version 1.50.
7459
7460 * configure.ac (AC_INIT), NEWS: Increment version number.
7461
7462 * doc/bison.texinfo: Minor spelling, grammar, and white space
7463 fixes.
7464 (Symbols): Mention that any negative value returned from yylex
7465 signifies end-of-input. Warn about negative chars. Mention
7466 the portable Standard C character set.
7467
7468 The GNU coding standard says CFLAGS and YFLAGS are reserved
7469 for the installer to set.
7470 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
7471 * src/Makefile.am (AM_CFLAGS): Likewise.
7472 (AM_YFLAGS): Renamed from YFLAGS.
7473
7474 Fix some MAX and MIN problems.
7475 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
7476 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
7477 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
7478 * src/reader.c (reader): Use it.
7479
7480 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
7481 POSIX 1003.1-2001 has removed fgrep.
7482
7483 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
7484
7485 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
7486 interpreted as signed.
7487 * lib/ebitset.c (ebitset_list): Fix bug.
7488
7489 2002-10-01 Paul Eggert <eggert@twinsun.com>
7490
7491 More fixes for 64-bit hosts and large bitsets.
7492
7493 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
7494 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
7495 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
7496 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
7497 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
7498 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
7499 bitset_count_): Likewise.
7500 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
7501 bitset_first, bitset_last): Likewise.
7502 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
7503 bitset_stats_list_reverse, bitset_stats_size,
7504 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
7505 Likewise.
7506 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
7507 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
7508 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
7509 bitsetv_reflexive_transitive_closure): Likewise.
7510 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
7511 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
7512 Likewise.
7513 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
7514 Likewise.
7515
7516 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
7517 Use size_t, not unsigned int, to count bytes.
7518 * lib/abitset.h (abitset_bytes): Likewise.
7519 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
7520 Likewise.
7521 * lib/bitset.h (bitset_bytes): Likewise.
7522 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
7523 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
7524 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7525 * lib/ebitset.c (ebitset_bytes): Likewise.
7526 * lib/ebitset.h (ebitset_bytes): Likewise.
7527 * lib/lbitset.c (lbitset_bytes): Likewise.
7528 * lib/lbitset.h (lbitset_bytes): Likewise.
7529
7530 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
7531 abitset_subset_p, abitset_disjoint_p, abitset_and,
7532 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
7533 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
7534 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
7535 abitset_or_and, abitset_or_and_cmp):
7536 Use bitset_windex instead of unsigned int.
7537 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
7538 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
7539 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
7540 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
7541 Likewise.
7542 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
7543
7544 * lib/bitset.c (bitset_print):
7545 Use proper printf formats for widths of integer types.
7546 * lib/bitset_stats.c (bitset_percent_histogram_print,
7547 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
7548 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
7549 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
7550 * lib/lbitset.c (lbitset_bytes): Likewise.
7551
7552 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
7553 BITSET_SIZE_MAX): New macros.
7554 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
7555 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
7556 to BITSET_WINDEX_MAX.
7557
7558 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
7559 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
7560 since we now return the bitset_bindex type (not int).
7561
7562 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
7563 when computing sizes.
7564 * lib/ebitset.c (ebitset_elts_grow): Likewise.
7565
7566 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
7567 and avoid cast to unsigned.
7568
7569 2002-09-30 Akim Demaille <akim@epita.fr>
7570
7571 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
7572 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
7573 Updates from Michael Hayes.
7574
7575 2002-09-30 Art Haas <ahaas@neosoft.com>
7576
7577 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
7578 invocations.
7579 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
7580 defined.
7581
7582 2002-09-27 Akim Demaille <akim@epita.fr>
7583
7584 Version 1.49c.
7585
7586 2002-09-27 Akim Demaille <akim@epita.fr>
7587
7588 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
7589 (Because of AC_LIBSOURCE).
7590
7591 2002-09-27 Akim Demaille <akim@epita.fr>
7592
7593 Playing with Autoscan.
7594
7595 * configure.ac: Remove the old LIBOBJ tweaks.
7596 (AC_REPLACE_FUNCS): Add strrchr and strtol.
7597 * lib/strrchr.c: New.
7598 * lib/strtol.c: New, from the Coreutils 4.5.1.
7599
7600 2002-09-27 Akim Demaille <akim@epita.fr>
7601
7602 Playing with Autoscan.
7603
7604 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
7605 * lib/Makefile.am (libbison_a_SOURCES): No longer include
7606 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
7607 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
7608 Coreutils 4.5.1.
7609
7610 2002-09-24 Akim Demaille <akim@epita.fr>
7611
7612 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
7613 (Frequently Asked Questions, Parser Stack Overflow): New.
7614
7615 2002-09-13 Akim Demaille <akim@epita.fr>
7616
7617 Playing with autoscan.
7618
7619 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
7620 * src/files.c (skeleton_find): Remove, unused.
7621 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
7622 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
7623
7624 2002-09-13 Akim Demaille <akim@epita.fr>
7625
7626 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
7627 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
7628
7629 2002-09-13 Akim Demaille <akim@epita.fr>
7630
7631 * configure.ac: Require 2.54.
7632 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
7633 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
7634 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
7635 Remove, provided by Autoconf macros.
7636
7637 2002-09-12 Akim Demaille <akim@epita.fr>
7638
7639 * m4/prereq.m4: Update, from Coreutils 4.5.1.
7640
7641 2002-09-12 Akim Demaille <akim@epita.fr>
7642
7643 * m4/prereq.m4: Update, from Fileutils 4.1.5.
7644 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
7645 Reported by Martin Mokrejs.
7646
7647 2002-09-10 Akim Demaille <akim@epita.fr>
7648
7649 * src/parse-gram.y: Associate a human readable string to each
7650 token type.
7651 * tests/regression.at (Invalid inputs): Adjust.
7652
7653 2002-09-10 Gary V. Vaughan <gary@gnu.org>
7654
7655 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
7656 with an Autoconf-2.5x style configure.ac.
7657
7658 2002-09-06 Paul Eggert <eggert@twinsun.com>
7659
7660 * doc/bison.texinfo (Conditions): Make explicit that the GPL
7661 exception applies only to yacc.c. This is a modification of a
7662 patch originally suggested by Akim Demaille.
7663
7664 2002-09-06 Akim Demaille <akim@epita.fr>
7665
7666 * data/c.m4 (b4_copyright): Move the GPL exception comment from
7667 here to...
7668 * data/yacc.c: here.
7669
7670 * data/lalr1.cc (struct yyltype): Don't define it, since we use
7671 LocationType.
7672 (b4_ltype): Default to yy::Location from location.hh.
7673
7674 2002-09-04 Jim Meyering <jim@meyering.net>
7675
7676 * data/yacc.c: Guard the declaration of yytoknum also with
7677 `#ifdef YYPRINT', so it is declared only when used.
7678
7679 2002-09-04 Akim Demaille <akim@epita.fr>
7680
7681 * configure.in: Rename as...
7682 * configure.ac: this.
7683 Bump to 1.49c.
7684
7685 2002-09-04 Akim Demaille <akim@epita.fr>
7686
7687 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
7688 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
7689 translate maintainer only messages.
7690
7691 2002-08-12 Paul Eggert <eggert@twinsun.com>
7692
7693 Version 1.49b.
7694
7695 * Makefile.am (SUBDIRS): Remove intl.
7696 (DISTCLEANFILES): Remove.
7697 * NEWS: Mention that GNU M4 is now required. Clarify what is
7698 meant by "larger grammars". Mention the pt_BR translation.
7699 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
7700 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
7701 Bump version from 0.11.2 to 0.11.5.
7702 (BISON_PREREQ_STAGE): Remove.
7703 (AM_GNU_GETTEXT): Use external gettext.
7704 (AC_OUTPUT): Remove intl/Makefile.
7705
7706 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
7707
7708 * data/glr.c: Include string.h, for strlen.
7709 (yyreportParseError): Use size_t for yysize.
7710 (yy_yypstack): No longer nested inside yypstates, as nested
7711 functions are not portable. Do not assume size_t is the
7712 same width as int.
7713 (yypstates): Do not assume that ptrdiff_t is the same width
7714 as int, and similarly for yyposn and YYINDEX.
7715
7716 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
7717
7718 * lib/Makefile.am (INCLUDES): Do not include from the intl
7719 directory, which has been removed.
7720 * src/Makefile.am (INCLUDES): Likewise.
7721
7722 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
7723 (bitsets_sources, additional_bitsets_sources, timevars_sources):
7724 New vars.
7725
7726 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
7727 * tests/Makefile.am (EXTRA_DIST): Likewise.
7728
7729 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
7730 Do not assume that bitset_windex is the same width as unsigned.
7731
7732 * lib/abitset.c (abitset_unused_clear): Do not assume that
7733 bitset_word is the same width as int.
7734 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
7735 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
7736 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
7737 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
7738 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
7739
7740 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
7741 portability to one's complement hosts!).
7742 * lib/ebitset.c (ebitset_op1): Likewise.
7743 * lib/lbitset.c (lbitset_op1): Likewise.
7744
7745 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
7746 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
7747 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
7748 Sync with fileutils.
7749 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
7750 lib/gettext.h: Sync with diffutils.
7751
7752 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
7753 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
7754
7755 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
7756 PROTOTYPES to check for prototypes, and "defined __STDC__" to
7757 check for void *.
7758
7759 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
7760 size_t; the old version tried to do this but casted improperly.
7761 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
7762 (bitset_test): Now returns int, not unsigned long.
7763
7764 * lib/bitset_stats.c: Include "gettext.h".
7765 (_): New macro.
7766 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
7767 name locals "index", as it generates unnecessary warnings on some
7768 hosts that have an "index" function.
7769
7770 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
7771 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
7772 they need translation.
7773 * src/LR0.c (state_list_append, new_itemsets, get_state,
7774 append_states, generate_states): Likewise.
7775 * src/assoc.c (assoc_to_string): Likewise.
7776 * src/closure.c (print_closure, set_firsts, closure): Likewise.
7777 * src/gram.c (grammar_dump): Likewise.
7778 * src/injections.c (injections_compute): Likewise.
7779 * src/lalr.c (lookaheads_print): Likewise.
7780 * src/relation.c (relation_transpose): Likewise.
7781 * src/scan-gram.l: Likewise.
7782 * src/tables.c (table_grow, pack_vector): Likewise.
7783
7784 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
7785 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
7786 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
7787 * m4/mbstate_t.m4: Sync with fileutils.
7788 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
7789
7790 * po/LINGUAS: Add pt_BR.
7791 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
7792 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
7793 lib/timevar.c.
7794 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
7795 manual recommends.
7796 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
7797
7798 * src/complain.c (strerror_r): Remove decl; not needed.
7799 (strerror): Use same pattern as ../lib/error.c.
7800
7801 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
7802
7803 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
7804
7805 * src/main.c (main): Cast result of bindtextdomain and textdomain
7806 to void, to avoid a GCC warning when --disable-nls is in effect.
7807
7808 * src/scan-gram.l: Use strings rather than escapes when possible,
7809 to minimize the number of warnings from xgettext.
7810 (handle_action_dollar, handle_action_at): Don't use isdigit,
7811 as it mishandles negative chars and it may not work as expected
7812 outside the C locale.
7813
7814 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
7815 this is a GCC extension and is not portable to other compilers.
7816
7817 * src/system.h (alloca): Use same pattern as ../lib/error.c.
7818 Do not include <ctype.h>; no longer needed.
7819 Do not include <malloc.h>; no longer needed (and generates
7820 warnings on OpenBSD 3.0).
7821
7822 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
7823 it's not portable.
7824
7825 * tests/regression.at: Do not use 'cc -c input.c -o input';
7826 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
7827
7828 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
7829 exit status as failure, not just exit status 1. Sun C exits
7830 with status 2 sometimes.
7831
7832 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
7833 Use it for the two large tests.
7834
7835 2002-08-02 Akim Demaille <akim@epita.fr>
7836
7837 * src/conflicts.c (conflicts_output): Don't output rules never
7838 reduced here, since anyway that computation doesn't work.
7839 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
7840 (rule_useless_p, rule_never_reduced_p): New.
7841 (grammar_rules_partial_print): Use a filter instead of a range.
7842 Display the title only if needed.
7843 (grammar_rules_print): Adjust.
7844 (grammar_rules_never_reduced_report): New.
7845 * src/tables.c (action_row): Move the computation of rules never
7846 reduced to...
7847 (token_actions): here.
7848 * src/main.c (main): Make the parser before making the report, so
7849 that rules never reduced are computed.
7850 Call grammar_rules_never_reduced_report.
7851 * src/print.c (print_results): Report rules never reduced.
7852 * tests/conflicts.at, tests/reduce.at: Adjust.
7853
7854 2002-08-01 Akim Demaille <akim@epita.fr>
7855
7856 Instead of attaching lookaheads and duplicating the rules being
7857 reduced by a state, attach the lookaheads to the reductions.
7858
7859 * src/state.h (state_t): Remove the `lookaheads',
7860 `lookaheads_rule' member.
7861 (reductions_t): Add a `lookaheads' member.
7862 Use a regular array for the `rules'.
7863 * src/state.c (reductions_new): Initialize the lookaheads member
7864 to 0.
7865 (state_rule_lookaheads_print): Adjust.
7866 * src/state.h, src/state.c (state_reductions_find): New.
7867 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
7868 (count_rr_conflicts): Adjust.
7869 * src/lalr.c (LArule): Remove.
7870 (add_lookback_edge): Adjust.
7871 (state_lookaheads_count): New.
7872 (states_lookaheads_initialize): Merge into...
7873 (initialize_LA): this.
7874 (lalr_free): Adjust.
7875 * src/main.c (main): Don't free nullable and derives too early: it
7876 is used by --verbose.
7877 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
7878
7879 2002-08-01 Akim Demaille <akim@epita.fr>
7880
7881 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
7882 `rule_number_t**'.
7883 (set_derives, free_derives): Rename as...
7884 (derives_compute, derives_free): this.
7885 Adjust all dependencies.
7886 * src/nullable.c (set_nullable, free_nullable): Rename as...
7887 (nullable_compute, nullable_free): these.
7888 (rule_list_t): Store rule_t *, not rule_number_t.
7889 * src/state.c (state_rule_lookaheads_print): Directly compare rule
7890 pointers, instead of their numbers.
7891 * src/main.c (main): Call nullable_free, and derives_free earlier,
7892 as they were lo longer used.
7893
7894 2002-08-01 Akim Demaille <akim@epita.fr>
7895
7896 * lib/timevar.c (get_time): Include children time.
7897 * src/lalr.h (LA, LArule): Don't export them: used with the
7898 state_t.
7899 * src/lalr.c (LA, LArule): Static.
7900 * src/lalr.h, src/lalr.c (lalr_free): New.
7901 * src/main.c (main): Call it.
7902 * src/tables.c (pack_vector): Check whether loc is >= to the
7903 table_size, not >.
7904 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
7905 (tables_generate): do it, since that's also it which allocates
7906 them.
7907 Don't free LA and LArule, main does.
7908
7909 2002-07-31 Akim Demaille <akim@epita.fr>
7910
7911 Separate parser tables computation and output.
7912
7913 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
7914 (conflict_list, conflict_list_cnt, table, check, table_ninf)
7915 (yydefgoto, yydefact, high): Move to...
7916 * src/tables.h, src/tables.c: here.
7917 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
7918 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
7919 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
7920 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
7921 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
7922 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
7923 (action_row, save_row, token_actions, save_column, default_goto)
7924 (goto_actions, sort_actions, matching_state, pack_vector)
7925 (table_ninf_remap, pack_table, prepare_actions): Move to...
7926 * src/tables.c: here.
7927 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
7928 * src/output.c (token_actions, output_base, output_conflicts)
7929 (output_check): Merge into...
7930 (prepare_actions): this.
7931 (actions_output): Rename as...
7932 (user_actions_output): this.
7933 * src/main.c (main): Call tables_generate and tables_free.
7934
7935 2002-07-31 Akim Demaille <akim@epita.fr>
7936
7937 Steal GCC's --time-report support.
7938
7939 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
7940 stolen/adjusted from GCC.
7941 * m4/stage.m4: Remove time related checks.
7942 * m4/timevar.m4: New.
7943 * configure.in: Adjust.
7944 * src/system.h: Adjust to using timevar.h.
7945 * src/getargs.h, src/getargs.c: Support trace_time for
7946 --trace=time.
7947 * src/main.c (stage): Remove.
7948 (main): Replace `stage' invocations with timevar calls.
7949 * src/output.c: Insert pertinent timevar calls.
7950
7951 2002-07-31 Akim Demaille <akim@epita.fr>
7952
7953 Let --trace have arguments.
7954
7955 * src/getargs.h (enum trace_e): New.
7956 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
7957 (long_options, short_options): --trace/-T takes an optional
7958 argument.
7959 Change all the uses of trace_flag to reflect the new flags.
7960 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
7961
7962 Strengthen `stage' portability.
7963
7964 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
7965 * configure.in: Use it.
7966 Don't check for malloc.h and sys/times.h.
7967 * src/system.h: Include them when appropriate.
7968 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
7969 times and struct tms are available.
7970
7971 2002-07-30 Akim Demaille <akim@epita.fr>
7972
7973 In verbose parse error message, don't report `error' as an
7974 expected token.
7975 * tests/actions.at (Printers and Destructors): Adjust.
7976 * tests/calc.at (Calculator $1): Adjust.
7977 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
7978 error message, do not report the parser accepts the error token in
7979 that state.
7980
7981 2002-07-30 Akim Demaille <akim@epita.fr>
7982
7983 Normalize conflict related messages.
7984
7985 * src/complain.h, src/complain.c (warn, complain): New.
7986 * src/conflicts.c (conflicts_print): Use them.
7987 (conflict_report_yacc): New, extracted from...
7988 (conflicts_print): here.
7989 * tests/conflicts.at, tests/existing.at: Adjust.
7990
7991 2002-07-30 Akim Demaille <akim@epita.fr>
7992
7993 Report rules which are never reduced by the parser: those hidden
7994 by conflicts.
7995
7996 * src/LR0.c (save_reductions): Don't make the final state too
7997 different: save its reduction (accept) instead of having a state
7998 without any action (no shift or goto, no reduce).
7999 Note: the final state is now a ``regular'' state, i.e., the
8000 parsers now contain `reduce 0' as default reduction.
8001 Nevertheless, since they decide to `accept' when yystate =
8002 final_state, they still will not reduce rule 0.
8003 * src/print.c (print_actions, print_reduction): Adjust.
8004 * src/output.c (action_row): Track reduced rules.
8005 (token_actions): Report rules never reduced.
8006 * tests/conflicts.at, tests/regression.at: Adjust.
8007
8008 2002-07-30 Akim Demaille <akim@epita.fr>
8009
8010 `stage' was accidently included in a previous patch.
8011 Initiate its autoconfiscation.
8012
8013 * configure.in: Look for malloc.h and sys/times.h.
8014 * src/main.c (stage): Adjust.
8015 Report only when trace_flag.
8016
8017 2002-07-29 Akim Demaille <akim@epita.fr>
8018
8019 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
8020 state_number_t.
8021 (errs_t): symbol_t*, not symbol_number_t.
8022 (reductions_t): rule_t*, not rule_number_t.
8023 (FOR_EACH_SHIFT): New.
8024 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
8025 * src/print.c, src/print_graph.c: Adjust.
8026
8027 2002-07-29 Akim Demaille <akim@epita.fr>
8028
8029 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
8030
8031 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
8032 (endtoken, accept): these.
8033 * src/reader.c (reader): Set endtoken's default tag to "$end".
8034 Set undeftoken's tag to "$undefined" instead of "$undefined.".
8035 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
8036 Adjust.
8037
8038 2002-07-29 Akim Demaille <akim@epita.fr>
8039
8040 * src/reduce.c (reduce_grammar): When the language is empty,
8041 complain about the start symbol, not the axiom.
8042 Use its location.
8043 * tests/reduce.at (Empty Language): New.
8044
8045 2002-07-26 Akim Demaille <akim@epita.fr>
8046
8047 * src/reader.h, src/reader.c (gram_error): ... can't get
8048 yycontrol without making too strong assumptions on the parser
8049 itself.
8050 * src/output.c (prepare_tokens): Use the real 0th value of
8051 token_translations instead of `0'.
8052 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
8053 visible here.
8054 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
8055 for the time being: %locations ought to provide it to yyerror.
8056
8057 2002-07-25 Akim Demaille <akim@epita.fr>
8058
8059 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
8060 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
8061 * tests/regression.at (Web2c Actions): Adjust.
8062
8063 2002-07-25 Akim Demaille <akim@epita.fr>
8064
8065 Stop storing rules from 1 to nrules + 1.
8066
8067 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
8068 * src/nullable.c, src/output.c, src/print.c, src/reader.c
8069 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
8070 Iterate from 0 to nrules.
8071 Use rule_number_as_item_number and item_number_as_rule_number.
8072 Adjust to `derive' now containing possibly 0.
8073 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
8074 Handle the `- 1' part in rule numbers from/to item numbers.
8075 * src/conflicts.c (log_resolution): Fix the message which reversed
8076 shift and reduce.
8077 * src/output.c (action_row): Initialize default_rule to -1.
8078 (token_actions): Adjust.
8079 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
8080 expected output.
8081 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
8082
8083 2002-07-25 Akim Demaille <akim@epita.fr>
8084
8085 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
8086 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
8087 (b4_c_knr_arg_decl): New.
8088 * data/yacc.c: Use it to define yysymprint, yydestruct, and
8089 yyreport_parse_error.
8090
8091 2002-07-25 Akim Demaille <akim@epita.fr>
8092
8093 * data/yacc.c (yyreport_parse_error): New, extracted from...
8094 (yyparse): here.
8095 (yydestruct, yysymprint): Move above yyparse.
8096 Be K&R compliant.
8097
8098 2002-07-25 Akim Demaille <akim@epita.fr>
8099
8100 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
8101 replace...
8102 (b4_sint_type, b4_uint_type): these.
8103 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
8104 * tests/regression.at (Web2c Actions): Adjust.
8105
8106 2002-07-25 Akim Demaille <akim@epita.fr>
8107
8108 * src/gram.h (TIEM_NUMBER_MAX): New.
8109 (item_number_of_rule_number, rule_number_of_item_number): Rename
8110 as...
8111 (rule_number_as_item_number, item_number_as_rule_number): these.
8112 Adjust dependencies.
8113 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8114 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8115 (symbol_number_to_vector_number): New.
8116 (order): Of vector_number_t* type.
8117 (base_t, BASE_MAX, BASE_MIN): New.
8118 (froms, tos, width, pos, check): Of base_t type.
8119 (action_number_t, ACTION_MIN, ACTION_MAX): New.
8120 (actrow): Of action_number_t type.
8121 (conflrow): Of unsigned int type.
8122 (table_ninf, base_ninf): New.
8123 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
8124 (muscle_insert_int_table, muscle_insert_base_table)
8125 (muscle_insert_rule_number_table): New.
8126 (prepare_tokens): Output `toknum' as int_table.
8127 (action_row): Returns a rule_number_t.
8128 Use ACTION_MIN, not SHRT_MIN.
8129 (token_actions): yydefact is rule_number_t*.
8130 (table_ninf_remap): New.
8131 (pack_table): Use it for `base' and `table'.
8132 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
8133 replaced with...
8134 (YYPACT_NINF, YYTABLE_NINF): these.
8135 (yypact, yytable): Compute their types instead of hard-coded
8136 `short'.
8137 * tests/regression.at (Web2c Actions): Adjust.
8138
8139 2002-07-19 Akim Demaille <akim@epita.fr>
8140
8141 * src/scan-gram.l (id): Can start with an underscore.
8142
8143 2002-07-16 Akim Demaille <akim@epita.fr>
8144
8145 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
8146 Adjust all former `associativity' dependencies.
8147 * src/symtab.c (symbol_new): Default associativity is `undef', not
8148 `right'.
8149 (symbol_check_alias_consistence): Adjust.
8150
8151 2002-07-09 Akim Demaille <akim@epita.fr>
8152
8153 * doc/bison.texinfo: Properly set the ``header'' part.
8154 Use @dircategory ``GNU programming tools'' as per Texinfo's
8155 documentation.
8156 Use @copying.
8157
8158 2002-07-09 Akim Demaille <akim@epita.fr>
8159
8160 * lib/quotearg.h: Protect against multiple inclusions.
8161 * src/location.h (location_t): Add a `file' member.
8162 (LOCATION_RESET, LOCATION_PRINT): Adjust.
8163 * src/complain.c (warn_at, complain_at, fatal_at): Drop
8164 `error_one_per_line' support.
8165
8166 2002-07-09 Akim Demaille <akim@epita.fr>
8167
8168 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
8169 * src/reader.c (lineno): Remove.
8170 Adjust all dependencies.
8171 (get_merge_function): Take a location and use complain_at.
8172 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
8173 * tests/regression.at (Invalid inputs, Mixing %token styles):
8174 Adjust.
8175
8176 2002-07-09 Akim Demaille <akim@epita.fr>
8177
8178 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
8179 recovery rule, and forbid extensions when --yacc.
8180 (gram_error): Use complain_at.
8181 * src/reader.c (reader): Exit if there were parse errors.
8182
8183 2002-07-09 Akim Demaille <akim@epita.fr>
8184
8185 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
8186 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
8187 Reported by R Blake <blakers@mac.com>.
8188
8189 2002-07-09 Akim Demaille <akim@epita.fr>
8190
8191 * data/yacc.c: Output the copyright notive in the header.
8192
8193 2002-07-03 Akim Demaille <akim@epita.fr>
8194
8195 * src/output.c (froms, tos): Are state_number_t.
8196 (save_column): sp, sp1, and sp2 are state_number_t.
8197 (prepare): Rename `final' as `final_state_number', `nnts' as
8198 `nterms_number', `nrules' as `rules_number', `nstates' as
8199 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
8200 unused.
8201 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
8202 * data/lalr1.cc (nsym_): Remove, unused.
8203
8204 2002-07-03 Akim Demaille <akim@epita.fr>
8205
8206 * src/lalr.h, src/lalr.c (goto_number_t): New.
8207 * src/lalr.c (goto_list_t): New.
8208 Propagate them.
8209 * src/nullable.c (rule_list_t): New.
8210 Propagate.
8211 * src/types.h: Remove.
8212
8213 2002-07-03 Akim Demaille <akim@epita.fr>
8214
8215 * src/closure.c (print_fderives): Use rule_rhs_print.
8216 * src/derives.c (print_derives): Use rule_rhs_print.
8217 (rule_list_t): New, replaces `shorts'.
8218 (set_derives): Add comments.
8219 * tests/sets.at (Nullable, Firsts): Adjust.
8220
8221 2002-07-03 Akim Demaille <akim@epita.fr>
8222
8223 * src/output.c (prepare_actions): Free `tally' and `width'.
8224 (prepare_actions): Allocate and free `order'.
8225 * src/symtab.c (symbols_free): Free `symbols'.
8226 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
8227 * src/output.c (m4_invoke): Move to...
8228 * src/scan-skel.l: here.
8229 (<<EOF>>): Close yyout, and free its name.
8230
8231 2002-07-03 Akim Demaille <akim@epita.fr>
8232
8233 Fix some memory leaks, and fix a bug: state 0 was examined twice.
8234
8235 * src/LR0.c (new_state): Merge into...
8236 (state_list_append): this.
8237 (new_states): Merge into...
8238 (generate_states): here.
8239 (set_states): Don't ensure a proper `errs' state member here, do it...
8240 * src/conflicts.c (conflicts_solve): here.
8241 * src/state.h, src/state.c: Comment changes.
8242 (state_t): Rename member `shifts' as `transitions'.
8243 Adjust all dependencies.
8244 (errs_new): For consistency, also take the values as argument.
8245 (errs_dup): Remove.
8246 (state_errs_set): New.
8247 (state_reductions_set, state_transitions_set): Assert that no
8248 previous value was assigned.
8249 (state_free): New.
8250 (states_free): Use it.
8251 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
8252 temporary storage: use `errs' and `nerrs' as elsewhere.
8253 (set_conflicts): Allocate and free this `errs'.
8254
8255 2002-07-02 Akim Demaille <akim@epita.fr>
8256
8257 * lib/libiberty.h: New.
8258 * lib: Update the bitset implementation from upstream.
8259 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
8260 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
8261 * src/main.c: Adjust bitset stats calls.
8262
8263 2002-07-01 Paul Eggert <eggert@twinsun.com>
8264
8265 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
8266 char, so that negative chars don't collide with $.
8267
8268 2002-06-30 Akim Demaille <akim@epita.fr>
8269
8270 Have the GLR tests be `warning' checked, and fix the warnings.
8271
8272 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
8273 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
8274 (yyremoveDeletes): `yyi' and `yyj' are size_t.
8275 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
8276 (yyaddDeferredAction): static.
8277 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
8278 (yyreportParseError): yyprefix is const.
8279 yytokenp is used only when verbose.
8280 (yy__GNUC__): Replace with __GNUC__.
8281 (yypdumpstack): yyi is size_t.
8282 (yypreference): Un-yy local variables and arguments, to avoid
8283 clashes with `yyr1'. Anyway, we are not in the user name space.
8284 (yytname_size): be an int, as is compared with ints.
8285 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
8286 Use them.
8287 * tests/cxx-gram.at: Use quotation to protect $1.
8288 Use AT_COMPILE to enable warnings hunts.
8289 Prototype yylex and yyerror.
8290 `Use' argc.
8291 Include `string.h', not `strings.h'.
8292 Produce and prototype stmtMerge only when used.
8293 yylex takes a location.
8294
8295 2002-06-30 Akim Demaille <akim@epita.fr>
8296
8297 We spend a lot of time in quotearg, in particular when --verbose.
8298
8299 * src/symtab.c (symbol_get): Store a quoted version of the key.
8300 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
8301 Adjust all callers.
8302
8303 2002-06-30 Akim Demaille <akim@epita.fr>
8304
8305 * src/state.h (reductions_t): Rename member `nreds' as num.
8306 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
8307 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
8308
8309 2002-06-30 Akim Demaille <akim@epita.fr>
8310
8311 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
8312 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
8313 (shifts_to): Rename as...
8314 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
8315 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
8316 (TRANSITION_IS_DISABLED, transitions_to): these.
8317
8318 2002-06-30 Akim Demaille <akim@epita.fr>
8319
8320 * src/print.c (print_shifts, print_gotos): Merge into...
8321 (print_transitions): this.
8322 (print_transitions, print_errs, print_reductions): Align the
8323 lookaheads columns.
8324 (print_core, print_transitions, print_errs, print_state,
8325 print_grammar): Output empty lines separator before, not after.
8326 (state_default_rule_compute): Rename as...
8327 (state_default_rule): this.
8328 * tests/conflicts.at (Defaulted Conflicted Reduction),
8329 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
8330 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
8331
8332 2002-06-30 Akim Demaille <akim@epita.fr>
8333
8334 Display items as we display rules.
8335
8336 * src/gram.h, src/gram.c (rule_lhs_print): New.
8337 * src/gram.c (grammar_rules_partial_print): Use it.
8338 * src/print.c (print_core): Likewise.
8339 * tests/conflicts.at (Defaulted Conflicted Reduction),
8340 (Unresolved SR Conflicts): Adjust.
8341 (Unresolved SR Conflicts): Adjust and rename as...
8342 (Resolved SR Conflicts): this, as was meant.
8343 * tests/regression.at (Web2c Report): Adjust.
8344
8345 2002-06-30 Akim Demaille <akim@epita.fr>
8346
8347 * src/print.c (state_default_rule_compute): New, extracted from...
8348 (print_reductions): here.
8349 Pessimize, but clarify the code.
8350 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
8351
8352 2002-06-30 Akim Demaille <akim@epita.fr>
8353
8354 * src/output.c (action_row): Let default_rule be always a rule
8355 number.
8356
8357 2002-06-30 Akim Demaille <akim@epita.fr>
8358
8359 * src/closure.c (print_firsts, print_fderives, closure):
8360 Use BITSET_EXECUTE.
8361 * src/lalr.c (lookaheads_print): Likewise.
8362 * src/state.c (state_rule_lookaheads_print): Likewise.
8363 * src/print_graph.c (print_core): Likewise.
8364 * src/print.c (print_reductions): Likewise.
8365 * src/output.c (action_row): Likewise.
8366 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
8367
8368 2002-06-30 Akim Demaille <akim@epita.fr>
8369
8370 * src/print_graph.c: Use report_flag.
8371
8372 2002-06-30 Akim Demaille <akim@epita.fr>
8373
8374 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
8375 to...
8376 * src/relation.h, src/relation.c (traverse, relation_digraph)
8377 (relation_print, relation_transpose): New.
8378
8379 2002-06-30 Akim Demaille <akim@epita.fr>
8380
8381 * src/state.h, src/state.c (shifts_to): New.
8382 * src/lalr.c (build_relations): Use it.
8383
8384 2002-06-30 Akim Demaille <akim@epita.fr>
8385
8386 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
8387 (item_number_of_rule_number, rule_number_of_item_number): New.
8388 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
8389 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8390 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
8391 Propagate their use.
8392 Much remains to be done, in particular wrt `shorts' from types.h.
8393
8394 2002-06-30 Akim Demaille <akim@epita.fr>
8395
8396 * src/symtab.c (symbol_new): Initialize the `printer' member.
8397
8398 2002-06-30 Akim Demaille <akim@epita.fr>
8399
8400 * src/LR0.c (save_reductions): Remove, replaced by...
8401 * src/state.h, src/state.c (state_reductions_set): New.
8402 (reductions, errs): Rename as...
8403 (reductions_t, errs_t): these.
8404 Adjust all dependencies.
8405
8406 2002-06-30 Akim Demaille <akim@epita.fr>
8407
8408 * src/LR0.c (state_list_t, state_list_append): New.
8409 (first_state, last_state): Now symbol_list_t.
8410 (this_state): Remove.
8411 (new_itemsets, append_states, save_reductions): Take a state_t as
8412 argument.
8413 (set_states, generate_states): Adjust.
8414 (save_shifts): Remove, replaced by...
8415 * src/state.h, src/state.c (state_shifts_set): New.
8416 (shifts): Rename as...
8417 (shifts_t): this.
8418 Adjust all dependencies.
8419 * src/state.h (state_t): Remove the `next' member.
8420
8421 2002-06-30 Akim Demaille <akim@epita.fr>
8422
8423 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
8424 escaped in slot 0.
8425
8426 2002-06-30 Akim Demaille <akim@epita.fr>
8427
8428 Use hash.h for the state hash table.
8429
8430 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
8431 (allocate_storage): Use state_hash_new.
8432 (free_storage): Use state_hash_free.
8433 (new_state, get_state): Adjust.
8434 * src/lalr.h, src/lalr.c (states): Move to...
8435 * src/states.h (state_t): Remove the `link' member, no longer
8436 used.
8437 * src/states.h, src/states.c: here.
8438 (state_hash_new, state_hash_free, state_hash_lookup)
8439 (state_hash_insert, states_free): New.
8440 * src/states.c (state_table, state_compare, state_hash): New.
8441 * src/output.c (output_actions): Do not free states now, since we
8442 still need to know the final_state number in `prepare', called
8443 afterwards. Do it...
8444 * src/main.c (main): here: call states_free after `output'.
8445
8446 2002-06-30 Akim Demaille <akim@epita.fr>
8447
8448 * src/state.h, src/state.c (state_new): New, extracted from...
8449 * src/LR0.c (new_state): here.
8450 * src/state.h (STATE_ALLOC): Move to...
8451 * src/state.c: here.
8452 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
8453 * src/state.h, src/state.c: here.
8454
8455 2002-06-30 Akim Demaille <akim@epita.fr>
8456
8457 * src/reader.c (gensym): Rename as...
8458 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
8459 (getsym): Rename as...
8460 (symbol_get): this.
8461
8462 2002-06-30 Akim Demaille <akim@epita.fr>
8463
8464 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
8465 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
8466 * src/output.c, src/print.c, src/print_graph.c: Propagate.
8467 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
8468
8469 2002-06-30 Akim Demaille <akim@epita.fr>
8470
8471 Make the test suite pass with warnings checked.
8472
8473 * tests/actions.at (Printers and Destructors): Improve.
8474 Avoid unsigned vs. signed issues.
8475 * tests/calc.at: Don't exercise the scanner here, do it...
8476 * tests/input.at (Torturing the Scanner): here.
8477
8478 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8479
8480 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
8481 reorganize first lines parallel to yacc.c.
8482
8483 2002-06-28 Akim Demaille <akim@epita.fr>
8484
8485 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
8486 (b4_token_enum, b4_token_defines): New, factored from...
8487 * data/lalr1.cc, data/yacc.c, glr.c: here.
8488
8489 2002-06-28 Akim Demaille <akim@epita.fr>
8490
8491 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
8492 unused variables.
8493 * src/output.c (merger_output): static.
8494
8495 2002-06-28 Akim Demaille <akim@epita.fr>
8496
8497 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
8498 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
8499 pacify GCC.
8500 * src/output.c (save_row): Initialize all the variables to pacify GCC.
8501
8502 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8503
8504 Accumulated changelog for new GLR parsing features.
8505
8506 * src/conflicts.c (count_total_conflicts): Change name to
8507 conflicts_total_count.
8508 * src/conflicts.h: Ditto.
8509 * src/output.c (token_actions): Use the new name.
8510 (output_conflicts): Change conflp => conflict_list_heads, and
8511 confl => conflict_list for better readability.
8512 * data/glr.c: Use the new names.
8513 * NEWS: Add self to GLR announcement.
8514
8515 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
8516
8517 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
8518 Akim Demaille.
8519
8520 * data/bison.glr: Change name to glr.c
8521 * data/glr.c: Renamed from bison.glr.
8522 * data/Makefile.am: Add glr.c
8523
8524 * src/getargs.c:
8525
8526 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
8527 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
8528
8529 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8530
8531 * data/bison.glr: Be sure to restore the
8532 current #line when returning to the skeleton contents after having
8533 exposed the input file's #line.
8534
8535 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8536
8537 * data/bison.glr: Bring up to date with changes to bison.simple.
8538
8539 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8540
8541 * data/bison.glr: Correct definitions that use b4_prefix.
8542 Various reformatting.
8543 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
8544 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
8545 yytokenp argument; now part of stack.
8546 (yychar): Define to behave as documented.
8547 (yyclearin): Ditto.
8548
8549 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8550
8551 * src/reader.h: Add declaration for free_merger_functions.
8552
8553 * src/reader.c (merge_functions): New variable.
8554 (get_merge_function): New function.
8555 (free_merger_functions): New function.
8556 (readgram): Check for %prec that is not followed by a symbol.
8557 Handle %dprec and %merge declarations.
8558 (packgram): Initialize dprec and merger fields in rules array.
8559
8560 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
8561 conflict_list_cnt, conflict_list_free): New variables.
8562 (table_grow): Also grow conflict_table.
8563 (prepare_rules): Output dprec and merger tables.
8564 (conflict_row): New function.
8565 (action_row): Output conflict lists for GLR parser. Don't use
8566 default reduction in conflicted states for GLR parser so that there
8567 are spaces for the conflict lists.
8568 (save_row): Also save conflict information.
8569 (token_actions): Allocate conflict list.
8570 (merger_output): New function.
8571 (pack_vector): Pack conflict table, too.
8572 (output_conflicts): New function to output yyconflp and yyconfl.
8573 (output_check): Allocate conflict_tos.
8574 (output_actions): Output conflict tables, also.
8575 (output_skeleton): Output b4_mergers definition.
8576 (prepare): Output b4_max_rhs_length definition.
8577 Use 'bison.glr' as default skeleton for GLR parsers.
8578
8579 * src/gram.c (glr_parser): New flag.
8580 (grammar_free): Call free_merger_functions.
8581
8582 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
8583 all pairs of conflicting reductions, rather than just all tokens
8584 causing conflicts. Needed to size conflict tables.
8585 (conflicts_output): Modify call to count_rr_conflicts for new
8586 interface.
8587 (conflicts_print): Ditto.
8588 (count_total_conflicts): New function.
8589
8590 * src/reader.h (merger_list): New type.
8591 (merge_functions): New variable.
8592
8593 * src/lex.h (tok_dprec, tok_merge): New token types.
8594
8595 * src/gram.h (rule_s): Add dprec and merger fields.
8596 (glr_parser): New flag.
8597
8598 * src/conflicts.h (count_total_conflicts): New function.
8599
8600 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
8601
8602 * doc/bison.texinfo (Generalized LR Parsing): New section.
8603 (GLR Parsers): New section.
8604 (Language and Grammar): Mention GLR parsing.
8605 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
8606 Correct typo ("tge" -> "the").
8607
8608 * data/bison.glr: New skeleton for GLR parsing.
8609
8610 * tests/cxx-gram.at: New tests for GLR parsing.
8611
8612 * tests/testsuite.at: Include cxx-gram.at.
8613
8614 * tests/Makefile.am: Add cxx-gram.at.
8615
8616 * src/parse-gram.y:
8617
8618 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
8619
8620 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
8621
8622 2002-06-27 Akim Demaille <akim@epita.fr>
8623
8624 * src/options.h, src/options.c: Remove.
8625 * src/getargs.c (short_options, long_options): New.
8626
8627 2002-06-27 Akim Demaille <akim@epita.fr>
8628
8629 * data/bison.simple, data/bison.c++: Rename as...
8630 * data/yacc.c, data/lalr1.cc: these.
8631 * doc/bison.texinfo (Environment Variables): Remove.
8632
8633 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
8634
8635 * src/getargs.c (report_argmatch): Initialize strtok().
8636
8637 2002-06-20 Akim Demaille <akim@epita.fr>
8638
8639 * data/bison.simple (b4_symbol_actions): New, replaces...
8640 (b4_symbol_destructor, b4_symbol_printer): these.
8641 (yysymprint): Be sure to call YYPRINT only for tokens, and using
8642 user token numbers.
8643
8644 2002-06-20 Akim Demaille <akim@epita.fr>
8645
8646 * data/bison.simple (yydestructor): Rename as...
8647 (yydestruct): this.
8648
8649 2002-06-20 Akim Demaille <akim@epita.fr>
8650
8651 * src/symtab.h, src/symtab.c (symbol_type_set)
8652 (symbol_destructor_set, symbol_precedence_set): The location is
8653 the last argument.
8654 Adjust all callers.
8655
8656 2002-06-20 Akim Demaille <akim@epita.fr>
8657
8658 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
8659 internals.
8660 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
8661 Takes a location.
8662 * src/symtab.h, src/symtab.c (symbol_class_set)
8663 (symbol_user_token_number_set): Likewise.
8664 Adjust all callers.
8665 Promote complain_at.
8666 * tests/input.at (Type Clashes): Adjust.
8667
8668 2002-06-20 Akim Demaille <akim@epita.fr>
8669
8670 * data/bison.simple (YYLEX): Fix the declaration when
8671 %pure-parser.
8672
8673 2002-06-20 Akim Demaille <akim@epita.fr>
8674
8675 * data/bison.simple (yysymprint): Don't print the token number,
8676 just its name.
8677 * tests/actions.at (Destructors): Rename as...
8678 (Printers and Destructors): this.
8679 Also exercise %printer.
8680
8681 2002-06-20 Akim Demaille <akim@epita.fr>
8682
8683 * data/bison.simple (YYDSYMPRINT): New.
8684 Use it to remove many of the #if YYDEBUG/if (yydebug).
8685
8686 2002-06-20 Akim Demaille <akim@epita.fr>
8687
8688 * src/symtab.h, src/symtab.c (symbol_t): printer and
8689 printer_location are new members.
8690 (symbol_printer_set): New.
8691 * src/parse-gram.y (PERCENT_PRINTER): New token.
8692 Handle its associated rule.
8693 * src/scan-gram.l: Adjust.
8694 (handle_destructor_at, handle_destructor_dollar): Rename as...
8695 (handle_symbol_code_at, handle_symbol_code_dollar): these.
8696 * src/output.c (symbol_printers_output): New.
8697 (output_skeleton): Call it.
8698 * data/bison.simple (yysymprint): New. Cannot be named yyprint
8699 since there are already many grammar files with a user `yyprint'.
8700 Replace the calls to YYPRINT to calls to yysymprint.
8701 * tests/calc.at: Adjust.
8702 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
8703 taking advantage of parser very internal details (stack size!).
8704
8705 2002-06-20 Akim Demaille <akim@epita.fr>
8706
8707 * src/scan-gram.l: Complete the scanner with the missing patterns
8708 to pacify Flex.
8709 Use `quote' and `symbol_tag_get' where appropriate.
8710
8711 2002-06-19 Akim Demaille <akim@epita.fr>
8712
8713 * tests/actions.at (Destructors): Augment to test locations.
8714 * data/bison.simple (yydestructor): Pass it the current location
8715 if locations are enabled.
8716 Prototype only when __STDC__ or C++.
8717 Change the argument names to move into the yy name space: there is
8718 user code here.
8719
8720 2002-06-19 Akim Demaille <akim@epita.fr>
8721
8722 * data/bison.simple (b4_pure_if): New.
8723 Use it instead of #ifdef YYPURE.
8724
8725 2002-06-19 Akim Demaille <akim@epita.fr>
8726
8727 * data/bison.simple (b4_location_if): New.
8728 Use it instead of #ifdef YYLSP_NEEDED.
8729
8730 2002-06-19 Akim Demaille <akim@epita.fr>
8731
8732 Prepare @$ in %destructor, but currently don't bind it in the
8733 skeleton, as %location use is not cleaned up yet.
8734
8735 * src/scan-gram.l (handle_dollar, handle_destructor_at)
8736 (handle_action_at): New.
8737 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
8738 a braced_code_t and a location as additional arguments.
8739 (handle_destructor_dollar): Instead of requiring `b4_eval', just
8740 unquote one when outputting `b4_dollar_dollar'.
8741 Adjust callers.
8742 * data/bison.simple (b4_eval): Remove.
8743 (b4_symbol_destructor): Adjust.
8744 * tests/input.at (Invalid @n): Adjust.
8745
8746 2002-06-19 Zack Weinberg <zack@codesourcery.com>
8747
8748 * doc/bison.texinfo: Document ability to have multiple
8749 prologue sections.
8750
8751 2002-06-18 Akim Demaille <akim@epita.fr>
8752
8753 * src/files.c (compute_base_names): When computing the output file
8754 names from the input file name, strip the directory part.
8755
8756 2002-06-18 Akim Demaille <akim@epita.fr>
8757
8758 * data/bison.simple.new: Comment changes.
8759 Reported by Andreas Schwab.
8760
8761 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
8762
8763 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
8764 there are no `label `yyoverflowlab' defined but not used' warnings
8765 when yyoverflow is defined.
8766
8767 2002-06-18 Akim Demaille <akim@epita.fr>
8768
8769 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
8770 new member.
8771 (symbol_destructor_set): Adjust.
8772 * src/output.c (symbol_destructors_output): Output the destructor
8773 locations.
8774 Output the symbol name.
8775 * data/bison.simple (b4_symbol_destructor): Adjust.
8776
8777 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
8778 and Akim Demaille <akim@epita.fr>
8779
8780 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
8781 what's left on the stack when the error recovery hits EOF.
8782 * tests/actions.at (Destructors): Complete to exercise this case.
8783
8784 2002-06-17 Akim Demaille <akim@epita.fr>
8785
8786 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
8787 arguments is really empty, not only equal to `[]'.
8788 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
8789 member.
8790 (symbol_destructor_set): New.
8791 * src/output.c (symbol_destructors_output): New.
8792 * src/reader.h (brace_code_t, current_braced_code): New.
8793 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
8794 (handle_dollar): Rename as...
8795 (handle_action_dollar): this.
8796 (handle_destructor_dollar): New.
8797 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
8798 (grammar_declaration): Use it.
8799 * data/bison.simple (yystos): Is always defined.
8800 (yydestructor): New.
8801 * tests/actions.at (Destructors): New.
8802 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
8803
8804 2002-06-17 Akim Demaille <akim@epita.fr>
8805
8806 * src/symlist.h, src/symlist.c (symbol_list_length): New.
8807 * src/scan-gram.l (handle_dollar, handle_at): Compute the
8808 rule_length only when needed.
8809 * src/output.c (actions_output, token_definitions_output): Output
8810 the full M4 block.
8811 * src/symtab.c: Don't access directly to the symbol tag, use
8812 symbol_tag_get.
8813 * src/parse-gram.y: Use symbol_list_free.
8814
8815 2002-06-17 Akim Demaille <akim@epita.fr>
8816
8817 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
8818 (symbol_list_prepend, get_type_name): Move to...
8819 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
8820 (symbol_list_prepend, symbol_list_n_type_name_get): here.
8821 Adjust all callers.
8822 (symbol_list_free): New.
8823 * src/scan-gram.l (handle_dollar): Takes a location.
8824 * tests/input.at (Invalid $n): Adjust.
8825
8826 2002-06-17 Akim Demaille <akim@epita.fr>
8827
8828 * src/reader.h, src/reader.c (symbol_list_new): Export it.
8829 (symbol_list_prepend): New.
8830 * src/parse-gram.y (%union): `list' is a new member.
8831 (symbols.1): New, replaces...
8832 (terms_to_prec.1, nterms_to_type.1): these.
8833 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
8834 Take a location as additional argument.
8835 Adjust all callers.
8836
8837 2002-06-15 Akim Demaille <akim@epita.fr>
8838
8839 * src/parse-gram.y: Move %token in the declaration section so that
8840 we don't depend upon CVS Bison.
8841
8842 2002-06-15 Akim Demaille <akim@epita.fr>
8843
8844 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
8845 * src/print.c (print_core): Use it.
8846
8847 2002-06-15 Akim Demaille <akim@epita.fr>
8848
8849 * src/conflicts.c (log_resolution): Accept the rule involved in
8850 the sr conflicts instead of the lookahead number that points to
8851 that rule.
8852 (flush_reduce): Accept the current lookahead vector as argument,
8853 instead of the index in LA.
8854 (resolve_sr_conflict): Accept the current number of lookahead
8855 bitset to consider for the STATE, instead of the index in LA.
8856 (set_conflicts): Adjust.
8857 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
8858
8859 2002-06-15 Akim Demaille <akim@epita.fr>
8860
8861 * src/state.h (state_t): Replace the `lookaheadsp' member, a
8862 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
8863 Adjust all dependencies.
8864 * src/lalr.c (initialize_lookaheads): Split into...
8865 (states_lookaheads_count, states_lookaheads_initialize): these.
8866 (lalr): Adjust.
8867
8868 2002-06-15 Akim Demaille <akim@epita.fr>
8869
8870 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
8871 out of...
8872 (grammar_rules_print): here.
8873 * src/reduce.c (reduce_output): Use it.
8874 * tests/reduce.at (Useless Rules, Reduced Automaton)
8875 (Underivable Rules): Adjust.
8876
8877 2002-06-15 Akim Demaille <akim@epita.fr>
8878
8879 Copy BYacc's nice way to report the grammar.
8880
8881 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
8882 New.
8883 Don't print the rules' location, it is confusing and useless.
8884 (rule_print): Use grammar_rhs_print.
8885 * src/print.c (print_grammar): Use grammar_rules_print.
8886
8887 2002-06-15 Akim Demaille <akim@epita.fr>
8888
8889 Complete and rationalize `useless thing' warnings.
8890
8891 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
8892 (symbol_tag_print): New.
8893 Use them everywhere in place of accessing directly the tag member.
8894 * src/gram.h, src/gram.c (rule_print): New.
8895 Use it where a rule used to be printed `by hand'.
8896 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
8897 (reduce_grammar_tables): Report the useless rules.
8898 (reduce_print): Useless things are a warning, not an error.
8899 Report it as such.
8900 * tests/reduce.at (Useless Nonterminals, Useless Rules):
8901 (Reduced Automaton, Underivable Rules): Adjust.
8902 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
8903 * tests/conflicts.at (Unresolved SR Conflicts)
8904 (Solved SR Conflicts): Adjust.
8905
8906 2002-06-15 Akim Demaille <akim@epita.fr>
8907
8908 Let symbols have a location.
8909
8910 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
8911 (getsym): Adjust.
8912 Adjust all callers.
8913 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
8914 Use location_t, not int.
8915 * src/symtab.c (symbol_check_defined): Take advantage of the
8916 location.
8917 * tests/regression.at (Invalid inputs): Adjust.
8918
8919 2002-06-15 Akim Demaille <akim@epita.fr>
8920
8921 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
8922 (input): Don't try to initialize yylloc here, do it in the
8923 scanner.
8924 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
8925 * src/gram.h (rule_t): Change line and action_line into location
8926 and action_location, of location_t type.
8927 Adjust all dependencies.
8928 * src/location.h, src/location.c (empty_location): New.
8929 * src/reader.h, src/reader.c (grammar_start_symbol_set)
8930 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
8931 (grammar_current_rule_symbol_append)
8932 (grammar_current_rule_action_append): Expect a location as argument.
8933 * src/reader.c (grammar_midrule_action): Adjust to attach an
8934 action's location as dummy symbol location.
8935 * src/symtab.h, src/symtab.c (startsymbol_location): New.
8936 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
8937 the line numbers.
8938
8939 2002-06-14 Akim Demaille <akim@epita.fr>
8940
8941 Grammar declarations may be found in the grammar section.
8942
8943 * src/parse-gram.y (rules_or_grammar_declaration): New.
8944 (declarations): Each declaration may end with a semicolon, not
8945 just...
8946 (grammar_declaration): `"%union"'.
8947 (grammar): Branch to rules_or_grammar_declaration.
8948
8949 2002-06-14 Akim Demaille <akim@epita.fr>
8950
8951 * src/main.c (main): Invoke scanner_free.
8952
8953 2002-06-14 Akim Demaille <akim@epita.fr>
8954
8955 * src/output.c (m4_invoke): Extracted from...
8956 (output_skeleton): here.
8957 Free tempfile.
8958
8959 2002-06-14 Akim Demaille <akim@epita.fr>
8960
8961 * src/parse-gram.y (directives, directive, gram)
8962 (grammar_directives, precedence_directives, precedence_directive):
8963 Rename as...
8964 (declarations, declaration, grammar, grammar_declaration)
8965 (precedence_declaration, precedence_declarator): these.
8966 (symbol_declaration): New.
8967
8968 2002-06-14 Akim Demaille <akim@epita.fr>
8969
8970 * src/files.c (action_obstack): Remove, unused.
8971 (output_obstack): Remove it, and all its dependencies, as it is no
8972 longer needed.
8973 * src/reader.c (epilogue_set): Build the epilogue in the
8974 muscle_obstack.
8975 * src/output.h, src/output.c (muscle_obstack): Move to...
8976 * src/muscle_tab.h, src/muscle_tab.h: here.
8977 (muscle_init): Initialize muscle_obstack.
8978 (muscle_free): New.
8979 * src/main.c (main): Call it.
8980
8981 2002-06-14 Akim Demaille <akim@epita.fr>
8982
8983 * src/location.h: New, extracted from...
8984 * src/reader.h: here.
8985 * src/Makefile.am (noinst_HEADERS): Merge into
8986 (bison_SOURCES): this.
8987 Add location.h.
8988 * src/parse-gram.y: Use location_t instead of Bison's.
8989 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
8990 Use location_t instead of ints.
8991
8992 2002-06-14 Akim Demaille <akim@epita.fr>
8993
8994 * data/bison.simple, data/bison.c++: Be sure to restore the
8995 current #line when returning to the skeleton contents after having
8996 exposed the input file's #line.
8997
8998 2002-06-12 Akim Demaille <akim@epita.fr>
8999
9000 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
9001 eager.
9002 * tests/actions.at (Exotic Dollars): New.
9003
9004 2002-06-12 Akim Demaille <akim@epita.fr>
9005
9006 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
9007 ['"/] too eagerly.
9008 * tests/input.at (Torturing the Scanner): New.
9009
9010 2002-06-11 Akim Demaille <akim@epita.fr>
9011
9012 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
9013 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
9014 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
9015 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
9016 * src/reader.c (reader): Use it.
9017
9018 2002-06-11 Akim Demaille <akim@epita.fr>
9019
9020 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
9021 Adjust all callers.
9022 (scanner_last_string_free): New.
9023
9024 2002-06-11 Akim Demaille <akim@epita.fr>
9025
9026 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
9027 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
9028 (last_string, YY_OBS_FREE): New.
9029 Use them when returning an ID.
9030
9031 2002-06-11 Akim Demaille <akim@epita.fr>
9032
9033 Have Bison grammars parsed by a Bison grammar.
9034
9035 * src/reader.c, src/reader.h (prologue_augment): New.
9036 * src/reader.c (copy_definition): Remove.
9037
9038 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
9039 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
9040 (grammar_current_rule_prec_set, grammar_current_rule_check)
9041 (grammar_current_rule_symbol_append)
9042 (grammar_current_rule_action_append): Export.
9043 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
9044 (symbol_list_action_append): Remove.
9045 Hook the routines from reader.
9046 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
9047 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
9048
9049 * src/reader.c (read_declarations): Remove, unused.
9050
9051 * src/parse-gram.y: Handle the epilogue.
9052 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
9053 (grammar_start_symbol_set): this.
9054 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
9055 * src/reader.c (readgram): Remove, unused.
9056 (reader): Adjust to insert eoftoken and axiom where appropriate.
9057
9058 * src/reader.c (copy_dollar): Replace with...
9059 * src/scan-gram.h (handle_dollar): this.
9060 * src/parse-gram.y: Remove `%thong'.
9061
9062 * src/reader.c (copy_at): Replace with...
9063 * src/scan-gram.h (handle_at): this.
9064
9065 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
9066 New.
9067
9068 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
9069 time being.
9070
9071 * src/reader.h, src/reader.c (grammar_rule_end): New.
9072
9073 * src/parse.y (current_type, current_class): New.
9074 Implement `%nterm', `%token' support.
9075 Merge `%term' into `%token'.
9076 (string_as_id): New.
9077 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
9078 type name.
9079
9080 * src/parse-gram.y: Be sure to handle properly the beginning of
9081 rules.
9082
9083 * src/parse-gram.y: Handle %type.
9084 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
9085
9086 * src/parse-gram.y: More directives support.
9087 * src/options.c: No longer handle source directives.
9088
9089 * src/parse-gram.y: Fix %output.
9090
9091 * src/parse-gram.y: Handle %union.
9092 Use the prologue locations.
9093 * src/reader.c (parse_union_decl): Remove.
9094
9095 * src/reader.h, src/reader.c (epilogue_set): New.
9096 * src/parse-gram.y: Use it.
9097
9098 * data/bison.simple, data/bison.c++: b4_stype is now either not
9099 defined, then default to int, or to the contents of %union,
9100 without `union' itself.
9101 Adjust.
9102 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
9103
9104 * src/output.c (actions_output): Don't output braces, as they are
9105 already handled by the scanner.
9106
9107 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
9108 characters to themselves.
9109
9110 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
9111 that the epilogue has a proper #line.
9112
9113 * src/parse-gram.y: Handle precedence/associativity.
9114
9115 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
9116 a terminal.
9117 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
9118 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
9119 at all to define terminals that cannot be emitted.
9120
9121 * src/scan-gram.l: Escape M4 characters.
9122
9123 * src/scan-gram.l: Working properly with escapes in user
9124 strings/characters.
9125
9126 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
9127 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
9128 grammar.
9129 Use more modest sizes, as for the time being the parser does not
9130 release memory, and therefore the process swallows a huge amount
9131 of memory.
9132
9133 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
9134 stricter %token grammar.
9135
9136 * src/symtab.h (associativity): Add `undef_assoc'.
9137 (symbol_precedence_set): Do nothing when passed an undef_assoc.
9138 * src/symtab.c (symbol_check_alias_consistence): Adjust.
9139
9140 * tests/regression.at (Invalid %directive): Remove, as it is now
9141 meaningless.
9142 (Invalid inputs): Adjust to the new error messages.
9143 (Token definitions): The new grammar doesn't allow too many
9144 eccentricities.
9145
9146 * src/lex.h, src/lex.c: Remove.
9147 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
9148 (copy_character, copy_string2, copy_string, copy_identifier)
9149 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
9150 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
9151 (parse_action): Remove.
9152 * po/POTFILES.in: Adjust.
9153
9154 2002-06-11 Akim Demaille <akim@epita.fr>
9155
9156 * src/reader.c (parse_action): Don't store directly into the
9157 rule's action member: return the action as a string.
9158 Don't require `rule_length' as an argument: compute it.
9159 (grammar_current_rule_symbol_append)
9160 (grammar_current_rule_action_append): New, eved out from
9161 (readgram): here.
9162 Remove `action_flag', `rulelength', unused now.
9163
9164 2002-06-11 Akim Demaille <akim@epita.fr>
9165
9166 * src/reader.c (grammar_current_rule_prec_set).
9167 (grammar_current_rule_check): New, eved out from...
9168 (readgram): here.
9169 Remove `xaction', `first_rhs': useless.
9170 * tests/input.at (Type clashes): New.
9171 * tests/existing.at (GNU Cim Grammar): Adjust.
9172
9173 2002-06-11 Akim Demaille <akim@epita.fr>
9174
9175 * src/reader.c (grammar_midrule_action): New, Eved out from
9176 (readgram): here.
9177
9178 2002-06-11 Akim Demaille <akim@epita.fr>
9179
9180 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
9181 New.
9182 (readgram): Use them as replacement of inlined code, crule and
9183 crule1.
9184
9185 2002-06-11 Akim Demaille <akim@epita.fr>
9186
9187 * src/reader.c (grammar_end, grammar_symbol_append): New.
9188 (readgram): Use them.
9189 Make the use of `p' as local as possible.
9190
9191 2002-06-10 Akim Demaille <akim@epita.fr>
9192
9193 GCJ's parser requires the tokens to be defined before the prologue.
9194
9195 * data/bison.simple: Output the token definition before the user's
9196 prologue.
9197 * tests/regression.at (Braces parsing, Duplicate string)
9198 (Mixing %token styles): Check the output from bison.
9199 (Early token definitions): New.
9200
9201 2002-06-10 Akim Demaille <akim@epita.fr>
9202
9203 * src/symtab.c (symbol_user_token_number_set): Don't complain when
9204 assigning twice the same user number to a token, so that we can
9205 use it in...
9206 * src/lex.c (lex): here.
9207 Also use `symbol_class_set' instead of hand written code.
9208 * src/reader.c (parse_assoc_decl): Likewise.
9209
9210 2002-06-10 Akim Demaille <akim@epita.fr>
9211
9212 * src/symtab.c, src/symtab.c (symbol_class_set)
9213 (symbol_user_token_number_set): New.
9214 * src/reader.c (parse_token_decl): Use them.
9215 Use a switch instead of ifs.
9216 Use a single argument.
9217
9218 2002-06-10 Akim Demaille <akim@epita.fr>
9219
9220 Remove `%thong' support as it is undocumented, unused, duplicates
9221 `%token's job, and creates useless e-mail traffic with people who
9222 want to know what it is, why it is undocumented, unused, and
9223 duplicates `%token's job.
9224
9225 * src/reader.c (parse_thong_decl): Remove.
9226 * src/options.c (option_table): Remove "thong".
9227 * src/lex.h (tok_thong): Remove.
9228
9229 2002-06-10 Akim Demaille <akim@epita.fr>
9230
9231 * src/symtab.c, src/symtab.c (symbol_type_set)
9232 (symbol_precedence_set): New.
9233 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
9234 (value_components_used): Remove, unused.
9235
9236 2002-06-09 Akim Demaille <akim@epita.fr>
9237
9238 Move symbols handling code out of the reader.
9239
9240 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
9241 (axiom): Move to...
9242 * src/symtab.h, src/symtab.c: here.
9243
9244 * src/gram.c (start_symbol): Remove: use startsymbol->number.
9245 * src/reader.c (startval): Rename as...
9246 * src/symtab.h, src/symtab.c (startsymbol): this.
9247 * src/reader.c: Adjust.
9248
9249 * src/reader.c (symbol_check_defined, symbol_make_alias)
9250 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
9251 (token_translations_init)
9252 Move to...
9253 * src/symtab.c: here.
9254 * src/reader.c (packsymbols): Move to...
9255 * src/symtab.h, src/symtab.c (symbols_pack): here.
9256 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
9257 argument.
9258
9259 2002-06-03 Akim Demaille <akim@epita.fr>
9260
9261 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
9262 then statements.
9263
9264 2002-06-03 Akim Demaille <akim@epita.fr>
9265
9266 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
9267 structs with non literals.
9268 * src/scan-skel.l: never-interactive.
9269 * src/conflicts.c (enum conflict_resolution_e): No trailing
9270 comma.
9271 * src/getargs.c (usage): Split long literal strings.
9272 Reported by Hans Aberg.
9273
9274 2002-05-28 Akim Demaille <akim@epita.fr>
9275
9276 * data/bison.c++: Use C++ ostreams.
9277 (cdebug_): New member.
9278
9279 2002-05-28 Akim Demaille <akim@epita.fr>
9280
9281 * src/output.c (output_skeleton): Be sure to allocate enough room
9282 for `/' _and_ for `\0' in full_skeleton.
9283
9284 2002-05-28 Akim Demaille <akim@epita.fr>
9285
9286 * data/bison.c++: Catch up with bison.simple:
9287 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9288 and Paul Eggert <eggert@twinsun.com>: `error' handing.
9289 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
9290 and popping traces.
9291
9292 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9293
9294 * src/output.c (output_skeleton): Put an explicit path in front of
9295 the skeleton file name, rather than relying on the -I directory,
9296 to partially alleviate effects of having a skeleton file lying around
9297 in the current directory.
9298
9299 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9300
9301 * src/conflicts.c (log_resolution): Correct typo:
9302 obstack_printf should be obstack_fgrow1.
9303
9304 2002-05-26 Akim Demaille <akim@epita.fr>
9305
9306 * src/state.h (state_t): `solved_conflicts' is a new member.
9307 * src/LR0.c (new_state): Set it to 0.
9308 * src/conflicts.h, src/conflicts.c (print_conflicts)
9309 (free_conflicts, solve_conflicts): Rename as...
9310 (conflicts_print, conflicts_free, conflicts_solve): these.
9311 Adjust callers.
9312 * src/conflicts.c (enum conflict_resolution_e)
9313 (solved_conflicts_obstack): New, used by...
9314 (log_resolution): this.
9315 Adjust to attach the conflict resolution to each state.
9316 Complete the description with the precedence/associativity
9317 information.
9318 (resolve_sr_conflict): Adjust.
9319 * src/print.c (print_state): Output its solved_conflicts.
9320 * tests/conflicts.at (Unresolved SR Conflicts)
9321 (Solved SR Conflicts): Exercise --report=all.
9322
9323 2002-05-26 Akim Demaille <akim@epita.fr>
9324
9325 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
9326 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
9327 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
9328 (token_number_t, item_number_as_token_number)
9329 (token_number_as_item_number, muscle_insert_token_number_table):
9330 Rename as...
9331 (symbol_number_t, item_number_as_symbol_number)
9332 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
9333 these, since it is more appropriate.
9334
9335 2002-05-26 Akim Demaille <akim@epita.fr>
9336
9337 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
9338 `Error:' lines.
9339 * data/bison.simple (yystos) [YYDEBUG]: New.
9340 (yyparse) [YYDEBUG]: Display the symbols which are popped during
9341 error recovery.
9342 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
9343
9344 2002-05-25 Akim Demaille <akim@epita.fr>
9345
9346 * doc/bison.texinfo (Debugging): Split into...
9347 (Tracing): this new section, its former contents, and...
9348 (Understanding): this new section.
9349 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
9350 by...
9351 (report_flag): this.
9352 Adjust all dependencies.
9353 (report_args, report_types, report_argmatch): New.
9354 (usage, getargs): Report/support -r, --report.
9355 * src/options.h
9356 (struct option_table_struct): Rename as..,
9357 (struct option_table_s): this.
9358 Rename the `set_flag' member to `flag' to match with getopt_long's
9359 struct.
9360 * src/options.c (option_table): Split verbose into an entry for
9361 %verbose, and another for --verbose.
9362 Support --report/-r, so remove -r from the obsolete --raw.
9363 * src/print.c: Attach full item sets and lookaheads reports to
9364 report_flag instead of trace_flag.
9365 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
9366
9367 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9368 and Paul Eggert <eggert@twinsun.com>
9369
9370 * data/bison.simple (yyparse): Correct error handling to conform to
9371 POSIX and yacc. Specifically, after syntax error is discovered,
9372 do not reduce further before shifting the error token.
9373 Clean up the code a bit by removing the labels yyerrdefault,
9374 yyerrhandle, yyerrpop.
9375 * NEWS: Document the above.
9376
9377 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9378
9379 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
9380 type; it isn't always big enough, since it doesn't necessarily
9381 include non-terminals.
9382 (yytranslate): Expand definition of yy_token_number_type, so that
9383 the latter can be removed.
9384 (yy_token_number_type): Remove, only one use.
9385 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
9386 don't use TokenNumberType as element type.
9387
9388 * tests/regression.at: Modify expected output to agree with change
9389 to yyr1 and yytranslate.
9390
9391 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
9392
9393 * src/reader.c (parse_action): Use copy_character instead of
9394 obstack_1grow.
9395
9396 2002-05-13 Akim Demaille <akim@epita.fr>
9397
9398 * tests/regression.at (Token definitions): Prototype yylex and
9399 yyerror.
9400
9401 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9402
9403 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
9404 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
9405 32-bit arithmetic.
9406 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
9407
9408 2002-05-07 Akim Demaille <akim@epita.fr>
9409
9410 * tests/synclines.at: Be sure to prototype yylex and yyerror to
9411 avoid GCC warnings.
9412
9413 2002-05-07 Akim Demaille <akim@epita.fr>
9414
9415 Kill GCC warnings.
9416
9417 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
9418 over the RHS of each rule.
9419 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
9420 * src/state.h (state_t): Member `nitems' is unsigned short.
9421 * src/LR0.c (get_state): Adjust.
9422 * src/reader.c (packgram): Likewise.
9423 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
9424 `Type'.
9425 (muscle_insert_int_table): Remove, unused.
9426 (prepare_rules): Remove `max'.
9427
9428 2002-05-06 Akim Demaille <akim@epita.fr>
9429
9430 * src/closure.c (print_firsts): Display of the symbol tags.
9431 (bitmatrix_print): Move to...
9432 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
9433 here.
9434 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
9435
9436 2002-05-06 Akim Demaille <akim@epita.fr>
9437
9438 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
9439 hash_do_for_each.
9440
9441 2002-05-06 Akim Demaille <akim@epita.fr>
9442
9443 * src/LR0.c (new_state, get_state): Instead of using the global
9444 `kernel_size' and `kernel_base', have two new arguments:
9445 `core_size' and `core'.
9446 Adjust callers.
9447
9448 2002-05-06 Akim Demaille <akim@epita.fr>
9449
9450 * src/reader.c (packgram): No longer end `ritem' with a 0
9451 sentinel: it is not used.
9452
9453 2002-05-05 Akim Demaille <akim@epita.fr>
9454
9455 New experimental feature: display the lookaheads in the report and
9456 graph.
9457
9458 * src/print (print_core): When --trace-flag, display the rules
9459 lookaheads.
9460 * src/print_graph.c (print_core): Likewise.
9461 Swap the arguments.
9462 Adjust caller.
9463
9464 2002-05-05 Akim Demaille <akim@epita.fr>
9465
9466 * tests/torture.at (Many lookaheads): New test.
9467
9468 2002-05-05 Akim Demaille <akim@epita.fr>
9469
9470 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
9471 (GENERATE_MUSCLE_INSERT_TABLE): this.
9472 (output_int_table, output_unsigned_int_table, output_short_table)
9473 (output_token_number_table, output_item_number_table): Replace with...
9474 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
9475 (muscle_insert_short_table, muscle_insert_token_number_table)
9476 (muscle_insert_item_number_table): these.
9477 Adjust all callers.
9478 (prepare_tokens): Don't free `translations', since...
9479 * src/reader.h, src/reader.c (grammar_free): do it.
9480 Move to...
9481 * src/gram.h, src/gram.c (grammar_free): here.
9482 * data/bison.simple, data/bison.c++: b4_token_number_max is now
9483 b4_translate_max.
9484
9485 2002-05-05 Akim Demaille <akim@epita.fr>
9486
9487 * src/output.c (output_unsigned_int_table): New.
9488 (prepare_rules): `i' is unsigned.
9489 `prhs', `rline', `r2' are unsigned int.
9490 Rename muscle `rhs_number_max' as `rhs_max'.
9491 Output muscles `prhs_max', `rline_max', and `r2_max'.
9492 Free rline and r1.
9493 * data/bison.simple, data/bison.c++: Adjust to use these muscles
9494 to compute types instead of constant types.
9495 * tests/regression.at (Web2c Actions): Adjust.
9496
9497 2002-05-04 Akim Demaille <akim@epita.fr>
9498
9499 * src/symtab.h (SALIAS, SUNDEF): Rename as...
9500 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
9501 Adjust dependencies.
9502 * src/output.c (token_definitions_output): Be sure not to output a
9503 `#define 'a'' when fed with `%token 'a' "a"'.
9504 * tests/regression.at (Token definitions): New.
9505
9506 2002-05-03 Paul Eggert <eggert@twinsun.com>
9507
9508 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
9509 for K&R C.
9510
9511 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
9512
9513 * Makefile.am (SUBDIRS): Remove intl.
9514 (EXTRA_DIST): Add config/config.rpath.
9515
9516 2002-05-03 Akim Demaille <akim@epita.fr>
9517
9518 * data/bison.simple (m4_if): Don't output empty enums.
9519 And actually, output valid enum definitions :(.
9520
9521 2002-05-03 Akim Demaille <akim@epita.fr>
9522
9523 * configure.bat: Remove, completely obsolete.
9524 * Makefile.am (EXTRA_DIST): Adjust.
9525 Don't distribute config.rpath...
9526 * config/Makefile.am (EXTRA_DIST): Do it.
9527
9528 2002-05-03 Akim Demaille <akim@epita.fr>
9529
9530 * configure.in (GETTEXT_VERSION): New.
9531 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
9532
9533 2002-05-03 Akim Demaille <akim@epita.fr>
9534
9535 * data/bison.simple (b4_token_enum): New.
9536 (b4_token_defines): Use it to output tokens both as #define and
9537 enums.
9538 Suggested by Paul Eggert.
9539 * src/output.c (token_definitions_output): Don't output spurious
9540 white spaces.
9541
9542 2002-05-03 Akim Demaille <akim@epita.fr>
9543
9544 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
9545
9546 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
9547
9548 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
9549 Update the stack class, give a try to deque as the default container.
9550
9551 2002-05-02 Akim Demaille <akim@epita.fr>
9552
9553 * data/bison.simple (yyparse): Do not implement @$ = @1.
9554 (YYLLOC_DEFAULT): Adjust to do it.
9555 * doc/bison.texinfo (Location Default Action): Fix.
9556
9557 2002-05-02 Akim Demaille <akim@epita.fr>
9558
9559 * src/reader.c (parse_braces): Merge into...
9560 (parse_action): this.
9561
9562 2002-05-02 Akim Demaille <akim@epita.fr>
9563
9564 * configure.in (ALL_LINGUAS): Remove.
9565 * po/LINGUAS, hr.po: New.
9566
9567 2002-05-02 Akim Demaille <akim@epita.fr>
9568
9569 Remove the so called hairy (semantic) parsers.
9570
9571 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
9572 * src/gram.h, src/gram.c (semantic_parser): Remove.
9573 (rule_t): Remove the guard and guard_line members.
9574 * src/lex.h (token_t): remove tok_guard.
9575 * src/options.c (option_table): Remove %guard and %semantic_parser
9576 support.
9577 * src/output.c, src/output.h (guards_output): Remove.
9578 (prepare): Adjust.
9579 (token_definitions_output): Don't output the `T'
9580 tokens (???).
9581 (output_skeleton): Don't output the guards.
9582 * src/files.c, src/files.c (attrsfile): Remove.
9583 * src/reader.c (symbol_list): Remove the guard and guard_line
9584 members.
9585 Adjust dependencies.
9586 (parse_guard): Remove.
9587 * data/bison.hairy: Remove.
9588 * doc/bison.texinfo (Environment Variables): Remove occurrences of
9589 BISON_HAIRY.
9590
9591 2002-05-02 Akim Demaille <akim@epita.fr>
9592
9593 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
9594 (parse_guard): Rename the formal argument `stack_offset' as
9595 `rule_length', which is more readable.
9596 Adjust callers.
9597 (copy_at, copy_dollar): Instead of outputting the hard coded
9598 values of $$, $n and so forth, output invocation to b4_lhs_value,
9599 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
9600 Note: this patch partially drops `semantic-parser' support: it
9601 always does `rule_length - n', where semantic parsers ought to
9602 always use `-n'.
9603 * data/bison.simple, data/bison.c++ (b4_lhs_value)
9604 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
9605
9606 2002-05-02 Akim Demaille <akim@epita.fr>
9607
9608 * configure.in (AC_INIT): Bump to 1.49b.
9609 (AM_INIT_AUTOMAKE): Short invocation.
9610
9611 2002-05-02 Akim Demaille <akim@epita.fr>
9612
9613 Version 1.49a.
9614
9615 2002-05-01 Akim Demaille <akim@epita.fr>
9616
9617 * src/skeleton.h: Remove.
9618
9619 2002-05-01 Akim Demaille <akim@epita.fr>
9620
9621 * src/skeleton.h: Fix the #endif.
9622 Reported by Magnus Fromreide.
9623
9624 2002-04-26 Paul Eggert <eggert@twinsun.com>
9625
9626 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
9627 Define if we define YYSTYPE and YYLTYPE, respectively.
9628 (YYCOPY): Fix [] quoting problem in the non-GCC case.
9629
9630 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
9631
9632 * src/scan-skel.l: Postprocess quadrigraphs.
9633
9634 * src/reader.c (copy_character): New function, used to output
9635 single characters while replacing `[' and `]' with quadrigraphs, to
9636 avoid troubles with M4 quotes.
9637 (copy_comment): Output characters with copy_character.
9638 (read_additionnal_code): Likewise.
9639 (copy_string2): Likewise.
9640 (copy_definition): Likewise.
9641
9642 * tests/calc.at: Exercise M4 quoting.
9643
9644 2002-04-25 Akim Demaille <akim@epita.fr>
9645
9646 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
9647 between `!' and the command.
9648 Reported by Paul Eggert.
9649
9650 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
9651
9652 * tests/calc.at: Exercise prologue splitting.
9653
9654 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
9655 `b4_post_prologue' instead of `b4_prologue'.
9656
9657 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
9658 muscles.
9659 (output): Free pre_prologue_obstack and post_prologue_obstack.
9660 * src/files.h, src/files.c (attrs_obstack): Remove.
9661 (pre_prologue_obstack, post_prologue_obstack): New.
9662 * src/reader.c (copy_definition): Add a parameter to specify the
9663 obstack to fill, instead of using attrs_obstack unconditionally.
9664 (read_declarations): Pass pre_prologue_obstack to copy_definition if
9665 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
9666
9667 2002-04-23 Paul Eggert <eggert@twinsun.com>
9668
9669 * data/bison.simple: Remove unnecessary commentary and white
9670 space differences from 1_29-branch.
9671 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
9672
9673 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
9674 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
9675 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
9676 constructors or destructors.
9677
9678 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
9679
9680 2002-04-23 Akim Demaille <akim@epita.fr>
9681
9682 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
9683 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
9684 location with columns.
9685 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
9686 All reported by Paul Eggert.
9687
9688 2002-04-22 Akim Demaille <akim@epita.fr>
9689
9690 * src/reduce.c (dump_grammar): Move to...
9691 * src/gram.h, src/gram.c (grammar_dump): here.
9692 Be sure to separate long item numbers.
9693 Don't read the members of a rule's prec if its nil.
9694
9695 2002-04-22 Akim Demaille <akim@epita.fr>
9696
9697 * src/output.c (table_size, table_grow): New.
9698 (MAXTABLE): Remove, replace uses with table_size.
9699 (pack_vector): Instead of dying when the table is too big, grow it.
9700
9701 2002-04-22 Akim Demaille <akim@epita.fr>
9702
9703 * data/bison.simple (yyr1): Its type is that of a token number.
9704 * data/bison.c++ (r1_): Likewise.
9705 * tests/regression.at (Web2c Actions): Adjust.
9706
9707 2002-04-22 Akim Demaille <akim@epita.fr>
9708
9709 * src/reader.c (token_translations_init): 256 is now the default
9710 value for the error token, i.e., it will be assigned another
9711 number if the user assigned 256 to one of her tokens.
9712 (reader): Don't force 256 to error.
9713 * doc/bison.texinfo (Symbols): Adjust.
9714 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
9715 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
9716 etc. instead of 10, 20, 30 (which was used to `jump' over error
9717 (256) and undefined (2)).
9718
9719 2002-04-22 Akim Demaille <akim@epita.fr>
9720
9721 Propagate more token_number_t.
9722
9723 * src/gram.h (token_number_as_item_number)
9724 (item_number_as_token_number): New.
9725 * src/output.c (GENERATE_OUTPUT_TABLE): New.
9726 Use it to create output_item_number_table and
9727 output_token_number_table.
9728 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
9729 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
9730 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
9731 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
9732
9733 2002-04-22 Akim Demaille <akim@epita.fr>
9734
9735 * src/output.h, src/output.c (get_lines_number): Remove.
9736
9737 2002-04-19 Akim Demaille <akim@epita.fr>
9738
9739 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
9740 as Lex/Flex'.
9741 (Debugging): More details about enabling the debugging features.
9742 (Table of Symbols): Describe $$, $n, @$, and @n.
9743 Suggested by Tim Josling.
9744
9745 2002-04-19 Akim Demaille <akim@epita.fr>
9746
9747 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
9748
9749 2002-04-10 Akim Demaille <akim@epita.fr>
9750
9751 * src/system.h: Rely on HAVE_LIMITS_H.
9752 Suggested by Paul Eggert.
9753
9754 2002-04-09 Akim Demaille <akim@epita.fr>
9755
9756 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
9757 full stderr, and strip it according to the bison options, instead
9758 of composing the error message from different bits.
9759 This makes it easier to check for several error messages.
9760 Adjust all the invocations.
9761 Add an invocation exercising the error token.
9762 Add an invocation demonstrating a stupid error message.
9763 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
9764 Adjust the tests.
9765 Error message are for stderr, not stdout.
9766
9767 2002-04-09 Akim Demaille <akim@epita.fr>
9768
9769 * src/gram.h, src/gram.c (error_token_number): Remove, use
9770 errtoken->number.
9771 * src/reader.c (reader): Don't specify the user token number (2)
9772 for $undefined, as it uselessly prevents using it.
9773 * src/gram.h (token_number_t): Move to...
9774 * src/symtab.h: here.
9775 (state_t.number): Is a token_number_t.
9776 * src/print.c, src/reader.c: Use undeftoken->number instead of
9777 hard coded 2.
9778 (Even though this 2 is not the same as above: the number of the
9779 undeftoken remains being 2, it is its user token number which
9780 might not be 2).
9781 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
9782 `user_token_number_max'.
9783 Output `undef_token_number'.
9784 * data/bison.simple, data/bison.c++: Use them.
9785 Be sure to map invalid yylex return values to
9786 `undef_token_number'. This saves us from gratuitous SEGV.
9787
9788 * tests/conflicts.at (Solved SR Conflicts)
9789 (Unresolved SR Conflicts): Adjust.
9790 * tests/regression.at (Web2c Actions): Adjust.
9791
9792 2002-04-08 Akim Demaille <akim@epita.fr>
9793
9794 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
9795 Adding #line.
9796 Remove the duplicate `typedefs'.
9797 (RhsNumberType): Fix the declaration and various other typos.
9798 Use __ofile__.
9799 * data/bison.simple: Use __ofile__.
9800 * src/scan-skel.l: Handle __ofile__.
9801
9802 2002-04-08 Akim Demaille <akim@epita.fr>
9803
9804 * src/gram.h (item_number_t): New, the type of item numbers in
9805 RITEM. Note that it must be able to code symbol numbers as
9806 positive number, and the negation of rule numbers as negative
9807 numbers.
9808 Adjust all dependencies (pretty many).
9809 * src/reduce.c (rule): Remove this `short *' pointer: use
9810 item_number_t.
9811 * src/system.h (MINSHORT, MAXSHORT): Remove.
9812 Include `limits.h'.
9813 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
9814 (shortcpy): Remove.
9815 (MAXTABLE): Move to...
9816 * src/output.c (MAXTABLE): here.
9817 (prepare_rules): Use output_int_table to output rhs.
9818 * data/bison.simple, data/bison.c++: Adjust.
9819 * tests/torture.at (Big triangle): Move the limit from 254 to
9820 500.
9821 * tests/regression.at (Web2c Actions): Ajust.
9822
9823 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
9824 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
9825 passes, but produces negative #line number, once fixed, GCC is
9826 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
9827 C), it passes.
9828 * src/state.h (state_h): Code input lines on ints, not shorts.
9829
9830 2002-04-08 Akim Demaille <akim@epita.fr>
9831
9832 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
9833 and then the grammar.
9834
9835 2002-04-08 Akim Demaille <akim@epita.fr>
9836
9837 * src/system.h: No longer using strndup.
9838
9839 2002-04-07 Akim Demaille <akim@epita.fr>
9840
9841 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
9842 * src/output.c (output_table_data): Return the longest number.
9843 (prepare_tokens): Output `token_number_max').
9844 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
9845 New.
9846 Use them to define yy_token_number_type/TokenNumberType.
9847 Use this type for yytranslate.
9848 * tests/torture.at (Big triangle): Push the limit from 124 to
9849 253.
9850 * tests/regression.at (Web2c Actions): Adjust.
9851
9852 2002-04-07 Akim Demaille <akim@epita.fr>
9853
9854 * tests/torture.at (Big triangle): New.
9855 (GNU AWK Grammar, GNU Cim Grammar): Move to...
9856 * tests/existing.at: here.
9857
9858 2002-04-07 Akim Demaille <akim@epita.fr>
9859
9860 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
9861 nritems.
9862 Adjust dependencies.
9863
9864 2002-04-07 Akim Demaille <akim@epita.fr>
9865
9866 * src/reader.c: Normalize increments to prefix form.
9867
9868 2002-04-07 Akim Demaille <akim@epita.fr>
9869
9870 * src/reader.c, symtab.c: Remove debugging code.
9871
9872 2002-04-07 Akim Demaille <akim@epita.fr>
9873
9874 Rename all the `bucket's as `symbol_t'.
9875
9876 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
9877 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
9878 * src/symtab.c, src/symtab.h (bucket): Rename as...
9879 (symbol_t): this.
9880 (symbol_list_new, bucket_check_defined, bucket_make_alias)
9881 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
9882 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
9883 (buckets_new, buckets_free, buckets_do): Rename as...
9884 (symbol_list_new, symbol_check_defined, symbol_make_alias)
9885 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
9886 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
9887 (symbols_new, symbols_free, symbols_do): these.
9888
9889 2002-04-07 Akim Demaille <akim@epita.fr>
9890
9891 Use lib/hash for the symbol table.
9892
9893 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
9894 EOF.
9895 * src/lex.c (lex): Set the `number' member of new terminals.
9896 * src/reader.c (bucket_check_defined, bucket_make_alias)
9897 (bucket_check_alias_consistence, bucket_translation): New.
9898 (reader, grammar_free, readgram, token_translations_init)
9899 (packsymbols): Adjust.
9900 (reader): Number the predefined tokens.
9901 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
9902 for predefined tokens.
9903 * src/symtab.h (bucket): Remove all the hash table related
9904 members.
9905 * src/symtab.c (symtab): Replace by...
9906 (bucket_table): this.
9907 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
9908 (buckets_new, buckets_do): New.
9909
9910 2002-04-07 Akim Demaille <akim@epita.fr>
9911
9912 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
9913 (start_symbol, max_user_token_number, semantic_parser)
9914 (error_token_number): Initialize.
9915 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
9916 Initialize.
9917 (reader): Don't.
9918 (errtoken, eoftoken, undeftoken, axiom): Extern.
9919
9920 2002-04-07 Akim Demaille <akim@epita.fr>
9921
9922 * src/gram.h (rule_s): prec and precsym are now pointers
9923 to the bucket giving the priority/associativity.
9924 Member `associativity' removed: useless.
9925 * src/reduce.c, src/conflicts.c: Adjust.
9926
9927 2002-04-07 Akim Demaille <akim@epita.fr>
9928
9929 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
9930 Properly escape the symbols' TAG when outputting them.
9931
9932 2002-04-07 Akim Demaille <akim@epita.fr>
9933
9934 * src/lalr.h (LA): Is a bitsetv, not bitset*.
9935
9936 2002-04-07 Akim Demaille <akim@epita.fr>
9937
9938 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
9939 (LArule): this, which is an array to rule_t*.
9940 * src/print.c, src/conflicts.c: Adjust.
9941
9942 2002-04-07 Akim Demaille <akim@epita.fr>
9943
9944 * src/gram.h (rule_t): Rename `number' as `user_number'.
9945 `number' is a new member.
9946 Adjust dependencies.
9947 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
9948
9949 2002-04-07 Akim Demaille <akim@epita.fr>
9950
9951 As a result of the previous patch, it is no longer needed
9952 to reorder ritem itself.
9953
9954 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
9955
9956 2002-04-07 Akim Demaille <akim@epita.fr>
9957
9958 Be sure never to walk through RITEMS, but use only data related to
9959 the rules themselves. RITEMS should be banished.
9960
9961 * src/output.c (output_token_translations): Rename as...
9962 (prepare_tokens): this.
9963 In addition to `translate', prepare the muscles `tname' and
9964 `toknum', which were handled by...
9965 (output_rule_data): this.
9966 Remove, and move the remainder of its outputs into...
9967 (prepare_rules): this new routines, which also merges content from
9968 (output_gram): this.
9969 (prepare_rules): Be sure never to walk through RITEMS.
9970 (output_stos): Rename as...
9971 (prepare_stos): this.
9972 (output): Always invoke prepare_states, after all, just don't use it
9973 in the output if you don't need it.
9974
9975 2002-04-07 Akim Demaille <akim@epita.fr>
9976
9977 * src/LR0.c (new_state): Display `nstates' as the name of the
9978 newly created state.
9979 Adjust to initialize first_state and last_state if needed.
9980 Be sure to distinguish the initial from the final state.
9981 (new_states): Create the itemset of the initial state, and use
9982 new_state.
9983 * src/closure.c (closure): Now that the initial state has its
9984 items properly set, there is no need for a special case when
9985 creating `ruleset'.
9986
9987 As a result, now the rule 0, reducing to $axiom, is visible in the
9988 outputs. Adjust the test suite.
9989
9990 * tests/conflicts.at (Solved SR Conflicts)
9991 (Unresolved SR Conflicts): Adjust.
9992 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
9993 * tests/conflicts.at (S/R in initial): New.
9994
9995 2002-04-07 Akim Demaille <akim@epita.fr>
9996
9997 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
9998 the RHS of the rules.
9999 * src/output.c (output_gram): Likewise.
10000
10001 2002-04-07 Akim Demaille <akim@epita.fr>
10002
10003 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
10004 bucket.
10005 Adjust all dependencies.
10006 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
10007 `number' of the buckets too.
10008 * src/gram.h: Include `symtab.h'.
10009 (associativity): Move to...
10010 * src/symtab.h: here.
10011 No longer include `gram.h'.
10012
10013 2002-04-07 Akim Demaille <akim@epita.fr>
10014
10015 * src/gram.h, src/gram.c (rules_rhs_length): New.
10016 (ritem_longest_rhs): Use it.
10017 * src/gram.h (rule_t): `number' is a new member.
10018 * src/reader.c (packgram): Set it.
10019 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
10020 the end of `rules', and count them out of `nrules'.
10021 (reduce_output, dump_grammar): Adjust.
10022 * src/print.c (print_grammar): It is no longer needed to check for
10023 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
10024 * tests/reduce.at (Reduced Automaton): New test.
10025
10026 2002-04-07 Akim Demaille <akim@epita.fr>
10027
10028 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
10029 lacking `+ 1' to nrules, Bison reported as useless a token if it
10030 was used solely to set the precedence of the last rule...
10031
10032 2002-04-07 Akim Demaille <akim@epita.fr>
10033
10034 * data/bison.c++, data/bison.simple: Don't output the current file
10035 name in #line, to avoid useless diffs between two identical
10036 outputs under different names.
10037
10038 2002-04-07 Akim Demaille <akim@epita.fr>
10039
10040 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
10041 Normalize loops to using `< nrules + 1', not `<= nrules'.
10042
10043 2002-04-07 Akim Demaille <akim@epita.fr>
10044
10045 * TODO: Update.
10046
10047 2002-04-07 Akim Demaille <akim@epita.fr>
10048
10049 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
10050 bucket.value as bucket.number.
10051
10052 2002-04-07 Akim Demaille <akim@epita.fr>
10053
10054 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
10055 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10056 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
10057 RHS, instead of being an index in RITEMS.
10058
10059 2002-04-04 Paul Eggert <eggert@twinsun.com>
10060
10061 * doc/bison.texinfo: Update copyright date.
10062 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
10063 (Symbols): Warn about running Bison in one character set,
10064 but compiling and/or running in an incompatible one.
10065 Warn about character code 256, too.
10066
10067 2002-04-03 Paul Eggert <eggert@twinsun.com>
10068
10069 * src/bison.data (YYSTACK_ALLOC): Depend on whether
10070 YYERROR_VERBOSE is nonzero, not whether it is defined.
10071
10072 Merge changes from bison-1_29-branch.
10073
10074 2002-03-20 Paul Eggert <eggert@twinsun.com>
10075
10076 Merge fixes from Debian bison_1.34-1.diff.
10077
10078 * configure.in (AC_PREREQ): 2.53.
10079
10080 2002-03-20 Akim Demaille <akim@epita.fr>
10081
10082 * src/conflicts.c (log_resolution): Argument `resolution' is const.
10083
10084 2002-03-19 Paul Eggert <eggert@twinsun.com>
10085
10086 * src/bison.simple (YYCOPY): New macro.
10087 (YYSTACK_RELOCATE): Use it.
10088 Remove Type arg; no longer needed. All callers changed.
10089 (yymemcpy): Remove; no longer needed.
10090
10091 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
10092 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
10093
10094 2002-03-19 Akim Demaille <akim@epita.fr>
10095
10096 Test and fix the #line outputs.
10097
10098 * tests/atlocal.at (GCC): New.
10099 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
10100 (Prologue synch line, %union synch line, Postprologue synch line)
10101 (Action synch line, Epilogue synch line): New tests.
10102 * src/reader.c (parse_union_decl): Define the muscle stype_line.
10103 * data/bison.simple, data/bison.c++: Use it.
10104
10105 2002-03-19 Akim Demaille <akim@epita.fr>
10106
10107 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
10108 (Solved SR Conflicts, %expect not enough, %expect right)
10109 (%expect too much): Move to...
10110 * tests/conflicts.at: this new file.
10111
10112 2002-03-19 Akim Demaille <akim@epita.fr>
10113
10114 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10115 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
10116 that we can move to enums for instance.
10117 * src/output.c (token_definitions_output): Output a list of
10118 `token-name, token-number' instead of the #define.
10119 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
10120
10121 2002-03-14 Akim Demaille <akim@epita.fr>
10122
10123 Use Gettext 0.11.1.
10124
10125 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
10126
10127 * data/bison.c++: Make the user able to add members to the generated
10128 parser by subclassing.
10129
10130 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
10131
10132 * src/reader.c (read_additionnal_code): `c' should be an integer, not
10133 a character.
10134 Reported by Nicolas Tisserand and Nicolas Burrus.
10135
10136 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
10137
10138 * src/reader.c: Warn about lacking semi-colons, do not complain.
10139
10140 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
10141
10142 * data/bison.c++: Remove a debug line.
10143
10144 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
10145
10146 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
10147 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
10148 provide a default implementation.
10149
10150 2002-03-04 Akim Demaille <akim@epita.fr>
10151
10152 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
10153 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
10154 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
10155 * tests/semantic.at (Parsing Guards): Similarly.
10156 * src/reader.at (readgram): Complain if the last rule is not ended
10157 with a semi-colon.
10158
10159 2002-03-04 Akim Demaille <akim@epita.fr>
10160
10161 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
10162 * src/closure.c: here.
10163 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
10164 RTC.
10165 * src/warshall.h, src/warshall.c: Remove.
10166 * tests/sets.at (Broken Closure): Adjust.
10167
10168 2002-03-04 Akim Demaille <akim@epita.fr>
10169
10170 * src/output.c (output_skeleton): tempdir is const.
10171 bytes_read is unused.
10172
10173 2002-03-04 Akim Demaille <akim@epita.fr>
10174
10175 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
10176 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
10177 Update.
10178 From Michael Hayes.
10179
10180 2002-03-04 Akim Demaille <akim@epita.fr>
10181
10182 * src/closure.c (closure): `r' is unused.
10183
10184 2002-03-04 Akim Demaille <akim@epita.fr>
10185
10186 * tests/sets.at (Broken Closure): Add the ending `;'.
10187 * src/reader.at (readgram): Complain if a rule is not ended with a
10188 semi-colon.
10189
10190 2002-03-04 Akim Demaille <akim@epita.fr>
10191
10192 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
10193 (count_sr_conflicts): Use bitset_count.
10194 * src/reduce.c (inaccessable_symbols): Ditto.
10195 (bits_size): Remove.
10196 * src/warshall.h, src/warshall.c: Convert to bitsetv.
10197
10198 2002-03-04 Akim Demaille <akim@epita.fr>
10199
10200 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
10201 * src/reduce.c: Remove the `bitset_zero's following the
10202 `bitset_create's, as now it is performed by the latter.
10203
10204 2002-03-04 Akim Demaille <akim@epita.fr>
10205
10206 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
10207 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
10208 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
10209 latest sources from Michael.
10210
10211 2002-03-04 Akim Demaille <akim@epita.fr>
10212
10213 * src/output.c (output): Don't free the grammar.
10214 * src/reader.c (grammar_free): New.
10215 * src/main.c (main): Call it and don't free symtab here.
10216
10217 2002-03-04 Akim Demaille <akim@epita.fr>
10218
10219 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
10220 before returning.
10221 Reported by Benoit Perrot.
10222
10223 2002-03-04 Akim Demaille <akim@epita.fr>
10224
10225 Use bitset operations when possible, not loops over bits.
10226
10227 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
10228 bitset_or.
10229 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
10230 * src/reduce.c (useless_nonterminals): Formatting changes.
10231 * src/warshall.c (TC): Use bitset_or.
10232
10233 2002-03-04 Akim Demaille <akim@epita.fr>
10234
10235 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
10236 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
10237 Ditto.
10238
10239 2002-03-04 Akim Demaille <akim@epita.fr>
10240
10241 * src/lalr.c (F): Now a bitset*.
10242 Adjust all dependencies.
10243
10244 2002-03-04 Akim Demaille <akim@epita.fr>
10245
10246 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
10247 Adjust all dependencies.
10248
10249 2002-03-04 Akim Demaille <akim@epita.fr>
10250
10251 * src/L0.c, src/LR0.h (nstates): Be size_t.
10252 Adjust comparisons (signed vs unsigned).
10253 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
10254 bitset*.
10255 Adjust all dependencies.
10256
10257 2002-03-04 Akim Demaille <akim@epita.fr>
10258
10259 * src/closure.c (firsts): Now, also a bitset.
10260 Adjust all dependencies.
10261 (varsetsize): Remove, now unused.
10262 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
10263
10264 2002-03-04 Akim Demaille <akim@epita.fr>
10265
10266 * src/print.c: Convert to use bitset.h, not hand coded iterations
10267 over ints.
10268
10269 2002-03-04 Akim Demaille <akim@epita.fr>
10270
10271 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
10272
10273 2002-03-04 Akim Demaille <akim@epita.fr>
10274
10275 * src/closure.c (ruleset): Be a bitset.
10276 (rulesetsize): Remove.
10277
10278 2002-03-04 Akim Demaille <akim@epita.fr>
10279
10280 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
10281 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
10282 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
10283 * src/closure.c (fderives): Be an array of bitsets.
10284
10285 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
10286
10287 * data/bison.c++: Merge the two generated headers. Insert a copyright
10288 notice in each output file.
10289
10290 2002-02-28 Akim Demaille <akim@epita.fr>
10291
10292 * data/bison.c++: Copy the prologue of bison.simple to fetch
10293 useful M4 definitions, such as b4_header_guard.
10294
10295 2002-02-25 Akim Demaille <akim@epita.fr>
10296
10297 * src/getargs.c (version): Give the name of the authors, and use a
10298 translator friendly scheme for the bgr
10299 copyright notice.
10300
10301 2002-02-25 Akim Demaille <akim@epita.fr>
10302
10303 * src/output.c (header_output): Remove, now handled completely via
10304 M4.
10305
10306 2002-02-25 Akim Demaille <akim@epita.fr>
10307
10308 * m4/m4.m4: New, from CVS Autoconf.
10309 * configure.in: Invoke it.
10310 * src/output.c (output_skeleton): Use its result instead of the
10311 hard coded name.
10312
10313 2002-02-25 Akim Demaille <akim@epita.fr>
10314
10315 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
10316 Fileutils 4.1.5.
10317 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
10318 * src/output.c (output_skeleton): Use mkstemp to create a real
10319 temporary file.
10320 Move the filling of `skeleton' and its muscle to...
10321 (prepare): here.
10322 (output): Move the definition of the prologue muscle to...
10323 (prepare): here.
10324 * src/system.h (DEFAULT_TMPDIR): New.
10325
10326 2002-02-14 Paul Eggert <eggert@twinsun.com>
10327
10328 Remove the support for C++ namespace cleanliness; it was
10329 causing more problems than it was curing, since it didn't work
10330 properly on some nonstandard C++ compilers. This can wait
10331 for a proper C++ parser.
10332
10333 * NEWS: Document this.
10334 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
10335 of C++, as it's treated like C now.
10336 * src/bison.simple (YYSTD): Remove.
10337 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
10338 Treat C++ just like Standard C instead of trying to support
10339 namespace cleanliness.
10340
10341 2002-02-14 Akim Demaille <akim@epita.fr>
10342
10343 * tests/regression.at (else): Adjust to Andreas' change.
10344
10345 2002-02-14 Akim Demaille <akim@epita.fr>
10346
10347 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
10348
10349 2002-02-13 Andreas Schwab <schwab@suse.de>
10350
10351 * src/output.c (output_rule_data): Don't output NULL, it might
10352 not be defined yet.
10353
10354 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
10355
10356 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
10357 (Copyright notice): Update.
10358
10359 2002-02-11 Akim Demaille <akim@epita.fr>
10360
10361 * tests/regression.at (%nonassoc and eof): Don't include
10362 nonportable headers.
10363
10364 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
10365
10366 * data/bison.c++: Correct error recovery. Make the user able to
10367 initialize the starting location.
10368
10369 2002-02-07 Akim Demaille <akim@epita.fr>
10370
10371 * tests/input.at: New.
10372
10373 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
10374
10375 * data/bison.c++: Replace some direct m4 expansions by constants. Be
10376 more consistent when naming methods and variables. Put preprocessor
10377 directives around tables only needed for debugging.
10378
10379 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
10380
10381 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
10382 C++ parsers.
10383 (yy::b4_name::parse): Use print_.
10384
10385 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
10386
10387 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
10388
10389 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
10390
10391 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
10392 C++ parsers.
10393 (yy::b4_name::parse): Build verbose error messages, and use error_.
10394
10395 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
10396
10397 * data/bison.c++: Fix m4 quoting in comments.
10398
10399 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
10400
10401 * data/bison.c++: Adjust the parser code. Fix some muscles that were
10402 not expanded by m4.
10403
10404 2002-02-05 Akim Demaille <akim@epita.fr>
10405
10406 * data/bison.c++: Adjust to the M4 back end.
10407 More is certainly needed.
10408
10409 2002-02-05 Akim Demaille <akim@epita.fr>
10410
10411 Give a try to M4 as a back end.
10412
10413 * lib/readpipe.c: New, from wdiff.
10414 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
10415 BISON_HAIRY.
10416 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
10417 specific values. Now it is m4 that performs the lookup.
10418 * src/parse-skel.y: Remove.
10419 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
10420 * src/output.c (actions_output, guards_output)
10421 (token_definitions_output): No longer keeps track of the output
10422 line number, hence remove the second argument.
10423 (guards_output): Check against the guard member of a rule, not the
10424 action member.
10425 Adjust callers.
10426 (output_skeleton): Don't look for the skeleton location, let m4 do
10427 that.
10428 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
10429 file will be used.
10430 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
10431 (prepare): Given that for the time being changesyntax is not
10432 usable in M4, rename the muscles using `-' to `_'.
10433 Define `defines_flag', `output_parser_name' and `output_header_name'.
10434 * src/output.h (actions_output, guards_output)
10435 (token_definitions_output): Adjust prototypes.
10436 * src/scan-skel.l: Instead of scanning the skeletons, it now
10437 processes the output of m4: `__oline__' and `#output'.
10438 * data/bison.simple: Adjust to be used by M4(sugar).
10439 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
10440 to date.
10441 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
10442 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
10443 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
10444 shamelessly stolen from CVS Autoconf.
10445
10446 2002-02-05 Akim Demaille <akim@epita.fr>
10447
10448 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
10449 * configure.in: Check for the declarations of free and malloc.
10450 * src/muscle_tab.c: Adjust.
10451
10452 2002-02-05 Akim Demaille <akim@epita.fr>
10453
10454 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
10455 which have no values.
10456
10457 2002-02-05 Akim Demaille <akim@epita.fr>
10458
10459 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
10460 * data/: here.
10461
10462 2002-01-29 Paul Eggert <eggert@twinsun.com>
10463
10464 * src/bison.simple (YYSIZE_T): Do not define merely because
10465 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
10466 On some platforms, <alloca.h> does not declare YYSTD (size_t).
10467
10468 2002-01-27 Akim Demaille <akim@epita.fr>
10469
10470 Fix `%nonassoc and eof'.
10471
10472 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
10473 which were not properly copied! Replace
10474 memcpy (res->errs, src->errs, src->nerrs);
10475 with
10476 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
10477 !!!
10478 * tests/regression.at (%nonassoc and eof): Adjust to newest
10479 Autotest: `.' is not in the PATH.
10480
10481 2002-01-27 Akim Demaille <akim@epita.fr>
10482
10483 * tests/sets.at (AT_EXTRACT_SETS): New.
10484 (Nullable): Use it.
10485 (Firsts): New.
10486
10487 2002-01-26 Akim Demaille <akim@epita.fr>
10488
10489 * tests/actions.at, tests/calc.at, tests/headers.at,
10490 * tests/torture.at: Adjust to the newest Autotest which no longer
10491 forces `.' in the PATH.
10492
10493 2002-01-25 Akim Demaille <akim@epita.fr>
10494
10495 * tests/regression.at (%nonassoc and eof): New.
10496 Suggested by Robert Anisko.
10497
10498 2002-01-24 Akim Demaille <akim@epita.fr>
10499
10500 Bison dumps core when trying to complain about broken input files.
10501 Reported by Cris van Pelt.
10502
10503 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
10504 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
10505 into...
10506 (Invalid inputs): Strengthen: exercise parse_percent_token.
10507
10508 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
10509
10510 * src/Makefile.am: Add bison.c++.
10511 * src/bison.c++: New skeleton.
10512
10513 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
10514
10515 * po/it.po: New.
10516
10517 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
10518
10519 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
10520
10521 2002-01-20 Marc Autret <marc@gnu.org>
10522
10523 * src/files.c (compute_output_file_names): Fix
10524
10525 2002-01-20 Marc Autret <marc@gnu.org>
10526
10527 * tests/output.at: New test.
10528 * src/files.c (compute_base_names): Don't map extensions when
10529 the YACC flag is set, use defaults.
10530 Reported by Evgeny Stambulchik.
10531
10532 2002-01-20 Marc Autret <marc@gnu.org>
10533
10534 * src/system.h: Need to define __attribute__ away for non-GCC
10535 compilers as well (i.e., the vendor C compiler).
10536 Suggested by Albert Chin-A-Young.
10537
10538 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
10539
10540 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
10541 canonical definition.
10542 * src/system.h: Use the canonical definition for PARAMS (avoids
10543 a conflict with the macro from lib/hash.h).
10544
10545 2002-01-11 Akim Demaille <akim@epita.fr>
10546
10547 * configure.in: Use AC_FUNC_STRNLEN.
10548 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
10549
10550 2002-01-09 Akim Demaille <akim@epita.fr>
10551
10552 * src/files.c, src/files.h (output_infix): New.
10553 (tab_extension): Remove.
10554 (compute_base_names): Compute the former, drop the latter.
10555 * src/output.c (prepare): Insert the muscles `output-infix', and
10556 `output-suffix'.
10557 * src/parse-skel.y (string, string.1): New.
10558 (section.header): Use it.
10559 (section.yacc): Remove.
10560 (prefix): Remove too.
10561 * src/scan-skel.l: Adjust.
10562 * src/bison.simple, src/bison.hairy: Adjust.
10563
10564 2002-01-09 Akim Demaille <akim@epita.fr>
10565
10566 * configure.in (WERROR_CFLAGS): Compute it.
10567 * src/Makefile.am (CFLAGS): Pass it.
10568 * tests/atlocal.in (CFLAGS): Idem.
10569 * src/files.c: Fix a few warnings.
10570 (get_extension_index): Remove, unused.
10571
10572 2002-01-08 Akim Demaille <akim@epita.fr>
10573
10574 * src/getargs.c (AS_FILE_NAME): New.
10575 (getargs): Use it to convert DOSish file names.
10576 * src/files.c (base_name): Rename as full_base_name to avoid
10577 clashes with `base_name ()'.
10578 (filename_split): New.
10579 (compute_base_names): N-th rewrite, using filename_split.
10580
10581 2002-01-08 Akim Demaille <akim@epita.fr>
10582
10583 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
10584 New, stolen from the Fileutils 4.1.
10585 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
10586 * configure.in: Check for the presence of memrchr, and of its
10587 prototype.
10588
10589 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
10590
10591 * lib/hash.h (__P): Added definition for this macro.
10592 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
10593 BUILT_SOURCES, to ensure they are generated first.
10594 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
10595 %error-verbose to allow bootstrapping with bison 1.30x.
10596
10597 2002-01-06 Akim Demaille <akim@epita.fr>
10598
10599 * src/reader.c (parse_braces): Don't fetch the next char, the
10600 convention is to fetch on entry.
10601 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
10602 'switch' without a following semicolon.
10603 * tests/regression.at (braces parsing): New.
10604
10605 2002-01-06 Akim Demaille <akim@epita.fr>
10606
10607 Bison is dead wrong in its RR conflict reports.
10608
10609 * tests/torture.at (GNU Cim Grammar): New.
10610 * src/conflicts.c (count_rr_conflicts): Fix.
10611
10612 2002-01-06 Akim Demaille <akim@epita.fr>
10613
10614 Creating package.m4 from configure.ac causes too many problems.
10615
10616 * tests/Makefile.am (package.m4): Create it by hand,
10617 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
10618
10619 2002-01-06 Akim Demaille <akim@epita.fr>
10620
10621 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
10622 skeleton.h.
10623
10624 2002-01-04 Paul Eggert <eggert@twinsun.com>
10625
10626 * doc/bison.texinfo (Debugging):
10627 Remove YYSTDERR; it's no longer defined or used.
10628 Also, s/cstdio.h/cstdio/.
10629
10630 2002-01-03 Akim Demaille <akim@epita.fr>
10631
10632 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
10633
10634 2002-01-03 Akim Demaille <akim@epita.fr>
10635
10636 * src/parse-skel.y (process_skeleton): Don't bind the parser's
10637 tracing code to --trace, wait for a better --trace option, with
10638 args.
10639
10640 2002-01-03 Akim Demaille <akim@epita.fr>
10641
10642 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
10643 The ISO C++ standard is extremely clear about it: stderr is
10644 considered a macro, not a regular symbol (see table 94 `Header
10645 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
10646 Therefore std:: does not apply to it. It still does with fprintf.
10647 Also, s/cstdio.h/cstdio/.
10648
10649 2002-01-03 Akim Demaille <akim@epita.fr>
10650
10651 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
10652 for non system headers.
10653
10654 2002-01-02 Akim Demaille <akim@epita.fr>
10655
10656 Equip the skeleton chain with location tracking, runtime trace,
10657 pure parser and scanner.
10658
10659 * src/parse-skel.y: Request a pure parser, locations, and prefix
10660 renaming.
10661 (%union): Having several members with the same type does not help
10662 type mismatches, simplify.
10663 (YYPRINT, yyprint): New.
10664 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
10665 (skel_error): this.
10666 Handle locations.
10667 * src/scan-skel.l: Adjust to these changes.
10668 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
10669 (LOCATION_PRINT, skel_control_t): New.
10670
10671 2001-12-30 Akim Demaille <akim@epita.fr>
10672
10673 * src/parse-skel.y: Get rid of the shift/reduce conflict:
10674 replace `gb' with BLANKS.
10675 * src/scan-skel.l: Adjust.
10676
10677 2001-12-30 Akim Demaille <akim@epita.fr>
10678
10679 * src/system.h: We don't need nor want bcopy.
10680 Throw away MS-DOS crap: we don't need getpid.
10681 * configure.in: We don't need strndup. It was even causing
10682 problems: because Flex includes the headers *before* us,
10683 _GNU_SOURCE is not defined by config.h, and therefore strndup was
10684 not visible.
10685 * lib/xstrndup.c: New.
10686 * src/scan-skel.l: Use it.
10687 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
10688 * src/parse-skel.y: Use %directives instead of #defines.
10689
10690 2001-12-30 Akim Demaille <akim@epita.fr>
10691
10692 * src/skeleton.h: New.
10693 * src/output.c (output_parser, output_master_parser): Remove, dead
10694 code.
10695 * src/output.h (get_lines_number, actions_output, guards_output)
10696 (token_definitions_output): Prototype them.
10697 * src/parse-skel.y: Add the license notice.
10698 Include output.h and skeleton.h.
10699 (process_skeleton): Returns void, and takes a single parameter.
10700 * src/scan-skel.l: Add the license notice.
10701 Include skeleton.h.
10702 Don't use %option yylineno: it seems that then Flex imagines
10703 REJECT has been used, and therefore it won't reallocate its
10704 buffers (which makes no other sense to me than a bug). It results
10705 in warnings for `unused: yy_flex_realloc'.
10706
10707 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
10708
10709 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
10710 (MUSCLE_INSERT_PREFIX): ...to there.
10711 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
10712 (MUSCLE_INSERT_PREFIX): Move from here...
10713
10714 * src/bison.hairy: Add a section directive. Put braces around muscle
10715 names. This parser skeleton is still broken, but Bison should not
10716 choke on a bad muscle 'syntax'.
10717 * src/bison.simple: Add a section directive. Put braces around muscle
10718 names.
10719
10720 * src/files.h (strsuffix, stringappend): Add declarations.
10721 (tab_extension): Add declaration.
10722 (short_base_name): Add declaration.
10723
10724 * src/files.c (strsuffix, stringappend): No longer static. These
10725 functions are used in the skeleton parser.
10726 (tab_extension): New.
10727 (compute_base_names): Use the computations done in this function
10728 to guess if the generated parsers should have '.tab' in their
10729 names.
10730 (short_base_name): No longer static.
10731
10732 * src/output.c (output_skeleton): New.
10733 (output): Disable call to output_master_parser, and give a try to
10734 a new skeleton handling system.
10735 (guards_output, actions_output): No longer static.
10736 (token_definitions_output, get_lines_number): No longer static.
10737
10738 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
10739
10740 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
10741 parse-skel.y.
10742
10743 * src/parse-skel.y: New file.
10744 * src/scan-skel.l: New file.
10745
10746 2001-12-29 Akim Demaille <akim@epita.fr>
10747
10748 %name-prefix is broken.
10749
10750 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
10751 Adjust all dependencies.
10752 * tests/headers.at (export YYLTYPE): Strengthen this test: use
10753 %name-prefix.
10754
10755 Renaming yylval but not yylloc is not consistent. Now we do.
10756
10757 * src/bison.simple: Prefix yylloc if used.
10758 * doc/bison.texinfo (Decl Summary): Document that.
10759
10760 2001-12-29 Akim Demaille <akim@epita.fr>
10761
10762 * doc/bison.texinfo: Promote `%long-directive' over
10763 `%long_directive'.
10764 Remove all references to fixed-output-files, yacc is enough.
10765
10766 2001-12-29 Akim Demaille <akim@epita.fr>
10767
10768 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
10769 user prologue. These are defaults.
10770 * tests/actions.at (Mid-rule actions): Make sure the user can
10771 define YYDEBUG and YYERROR_VERBOSE.
10772
10773 2001-12-29 Akim Demaille <akim@epita.fr>
10774
10775 * src/output.c (header_output): Don't forget to export YYLTYPE and
10776 yylloc.
10777 * tests/headers.at (export YYLTYPE): New, make sure it does.
10778 * tests/regression.at (%union and --defines, Invalid CPP headers):
10779 Move to...
10780 * tests/headers.at: here.
10781
10782 2001-12-29 Akim Demaille <akim@epita.fr>
10783
10784 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
10785
10786 2001-12-29 Akim Demaille <akim@epita.fr>
10787
10788 * tests/actions.at (Mid-rule actions): Output on a single line
10789 instead of several.
10790
10791 2001-12-29 Akim Demaille <akim@epita.fr>
10792
10793 * doc/bison.texinfo: Formatting changes.
10794
10795 2001-12-29 Akim Demaille <akim@epita.fr>
10796
10797 Don't store the token defs in a muscle, just be ready to output it
10798 on command. Now possible via `symbols'. Fixes a memory leak.
10799
10800 * src/output.c (token_definitions_output): New.
10801 (output_parser, header_output): Use it.
10802 * src/reader.c (symbols_save): Remove.
10803
10804 2001-12-29 Akim Demaille <akim@epita.fr>
10805
10806 * src/bison.simple: Do not provide a default for YYSTYPE and
10807 YYLTYPE before the user's prologue. Otherwise it's hardly... a
10808 default.
10809
10810 2001-12-29 Akim Demaille <akim@epita.fr>
10811
10812 Mid-rule actions are simply... ignored!
10813
10814 * src/reader.c (readgram): Be sure to attach mid-rule actions to
10815 the empty-rule associated to the dummy symbol, not to the host
10816 rule.
10817 * tests/actions.at (Mid-rule actions): New.
10818
10819 2001-12-29 Akim Demaille <akim@epita.fr>
10820
10821 Memory leak.
10822
10823 * src/reader.c (reader): Free grammar.
10824
10825 2001-12-29 Akim Demaille <akim@epita.fr>
10826
10827 Memory leak.
10828
10829 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
10830 since it allocates it for each state, although only one is needed.
10831 (allocate_storage): Do it here.
10832
10833 2001-12-29 Akim Demaille <akim@epita.fr>
10834
10835 * src/options.h, src/options.c (create_long_option_table): Rename
10836 as...
10837 (long_option_table_new): this, with a clearer prototype.
10838 (percent_table): Remove, unused,
10839 * src/getargs.c (getargs): Adjust.
10840
10841 2001-12-29 Akim Demaille <akim@epita.fr>
10842
10843 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
10844 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
10845 as states.
10846
10847 2001-12-29 Akim Demaille <akim@epita.fr>
10848
10849 * src/lalr.c (build_relations): Rename `states' as `states1'.
10850 Sorry, I don't understand exactly what it is, no better name...
10851
10852 2001-12-29 Akim Demaille <akim@epita.fr>
10853
10854 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
10855 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
10856 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
10857 as rules.
10858
10859 2001-12-29 Akim Demaille <akim@epita.fr>
10860
10861 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
10862 ago.
10863
10864 2001-12-29 Akim Demaille <akim@epita.fr>
10865
10866 * src/reader.c, src/reader.h (user_toknums): Remove.
10867 Adjust all users to use symbols[i]->user_token_number.
10868
10869 2001-12-29 Akim Demaille <akim@epita.fr>
10870
10871 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
10872 Adjust all users to use symbols[i]->prec or ->assoc.
10873
10874 2001-12-29 Akim Demaille <akim@epita.fr>
10875
10876 * src/reader.c, src/reader.h (tags): Remove.
10877 Adjust all users to use symbols[i]->tag.
10878
10879 2001-12-29 Akim Demaille <akim@epita.fr>
10880
10881 * src/gram.h, src/gram.c (symbols): New, similar to state_table
10882 and rule_table.
10883 * src/reader.c (packsymbols): Fill this table.
10884 Drop sprec.
10885 * src/conflicts.c (resolve_sr_conflict): Adjust.
10886 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
10887 single table.
10888 Use symbols[i]->tag instead of tags[i].
10889
10890 2001-12-29 Akim Demaille <akim@epita.fr>
10891
10892 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
10893 In addition, put a comment in there, to replace...
10894 * tests/regression.at (%union and C comments): Remove.
10895
10896 2001-12-29 Akim Demaille <akim@epita.fr>
10897
10898 * tests/regression.at (Web2c Actions): Blindly move the actual
10899 output as expected output. The contents *seem* right to me, but I
10900 can't pretend reading perfectly parser tables... Nonetheless, all
10901 the other tests pass correctly, the table look OK, even though the
10902 presence of `$axiom' is to be noted: AFAICS it is useless (but
10903 harmless).
10904
10905 2001-12-29 Akim Demaille <akim@epita.fr>
10906
10907 * src/reader.c (readgram): Don't add the rule 0 if there were no
10908 rules read. In other words, add it _after_ having performed
10909 grammar sanity checks.
10910 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
10911
10912 2001-12-29 Akim Demaille <akim@epita.fr>
10913
10914 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
10915 visible, and some states have now a different number.
10916
10917 2001-12-29 Akim Demaille <akim@epita.fr>
10918
10919 * src/reader.c (readgram): Bind the initial rule's lineno to that
10920 of the first rule.
10921 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
10922 (Solved SR Conflicts): Adjust rule 0's line number.
10923
10924 2001-12-29 Akim Demaille <akim@epita.fr>
10925
10926 Fix the `GAWK Grammar' failure.
10927
10928 * src/LR0.c (final_state): Initialize to -1 so that we do compute
10929 the reductions of the first state which was mistakenly confused
10930 with the final state because precisely final_state was initialized
10931 to 0.
10932 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
10933 now noticed by Bison.
10934 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
10935 have a reduction on $default.
10936
10937 2001-12-29 Akim Demaille <akim@epita.fr>
10938
10939 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
10940 rule line numbers.
10941 * src/closure.c (print_closure): Likewise.
10942 * src/derives.c (print_derives): Likewise.
10943 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
10944 now.
10945
10946 2001-12-29 Akim Demaille <akim@epita.fr>
10947
10948 * src/lalr.c (lookaheads_print): New.
10949 (lalr): Call it when --trace-flag.
10950 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
10951 are dumped.
10952
10953 2001-12-29 Akim Demaille <akim@epita.fr>
10954
10955 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
10956 when walking through ritem, even via rule->rhs.
10957 * src/reduce.c (dump_grammar, useful_production, reduce_output)
10958 (useful_production, useless_nonterminals): Likewise.
10959 (reduce_grammar_tables): Likewise, plus update nritems.
10960 * src/nullable.c (set_nullable): Likewise.
10961 * src/lalr.c (build_relations): Likewise.
10962 * tests/sets.at (Nullable): Adjust.
10963 Fortunately, now, the $axiom is no longer nullable.
10964
10965 2001-12-29 Akim Demaille <akim@epita.fr>
10966
10967 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
10968 the 0-sentinel.
10969 * src/gram.c (ritem_longest_rhs): Likewise.
10970 * src/reduce.c (nonterminals_reduce): Likewise.
10971 * src/print_graph.c (print_graph): Likewise.
10972 * src/output.c (output_rule_data): Likewise.
10973 * src/nullable.c (set_nullable): Likewise.
10974
10975 2001-12-29 Akim Demaille <akim@epita.fr>
10976
10977 * src/output.c: Comment changes.
10978
10979 2001-12-27 Paul Eggert <eggert@twinsun.com>
10980
10981 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
10982 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
10983 Sparc, as they were causing more porting problems than the
10984 (minor) performance improvement was worth.
10985
10986 Also, catch up with 1.31's YYSTD.
10987
10988 2001-12-27 Akim Demaille <akim@epita.fr>
10989
10990 * src/output.c (output_gram): Rely on nritems, not the
10991 0-sentinel. See below.
10992 Use -1 as separator, not 0.
10993 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
10994 Rely on -1 as separator in yyrhs, instead of 0.
10995 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
10996 twice `Now at end of input', therefore there are two lines less to
10997 expect.
10998
10999 2001-12-27 Akim Demaille <akim@epita.fr>
11000
11001 * tests/regression.at (Unresolved SR Conflicts):
11002 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
11003 below.
11004
11005 2001-12-27 Akim Demaille <akim@epita.fr>
11006
11007 * src/LR0.c (new_state): Recognize the final state by the fact it
11008 is reached by eoftoken.
11009 (insert_start_shifting_state, insert_eof_shifting_state)
11010 (insert_accepting_state, augment_automaton): Remove, since now
11011 these states are automatically computed from the initial state.
11012 (generate_states): Adjust.
11013 * src/print.c: When reporting a rule number to the user, substract
11014 1, so that the axiom rule is rule 0, and the first user rule is 1.
11015 * src/reduce.c: Likewise.
11016 * src/print_graph.c (print_core): For the time being, just as for
11017 the report, depend upon --trace-flags to dump the full set of
11018 items.
11019 * src/reader.c (readgram): Once the grammar read, insert the rule
11020 0: `$axiom: START-SYMBOL $'.
11021 * tests/set.at: Adjust: rule 0 is now displayed, and since the
11022 number of the states has changed (the final state is no longer
11023 necessarily the last), catch up.
11024
11025 2001-12-27 Akim Demaille <akim@epita.fr>
11026
11027 Try to make the use of the eoftoken valid. Given that its value
11028 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
11029 is used instead of > 0 where appropriate, (ii), depend upon nritems
11030 instead of the 0-sentinel.
11031
11032 * src/gram.h, src/gram.c (nritems): New.
11033 Expected to be duplication of nitems, but for the time being...
11034 * src/reader.c (packgram): Assert nritems and nitems are equal.
11035 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
11036 * src/closure.c (print_closure, print_fderives): Likewise.
11037 * src/gram.c (ritem_print): Likewise.
11038 * src/print.c (print_core, print_grammar): Likewise.
11039 * src/print_graph.c: Likewise.
11040
11041 2001-12-27 Akim Demaille <akim@epita.fr>
11042
11043 * src/main.c (main): If there are complains after grammar
11044 reductions, then output the report anyway if requested, then die.
11045 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
11046 * src/reader.c (eoftoken): New.
11047 (parse_token_decl): If the token being defined has value `0', it
11048 is the eoftoken.
11049 (packsymbols): No longer hack `tags' to insert `$' by hand.
11050 Be sure to preserve the value of the eoftoken.
11051 (reader): Make sure eoftoken is defined.
11052 Initialize nsyms to 0: now eoftoken is created just like the others.
11053 * src/print.c (print_grammar): Don't special case the eof token.
11054 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
11055 lie anyway, albeit pleasant.
11056 * tests/calc.at: Exercise error messages with eoftoken.
11057 Change the grammar so that empty input is invalid.
11058 Adjust expectations.
11059 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
11060
11061 2001-12-27 Akim Demaille <akim@epita.fr>
11062
11063 * configure.in: Check the protos of strchr ans strspn.
11064 Replace strchr if needed.
11065 * src/system.h: Provide the protos of strchr, strspn and memchr if
11066 missing.
11067 * lib/strchr.c: New.
11068 * src/reader.c (symbols_save): Use strchr.
11069
11070 2001-12-27 Akim Demaille <akim@epita.fr>
11071
11072 * src/print.c, src/print_graph.c (escape): New.
11073 Use it to quote the TAGS outputs.
11074 * src/print_graph.c (print_state): Now errors are in red, and
11075 reductions in green.
11076 Prefer high to wide: output the state number on a line of its own.
11077
11078 2001-12-27 Akim Demaille <akim@epita.fr>
11079
11080 * src/state.h, src/state.c (reductions_new): New.
11081 * src/LR0.c (set_state_table): Let all the states have a
11082 `reductions', even if reduced to 0.
11083 (save_reductions): Adjust.
11084 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
11085 * src/print.c (print_reductions, print_actions): Adjust.
11086 * src/output.c (action_row): Adjust.
11087
11088 2001-12-27 Akim Demaille <akim@epita.fr>
11089
11090 * src/state.h, src/state.c (errs_new, errs_dup): New.
11091 * src/LR0.c (set_state_table): Let all the states have an errs,
11092 even if reduced to 0.
11093 * src/print.c (print_errs, print_reductions): Adjust.
11094 * src/output.c (output_actions, action_row): Adjust.
11095 * src/conflicts.c (resolve_sr_conflict): Adjust.
11096
11097 2001-12-27 Akim Demaille <akim@epita.fr>
11098
11099 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
11100
11101 2001-12-27 Akim Demaille <akim@epita.fr>
11102
11103 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
11104 * src/print.c: here.
11105 (lookaheadset, shiftset): New, used as additional storage by
11106 print_reductions.
11107 (print_results): Adjust.
11108 (print_shifts, print_gotos, print_errs): New, extracted from...
11109 (print_actions): here.
11110 * src/print_graph.c (print_actions): Remove dead code.
11111
11112 2001-12-27 Akim Demaille <akim@epita.fr>
11113
11114 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
11115 `$n' and `@n'.
11116
11117 2001-12-27 Akim Demaille <akim@epita.fr>
11118
11119 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
11120 (build_relations): Adjust.
11121
11122 2001-12-27 Akim Demaille <akim@epita.fr>
11123
11124 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
11125 duplication.
11126
11127 2001-12-27 Akim Demaille <akim@epita.fr>
11128
11129 * src/reader.c (packgram): Catch nitems overflows.
11130
11131 2001-12-27 Akim Demaille <akim@epita.fr>
11132
11133 * src/files.c, src/files.h (guard_obstack): Remove.
11134 * src/output.c (output): Adjust.
11135 * src/reader.c (parse_braces): New, factoring...
11136 (copy_action, copy_guard): these two which are renamed as...
11137 (parse_action, parse_guard): these.
11138 As a voluntary consequence, using braces around guards is now
11139 mandatory.
11140
11141 2001-12-27 Akim Demaille <akim@epita.fr>
11142
11143 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
11144 * src/reader.c (symbol_list): `guard' and `guard_line' are new
11145 members.
11146 (symbol_list_new): Adjust.
11147 (copy_action): action_line is the first line, not the last.
11148 (copy_guard): Just as for actions, store the `action' only, not
11149 the switch/case/break flesh.
11150 Don't parse the user action that might follow the guard, let...
11151 (readgram): do it, i.e., now, there can be an action after a
11152 guard.
11153 In other words the guard is just explicitly optional.
11154 (packgram): Adjust.
11155 * src/output.c (guards_output): New.
11156 (output_parser): Call it when needed.
11157 (output): Also free the guard and attrs obstacks.
11158 * src/files.c, src/files.h (obstack_save): Remove.
11159 (output_files): Remove.
11160 As a result, if one needs the former `.act' file, using an
11161 appropriate skeleton which requires actions and guards is now
11162 required.
11163 * src/main.c (main): Adjust.
11164 * tests/semantic.at: New.
11165 * tests/regression.at: Use `input.y' as input file name.
11166 Avoid 8+3 problems by requiring input.c when the test needs the
11167 parser.
11168
11169 2001-12-27 Akim Demaille <akim@epita.fr>
11170
11171 * src/reader.c (symbol_list_new): Be sure to initialize all the
11172 fields.
11173
11174 2001-12-27 Akim Demaille <akim@epita.fr>
11175
11176 All the hacks using a final pseudo state are now useless.
11177
11178 * src/LR0.c (set_state_table): state_table holds exactly nstates.
11179 * src/lalr.c (nLA): New.
11180 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
11181 instead of lookaheadsp from the pseudo state (nstate + 1).
11182
11183 2001-12-27 Akim Demaille <akim@epita.fr>
11184
11185 * src/output.c (action_row, token_actions): Use a state_t instead
11186 of a integer, and nlookaheads instead of the following state's
11187 lookaheadsp.
11188
11189 2001-12-27 Akim Demaille <akim@epita.fr>
11190
11191 * src/conflicts.c (log_resolution, flush_shift)
11192 (resolve_sr_conflict, set_conflicts, solve_conflicts)
11193 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
11194 (conflicts_print, print_reductions): Use a state_t instead of an
11195 integer when referring to a state.
11196 As much as possible, depend upon nlookaheads, instead of the
11197 `lookaheadsp' member of the following state (since lookaheads of
11198 successive states are successive, the difference between state n + 1
11199 and n served as the number of lookaheads for state n).
11200 * src/lalr.c (add_lookback_edge): Likewise.
11201 * src/print.c (print_core, print_actions, print_state)
11202 (print_results): Likewise.
11203 * src/print_graph.c (print_core, print_actions, print_state)
11204 (print_graph): Likewise.
11205 * src/conflicts.h: Adjust.
11206
11207 2001-12-27 Akim Demaille <akim@epita.fr>
11208
11209 * src/bison.hairy: Formatting/comment changes.
11210 ANSIfy.
11211 Remove `register' indications.
11212 Add plenty of `static'.
11213
11214 2001-12-27 Akim Demaille <akim@epita.fr>
11215
11216 * src/output.c (prepare): Drop the muscle `ntbase' which
11217 duplicates ntokens.
11218 * src/bison.simple: Formatting/comment changes.
11219 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
11220 is an undocumented synonym.
11221
11222 2001-12-22 Akim Demaille <akim@epita.fr>
11223
11224 * src/output.c (output_table_data): Change the prototype to use
11225 `int' for array ranges: some invocations do pass an int, not a
11226 short.
11227 Reported by Wayne Green.
11228
11229 2001-12-22 Akim Demaille <akim@epita.fr>
11230
11231 Some actions of web2c.y are improperly triggered.
11232 Reported by Mike Castle.
11233
11234 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
11235 * tests/regression.at (Web2c): Rename as...
11236 (Web2c Report): this.
11237 (Web2c Actions): New.
11238
11239 2001-12-22 Akim Demaille <akim@epita.fr>
11240
11241 Reductions in web2c.y are improperly reported.
11242 Reported by Mike Castle.
11243
11244 * src/conflicts.c (print_reductions): Fix.
11245 * tests/regression.at (Web2c): New.
11246
11247 2001-12-18 Akim Demaille <akim@epita.fr>
11248
11249 Some host fail on `assert (!"foo")', which expands to
11250 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
11251 Reported by Nelson Beebee.
11252
11253 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
11254 `#define it_succeeded 0' and `assert (it_succeeded)'.
11255
11256 2001-12-17 Marc Autret <autret_m@epita.fr>
11257
11258 * src/bison.simple: Don't hard code the skeleton line and filename.
11259 * src/output.c (output_parser): Rename 'line' as 'output_line'.
11260 New line counter 'skeleton_line' (skeleton-line muscle).
11261
11262 2001-12-17 Paul Eggert <eggert@twinsun.com>
11263
11264 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
11265 YYDEBUG must be defined to a nonzero value.
11266
11267 * src/bison.simple (yytname): Do not assume that the user defines
11268 YYDEBUG to a properly parenthesized expression.
11269
11270 2001-12-17 Akim Demaille <akim@epita.fr>
11271
11272 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
11273 nlookaheads is a new member.
11274 Adjust all users.
11275 * src/lalr.h (nlookaheads): Remove this orphan declaration.
11276 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
11277 state.
11278
11279 2001-12-17 Akim Demaille <akim@epita.fr>
11280
11281 * src/files.h, src/files.c (open_files, close_files): Remove.
11282 * src/main.c (main): Don't open/close files, nor invoke lex_free,
11283 let...
11284 * src/reader.c (reader): Do it.
11285
11286 2001-12-17 Akim Demaille <akim@epita.fr>
11287
11288 * src/conflicts.c (print_reductions): Formatting changes.
11289
11290 2001-12-17 Akim Demaille <akim@epita.fr>
11291
11292 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
11293 (flush_reduce): New.
11294 (resolve_sr_conflict): Adjust.
11295
11296 2001-12-17 Akim Demaille <akim@epita.fr>
11297
11298 * src/output.c (output_obstack): Be static and rename as...
11299 (format_obstack): this, to avoid any confusion with files.c's
11300 output_obstack.
11301 * src/reader.h (muscle_obstack): Move to...
11302 * src/output.h: here, since it's defined in output.c.
11303
11304 2001-12-17 Akim Demaille <akim@epita.fr>
11305
11306 * src/output.c (action_row, save_column, default_goto)
11307 (sort_actions, matching_state, pack_vector): Better variable
11308 locality.
11309
11310 2001-12-17 Akim Demaille <akim@epita.fr>
11311
11312 * src/output.c: Various formatting changes.
11313
11314 2001-12-17 Akim Demaille <akim@epita.fr>
11315
11316 * src/files.c (output_files): Free the output_obstack.
11317 * src/main.c (main): Call print and print_graph conditionally.
11318 * src/print.c (print): Work unconditionally.
11319 * src/print_graph.c (print_graph): Work unconditionally.
11320 * src/conflicts.c (log_resolution): Output only if verbose_flag.
11321
11322 2001-12-16 Marc Autret <autret_m@epita.fr>
11323
11324 * src/output.c (actions_output): Fix. When we use %no-lines,
11325 there is one less line per action.
11326
11327 2001-12-16 Marc Autret <autret_m@epita.fr>
11328
11329 * src/bison.simple: Remove a useless #line directive.
11330 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
11331 * src/output.c (get_lines_number): New.
11332 (output_parser): Adjust, now takes care about the lines of a
11333 output muscles.
11334 Fix line numbering.
11335 (actions_output): Computes the number of lines taken by actions.
11336 (output_master_parser): Insert new skeleton which is the name of
11337 the output parser file name.
11338
11339 2001-12-15 Marc Autret <autret_m@epita.fr>
11340
11341 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
11342
11343 2001-12-15 Marc Autret <autret_m@epita.fr>
11344
11345 * src/output.c (output_gram): Keep track of the hairy one.
11346
11347 2001-12-15 Akim Demaille <akim@epita.fr>
11348
11349 Make `make distcheck' work.
11350
11351 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
11352 system.h which uses libgettext.h.
11353
11354 2001-12-15 Akim Demaille <akim@epita.fr>
11355
11356 * src/nullable.c (set_nullable): Useless rules must be skipped,
11357 otherwise, since we range over their symbols, we might look at a
11358 nonterminal which no longer ``exists'', i.e., it is not counted in
11359 `nvars', hence we overflow our arrays.
11360
11361 2001-12-15 Akim Demaille <akim@epita.fr>
11362
11363 The header can also be produced directly, without any obstack!
11364 Yahoo!
11365
11366 * src/files.c, src/files.h (defines_obstack): Remove.
11367 (compute_header_macro): Global.
11368 (defines_obstack_save): Remove.
11369 * src/reader.c (parse_union_decl): No longer output to
11370 defines_obstack: its content can be found in the `stype' muscle
11371 anyway.
11372 (output_token_translations): Merge into...
11373 (symbols_output): this.
11374 Rename as...
11375 (symbols_save): this.
11376 (reader): Adjust.
11377 * src/output.c (header_output): New.
11378 (output): Call it.
11379
11380 2001-12-15 Akim Demaille <akim@epita.fr>
11381
11382 * src/reader.c (parse_union_decl): Instead of handling two obstack
11383 simultaneously, use one to define the `stype' muscle, and use the
11384 value of the latter to fill defines_obstack.
11385 (copy_comment): Remove.
11386 (copy_comment2): Work for a single obstack.
11387 Rename as...
11388 (copy_comment): this.
11389
11390 2001-12-15 Akim Demaille <akim@epita.fr>
11391
11392 * src/lex.c, src/lex.h (xgetc): No longer static.
11393 * src/reader.c (parse_union_decl): Revamp.
11394
11395 2001-12-15 Akim Demaille <akim@epita.fr>
11396
11397 Still making progress in separating Bison into (i) input, (ii)
11398 process, (iii) output: now we can directly output the parser file
11399 without using table_obstack at all.
11400
11401 * src/files.c, src/files.h (table_obstack): Bye bye.
11402 (parser_file_name): New.
11403 * src/files.c (compute_output_file_names): Compute it.
11404 * src/output.c (actions_output, output_parser)
11405 (output_master_parser): To a file instead of an obstack.
11406
11407 2001-12-15 Akim Demaille <akim@epita.fr>
11408
11409 Attach actions to rules, instead of pre-outputting them to
11410 actions_obstack.
11411
11412 * src/gram.h (rule_t): action and action_line are new members.
11413 * src/reader.c (symbol_list): Likewise.
11414 (copy_action): Save the actions within the rule.
11415 (packgram): Save them in rule_table.
11416 * src/output.c (actions_output): New.
11417 (output_parser): Use it on `%%actions'.
11418 (output_rule_data): Don't free rule_table.
11419 (output): Do it.
11420 (prepare): Don't save the `action' muscle.
11421 * src/bison.simple: s/%%action/%%actions/.
11422
11423 2001-12-15 Akim Demaille <akim@epita.fr>
11424
11425 * src/reader.c (copy_action): When --yacc, don't append a `;'
11426 to the user action: let it fail if lacking.
11427 Suggested by Arnold Robbins and Tom Tromey.
11428
11429 2001-12-14 Akim Demaille <akim@epita.fr>
11430
11431 * src/lex.c (literalchar): Simply return the char you decoded, non
11432 longer mess around with obstacks and int pointers.
11433 Adjust all callers.
11434
11435 2001-12-14 Akim Demaille <akim@epita.fr>
11436
11437 * src/lex.c (literalchar): Don't escape the special characters,
11438 just decode them, and keep them as char (before, eol was output as
11439 the 2 char string `\n' etc.).
11440 * src/output.c (output_rule_data): Use quotearg to output the
11441 token strings.
11442
11443 2001-12-13 Paul Eggert <eggert@twinsun.com>
11444
11445 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
11446 Do not infringe on the global user namespace when using C++.
11447 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
11448 All uses of `fprintf' and `stderr' changed.
11449
11450 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
11451
11452 2001-12-13 Akim Demaille <akim@epita.fr>
11453
11454 The computation of nullable is broken: it doesn't handle empty
11455 RHS's properly.
11456
11457 * tests/torture.at (GNU AWK Grammar): New.
11458 * tests/sets.at (Nullable): New.
11459 * src/nullable.c (set_nullable): Instead of blindly looping over
11460 `ritems', loop over the rules, and then over their rhs's.
11461
11462 Work around Autotest bugs.
11463
11464 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
11465 frame, because Autotest understand lines starting with a `+' as
11466 traces from the shell. Then, they are not processed properly.
11467 Admittedly an Autotest bug, but we don't have time to wait for
11468 Autotest to catch up.
11469 * tests/regression.at (Broken Closure): Adjust to the new table
11470 frames.
11471 Move to...
11472 * tests/sets.at: here.
11473
11474 2001-12-13 Akim Demaille <akim@epita.fr>
11475
11476 * src/closure.c (closure): Use nrules instead of playing tricks
11477 with BITS_PER_WORD.
11478
11479 2001-12-13 Akim Demaille <akim@epita.fr>
11480
11481 * src/print.c (print_actions): Output the handling of `$' as the
11482 traces do: shifting the token EOF. Before EOF was treated as a
11483 nonterminal.
11484 * tests/regression.at: Adjust some tests.
11485 * src/print_graph.c (print_core): Complete the set of items via
11486 closure. The next-to-final and final states are still unsatisfying,
11487 but that's to be addressed elsewhere.
11488 No longer output the rule numbers, but do output the state number.
11489 A single loop for the shifts + gotos is enough, but picked a
11490 distinct color for each.
11491 (print_graph): Initialize and finalize closure.
11492
11493 2001-12-13 Akim Demaille <akim@epita.fr>
11494
11495 * src/reader.c (readgram): Remove dead code, an strip useless
11496 braces.
11497 (get_type): Remove, unused.
11498
11499 2001-12-12 Akim Demaille <akim@epita.fr>
11500
11501 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
11502 on that of lib/error.c.
11503
11504 2001-12-12 Akim Demaille <akim@epita.fr>
11505
11506 Some hosts don't like `/' in includes.
11507
11508 * src/system.h: Include libgettext.h without qualifying the path.
11509 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
11510 $(top_srcdir).
11511
11512 2001-12-11 Marc Autret <autret_m@epita.fr>
11513
11514 * src/output.c (output_parser): Remove useless muscle.
11515
11516 2001-12-11 Marc Autret <autret_m@epita.fr>
11517
11518 * src/bison.simple: Remove #line just before %%epilogue. It
11519 is now handled in ...
11520 * src/reader.c (read_additionnal_code): Add the output of a
11521 #line for the epilogue.
11522
11523 2001-12-10 Marc Autret <autret_m@epita.fr>
11524
11525 * src/reader.c (copy_definition): Re-use CPP-outed code which
11526 replace precedent remove.
11527 * src/bison.simple: Remove #line before %%prologue because
11528 %%input-line is wrong at this time.
11529
11530 2001-12-10 Marc Autret <autret_m@epita.fr>
11531
11532 * src/reader.c (symbols_output): Clean up.
11533 * src/output.c (output_gram, output): Clean up.
11534
11535 2001-12-10 Akim Demaille <akim@epita.fr>
11536
11537 * src/lalr.c (initialize_lookaheads): New. Extracted from...
11538 * src/LR0.c (set_state_table): here.
11539 * src/lalr.c (lalr): Call it.
11540
11541 2001-12-10 Akim Demaille <akim@epita.fr>
11542
11543 * src/state.h (shifts): Remove the `number' member: shifts are
11544 attached to state, hence no longer need to be labelled with a
11545 state number.
11546
11547 2001-12-10 Akim Demaille <akim@epita.fr>
11548
11549 Now that states have a complete set of members, the linked list of
11550 shifts is useless: just fill directly the state's shifts member.
11551
11552 * src/state.h (shifts): Remove the `next' member.
11553 * src/LR0.c (first_state, last_state): Remove.
11554 Adjust the callers.
11555 (augment_automaton): Don't look for the shifts that must be added
11556 a shift on EOF: it is those of the state we looked for! But now,
11557 since shifts are attached, it is no longer needed to looking
11558 merely by its id: its number.
11559
11560 2001-12-10 Akim Demaille <akim@epita.fr>
11561
11562 * src/LR0.c (augment_automaton): Better variable locality.
11563 Remove an impossible branch: if there is a state corresponding to
11564 the start symbol being shifted, then there is shift for the start
11565 symbol from the initial state.
11566
11567 2001-12-10 Akim Demaille <akim@epita.fr>
11568
11569 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
11570 only when appropriate: when insert_start_shifting_state' is not
11571 invoked.
11572 * tests/regression.at (Rule Line Numbers): Adjust.
11573
11574 2001-12-10 Akim Demaille <akim@epita.fr>
11575
11576 * src/LR0.c (augment_automaton): Now that all states have shifts,
11577 merge the two cases addition shifts to the initial state.
11578
11579 2001-12-10 Akim Demaille <akim@epita.fr>
11580
11581 * src/lalr.c (set_state_table): Move to...
11582 * src/LR0.c: here.
11583 * src/lalr.c (lalr): Don't call it...
11584 * src/LR0.c (generate_states): do it.
11585 * src/LR0.h (first_state): Remove, only the table is used.
11586
11587 2001-12-10 Akim Demaille <akim@epita.fr>
11588
11589 * src/LR0.h (first_shift, first_reduction): Remove.
11590 * src/lalr.c: Don't use first_shift: find shifts through the
11591 states.
11592
11593 2001-12-10 Akim Demaille <akim@epita.fr>
11594
11595 * src/LR0.c: Attach shifts to states as soon as they are
11596 computed.
11597 * src/lalr.c (set_state_table): Instead of assigning shifts to
11598 state, just assert that the mapping was properly done.
11599
11600 2001-12-10 Akim Demaille <akim@epita.fr>
11601
11602 * src/LR0.c (insert_start_shift): Rename as...
11603 (insert_start_shifting_state): this.
11604 (insert_eof_shifting_state, insert_accepting_state): New.
11605 (augment_automaton): Adjust.
11606 Better locality of the variables.
11607 When looking if the start_symbol is shifted from the initial
11608 state, using `while (... symbol != start_symbol ...)' sounds
11609 better than `while (... symbol < start_symbol ...)': If fail
11610 to see how the order between symbols could be relevant!
11611
11612 2001-12-10 Akim Demaille <akim@epita.fr>
11613
11614 * src/getargs.h: Don't declare `spec_name_prefix' and
11615 `spec_file_prefix', declared by src/files.h.
11616 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
11617 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
11618 * src/output.c (prepare): Adjust.
11619 * src/reader.c (symbols_output): Likewise.
11620 * src/vmsgetargs.c: Vaguely adjust, but who cares?
11621
11622 2001-12-10 Akim Demaille <akim@epita.fr>
11623
11624 * src/muscle_tab.c (muscle_init): NULL is a better default than
11625 `"0"'.
11626
11627 2001-12-10 Akim Demaille <akim@epita.fr>
11628
11629 * src/reader.c (reader): Calling symbols_output once is enough.
11630
11631 2001-12-10 Akim Demaille <akim@epita.fr>
11632
11633 Now that states have a complete set of members, the linked list of
11634 reductions is useless: just fill directly the state's reductions
11635 member.
11636
11637 * src/state.h (struct reductions): Remove member `number' and
11638 `next'.
11639 * src/LR0.c (first_reduction, last_reduction): Remove.
11640 (save_reductions): Don't link the new reductions, store them in
11641 this_state.
11642 * src/lalr.c (set_state_table): No need to attach reductions to
11643 states, it's already done.
11644 * src/output.c (output_actions): No longer free the shifts, then
11645 the reductions, then the states: free all the states and their
11646 members.
11647
11648 2001-12-10 Akim Demaille <akim@epita.fr>
11649
11650 * src/options.c (OPTN, DRTV, BOTH): New.
11651 (option_table): Use them.
11652
11653 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
11654 the job of system.h.
11655 * src/options.c: Don't include stdio.h and xalloc.h for the same
11656 reasons.
11657
11658 2001-12-10 Akim Demaille <akim@epita.fr>
11659
11660 * src/output.c (output, prepare): Make sure the values of the
11661 muscles `action' and `prologue' are 0-terminated.
11662
11663 2001-12-10 Akim Demaille <akim@epita.fr>
11664
11665 Clean up GCC warnings.
11666
11667 * src/reader.c (copy_action): `buf' is not used.
11668 (parse_skel_decl): Be static.
11669 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
11670 * src/options.h (create_long_option_table): Have a real prototype.
11671 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
11672 (hash_delete_at): Return const void *.
11673 Adjust casts to preserve the const.
11674
11675 2001-12-10 Akim Demaille <akim@epita.fr>
11676
11677 * configure.in: Require 2.52g.
11678 M4 is not needed, but AUTOM4TE is.
11679 * m4/m4.m4: Remove.
11680 * tests/Makefile.am: Adjust.
11681
11682 2001-12-10 Akim Demaille <akim@epita.fr>
11683
11684 One structure for states is enough, even though theoretically
11685 there are LR(0) states and LALR(1) states.
11686
11687 * src/lalr.h (state_t): Remove.
11688 (state_table): Be state_t **, not state_t *.
11689 * src/state.h (core, CORE_ALLOC): Rename as...
11690 (state_t, STATE_ALLOC): this.
11691 Add the LALR(1) members: shifts, reductions, errs.
11692 * src/LR0.c (state_table): Rename as...
11693 (state_hash): this, to avoid name clashes with the global
11694 `state_table'.
11695 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
11696 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
11697
11698 2001-12-10 Akim Demaille <akim@epita.fr>
11699
11700 Bison dumps core on bash.y.
11701 Reported by Pascal Bart.
11702
11703 * src/warshall.c (bitmatrix_print): New.
11704 (TC): Use it.
11705 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
11706 j must be the outer loop.
11707 * tests/regression.at (Broken Closure): New.
11708
11709 2001-12-05 Akim Demaille <akim@epita.fr>
11710
11711 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
11712 its argument.
11713 Reported by Peter Hamorsky.
11714
11715 2001-12-05 Akim Demaille <akim@epita.fr>
11716
11717 * src/conflicts.c (err_table): Remove.
11718 (resolve_sr_conflict): Adjust.
11719 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
11720 Rename as...
11721 (state_t.reductions, state_t.shifts): this.
11722
11723 2001-12-05 Akim Demaille <akim@epita.fr>
11724
11725 * src/reduce.c (reduce_grammar_tables): No longer disable the
11726 removal of useless rules via CPP but via `if (0)', so that the
11727 compiler still check the code is valid.
11728 For instance, it should have noticed `rline' no longer exists: use
11729 the `line' member of rule_t.
11730 * src/gram.c (dummy, rline): Remove, unused.
11731
11732 2001-12-05 Akim Demaille <akim@epita.fr>
11733
11734 * src/output.c (pack_vector): Use assert, not berror.
11735 * src/main.c (berror): Remove, unused.
11736
11737 2001-12-05 Akim Demaille <akim@epita.fr>
11738
11739 New experimental feature: if --verbose --trace output all the
11740 items of a state, not only its kernel.
11741
11742 * src/print.c (print_core): If `trace_flag', then invoke closure
11743 before outputting the items of the state (print_core is no longer
11744 a correct name them).
11745 (print_results): Invoke new_closure/free_closure if needed.
11746
11747 2001-12-05 Akim Demaille <akim@epita.fr>
11748
11749 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
11750 * src/closure.c, src/closure.h (itemsetsize): Rename as...
11751 (nitemset): for consistency with the rest of the project.
11752
11753 2001-12-05 Akim Demaille <akim@epita.fr>
11754
11755 * src/closure.c (print_closure): Improve.
11756 (closure): Use it for printing input and output.
11757
11758 2001-12-05 Akim Demaille <akim@epita.fr>
11759
11760 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
11761 indexed by nonterminals.
11762
11763 2001-12-05 Akim Demaille <akim@epita.fr>
11764
11765 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
11766 what it was!).
11767 * src/warshall.h: Remove accidental duplication of the content.
11768
11769 2001-12-05 Akim Demaille <akim@epita.fr>
11770
11771 * src/closure.c (set_fderives): De-obfuscate.
11772
11773 2001-12-05 Akim Demaille <akim@epita.fr>
11774
11775 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
11776
11777 2001-12-05 Akim Demaille <akim@epita.fr>
11778
11779 * src/closure.c (set_firsts): De-obfuscate.
11780
11781 2001-12-05 Akim Demaille <akim@epita.fr>
11782
11783 * src/output.c (action_row): De-obfuscate
11784 using the good o' techniques: arrays not pointers, variable
11785 locality, BITISSET, RESETBIT etc.
11786
11787 2001-12-05 Akim Demaille <akim@epita.fr>
11788
11789 Pessimize the code to simplify it: from now on, all the states
11790 have a valid SHIFTS, which NSHIFTS is possibly 0.
11791
11792 * src/LR0.c (shifts_new): Be global and move to..
11793 * src/state.c, src/state.h: here.
11794 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
11795 * src/print_graph: Adjust.
11796
11797 2001-12-05 Akim Demaille <akim@epita.fr>
11798
11799 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
11800 * src/conflicts.c: Use it.
11801 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
11802 incorrectly ``simplified''.
11803
11804 2001-12-05 Akim Demaille <akim@epita.fr>
11805
11806 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
11807 using the good o' techniques: arrays not pointers, variable
11808 locality, BITISSET, RESETBIT etc.
11809
11810 2001-12-05 Akim Demaille <akim@epita.fr>
11811
11812 * src/state.h (SHIFT_SYMBOL): New.
11813 * src/conflicts.c: Use it to deobfuscate.
11814
11815 2001-12-05 Akim Demaille <akim@epita.fr>
11816
11817 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
11818 (print_reductions): De-obfuscate using the good o' techniques:
11819 arrays not pointers, variable locality, BITISSET.
11820
11821 2001-12-05 Akim Demaille <akim@epita.fr>
11822
11823 * src/conflicts.c (print_reductions): Arrays, not pointers.
11824 Use BITISSET.
11825
11826 2001-12-05 Akim Demaille <akim@epita.fr>
11827
11828 * src/conflicts.c (print_reductions): Pessimize, but clarify.
11829
11830 2001-12-05 Akim Demaille <akim@epita.fr>
11831
11832 * src/conflicts.c (print_reductions): Improve variable locality.
11833
11834 2001-12-05 Akim Demaille <akim@epita.fr>
11835
11836 * src/conflicts.c (print_reductions): Pessimize, but clarify.
11837
11838 2001-12-05 Akim Demaille <akim@epita.fr>
11839
11840 * src/conflicts.c (print_reductions): Improve variable locality.
11841
11842 2001-12-05 Akim Demaille <akim@epita.fr>
11843
11844 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
11845 * src/lalr.c: Use them.
11846
11847 2001-12-05 Akim Demaille <akim@epita.fr>
11848
11849 * src/LR0.c (augment_automaton): Formatting changes.
11850 Better variable locality.
11851
11852 2001-12-05 Akim Demaille <akim@epita.fr>
11853
11854 * src/lalr.c (matrix_print): New.
11855 (transpose): Use it.
11856 Use arrays instead of pointers.
11857
11858 2001-12-05 Akim Demaille <akim@epita.fr>
11859
11860 * src/lalr.c (maxrhs): Move to...
11861 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
11862 * src/lalr.c (build_relations): Adjust.
11863
11864 2001-12-05 Akim Demaille <akim@epita.fr>
11865
11866 * src/lalr.c (transpose): Free the memory allocated to the
11867 argument, as it is replaced by the results by the unique caller.
11868 (build_relations): Merely invoke transpose: it handles the memory
11869 deallocation.
11870 Improve variable locality.
11871 Avoid variables used as mere abbreviations.
11872 (compute_lookaheads): Use arrays instead of pointers.
11873
11874 2001-12-05 Akim Demaille <akim@epita.fr>
11875
11876 * src/lalr.c (initialize_F): Improve variable locality.
11877 Avoid variables used as mere abbreviations.
11878
11879 2001-12-05 Akim Demaille <akim@epita.fr>
11880
11881 * src/derives.c (print_derives): Display the ruleno.
11882 * src/lalr.c (initialize_F, transpose): Better variable locality
11883 to improve readability.
11884 Avoid variables used as mere abbreviations.
11885
11886 2001-12-05 Akim Demaille <akim@epita.fr>
11887
11888 * src/lalr.c (traverse): Use arrays instead of pointers.
11889
11890 2001-12-05 Akim Demaille <akim@epita.fr>
11891
11892 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
11893 the handling of squeue.
11894 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
11895
11896 2001-12-05 Akim Demaille <akim@epita.fr>
11897
11898 Because useless nonterminals are now kept alive (instead of being
11899 `destroyed'), we now sometimes examine them, and store information
11900 related to them. Hence we need to know their number, and adjust
11901 memory allocations.
11902
11903 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
11904 static.
11905 * src/LR0.c (allocate_itemsets): The memory allocated to
11906 `symbol_count' was used for two different purpose: once to count
11907 the number of occurrences of each symbol, and later reassigned to
11908 `shift_symbol', containing the symbol that can be shifted from a
11909 given state.
11910 Deobfuscate, i.e., allocate, use and free `symbol_count' here
11911 only, and...
11912 (new_itemsets): Allocate `shift_symbol' here.
11913 (allocate_itemsets): symbol_count includes useless nonterminals.
11914 Make room for them.
11915 (free_storage): Use `free', not `XFREE', for pointers that cannot
11916 be null.
11917
11918 2001-12-05 Akim Demaille <akim@epita.fr>
11919
11920 * src/nullable.c (set_nullable): Deobfuscate the handling of
11921 ritem.
11922 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
11923
11924 2001-12-05 Akim Demaille <akim@epita.fr>
11925
11926 * src/gram.c, src/gram.h (ritem_print): New.
11927 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
11928 (This useless function was defined only to work around VMS linkers
11929 that can't handle compilation units with variables only).
11930 * src/reduce.c (dump_grammar): Use it to trace the construction of
11931 ritem.
11932
11933 2001-12-04 Paul Eggert <eggert@twinsun.com>
11934
11935 * src/bison.simple (union yyalloc): Change member names
11936 to be the same as the stack names.
11937 (yyparse): yyptr is now union yyalloc *, not char *.
11938 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
11939 and may generate better code on some machines.
11940 (yystpcpy): Use prototype if __STDC__ is defined, not just
11941 if __cplusplus is defined.
11942
11943 2001-11-30 Akim Demaille <akim@epita.fr>
11944
11945 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
11946 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
11947 Gettext doesn't compile cleanly, and dies with -Werror.
11948 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
11949 Include WARNING_CFLAGS here.
11950 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
11951 before being defined.
11952
11953 2001-11-27 Paul Eggert <eggert@twinsun.com>
11954
11955 * lib/quotearg.h (quotearg_n, quotearg_n_style):
11956 First arg is int, not unsigned.
11957 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
11958 (SIZE_MAX, UINT_MAX): New macros.
11959 (quotearg_n_options): Abort if N is negative.
11960 Avoid overflow check on hosts where size_t is 64 bits and int
11961 is 32 bits, as overflow is impossible there.
11962 Fix off-by-one typo that caused unnecessary reallocation.
11963
11964 2001-11-29 Paul Eggert <eggert@twinsun.com>
11965
11966 Name space cleanup in generated parser.
11967
11968 * doc/bison.texinfo (Bison Parser): Discuss system headers
11969 and their effect on the user name space.
11970
11971 * src/bison.simple:
11972 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
11973 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
11974 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
11975
11976 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
11977 on user names when possible.
11978
11979 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
11980 Simplify test for whather <alloca.h> exists.
11981
11982 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
11983
11984 (<stdio.h>): Include if YYDEBUG.
11985
11986 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
11987 ! defined (yyoverflow) && ! defined (yymemcpy).
11988
11989 (yymemcpy, yyparse): Rename local variables as needed so that
11990 they all begin with 'yy'.
11991
11992 (yystrlen, yystpcpy): New functions.
11993
11994 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
11995 All uses changed.
11996
11997 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
11998 instead of relying on string.h functions. Use YYSTACK_ALLOC
11999 and YYSTACK_FREE instead of malloc and free.
12000
12001 2001-11-30 Akim Demaille <akim@epita.fr>
12002
12003 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
12004 before their first uses.
12005 (YYBISON, YYPURE): Move to the top of the output.
12006
12007 2001-11-30 Akim Demaille <akim@epita.fr>
12008
12009 * tests/reduce.at (Useless Nonterminals): Fix.
12010
12011 2001-11-30 Akim Demaille <akim@epita.fr>
12012
12013 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
12014 if body instead of `;' to pacify GCC's warnings.
12015
12016 2001-11-30 Akim Demaille <akim@epita.fr>
12017
12018 Instead of mapping the LHS of unused rules to -1, keep the LHS
12019 valid, but flag the rules as invalid.
12020
12021 * src/gram.h (rule_t): `useful' is a new member.
12022 * src/print.c (print_grammar): Adjust.
12023 * src/derives.c (set_derives): Likewise.
12024 * src/reader.c (packgram, reduce_output): Likewise.
12025 * src/reduce.c (reduce_grammar_tables): Likewise.
12026 * tests/reduce.at (Underivable Rules, Useless Rules): New.
12027
12028 2001-11-30 Akim Demaille <akim@epita.fr>
12029
12030 * src/reduce.c (reduce_output): Formatting changes.
12031 * src/print.c (print_results, print_grammar): Likewise.
12032 * tests/regression.at (Rule Line Numbers)
12033 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
12034
12035 2001-11-30 Akim Demaille <akim@epita.fr>
12036
12037 * src/reduce.c (nonterminals_reduce): Instead of throwing away
12038 useless nonterminals, move them at the end of the symbol arrays.
12039 (reduce_output): Adjust.
12040 * tests/reduce.at (Useless Nonterminals): Adjust.
12041
12042 2001-11-30 Akim Demaille <akim@epita.fr>
12043
12044 * src/reduce.c: Various comment/formatting changes.
12045 (nonterminals_reduce): New, extracted from...
12046 (reduce_grammar_tables): here.
12047 (reduce_grammar): Call nonterminals_reduce.
12048
12049 2001-11-29 Paul Eggert <eggert@twinsun.com>
12050
12051 * src/bison.simple (YYSTACK_REALLOC): Remove.
12052 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
12053 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
12054 New macros.
12055 (union yyalloc): New type.
12056 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
12057 an arbitrary restriction on hosts where size_t is wider than int.
12058
12059 (yyparse): Don't dump core if alloca or malloc fails; instead, report
12060 a parser stack overflow. Allocate just one block of memory for all
12061 three stacks, instead of allocating three blocks; this typically is
12062 faster and reduces fragmentation.
12063
12064 Do not limit the number of items in the stack to a value that fits
12065 in 'int', as this is an arbitrary limit on hosts with 64-bit
12066 size_t and 32-bit int.
12067
12068 2001-11-29 Marc Autret <autret_m@epita.fr>
12069
12070 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
12071 of defining YYERROR_VERBOSE.
12072 [AT_DATA]: $4 is now out of C declarations in the prologue.
12073
12074 2001-11-28 Marc Autret <autret_m@epita.fr>
12075
12076 * src/reader.c (parse_dquoted_param): New.
12077 (parse_skel_decl): Use it.
12078 * src/lex.h: Add its prototype.
12079 * src/lex.c (literalchar): Become not static.
12080
12081 2001-11-28 Marc Autret <autret_m@epita.fr>
12082
12083 * src/output.h: And put its extern declaration here.
12084 * src/output.c (error_verbose): Define here.
12085 (prepare): Echo name modification.
12086 * src/getargs.h: Clean its extern declaration.
12087 * src/getargs.c (error_verbose_flag): Remove.
12088 (getargs): Remove case 'e'.
12089 * src/options.c (option_table): 'error-verbose' is now seen as simple
12090 percent option.
12091 Include output.h.
12092
12093 * src/reader.c (read_declarations): Remove case tok_include.
12094 (parse_include_decl): Remove.
12095 * src/lex.h (token_t): Remove tok_include.
12096 * src/options.c (option_table): 'include' is now a simple command line
12097 option.
12098
12099 2001-11-28 Marc Autret <autret_m@epita.fr>
12100
12101 * src/bison.simple: Adjust muscle names.
12102 * src/muscle_tab.c (muscle_init): Also rename the muscles.
12103 * src/output.c (prepare): s/_/-/ for the muscles names.
12104 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
12105
12106 2001-11-28 Marc Autret <autret_m@epita.fr>
12107
12108 * src/bison.simple: Fix debug.
12109 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
12110
12111 2001-11-28 Akim Demaille <akim@epita.fr>
12112
12113 * src/LR0.c (shifts_new): New.
12114 (save_shifts, insert_start_shift, augment_automaton): Use it.
12115
12116 2001-11-28 Akim Demaille <akim@epita.fr>
12117
12118 * src/closure.c (closure): `b' and `ruleno' denote the same value:
12119 keep ruleno only.
12120
12121 2001-11-28 Akim Demaille <akim@epita.fr>
12122
12123 * src/closure.c (closure): Instead of looping over word in array
12124 then bits in words, loop over bits in array.
12125
12126 2001-11-28 Akim Demaille <akim@epita.fr>
12127
12128 * src/closure.c (closure): No longer optimize the special case
12129 where all the bits of `ruleset[r]' are set to 0, to make the code
12130 clearer.
12131
12132 2001-11-28 Akim Demaille <akim@epita.fr>
12133
12134 * src/closure.c (closure): `r' and `c' are new variables, used to
12135 de-obfuscate accesses to RULESET and CORE.
12136
12137 2001-11-28 Akim Demaille <akim@epita.fr>
12138
12139 * src/reduce.c (reduce_print): Use ngettext.
12140 (dump_grammar): Improve the trace accuracy.
12141
12142 2001-11-28 Akim Demaille <akim@epita.fr>
12143
12144 * src/reduce.c (dump_grammar): Don't translate trace messages.
12145
12146 2001-11-28 Akim Demaille <akim@epita.fr>
12147
12148 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
12149 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
12150 as all tags are free'ed afterwards.
12151 From Enrico Scholz.
12152
12153 2001-11-27 Paul Eggert <eggert@twinsun.com>
12154
12155 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
12156 use alloca when we didn't want to, and vice versa.
12157
12158 2001-11-27 Marc Autret <autret_m@epita.fr>
12159
12160 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
12161 initialization.
12162 * src/output.c (prepare): Remove its update.
12163
12164 2001-11-27 Marc Autret <autret_m@epita.fr>
12165
12166 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
12167 Use %error-verbose.
12168
12169 2001-11-27 Marc Autret <autret_m@epita.fr>
12170
12171 * src/bison.simple: Remove YYERROR_VERBOSE using.
12172 Use %%error_verbose.
12173 (yyparse): Likewise.
12174 * src/output.c (prepare): Give its final value.
12175 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
12176 * src/getargs.h: Add its extern declaration.
12177 * src/getargs.c (error_verbose_flag): New int.
12178 (getargs): Update to catch new case.
12179 * src/options.c (option_table): 'error-verbose' is a new option.
12180 (shortopts): Update.
12181
12182 2001-11-27 Akim Demaille <akim@epita.fr>
12183
12184 * src/system.h: Use intl/libgettext.h.
12185 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
12186
12187 2001-11-27 Akim Demaille <akim@epita.fr>
12188
12189 * tests/torture.at (Exploding the Stack Size with Malloc):
12190 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
12191
12192 2001-11-27 Akim Demaille <akim@epita.fr>
12193
12194 * src/files.c: Include error.h.
12195 Reported by Hans Aberg.
12196
12197 2001-11-26 Marc Autret <autret_m@epita.fr>
12198
12199 * src/reader.c (parse_include_decl): New, not yet implemented.
12200 (read_declarations): Add case tok_include.
12201 * src/getargs.h (include): Add its extern definition.
12202 * src/getargs.c (include): New const char *.
12203 (getargs): Add case '-I'.
12204 * src/options.c (option_table): Add include as command line and
12205 percent option.
12206 * src/lex.h (token_t): Add tok_include.
12207
12208 2001-11-26 Akim Demaille <akim@epita.fr>
12209
12210 * src/reader.c (readgram): Make sure rules for mid-rule actions
12211 have a lineno equal to that of their host rule.
12212 Reported by Hans Aberg.
12213 * tests/regression.at (Rule Line Numbers): New.
12214
12215 2001-11-26 Akim Demaille <akim@epita.fr>
12216
12217 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
12218 size_ts.
12219
12220 2001-11-26 Akim Demaille <akim@epita.fr>
12221
12222 * src/complain.c, src/complain.h (error): Remove, provided by
12223 lib/error.[ch].
12224
12225 2001-11-26 Akim Demaille <akim@epita.fr>
12226
12227 * src/reader.c (read_declarations): Don't abort on tok_illegal,
12228 issue an error message.
12229 * tests/regression.at (Invalid %directive): New.
12230 Reported by Hans Aberg.
12231
12232 2001-11-26 Akim Demaille <akim@epita.fr>
12233
12234 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
12235 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12236
12237 2001-11-26 Akim Demaille <akim@epita.fr>
12238
12239 * src/conflicts.c (conflicts_print): Don't complain at all when
12240 there are no reduce/reduce conflicts, and as many shift/reduce
12241 conflicts as expected.
12242 * tests/regression.at (%expect right): Adjust.
12243
12244 2001-11-23 Akim Demaille <akim@epita.fr>
12245
12246 * lib/alloca.c: Update, from fileutils.
12247
12248 2001-11-23 Akim Demaille <akim@epita.fr>
12249
12250 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
12251
12252 2001-11-23 Akim Demaille <akim@epita.fr>
12253
12254 * src/system.h: Include alloca.h.
12255 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
12256
12257 2001-11-23 Akim Demaille <akim@epita.fr>
12258
12259 * src/print_graph.c (print_actions): Remove `rule', unused.
12260 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
12261 pacify GCC's signed < unsigned warnings.
12262 * src/closure.c (itemsetsize): Likewise.
12263 * src/reader.c (symbol_list_new): Static.
12264
12265 2001-11-23 Akim Demaille <akim@epita.fr>
12266
12267 Attaching lineno to buckets is stupid, since only one copy of each
12268 symbol is kept, only the line of the first occurrence is kept too.
12269
12270 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
12271 * src/reader.c (rline_allocated): Remove, unused.
12272 (symbol_list): Have a `line' member.
12273 (symbol_list_new): New.
12274 (readgram): Use it.
12275 * src/print.c (print_grammar): Output the rule line numbers.
12276 * tests/regression.at (Solved SR Conflicts)
12277 (Unresolved SR Conflicts): Adjust.
12278 Reported by Hans Aberg.
12279
12280 2001-11-22 Marc Autret <autret_m@epita.fr>
12281
12282 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
12283
12284 2001-11-22 Marc Autret <autret_m@epita.fr>
12285
12286 * src/muscle_tab.c (muscle_init): Remove initialization of
12287 skeleton muscle.
12288 * src/output.c (output_master_parser): Do it here.
12289
12290 2001-11-20 Akim Demaille <akim@epita.fr>
12291
12292 * po/sv.po: New.
12293 * configure.in (ALL_LINGUAS): Adjust.
12294 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
12295 longer contains strings to translate.
12296
12297 2001-11-19 Akim Demaille <akim@epita.fr>
12298
12299 * src/conflicts.c (conflicts_print): Add a missing \n.
12300
12301 2001-11-19 Akim Demaille <akim@epita.fr>
12302
12303 * src/nullable.c (nullable_print): New.
12304 (set_nullable): Call it when tracing.
12305 Better locality of variables.
12306
12307 2001-11-19 Akim Demaille <akim@epita.fr>
12308
12309 * src/print.c (print_actions): Better locality of variables.
12310
12311 2001-11-19 Akim Demaille <akim@epita.fr>
12312
12313 * src/derives.c (print_derives): Fix and enrich.
12314 * src/closure.c (print_fderives): Likewise.
12315
12316 2001-11-19 Akim Demaille <akim@epita.fr>
12317
12318 * src/closure.c (itemsetend): Remove, replaced with...
12319 (itemsetsize): new.
12320
12321 2001-11-19 Akim Demaille <akim@epita.fr>
12322
12323 * src/LR0.c (kernel_end): Remove, replaced with...
12324 (kernel_size): new.
12325
12326 2001-11-19 Akim Demaille <akim@epita.fr>
12327
12328 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
12329 to clarify.
12330
12331 2001-11-19 Akim Demaille <akim@epita.fr>
12332
12333 * src/closure.c (closure): Use arrays instead of pointers to clarify.
12334
12335 2001-11-19 Akim Demaille <akim@epita.fr>
12336
12337 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
12338 trace messages.
12339 * src/LR0.c: Likewise.
12340 (allocate_itemsets): Use arrays instead of pointers to clarify.
12341
12342 2001-11-19 Akim Demaille <akim@epita.fr>
12343
12344 * src/getargs.c (statistics_flag): Replace with...
12345 (trace_flag): New.
12346 (longopts): Accept --trace instead of --statistics.
12347 * src/getargs.h, src/options.c: Adjust.
12348 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
12349 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
12350
12351 2001-11-19 Akim Demaille <akim@epita.fr>
12352
12353 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
12354 pointers to clarify the code.
12355 (save_reductions, save_shifts): Factor common parts of alternatives.
12356
12357 2001-11-19 Akim Demaille <akim@epita.fr>
12358
12359 * src/LR0.c (new_state, get_state): Complete TRACE code.
12360 * src/closure.c: Include `reader.h' to get `tags', needed by the
12361 trace code.
12362 Rename the conditional DEBUG as TRACE.
12363 Output consistently TRACEs to stderr, not stdout.
12364 * src/derives.c: Likewise.
12365 * src/reduce.c: (inaccessable_symbols): Using if is better style
12366 than goto.
12367 Use `#if TRACE' instead of `#if 0' for tracing code.
12368
12369 2001-11-19 Akim Demaille <akim@epita.fr>
12370
12371 * src/system.h (LIST_FREE, shortcpy): New.
12372 * src/LR0.c: Use them.
12373 * src/output.c (free_itemsets, free_reductions, free_shifts):
12374 Remove, replaced by LIST_FREE.
12375
12376 2001-11-19 Akim Demaille <akim@epita.fr>
12377
12378 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
12379 (REDUCTIONS_ALLOC): New.
12380 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
12381 allocation.
12382
12383 2001-11-19 Akim Demaille <akim@epita.fr>
12384
12385 * src/LR0.c (new_state): Complete trace code.
12386 * src/nullable.c (set_nullable): Don't translate traces.
12387
12388 2001-11-19 Akim Demaille <akim@epita.fr>
12389
12390 * src/print_graph.c (print_core): Better locality of variables.
12391 * src/print.c (print_core): Likewise.
12392
12393 2001-11-19 Akim Demaille <akim@epita.fr>
12394
12395 * src/vcg.c: You do the output, so you are responsible of the
12396 handling of VCG syntax, in particular: use quotearg.
12397 * src/print_graph.c: Don't.
12398 (print_actions): Don't output the actions as part of the nodes,
12399 since that's the job of the edges.
12400 (print_state): Don't output by hand: fill the node description,
12401 and ask for its output.
12402
12403 2001-11-19 Akim Demaille <akim@epita.fr>
12404
12405 * src/bison.simple (yyparse): When verbosely reporting an error,
12406 no longer put additional quotes around token names.
12407 * tests/calc.at: Adjust.
12408
12409 2001-11-19 Akim Demaille <akim@epita.fr>
12410
12411 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
12412 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
12413 * src/output.c: Adjust.
12414
12415 2001-11-19 Akim Demaille <akim@epita.fr>
12416
12417 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
12418 (rule_t): this.
12419 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
12420
12421 2001-11-19 Akim Demaille <akim@epita.fr>
12422
12423 * src/gram.h (rule_t): New.
12424 (rule_table): New.
12425 (rrhs, rlhs): Remove, part of state_t.
12426 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
12427 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12428 * src/reader.c, src/reduce.c: Adjust.
12429
12430 2001-11-19 Akim Demaille <akim@epita.fr>
12431
12432 * src/reader.c (symbols_output): New, extracted from...
12433 (packsymbols): Here.
12434 (reader): Call it.
12435
12436 2001-11-19 Akim Demaille <akim@epita.fr>
12437
12438 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
12439 (maxrhs): this new function.
12440
12441 2001-11-19 Akim Demaille <akim@epita.fr>
12442
12443 * src/lalr.c (F): New macro to access the variable F.
12444 Adjust.
12445
12446 2001-11-19 Akim Demaille <akim@epita.fr>
12447
12448 * src/lalr.h (LA): New macro to access the variable LA.
12449 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12450 * src/lalr.c: Adjust.
12451
12452 2001-11-19 Akim Demaille <akim@epita.fr>
12453
12454 * src/lalr.c (initialize_LA): Only initialize LA. Let...
12455 (set_state_table): handle the `lookaheads' members.
12456
12457 2001-11-19 Akim Demaille <akim@epita.fr>
12458
12459 * src/lalr.h (lookaheads): Removed array, whose contents is now
12460 a member of...
12461 (state_t): this structure.
12462 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12463 Adjust.
12464
12465 2001-11-19 Akim Demaille <akim@epita.fr>
12466
12467 * src/lalr.h (consistent): Removed array, whose contents is now
12468 a member of...
12469 (state_t): this structure.
12470 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12471 Adjust.
12472
12473 2001-11-19 Akim Demaille <akim@epita.fr>
12474
12475 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
12476 contents are now members of...
12477 (state_t): this structure.
12478 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12479 Adjust.
12480
12481 2001-11-19 Akim Demaille <akim@epita.fr>
12482
12483 * src/lalr.h (state_t): New.
12484 (state_table): Be a state_t * instead of a core **.
12485 (accessing_symbol): Remove, part of state_t.
12486 * src/lalr.c: Adjust.
12487 (set_accessing_symbol): Merge into...
12488 (set_state_table): this.
12489 * src/print_graph.c, src/conflicts.c: Adjust.
12490
12491 2001-11-14 Akim Demaille <akim@epita.fr>
12492
12493 * tests/calc.at, tests/output.at, tests/regression.at,
12494 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
12495 now the tests are run in private dirs, therefore AC_CLEANUP and
12496 family can be simplified to 0-ary.
12497 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
12498 use abs. path to find config.h.
12499 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
12500 stderr, there can be way too much random noise.
12501 Instead pass -Werror to GCC and rely on the exit status.
12502 Reported by Wolfram Wagner.
12503
12504 2001-11-14 Akim Demaille <akim@epita.fr>
12505
12506 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
12507 defined only if yyoverflow is defined, to avoid `warning: unused
12508 variable `yyvs1''.
12509 Reported by The Test Suite.
12510
12511 2001-11-14 Akim Demaille <akim@epita.fr>
12512
12513 * src/print.c: Include reduce.h.
12514 Reported by Hans Aberg.
12515
12516 2001-11-14 Akim Demaille <akim@epita.fr>
12517
12518 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
12519 Revert a previous patch: these are really const.
12520 * src/conflicts.c (conflict_report): Additional useless pair of
12521 braces to pacify GCC's warnings for `if () if () {} else {}'.
12522 * src/lex.c (parse_percent_token): Replace equal_offset with
12523 arg_offset.
12524 arg is const.
12525 Be sure to strdup `arg' when used, since there is no reason for
12526 token_buffer not to change.
12527
12528 2001-11-14 Akim Demaille <akim@epita.fr>
12529
12530 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
12531 definition.
12532 * src/main.c (main): Use them.
12533 Suggested by Hans Aberg.
12534
12535 2001-11-12 Akim Demaille <akim@epita.fr>
12536
12537 * src/system.h (ngettext): Now that we use ngettext, be sure to
12538 provide a default definition when NLS are not used.
12539
12540 2001-11-12 Akim Demaille <akim@epita.fr>
12541
12542 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
12543 Use @kbd to denote user input.
12544 (Language and Grammar): ANSIfy the example.
12545 Adjust its layout for info/notinfo.
12546 (Location Tracking Calc): Output error messages to stderr.
12547 Output locations in a more GNUtically correct way.
12548 Fix a couple of Englishos.
12549 Adjust @group/@end group pairs.
12550
12551 2001-11-12 Akim Demaille <akim@epita.fr>
12552
12553 %expect was not functioning at all.
12554
12555 * src/conflicts.c (expected_conflicts): Set to -1.
12556 (conflict_report): Use ngettext.
12557 (conflicts_print): Check %expect and make its violation an error.
12558 * doc/bison.texinfo (Expect Decl): Adjust.
12559 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
12560 * tests/regression.at (%expect not enough, %expect right)
12561 (%expect too much): New.
12562
12563 2001-11-12 Akim Demaille <akim@epita.fr>
12564
12565 * tests/regression.at (Conflicts): Rename as...
12566 (Unresolved SR Conflicts): this.
12567 (Solved SR Conflicts): New.
12568
12569 2001-11-12 Akim Demaille <akim@epita.fr>
12570
12571 * src/reduce.c (print_results): Rename as...
12572 (reduce_output): This.
12573 Output to OUT, passed as argument, instead of output_obstack.
12574 (dump_grammar): Likewise.
12575 (reduce_free): New.
12576 Also free V1.
12577 (reduce_grammar): No longer call reduce_output, since...
12578 * src/print.c (print_results): do it.
12579 * src/main.c (main): Call reduce_free;
12580
12581 2001-11-12 Akim Demaille <akim@epita.fr>
12582
12583 * src/conflicts.c (print_reductions): Accept OUT as argument.
12584 Output to it, not to output_obstack.
12585 * src/print.c (print_actions): Adjust.
12586
12587 2001-11-12 Akim Demaille <akim@epita.fr>
12588
12589 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
12590 the result instead of using...
12591 (src_total, rrc_total, src_count, rrc_count): Remove.
12592 (any_conflicts): Remove.
12593 (print_conflicts): Split into...
12594 (conflicts_print, conflicts_output): New.
12595 * src/conflicts.h: Adjust.
12596 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
12597 * src/print.c (print_grammar): Issue `\n' between two rules.
12598 * tests/regression.at (Conflicts): New.
12599 Reported by Tom Lane.
12600
12601 2001-11-12 Akim Demaille <akim@epita.fr>
12602
12603 * tests/regression.at (Invalid input): Remove, duplicate with
12604 ``Invalid input: 1''.
12605
12606 2001-11-12 Akim Demaille <akim@epita.fr>
12607
12608 * tests/torture.at (AT_DATA_STACK_TORTURE)
12609 (Exploding the Stack Size with Alloca)
12610 (Exploding the Stack Size with Malloc): New.
12611
12612 2001-11-12 Akim Demaille <akim@epita.fr>
12613
12614 * src/bison.simple (YYSTACK_REALLOC): New.
12615 (yyparse) [!yyoverflow]: Use it and free the old stack.
12616 Reported by Per Allansson.
12617
12618 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
12619
12620 * src/bison.simple: Define type yystype instead of YYSTYPE, and
12621 define CPP macro, which substitute YYSTYPE by yystype.
12622 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
12623 with yyltype/YYLTYPE. This allows inclusion of the generated
12624 header within the parser if the compiler, such as GGC, accepts
12625 multiple equivalent #defines.
12626 From Akim.
12627
12628 2001-11-05 Akim Demaille <akim@epita.fr>
12629
12630 * src/reader.c (symbols_output): New, extracted from...
12631 (packsymbols): here.
12632 (reader): Adjust.
12633
12634 2001-11-05 Akim Demaille <akim@epita.fr>
12635
12636 * src/lex.c (parse_percent_token): s/quotearg/quote/.
12637
12638 2001-11-05 Akim Demaille <akim@epita.fr>
12639
12640 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
12641 pattern.
12642
12643 2001-11-05 Akim Demaille <akim@epita.fr>
12644
12645 * src/options.h (struct option_table_struct): set_flags is void*.
12646 * src/options.c (longopts): Support `--output' and `%output'.
12647 (usage): Adjust.
12648 * src/lex.h (tok_setopt): Remove, replaced with...
12649 (tok_intopt, tok_stropt): these new guys.
12650 * src/lex.c (getopt.h): Not needed.
12651 (token_buffer, unlexed_token_buffer): Not const.
12652 (percent_table): Promote `-' over `_' in directive names.
12653 Active `%name-prefix', `file-prefix', and `output'.
12654 (parse_percent_token): Accept possible arguments to directives.
12655 Promote `-' over `_' in directive names.
12656
12657 2001-11-04 Akim Demaille <akim@epita.fr>
12658
12659 * doc/bison.texinfo (Decl Summary): Split the list into
12660 `directives for grammars' and `directives for bison'.
12661 Sort'em.
12662 Add description of `%name-prefix', `file-prefix', and `output'.
12663 Promote `-' over `_' in directive names.
12664 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
12665 Simplify the description of `--name-prefix'.
12666 Promote `-' over `_' in directive names.
12667 Promote `--output' over `--output-file'.
12668 Fix the description of `--defines'.
12669 * tests/output.at: Exercise %file-prefix and %output.
12670
12671 2001-11-02 Akim Demaille <akim@epita.fr>
12672
12673 * doc/refcard.tex: Update.
12674
12675 2001-11-02 Akim Demaille <akim@epita.fr>
12676
12677 * src/symtab.h (SUNDEF): New.
12678 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
12679 stand for `uninitialized', instead of 0.
12680 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
12681 * src/lex.c (lex): Adjust.
12682
12683 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
12684 Number it 0.
12685 Let yylex return it instead of a plain 0.
12686 Reported by Dick Streefland.
12687
12688 2001-11-02 Akim Demaille <akim@epita.fr>
12689
12690 * tests/regression.at (Mixing %token styles): New test.
12691
12692 2001-11-02 Akim Demaille <akim@epita.fr>
12693
12694 * src/reader.c (parse_thong_decl): Formatting changes.
12695 (token_translations_init): New, extracted from...
12696 (packsymbols): Here.
12697 Adjust.
12698
12699 2001-11-01 Akim Demaille <akim@epita.fr>
12700
12701 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
12702 Check that `9foo.y' produces correct cpp guards.
12703 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
12704 guards.
12705 Reported by Wwp.
12706
12707 2001-11-01 Akim Demaille <akim@epita.fr>
12708
12709 * tests/regression.at (Invalid input: 2): New.
12710 * src/lex.c (unlexed_token_buffer): New.
12711 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
12712 too.
12713 Reported by Wwp.
12714
12715 2001-11-01 Akim Demaille <akim@epita.fr>
12716
12717 * tests/calc.at: Catch up with 1.30.
12718 * configure.in: Bump to 1.49a.
12719 Adjust to newer Autotest.
12720
12721 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
12722
12723 * src/conflicts.c: Move global variables rrc_total and src_total ...
12724 (print_conflicts): here.
12725 * src/output.c (output): Free global variable user_toknums.
12726 * src/lex.c (token_obstack): Become static.
12727
12728 2001-10-18 Akim Demaille <akim@epita.fr>
12729
12730 * tests/atlocal.in (GCC): Add.
12731 * tests/calc.at: s/m4_match/m4_bmatch/.
12732 s/m4_patsubst/m4_bpatsubst/.
12733 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
12734 * configure.in: AC_SUBST(GCC).
12735
12736 2001-10-14 Marc Autret <autret_m@epita.fr>
12737
12738 * src/options.c (create_long_option_table): Fix.
12739
12740 2001-10-10 Akim Demaille <akim@epita.fr>
12741
12742 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
12743
12744 2001-10-04 Akim Demaille <akim@epita.fr>
12745
12746 * src/reader.c (parse_union_decl): Push the caracters in
12747 union_obstack, not attrs_obstack.
12748
12749 2001-10-04 Akim Demaille <akim@epita.fr>
12750
12751 Merge in the branch 1.29.
12752
12753 * src/reader.c (packsymbols): Use a temporary obstack for
12754 `%%tokendef', since output_stack is already used elsewhere.
12755
12756 2001-10-02 Akim Demaille <akim@epita.fr>
12757
12758 Bump 1.29d.
12759
12760 2001-10-02 Akim Demaille <akim@epita.fr>
12761
12762 Version 1.29c.
12763
12764 2001-10-02 Akim Demaille <akim@epita.fr>
12765
12766 * tests/regression.at (Invalid CPP headers): New.
12767 From Alexander Belopolsky.
12768 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
12769
12770 2001-10-02 Akim Demaille <akim@epita.fr>
12771
12772 * tests/regression.at (Invalid input): New.
12773 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
12774 Reported by Shura.
12775
12776 2001-10-02 Akim Demaille <akim@epita.fr>
12777
12778 * tests/calc.at: Now that --debug works, the tests must be adjusted.
12779
12780 2001-10-02 Akim Demaille <akim@epita.fr>
12781
12782 * src/output.c (output_parser): Assert `skeleton'.
12783 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
12784 systems.
12785 From Shura.
12786
12787 2001-10-01 Marc Autret <autret_m@epita.fr>
12788
12789 * src/lex.h: Echo modifications.
12790 * src/lex.c (unlex): Parameter is now token_t.
12791 From Hans Aberg.
12792
12793 2001-10-01 Marc Autret <autret_m@epita.fr>
12794
12795 * src/main.c: Include lex.h.
12796 From Hans Aberg.
12797
12798 2001-09-29 Akim Demaille <akim@epita.fr>
12799
12800 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
12801
12802 2001-09-28 Akim Demaille <akim@epita.fr>
12803
12804 * tests/testsuite.at: Update to newer Autotest.
12805 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
12806
12807 2001-09-27 Akim Demaille <akim@epita.fr>
12808
12809 Position independent wrapper.
12810
12811 * tests/bison: Remove.
12812 * tests/bison.in: New.
12813 * configure.in: Adjust.
12814
12815 2001-09-27 Paul Eggert <eggert@twinsun.com>
12816
12817 Port quotearg fixes from tar 1.13.24.
12818
12819 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
12820 tm to be declared.
12821 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
12822 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
12823
12824 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
12825 * m4/mbrtowc.m4: New file.
12826 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
12827 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
12828
12829 2001-09-27 Akim Demaille <akim@epita.fr>
12830
12831 Bump to 1.29c.
12832
12833 2001-09-27 Akim Demaille <akim@epita.fr>
12834
12835 Version 1.29b.
12836
12837 2001-09-25 Akim Demaille <akim@epita.fr>
12838
12839 * src/system.h: Include `xalloc.h'.
12840 Remove it from the C files.
12841 * src/files.c (output_files): Free the obstacks.
12842 * src/lex.c (init_lex): Rename as...
12843 (lex_init): this.
12844 (lex_free): New.
12845 * src/main.c (main): Use it.
12846
12847 2001-09-24 Marc Autret <autret_m@epita.fr>
12848
12849 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
12850 to output informations in fout (FILE*).
12851 (open_graph, close_graph): Likewise.
12852 (output_graph, output_edge, output_node): Likewise.
12853 * src/vcg.h: Update function prototypes.
12854 * src/print_graph.c (print_graph): Open output graph file.
12855 (print_actions): Adjust.
12856 * src/files.h: Remove extern declaration.
12857 * src/files.c: Remove graph_obstack declaration.
12858 (open_files): Remove graph_obstack initialization.
12859 (output_files): Remove graph_obstack saving.
12860
12861 2001-09-24 Marc Autret <autret_m@epita.fr>
12862
12863 * src/files.c (compute_output_file_names): Fix.
12864
12865 2001-09-24 Marc Autret <autret_m@epita.fr>,
12866 Akim Demaille <akim@epita.fr>
12867
12868 * src/reader.c (reader): Remove call to free_symtab ().
12869 * src/main.c (main): Call it here.
12870 Include symtab.h.
12871 * src/conflicts.c (initialize_conflicts): Rename as...
12872 (solve_conflicts): this.
12873 * src/print.c (print_core, print_actions, print_state)
12874 (print_grammar): Dump to a file instead a `output_obstack'.
12875 (print_results): Dump `output_obstack', and then proceed with the
12876 FILE *.
12877 * src/files.c (compute_output_file_names, close_files): New.
12878 (output_files): Adjust.
12879 * src/main.c (main): Adjust.
12880
12881 2001-09-23 Marc Autret <autret_m@epita.fr>
12882
12883 * src/files.c (compute_header_macro): Computes header macro name
12884 from spec_defines_file when given.
12885
12886 2001-09-23 Marc Autret <autret_m@epita.fr>
12887
12888 * src/files.c (output_files): Add default extensions.
12889
12890 2001-09-22 Akim Demaille <akim@epita.fr>
12891
12892 * src/conflicts.c (finalize_conflicts): Rename as...
12893 (free_conflicts): this.
12894
12895 2001-09-22 Akim Demaille <akim@epita.fr>
12896
12897 * src/gram.c (gram_free): Rename back as...
12898 (dummy): this.
12899 (output_token_translations): Free `token_translations'.
12900 * src/symtab.c (free_symtab): Free the tag field.
12901
12902 2001-09-22 Akim Demaille <akim@epita.fr>
12903
12904 Remove `translations' as it is always set to true.
12905
12906 * src/gram.h: Adjust.
12907 * src/reader.c (packsymbols, parse_token_decl): Adjust
12908 * src/print.c (print_grammar): Adjust.
12909 * src/output.c (output_token_translations): Adjust.
12910 * src/lex.c (lex): Adjust.
12911 * src/gram.c: Be sure the set pointers to NULL.
12912 (dummy): Rename as...
12913 (gram_free): this.
12914
12915 2001-09-22 Akim Demaille <akim@epita.fr>
12916
12917 * configure.in: Invoke AM_LIB_DMALLOC.
12918 * src/system.h: Use dmalloc.
12919 * src/LR0.c: Be sure to have pointers initialized to NULL.
12920 (allocate_itemsets): Allocate kernel_items only if needed.
12921
12922 2001-09-22 Akim Demaille <akim@epita.fr>
12923
12924 * configure.in: Bump to 1.29b.
12925 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
12926 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
12927 need xmalloc.c in calc.y.
12928 From Pascal Bart.
12929
12930 2001-09-21 Akim Demaille <akim@epita.fr>
12931
12932 Version 1.29a.
12933 * Makefile.maint, config/config.guess, config/config.sub,
12934 * config/missing: Update from masters.
12935 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
12936 upon package.m4.
12937 * configure.in (ALL_LINGUAS): Add `tr'.
12938
12939 2001-09-21 Akim Demaille <akim@epita.fr>
12940
12941 * tests/Makefile.am (package.m4): Move to...
12942 ($(srcdir)/$(TESTSUITE)): here.
12943
12944 2001-09-20 Akim Demaille <akim@epita.fr>
12945
12946 * src/complain.c: No longer try to be standalone: use system.h.
12947 Don't assume __STDC__ is defined to 1. Just test if it is defined.
12948 * src/complain.h: Likewise.
12949 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
12950 Remove the unused variable `n'.
12951 From Albert Chin-A-Young.
12952
12953 2001-09-18 Marc Autret <autret_m@epita.fr>
12954
12955 * doc/bison.1: Update.
12956 * doc/bison.texinfo (Bison Options): Update --defines and --graph
12957 descriptions.
12958 (Option Cross Key): Update.
12959 Add --graph.
12960
12961 2001-09-18 Marc Autret <autret_m@epita.fr>
12962
12963 * tests/regression.at: New test (comment in %union).
12964
12965 2001-09-18 Marc Autret <autret_m@epita.fr>
12966
12967 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
12968 do that.
12969 Reported by Keith Browne.
12970
12971 2001-09-18 Marc Autret <autret_m@epita.fr>
12972
12973 * tests/output.at: Add tests for --defines and --graph.
12974
12975 2001-09-18 Marc Autret <autret_m@epita.fr>
12976
12977 * tests/output.at: Removes tests of %{header,src}_extension features.
12978
12979 2001-09-18 Akim Demaille <akim@epita.fr>
12980
12981 * tests/Makefile.am (package.m4): New.
12982 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
12983 (_AT_CHECK_CALC_ERROR): Likewise.
12984 Factor the `, ' part of verbose error messages.
12985
12986 2001-09-18 Marc Autret <autret_m@epita.fr>
12987
12988 * src/getargs.c (longopts): Declare --defines and --graph as options
12989 with optional arguments.
12990 * src/files.h: Add extern declarations.
12991 * src/files.c (spec_graph_file, spec_defines_file): New.
12992 (output_files): Update.
12993 Remove CPP-outed code.
12994
12995 2001-09-18 Marc Autret <autret_m@epita.fr>
12996
12997 Turn off %{source,header}_extension feature.
12998
12999 * src/files.c (compute_exts_from_gf): Update.
13000 (compute_exts_from_src): Update.
13001 (output_files): CPP-out useless code.
13002 * src/files.h: Remove {header,source}_extension extern declarations.
13003 * src/reader.c (parse_dquoted_param): CPP-out.
13004 (parse_header_extension_decl): Remove.
13005 (parse_source_extension_decl): Remove.
13006 (read_declarations): Remove cases tok_{hdrext,srcext}.
13007 * src/lex.c (percent_table): Remove {header,source}_extension entries.
13008 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
13009
13010 2001-09-10 Akim Demaille <akim@epita.fr>
13011
13012 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
13013 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
13014 (AT_CHECK_OUTPUT): this.
13015 Merely check ls' exit status, its output is useless.
13016
13017 2001-09-10 Akim Demaille <akim@epita.fr>
13018
13019 * tests/calc.at: Use m4_match.
13020 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
13021
13022 2001-09-10 Marc Autret <autret_m@epita.fr>,
13023 Akim Demaille <akim@epita.fr>
13024
13025 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
13026 enum color_e.
13027 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
13028 to `normal'.
13029 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
13030 * src/lex.h: Adjust prototype.
13031 (token_t): Add `tok_undef'.
13032 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
13033 (parse_percent_token): Now returns token_t.
13034 Add default statement in switch.
13035 (lex): Separate `c' as an input variable, from the token_t result
13036 part.
13037 (unlexed): Is a token_t.
13038
13039 2001-09-10 Akim Demaille <akim@epita.fr>
13040
13041 * configure.in: Bump to 1.29a.
13042
13043 2001-09-07 Akim Demaille <akim@epita.fr>
13044
13045 Version 1.29.
13046
13047 2001-08-30 Akim Demaille <akim@epita.fr>
13048
13049 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
13050 * m4/atconfig.m4: Remove.
13051 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
13052 * tests/bison: New.
13053 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
13054 m4_if, m4_patsubst, and m4_regexp.
13055 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
13056 `input' file instead of echo.
13057
13058 2001-08-29 Akim Demaille <akim@epita.fr>
13059
13060 Bump to 1.28e.
13061
13062 2001-08-29 Akim Demaille <akim@epita.fr>
13063
13064 Version 1.28d.
13065
13066 2001-08-29 Paul Eggert <eggert@twinsun.com>
13067
13068 * src/bison.simple (yyparse): Don't take the address of an
13069 item before the start of an array, as that doesn't conform to
13070 the C Standard.
13071
13072 2001-08-29 Robert Anisko <anisko_r@epita.fr>
13073
13074 * doc/bison.texinfo (Location Tracking Calc): New node.
13075
13076 2001-08-29 Paul Eggert <eggert@twinsun.com>
13077
13078 * src/output.c (output): Do not define const, as this now
13079 causes more problems than it cures.
13080
13081 2001-08-29 Akim Demaille <akim@epita.fr>
13082
13083 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
13084 the nodes.
13085 Be sure to tag the `detailmenu'.
13086
13087 2001-08-29 Akim Demaille <akim@epita.fr>
13088
13089 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
13090 download in a tmp dir.
13091
13092 2001-08-28 Marc Autret <autret_m@epita.fr>
13093
13094 * config/depcomp: New file.
13095
13096 2001-08-28 Marc Autret <autret_m@epita.fr>
13097
13098 * doc/bison.1 (mandoc): Adjust.
13099 From Juan Manuel Guerrero.
13100
13101 2001-08-28 Marc Autret <autret_m@epita.fr>
13102
13103 * src/print_graph.c (print_state): Fix.
13104
13105 2001-08-27 Marc Autret <autret_m@epita.fr>
13106
13107 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
13108 char * members.
13109 Echo modifications to the functions prototypes.
13110 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
13111
13112 2001-08-27 Marc Autret <autret_m@epita.fr>
13113
13114 * src/vcg.c: Include `xalloc.h'.
13115 (add_colorentry): New.
13116 (add_classname): New.
13117 (add_infoname): New.
13118 * src/vcg.h: Add new prototypes.
13119
13120 2001-08-27 Akim Demaille <akim@epita.fr>
13121
13122 * Makefile.maint: Sync. again with CVS Autoconf.
13123
13124 2001-08-27 Akim Demaille <akim@epita.fr>
13125
13126 * Makefile.maint: Formatting changes.
13127 (po-update, cvs-update, update): New targets.
13128 (AMTAR): Remove.
13129
13130 2001-08-27 Akim Demaille <akim@epita.fr>
13131
13132 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
13133 * Makefile.maint: Sync. with CVS Autoconf.
13134
13135 2001-08-27 Marc Autret <autret_m@epita.fr>
13136
13137 * src/vcg.h (struct infoname_s): New.
13138 (struct colorentry_s): New.
13139 (graph_s): New fields {vertical,horizontal}_order in structure.
13140 Add `infoname' field.
13141 Add `colorentry' field;
13142 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
13143 (G_HORIZONTAL_ORDER): New.
13144 (G_INFONAME): New.
13145 (G_COLORENTRY): New.
13146 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
13147 Add output of `infoname'.
13148 Add output of `colorentry'.
13149
13150 2001-08-27 Marc Autret <autret_m@epita.fr>
13151
13152 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
13153 This one shadowed a global parameter.
13154
13155 2001-08-24 Marc Autret <autret_m@epita.fr>
13156
13157 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
13158 instead of `unsigned'.
13159 (print_state): Do not call obstack_object_size () in obstack_grow ()
13160 to avoid macro variables shadowing.
13161
13162 2001-08-23 Marc Autret <autret_m@epita.fr>
13163
13164 * src/lex.c (percent_table): Typo: s/naem/name/.
13165 Add graph option.
13166 Normalize new options declarations.
13167
13168 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
13169
13170 * tests/suite.at: Exercise %header_extension and %source_extension.
13171
13172 2001-08-16 Marc Autret <autret_m@epita.fr>
13173
13174 * src/reader.c (parse_dquoted_param): New.
13175 (parse_header_extension_decl): Use it.
13176 (parse_source_extension_decl): Likewise.
13177
13178 2001-08-16 Marc Autret <autret_m@epita.fr>
13179
13180 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
13181 (get_xxxx_str): Use assert () instead of complain ().
13182 Remove return invokations in default cases.
13183 (get_decision_str): Modify default behaviour. Remove second argument.
13184 Echo modifications on calls.
13185 (output_graph): Fix.
13186
13187 2001-08-16 Marc Autret <autret_m@epita.fr>
13188
13189 * src/getargs.c (usage): Update with ``-g, --graph''.
13190
13191 2001-08-16 Marc Autret <autret_m@epita.fr>
13192
13193 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
13194 (Option Cross Key): Likewise.
13195 * doc/bison.1: Update.
13196
13197 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
13198
13199 * src/output.c (output_master_parser): Don't finish action_obstack.
13200 (output_parser): Don't care about the muscle action, here.
13201 (prepare): Copy the action_obstack in the action muscle.
13202 (output): Free action_obstack.
13203
13204 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
13205
13206 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
13207 will contain `%union' declaration.
13208 (parse_union_decl): Delete #line directive output.
13209 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
13210 informations about %union.
13211 (parse_union_decl): Copy the union_obstack in the muscle stype.
13212 * src/bison.simple: Add new #line directive.
13213 Add typdef %%stype YYSTYPE.
13214
13215 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
13216
13217 * src/bison.simple: Add new `#line' directive.
13218
13219 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
13220
13221 * src/bison.simple: New `#line' directive.
13222 * src/output.c (output_parser): Support new dynamic muscle input_line.
13223
13224 2001-09-22 Marc Autret <autret_m@epita.fr>
13225
13226 * src/output.c (output_master_parser): New.
13227 (output_parser): Be more re-entrant.
13228
13229 2001-09-21 Marc Autret <autret_m@epita.fr>
13230
13231 * src/reader.c (copy_definition, parse_union_decl): Update and use
13232 `linef' muscle.
13233 (copy_action): Likewise.
13234 Use obstack_1grow ().
13235 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
13236
13237 2001-09-21 Marc Autret <autret_m@epita.fr>
13238
13239 * src/options.c (option_table): Adjust.
13240 * src/lex.c (parse_percent_token): Fix.
13241
13242 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
13243
13244 * src/options.c (symtab.h): Include it, need by lex.h.
13245
13246 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
13247
13248 * src/lex.c (parse_percent_token): Change type of variable `tx', which
13249 is now an option_table_struct*.
13250 (option_strcmp): New function option_strcmp.
13251 (parse_percent_token): Call option_strcmp.
13252 * src/getargs.c (xalloc.h, options.h): Include it.
13253 (getargs): Call create_long_option_table.
13254 (getargs): Free longopts at the end of the function.
13255 (shortopts): Move in options.c.
13256 * src/options.c (create_long_option_table): New function. Convert
13257 information from option_table to option structure.
13258 * src/reader.c (options.h): Include it.
13259
13260 * src/Makefile.am: Adjust.
13261 * src/options.c (option_table): Create from longopts and percent_table.
13262 * src/getargs.c (longopts): Delete.
13263 * src/lex.c (struct percent_table_struct): Delete.
13264 (percent_table): Delete.
13265 (options.h): Include it.
13266 * src/options.c: Create.
13267 * src/options.h: Create.
13268 Declare enum opt_access_e.
13269 Define struct option_table_struct.
13270
13271 2001-09-20 Marc Autret <autret_m@epita.fr>
13272
13273 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
13274 sections of Bison.
13275
13276 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
13277
13278 * src/bison.simple: s/%%filename/%%skeleton.
13279 * src/muscle_tab.c (getargs.h): Include it.
13280 (muscle_init): Insert new muscle skeleton.
13281
13282 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
13283
13284 * src/output.c (output_parser): Delete unused variable actions_dumped.
13285
13286 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
13287
13288 * src/output.c (output): Delete call to reader_output_yylsp.
13289 * src/reader.c (reader): Likewise.
13290 * src/reader.h: Delete declaration of reader_output_yylsp.
13291
13292 2001-09-02 Marc Autret <autret_m@epita.fr>
13293
13294 * src/reader.c: Include muscle_tab.h.
13295 (parse_union_decl): Update.
13296 (parse_macro_decl): Rename parse_muscle_decl.
13297 Update to use renamed functions and variable.
13298 (read_declarations, copy_action, read_additionnal_code, : Updated
13299 with correct variables and functions names.
13300 (packsymbols, reader): Likewise.
13301
13302 * src/reader.h (muscle_obstack): Extern declaration update.
13303
13304 * src/output.c: Include muscle_tab.h
13305 In all functions using macro_insert, change by using muscle_insert ().
13306 (macro_obstack): Rename muscle_obstack.
13307 Echo modifications in the whole file.
13308 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
13309 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
13310 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
13311
13312 * src/muscle_tab.h: Update double inclusion macros.
13313 (macro_entry_s): Rename muscle_entry_s.
13314 Update prototypes.
13315
13316 * src/muscle_tab.c: Include muscle_tab.h.
13317 Rename macro_tabble to muscle_table.
13318 (mhash1, mhash2, mcmp): Use muscle_entry.
13319 (macro_init): Rename muscle_init. Update.
13320 (macro_insert): Rename muscle_insert. Update.
13321 (macro_find): Rename muscle_find. Update.
13322
13323 * src/main.c: Include muscle_tab.h.
13324 (main): Call muscle_init ().
13325 * src/Makefile.am (bison_SOURCES): Echo modifications.
13326
13327 2001-09-02 Marc Autret <autret_m@epita.fr>
13328
13329 Now the files macro_tab.[ch] are named muscle_tab.[ch].
13330
13331 * src/muscle_tab.c, src/muscle_tab.h: Add files.
13332
13333 2001-09-02 Marc Autret <autret_m@epita.fr>
13334
13335 * src/macrotab.c, src/macrotab.h: Remove.
13336
13337 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
13338
13339 * src/reader.c (copy_guard): Use muscle to specify the `#line'
13340 filename.
13341
13342 2001-09-01 Marc Autret <autret_m@epita.fr>
13343
13344 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
13345 to an explicit value to activate the feature. We do it here.
13346
13347 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
13348
13349 * src/output.c (prepare): Delete the `filename' muscule insertion.
13350 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
13351 (parse_union_decl): Likewise.
13352 * src/macrotab.c (macro_init): Initialize filename by infile.
13353
13354 2001-08-31 Marc Autret <autret_m@epita.fr>
13355
13356 * src/bison.simple (YYLSP_NEEDED): New definition.
13357 * src/output.c (prepare): Add macro insertion of `locations_flag'
13358
13359 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
13360
13361 * src/output.c (prepare): Delete insertion of previous muscles,
13362 and insert the `prefix' muscles.
13363 * src/macrotab.c (macro_init): Likewise.
13364 (macro_init): Initialization prefix directive by `yy'.
13365 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
13366 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
13367 yylval, yydebug, yyerror, yynerrs and yyparse.
13368 New directive `#define' to substitute yydebug, ... with option
13369 name_prefix.
13370
13371 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
13372
13373 * src/main.c (main): Standardize.
13374 * src/output.c (output_table_data, output_parser): Likewise.
13375 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
13376
13377 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
13378
13379 * src/reader.c (read_additionnal_code): Rename %%user_code to
13380 %%epilogue.
13381 * src/output.c (output): Rename %%declarations to %%prologue.
13382 * src/bison.simple: Echo modifications.
13383
13384 2001-08-31 Marc Autret <autret_m@epita.fr>
13385
13386 * src/reader.c (readgram): CleanUp.
13387 (output_token_defines): Likewise.
13388 (packsymbols): Likewise.
13389 (reader): Likewise.
13390 * src/output.c (output): CPP-out useless code.
13391
13392 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
13393
13394 * src/reader.c (reader): Delete obsolete call to function
13395 output_trailers and output_headers.
13396 * src/output.h: Remove obsolete functions prototypes of output_headers
13397 and output_trailers.
13398
13399 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
13400
13401 * src/main.c: Include macrotab.h.
13402 * src/macrotab.h (macro_entry_s): Constify fields.
13403 Adjust functions prototypes.
13404 * src/macrotab.c (macro_insert): Constify key and value.
13405 (macro_find): Constify key.
13406 (macro_insert): Include 'xalloc.h'
13407 (macro_insert): Use XMALLOC.
13408 (macro_find): Constify return value.
13409 * src/output.c (output_table_data): Rename table to table_data.
13410 (output_parser): Constify macro_key, macro_value.
13411
13412 2001-08-30 Marc Autret <autret_m@epita.fr>
13413
13414 * src/reader.c (parse_skel_decl): New.
13415 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
13416 * src/lex.h (token_t): New token `tok_skel'.
13417 * src/lex.c (percent_table): Add skeleton option entry.
13418 Standardize.
13419
13420 2001-08-29 Marc Autret <autret_m@epita.fr>
13421
13422 * src/bison.simple: Add %%user_code directive at the end.
13423 * src/reader.c (read_additionnal_code): New.
13424 (reader): Use it.
13425 * src/output.c (output_program): Remove.
13426 (output): Update.
13427
13428 2001-08-28 Marc Autret <autret_m@epita.fr>
13429
13430 * src/output.c (output_actions): Clean up.
13431 (output_gram): CPP-out useless code.
13432 * src/reader.c (reader): Clean up, CPP-out useless code.
13433
13434 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
13435
13436 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
13437 directive.
13438 * src/bison.simple: Add `%%definitions'.
13439
13440 2001-08-28 Marc Autret <autret_m@epita.fr>
13441
13442 * config/depcomp: New file.
13443
13444 2001-08-27 Paul Eggert <eggert@twinsun.com>
13445
13446 * src/bison.simple (yyparse): Don't take the address of an
13447 item before the start of an array, as that doesn't conform to
13448 the C Standard.
13449
13450 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
13451
13452 * src/output.c (output): Remove the initialization of the macro
13453 obstack. It was done too late here.
13454
13455 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
13456 completely wrong.
13457 (reader): Initialize the macro obstack here, since we need it to grow
13458 '%define' directives.
13459
13460 * src/reader.h: Declare the macro obstack as extern.
13461
13462 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
13463
13464 * src/output.c (output_parser): Fix. Store single '%' characters in
13465 the output obstack instead of throwing them away.
13466
13467 2001-08-27 Akim Demaille <akim@epita.fr>
13468
13469 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
13470
13471 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13472
13473 * lib/Makefile.am: Adjust.
13474
13475 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13476
13477 * src/bison.simple: Update and add '%%' directives.
13478
13479 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13480
13481 * src/reader.c (reader): Remove calls to 'output_headers' and
13482 'output_trailers'. Remove some C output.
13483 (readgram): Disable a piece of code that was writing a default
13484 definition for 'YYSTYPE'.
13485 (reader_output_yylsp): Remove.
13486 (packsymbols): Output token defintions to a macro.
13487 (copy_definition): Disable C output.
13488
13489 * src/reader.c (parse_macro_decl): New function used to parse macro
13490 declarations.
13491 (copy_string2): Put the body of copy_string into this new function.
13492 Add a parameter to let the caller choose whether he wants to copy the
13493 string delimiters or not.
13494 (copy_string): Be a simple call to copy_string2 with the last argument
13495 bound to true.
13496 (read_declarations): Add case for macro definition.
13497 (copy_identifier): New.
13498 (parse_macro_decl): Read macro identifiers using copy_identifier
13499 rather than lex.
13500
13501 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13502
13503 * src/output.c (prepare): Add prefixed names.
13504 (output_parser): Output semantic actions.
13505 (output_parser): Fix bug on '%%line' directives.
13506
13507 * src/output.c (output_headers): Remove. The C code printed by this
13508 function should now be in the skeletons.
13509 (output_trailers): Remove.
13510 (output): Disable call to 'reader_output_yylsp'.
13511 (output_rule_data): Do not output tables to the table obstack.
13512
13513 * src/output.c: Remove some C dedicated output.
13514 Improve the use of macro and output obstacks.
13515 (output_defines): Remove.
13516
13517 * src/output.c (output_token_translations): Associate 'translate'
13518 table with a macro. No output to the table obstack.
13519 (output_gram): Same for 'rhs' and 'prhs'.
13520 (output_stos): Same for 'stos'.
13521 (output_rule_data): Same for 'r1' and 'r2'.
13522 (token_actions): Same for 'defact'.
13523 (goto_actions): Same for 'defgoto'.
13524 (output_base): Same for 'pact' and 'pgoto'.
13525 (output_table): Same for 'table'.
13526 (output_check): Same for 'check'.
13527
13528 * src/output.c (output_table_data): New function.
13529 (output_short_table): Remove.
13530 (output_short_or_char_table): Remove.
13531
13532 * src/output.c (output_parser): Replace most of the skeleton copy code
13533 with something new. Skeletons are now processed character by character
13534 rather than line by line, and Bison looks for '%%' macros. This is the
13535 first step in making Bison's output process (a lot) more flexible.
13536 (output_parser): Use the macro table.
13537
13538 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13539
13540 * src/main.c (main): Initialize the macro table.
13541
13542 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13543
13544 * src/lex.c (percent_table): Add tok_define.
13545 * src/lex.h: Add tok_define.
13546
13547 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13548
13549 * src/macrotab.c: New file.
13550 * src/macrotab.h: New file.
13551 * src/Makefile.am: Update.
13552
13553 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13554
13555 * lib/hash.c: New file.
13556 * lib/hash.h: New file.
13557 * lib/Makefile.am: Update.
13558
13559 2001-08-15 Akim Demaille <akim@epita.fr>
13560
13561 Version 1.28c.
13562
13563 2001-08-15 Marc Autret <autret_m@epita.fr>
13564
13565 * src/reader.c (readgram): Indent output macro YYSTYPE.
13566 (packsymbols): Likewise.
13567 (output_token_defines): Likewise.
13568 * src/files.c: Standardize.
13569 (compute_header_macro): New.
13570 (defines_obstack_save): New. Use compute_header_macro.
13571 (output_files): Update. Use defines_obstack_save.
13572
13573 2001-08-15 Akim Demaille <akim@epita.fr>
13574
13575 * doc/bison.texinfo (Table of Symbols): Document
13576 YYSTACK_USE_ALLOCA.
13577
13578 2001-08-15 Akim Demaille <akim@epita.fr>
13579
13580 * missing: Update from CVS Automake.
13581 * config/config.guess, config/config.sub, config/texinfo.tex:
13582 Update from gnu.org.
13583
13584 2001-08-15 Akim Demaille <akim@epita.fr>
13585
13586 * Makefile.maint: Sync with CVS Autoconf.
13587
13588 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
13589
13590 * doc/bison.texinfo: Include GNU Free Documentation License from
13591 `fdl.texi'.
13592 * doc/fdl.texi: Add to package.
13593
13594 2001-08-14 Marc Autret <autret_m@epita.fr>
13595
13596 Turn on %{source,header}_extension features.
13597
13598 * src/lex.c (percent_table): Un-CPP out header_extension and
13599 source_extension.
13600 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
13601 (compute_exts_from_src): Remove conditions. It restores priorities
13602 between options.
13603
13604 2001-08-14 Marc Autret <autret_m@epita.fr>
13605
13606 * src/files.c (compute_base_names): Add extensions computing when
13607 `--file-prefix' used.
13608 Standardize function calls.
13609
13610 2001-08-13 Marc Autret <autret_m@epita.fr>
13611
13612 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
13613 defining it (defined but null disables alloca).
13614
13615 2001-08-13 Marc Autret <autret_m@epita.fr>
13616
13617 * src/bison.simple (_yy_memcpy): CPP reformat.
13618
13619 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
13620
13621 * tests/atconfig.in (CPPFLAGS): Fix.
13622
13623 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
13624
13625 * doc/bison.texinfo: Include GNU General Public License from
13626 `gpl.texi'.
13627 * doc/gpl.texi: Add to package.
13628
13629 2001-08-10 Marc Autret <autret_m@epita.fr>
13630
13631 * src/print_graph.h: Fix.
13632 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
13633
13634 2001-08-10 Akim Demaille <akim@epita.fr>
13635
13636 * src/system.h: Provide default declarations for stpcpy, strndup,
13637 and strnlen.
13638
13639 2001-08-10 Robert Anisko <anisko_r@epita.fr>
13640
13641 * doc/bison.texinfo (Locations): Update @$ stuff.
13642
13643 2001-08-09 Robert Anisko <anisko_r@epita.fr>
13644
13645 * src/bison.simple (YYLLOC_DEFAULT): Update.
13646 (yyparse): Adjust.
13647
13648 2001-08-08 Marc Autret <autret_m@epita.fr>
13649
13650 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
13651 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
13652 Reported by Fabrice Bauzac.
13653
13654 2001-08-08 Marc Autret <autret_m@epita.fr>
13655
13656 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
13657 * src/vcg.c (output_node): Fix.
13658 * src/vcg.h: Cleanup.
13659 * src/print_graph.c: Add comments.
13660 (node_output_size): New global variable. Simplify the formatting of
13661 the VCG graph output.
13662 (print_actions): Unused code is now used. It notifies the final state
13663 and no action states in the VCG graph. It also give the reduce actions.
13664 The `shift and goto' edges are red and the `go to state' edges are
13665 blue.
13666 Get the current node name and node_obstack by argument.
13667 (node_obstack): New variable.
13668 (print_state): Manage node_obstack.
13669 (print_core): Use node_obstack given by argument.
13670 A node is not only computed here but in print_actions also.
13671 (print_graph): CPP out useless code instead of commenting it.
13672
13673 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
13674
13675 * tests/atconfig.in (CPPFLAGS): Fix.
13676
13677 2001-08-07 Akim Demaille <akim@epita.fr>
13678
13679 * src/print_graph.c (quote): New.
13680 (print_core): Use it.
13681
13682 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
13683
13684 * src/vcg.c (complain.h): Include it.
13685 Unepitaize `return' invocations.
13686 [NDEBUG] (main): Remove.
13687 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
13688 * src/files.c (open_files): Initialize graph_obstack.
13689 * src/print_graph.c (print_actions): CPP out useless code.
13690 (print_core): Don't output the last `\n' in labels.
13691 Use `quote'.
13692 * src/files.c (output_files): Output the VCG file.
13693 * src/main.c (main): Invoke print_graph ();
13694
13695 2001-08-06 Marc Autret <autret_m@epita.fr>
13696
13697 Automaton VCG graph output.
13698 Using option ``-g'' or long option ``--graph'', you can generate
13699 a gram_filename.vcg file containing a VCG description of the LALR (1)
13700 automaton of your grammar.
13701
13702 * src/main.c: Call to print_graph() function.
13703 * src/getargs.h: Update.
13704 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
13705 (graph_flag): New flag.
13706 (longopts): Update.
13707 (getargs): Add case `g'.
13708 * src/files.c (graph_obstack): New obstack struct.
13709 (open_files): Initialize new obstack.
13710 (output_files): Saves graph_obstack if required.
13711 * src/files.h (graph_obstack): New extern declaration.
13712 * src/Makefile.am: Add new source files.
13713
13714 2001-08-06 Marc Autret <autret_m@epita.fr>
13715
13716 * src/print_graph.c, src/print_graph.h (graph): New.
13717 * src/vcg.h: New file.
13718 * src/vcg.c: New file, VCG graph handling.
13719
13720 2001-08-06 Marc Autret <autret_m@epita.fr>
13721
13722 Add of %source_extension and %header_extension which specify
13723 the source or/and the header output file extension.
13724
13725 * src/files.c (compute_base_names): Remove initialisation of
13726 src_extension and header_extension.
13727 (compute_exts_from_gf): Update.
13728 (compute_exts_from_src): Update.
13729 (output_files): Update.
13730 * src/reader.c (parse_header_extension_decl): New.
13731 (parse_source_extension_decl): New.
13732 (read_declarations): New case statements for the new tokens.
13733 * src/lex.c (percent_table): Add entries for %source_extension
13734 and %header_extension.
13735 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
13736
13737 2001-08-06 Marc Autret <autret_m@epita.fr>
13738
13739 * configure.in: Bump to 1.28c.
13740 * doc/bison.texinfo: Texinfo thingies.
13741
13742 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
13743
13744 * tests/atconfig.in (CPPFLAGS): Add.
13745 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
13746
13747 2001-08-03 Akim Demaille <akim@epita.fr>
13748
13749 Version 1.28b.
13750
13751 2001-08-03 Akim Demaille <akim@epita.fr>
13752
13753 * tests/Makefile.am (check-local): Ship testsuite.
13754 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
13755 Include `string.h'.
13756
13757 2001-08-03 Akim Demaille <akim@epita.fr>
13758
13759 * configure.in: Try using -Wformat when compiling.
13760
13761 2001-08-03 Akim Demaille <akim@epita.fr>
13762
13763 * configure.in: Bump to 1.28b.
13764
13765 2001-08-03 Akim Demaille <akim@epita.fr>
13766
13767 * src/complain.c: Adjust strerror_r portability issues.
13768
13769 2001-08-03 Akim Demaille <akim@epita.fr>
13770
13771 Version 1.28a.
13772
13773 2001-08-03 Akim Demaille <akim@epita.fr>
13774
13775 * src/getargs.c, src/getarg.h (skeleton)): Constify.
13776 * src/lex.c (literalchar): Avoid name clashes on `buf'.
13777 * src/getargs.c: Include complain.h.
13778 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
13779 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
13780
13781 2001-08-03 Akim Demaille <akim@epita.fr>
13782
13783 * src/reader.c (readgram): Display hidden chars in error messages.
13784
13785 2001-08-03 Akim Demaille <akim@epita.fr>
13786
13787 Update to gettext 0.10.39.
13788
13789 2001-08-03 Akim Demaille <akim@epita.fr>
13790
13791 * lib/strspn.c: New.
13792
13793 2001-08-01 Marc Autret <autret_m@epita.fr>
13794
13795 * doc/bison.texinfo: Update.
13796 * doc/bison.1 (mandoc): Update.
13797 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
13798 * src/files.c: Support output files extensions computing.
13799 (src_extension): New static variable.
13800 (header_extension): New static variable.
13801 (tr): New function.
13802 (get_extension_index): New function, gets the index of an extension
13803 filename in a string.
13804 (compute_exts_from_gf): New function, computes extensions from the
13805 grammar file extension.
13806 (compute_exts_from_src): New functions, computes extensions from the
13807 C source file extension, file given by ``-o'' option.
13808 (compute_base_names): Update.
13809 (output_files): Update.
13810
13811 2001-08-01 Robert Anisko <anisko_r@epita.fr>
13812
13813 * doc/bison.texi: Document @$.
13814 (Locations): New section.
13815
13816 2001-07-18 Akim Demaille <akim@epita.fr>
13817
13818 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
13819 * config/prev-version.txt, config/move-if-change: New.
13820 * Makefile.am: Adjust.
13821
13822 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
13823
13824 * src/bison.simple (yyparse): Suppress warning `comparaison
13825 between signed and unsigned'.
13826
13827 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
13828
13829 * src/getargs.h (raw_flag): Remove.
13830 * src/getargs.c: Die on `-r'/`--raw'.
13831 * src/lex.c (parse_percent_token): Die on `%raw'.
13832 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
13833 * tests/calc.at: Suppress test with option `--raw'.
13834
13835 2001-07-14 Akim Demaille <akim@epita.fr>
13836
13837 * config/: New.
13838 * configure.in: Require Autoconf 2.50.
13839 Update to gettext 0.10.38.
13840
13841 2001-03-16 Akim Demaille <akim@epita.fr>
13842
13843 * doc/bison.texinfo: ANSIfy the examples.
13844
13845 2001-03-16 Akim Demaille <akim@epita.fr>
13846
13847 * getargs.c (skeleton): New variable.
13848 (longopts): --skeleton is a new option.
13849 (shortopts, getargs): -S is a new option.
13850 * getargs.h: Declare skeleton.
13851 * output.c (output_parser): Use it.
13852
13853 2001-03-16 Akim Demaille <akim@epita.fr>
13854
13855 * m4/strerror_r.m4: New.
13856 * m4/error.m4: Run AC_FUNC_STRERROR_R.
13857 * lib/error.h, lib/error.c: Update.
13858
13859 2001-03-16 Akim Demaille <akim@epita.fr>
13860
13861 * src/getargs.c (longopts): Clean up.
13862
13863 2001-02-21 Akim Demaille <akim@epita.fr>
13864
13865 * src/reader.c (gensym): `gensym_count' is your own.
13866 Use a static buf to create the symbol name, as token_buffer is no
13867 longer a buffer.
13868
13869 2001-02-08 Akim Demaille <akim@epita.fr>
13870
13871 * src/conflicts.c (conflict_report): Be sure not to append to res
13872 between two calls, which could happen if both first sprintf were
13873 skipped, but not the first cp += strlen.
13874
13875 2001-02-08 Akim Demaille <akim@epita.fr>
13876
13877 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
13878 New, from fileutils 4.0.37.
13879 * configure.in: Require Autoconf 2.49c. I took some time before
13880 making this decision. This is the only way out for portability
13881 issues in Bison, it would mean way too much duplicate effort to
13882 import in Bison features implemented in 2.49c since 2.13.
13883 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
13884
13885 2001-02-02 Akim Demaille <akim@epita.fr>
13886
13887 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
13888 * lib/xalloc.h, lib/xmalloc.c: Update.
13889
13890 2001-01-19 Akim Demaille <akim@epita.fr>
13891
13892 Get rid of the ad hoc handling of token_buffer in the scanner: use
13893 the obstacks.
13894
13895 * src/lex.c (token_obstack): New.
13896 (init_lex): Initialize it. No longer call...
13897 (grow_token_buffer): this. Remove it.
13898 Adjust all the places which used it to use the obstack.
13899
13900 2001-01-19 Akim Demaille <akim@epita.fr>
13901
13902 * src/lex.h: Rename all the tokens:
13903 s/\bENDFILE\b/tok_eof/g;
13904 s/\bIDENTIFIER\b/tok_identifier/g;
13905 etc.
13906 Let them be enums, not #define, to ease debugging.
13907 Adjust all the code.
13908
13909 2001-01-18 Akim Demaille <akim@epita.fr>
13910
13911 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
13912 * src/lex.c (maxtoken, grow_token_buffer): Static.
13913
13914 2001-01-18 Akim Demaille <akim@epita.fr>
13915
13916 Since we now use obstacks, more % directives can be enabled.
13917
13918 * src/lex.c (percent_table): Also accept `%yacc',
13919 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
13920 `%debug'.
13921 Handle the actions for `%semantic_parser' and `%pure_parser' here,
13922 instead of returning a token.
13923 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
13924 * src/reader.c (read_declarations): Adjust.
13925 * src/files.c (open_files): Don't call `compute_base_names', don't
13926 compute `attrsfile' since they depend upon data which might be
13927 *in* the input file now.
13928 (output_files): Do it here.
13929 * src/output.c (output_headers): Document the fact that this patch
13930 introduces a guaranteed SEGV for semantic parsers.
13931 * doc/bison.texinfo: Document them.
13932 * tests/suite.at: Exercise these %options.
13933
13934 2000-12-20 Akim Demaille <akim@epita.fr>
13935
13936 Also handle the output file (--verbose) with obstacks.
13937
13938 * files.c (foutput): Remove.
13939 (output_obstack): New.
13940 Adjust all dependencies.
13941 * src/conflicts.c: Return a string.
13942 * src/system.h (obstack_grow_string): Rename as...
13943 (obstack_sgrow): this. Be ready to work with non literals.
13944 (obstack_fgrow4): New.
13945
13946 2000-12-20 Akim Demaille <akim@epita.fr>
13947
13948 * src/files.c (open_files): Fix the computation of short_base_name
13949 in the case of `-o foo.tab.c'.
13950
13951 2000-12-20 Akim Demaille <akim@epita.fr>
13952
13953 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
13954 (copy_dollar): Now that everything uses obstacks, get rid of the
13955 FILE * parameters.
13956
13957 2000-12-20 Akim Demaille <akim@epita.fr>
13958
13959 * src/files.c (open_files): Actually the `.output' file is based
13960 on the short_base_name, not base_name.
13961 * tests/suite.at (Checking output file names): Adjust.
13962
13963 2000-12-20 Akim Demaille <akim@epita.fr>
13964
13965 * src/bison.s1: Remove, we now use directly...
13966 * src/bison.simple: this.
13967 * src/Makefile.am: Use pkgdata instead of data.
13968
13969 2000-12-20 Akim Demaille <akim@epita.fr>
13970
13971 * src/files.c (guard_obstack): New.
13972 (open_files): Initialize it.
13973 (output_files): Dump it...
13974 * src/files.h: Export it.
13975 * src/reader.c (copy_guard): Use it.
13976
13977 2000-12-19 Akim Demaille <akim@epita.fr>
13978
13979 * src/files.c (outfile, defsfile, actfile): Removed as global
13980 vars.
13981 (open_files): Don't compute them.
13982 (output_files): Adjust.
13983 (base_name, short_base_name): Be global.
13984 Adjust dependencies.
13985
13986 2000-12-19 Akim Demaille <akim@epita.fr>
13987
13988 * src/files.c (strsuffix): New.
13989 (stringappend): Be just like strcat but allocate.
13990 (base_names): Eve out from open_files.
13991 Try to simplify the rather hairy computation of base_name and
13992 short_base_name.
13993 (open_files): Use it.
13994 * tests/suite.at (Checking output file names): New test.
13995
13996 2000-12-19 Akim Demaille <akim@epita.fr>
13997
13998 * src/system.h (obstack_grow_literal_string): Rename as...
13999 (obstack_grow_string): this.
14000 * src/output.c (output_parser): Recognize `%% actions' instead of
14001 `$'.
14002 * src/bison.s1: s/$/%% actions/.
14003 * src/bison.hairy: Likewise.
14004
14005 2000-12-19 Akim Demaille <akim@epita.fr>
14006
14007 * src/output.c (output_parser): Compute the `#line' lines when
14008 there are.
14009 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
14010 Suggested by Hans Aberg.
14011
14012 2000-12-19 Akim Demaille <akim@epita.fr>
14013
14014 Let the handling of the skeleton files be local to the procedures
14015 that use it.
14016
14017 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
14018 longer static.
14019 (fparser, open_extra_files): Remove.
14020 (open_files, output_files): Don't take care of fparser.
14021 * src/files.h: Adjust.
14022 * src/output.c (output_parser): Open and close the file to the
14023 skeleton.
14024 * src/reader.c (read_declarations): When %semantic_parser, open
14025 fguard.
14026
14027 2000-12-19 Akim Demaille <akim@epita.fr>
14028
14029 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
14030 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
14031
14032 2000-12-19 Akim Demaille <akim@epita.fr>
14033
14034 * src/files.c (open_files): Yipee! We no longer need all the code
14035 looking for `/tmp' since we have no tmp file.
14036
14037 2000-12-19 Akim Demaille <akim@epita.fr>
14038
14039 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
14040 New macros.
14041 * src/files.c (open_files): Less dependency on MSDOS etc.
14042
14043 2000-12-14 Akim Demaille <akim@epita.fr>
14044
14045 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
14046 Provide a default definition.
14047 Use it when executing the default @ action.
14048 * src/reader.c (reader_output_yylsp): No longer include
14049 `timestamp' and `text' in the default YYLTYPE.
14050
14051 2000-12-12 Akim Demaille <akim@epita.fr>
14052
14053 * src/reader.c (copy_definition, parse_union_decl, copy_action)
14054 (copy_guard): Quote the file names.
14055 Reported by Laurent Mascherpa.
14056
14057 2000-12-12 Akim Demaille <akim@epita.fr>
14058
14059 * src/output.c (output_headers, output_program, output): Be sure
14060 to escape special characters when outputting filenames.
14061 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
14062 (output_headers): Don't depend on them, Use ACTSTR.
14063
14064 2000-11-17 Akim Demaille <akim@epita.fr>
14065
14066 * lib/obstack.h: Formatting changes.
14067 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
14068 prevents type checking.
14069 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
14070 cast the value to (void *): assigning a `foo *' to a `void *'
14071 variable is valid.
14072 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
14073 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
14074 append characters.
14075
14076 2000-11-17 Akim Demaille <akim@epita.fr>
14077
14078 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
14079 as...
14080 (suite.m4, regression.m4, calc.m4): these.
14081 * tests/atgeneral.m4: Update from CVS Autoconf.
14082
14083 2000-11-17 Akim Demaille <akim@epita.fr>
14084
14085 * tests/regression.m4 (%union and --defines): New test,
14086 demonstrating a current bug in the obstack implementation.
14087
14088 2000-11-17 Akim Demaille <akim@epita.fr>
14089
14090 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
14091 macros.
14092 Use them to declare the variables which are global or local to
14093 `yyparse'.
14094
14095 2000-11-17 Akim Demaille <akim@epita.fr>
14096
14097 * acconfig.h: Remove, no longer used.
14098
14099 2000-11-07 Akim Demaille <akim@epita.fr>
14100
14101 * src: s/Copyright (C)/Copyright/g.
14102
14103 2000-11-07 Akim Demaille <akim@epita.fr>
14104
14105 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
14106 defining.
14107 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
14108
14109 2000-11-07 Akim Demaille <akim@epita.fr>
14110
14111 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
14112 Merge in a single CPP if/else.
14113
14114 2000-11-07 Akim Demaille <akim@epita.fr>
14115
14116 * src/output.c (output): Remove useless variables.
14117 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
14118 argument `data' for consistency with the prototypes.
14119 Qualify it `const'.
14120 (obstack_copy, obstack_copy0): Rename the second argument as
14121 `address' for consistency. Qualify it `const'.
14122 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
14123 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
14124 `const' their input argument (`data' or `address').
14125 Adjust the corresponding macros to include `const' in casts.
14126
14127 2000-11-03 Akim Demaille <akim@epita.fr>
14128
14129 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
14130 s/PFILE1/BISON_HAIRY/.
14131 Adjust dependencies.
14132
14133 2000-11-03 Akim Demaille <akim@epita.fr>
14134
14135 For some reason, this was not applied.
14136
14137 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
14138 `unlink': it's no longer used.
14139
14140 2000-11-03 Akim Demaille <akim@epita.fr>
14141
14142 * src/files.c (skeleton_find): New function, eved out of...
14143 (open_files, open_extra_files): here.
14144
14145 2000-11-03 Akim Demaille <akim@epita.fr>
14146
14147 Don't use `atexit'.
14148
14149 * src/files.c (obstack_save): New function.
14150 (done): Rename as...
14151 (output_files): this.
14152 Use `obstack_save'.
14153 * src/main.c (main): Don't use `atexit' to register `done', since
14154 it no longer has to remove tmp files, just call `output_files'
14155 when there are no errors.
14156
14157 2000-11-02 Akim Demaille <akim@epita.fr>
14158
14159 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
14160 `unlink': it's no longer used.
14161 * src/files.h: Formatting changes.
14162
14163 2000-11-02 Akim Demaille <akim@epita.fr>
14164
14165 Remove the last uses of mktemp and unlink/delete.
14166
14167 * src/files.c (fdefines, ftable): Removed.
14168 (defines_ostack, table_obstack): New.
14169 Adjust dependencies of the former into uses of the latter.
14170 * src/output.c (output_short_or_char_table, output_short_table):
14171 Convert to using obstacks.
14172 * src/reader.c (copy_comment2): Accept one FILE * and two
14173 obstacks.
14174 (output_token_defines, reader_output_yylsp): Use obstacks.
14175 * src/system.h (obstack_fgrow3): New.
14176 * po/POTFILES.in: Adjust.
14177
14178 2000-11-01 Akim Demaille <akim@epita.fr>
14179
14180 Change each use of `fattrs' into a use of `attrs_obstack'.
14181
14182 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
14183 * src/files.c (fattrs): Remove.
14184 (attrs_obstack): New.
14185 Adjust all dependencies.
14186 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
14187
14188 2000-11-01 Akim Demaille <akim@epita.fr>
14189
14190 Introduce obstacks.
14191 Change each use of `faction' into a use of `action_obstack'.
14192
14193 * lib/obstack.h, lib/obstack.c: New files.
14194 * src/files.c (faction): Remove.
14195 (action_obstack): New.
14196 Adjust all dependencies.
14197
14198 2000-10-20 Akim Demaille <akim@epita.fr>
14199
14200 * lib/quote.h (PARAMS): New macro. Use it.
14201
14202 2000-10-16 Akim Demaille <akim@epita.fr>
14203
14204 * src/output.c (output_short_or_char_table): New function.
14205 (output_short_table, output_token_translations): Use it.
14206 (goto_actions): Use output_short_table.
14207
14208 2000-10-16 Akim Demaille <akim@epita.fr>
14209
14210 * src/symtab.c (bucket_new): New function.
14211 (getsym): Use it.
14212
14213 * src/output.c (output_short_table): New argument to display the
14214 comment associated with the table.
14215 Adjust dependencies.
14216 (output_gram): Use it.
14217 (output_rule_data): Nicer output layout for YYTNAME.
14218
14219 2000-10-16 Akim Demaille <akim@epita.fr>
14220
14221 * src/lex.c (read_typename): New function.
14222 (lex): Use it.
14223 * src/reader.c (copy_dollar): Likewise.
14224
14225 2000-10-16 Akim Demaille <akim@epita.fr>
14226
14227 * src/reader.c (copy_comment2): Expect the input stream to be on
14228 the `/' which is suspected to open a comment, instead of being
14229 called after `//' or `/*' was read.
14230 (copy_comment, copy_definition, parse_union_decl, copy_action)
14231 (copy_guard): Adjust.
14232
14233 2000-10-16 Akim Demaille <akim@epita.fr>
14234
14235 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
14236 `read_signed_integer'.
14237
14238 2000-10-16 Akim Demaille <akim@epita.fr>
14239
14240 * src/reader.c (copy_dollar): New function.
14241 (copy_guard, copy_action): Use it.
14242
14243 2000-10-16 Akim Demaille <akim@epita.fr>
14244
14245 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
14246 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
14247 New files, from Fileutils 4.0.27.
14248 * src/main.c (printable_version): Remove.
14249 * src/lex.c, src/reader.c: Use `quote'.
14250
14251 2000-10-04 Akim Demaille <akim@epita.fr>
14252
14253 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
14254
14255 2000-10-04 Akim Demaille <akim@epita.fr>
14256
14257 * doc/bison.texinfo: Various typos spotted by Neil Booth.
14258
14259 2000-10-04 Akim Demaille <akim@epita.fr>
14260
14261 When a literal string is used to define two different tokens,
14262 `bison -v' segfaults.
14263 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
14264
14265 * tests/regression.m4: New file.
14266 Include the core of the sample provided by Piotr Gackiewicz.
14267 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
14268 properly.
14269
14270 2000-10-04 Akim Demaille <akim@epita.fr>
14271
14272 * src/reader.c (parse_expect_decl): Keep `count' within the size
14273 of `buffer'.
14274 From Neil Booth.
14275
14276 2000-10-02 Paul Eggert <eggert@twinsun.com>
14277
14278 * bison.s1 (yyparse): Assign the default value
14279 unconditionally, to avoid a GCC warning and make the parser a
14280 tad smaller.
14281
14282 2000-10-02 Akim Demaille <akim@epita.fr>
14283
14284 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
14285 options.
14286
14287 2000-10-02 Akim Demaille <akim@epita.fr>
14288
14289 * src/derives.c, src/print.c, src/reduce.c: To ease the
14290 translation, move some `\n' out of the translated strings.
14291
14292 2000-10-02 Akim Demaille <akim@epita.fr>
14293
14294 The location tracking mechanism is precious for parse error
14295 messages. Nevertheless, it is enabled only when `@n' is used in
14296 the grammar, which is a different issue (you can use it in error
14297 message, but not in the grammar per se). Therefore, there should
14298 be another means to enable it.
14299
14300 * src/getargs.c (getargs): Support `--locations'.
14301 (usage): Report it.
14302 * src/getargs.h (locationsflag): Export it.
14303 * src/lex.c (percent_table): Support `%locations'.
14304 * src/reader.c (yylsp_needed): Remove this variable, now replaced
14305 with `locationsflag'.
14306 * doc/bison.texinfo: Document `--locations' and `%locations'.
14307 Sort the options.
14308 * tests/calc.m4: Test it.
14309
14310 For regularity of the names, replace each
14311 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
14312 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
14313 In addition replace each `flag' with `_flag'.
14314
14315 2000-10-02 Akim Demaille <akim@epita.fr>
14316
14317 Also test parse error messages, including with YYERROR_VERBOSE.
14318
14319 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
14320 associative).
14321 Use it to check the computations.
14322 Use it to check `nonassoc' is honored.
14323 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
14324 `--yyerror-verbose'.
14325 (_AT_CHECK_CALC): Adjust to this option.
14326 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
14327
14328 2000-10-02 Akim Demaille <akim@epita.fr>
14329
14330 Test also `--verbose', `--defines' and `--name-prefix'. Testing
14331 the latter demonstrates a flaw in the handling of non debugging
14332 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
14333 was used in order to simplify:
14334
14335 #if YYDEBUG
14336 if (yydebug)
14337 {
14338 ...
14339 }
14340 #endif
14341
14342 into
14343
14344 if (yydebug)
14345 {
14346 ...
14347 }
14348
14349 unfortunately this leads to a CPP conflict when
14350 `--name-prefix=foo' is used since it produces `#define yydebug
14351 foodebug'.
14352
14353 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
14354 (YYDPRINTF): New macro.
14355 Spread its use.
14356 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
14357 the bison options.
14358 Also test `--verbose', `--defines' and `--name-prefix'.
14359
14360 2000-10-02 Akim Demaille <akim@epita.fr>
14361
14362 Improve the readability of the produced parsers.
14363
14364 * src/bison.s1: Formatting changes.
14365 Improve the comment related to the `$' mark.
14366 (yydefault): Don't fall through to `yyresume': `goto' there.
14367 * src/output.c (output_parser): When the `$' is met, skip the end
14368 of its line.
14369 New variable, `number_of_dollar_signs', to check there's exactly
14370 one `$' in the parser skeleton.
14371
14372 2000-10-02 Akim Demaille <akim@epita.fr>
14373
14374 * lib/xstrdup.c: New file, from the fileutils.
14375 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
14376 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
14377 instead of strlen + xmalloc + strcpy.
14378 * src/symtab.c (copys): Remove, use xstrdup instead.
14379
14380 2000-10-02 Akim Demaille <akim@epita.fr>
14381
14382 * src/gram.h (associativity): New enum type which replaces the
14383 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
14384 `right_assoc', `left_assoc' and `non_assoc'.
14385 Adjust all dependencies.
14386 * src/reader.c: Formatting changes.
14387 (LTYPESTR): Don't define it, use it as a literal in
14388 `reader_output_yylsp'.
14389 * src/symtab.h (symbol_class): New enum type which replaces the
14390 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
14391 `sunknown', `stoken and `snterm'.
14392
14393 2000-10-02 Akim Demaille <akim@epita.fr>
14394
14395 * src/getargs.c (fixed_outfiles): Rename as...
14396 (yaccflag): for consistency and accuracy.
14397 Adjust dependencies.
14398
14399 2000-10-02 Akim Demaille <akim@epita.fr>
14400
14401 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
14402 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
14403 difficult and introduced a lot of core dump. It turns out that
14404 Bison used an implementation of `xmalloc' based on `calloc', and
14405 at various places it does depend upon the initialization to 0. I
14406 have not tried to isolate the pertinent places, and all the former
14407 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
14408 someone should address this issue.
14409
14410 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
14411 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
14412 files.
14413 Adjust dependencies.
14414 * src/warshall.h: New file.
14415 Propagate.
14416
14417 2000-10-02 Akim Demaille <akim@epita.fr>
14418
14419 Various anti-`extern in *.c' changes.
14420
14421 * src/system.h: Include `assert.h'.
14422
14423 2000-10-02 Akim Demaille <akim@epita.fr>
14424
14425 * src/state.h (nstates, final_state, first_state, first_shift)
14426 (first_reduction): Move their exportation from here...
14427 * src/LR0.h: to here.
14428 Adjust dependencies.
14429 * src/getargs.c (statisticsflag): New variable.
14430 Add support for `--statistics'.
14431 Adjust dependencies.
14432
14433 Remove a lot of now useless `extern' statements in most files.
14434
14435 2000-10-02 Akim Demaille <akim@epita.fr>
14436
14437 * src/LR0.h: New file.
14438 Propagate its use.
14439
14440 2000-10-02 Akim Demaille <akim@epita.fr>
14441
14442 * src/print.h: New file.
14443 Propagate its use.
14444 * src/print.c: Formatting and ordering changes.
14445 (verbose, terse): Replace with...
14446 (print_results): this new function.
14447 Adjust dependencies.
14448
14449 2000-10-02 Akim Demaille <akim@epita.fr>
14450
14451 * src/conflicts.c (conflict_report): New function.
14452 (conflict_log, verbose_conflict_log): Replace with...
14453 (print_conflicts): this function.
14454 Adjust dependencies.
14455 * src/conflicts.h: New file.
14456 Propagate its inclusion.
14457
14458 2000-10-02 Akim Demaille <akim@epita.fr>
14459
14460 * src/nullable.h: New file.
14461 Propagate its inclusion.
14462 * src/nullable.c: Formatting changes.
14463
14464 2000-10-02 Akim Demaille <akim@epita.fr>
14465
14466 * src/reduce.h: New file.
14467 Propagate its inclusion.
14468 * src/reduce.c: Topological sort and other formatting changes.
14469 (bool, TRUE, FALSE): Move their definition to...
14470 * src/system.h: here.
14471
14472 2000-10-02 Akim Demaille <akim@epita.fr>
14473
14474 * src/files.c: Formatting changes.
14475 (tryopen, tryclose, openfiles): Rename as...
14476 (xfopen, xfclose, open_files): this.
14477 (stringappend): static.
14478 * src/files.h: Complete the list of exported symbols.
14479 Propagate its use.
14480
14481 2000-10-02 Akim Demaille <akim@epita.fr>
14482
14483 * src/reader.h: New file.
14484 Propagate its use instead of tedious list of `extern' and
14485 prototypes.
14486 * src/reader.c: Formatting changes, topological sort,
14487 s/register//.
14488
14489 2000-10-02 Akim Demaille <akim@epita.fr>
14490
14491 * src/lex.h: Prototype `lex.c' exported functions.
14492 * src/reader.c: Adjust.
14493 * src/lex.c: Formatting changes.
14494 (safegetc): Rename as...
14495 (xgetc): this.
14496
14497 2000-10-02 Akim Demaille <akim@epita.fr>
14498
14499 * src/lalr.h: New file.
14500 Propagate its inclusion instead of prototypes and `extern'.
14501 * src/lalr.c: Formatting changes, topological sorting etc.
14502
14503 2000-10-02 Akim Demaille <akim@epita.fr>
14504
14505 * src/output.c (token_actions): Introduce a temporary array,
14506 YYDEFACT, that makes it possible for this function to use
14507 output_short_table.
14508
14509 2000-10-02 Akim Demaille <akim@epita.fr>
14510
14511 `user_toknums' is output as a `short[]' in `output.c', while it is
14512 defined as a `int[]' in `reader.c'. For consistency with the
14513 other output tables, `user_toknums' is now defined as a table of
14514 shorts.
14515
14516 * src/reader.c (user_toknums): Be a short table instead of an int
14517 table.
14518 Adjust dependencies.
14519
14520 Factor the short table outputs.
14521
14522 * src/output.c (output_short_table): New function.
14523 * src/output.c (output_gram, output_stos, output_rule_data)
14524 (output_base, output_table, output_check): Use it.
14525
14526 2000-10-02 Akim Demaille <akim@epita.fr>
14527
14528 * src/output.c (output): Topological sort of the functions, in
14529 order to get rid of the `static' prototypes.
14530 No longer use `register'.
14531 * src/output.h: New file.
14532 Propagate its inclusion in files explicitly prototyping functions
14533 from output.c.
14534
14535 2000-09-21 Akim Demaille <akim@epita.fr>
14536
14537 * src/atgeneral.m4: Update from Autoconf.
14538
14539 2000-09-21 Akim Demaille <akim@epita.fr>
14540
14541 * src/closure.h: New file.
14542 * src/closure.c: Formatting changes, topological sort over the
14543 functions, use of closure.h.
14544 (initialize_closure, finalize_closure): Rename as...
14545 (new_closure, free_closure): these. Adjust dependencies.
14546 * src/LR0.c: Formatting changes, topological sort, use of
14547 cloture.h.
14548 (initialize_states): Rename as...
14549 (new_states): this.
14550 * src/Makefile.am (noinst_HEADERS): Adjust.
14551
14552 2000-09-20 Akim Demaille <akim@epita.fr>
14553
14554 * src/acconfig.h: Don't protect config.h against multiple
14555 inclusion.
14556 Don't define PARAMS.
14557 * src/system.h: Define PARAMS.
14558 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
14559 purpose of config.h. system.h must not try to fix wrong
14560 definitions in config.h.
14561
14562 2000-09-20 Akim Demaille <akim@epita.fr>
14563
14564 * src/derives.h: New file.
14565 * src/main.c, src/derives.h: Use it.
14566 Formatting changes.
14567 * src/Makefile.am (noinst_HEADERS): Adjust.
14568
14569 2000-09-20 Akim Demaille <akim@epita.fr>
14570
14571 * tests/atgeneral.m4: Update from Autoconf.
14572 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
14573 (AT_CHECK_CALC): New macros.
14574 Use these macros to test bison with options `', `--raw',
14575 `--debug', `--yacc', `--yacc --debug'.
14576
14577 2000-09-19 Akim Demaille <akim@epita.fr>
14578
14579 * src/output.c: Formatting changes.
14580 * src/machine.h: Remove, leaving its contents in...
14581 * src/system.h: here.
14582 Include stdio.h.
14583 Adjust all dependencies on stdio.h and machine.h.
14584 * src/getargs.h: New file.
14585 Let all `extern' declarations about getargs.c be replaced with
14586 inclusion of `getargs.h'.
14587 * src/Makefile.am (noinst_HEADERS): Adjust.
14588
14589 * tests/calc.m4 (yyin): Be initialized in main, not on the global
14590 scope.
14591 (yyerror): Returns void, not int.
14592 * doc/bison.texinfo: Formatting changes.
14593
14594 2000-09-19 Akim Demaille <akim@epita.fr>
14595
14596 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
14597 portable.
14598
14599 2000-09-18 Akim Demaille <akim@epita.fr>
14600
14601 * configure.in: Append WARNING_CFLAGS to CFLAGS.
14602 * src/Makefile.am (INCLUDES): Don't.
14603 Be ready to fetch headers in lib/.
14604
14605 2000-09-18 Akim Demaille <akim@epita.fr>
14606
14607 * doc/bison.texinfo: Update the copyright.
14608 ANSIfy and GNUify the examples.
14609 Remove the old menu.
14610
14611 2000-09-18 Akim Demaille <akim@epita.fr>
14612
14613 First set of tests: use the `calc' example from the documentation.
14614
14615 * src/bison.s1 (yyparse): Condition the code using `yytname' which
14616 is defined only when YYDEBUG is.
14617 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
14618 * src/files.c (tryopen, tryclose): Formatting changes.
14619 Move to the top and be static.
14620 * src/reader.c (read_signed_integer): Likewise.
14621 * tests/calc.m4: New file.
14622 * Makefile.am, suite.m4: Adjust.
14623 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
14624
14625 2000-09-18 Akim Demaille <akim@epita.fr>
14626
14627 Add support for an Autotest test suite for Bison.
14628
14629 * m4/m4.m4, m4/atconfig.m4: New files.
14630 * m4/Makefile.am (EXTRA_DIST): Adjust.
14631 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
14632 files.
14633 * src/getargs.c: Display a more standard --version message.
14634 * src/reader.c (reader): Formatting changes.
14635 No longer depend upon VERSION_STRING.
14636 * configure.in: No longer use `dnl'.
14637 Set up the test suite and the new directory `tests/.
14638 (VERSION_STRING): Remove.
14639
14640 2000-04-14 Akim Demaille <akim@epita.fr>
14641
14642 * src/reader.c (copy_comment2): New function, same as former
14643 `copy_comment', but outputs into two FILE *.
14644 (copy_comment): Use it.
14645 (parse_union_decl): Use it.
14646 (get_type, parse_start_decl): Use the same `invalid' message.
14647 (parse_start_decl, parse_union_decl): Use the same `multiple'
14648 message.
14649 (parse_union_decl, copy_guard, copy_action): Use the same
14650 `unmatched' message.
14651 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
14652
14653 2000-03-31 Akim Demaille <akim@epita.fr>
14654
14655 * src/files.c (tryopen, tryclose): Move to the top.
14656 Be static.
14657
14658 2000-03-31 Akim Demaille <akim@epita.fr>
14659
14660 * src/main.c (main): Don't call `done', exit does it.
14661
14662 2000-03-31 Akim Demaille <akim@epita.fr>
14663
14664 * allocate.c: s/return (foo)/return foo/.
14665 * lalr.c: Likewise.
14666 * LR0.c: Likewise.
14667 * output.c: Likewise.
14668 * reader.c: Likewise.
14669 * symtab.c: Likewise.
14670 * vmsgetargs.c: Likewise.
14671
14672 2000-03-31 Akim Demaille <akim@epita.fr>
14673
14674 Clean up the error reporting functions.
14675
14676 * src/report.c: New file.
14677 * src/report.h: Likewise.
14678 * src/Makefile.am: Adjust.
14679 * m4/error.m4: New file.
14680 * m4/Makefile.am: Adjust.
14681 * configure.in (jm_PREREQ_ERROR): Call it.
14682 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
14683 Remove.
14684 (fatal, fatals): Remove. All callers use complain.c::fatal.
14685 (warn, warni, warns, warnss, warnss): Remove. All callers use
14686 complain.c::complain.
14687 (toomany): Remove, use fatal instead.
14688 * src/files.c (done): No argument, use complain_message_count.
14689 * src/main.c (main): Register `done' to `atexit'.
14690
14691 * src/getargs.c (usage): More `fputs', less `fprintf'.
14692
14693 2000-03-28 Akim Demaille <akim@epita.fr>
14694
14695 * lib/: New directory.
14696 * Makefile.am (SUBDIRS): Adjust.
14697 * configure.in: Adjust.
14698 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
14699 useless.
14700 * src/alloca.c: Moved to lib/.
14701 * src/getopt.c: Likewise.
14702 * src/getopt1.c: Likewise.
14703 * src/getopt.h: Likewise.
14704 * src/ansi2knr.c: Likewise.
14705 * src/ansi2knr.1: Likewise.
14706 * src/Makefile.am: Adjust.
14707 * lib/Makefile.am: New file.
14708
14709 2000-03-28 Akim Demaille <akim@epita.fr>
14710
14711 * src/getargs.c (usage): Refresh the help message.
14712
14713 2000-03-17 Akim Demaille <akim@epita.fr>
14714
14715 * src/getopt1.c: Updated from textutils 2.0e
14716 * src/getopt.c: Likewise.
14717 * src/getopt.h: Likewise.
14718
14719 2000-03-17 Akim Demaille <akim@epita.fr>
14720
14721 * src/Makefile.am (bison.simple): Fix the awk program: quote only
14722 the file name, not the whole `#line LINE FILE'.
14723
14724 2000-03-17 Akim Demaille <akim@epita.fr>
14725
14726 On syntax errors, report the token on which we choked.
14727
14728 * src/bison.s1 (yyparse): In the label yyerrlab, when
14729 YYERROR_VERBOSE, add yychar in msg.
14730
14731 2000-03-17 Akim Demaille <akim@epita.fr>
14732
14733 * src/reader.c (copy_at): New function.
14734 (copy_guard): Use it.
14735 (copy_action): Use it.
14736
14737 2000-03-17 Akim Demaille <akim@epita.fr>
14738
14739 Be kind to translators, save some useless translations.
14740
14741 * src/main.c (banner): New function.
14742 (fatal_banner): Use it.
14743 (warn_banner): Use it.
14744
14745 2000-03-17 Akim Demaille <akim@epita.fr>
14746
14747 * src/reader.c (copy_definition): Use copy_string and
14748 copy_comment. Removed now unused `match', `ended',
14749 `cplus_comment'.
14750 (copy_comment, copy_string): Moved, to be visible from
14751 copy_definition.
14752
14753 2000-03-17 Akim Demaille <akim@epita.fr>
14754
14755 * src/reader.c (copy_string): Declare `static inline'. No
14756 problems with inline, since it is checked by configure.
14757 (copy_comment): Likewise.
14758
14759 2000-03-17 Akim Demaille <akim@epita.fr>
14760
14761 * src/reader.c (packsymbols): Formatting changes.
14762
14763 2000-03-17 Akim Demaille <akim@epita.fr>
14764
14765 * src/reader.c (copy_comment): New function, factored out from:
14766 (copy_action): Use it. Removed now unused `match', `ended',
14767 `cplus_comment'.
14768 (copy_guard): Likewise.
14769
14770 2000-03-17 Akim Demaille <akim@epita.fr>
14771
14772 * src/reader.c (copy_string): New function, factored out from:
14773 (copy_action): Use it.
14774 (copy_guard): Likewise.
14775
14776 2000-03-17 Akim Demaille <akim@epita.fr>
14777
14778 Change the handling of @s so that they behave exactly like $s.
14779 There is now a pseudo variable @$ (readble and writable), location
14780 of the lhs of the rule (by default ranging from the location of
14781 the first symbol of the rhs, to the location of the last symbol,
14782 or, if the rhs is empty, YYLLOC).
14783
14784 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
14785 yyval.
14786 (yyparse): When providing a default semantic action, provide a
14787 default location action.
14788 (after the $): No longer change `*YYLSP', just stack YYLOC the
14789 same way you stack YYVAL.
14790 * src/reader.c (read_declarations): Use warns.
14791 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
14792 (copy_action, case '@'): Likewise.
14793 Use a standard error message, to save useless work from
14794 translators.
14795
14796 2000-03-17 Akim Demaille <akim@epita.fr>
14797
14798 * src/bison.s1: Formatting and cosmetics changes.
14799 * src/reader.c: Likewise.
14800 Update the Copyright notice.
14801
14802 2000-03-17 Akim Demaille <akim@epita.fr>
14803
14804 * src/bison.s1 (#line): All set to `#line' only, since the
14805 Makefile now handles them.
14806
14807 2000-03-16 Akim Demaille <akim@epita.fr>
14808
14809 * src/output.c (output_rule_data): Output the documentation of
14810 some of the tables.
14811 (Copyright notice): Update.
14812 Formatting changes.
14813
14814 2000-03-16 Akim Demaille <akim@epita.fr>
14815
14816 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
14817 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
14818 One `#if YYDEBUG' remains, since it uses variables which are
14819 defined only if `YYDEBUG != 0'.
14820
14821 2000-03-16 Akim Demaille <akim@epita.fr>
14822
14823 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
14824 and related variables so that the similarities are highlighted.
14825
14826 2000-03-16 Akim Demaille <akim@epita.fr>
14827
14828 * src/bison.s1: Properly indent CPP directives.
14829
14830 2000-03-16 Akim Demaille <akim@epita.fr>
14831
14832 * src/bison.s1: Properly indent the `alloca' CPP section.
14833
14834 2000-03-16 Akim Demaille <akim@epita.fr>
14835
14836 Do not hard code values of directories in `configure.in'.
14837 Update the `configure' tool chain.
14838
14839 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
14840 src/makefile.am.
14841 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
14842 (AC_OUTPUT): Add m4/Makefile.
14843 Bump to bison 1.28a, 1.29 has never been released.
14844 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
14845 handled via src/Makefile.am.
14846 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
14847 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
14848 autoheader.
14849 * Makefile.am (SUBDIRS): Add m4.
14850 (ACLOCAL_AM_FLAGS): New variable.
14851 (AUTOMAKE_OPTIONS): Add check-news.
14852 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
14853 the proper line number and file name.
14854 (DEFS): Propagate the location of bison library files and of the
14855 locale files.
14856 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
14857 builddir.
14858 * acinclude.m4: Remove, replaced by the directory m4.
14859 * m4/Makefile.am (EXTRA_DIST): New variable.
14860 * m4/gettext.m4: New file, from the fileutils.
14861 * m4/lcmessage.m4: Likewise
14862 * m4/progtest.m4: Likewise.
14863 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
14864
14865 2000-03-10 Akim Demaille <akim@epita.fr>
14866
14867 * src/closure.c:
14868 Formatting changes of various comments.
14869 Respect the GNU coding standards at various places.
14870 Don't use `_()' when no translation is needed.
14871
14872 1999-12-13 Jesse Thilo <jthilo@gnu.org>
14873
14874 * src/files.c:
14875 OS/2 honors TMPDIR environment variable.
14876
14877 1999-12-13 Jesse Thilo <jthilo@gnu.org>
14878
14879 * doc/bison.texinfo: Tweaked spelling and grammar.
14880 Updated ISBN.
14881 Removed reference to price of printed copy.
14882 Mention BISON_SIMPLE and BISON_HAIRY.
14883
14884 1999-12-13 Jesse Thilo <jthilo@gnu.org>
14885
14886 * configure.in, NEWS:
14887 Bison 1.29 released.
14888
14889 1999-10-27 Jesse Thilo <jthilo@gnu.org>
14890
14891 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
14892 Added reference card.
14893
14894 1999-07-26 Jesse Thilo <jthilo@gnu.org>
14895
14896 * po/ru.po: Added Russian translation.
14897
14898 1999-07-26 Jesse Thilo <jthilo@gnu.org>
14899
14900 * configure.in: Added Russian translation.
14901
14902 1999-07-06 Jesse Thilo <jthilo@gnu.org>
14903
14904 * configure.in, NEWS, README:
14905 Released version 1.28.
14906
14907 1999-06-14 Jesse Thilo <jthilo@gnu.org>
14908
14909 * src/system.h:
14910 Squashed redefinition warning on some systems.
14911
14912 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
14913 Have configure build version string instead of relying on ANSI string
14914 concatentation.
14915
14916 1999-06-14 Jesse Thilo <jthilo@gnu.org>
14917
14918 * po/POTFILES.in: Got rid of version.c.
14919
14920 1999-06-14 Jesse Thilo <jthilo@gnu.org>
14921
14922 * acconfig.h, configure.in:
14923 Have configure build version string instead of relying on ANSI string
14924 concatentation.
14925
14926 1999-06-08 Jesse Thilo <jthilo@gnu.org>
14927
14928 * doc/bison.1:
14929 Dropped mention of `+' for long-named options.
14930
14931 1999-05-30 Jesse Thilo <jthilo@gnu.org>
14932
14933 * src/files.c: Added <unistd.h> for unlink().
14934
14935 * src/Makefile.am, src/system.h:
14936 I18n fixes.
14937
14938 1999-05-30 Jesse Thilo <jthilo@gnu.org>
14939
14940 * README: Added a FAQ list.
14941
14942 * configure.in, acconfig.h:
14943 I18n fixes.
14944
14945 1999-05-30 Jesse Thilo <jthilo@gnu.org>
14946
14947 * doc/FAQ, doc/Makefile.am:
14948 Added a FAQ list.
14949
14950 1999-05-19 Jesse Thilo <jthilo@gnu.org>
14951
14952 * src/alloc.h, src/symtab.h, src/version.c:
14953 Protected inclusion of "config.h" with HAVE_CONFIG_H.
14954
14955 1999-04-18 Jesse Thilo <jthilo@gnu.org>
14956
14957 * src/.cvsignore, src/Makefile.am:
14958 Reorganized: sources in `src', documentation in `doc'.
14959
14960 * src/lex.c (literalchar):
14961 fixed the code for escaping double quotes (thanks
14962 Jonathan Czisny.)
14963
14964 1999-04-18 Jesse Thilo <jthilo@gnu.org>
14965
14966 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
14967 Adjusted paths to reflect directory reorganization.
14968
14969 1999-04-18 Jesse Thilo <jthilo@gnu.org>
14970
14971 * doc/.cvsignore, doc/Makefile.am:
14972 Reorganized: sources in `src', documentation in `doc'.
14973
14974 1999-04-18 Jesse Thilo <jthilo@gnu.org>
14975
14976 * configure.in:
14977 Updated AC_INIT file to reflect directory reorganization.
14978
14979 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
14980 Reorganized: sources in `src', documentation in `doc'.
14981
14982 1999-04-13 Jesse Thilo <jthilo@gnu.org>
14983
14984 * src/allocate.c:
14985 Don't declare calloc() and realloc() if not necessary.
14986
14987 1999-04-13 Jesse Thilo <jthilo@gnu.org>
14988
14989 * configure.in, acconfig.h, acinclude.m4:
14990 Don't declare calloc() and realloc() if not necessary.
14991
14992 1999-03-23 Jesse Thilo <jthilo@gnu.org>
14993
14994 * po/.cvsignore: Added i18n support.
14995
14996 1999-03-23 Jesse Thilo <jthilo@gnu.org>
14997
14998 * acconfig.h, configure.in, Makefile.am:
14999 Added i18n support.
15000
15001 1999-03-22 Jesse Thilo <jthilo@gnu.org>
15002
15003 * src/bison.s1: Fixed #line numbers.
15004
15005 1999-03-15 Jesse Thilo <jthilo@gnu.org>
15006
15007 * po/es.po, po/fr.po, po/nl.po, po/de.po:
15008 Added PO files from Translation Project.
15009
15010 1999-03-03 Jesse Thilo <jthilo@gnu.org>
15011
15012 * Makefile.am:
15013 Added support for non-ANSI compilers (ansi2knr).
15014
15015 1999-02-16 Jesse Thilo <jthilo@gnu.org>
15016
15017 * configure.in: Bumped version number to 1.27.
15018
15019 * Makefile.am:
15020 Added `bison.simple' to list of files removed by `make distclean'.
15021
15022 1999-02-12 Jesse Thilo <jthilo@gnu.org>
15023
15024 * src/files.c, src/files.h:
15025 Defined locations of parser files in config.h instead of Makefile.
15026
15027 1999-02-12 Jesse Thilo <jthilo@gnu.org>
15028
15029 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
15030 Defined locations of parser files in config.h instead of Makefile.
15031
15032 1999-02-09 Jesse Thilo <jthilo@gnu.org>
15033
15034 * Makefile.am:
15035 Removed inappropriate use of $< macro.
15036
15037 1999-02-05 Jesse Thilo <jthilo@gnu.org>
15038
15039 * po/Makefile.in.in, po/POTFILES.in:
15040 Add `po' directory skeleton.
15041
15042 1999-01-27 Jesse Thilo <jthilo@gnu.org>
15043
15044 * README: Document help-bison list.
15045
15046 * configure.in: Add check for mkstemp().
15047
15048 1999-01-20 Jesse Thilo <jthilo@gnu.org>
15049
15050 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
15051 Hush a few compiler warnings.
15052
15053 * src/files.c:
15054 Add tryclose(), which verifies that fclose was successful.
15055 Hush a couple of compiler warnings.
15056
15057 1999-01-20 Jesse Thilo <jthilo@gnu.org>
15058
15059 * Makefile.am, OChangeLog:
15060 ChangeLog is now automatically generated. Include the old version as
15061 OChangeLog.
15062
15063 1999-01-14 Jesse Thilo <jthilo@gnu.org>
15064
15065 * 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:
15066 Update FSF address.
15067
15068 1999-01-14 Jesse Thilo <jthilo@gnu.org>
15069
15070 * doc/bison.texinfo: Fix formatting glitch.
15071
15072 * doc/bison.texinfo: Update FSF address.
15073
15074 1999-01-14 Jesse Thilo <jthilo@gnu.org>
15075
15076 * acconfig.h: Update FSF address.
15077
15078 1999-01-08 Jesse Thilo <jthilo@gnu.org>
15079
15080 * src/system.h:
15081 Don't define PACKAGE here, since config.h defines it.
15082
15083 1998-12-30 Jesse Thilo <jthilo@gnu.org>
15084
15085 * src/reader.c: Update copyright date.
15086
15087 * src/main.c:
15088 Ditch sprintf to statically-sized buffers in fatal/warn functions in
15089 favor of output directly to stderr (avoids buffer overruns).
15090
15091 * src/reader.c: Some checks for premature EOF.
15092
15093 * 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:
15094 Use prototypes if the compiler understands them.
15095
15096 * src/files.c: Honor TMPDIR on Unix hosts.
15097 Use prototypes if the compiler understands them.
15098
15099 * src/reader.c:
15100 Fix a couple of buffer overrun bugs.
15101 Use prototypes if the compiler understands them.
15102
15103 * src/system.h: Include unistd.h and ctype.h.
15104 Use #ifdef instead of #if for NLS symbols.
15105
15106 1998-12-30 Jesse Thilo <jthilo@gnu.org>
15107
15108 * doc/bison.texinfo:
15109 Delete comment "consider using @set for edition number, etc..." since
15110 we now are doing so.
15111
15112 1998-12-30 Jesse Thilo <jthilo@gnu.org>
15113
15114 * configure.in:
15115 Use prototypes if the compiler understands them.
15116
15117 * NEWS: Document 1.26 highlights.
15118
15119 * Makefile.am: Require Automake 1.3 or later.
15120
15121 * acconfig.h:
15122 Use prototypes if the compiler understands them.
15123
15124 1998-12-29 Jesse Thilo <jthilo@gnu.org>
15125
15126 * src/version.c:
15127 Use VERSION symbol from automake for version number.
15128
15129 1998-12-29 Jesse Thilo <jthilo@gnu.org>
15130
15131 * acconfig.h, configure.in, version.cin:
15132 Use VERSION symbol from automake for version number.
15133
15134 1998-11-28 Jesse Thilo <jthilo@gnu.org>
15135
15136 * Makefile.am:
15137 Distribute original version of simple parser (bison.s1), not built
15138 version (bison.simple).
15139
15140 1998-11-28 Jesse Thilo <jthilo@gnu.org>
15141
15142 * doc/bison.texinfo: Add info dir entry.
15143
15144 * doc/bison.texinfo:
15145 Let automake put version number into documentation.
15146
15147 1998-11-26 Jesse Thilo <jthilo@gnu.org>
15148
15149 * src/bison.cld, src/build.com, src/vmshlp.mar:
15150 Add non-RCS files from /gd/gnu/bison.
15151
15152 1998-11-26 Jesse Thilo <jthilo@gnu.org>
15153
15154 * doc/bison.1:
15155 Document the BISON_HAIRY and BISON_SIMPLE variables.
15156
15157 1998-11-25 Jesse Thilo <jthilo@gnu.org>
15158
15159 * src/version.c: Build version.c automatically.
15160
15161 * src/reader.c:
15162 Fix token numbering (used to start at 258, not 257).
15163
15164 * src/system.h: Include config.h.
15165
15166 * src/getargs.c: Update bug report address.
15167
15168 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
15169 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
15170
15171 1998-11-25 Jesse Thilo <jthilo@gnu.org>
15172
15173 * Makefile.am:
15174 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
15175
15176 * configure.in, version.cin:
15177 Build version.c automatically.
15178
15179 * AUTHORS: Add AUTHORS file.
15180
15181 * README: Update bug report address.
15182
15183 * bison.simple:
15184 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
15185
15186 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
15187 Add automake stuff.
15188
15189 1998-11-25 Jesse Thilo <jthilo@gnu.org>
15190
15191 * doc/bison.texinfo: Clean up some formatting.
15192
15193 1998-05-05 Richard Stallman <rms@gnu.org>
15194
15195 * doc/bison.texinfo:
15196 Explain better why to make a pure parser.
15197
15198 1998-01-05 Richard Stallman <rms@gnu.org>
15199
15200 * src/files.c (openfiles):
15201 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
15202 find a temporary directory, if possible. Do not unlink files while
15203 they are open.
15204
15205 1997-08-25 Richard Stallman <rms@gnu.org>
15206
15207 * src/reader.c (stack_offset;):
15208 Change some warni to warns.
15209
15210 * src/lex.c (literalchar): Use warns, not warni.
15211
15212 1997-06-28 Richard Stallman <rms@gnu.org>
15213
15214 * src/bison.s1: Add a Bison version comment.
15215
15216 * src/main.c (fatal, warn, berror):
15217 Use program_name.
15218
15219 1997-06-28 Richard Stallman <rms@gnu.org>
15220
15221 * Makefile.in (bison_version): New variable.
15222 (dist): Use that variable.
15223 (bison.s1): Substitute the Bison version into bison.simple.
15224
15225 * bison.simple: Add a Bison version comment.
15226
15227 1997-06-18 Richard Stallman <rms@gnu.org>
15228
15229 * src/main.c (fatal, warn, berror):
15230 Make error messages standard.
15231 (toomany): Improve error message text.
15232
15233 * 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:
15234 new.h renamed to alloc.h.
15235
15236 1997-06-18 Richard Stallman <rms@gnu.org>
15237
15238 * Makefile.in: new.h renamed to alloc.h.
15239
15240 1997-05-24 Richard Stallman <rms@gnu.org>
15241
15242 * src/lex.c (literalchar):
15243 Fix the code for escaping \, " and '.
15244
15245 (lex): Avoid trouble when there are many chars
15246 to discard in a char literal with just several chars in it.
15247
15248 1997-05-17 Richard Stallman <rms@gnu.org>
15249
15250 * src/bison.s1:
15251 Use malloc, if using alloca is troublesome.
15252 (YYSTACK_USE_ALLOCA): New flag macro.
15253 Define it for some systems and compilers.
15254 (YYSTACK_ALLOC): New macro.
15255 (yyparse): Use YYSTACK_ALLOC to allocate stack.
15256 If it was malloc'd, free it.
15257
15258 1997-05-17 Richard Stallman <rms@gnu.org>
15259
15260 * bison.simple:
15261 Use malloc, if using alloca is troublesome.
15262 (YYSTACK_USE_ALLOCA): New flag macro.
15263 Define it for some systems and compilers.
15264 (YYSTACK_ALLOC): New macro.
15265 (yyparse): Use YYSTACK_ALLOC to allocate stack.
15266 If it was malloc'd, free it.
15267
15268 1997-04-23 Richard Stallman <rms@gnu.org>
15269
15270 * src/bison.s1:
15271 (alloca) [__hpux]: Always define as __builtin_alloca.
15272
15273 1997-04-23 Richard Stallman <rms@gnu.org>
15274
15275 * bison.simple:
15276 (alloca) [__hpux]: Always define as __builtin_alloca.
15277
15278 1997-04-22 Richard Stallman <rms@gnu.org>
15279
15280 * src/bison.s1:
15281 [__hpux]: Include alloca.h (right for HPUX 10)
15282 instead of declaring alloca (right for HPUX 9).
15283
15284 * src/bison.s1 (__yy_memcpy):
15285 Declare arg `count' as unsigned int.
15286 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
15287
15288 1997-04-22 Richard Stallman <rms@gnu.org>
15289
15290 * bison.simple:
15291 [__hpux]: Include alloca.h (right for HPUX 10)
15292 instead of declaring alloca (right for HPUX 9).
15293
15294 * bison.simple (__yy_memcpy):
15295 Declare arg `count' as unsigned int.
15296 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
15297
15298 1997-01-03 Richard Stallman <rms@gnu.org>
15299
15300 * src/allocate.c: [__STDC__ or _MSC_VER]:
15301 Declare calloc and realloc to return void *.
15302
15303 1997-01-02 Richard Stallman <rms@gnu.org>
15304
15305 * src/system.h:
15306 [_MSC_VER]: Include stdlib.h and process.h.
15307 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
15308
15309 * src/main.c (main): Return FAILURE as a value.
15310 (printable_version): Declare arg as int, not char.
15311
15312 1997-01-02 Richard Stallman <rms@gnu.org>
15313
15314 * Makefile.in (dist):
15315 Explicitly check for symlinks, and copy them.
15316
15317 1996-12-19 Richard Stallman <rms@gnu.org>
15318
15319 * src/files.c:
15320 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
15321
15322 1996-12-18 Paul Eggert <eggert@gnu.org>
15323
15324 * src/bison.s1 (yyparse):
15325 If __GNUC__ and YYPARSE_PARAM are both defined,
15326 declare yyparse to have a void * argument.
15327
15328 1996-12-18 Paul Eggert <eggert@gnu.org>
15329
15330 * bison.simple (yyparse):
15331 If __GNUC__ and YYPARSE_PARAM are both defined,
15332 declare yyparse to have a void * argument.
15333
15334 1996-12-17 Richard Stallman <rms@gnu.org>
15335
15336 * src/reduce.c (nbits): Add some casts.
15337
15338 1996-08-12 Richard Stallman <rms@gnu.org>
15339
15340 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
15341
15342 1996-08-12 Richard Stallman <rms@gnu.org>
15343
15344 * bison.simple: Test _MSDOS as well as _MSDOS_.
15345
15346 1996-07-31 Richard Stallman <rms@gnu.org>
15347
15348 * src/bison.s1:
15349 [__sun && __i386]: Include alloca.h.
15350
15351 1996-07-31 Richard Stallman <rms@gnu.org>
15352
15353 * bison.simple:
15354 [__sun && __i386]: Include alloca.h.
15355
15356 1996-07-30 Richard Stallman <rms@gnu.org>
15357
15358 * src/bison.s1: Comment change.
15359
15360 * src/bison.s1: Test _MSDOS_, not MSDOS.
15361
15362 1996-07-30 Richard Stallman <rms@gnu.org>
15363
15364 * bison.simple: Comment change.
15365
15366 * bison.simple: Test _MSDOS_, not MSDOS.
15367
15368 1996-06-01 Richard Stallman <rms@gnu.org>
15369
15370 * 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:
15371 Insert `_' macro around many string constants.
15372
15373 * src/main.c:
15374 Insert `_' macro around many string constants.
15375
15376 (main): Call setlocale, bindtextdomain and textdomain.
15377
15378 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
15379 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
15380 [ENABLE_NLS]: Include libintl.h.
15381 [ENABLE_NLS] (gettext): Define.
15382 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
15383 (N_, PACKAGE, LOCALEDIR): New macros.
15384
15385 1996-06-01 Richard Stallman <rms@gnu.org>
15386
15387 * POTFILES.in: New file.
15388
15389 * Makefile.in (allocate.o):
15390 Define target explicitly.
15391
15392 * Makefile.in (CFLAGS): Set to @CFLAGS@.
15393 (LDFLAGS): Set to @LDFLAGS@.
15394 (configure): Run autoconf only if preceding `cd' succeeds.
15395 (bison.s1): Redirect output to temporary file then move the
15396 temporary to the target, rather than redirecting directly to bison.s1.
15397 (clean): Remove config.status and config.log.
15398 (distclean): Don't remove config.status here.
15399
15400 1996-05-12 Richard Stallman <rms@gnu.org>
15401
15402 * src/bison.s1:
15403 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
15404
15405 1996-05-12 Richard Stallman <rms@gnu.org>
15406
15407 * bison.simple:
15408 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
15409
15410 1996-05-11 Richard Stallman <rms@gnu.org>
15411
15412 * src/bison.s1 (__yy_memcpy):
15413 Really reorder the args, as was supposedly done on Feb 14 1995.
15414 (yyparse): Calls changed accordingly.
15415
15416 1996-05-11 Richard Stallman <rms@gnu.org>
15417
15418 * Makefile.in (dist): Don't use $(srcdir).
15419
15420 * bison.simple (__yy_memcpy):
15421 Really reorder the args, as was supposedly done on Feb 14 1995.
15422 (yyparse): Calls changed accordingly.
15423
15424 1996-01-27 Richard Stallman <rms@gnu.org>
15425
15426 * src/output.c (output_rule_data):
15427 Test YYERROR_VERBOSE in the conditional
15428 around the definition of ttyname.
15429
15430 1995-12-29 Richard Stallman <rms@gnu.org>
15431
15432 * src/bison.s1:
15433 Fix line numbers in #line commands.
15434
15435 1995-12-29 Richard Stallman <rms@gnu.org>
15436
15437 * bison.simple:
15438 Fix line numbers in #line commands.
15439
15440 1995-12-27 Richard Stallman <rms@gnu.org>
15441
15442 * src/bison.s1 (YYPARSE_PARAM_DECL):
15443 In C++, make it always null.
15444 (YYPARSE_PARAM_ARG): New macro.
15445 (yyparse): Use YYPARSE_PARAM_ARG.
15446
15447 1995-12-27 Richard Stallman <rms@gnu.org>
15448
15449 * bison.simple (YYPARSE_PARAM_DECL):
15450 In C++, make it always null.
15451 (YYPARSE_PARAM_ARG): New macro.
15452 (yyparse): Use YYPARSE_PARAM_ARG.
15453
15454 1995-11-29 Richard Stallman <rms@gnu.org>
15455
15456 * doc/bison.texinfo:
15457 Describe literal string tokens, %raw, %no_lines, %token_table.
15458
15459 1995-11-29 Daniel Hagerty <hag@gnu.org>
15460
15461 * doc/bison.texinfo: Fixed update date
15462
15463 1995-10-16 Richard Stallman <rms@gnu.org>
15464
15465 * src/version.c: Version 1.25.
15466
15467 1995-10-16 Richard Stallman <rms@gnu.org>
15468
15469 * NEWS: *** empty log message ***
15470
15471 1995-10-16 Richard Stallman <rms@gnu.org>
15472
15473 * doc/bison.1, doc/bison.rnh:
15474 Add new options.
15475
15476 1995-10-15 Richard Stallman <rms@gnu.org>
15477
15478 * src/vmsgetargs.c, src/getargs.c:
15479 Added -n, -k, and -raw switches.
15480 (noparserflag, toknumflag, rawtoknumflag): New variables.
15481
15482 * src/symtab.h (SALIAS):
15483 New #define for adding aliases to %token.
15484 (struct bucket): Added `alias' field.
15485
15486 * src/reduce.c (reduce_grammar):
15487 Revise error message.
15488 (print_notices): Remove final `.' from error message.
15489
15490 * src/reader.c (reader_output_yylsp):
15491 New function.
15492 (readgram): Use `#if 0' around code that accepted %command
15493 inside grammar rules: The documentation doesn't allow it,
15494 and it will fail since the %command processors scan for the next %.
15495 (parse_token_decl): Extended the %token
15496 declaration to allow a multi-character symbol as an alias.
15497 (parse_thong_decl): New function.
15498 (read_declarations): Added %thong declarations.
15499 (read_declarations): Handle NOOP to deal with allowing
15500 % declarations as another means to specify the flags.
15501 (readgram): Allow %prec prior to semantics embedded in a rule.
15502 (skip_to_char, read_declarations, copy_definition)
15503 (parse_token_decl, parse_start_decl, parse_type_decl)
15504 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
15505 (get_type_name, copy_guard, copy_action, readgram)
15506 (get_type, packsymbols): Revised most error messages.
15507 Changed `fatal' to `warnxxx' to avoid aborting for error.
15508 Revised and use multiple warnxxx functions to avoid using VARARGS1.
15509 (read_declarations): Improve the error message for
15510 an invalid character. Do not abort.
15511 (read_declarations, copy_guard, copy_action): Use
15512 printable_version to avoid unprintable characters in printed output.
15513 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
15514 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
15515 Allow the type of a non-terminal can be given
15516 more than once, as long as all specifications give the same type.
15517
15518 * src/output.c:
15519 (output_headers, output_trailers, output, output_gram)
15520 (output_rule_data): Implement noparserflag variable.
15521 Implement toknumflag variable.
15522 (output): Call reader_output_yylsp to output LTYPESTR.
15523
15524 * src/main.c (main):
15525 If reader sees an error, don't process the grammar.
15526 (fatals): Updated to not use VARARGS1.
15527 (printable_version, int_to_string, warn, warni, warns, warnss)
15528 (warnsss): New error reporting functions. Avoid abort for error.
15529
15530 * src/lex.h:
15531 Added THONG and NOOP for alias processing.
15532 Added SETOPT for the new code that allows setting options with %flags.
15533
15534 * src/lex.c:
15535 Include getopt.h. Add some extern decls.
15536 (safegetc): New function to deal with EOF gracefully.
15537 (literalchar); new function to deal with reading \ escapes.
15538 (lex): Use literalchar.
15539 (lex): Implemented "..." tokens.
15540 (literalchar, lex, parse_percent_token): Made tokenbuffer
15541 always contain the token. This includes growing the token
15542 buffer while reading an integer.
15543 (parse_percent_token): Replaced if-else statement with percent_table.
15544 (parse_percent_token): Added % declarations as another
15545 way to specify the flags -n, -l, and -r. Also added hooks for
15546 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
15547 major changes to files.c.
15548 (lex) Retain in the incoming stream a character following
15549 an incorrect '/'.
15550 (skip_white_space, lex): Revised most error messages
15551 and changed fatal to warn to avoid aborting.
15552 (percent_table): Added %thong declarations.
15553
15554 * src/gram.h: Comment changes.
15555
15556 * src/files.c (openfiles, open_extra_files, done):
15557 Add faction flag
15558 and actfile file. Handle noparserflag. Both for -n switch.
15559
15560 * src/conflicts.c (resolve_sr_conflict):
15561 Remove use of alloca.
15562
15563 1995-06-01 Jim Meyering <meyering@gnu.org>
15564
15565 * doc/bison.texinfo: *** empty log message ***
15566
15567 1995-05-06 Richard Stallman <rms@gnu.org>
15568
15569 * src/bison.s1: Comment change.
15570
15571 1995-05-06 Richard Stallman <rms@gnu.org>
15572
15573 * bison.simple: Comment change.
15574
15575 1995-05-03 Richard Stallman <rms@gnu.org>
15576
15577 * src/version.c: Version now 1.24.
15578
15579 * src/bison.s1: Change distribution terms.
15580
15581 * src/version.c: Version now 1.23.
15582
15583 1995-05-03 Richard Stallman <rms@gnu.org>
15584
15585 * doc/bison.texinfo:
15586 Rewrite "Conditions for Using Bison".
15587 Update version to 1.24.
15588
15589 1995-05-03 Richard Stallman <rms@gnu.org>
15590
15591 * bison.simple: Change distribution terms.
15592
15593 1995-02-23 Richard Stallman <rms@gnu.org>
15594
15595 * src/files.c: Test __VMS_POSIX as well as VMS.
15596
15597 1995-02-14 Jim Meyering <meyering@gnu.org>
15598
15599 * src/bison.s1 (__yy_memcpy):
15600 Renamed from __yy_bcopy to avoid
15601 confusion. Reverse FROM and TO arguments to be consistent with
15602 those of memcpy.
15603
15604 1995-02-14 Jim Meyering <meyering@gnu.org>
15605
15606 * bison.simple (__yy_memcpy):
15607 Renamed from __yy_bcopy to avoid
15608 confusion. Reverse FROM and TO arguments to be consistent with
15609 those of memcpy.
15610
15611 1994-11-10 David J. MacKenzie <djm@gnu.org>
15612
15613 * NEWS: reformat
15614
15615 * NEWS: New file.
15616
15617 * Makefile.in (DISTFILES): Include NEWS.
15618
15619 * Makefile.in (DISTFILES):
15620 Include install-sh, not install.sh.
15621
15622 * configure.in: Update to Autoconf v2 macro names.
15623
15624 1994-10-05 David J. MacKenzie <djm@gnu.org>
15625
15626 * Makefile.in: fix typo
15627
15628 * Makefile.in (prefix, exec_prefix):
15629 Let configure set them.
15630
15631 1994-09-28 David J. MacKenzie <djm@gnu.org>
15632
15633 * Makefile.in: Set datadir to $(prefix)/share.
15634
15635 1994-09-15 Richard Stallman <rms@gnu.org>
15636
15637 * src/bison.s1:
15638 Update copyright notice and GPL version.
15639
15640 1994-09-15 Richard Stallman <rms@gnu.org>
15641
15642 * bison.simple:
15643 Update copyright notice and GPL version.
15644
15645 1994-07-12 Richard Stallman <rms@gnu.org>
15646
15647 * src/reduce.c, src/reader.c:
15648 entered into RCS
15649
15650 1994-05-05 David J. MacKenzie <djm@gnu.org>
15651
15652 * Makefile.in: entered into RCS
15653
15654 1994-03-26 Richard Stallman <rms@gnu.org>
15655
15656 * src/bison.s1: entered into RCS
15657
15658 1994-03-26 Richard Stallman <rms@gnu.org>
15659
15660 * bison.simple: entered into RCS
15661
15662 1994-03-25 Richard Stallman <rms@gnu.org>
15663
15664 * src/main.c: entered into RCS
15665
15666 1994-03-24 Richard Stallman <rms@gnu.org>
15667
15668 * src/conflicts.c: entered into RCS
15669
15670 1994-01-02 Richard Stallman <rms@gnu.org>
15671
15672 * Makefile.in: *** empty log message ***
15673
15674 1993-11-21 Richard Stallman <rms@gnu.org>
15675
15676 * src/bison.s1: *** empty log message ***
15677
15678 1993-11-21 Richard Stallman <rms@gnu.org>
15679
15680 * doc/bison.texinfo: entered into RCS
15681
15682 * doc/bison.texinfo: *** empty log message ***
15683
15684 1993-11-21 Richard Stallman <rms@gnu.org>
15685
15686 * bison.simple: *** empty log message ***
15687
15688 1993-10-25 David J. MacKenzie <djm@gnu.org>
15689
15690 * doc/bison.texinfo: *** empty log message ***
15691
15692 1993-10-19 Richard Stallman <rms@gnu.org>
15693
15694 * src/bison.s1: *** empty log message ***
15695
15696 1993-10-19 Richard Stallman <rms@gnu.org>
15697
15698 * bison.simple: *** empty log message ***
15699
15700 1993-10-14 Richard Stallman <rms@gnu.org>
15701
15702 * src/bison.s1: *** empty log message ***
15703
15704 1993-10-14 Richard Stallman <rms@gnu.org>
15705
15706 * bison.simple: *** empty log message ***
15707
15708 1993-09-14 David J. MacKenzie <djm@gnu.org>
15709
15710 * doc/bison.texinfo: *** empty log message ***
15711
15712 1993-09-13 Noah Friedman <friedman@gnu.org>
15713
15714 * Makefile.in: *** empty log message ***
15715
15716 1993-09-10 Richard Stallman <rms@gnu.org>
15717
15718 * src/conflicts.c: *** empty log message ***
15719
15720 * src/system.h: entered into RCS
15721
15722 1993-09-10 Richard Stallman <rms@gnu.org>
15723
15724 * doc/bison.1: entered into RCS
15725
15726 1993-09-06 Noah Friedman <friedman@gnu.org>
15727
15728 * src/version.c: entered into RCS
15729
15730 1993-09-06 Noah Friedman <friedman@gnu.org>
15731
15732 * Makefile.in: *** empty log message ***
15733
15734 1993-07-30 David J. MacKenzie <djm@gnu.org>
15735
15736 * Makefile.in: *** empty log message ***
15737
15738 1993-07-24 Richard Stallman <rms@gnu.org>
15739
15740 * src/bison.s1: *** empty log message ***
15741
15742 1993-07-24 Richard Stallman <rms@gnu.org>
15743
15744 * bison.simple: *** empty log message ***
15745
15746 1993-07-08 David J. MacKenzie <djm@gnu.org>
15747
15748 * Makefile.in: *** empty log message ***
15749
15750 1993-07-04 Richard Stallman <rms@gnu.org>
15751
15752 * src/bison.s1: *** empty log message ***
15753
15754 1993-07-04 Richard Stallman <rms@gnu.org>
15755
15756 * bison.simple: *** empty log message ***
15757
15758 1993-06-26 David J. MacKenzie <djm@gnu.org>
15759
15760 * src/getargs.c: entered into RCS
15761
15762 1993-06-26 David J. MacKenzie <djm@gnu.org>
15763
15764 * doc/bison.texinfo: *** empty log message ***
15765
15766 * doc/bison.1: New file.
15767
15768 1993-06-25 Richard Stallman <rms@gnu.org>
15769
15770 * src/getargs.c: New file.
15771
15772 1993-06-16 Richard Stallman <rms@gnu.org>
15773
15774 * src/bison.s1: *** empty log message ***
15775
15776 1993-06-16 Richard Stallman <rms@gnu.org>
15777
15778 * bison.simple: *** empty log message ***
15779
15780 1993-06-03 Richard Stallman <rms@gnu.org>
15781
15782 * src/bison.s1: New file.
15783
15784 1993-06-03 Richard Stallman <rms@gnu.org>
15785
15786 * doc/bison.texinfo: *** empty log message ***
15787
15788 1993-06-03 Richard Stallman <rms@gnu.org>
15789
15790 * bison.simple: New file.
15791
15792 1993-05-19 Richard Stallman <rms@gnu.org>
15793
15794 * doc/bison.texinfo: New file.
15795
15796 1993-05-07 Noah Friedman <friedman@gnu.org>
15797
15798 * Makefile.in: *** empty log message ***
15799
15800 1993-04-28 Noah Friedman <friedman@gnu.org>
15801
15802 * src/reader.c: *** empty log message ***
15803
15804 1993-04-23 Noah Friedman <friedman@gnu.org>
15805
15806 * src/alloc.h: entered into RCS
15807
15808 1993-04-20 David J. MacKenzie <djm@gnu.org>
15809
15810 * src/version.c: *** empty log message ***
15811
15812 * src/files.c, src/allocate.c:
15813 entered into RCS
15814
15815 * src/reader.c: *** empty log message ***
15816
15817 * src/lex.c: entered into RCS
15818
15819 * src/conflicts.c: New file.
15820
15821 * src/symtab.c: entered into RCS
15822
15823 * src/alloc.h: New file.
15824
15825 * src/LR0.c: entered into RCS
15826
15827 1993-04-18 Noah Friedman <friedman@gnu.org>
15828
15829 * src/reader.c: New file.
15830
15831 * src/version.c: *** empty log message ***
15832
15833 1993-04-18 Noah Friedman <friedman@gnu.org>
15834
15835 * Makefile.in: *** empty log message ***
15836
15837 1993-04-17 Noah Friedman <friedman@gnu.org>
15838
15839 * Makefile.in: *** empty log message ***
15840
15841 1993-04-15 Richard Stallman <rms@gnu.org>
15842
15843 * src/main.c, src/files.c:
15844 New file.
15845
15846 1993-04-15 Noah Friedman <friedman@gnu.org>
15847
15848 * configure.in: entered into RCS
15849
15850 * configure.in: *** empty log message ***
15851
15852 * configure.in: New file.
15853
15854 1993-04-14 Richard Stallman <rms@gnu.org>
15855
15856 * Makefile.in: New file.
15857
15858 1993-04-13 Richard Stallman <rms@gnu.org>
15859
15860 * src/version.c: New file.
15861
15862 1993-03-25 Richard Stallman <rms@gnu.org>
15863
15864 * src/output.c: entered into RCS
15865
15866 1992-09-25 Richard Stallman <rms@gnu.org>
15867
15868 * configure.bat: entered into RCS
15869
15870 1992-06-22 Richard Stallman <rms@gnu.org>
15871
15872 * src/vmsgetargs.c: entered into RCS
15873
15874 1992-06-22 Richard Stallman <rms@gnu.org>
15875
15876 * doc/bison.rnh: entered into RCS
15877
15878 1992-04-20 David J. MacKenzie <djm@gnu.org>
15879
15880 * README: entered into RCS
15881
15882 1992-01-22 Richard Stallman <rms@gnu.org>
15883
15884 * src/machine.h: entered into RCS
15885
15886 1991-12-21 Richard Stallman <rms@gnu.org>
15887
15888 * src/lalr.c, src/closure.c:
15889 entered into RCS
15890
15891 1991-12-20 Richard Stallman <rms@gnu.org>
15892
15893 * src/state.h: entered into RCS
15894
15895 1991-12-18 Richard Stallman <rms@gnu.org>
15896
15897 * src/print.c, src/nullable.c, src/derives.c:
15898 entered into RCS
15899
15900 1991-11-03 David J. MacKenzie <djm@gnu.org>
15901
15902 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
15903 entered into RCS
15904
15905 1988-09-09 Richard Stallman <rms@gnu.org>
15906
15907 * src/bison.hairy: entered into RCS
15908
15909 1987-12-16 Richard Stallman <rms@gnu.org>
15910
15911 * REFERENCES: entered into RCS
15912
15913
15914 -----
15915
15916 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
15917 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
15918 Software Foundation, Inc.
15919
15920 Copying and distribution of this file, with or without
15921 modification, are permitted provided the copyright notice and this
15922 notice are preserved.