]> git.saurik.com Git - bison.git/blob - ChangeLog
* Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
[bison.git] / ChangeLog
1 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
2
3 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4 shell, not within 'make', so that 'make' by an ordinary builder
5 (using GNU make) does not worry about configuring gzip. This also
6 works around a bug reported independently by Keith Thompson and by
7 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8 stderr rather than stdout, messing up the build logs.
9
10 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
11
12 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
13 to make sure that YYID will never be unused. This fixes a 'make
14 maintainer-check' failure caused by the recent changes to the 'Trivial
15 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
16 not used.
17 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
18
19 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
20
21 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
22 state before an empty RHS is always resolved here. Only the location
23 of that state is guaranteed to be resolved, and that's enough. This
24 fixes the remaining bug reported by Derek M. Jones in
25 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
26 * tests/glr-regression.at (Uninitialized location when reporting
27 ambiguity): Test the above case.
28 Also, the embedded comments in this test case claim it checks the case
29 of an empty RHS that has inherited the initial location. However, the
30 corresponding LHS was already resolved, so yyresolveLocations didn't
31 actually have reason to modify it. Fix this by forcing
32 nondeterministic operation at the beginning of the parse.
33
34 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
35
36 * data/c.m4 (b4_yy_symbol_print_generate):
37 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
38 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
39 of the bugs reported today by Derek M Jones in
40 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
41 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
42 defined to be a type name without parens or brackets.
43 (Location Type): Similarly for YYLTYPE.
44 * tests/regression.at (Trivial grammars): Put in a test for this
45 bug that will be caught by 'make maintainer-check' (though not,
46 alas, by 'make check' unless your compiler is picky).
47
48 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
49
50 * NEWS: Version 2.2.
51 * configure.ac (AC_INIT): Likewise.
52
53 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
54
55 * data/glr.c (yyreportTree): Make room in yystates for the state
56 preceding the RHS. This fixes the segmentation fault reported by Derek
57 M. Jones in
58 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
59 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
60 to the user. Reported for yyreportTree by Derek M. Jones later in the
61 same thread.
62 * THANKS: Add Derek M. Jones.
63 Update my email address.
64 Fix typo in Steve Murphy's name.
65
66 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
67
68 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
69 checking against YYLAST that caused the parser to miss a potential
70 alternative in its diagnostic.
71 Problem reported by Maria Jose Moron Fernandez in
72 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
73 * data/lalr1.cc (yysyntax_error_): Likewise.
74 * data/yacc.c (yysyntax_error): Likewise.
75 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
76 tokens, in case we run into an older C compiler.
77 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
78 Use them to check for the off-by-one error fixed above.
79
80 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
81 YYSIZE_T, not size_t.
82 * tests/regression.at (Trivial grammars): New test, to catch
83 the error fixed by the above patch.
84
85 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
86
87 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
88 scheme.
89 Reported by Steve Murphy.
90
91 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
92
93 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
94 * data/glr.cc: b4_location_flag is now b4_locations_flag.
95
96 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
97
98 Implement --trace=m4.
99 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
100 * src/output.c (output_skeleton): When set, pass -dV to m4.
101
102 Factor the handling of flags in m4.
103 * src/output.c (prepare): Rename the muscle names debug, defines,
104 error_verbose to debug_flag, defines_flag, error_verbose_flag.
105 * data/c.m4: Adjust.
106 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
107 Use b4_define_flag_if to define other b4_FLAG_if macros.
108 (b4_location_if): As a consequence, rename as...
109 (b4_locations_if): this, for consistency.
110 Adjust all the skeletons.
111
112 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
113
114 * etc/bench.pm: Shorten bench names.
115
116 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
117
118 * src/output.h, src/output.c (error_verbose): Move to...
119 * src/getargs.h, src/getargs.c: here.
120 Sort the flags.
121 Adjust dependencies.
122
123 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
124
125 * data/c.m4 (b4_copyright): Put the special exception for Bison
126 skeletons here, so we don't have to put it in each skeleton. All
127 uses changed. Suggested by Akim Demaille. Also, wrap the
128 copyright notice, in case it is longer than 80 columns. Replace
129 comma by newline after title.
130
131 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
132
133 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
134 incompatibility, not a bug. Mention that it wasn't fixed as of
135 flex 2.5.33.
136
137 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
138
139 * examples/extexi: Enforce the precedence of concatenation over
140 >>.
141 Reported by Tommy Nordgren.
142
143 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
144
145 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
146 with the member "token".
147 Reported by Martin Nylin.
148
149 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
150
151 * data/glr.c: Switch to Bison 2.2 special-exception language in
152 the copyright notice. Use more-regular format for titles and
153 copyright notices.
154 * data/glr.cc: Likewise.
155 * data/location.cc: Likewise.
156 * data/yacc.cc: Likewise.
157 * doc/bison.texinfo (Conditions): Document this.
158 * NEWS: likewise. Upgrade version to 2.2.
159
160 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
161
162 * data/glr.cc: Remove dead code.
163
164 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
165
166 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
167 that variable and the line breaks the bootstrap. Problem reported
168 by Juan M. Guerrero.
169
170 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
171
172 * doc/bison.texinfo (Multiple start-symbols): New.
173
174 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
175
176 * etc/README, etc/bench.pl: New.
177
178 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
179
180 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
181 rule.
182 Reported by Mickael Labau.
183 * tests/input.at (Torturing the Scanner): Test it.
184
185 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
186
187 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
188 Problem reported by Bob Rossi.
189
190 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
191
192 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
193 and didn't really work.
194 For the index, use @ifnotinfo, not @iftex.
195 Minor cleanups of spacing and terminology.
196
197 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
198
199 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
200 of AT_NAME_PREFIX when %name-prefix is not used.
201
202 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
203
204 Apply --prefix to C++ skeletons too: they change the namespace.
205 The test suite already exercize these cases.
206 * data/c++.m4 (b4_namespace): New.
207 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
208 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
209 * data/yacc.c, data/glr.c: Remove a useless `[]'.
210 * doc/bison.texinfo: Document it.
211 (Option Cross Key): Use @multitable in all formats. It looks
212 nicer, even in TeX outputs.
213 (Rules): Use the same code whatever the output type is.
214 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
215 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
216 * tests/calc.at: Use it, instead of hard coding `yy'.
217
218 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
219
220 * TODO: Remove dead items.
221
222 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
223
224 * doc/FAQ: Remove, merged into...
225 * doc/bison.texinfo (FAQ): this.
226 * doc/Makefile.am (EXTRA_DIST): Adjust.
227
228 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
229
230 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
231 even if empty.
232 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
233 * doc/bison.texinfo (Calc++ Scanner): Use it.
234
235 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
236
237 Fix two nits reported by twlevo, plus one more that I discovered.
238
239 * src/assoc.h (assoc_to_string): Give a name to the arg, as
240 this is the usual Bison style.
241 * src/location.h (location_print): Likewise.
242
243 * src/reader.h (token_name): Likewise.
244
245 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
246
247 Fix some nits reported by twlevo.
248 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
249 and "POSIX". Use more-modern syntax for URLs. Mention C++
250 and ask for Java. Don't hardwire OS version numbers. Add
251 copyright notice.
252 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
253 * src/conflicts.c (solved_conflicts_obstack): Now static.
254
255 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
256
257 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
258 page. Say "you can use it" not "you may use it" as on the web page;
259 we're describing capabilities not granting permission.
260
261 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
262
263 * data/glr.c (yyresolveLocations): Rename local variables to avoid
264 shadowing warnings. Use usual patter for iterating through RHS.
265 * tests/glr-regression.at
266 (Uninitialized location when reporting ambiguity):
267 Modify yylex so that it uses its argument, rather than trying
268 to rely on ARGSUSED (which doesn't work for gcc with warnings).
269 const char -> char const.
270
271 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
272 Don't use tabs inside commands; it messes up 'ps'.
273 Problem reported by twlevo.
274
275 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
276
277 * tests/glr-regression.at (Uninitialized location when reporting
278 ambiguity): New test case.
279 * data/glr.c (yyresolveLocations): New function, which uses
280 YYLLOC_DEFAULT.
281 (yyresolveValue): Invoke yyresolveLocations before reporting an
282 ambiguity.
283 * doc/bison.texinfo (Default Action for Locations): Note
284 YYLLOC_DEFAULT's usage for ambiguity locations.
285 (GLR Semantic Actions): Cross-reference those notes.
286
287 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
288
289 * tests/glr-regression.at (Leaked semantic values when reporting
290 ambiguity): Remove unnecessary union and type declarations.
291 (Leaked lookahead after nondeterministic parse syntax error): New test
292 case.
293 * data/glr.c (yyparse): Check for zero stacks remaining before
294 attempting to shift the lookahead so that you don't lose it.
295
296 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
297
298 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
299 * tests/glr-regression.at (Leaked semantic values when reporting
300 ambiguity): New test case.
301 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
302 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
303 now unnecessary yystackp parameter.
304 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
305 destructors can be called.
306
307 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
308 in existing testcases.
309
310 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
311
312 Don't leak semantic values for parent RHS when a user action cuts the
313 parser, and clean up related code a bit.
314 * tests/glr-regression.at (Leaked merged semantic value if user action
315 cuts parse): Rename to...
316 (Leaked semantic values if user action cuts parse): ... this. Add check
317 for leaked parent RHS values.
318 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
319 between an unresolved state (non-empty chain of semantic options) and
320 an incomplete one (signaled by an empty chain).
321 (yyresolveStates): Document the interface. Move all manipulation of a
322 successfully or unsuccessfully resolved yyGLRState to...
323 (yyresolveValue): ... here so that yyresolveValue always leaves a
324 yyGLRState with consistent data and thus is easier to understand.
325 Remove the yyvalp and yylocp parameters since they are always just
326 taken from the yys parameter. When reporting a discarded merged value
327 in debugging output, note that it is incompletely merged. Document the
328 interface.
329 (yyresolveAction): If resolving any of the RHS states fails, destroy
330 them all rather than leaking them. Thus, as long as user actions are
331 written to clean up the RHS correctly, yyresolveAction always cleans up
332 the RHS of a semantic option. Document the interface.
333
334 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
335
336 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
337 led to a segmentation fault in GNU Pascal. Problem reported
338 by Waldek Hebisch.
339
340 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
341
342 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
343 mid-rule action inside a nonterminal symbol in order to declare a
344 destructor for its semantic value.
345
346 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
347
348 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
349 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
350 __cplusplus && ! defined _STDLIB_H && !
351 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
352 defined free))]: Include <stdlib.h> rather than rolling our own
353 declarations of malloc and free, to avoid problems with
354 incompatible declarations (using 'throw') C++'s stdlib.h. This
355 should fix Debian bug 340012
356 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
357 reported by Guillaume Melquiond.
358
359 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
360
361 * NEWS: Clarify symbols versus types in unused-value warnings.
362
363 * configure.ac (AC_INIT): Bump version number.
364
365 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
366
367 * NEWS: Version 2.1a.
368 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
369 since C99 requires this.
370
371 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
372
373 * m4/c-working.m4: New file.
374 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
375
376 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
377
378 * Makefile.maint: Merge from coreutils.
379
380 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
381
382 More portability fixes for problems summarized by Nelson H. F. Beebe.
383
384 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
385 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
386 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
387 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
388 messes up because C++ code is compiled in 32-bit mode but linked
389 in 64-bit mode.
390
391 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
392
393 More portability fixes for problems summarized by Nelson H. F. Beebe.
394
395 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
396 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
397
398 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
399 nodist_PROGRAMS, since we don't need to actually compile the
400 example if we're just doing a plain 'make'. This avoids bothering
401 the installer unnecessarily about problems due to weird C++
402 compilers.
403
404 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
405
406 More portability fixes for problems summarized by Nelson H. F. Beebe.
407
408 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
409 than #include "...", and compile with -I'.'. The old method was
410 not portable, according to Posix and the C standard, and it does
411 not work with Sun C 5.7, where previous #line directives affect
412 the working directory used in later #include "..." directives.
413
414 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
415
416 Various DJGGP specific issues in /djgpp
417
418 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
419
420 More portability fixes for problems summarized by Nelson H. F. Beebe.
421
422 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
423 '#include <map>' works and that you can apply ++ to iterators.
424
425 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
426
427 Work around portability problems summarized by Nelson H. F. Beebe in
428 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
429
430 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
431 that '#include <string>' works.
432
433 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
434 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
435 "warning: sorry: semantics of inline function static data `const
436 unsigned char translate_table[262]' are wrong (you'll wind up with
437 multiple copies)".
438
439 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
440 or, xor to not_, and_, or_, and xor_, respectively. This works
441 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
442 random system header somewhere that includes the equivalent of
443 <iso646.h>.
444
445 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
446 -E" works; it apparently doesn't work with PathScale EKO Compiler
447 Suite Version 2.0.
448
449 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
450
451 During deterministic GLR operation, user actions should be able to
452 influence the parse by changing yychar. To make this easier to fix and
453 to make glr.c easier to evolve in general, don't maintain yytoken in
454 parallel with yychar; just compute yytoken when needed.
455 * tests/glr-regression.at (Incorrect lookahead during deterministic
456 GLR): Check that setting yychar in a user action has the intended
457 effect.
458 * data/glr.c (yyGLRStack): Remove yytokenp member.
459 (yyclearin): Don't set *yytokenp.
460 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
461 yychar rather than *yytokenp to determine the current lookahead.
462 Compute yytoken locally when needed.
463 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
464 point to.
465
466 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
467 after `--report' documentation.
468
469 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
470
471 * src/parse-gram.y (grammar_declaration): Location of printer
472 symbol is @1, not list->location. Bug reported by twlevo.
473 * tests/input.at (Incompatible Aliases): Adjust to above change.
474
475 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
476
477 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
478 all the test at once. This makes the output easier to read in the
479 normal case.
480
481 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
482 got from <http://bro-ids.org/download.html>. The bug is that
483 when two actions appeared in succession, the second one was
484 scanned before the first one was added to the grammar rule
485 as a midrule action. Bison then output the incorrect warning
486 "parse.y:905.17-906.36: warning: unused value: $3".
487 * src/parse-gram.y (BRACED_CODE, action): These are no longer
488 associated with a value.
489 (rhs): Don't invoke grammar_current_rule_action_append.
490 (action): Invoke it here instead.
491 * src/reader.c (grammar_midrule_action): Now extern.
492 (grammar_current_rule_action_append): Don't invoke
493 grammar_midrule_action; that is now the scanner's job.
494 * src/reader.h (last_string, last_braced_code_loc):
495 (grammar_midrule_action): New decls.
496 * src/scan-gram.l (last_string): Now extern, sigh.
497 (last_braced_code_loc): New extern variable.
498 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
499 rule already has an action.
500 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
501 * tests/input.at (AT_CHECK_UNUSED_VALUES):
502 Add some tests to check that the above changes fixed the bug.
503
504 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
505
506 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
507 All used changed. Check whether the symbol has a destructor,
508 not whether it is typed.
509 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
510 that the values are still reported as unused. All line numbers
511 adjusted.
512
513 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
514
515 Work around a bug in bro 0.8, which underparenthesizes its
516 definition of YYLLOC_DEFAULT.
517 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
518 their arguments.
519 * data/lalr1.cc: Likewise.
520 * data/yacc.cc: Likewise.
521
522 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
523
524 Work around a bug in Pike 7.0, and give the Pike folks a
525 better way to override the usual int widths.
526 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
527 user can override the types.
528 (short): #undef, to work around a bug in Pike 7.0.
529 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
530 (union yyalloc.yyss): Use yytype_int16 rather than short.
531 All uses changed.
532 (yysigned_char): Remove.
533 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
534 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
535 * tests/regression.at (Web2c Actions): Adjust to above changes.
536
537 * src/reader.c (check_and_convert_grammar): New function.
538 (reader): Close the input file even if something went wrong during
539 parsing. Minor file descriptor leak reported by twlevo.
540
541 * src/assoc.c (assoc_to_string): Use a default: abort (); case
542 to pacify gcc -Wswitch-default.
543 * src/scan-gram.l (adjust_location): Use a default: break; case
544 to pacify gcc -Wswitch-default.
545 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
546 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
547 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
548 Move these decls to scan-skel.l, since they don't need to be
549 visible elsewhere.
550 * src/scan-skel.l: Accept the above decls.
551 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
552 is used.
553
554 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
555
556 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
557 since we don't want to insist on a version number at the start
558 of the changelog every time.
559 * Makefile.maint: Sync from coreutils a bit better.
560 (sc_trailing_blank): Renamed from sc_trailing_space.
561 All uses changed.
562 (sc_no_if_have_config_h, sc_require_config_h):
563 (sc_prohibit_assert_without_use): New rules.
564 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
565 (sc_dd_max_sym_length): Fix leading spaces in rule.
566 (sc_system_h_headers): Prefix with @.
567 (sc_useless_cpp_parens, m4-check): Output line numbers.
568 (changelog-check): Allow version only in head.
569 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
570 satisfy new Makefile.maint rule.
571 * data/glr.c: Likewise.
572 * data/glr.cc: Likewise.
573 * data/lalr1.cc: Likewise.
574 * data/yacc.c: Likewise.
575 * lib/ebitsetv.c: Likewise.
576 * lib/lbitset.c: Likewise.
577 * lib/subpipe.c: Likewise.
578 * lib/timevar.c: Likewise.
579 * src/system.h: Likewise.
580 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
581 * djgpp/Makefile.maint: Add copyright notice.
582 * djgpp/README.in: Likewise.
583 * djgpp/config.bat: Likewise.
584 * djgpp/config.site: Likewise.
585 * djgpp/config_h.sed: Likewise.
586 * djgpp/djunpack.bat: Likewise.
587 * djgpp/config.sed: Fix copyright notice to match standard format.
588 * djgpp/subpipe.h: Likewise.
589 * lib/bitsetv-print.c: Likewise.
590 * lib/bitsetv.c: Likewise.
591 * lib/subpipe.h: Likewise.
592 * lib/timevar.c: Likewise.
593 * lib/timevar.h: Likewise.
594 * djgpp/subpipe.c: Use standard recipe for config.h.
595 * lib/abitset.c: Likewise.
596 * lib/bitset.c: Likewise.
597 * lib/bitset_stats.c: Likewise.
598 * lib/bitsetv-print.c: Likewise.
599 * lib/bitsetv.c: Likewise.
600 * lib/ebitsetv.c: Likewise.
601 * lib/get-errno.c: Likewise.
602 * lib/lbitset.c: Likewise.
603 * lib/subpipe.c: Likewise.
604 * lib/timevar.c: Likewise.
605 * lib/vbitset.c: Likewise.
606 * tests/local.at: Likewise.
607 * src/scan-gram.l: Don't include verify.h, since system.h does
608 that for us.
609 * .x-sc_require_config_h: New file.
610 * .x-sc_unmarked_diagnostics: New file.
611
612 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
613
614 Be a bit more systematic about using 'abort'.
615 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
616 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
617 Put 'default: abort ();' before some other case, to satisfy older
618 pedantic compilers.
619 * lib/bitset_stats.c (bitset_stats_init): Likewise.
620 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
621 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
622 * src/conflicts.c (resolve_sr_conflict): Likewise.
623 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
624 (get_decision_str, get_orientation_str, get_node_alignment_str):
625 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
626 (get_linestyle_str, get_arrowstyle_str): Likewise.
627 * src/conflicts.c (resolve_sr_conflict):
628 Use a default case rather than one for the one remaining enum
629 value, to catch invalid enum values as well.
630 * src/lalr.c (set_goto_map, map_goto):
631 Prefer "assert (FOO);" to "if (!FOO) abort ();".
632 * src/nullable.c (nullable_compute, token_definitions_output):
633 Likewise.
634 * src/reader.c (packgram, reader): Likewise.
635 * src/state.c (transitions_to, state_new, state_reduction_find):
636 Likewise.
637 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
638 (symbol_pack): Likewise.
639 * src/tables.c (conflict_row, pack_vector): Likewise.
640 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
641 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
642 * src/system.h: Don't include <assert.h>.
643 (assert): New macro.
644
645 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
646 (Destructor Decl, Parser Function, Pure Calling):
647 Describe rules for braces inside C code more carefully.
648
649 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
650
651 Fix some porting glitches found by Nelson H. F. Beebe.
652 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
653 compilers that don't understand that abort () does not return.
654 * src/state.c (transitions_to): Likewise.
655 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
656 that '#include <cstdlib>' works.
657 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
658 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
659 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
660 for the benefit of some pre-C99 compilers.
661
662 * bootstrap: Undo changes to gnulib files that autoreconf made.
663
664 Minor fixups to get 'make maintainer-check' to work.
665 * configure.ac: Don't use -Wnested-externs, as it's incompatible
666 with the new verify.h implementation.
667 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
668 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
669 * data/yacc.c (YYUSE): Likewise.
670 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
671 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
672 * src/parse-gram.y (declaration): Don't pass a string constant
673 to a function that expects char *, since GCC might complain
674 about the constant value.
675 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
676 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
677 before #defining them.
678 * tests/glr-regression.at
679 (Incorrectly initialized location for empty right-hand side in GLR):
680 In yyerror, use the msg arg.
681 (Corrupted semantic options if user action cuts parse):
682 (Incorrect lookahead during deterministic GLR):
683 (Incorrect lookahead during nondeterministic GLR):
684 Don't name a local var 'index'; it shadows string.h's 'index'.
685
686 2006-01-19 Akim Demaille <akim@epita.fr>
687
688 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
689 location, not just parts of it.
690
691 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
692
693 * NEWS: Document the fact that multiple %unions are now allowed.
694 * doc/bison.texinfo (Union Decl): Likewise.
695 * TODO: This feature is now implemented, so remove it from
696 the wishlist.
697
698 * Makefile.maint: Merge with coreutils Makefile.maint.
699 (CVS_LIST): Use build-aux version if available.
700 (VERSION_REGEXP): New macro.
701 (syntax-check-rules): Add sc_no_if_have_config_h,
702 sc_prohibit_assert_without_use, sc_require_config_h,
703 sc_useless_cpp_parens.
704 (sc_obsolete_symbols): Check for O_NDELAY.
705 (sc_dd_max_sym_length): Track coreutils.
706 (sc_unmarked_diagnostics): Look in all files, not just *.c.
707 (sc_useless_cpp_parens): New rule.
708 (news-date-check): Look for version or today's date.
709 (changelog-check): Don't require version number near head.
710 (copyright-check): Use current year instead of hardwiring 2005.
711 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
712 (announcement): Add --gpg-key-ID.
713
714 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
715 with "file system".
716
717 Avoid undefined behavior that addressed just before the start of an
718 array. Problem reported by twlevo.
719 * src/reader.c (packgram): Prepend a new sentinel before ritem.
720 * src/lalr.c (build_relations): Rely on new sentinel.
721 * src/gram.c (gram_free): Adjust to new sentinel.
722
723 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
724
725 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
726 yylookaheadNeeds. All uses updated.
727 (yysplitStack): Rename local yynewLookaheadStatuses to
728 yynewLookaheadNeeds.
729 * data/glr-regression.at (Incorrect lookahead during nondeterministic
730 GLR): In comments, change `lookahead status' to `lookahead need'.
731
732 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
733
734 * data/glr.c (yysplitStack): A little stylistic rewrite.
735
736 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
737
738 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
739
740 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
741
742 * doc/bison.texinfo: Fix some typos.
743 (GLR Semantic Actions): New subsection discussing special
744 considerations because GLR semantic actions might be deferred.
745 (Actions): Mention look-ahead usage of yylval.
746 (Actions and Locations): Mention look-ahead usage of yylloc.
747 (Special Features for Use in Actions): Add YYEOF entry and mention it
748 in the yychar entry.
749 In the yychar entry, remove mention of the local yychar case (pure
750 parser) since this is irrelevant information when writing semantic
751 actions and since it's already discussed in `Bison Symbols' where
752 yychar is otherwise described as an external variable.
753 In the yychar entry, don't call it the `current' look-ahead since it
754 isn't when semantic actions are deferred.
755 In the yychar and yyclearin entries, add note about deferred semantic
756 actions.
757 Add yylloc and yylval entries discussing look-ahead usage.
758 (Look-Ahead Tokens): When discussing yychar, don't call it the
759 `current' look-ahead, and do mention yylval and yylloc.
760 (Error Recovery): Cross-reference `Action Features' when mentioning
761 yyclearin.
762 (Bison Symbols): In the yychar entry, don't call it the `current'
763 look-ahead.
764 In the yylloc and yylval entries, mention look-ahead usage.
765
766 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
767
768 * tests/glr-regression.at: Update copyright year to 2006.
769
770 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
771
772 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
773 use during nondeterministic operation to track which stacks have
774 actually needed the current lookahead.
775 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
776 Allocate, deallocate, resize, and otherwise shuffle space for
777 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
778 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
779 appropriately during nondeterministic operation.
780 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
781 members to store the current lookahead to be used by the deferred
782 user action.
783 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
784 from which the RHS is taken. Set the lookahead members of the new
785 yySemanticOption according to the lookahead status for stack yyk.
786 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
787 yyaddDeferredAction.
788 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
789 members of yySemanticOption before invoking yyuserAction, and then set
790 them back to their current values afterward.
791 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
792 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
793 * tests/glr-regression.at: Remove `.' from the ends of recent test case
794 titles for consistency.
795 (Leaked merged semantic value if user action cuts parse): In order to
796 suppress lint warnings, use arguments in merge function, and assign
797 char value < 128 in main.
798 (Incorrect lookahead during deterministic GLR): New test case.
799 (Incorrect lookahead during nondeterministic GLR): New test case.
800
801 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
802
803 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
804 !yyvaluep as signal that no semantic value is available to print.
805 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
806 to print a semantic value.
807
808 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
809
810 * tests/glr-regression.at: For consistency with my newer test cases,
811 don't thank myself.
812
813 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
814
815 * data/glr.c (yyresolveValue): When merging semantic options, if at
816 least one user action succeeds but a later one cuts the parse, then
817 destroy the semantic value before returning rather than leaking it.
818 (yyresolveStates): If a user action cuts the parse and thus
819 yyresolveValue fails, ignore the (unset) semantic value rather than
820 corrupting the yyGLRState, and empty the semantic options list since
821 the user actions should have called all necessary destructors.
822 Simplify code with YYCHK.
823 * tests/glr-regression.at (Corrupted semantic options if user action
824 cuts parse): New test case.
825 (Undesirable destructors if user action cuts parse): New test case.
826 Before applying any of this patch, this test case never actually failed
827 for me... but only because the corrupted semantic options usually
828 masked this bug.
829 (Leaked merged semantic value if user action cuts parse): New test
830 case.
831
832 2006-01-05 Akim Demaille <akim@epita.fr>
833
834 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
835
836 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
837
838 * data/c.m4 (b4_c_modern): New macro, with a new provision for
839 _MSC_VER. Problem reported by Cenzato Marco.
840 (b4_c_function_def): Use it.
841 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
842 b4_c_modern.
843 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
844 than rolling our own.
845
846 2006-01-04 Akim Demaille <akim@epita.fr>
847
848 Also warn about non-used mid-rule values.
849 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
850 member.
851 (symbol_list_new): Adjust.
852 * src/reader.c (symbol_typed_p): New.
853 (grammar_rule_check): Use it.
854 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
855 Check its rule.
856 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
857 Use it.
858 * tests/actions.at (Exotic Dollars): Adjust.
859
860 2006-01-04 Akim Demaille <akim@epita.fr>
861
862 * src/reader.c (grammar_midrule_action): If $$ is set in a
863 mid-rule, move the `used' bit to its lhs.
864 * tests/input.at (Unused values): New.
865 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
866
867 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
868
869 * doc/bison.texinfo (Bison Options): Say more accurately what
870 --yacc does.
871 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
872 about declarations in the grammar when in Yacc mode, as POSIX does
873 not require a diagnostic when the grammar uses extensions.
874
875 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
876
877 Warn about dubious constructions like "%token T T".
878 Reported by twlevo.
879 * src/symtab.h (struct symbol.declared): New member.
880 * src/symtab.c (symbol_new): Initialize it to false.
881 (symbol_class_set): New arg DECLARING, specifying whether
882 this is a declaration that we want to warn about, if there
883 is more than one of them. All uses changed.
884
885 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
886 Allow multiple %union directives, whose contents concatenate.
887 * src/parse-gram.y (grammar_declaration): Likewise.
888 Use muscle_code_grow, so that we don't need stype_line any more.
889 All uses changed.
890
891 * src/muscle_tab.c (muscle_grow): Fix comment.
892
893 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
894 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
895 Update copyright year to 2006.
896
897 2006-01-03 Akim Demaille <akim@epita.fr>
898
899 Have glr.cc pass (some of) the calc.at tests.
900 * data/glr.cc (b4_parse_param_orig): New.
901 (b4_parse_param): Improve its definition, and bound it more
902 clearly in the skeleton.
903 (b4_epilogue): Append, instead of prepending, in order to keep
904 #line consistency.
905 Simplify the generation of auxiliary functions: locations and
906 purity are mandated.
907 (b4_global_tokens_and_yystype): Honor it.
908 * data/location.cc (c++.m4): Don't include it.
909 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
910 and AT_SKEL_CC_IF.
911 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
912 AT_LALR1_CC_IF.
913 Be sure to initialize the first position's filename.
914 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
915 mandated anyway.
916 (AT_CHECK_CALC_GLR_CC): New.
917 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
918
919 2006-01-02 Akim Demaille <akim@epita.fr>
920
921 * src/output.c (output_skeleton): Don't hard wire the inclusion of
922 c.m4.
923 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
924 * data/glr.cc: Do not include stack.hh.
925
926 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
927
928 * data/glr.c: Reformat whitespace with tabs.
929 (b4_lpure_formals): Remove this unused m4 macro.
930 * tests/cxx-type.at: Reformat whitespace with tabs.
931 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
932 since it's a member. Rename type to isNterm for clarity.
933
934 2005-12-29 Akim <akim@sulaco.local>
935
936 Let glr.cc catch up with symbol_value_print.
937 * data/glr.cc (b4_yysymprint_generate): Replace by...
938 (b4_yy_symbol_print_generate): this.
939 (yy_symbol_print, yy_symbol_value_print): Declare them.
940
941 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
942
943 * src/location.h (boundary): Note that a line or column equal
944 to INT_MAX indicates an overflow.
945 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
946 (rule_length_overflow, increment_rule_length, add_column_width):
947 New functions.
948 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
949 (<SC_BRACED_CODE>"}"):
950 Use increment_rule_length rather than incrementing it by hand.
951 (adjust_location, handle_syncline): Diagnose overflow.
952 (handle_action_dollar, handle_action_at):
953 Fix bug with monstrosities like $-2147483648.
954 Remove now-unnecessary checks.
955 (scan_integer): Verify assumptions and remove now-unnecessary checks.
956 (convert_ucn_to_byte): Verify assumptions.
957 (handle_syncline): New arg LOC. All callers changed.
958 Don't store through a value derived from char const * pointer.
959
960 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
961 GCC warnings.
962
963 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
964
965 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
966 Remove unnecessary forward static decls.
967
968 2005-12-27 Akim Demaille <akim@epita.fr>
969
970 * src/reader.c (grammar_current_rule_check): Also check that $$
971 is used.
972 Take the rule to check as argument, hence rename as...
973 (grammar_rule_check): this.
974 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
975 Rename as...
976 (grammar_rule_begin, grammar_rule_end): these, for consistency.
977 (grammar_midrule_action, grammar_symbol_append): Now static.
978 * tests/torture.at (input): Don't rely on the default action
979 being always performed.
980 * tests/calc.at: "Set" $$ even when the action is "cut" with
981 YYERROR or other.
982 * tests/actions.at (Exotic Dollars): Instead of using unused
983 values, check that the warning is issued.
984
985 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
986
987 * NEWS: Improve wording for unused-value warnings.
988
989 2005-12-22 Akim Demaille <akim@epita.fr>
990
991 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
992 (b4_yysymprint_generate): Rename as...
993 (b4_yy_symbol_print_generate): this.
994 Generate yy_symbol_print instead of yysymprint.
995 Generate also yy_symbol_value_print, and use it.
996
997 2005-12-22 Akim Demaille <akim@epita.fr>
998
999 * NEWS: Warn about unused values.
1000 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
1001 a `used' member.
1002 (symbol_list_n_get, symbol_list_n_used_set): New.
1003 (symbol_list_n_type_name_get): Use symbol_list_n_get.
1004 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
1005 * src/reader.c (grammar_current_rule_check): Check that values are
1006 used.
1007 * src/symtab.c (symbol_print): Accept 0.
1008 * tests/existing.at: Remove the type information.
1009 Empty the actions.
1010 Remove useless actions (beware of mid-rule actions: perl -000
1011 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
1012 * tests/actions.at (Exotic Dollars): Use unused values.
1013 * tests/calc.at: Likewise.
1014 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1015 Likewise.
1016
1017 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
1018 rule_useful_p.
1019
1020 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
1021
1022 Undo 2005-12-01 tentative license wording change. The wording is
1023 still being reviewed by the lawyers, and we don't want to wait for
1024 them before publishing a test release. For now, revert to the
1025 previous wording.
1026 * NEWS: Undo 2005-12-01 change.
1027 * data/glr.c: Revert to previous license wording.
1028 * data/glr.cc: Likewise.
1029 * data/lalr1.cc: Likewise.
1030 * data/location.cc: Likewise.
1031 * data/yacc.c: Likewise.
1032
1033 * NEWS: Reword %destructor vs YYABORT etc.
1034 * data/glr.c: Use American spacing, for consistency.
1035 * data/glr.cc: Likewise.
1036 * data/lalr1.cc: Likewise.
1037 * data/yacc.c: Likewise.
1038 * data/yacc.c: Reformat comments slightly.
1039 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
1040 for consistency. Fix some spelling errors and reword recently-included
1041 text slightly.
1042 * tests/cxx-type.at: Cast results of malloc, for C++.
1043
1044 2005-12-21 Joel E. Denny <address@hidden>
1045
1046 * tests/cxx-type.at: Construct a tree, count the parents of shared
1047 nodes, and free each node once and only once. Previously, the memory
1048 for semantic values was leaked instead.
1049
1050 2005-12-21 Joel E. Denny <address@hidden>
1051
1052 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
1053 (yylval, yylloc): If pure, #define to yystackp->yyval and
1054 yystackp->yyloc similar to yychar and yynerrs.
1055 (yyparse): If pure, remove local yylval and yylloc. Add local
1056 yystackp to accommodate pure definitions of yylval and yylloc.
1057 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
1058 yylvalp and yyllocp to &yylval and &yylloc.
1059 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
1060 namespace. Previously, nerrs and char were missing, but lval and lloc
1061 weren't necessary.
1062 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
1063 yylvalp and yyllocp parameters since, if pure, these are now always
1064 accessible through yystackp. If not pure, they are still accessible
1065 globally.
1066 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
1067 `if (YYID (N))' to pacify lint.
1068
1069 2005-12-21 Akim Demaille <akim@epita.fr>
1070
1071 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
1072 destroy the RHS symbols of a rule.
1073 * data/yacc.c (yylen): Initialize to 0.
1074 Keep its value to the number of items to possibly shift.
1075 In particular, a regular successful parse that ends on YYFINAL by
1076 a (internal) YYACCEPT must not have yylen != 0.
1077 (yyerrorlab, yyreturn): Pop the RHS.
1078 Reorder a bit to emphasize the `shifting' bits of code.
1079 (YYPOPSTACK): Now accept a number of items to pop.
1080 * data/lalr1.cc: Likewise.
1081 * data/glr.c: Formatting changes.
1082 Use goto instead of fall through.
1083 * doc/bison.texinfo (Destructor Decl): Complete.
1084
1085 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1086
1087 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
1088 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
1089 * djgpp/config.bat: Replace every occurence of the file name
1090 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1091 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1092 * djgpp/config.sed: Replace every occurence of the file name
1093 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1094 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1095 * djgpp/djunpack.bat: DJGPP specific file.
1096 * djgpp/fnchange.lst: DJGPP specific file.
1097 * djgpp/README.in: Add new information about how to unpack the bison
1098 source on MSDOS and other systems which have 8.3 file name restrictions
1099 using djunpack.bat and fnchange.lst.
1100
1101 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
1102
1103 * bootstrap (build_cvs_prefix): Remove; unused.
1104 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
1105 when getting gnulib.
1106
1107 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
1108
1109 * data/glr.c: Reorder typedef declarations for structs to match order
1110 of struct declarations.
1111 Rename yystack everywhere to yystackp except in yyparse where it's not
1112 a pointer.
1113 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
1114 consistency.
1115 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
1116 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
1117 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
1118 lint.
1119
1120 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
1121
1122 * tests/sets.at (Accept): Fix typos in regular expression used to
1123 sed out the final state number.
1124
1125 Work around portability problem on Solaris 10: flex-generated
1126 files include <stdio.h> before <config.h>, which messes up
1127 because the latter defines __EXTENSIONS__. Address the problem
1128 by creating two new little files that include <config.h> first,
1129 then include the flex-generated files. Rewrite everyone else
1130 to include <config.h> first, as well.
1131 * lib/timevar.c: Always include "config.h".
1132 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
1133 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
1134 (EXTRA_bison_SOURCES): New macro.
1135 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
1136 * src/system.h: Don't include config.h.
1137 * src/LR0.c: Include <config.h> first.
1138 * src/assoc.c: Likewise.
1139 * src/closure.c: Likewise.
1140 * src/complain.c: Likewise.
1141 * src/conflicts.c: Likewise.
1142 * src/derives.c: Likewise.
1143 * src/files.c: Likewise.
1144 * src/getargs.c: Likewise.
1145 * src/gram.c: Likewise.
1146 * src/lalr.c: Likewise.
1147 * src/location.c: Likewise.
1148 * src/main.c: Likewise.
1149 * src/muscle_tab.c: Likewise.
1150 * src/nullable.c: Likewise.
1151 * src/output.c: Likewise.
1152 * src/parse-gram.y: Likewise.
1153 * src/print.c: Likewise.
1154 * src/print_graph.c: Likewise.
1155 * src/reader.c: Likewise.
1156 * src/reduce.c: Likewise.
1157 * src/relation.c: Likewise.
1158 * src/state.c: Likewise.
1159 * src/symlist.c: Likewise.
1160 * src/symtab.c: Likewise.
1161 * src/tables.c: Likewise.
1162 * src/uniqstr.c: Likewise.
1163 * src/vcg.c: Likewise.
1164
1165 * src/parse-gram.y: Fix minor problems uncovered by lint.
1166 (current_lhs, current_lhs_location): Now static.
1167 (current_assoc): Remove unused variable.
1168
1169 Cleanups so that Bison-generated parsers have less lint.
1170 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
1171 Prepend /*ARGSUSED*/, for lint's sake.
1172 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
1173 definition if 'lint' is defined.
1174 (YYID): New macro (or function, if lint).
1175 All uses of /*CONSTCOND*/0 replaced by YYID(0).
1176 * data/yacc.c: Likewise.
1177 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
1178 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
1179 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
1180 is C++ only.
1181 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
1182 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
1183 Use YYID(0) rather than 0, for lint.
1184 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
1185 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
1186
1187 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
1188
1189 * tests/glr-regression.at
1190 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
1191 Close memory leak reported by twlevo.
1192
1193 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
1194
1195 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
1196 all stacks.
1197 (yyparse): Iterate another stack in order to call user destructors.
1198 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1199 New test case.
1200 (Duplicated user destructor for lookahead): This test now is expected
1201 to succeed.
1202
1203 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
1204
1205 * NEWS: Document the following change.
1206 * data/yacc.c: Say "parser skeleton" rather than "file", since
1207 it's no longer just a file.
1208 * data/glr.c: Grant a special exception for C GLR parsers, that
1209 reads like the already-existing exception for C LALR(1) parsers.
1210 * data/glr.cc: Likewise.
1211 * data/lalr1.cc: Likewise.
1212 * data/location.cc: Likewise.
1213 * data/yacc.c: Reword the "written by" statement to clarify that
1214 it was the parser skeleton, not the entire output file.
1215 * data/glr.c: Written by Paul Hilfinger.
1216 * data/glr.cc: Written by Akim Demaille.
1217 * data/lalr1.cc: Likewise.
1218
1219 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
1220
1221 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
1222 Fix typos in previous change that broke 'make check'.
1223 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
1224 supported in C.
1225 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
1226 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
1227 We can revert this once things settle down.
1228
1229 * src/conflicts.c (conflicts_print): Don't print file name twice
1230 when %expect fails because there were no conflicts.
1231 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
1232 change.
1233 * tests/conflicts.at (%expect not enough, %expect too much):
1234 (%expect with reduce conflicts): Adjust to new behavior.
1235
1236 2005-11-18 Akim Demaille <akim@epita.fr>
1237
1238 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
1239 errors.
1240 * NEWS: Document this.
1241 * doc/bison.texinfo (Expect Decl): Likewise.
1242
1243 2005-11-16 Akim Demaille <akim@epita.fr>
1244
1245 Generalize the display of semantic values and locations in traces.
1246 * data/glr.c (yy_reduce_print): Fix indices (again).
1247 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
1248 literal integers.
1249 * data/lalr1.cc (yyreduce_print): Rename as...
1250 (yy_reduce_print): this.
1251 Display values and locations.
1252 * data/yacc.c (yy_reduce_print): Likewise.
1253 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
1254 (yysymprint): Move higher to be visible from yy_reduce_print).
1255 (yyparse): Adjust.
1256 * tests/calc.at: Adjust the expected length of the traces.
1257
1258 2005-11-14 Akim Demaille <akim@epita.fr>
1259
1260 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
1261 from 1 to N, while values and location start at 0.
1262 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
1263
1264 2005-11-14 Akim Demaille <akim@epita.fr>
1265
1266 * data/glr.c (yy_reduce_print): Fix the $ number.
1267
1268 2005-11-14 Akim Demaille <akim@epita.fr>
1269
1270 "Use" parse parameters.
1271 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
1272 * data/glr.c, data/glr.cc: Use them.
1273 * data/glr.c (YYUSE): Have a C++ definition that supports
1274 non-pointer types.
1275
1276 2005-11-14 Akim Demaille <akim@epita.fr>
1277
1278 * data/glr.c (yyexpandGLRStack): Declare only if defined.
1279
1280 2005-11-14 Akim Demaille <akim@epita.fr>
1281
1282 * data/glr.cc: New.
1283 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
1284
1285 2005-11-12 Akim Demaille <akim@epita.fr>
1286
1287 Let position and location be PODs.
1288 * data/location.cc (position::initialize, location::initialize): New.
1289 (position::position, location::location): Define only if
1290 b4_location_constructors is defined.
1291 * data/lalr1.cc (b4_location_constructors): Define it for backward
1292 compatibility.
1293 * doc/bison.texinfo (Initial Action Decl): Use initialize.
1294
1295 2005-11-12 Akim Demaille <akim@epita.fr>
1296
1297 * data/lalr1.cc: Move the body of the ctor and dtor into the
1298 parser file (instead of the header).
1299 Wrap the implementations in a "namespace yy".
1300
1301 2005-11-12 Akim Demaille <akim@epita.fr>
1302
1303 Have glr.c include its header file when created.
1304 * data/glr.c (b4_shared_declarations): New.
1305 Output them verbatim in the parser if !%defines, otherwise
1306 output then in the header file, and include it instead.
1307
1308 2005-11-11 Akim Demaille <akim@epita.fr>
1309
1310 * data/glr.c: Comment changes.
1311
1312 2005-11-11 Akim Demaille <akim@epita.fr>
1313
1314 When yydebug, report semantic and location values for reductions.
1315 * data/glr.c (yy_reduce_print): Report the semantic values and the
1316 locations.
1317 (YY_REDUCE_PRINT): Adjust.
1318 (yyglrReduce): Use them.
1319 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
1320 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
1321 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
1322 traces.
1323
1324 2005-11-10 Akim Demaille <akim@epita.fr>
1325
1326 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
1327 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
1328 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
1329
1330 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
1331
1332 * m4/cxx.m4, examples/Makefile.am: Don't build
1333 examples/calc++ if no C++ compiler is available. (trivial change)
1334
1335 2005-11-09 Akim Demaille <akim@epita.fr>
1336
1337 * src/scan-skel.l: Use a couple of asserts.
1338
1339 2005-11-03 Akim Demaille <akim@epita.fr>
1340
1341 In some (weird) cases, the final state number is incorrect.
1342 Reported by Alexandre Duret-Lutz.
1343 * src/LR0.c (state_list_append): Remove the computation of
1344 final_state.
1345 (save_reductions): Do it here.
1346 (get_state): Alpha conversion.
1347 (generate_states): Use a for loop.
1348 * src/gram.h (item_number_is_rule_number)
1349 (item_number_is_symbol_number): New.
1350 * src/state.c: Use assert.
1351 * src/system.h: Include assert.h.
1352 * tests/sets.at (Accept): New.
1353
1354 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1355
1356 * data/glr.c (yyfill): Adjust comment.
1357 (yyresolveAction): Initialize default location properly
1358 for empty right-hand sides.
1359 (yydoAction): Ditto.
1360 Add comment explaining apparently dead code.
1361 * tests/glr-regression.at
1362 (Incorrectly initialized location for empty right-hand side in GLR):
1363 New test.
1364
1365 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
1366
1367 * bootstrap (cleanup_gnulib): New function. Use it to clean up
1368 gnulib when interrupted. This fixes some race conditions and
1369 works around some portability problems (one noted by Paul
1370 Hilfinger).
1371
1372 2005-10-22 Akim <akim@epita.fr>
1373
1374 * Makefile.cfg: Adjust to config -> build-aux.
1375 Reported by twledo.
1376
1377 2005-10-21 Akim Demaille <akim@epita.fr>
1378
1379 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
1380 the %parse-params.
1381 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
1382 * data/yacc.c (b4_Pure_if): Rename as...
1383 (b4_yacc_pure_if): this.
1384 (YY_SYMBOL_PRINT, yyparse): Adjust.
1385 * doc/bison.texinfo: Formatting changes.
1386
1387 2005-10-21 Akim Demaille <akim@epita.fr>
1388
1389 Finish the transition config -> build-aux.
1390 * configure.ac, Makefile.am: Use build-aux.
1391 * config/prev-version, config/announce-gen, config/Makefile.am:
1392 Move to...
1393 * build-aux/prev-version, build-aux/announce-gen,
1394 * build-aux/Makefile.am: here.
1395
1396 2005-10-14 Akim Demaille <akim@epita.fr>
1397
1398 * examples/calc++/test: Use set -x only when VERBOSE.
1399
1400 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
1401
1402 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
1403 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
1404
1405 2005-10-13 Akim Demaille <akim@epita.fr>
1406
1407 * src/scan-skel.l: Output the base name parts of the parser and
1408 header file names.
1409 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
1410 additional checks.
1411 Use this to exercise C++ outputs in subdirs.
1412 Reported by Oleg Smolsky.
1413
1414 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
1415
1416 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
1417 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
1418 Problem reported by John P. Hartmann.
1419 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
1420 already defined it.
1421
1422 2005-10-12 Akim Demaille <akim@epita.fr>
1423
1424 * src/parse-gram.y (version_check): Exit 63 to please missing
1425 (stands for "version mismatch).
1426 * tests/input.at, doc/bison.texinfo: Adjust.
1427
1428 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
1429
1430 Work around portability problems with Visual Age C compiler
1431 (xlc and xlC_r) reported by John P. Hartmann.
1432 * data/location.cc (initial_column, initial_line): Remove.
1433 All uses replaced by 0 and 1.
1434 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
1435 that xlc complains about.
1436 * src/scan-skel.l (skel_wrap): Likewise.
1437 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
1438 as __STDC__.
1439 * data/yacc.c (YYMODERN_C): New macro, which also looks at
1440 __STDC_VERSION__. Use it everywhere instead of looking at
1441 __STDC__ and __cplusplus.
1442
1443 2005-10-10 Akim Demaille <akim@epita.fr>
1444
1445 * examples/calc++/test: Be quiet unless VERBOSE.
1446
1447 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
1448
1449 * data/c.m4 (yydestruct, yysymprint):
1450 Use YYUSE instead of casting to void.
1451 * data/glr.c (YYUSE): New macro.
1452 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
1453 Use it instead of rolling our own.
1454 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
1455 (YYCHK1):
1456 Use /*CONSTCOND*/ to suppress lint warnings.
1457 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
1458 (YY_STACK_PRINT): Use 'false' not '0'.
1459 (YYUSE): New macro.
1460 (yysymprint_, yydestruct_): Use it instead of rolling our own.
1461 * data/yacc.c (YYUSE): New macro.
1462 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
1463 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
1464 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
1465
1466
1467 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
1468 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
1469
1470 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
1471
1472 Undo the parts of the unlocked-I/O change that substituted
1473 putc or puts for printf. This might hurt performance a bit,
1474 but some people prefer the printf style.
1475 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
1476 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
1477 All uses replaced by YYFPRINTF and YYDPRINTF.
1478 * data/yacc.c: Likewise.
1479 * lib/bitset.c (bitset_print): Likewise.
1480 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
1481 putc and puts.
1482 * lib/lbitset.c (debug_lbitset): Likewise.
1483 * src/closure.c (print_firsts, print_fderives): Likewise.
1484 * src/gram.c (grammar_dump): Likewise.
1485 * src/lalr.c (look_ahead_tokens_print): Likewise.
1486 * src/output.c (escaped_output): Likewise.
1487 (user_actions_output): Break apart two printfs.
1488 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
1489 * src/reduce.c (reduce_print): Likewise.
1490 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
1491 * src/system.h: Include unlocked-io.h rathe than stdio.h.
1492
1493 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
1494 Use assignments rather than casts-to-void to suppress
1495 unused-variable warnings. This pacifies 'lint'.
1496 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
1497 unused-variable warnings.
1498
1499 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1500
1501 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
1502
1503 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
1504
1505 Use unlocked I/O for a minor performance improvement on hosts like
1506 GNU/Linux and Solaris that support unlocked I/O. The basic idea
1507 is to use the gnlib unlocked-io module, and to prefer putc and
1508 puts to printf when either will work (since the latter doesn't
1509 come in an unlocked flavor).
1510 * bootstrap (gnulib_modules): Add unlocked-io.
1511 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
1512 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
1513 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
1514 and similarly for puts and putc and printf.
1515 * data/yacc.c: Likewise.
1516 * lib/bitset.c (bitset_print): Likewise.
1517 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
1518 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
1519 to printf.
1520 * lib/lbitset.c (debug_lbitset): Likewise.
1521 * src/closure.c (print_firsts, print_fderives): Likewise.
1522 * src/gram.c (grammar_dump): Likewise.
1523 * src/lalr.c (look_ahead_tokens_print): Likewise.
1524 * src/output.c (escaped_output): Likewise.
1525 (user_actions_output): Coalesce two printfs.
1526 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
1527 * src/reduce.c (reduce_print): Likewise.
1528 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
1529 * src/system.h: Include unlocked-io.h rather than stdio.h.
1530
1531 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
1532 this confuses xgettext.
1533
1534 2005-10-02 Akim Demaille <akim@epita.fr>
1535
1536 * bootstrap (gnulib_modules): Add strverscmp.
1537 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
1538 * m4/.cvsignore: Add strverscmp.m4.
1539 * src/parse-gram.y (%require): New token, new rule.
1540 (version_check): New.
1541 * src/scan-gram.l (%require): Adjust.
1542 * tests/input.at (AT_REQUIRE): New.
1543 Use it.
1544 * doc/bison.texinfo (Require Decl): New.
1545 (Calc++ Parser): Use %require.
1546
1547 2005-10-02 Akim Demaille <akim@epita.fr>
1548
1549 * data/location.cc: New.
1550
1551 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
1552 Akim Demaille <akim@epita.fr>
1553
1554 Make sure -odir/foo.cc creates dir/location.hh etc.
1555 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
1556 (spec_file_prefix, spec_verbose_file, spec_graph_file)
1557 (spec_defines_file): Now const.
1558 (dir_prefix): New.
1559 (short_base_name): Remove.
1560 * src/files.c: Adjust.
1561 (dirname.h): Include.
1562 (base_name): Don't prototype it.
1563 (finput): Remove, duplicates gram_in.
1564 (full_base_name, short_base_name): Replace by...
1565 (all_but_ext, all_but_tab_ext): these.
1566 (compute_base_names): Rename as...
1567 (compute_file_name_parts): this.
1568 Update to compute the new variables, including dir_prefix.
1569 Adjust dependencies.
1570 * src/output.c (prepare): Output them.
1571 * src/reader.c: Adjust to use gram_in, not finput.
1572 * src/scan-skel.l (@dir_prefix@): New.
1573
1574 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1575
1576 * lib/subpipe.c: New function end_of_output_subpipe() added
1577 to allow support for non-posix systems. This is a no-op function
1578 for posix systems.
1579
1580 * lib/subpipe.h: New function end_of_output_subpipe() added
1581 to allow support for non-posix systems. This is a no-op function
1582 for posix systems.
1583
1584 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
1585 handle the lack of pipe/fork functionality on non-posix systems.
1586
1587 * djgpp/Makefile.maint: DJGPP specific file.
1588
1589 * djgpp/README.in: DJGPP specific file.
1590
1591 * djgpp/config.bat: DJGPP specific configuration file.
1592
1593 * djgpp/config.sed: DJGPP specific configuration file.
1594
1595 * djgpp/config.site: DJGPP specific configuration file.
1596
1597 * djgpp/config_h.sed: DJGPP specific configuration file.
1598
1599 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
1600
1601 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
1602
1603 2005-10-02 Akim Demaille <akim@epita.fr>
1604
1605 * data/location.cc: New, extract from...
1606 * data/lalr1.cc: here.
1607 (location.hh): Include it after the user prologue, in case the
1608 filename type is defined by the user.
1609 Forward declation location and position before the pre-prologue.
1610 (yyresult_): Rename as...
1611 (yyresult): this, it's a local variable, not an attribute.
1612 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
1613
1614 2005-10-01 Akim Demaille <akim@epita.fr>
1615
1616 * examples/extexi: Restore the #line generation.
1617
1618 2005-09-30 Akim Demaille <akim@epita.fr>,
1619 Alexandre Duret-Lutz <adl@gnu.org>
1620
1621 Move the token type and YYSTYPE in the parser class.
1622 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
1623 (parser::token): New, from the moved free definition of tokens.
1624 (parser::semantic_value): Now a full definition instead of an
1625 indirection to YYSTYPE.
1626 (b4_post_prologue): No longer included in the header file, but
1627 in the implementation file.
1628 * doc/bison.texi (C+ Language Interface): Update.
1629 * src/parse-gram.y: Support unary %define.
1630 * tests/actions.at: Define global_tokens_and_yystype for backward
1631 compatibility until we update the tests.
1632 * tests/calc.at: Idem.
1633 (first_line, first_column, last_line, last_column): Define for lalr1.cc
1634 to simplify the code.
1635
1636 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
1637
1638 Port to SunOS 4.1.4, which lacks strtoul and strerror.
1639 Ah, the good old days! Problem reported by Peter Klein.
1640 * bootstrap (gnulib_modules): Add strerror, strtoul.
1641 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
1642 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
1643
1644 2005-09-29 Akim Demaille <akim@epita.fr>
1645
1646 * data/c.m4 (b4_error_verbose_if): New.
1647 * data/lalr1.cc: Use it.
1648 (YYERROR_VERBOSE_IF): Remove.
1649 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
1650 parser members, replaced by...
1651 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
1652 local variables.
1653 (yysyntax_error_): Takes the state number as argument.
1654 (yyreduce_print_): Use the argument yyrule, not the former
1655 attribute yyn_.
1656
1657 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
1658
1659 * bootstrap (gnulib_modules): Add verify.
1660 * lib/.cvsignore: Add verify.h.
1661 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
1662 * src/system.h (verify): Remove.
1663 Include verify.h instead.
1664 * src/tables.c (tables_generate): Use new API for 'verify'.
1665
1666 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
1667
1668 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
1669 local variables whose names begin with 'yy'.
1670 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1671 Trivial changes from Joel E. Denny.
1672
1673 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
1674 it itself.
1675 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
1676 don't use alloca any more.
1677
1678 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
1679 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
1680 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
1681 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
1682 to match yacc.c, to test more hosts.
1683
1684 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
1685
1686 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
1687 doesn't affect behavior.
1688 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
1689 Solaris, AIX, MSC.
1690 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
1691 This works a bit better with glibc, if user code has already included
1692 stdlib.h.
1693 * doc/bison.texinfo (Bison Parser): Document that users can't
1694 arbitrarily use malloc and free for other purposes. Document
1695 that <alloca.h> and <malloc.h> might be included.
1696 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
1697 user must declare alloca.
1698
1699 * HACKING (release): Forwarn the Translation Project about
1700 stable releses.
1701
1702 2005-09-20 Akim Demaille <akim@epita.fr>
1703
1704 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
1705
1706 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
1707
1708 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
1709 (YYSTACK_ALLOC_MAXIMUM): Use it.
1710 (yysyntax_error): New function.
1711 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
1712 multiple syntax errors are reported, and alloca is being used.
1713 Instead, reallocate buffers twice as big each time, so that
1714 we waste at most half the allocated memory. Start with a small
1715 (128-byte) buffer that will suffice in most cases anyway.
1716 Use yysyntax_error to do most of the work.
1717
1718 * doc/bison.texinfo (Error Reporting, Table of Symbols):
1719 yynerrs is the number of errors reported, not the number of
1720 errors encountered.
1721
1722 * tests/glr-regression.at (Duplicated user destructor for lookahead):
1723 Mark it as expected to fail.
1724 Cast result of malloc; problem reported by twlevo@xs4all.nl.
1725 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
1726 Don't start user-code symbols with "yy", to avoid name space problems.
1727
1728 2005-09-19 Akim Demaille <akim@epita.fr>
1729
1730 Remove the traits, failed experiment.
1731 It never proved useful, and anyway because of the current
1732 definition, it was not possible to have several specialization of
1733 this traits, making it useless.
1734 * data/lalr1.cc (yy:traits): Remove.
1735 Inline its definitions in the parser class.
1736
1737 2005-09-19 Akim Demaille <akim@epita.fr>
1738
1739 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
1740 least Mac OSX with a /usr/local install of gettext.
1741
1742 2005-09-19 Akim Demaille <akim@epita.fr>
1743
1744 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
1745 and yytoken for similarity with the other skeletons.
1746
1747 2005-09-19 Akim Demaille <akim@epita.fr>
1748
1749 * NEWS, configure.ac: update version number to 2.1a.
1750
1751 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
1752
1753 * NEWS: Version 2.1.
1754
1755 * NEWS: Remove notice of yytname change, since it was never in an
1756 official release.
1757 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
1758 diagnostic.
1759 * src/output.c (prepare): Likewise.
1760 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
1761 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
1762 is not defined. This is an awful hack, but it's enough for now.
1763 All callers changed.
1764 * tests/glr-regression-at (make_value): Args are const pointers now,
1765 to avoid GCC warning.
1766 (Duplicated user destructor for lookahead): New test. Currently
1767 skipped. It fails on my host but I'm not sure it'll always fail.
1768
1769 2005-09-16 Akim Demaille <akim@epita.fr>
1770
1771 * src/symtab.h (struct symbol): Declare the printer and destructor
1772 as const, to avoid accidental calls to free.
1773 (symbol_destructor_set, symbol_printer_set): Adjust.
1774 * src/symtab.c: Adjust.
1775
1776 2005-09-16 Akim Demaille <akim@epita.fr>
1777
1778 * data/c.m4 (b4_token_enums): New.
1779 (b4_token_defines): Rename as...
1780 (b4_token_enums_defines): this.
1781 (b4_token_defines): New, output only the #defines.
1782 * data/yacc.c, data/glr.c: Adjust.
1783 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
1784 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
1785 as default values.
1786
1787 2005-09-16 Akim Demaille <akim@epita.fr>
1788
1789 * data/lalr1.cc (yylex_): Remove, inline its code.
1790 (yyreport_syntax_error_): Remove, replaced by...
1791 (yysyntax_error_): this which returns a string and leaves to the
1792 caller the call to the users' error function.
1793 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
1794 Move from members of the parser object...
1795 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
1796 to local variables of the parse function.
1797
1798 2005-09-16 Akim Demaille <akim@epita.fr>
1799
1800 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
1801 since it's in Bison's name space.
1802
1803 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
1804
1805 * data/glr.c (yyresolveValue): Add default case to pacify
1806 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
1807
1808 * NEWS: Document when yyparse started to return 2.
1809 * doc/bison.texinfo (Parser Function): Document when yyparse
1810 returns 2.
1811
1812 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
1813 (b4_filename_type): Renamed back from b4_file_name_type. All uses
1814 changed.
1815 (class position): file_name -> filename (reverting). All uses changed.
1816
1817 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
1818
1819 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
1820 do anything if $@ exists. This reverts part of the 2005-07-07
1821 patch.
1822
1823 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
1824
1825 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
1826 contains obsolete information and isn't worth distributing as a
1827 separate file anyway.
1828 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
1829 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
1830 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
1831 (yyparse): Abort if user code uses longjmp to throw an unexpected
1832 value.
1833
1834 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
1835
1836 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
1837 Suggested by twlevo@xs4all.nl.
1838
1839 * data/glr.c (YYCHK1): Do not assume YYE is in range.
1840 This avoids a diagnostic from gcc -Wswitch-enum.
1841 Problem reported by twlevo@xs4all.nl.
1842
1843 * doc/bison.texinfo: Don't use "filename", as per GNU coding
1844 standards. Use "file name" or "file" or "name", depending on
1845 the context.
1846 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
1847 not to hack/foo.tab.c.
1848 (Calc++ Top Level): 2nd arg of main is not const.
1849 * data/glr.c: b4_filename -> b4_file_name.
1850 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
1851 All uses changed.
1852 (class position): filename -> file_name. All uses changed.
1853 * data/yacc.c: b4_filename -> b4_file_name.
1854 * lib/bitset.h: filename -> file_name in local vars.
1855 * lib/bitset_stats.c: Likewise.
1856 * src/files.c: Likewise.
1857 * src/scan-skel.l ("@output ".*\n): Likewise.
1858 * src/files.c (file_name_split): Renamed from filename_split.
1859 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
1860
1861 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
1862
1863 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
1864 to accommodate latest gnulib.
1865
1866 * tests/glr-regression.at (Duplicate representation of merged trees):
1867 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
1868
1869 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
1870 needed.
1871
1872 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
1873
1874 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
1875 All uses changed. Invoke user destructor after an error during a
1876 split parse (trivial change from Joel E. Denny).
1877
1878 * tests/glr-regression.at
1879 (User destructor after an error during a split parse): New test case.
1880 Problem reported by Joel E. Denny in:
1881 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
1882
1883 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
1884
1885 * README-cvs: Give URLs for recommended tools.
1886 Mention Gzip version problem, and bootstrapping issues.
1887 Remove troubleshooting section, as it's somewhat obsolete.
1888
1889 * bootstrap (no_cache): New var, to accommodate different wget
1890 variants. Use it instead of '-C off'. Problem reported by
1891 twlevo@xs4all.nl.
1892
1893 * data/glr.c (yydestroyStackItem): New function.
1894 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
1895 debugging information. Problem reported by Joel E. Denny.
1896
1897 2005-08-25 Akim Demaille <akim@epita.fr>
1898
1899 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
1900
1901 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
1902
1903 * data/glr.c (yyrecoverSyntaxError, yyreturn):
1904 Don't invoke destructor on unresolved entries.
1905 * tests/glr-regression.at
1906 (User destructor for unresolved GLR semantic value): New test case.
1907 Problem reported by Joel E. Denny in:
1908 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
1909
1910 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
1911
1912 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
1913 Add strnlen.c.
1914 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
1915 lib-prefix.m4, po.m4.
1916
1917 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
1918 in yydestruct diagnostic, since it might not be an error.
1919 Problem reported by Joel Denny near end of
1920 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
1921 * data/lalr1.cc (yyerturn): Likewise.
1922 * data/yacc.c (yyreturn): Likewise.
1923 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
1924
1925 * src/files.c: Remove obsolete FIXME comment.
1926
1927 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
1928 with the other templates, and to fix bogus run-on messages such
1929 as the one reported at the end of
1930 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
1931 All callers changed to avoid the newline.
1932 (yyprocessOneStack): Output two lines rather than one, to accommodate
1933 the above change. This changes the debug output format slightly.
1934
1935 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
1936 reported by Joel E. Denny in
1937 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
1938 (trivial change).
1939 * tests/glr-regression.at (Duplicate representation of merged trees):
1940 New test, from Joel E. Denny in:
1941 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
1942 * THANKS: Add Joel E. Denny.
1943
1944 * configure.ac (AC_INIT): Bump to 2.0c.
1945
1946 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
1947
1948 * NEWS: Version 2.0b.
1949
1950 * Makefile.am (SUBDIRS): Put examples before tests, so that
1951 "make check" doesn't finish with "All 1 tests passed".
1952
1953 * tests/regression.at (Token definitions): Don't rely on
1954 AT_PARSER_CHECK for data that contains backslashes. It currently
1955 uses 'echo', and 'echo' isn't portable if its argument contains
1956 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
1957 that the byte '\0xff' is not printable in the C locale; it is,
1958 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
1959 not printable, so use '\0x81' to test.
1960
1961 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
1962 version of GCC, since the macro is used with non-GCC compilers.
1963
1964 Fix core dump reported by Pablo De Napoli in
1965 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
1966 * tests/regression.at (Invalid inputs with {}): New test.
1967 * src/parse-gram.y (token_name): Translate type before using
1968 it as an index.
1969
1970 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
1971 the user's name space. All uses changed to __attribute__
1972 ((__unused__)).
1973 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
1974 Add __attribute__ ((__noreturn__)).
1975
1976 * etc/clcommit: Remove. We weren't using it, and it failed
1977 "make maintainer-distcheck".
1978 * Makefile.maint: Merge from coreutils.
1979 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
1980 (syntax-check-rules): Change list of rules as described below.
1981 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
1982 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
1983 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
1984 (sc_trailing_space): New rules.
1985 (sc_xalloc_h_in_src): Remove.
1986 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
1987 (sc_space_tab, sc_error_exit_success, sc_changelog):
1988 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
1989 (makefile-check, po-check, author_mark_check):
1990 (makefile_path_separator_check, copyright-check):
1991 Use grep -n, to make it easier to find violations.
1992 Use CVS_LIST and CVS_LIST_EXCEPT.
1993 (header_regexp, h_re): Remove.
1994 (dd_c): New macro.
1995 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
1996 (my-distcheck): Use more-modern GCC flags.
1997 (signatures, %.asc): Remove.
1998 (rel-files, announcement): Remove signatures.
1999 Restore old updating code, even though we don't use it, so
2000 that we're the same as coreutils.
2001 (alpha, beta, major): Depend on news-date-check.
2002 Make the upload commands.
2003
2004 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
2005 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
2006 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
2007 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
2008 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
2009 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
2010 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
2011 * tests/sets.at: Likewise.
2012
2013 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
2014 we comment out the Autoconf version number.
2015 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
2016 it's error-prone and "make maintainer-distcheck" rejects it.
2017
2018 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
2019 Indent calls to "error" to pacify "make maintainer-distcheck",
2020 when the calls are not intended to be translated.
2021 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
2022
2023 * src/Makefile.am (DEFS): Use +=, to pacify
2024 "make maintainer-distcheck".
2025 (bison_SOURCES): Add scan-skel.h.
2026 (sc_tight_scope): New rule, from coreutils.
2027
2028 * src/files.c (src_extension, header_extension):
2029 Now static, not extern.
2030 * src/getargs.c (short_options): Likewise.
2031 * src/muscle_tab.c (muscle_table): Likewise.
2032 * src/parse-gram.y (current_class, current_type, current_prec):
2033 Likewise.
2034 * src/reader.c (grammar_end, previous_rule_end): Likewise.
2035 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
2036 * src/main.c (main): Cast bindtextdomain and textdomain calls to
2037 void, to avoid warning when NLS is disabled.
2038 * src/output.c: Include scan-skel.h.
2039 (scan_skel): Remove decl, since scan-skel.h does this.
2040 (output_skeleton):
2041 Indent calls to "error" to pacify "make maintainer-distcheck".
2042 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
2043 * src/reader.h (gram_end, gram_lineno): New decls to pacify
2044 "make maintainer-distcheck".
2045 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
2046 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
2047 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
2048 (skel_lex_destroy, scan_skel): Move these decls to...
2049 * src/scan-skel.h: New file.
2050 * src/uniqstr.c (uniqstr_assert):
2051 Indent calls to "error" to pacify "make maintainer-distcheck".
2052
2053 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
2054 not @VAR@.
2055
2056 * tests/torture.at: Revamp to avoid misuse of atoi that
2057 "make maintainer-distcheck" complained about.
2058
2059 * examples/extexi (message): Don't print a message more than once,
2060 and omit line-number decoration that makes Emacs compile think
2061 that informative messages are worth worrying about.
2062
2063 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
2064
2065 * configure.ac: Update version number.
2066
2067 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
2068 accidentally.
2069 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
2070 autogenerated by the maintainer.
2071 * examples/calc++/.cvsignore: Add *.yy.
2072
2073 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
2074 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2075 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2076
2077 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
2078
2079 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
2080 from maintainer-distcheck about casting the argument of 'free'.
2081
2082 * NEWS: Mention recent yytname changes.
2083 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
2084
2085 * bootstrap: For translations that have not yet been upgraded to
2086 the new runtime-po domain, prime the pump by extracting the
2087 relevant strings from the obsolete translations. This code can be
2088 removed once the bison-runtime domain has been translated by each
2089 team.
2090
2091 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
2092 now that token names are already quoted.
2093
2094 Fix problem reported by Anthony Heading.
2095 * data/glr.c (YYTOKEN_TABLE): New macro.
2096 (yytname): Define if YYTOKEN_TABLE.
2097 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
2098 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
2099 (YYERROR_VERBOSE): Define the same way the other skeletons do.
2100 * src/output.c (prepare_symbols): Output token_table_flag.
2101
2102 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
2103
2104 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
2105 again if the first call fails.
2106
2107 * data/glr.c (yytnamerr): New function.
2108 (yyreportSyntaxError): Use it to dequote most string literals.
2109 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
2110 with other skeletons. All uses changed.
2111 (yytnameerr_): New function.
2112 (yyreport_syntax_error): Use it to dequote most string literals.
2113 * data/yacc.c (yytnamerr): New function.
2114 (yyerrlab): Use it to decode most string literals.
2115 * doc/bison.texinfo (Decl Summary, Calling Convention):
2116 Clarify quoting convention of yytname.
2117 * src/output.c (prepare_symbols): Quote all names. This undoes
2118 the 2005-04-17 change, which is now accomplished (mostly) via
2119 changes in the parsers as described above.
2120 * tests/regression.at (Token definitions, Web2c Actions):
2121 Undo most 2005-04-17 change here, too.
2122
2123 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
2124
2125 Fix more problems reported by twlevo@xs4all.nl.
2126 * tests/cxx-type.at: Don't pipe output of ./types through sed to
2127 remove trailing spaces. This loses the exit status of ./types,
2128 and isn't needed since ./types shouldn't be emitting trailing
2129 spaces.
2130 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
2131 as the stack isn't valid in that case.
2132
2133 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
2134 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
2135 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
2136 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
2137 is used.
2138 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
2139 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2140 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2141 Likewise.
2142
2143 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
2144 overly-picky compilers that reject 'char *foo = "bar";'.
2145
2146 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
2147 to FILE * parameter, not to stderr. This fixes a typo introduced
2148 in the 2005-07-12 change.
2149
2150 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
2151 warnings from GCC 4.
2152
2153 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
2154 (yyglrShiftDefer, yysplitStack):
2155 Remove unused parameters b4_pure_formals. All uses changed.
2156 (yyglrShift): Remove unused parameters b4_user_formals.
2157 All uses changed.
2158 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
2159
2160 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
2161
2162 Destructor cleanups and regularization among the three skeletons.
2163 * NEWS: Document the behavior changes.
2164 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
2165 stack before failing, as the cleanup code will do it for us now.
2166 * data/lalr1.cc (yyerrlab): Likewise.
2167 * data/glr.c (yyparse): Pop everything off the stack before
2168 freeing it, so that destructors get called properly.
2169 * data/lalr1.cc (yyreturn): Likewise.
2170 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
2171 This is more consistent.
2172 * doc/bison.texinfo (Destructor Decl): Mention more reasons
2173 why destructors might be called. 1.875 -> 2.1.
2174 (Destructor Decl, Decl Summary, Table of Symbols):
2175 Some English-language cleanups for %destructor.
2176 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2177 Add output line for destructor of start symbol.
2178 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
2179 because of that same extra output line.
2180
2181 * NEWS: Document minor wording changes in diagnostics of
2182 Bison-generated parsers.
2183 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
2184 Remove unused formals. All uses changed.
2185 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
2186 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
2187 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
2188 Rename yyoverflowab to yyexhaustedlab.
2189 When memory exhaustion occurs during syntax-error reporting,
2190 report it separately rather than in a single diagnostic; this
2191 eases translation.
2192 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
2193 (Memory Exhausted): Renamed from Parser Stack Overflow.
2194 Revamp wording slightly to prefer "memory exhaustion".
2195 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
2196
2197 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
2198
2199 Add i18n support to the GLR skeleton. Partially fix the C++
2200 skeleton; a C++ expert needs to finish this. Remove debugging
2201 msgids; there's little point to having them translated, since they
2202 can be understood only by someone who can read the
2203 (English-language) source code.
2204
2205 Generate runtime-po/bison-runtime.pot automatically, so that we
2206 don't have to worry about garbage getting in that file. We'll
2207 make sure after the next official release that old msgids don't
2208 get lost. See
2209 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
2210
2211 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
2212 Now auto-generated.
2213 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
2214 Fix typos in explanations of the runtime file.
2215 * bootstrap: Change gettext keyword from YYI18N to YY_.
2216 Use standard Makefile.in.in in runtime-po, since we'll arrange
2217 for backward-compatible bison-runtime.po files in a different way.
2218 * data/glr.c (YY_): New macro, from yacc.c.
2219 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
2220 Translate messages intended for users.
2221 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
2222 the wording in the other skeletons. We don't know that the memory
2223 is virtual.
2224 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
2225 Use same method that yacc.c uses.
2226 Don't translate debugging messages.
2227 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
2228 it doesn't work (yet), and requires C++ expertise to fix.
2229 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
2230 Move defn to a more logical place, to be consistent with other
2231 skeletons.
2232 Don't translate debugging messages.
2233 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
2234 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
2235 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
2236 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
2237
2238 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
2239 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
2240 void, not int.
2241 * tests/glr-regression.at (Badly Collapsed GLR States):
2242 Likewise.
2243 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2244 yylex should return 0 at EOF rather than aborting.
2245
2246 Improve tests for stack overflow in GLR parser.
2247 Problem reported by twlevo@xs4all.nl.
2248 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
2249 All uses removed.
2250 (yyStackOverflow): Just longjmp, but with value 2 so that caller
2251 can handle the problem.
2252 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
2253 (yyparse): New local variable yyresult to record the result.
2254 Use result of setjmp to set it, rather than storing itinto
2255 struct.
2256 (yyDone): Remove label.
2257 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
2258 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
2259 if YYABORT is used).
2260 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
2261 yyparse status; put status > 1 into diagnostic.
2262 Check that status==2 works.
2263 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
2264 Use exit status 3 for failure to open (which shouldn't happen).
2265
2266 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
2267
2268 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
2269 1 on syntax error; just let yyparse do its thing.
2270 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
2271 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
2272 (Exploding the Stack Size with Alloca):
2273 (Exploding the Stack Size with Malloc):
2274 Expect exit status 2, not 1, since the parser is supposed to blow
2275 its stack. Problem reported by twlevo@xs4all.nl.
2276
2277 * data/glr.c (yyparse): Don't assume that the initial calls
2278 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
2279 Print a stack-overflow message and fail instead.
2280 Initialize the line-number information before creating the stack,
2281 so that the stack-overflow message can report line zero safely.
2282
2283 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
2284
2285 Fix problems reported by twlevo@xs4all.nl.
2286 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
2287 (yyuserMerge): Provide a default case if b4_mergers is empty.
2288 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
2289 * tests/glr-regression.at
2290 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2291 Add casts to pacify C++ compilers.
2292 * tests/glr-regression.at (Improper merging of GLR delayed action
2293 sets): Declare yylex before using it.
2294 * tests/Makefile.am (maintainer-check-g++): Fix a stray
2295 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
2296 test for valgrind; valgrind is independent of g++.
2297 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
2298 for compatibility with POSIX 1003.1-2001 (if running coreutils).
2299 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
2300 Use a destructor, so that we can expand the stack. Change
2301 YYSTYPE to char * so that we can free it. Cast result of malloc.
2302
2303 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2304
2305 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
2306 a valgrind failure. Problem reported by twlevo@xs4all.nl.
2307
2308 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
2309
2310 * PACKAGING: New file, suggested by Bruno Haible and taken from
2311 similar wording in gettext's PACKAGING file.
2312 * NEWS: Mention PACKAGING.
2313 * Makefile.am (EXTRA_DIST): Add PACKAGING.
2314
2315 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
2316
2317 * NEWS: Document recent i18n improvements.
2318 * bootstrap: Get runtime translations into runtime-po.
2319 Create runtime-po files automatically, if possible.
2320 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
2321 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
2322 does not infringe on the user's name space.
2323 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
2324 * doc/bison.texinfo (Internationalization): Revamp the English
2325 and Texinfo syntax a bit, to try to make it clearer.
2326 (Bison Options, Option Cross Key): Mention --print-localedir.
2327 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
2328 YYENABLE_NLS. Quote a bit more.
2329 * runtime-po/.cvsignore: New file.
2330 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
2331 * runtime-po/Rules-quot: Remove; now created by bootstrap.
2332 * runtime-po/quot.sed: Likewise.
2333 * runtime-po/boldquot.sed: Likewise.
2334 * runtime-po/en@quot.header: Likewise.
2335 * runtime-po/en@boldquot.header: Likewise.
2336 * runtime-po/insert-header.sin: Likewise.
2337 * runtime-po/remove-potcdate.sin: Likewise.
2338 * runtime-po/Makevars: Likewise.
2339 * runtime-po/LINGUAS: Likewise.
2340 * runtime-po/de.po: Likewise; we will rely on the translation project
2341 to maintain this, so "bootstrap" should get it.
2342 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
2343 its value.
2344 * src/main.c (main): Bind the bison-runtime domain, too.
2345
2346 2005-07-12 Bruno Haible <bruno@clisp.org>
2347
2348 * data/yacc.c: Include <libintl.h> when NLS is enabled.
2349 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
2350 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
2351 * runtime-po: New directory.
2352 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
2353 $(DOMAIN).pot-update rule, so that old messages are never dropped.
2354 * runtime-po/Rules-quot: New file, copied from po/.
2355 * runtime-po/quot.sed: Likewise.
2356 * runtime-po/boldquot.sed: Likewise.
2357 * runtime-po/en@quot.header: Likewise.
2358 * runtime-po/en@boldquot.header: Likewise.
2359 * runtime-po/insert-header.sin: Likewise.
2360 * runtime-po/remove-potcdate.sin: Likewise.
2361 * runtime-po/Makevars: New file.
2362 * runtime-po/POTFILES.in: New file.
2363 * runtime-po/LINGUAS: New file.
2364 * runtime-po/bison-runtime.pot: New file.
2365 * runtime-po/de.po: New file.
2366 * m4/bison.m4: New file.
2367 * Makefile.am (SUBDIRS): Add runtime-po.
2368 (aclocaldir, aclocal_DATA): New variables.
2369 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
2370 Define aclocaldir.
2371 * src/getargs.c (usage): Document --print-localedir option.
2372 (PRINT_LOCALEDIR_OPTION): New enum item.
2373 (long_options): Add --print-localedir option.
2374 (getargs): Handle --print-localedir option.
2375 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
2376 (Internationalization): New section.
2377
2378 2005-07-12 Akim Demaille <akim@epita.fr>
2379
2380 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
2381 for consistency with the rest of the code.
2382 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
2383 Add separators.
2384
2385 2005-07-12 Akim Demaille <akim@epita.fr>
2386
2387 * src/parse-gram.y: Use %printer instead of YYPRINT.
2388
2389 2005-07-12 Akim Demaille <akim@epita.fr>
2390
2391 * src/symtab.h, src/symtab.c (symbol_print): New.
2392 * src/symlist.h, src/symlist.c (symbol_list_print): New.
2393 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
2394
2395 2005-07-12 Akim Demaille <akim@epita.fr>
2396
2397 * data/glr.c (b4_syncline): Fix (swap) the definitions of
2398 b4_at_dollar and b4_dollar_dollar.
2399
2400 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
2401
2402 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
2403 and Pennello's paper.
2404
2405 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
2406
2407 * data/yacc.c (yyparse): Undo previous patch. Instead,
2408 set yylsp[0] and yyvsp[0] only if the initial action
2409 sets yylloc and yylval, respectively.
2410
2411 * data/yacc.c (yyparse): In the initial action, set
2412 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
2413 This avoids the use of undefined variables if the initial
2414 action does not set yylloc and/or yylval.
2415
2416 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
2417
2418 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
2419 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
2420 Remove from CVS. These files are automatically generated.
2421 * examples/extexi: Clarify that this file is now part of Bison,
2422 not GNU M4, and that it works with any POSIX-compatible Awk.
2423 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
2424 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
2425 so that we also get calc++-parser.yy. Geneate it.
2426 Use $(AWK), not gawk, since any conforming Awk will do.
2427 Put comment before action, since older 'make' can't handle comment
2428 in action.
2429 $(BUILT_SOURCES): List all built sources, not just some of them.
2430 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
2431 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
2432 $($(calc_sources_generated)): Remove unnecessary test for existence
2433 of target. (This had a shell syntax error anyway; a stray "x".)
2434 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
2435 calc++-parser.yy.
2436 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
2437
2438 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
2439 implied by the other modules.
2440
2441 2005-07-06 Akim Demaille <akim@epita.fr>
2442
2443 Bind examples/calc++ to the package.
2444 * examples/calc++/Makefile: Remove, replaced by...
2445 * examples/calc++/Makefile.am: ... this new file.
2446 * examples/calc++/test: Remove input.
2447 * examples/calc++/compile: Remove.
2448 * examples/Makefile.am: New.
2449 * configure.ac, Makefile.am: Adjust.
2450 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
2451
2452 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
2453
2454 * data/glr.c (yyFail): Drastically simplify; since the format argument
2455 never had any % directives, we can simply pass it to yyerror.
2456 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
2457 be modified later, as that is the usual style in glr.c.
2458 Problems reported by Paul Hilfinger.
2459
2460 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
2461 and size overflow errors.
2462 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
2463 in case the user prolog sets feature-test macros like _GNU_SOURCE.
2464 (YYSIZEMAX): New macro.
2465 (yystpcpy): New function, taken from yacc.c.
2466 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
2467 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
2468 so that we don't have to maintain their signatures.
2469 (yyFail): Check for buffer overflow, by using vsnprintf rather
2470 than vsprintf. Allocate a bigger buffer if possible.
2471 Report an error if buffer allocation fails.
2472 (yyStackOverflow): New function.
2473 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
2474 the initialization was successful. It might fail if storage was
2475 exhausted.
2476 (yyexpandGLRStack): Add more checks for storage allocation failure.
2477 Use yyStackOverflow to report failures.
2478 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
2479 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
2480 Don't assume stack number fits in int.
2481 (yysplitStack): Check for storage allocation failure.
2482 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
2483 can print diagnostics on storage allocation failure. All callers
2484 changed.
2485 (yyresolveValue): Use yybool for boolean.
2486 (yyreportSyntaxError): Check for size-calculation overflow.
2487 This code is taken from yacc.c.
2488 (yyparse): Check for storage allocation errors when allocating
2489 the initial stack.
2490
2491 2005-07-05 Akim Demaille <akim@epita.fr>
2492
2493 Extract calc++ from the documentation.
2494 * doc/bison.texinfo (Calc++): Add the extraction marks.
2495 * examples/extexi: New, from the aborted GNU Programming 2E.
2496 Separate the different paragraph of a file with empty lines.
2497 * examples/Makefile: Use it to extract the whole calc++ example.
2498
2499 2005-06-24 Akim Demaille <akim@epita.fr>
2500
2501 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
2502 class typedefs.
2503
2504 2005-06-22 Akim Demaille <akim@epita.fr>
2505
2506 * doc/bison.texinfo (C++ Language Interface): First stab.
2507 (C++ Parsers): Remove.
2508
2509 2005-06-22 Akim Demaille <akim@epita.fr>
2510
2511 * data/lalr1.cc (yylex_): Honor %lex-param.
2512
2513 2005-06-22 Akim Demaille <akim@epita.fr>
2514
2515 Start a set of simple examples.
2516 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
2517 * examples/calc++/calc++-driver.hh,
2518 * examples/calc++/calc++-parser.yy,
2519 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
2520 * examples/calc++/compile, examples/calc++/test: New.
2521
2522 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
2523
2524 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
2525 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
2526 which stems from the 2005-05-27 patch.
2527
2528 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2529
2530 * data/glr.c: Modify treatment of unused parameters to permit use
2531 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
2532
2533 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
2534
2535 Fix infringement on user name space reported by Janos Zoltan Szabo.
2536 * data/yacc.c (yyparse): strlen -> yystrlen.
2537
2538 2005-05-30 Akim Demaille <akim@epita.fr>
2539
2540 * data/lalr1.cc (_): New.
2541 Translate the various messages.
2542
2543 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
2544
2545 Fix infringement on user name space reported by Bruno Haible.
2546 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
2547 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
2548 the user's name space.
2549 (alloca): Include <stdlib.h> to get it, if it's not built in.
2550 (YYMALLOC, YYFREE): Define only if needed.
2551 (malloc, free): Declare, but only if needed, as this infringes on
2552 the user name space.
2553
2554 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
2555
2556 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
2557 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
2558 with %d format.
2559 * lib/ebitset.c (min, max): Undef before defining.
2560 * lib/vbitset.c (min, max): Likewise.
2561 * lib/subpipe.c (create_subpipe): Save local variables in case
2562 vfork clobbers them.
2563
2564 2005-05-24 Bruno Haible <bruno@clisp.org>
2565
2566 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
2567 error message syntax used by gcc-4.0.
2568
2569 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
2570
2571 * README: Mention m4 1.4.3. Remove obsolete advice about
2572 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
2573
2574 * bootstrap: Remove workaround for problem I encountered with
2575 gettext 0.14.1; it seems to be fixed now.
2576
2577 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
2578
2579 * NEWS: Version 2.0a.
2580
2581 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
2582 the previous change.
2583
2584 Various maintainer cleanups.
2585 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
2586 conftest*, for benefit of CVS commands run at the same time as
2587 "configure". Add build-aux, since "bootstrap" now creates it and
2588 its subfiles.
2589 * Makefile.cfg (move_if_change): Remove.
2590 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
2591 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
2592 (po_repo, do-po-update, po-update, wget_files, get-targets):
2593 (config.guess-url_prefix, config.sub-url_prefix):
2594 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
2595 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
2596 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
2597 Remove.
2598 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
2599 this is now the recommended name.
2600 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
2601 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
2602 ylwrap. These files now go into build-aux.
2603 * config/move-if-change: Remove.
2604 * config/prev-version.txt: Bump from 1.75 to 2.0.
2605
2606 * bootstrap: Add stdio-safer, unistd-safer modules.
2607 Remove m4/glibc2.m4 (introduced by latest gnulib, but
2608 we don't need it).
2609 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
2610 fopen-safer.c, stdio-safer.h, unistd-safer.h.
2611 * lib/subpipe.c: Include "unistd-safer.h".
2612 (create_subpipe): Make sure all the newly-created
2613 file descriptors are > 2, so that diagnostics don't
2614 get sent down them (which might cause Bison to hang, in theory).
2615 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
2616 * src/files.c (xfopen): Use fopen_safer, not fopen.
2617
2618 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
2619 yesterday's yacc.c fix.
2620
2621 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
2622
2623 * data/glr.c, data/lalr1.cc: Update copyright date.
2624
2625 Fix a destructor bug reported by Wolfgang Spraul in
2626 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
2627 * data/yacc.c (yyabortlab): Don't call destructor, and
2628 don't set yychar to EMPTY.
2629 (yyoverflowlab): Don't call destructor.
2630 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
2631 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
2632 since we no longer output the message "discarding lookahead token
2633 end of input ()".
2634
2635 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2636
2637 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
2638 fix a small glitch in debugging output.
2639 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
2640 after YY_SYMBOL_PRINT where needed.
2641
2642 (struct yyGLRState): Add some comments.
2643 (struct yySemanticOption): Add some comments.
2644 (union yyGLRStackItem): Add comment.
2645
2646 (yymergeOptionSets): Correct this to properly perform the union,
2647 avoiding infinite reported by Michael Rosien.
2648 Update comment.
2649
2650 * tests/glr-regression.at: Add test for GLR merging error reported
2651 by M. Rosien.
2652
2653 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
2654
2655 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
2656 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
2657 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
2658 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
2659 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
2660 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
2661 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
2662 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
2663 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
2664 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
2665 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
2666 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
2667 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
2668 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
2669 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
2670 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
2671 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
2672 src/derives.h, src/files.c, src/files.h, src/getargs.c,
2673 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
2674 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
2675 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
2676 src/output.h, src/parse-gram.c, src/parse-gram.h,
2677 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
2678 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
2679 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
2680 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
2681 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
2682 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
2683 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
2684 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
2685 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
2686 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
2687 tests/reduce.at, tests/regression.at, tests/sets.at,
2688 tests/synclines.at, tests/testsuite.at, tests/torture.at:
2689 Update FSF postal mail address.
2690
2691 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
2692
2693 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
2694 Problem reported by Ralf Menzel.
2695
2696 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
2697
2698 * tests/actions.at: Test that stack overflow invokes destructors.
2699 From Marcus Holland-Moritz.
2700 * data/yacc.c (yyerrlab): Move the code that destroys the stack
2701 from here....
2702 (yyreturn): to here. That way, destructors are called properly
2703 even if the stack overflows, or the user calls YYACCEPT or
2704 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
2705 (yyoverflowlab): Destroy the lookahead.
2706
2707 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
2708
2709 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
2710
2711 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
2712
2713 * NEWS: Bison-generated C parsers no longer quote literal strings
2714 associated with tokens.
2715 * src/output.c (prepare_symbols): Don't escape strings,
2716 since users don't want to see C escapes.
2717 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
2718 in diagnostics.
2719 * tests/input.at (Torturing the Scanner): Likewise.
2720 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
2721
2722 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
2723
2724 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
2725 the data size is known to be too small and we can't increase it.
2726 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
2727
2728 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
2729
2730 * src/parse-gram.y: Include quotearg.h.
2731 (string_as_id): Quote $1 before using it as a key, since the
2732 lexer no longer quotes it for us.
2733 (string_content): Don't strip quotes, since lexer no longer
2734 quotes it for us.
2735 * src/scan-gram.l: Include quotearg.h.
2736 ("\""): Omit quote.
2737 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
2738 a key, since the rest of the lexer doesn't quote it.
2739 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
2740 * tests/regression.at (Token definitions): Check for backslashes
2741 in token strings.
2742
2743 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
2744 (YYSIZE_T): Define to unsigned long int when using an older compiler.
2745 (yyparse): Revamp code to generate long syntax error message, to
2746 make it easier to translate, and to avoid problems with arithmetic
2747 overflow. Change "virtual memory" to "memory" in diagnostic, since
2748 we don't know whether the memory is virtual.
2749
2750 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
2751
2752 * NEWS: Bison-generated C parsers now use the _ macro to
2753 translate strings.
2754 * data/yacc.c (_) [!defined _]: New macro.
2755 All English strings wrapped inside this macro.
2756 * doc/bison.texinfo (Bison Parser): Document _.
2757 * po/POTFILES.in: Include src/parse-gram.c, since it now
2758 includes translateable strings that parse-gram.y doesn't.
2759
2760 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
2761
2762 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
2763 reverting the 2004-10-11 change to this function.
2764 (symbol_check_alias_consistency): Don't call symbol_type_set
2765 if the type name is already correct.
2766 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
2767
2768 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
2769
2770 * tests/regression.at (Token definitions): Don't use a token named
2771 c, as that generates a "#define c ..." that runs afoul of buggy
2772 stdlib.h that uses the identifier c as a member of struct
2773 drand48_data. Problem reported by Horst Wente.
2774
2775 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
2776
2777 * bootstrap: Change translation URL from
2778 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
2779 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
2780 redirection glitches. Problem reported by twlevo@xs4all.nl.
2781
2782 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
2783
2784 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
2785 after operands; POSIX says this isn't portable for the c99 command.
2786
2787 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
2788
2789 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
2790 immediately if a data overrun has occurred; this may help us track
2791 down what may be a spurious failure on MacOS.
2792
2793 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
2794
2795 Respond to problems reported by twlevo@xs4all.nl.
2796
2797 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
2798
2799 * src/vcg.h: Comment fix.
2800 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
2801 (G_CMAX): Change to -1 instead of INT_MAX.
2802
2803 * data/yacc.c (yyparse): Omit spaces before #line.
2804
2805 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
2806
2807 * src/tables.c (state_number_to_vector_number): Put it inside an
2808 "#if 0", since it's not currently used. Problem reported by
2809 Roland McGrath.
2810
2811 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
2812
2813 * src/output.c (escaped_output): Renamed from
2814 escaped_file_name_output, since we now use it for symbol tags as
2815 well. All uses changed.
2816 (symbol_destructors_output, symbol_printers_output):
2817 Escape symbol tags too.
2818 Problem reported by Matyas Forstner in
2819 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
2820
2821 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
2822 not needed.
2823 * src/output.c (user_actions_output, token_definitions_output,
2824 symbol_destructors_output, symbol_printers_output): Likewise.
2825 * src/reader.c (prologue_augment): Likewise.
2826 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
2827
2828 * src/vcg.c (output_edge): Don't quote linestyle arg.
2829 Problem reported by twlevo@xs4all.nl.
2830
2831 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
2832
2833 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
2834 example, reported by Derek M Jones. Also, make the example even
2835 more outrageous, to better illustrate how bad the problem is.
2836
2837 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
2838
2839 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
2840 putsym. Typo reported by Sebastian Piping.
2841
2842 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
2843
2844 * doc/bison.texinfo (Language and Grammar): some -> same
2845 (Epilogue): int he -> in the
2846 Typos reported by Sebastian Piping via Justin Pence.
2847
2848 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
2849
2850 * tests/glr-regression.at (Improper handling of embedded actions
2851 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
2852 embedded actions and $-N in GLR parsers", work around an Autoconf bug
2853 with dollar signs in test names.
2854 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
2855 for a similar reason.
2856
2857 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
2858
2859 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
2860 wants to redefine G_VIEW.
2861
2862 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
2863
2864 * src/vcg.c (get_view_str): Remove case for normal_view.
2865 Problem reported by twlevo@xs4all.nl.
2866
2867 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
2868
2869 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
2870 Problem reported by twlevo@xs4all.nl.
2871
2872 * doc/bison.texinfo: Change @dircategory from "GNU programming
2873 tools" to "Software development". Requested by Richard Stallman
2874 via Karl Berry.
2875
2876 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
2877
2878 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
2879 Problem reported by twlevo@xs4all.nl.
2880
2881 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
2882
2883 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
2884 keyword; it's not needed with modern compilers, and it doesn't
2885 affect correctness with older compilers. Suggested by
2886 twlevo@xs4all.nl.
2887
2888 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
2889
2890 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
2891 gcc -Wswitch-default.
2892 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
2893 * data/yacc.c (yyparse): Likewise.
2894
2895 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
2896
2897 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
2898 already. Let config.h define any nonstandard values.
2899
2900 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
2901
2902 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
2903 for the benefit of slower hosts. Problem reported by
2904 Nelson H. F. Beebe.
2905
2906 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
2907
2908 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
2909 being defined and not used.
2910 * data/lalr1.cc (yyparse): Likewise.
2911 Use "if (false)" rather than "if (0)".
2912
2913 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
2914
2915 * TODO: Mention that we should allow NUL bytes in tokens.
2916
2917 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
2918
2919 * src/scan-skel.l (<<EOF>>): Don't close standard output.
2920 Problem reported by Hans Aberg.
2921
2922 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
2923
2924 * src/getargs.c (version): Happy new year; update overall
2925 program copyright date from 2004 to 2005.
2926
2927 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
2928 Problem reported by Hans Aberg.
2929 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
2930 (Output file names.): Add a test for the case when standard output
2931 is closed.
2932
2933 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
2934
2935 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
2936 to fix an oversight in the Bison 2.0 manual.
2937
2938 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
2939
2940 * NEWS: Version 2.0. Reformat the existing news items since
2941 1.875, so that related items are grouped together.
2942 * configure.ac (AC_INIT): Bump version to 2.0.
2943 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
2944
2945 * tests/torture.at (Exploding the Stack Size with Alloca): Set
2946 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
2947 otherwise, we're not testing alloca. Unfortunately there's no
2948 simple way to consult HAVE_ALLOCA here.
2949
2950 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
2951 for yymsg, too.
2952
2953 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
2954 hand. This avoids a warning about comparing int to size_t when
2955 GCC warnings are enabled.
2956
2957 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
2958
2959 * NEWS: Bison-generated parsers no longer default to using the
2960 alloca function (when available) to extend the parser stack, due
2961 to widespread problems in unchecked stack-overflow detection.
2962 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
2963 responsibility to set it to a positive value. This lets the user
2964 specify a value that is not a preprocessor constant.
2965 * data/yacc.c (YYMAXDEPTH): Likewise.
2966 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
2967 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
2968 to be a compile-time constant. However, explain the constraints on it.
2969 Also, explain the constraints on YYINITDEPTH.
2970 (Table of Symbols): Explain that alloca is no longer the default.
2971 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
2972 to 1.
2973
2974 * doc/bison.texinfo (Location Default Action): Mention that n must
2975 be zero when k is zero. Suggested by Frank Heckenbach.
2976
2977 2004-12-22 Akim Demaille <akim@epita.fr>
2978
2979 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
2980 (parser::state_type, parser::semantic_type, parser::location_type):
2981 Private, not public.
2982 (parser::parse): Return ints, not bool.
2983 Returning a bool introduces a problem: 0 corresponds to false, and
2984 it seems weird to return false on success. Returning true changes
2985 the conventions for yyparse.
2986 Alternatively we could return void and send an exception.
2987 There is no clear consensus (yet?).
2988 (state_stack, semantic_stack, location_stack): Rename as...
2989 (state_stack_type, semantic_stack_type, location_stack_type): these.
2990 Private, not public.
2991 * tests/c++.at: New.
2992 * tests/testsuite.at, tests/Makefile.am: Adjust.
2993
2994 2004-12-21 Akim Demaille <akim@epita.fr>
2995
2996 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
2997
2998 2004-12-21 Akim Demaille <akim@epita.fr>
2999
3000 Don't impose std::string for filenames.
3001
3002 * data/lalr1.cc (b4_filename_type): New.
3003 (position::filename): Use it.
3004 (parser.hh): Move the inclusion of stack.hh and location.hh below
3005 the user code, so that needed headers for the filename type can be
3006 included first.
3007 Forward declare them before the user code.
3008 * tests/Makefile.am (check-local, installcheck-local): Pass
3009 TESTSUITEFLAGS to the TESTSUITE.
3010
3011 2004-12-20 Akim Demaille <akim@epita.fr>
3012
3013 Use more STL like names: my_class instead of MyClass.
3014
3015 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
3016 (SemanticStack, SemanticType, StateStack, StateType)
3017 (TokenNumberType, Stack, Slice, Traits, Parser::location)
3018 (Parser::value): Rename as...
3019 (location_stack, location_type, rhs_number_type, semantic_stack)
3020 (semantic_type, state_stack, state_type, token_number_type, stack)
3021 (slice, traits, parser::yylloc, parser::yylval): these.
3022
3023 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
3024
3025 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
3026
3027 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
3028 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3029
3030 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
3031
3032 Remove uses of 'short int' and 'unsigned short int'. This raises
3033 some arbitrary limits. It uses more memory but nowadays that's
3034 not much of an issue.
3035
3036 This change does not affect the generated parsers; that's a different
3037 task, as some users will want to conserve memory there.
3038
3039 Ideally we should use size_t to represent all object counts, and
3040 something like ptrdiff_t to represent signed differences of object
3041 counts; but that will require more code-cleanup than I have the
3042 time to do right now.
3043
3044 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
3045 Use size_t, not int or short int, to count objects.
3046 * src/closure.c (nritemset, closure): Likewise.
3047 * src/closure.h (nritemset, closure): Likewise.
3048 * src/nullable.c (nullable_compute): Likewise.
3049 * src/print.c (print_core): Likewise.
3050 * src/print_graph.c (print_core): Likewise.
3051 * src/state.c (state_compare, state_hash): Likewise.
3052 * src/state.h (struct state): Likewise.
3053 * src/tables.c (default_goto, goto_actions): Likewise.
3054
3055 * src/gram.h (rule_number, rule): Use int, not short int.
3056 * src/output.c (prepare_rules): Likewise.
3057 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
3058 errs, reductions): Likewise.
3059 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
3060 Likewise.
3061 * src/tables.c (vector_number, tally, action_number,
3062 ACTION_NUMBER_MINIMUM): Likewise.
3063 * src/output.c (muscle_insert_short_int_table): Remove.
3064
3065 2004-12-17 Akim Demaille <akim@epita.fr>
3066
3067 * data/lalr1.cc: Extensive Doxygenation.
3068 (error_): Rename as...
3069 (error): this, since it is visible to the user.
3070 Adjust callers.
3071 (Parser::message): Now an automatic variable from...
3072 (Parser::yyreport_syntax_error_): here.
3073 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
3074 Parser::error.
3075 * tests/input.at: Escape $.
3076
3077 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
3078
3079 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
3080 Parenthesize rhs to avoid obscure problems with mistakes like
3081 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
3082 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3083 b4_rhs_location): Likewise.
3084 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3085 b4_rhs_location): Likewise.
3086
3087 2004-12-16 Akim Demaille <akim@epita.fr>
3088
3089 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
3090 yacc.c: be sure to stay within yycheck_.
3091 * tests/actions.at: Re-enable C++ tests.
3092
3093 2004-12-16 Akim Demaille <akim@epita.fr>
3094
3095 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
3096 real.
3097
3098 2004-12-16 Akim Demaille <akim@epita.fr>
3099
3100 Use #define to handle the %name-prefix.
3101
3102 * data/glr.c, data/yacc.c: Comment changes.
3103 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
3104 so that one can refer to yylex in the parser file, and have it
3105 renamed, as is the case with other skeletons.
3106
3107 2004-12-16 Akim Demaille <akim@epita.fr>
3108
3109 Move lalr1.cc internals into yy*.
3110
3111 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
3112 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
3113 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
3114 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
3115 (empty_, final_, terror_, errcode_, ntokens_)
3116 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
3117 (looka_, ilooka_, error_range_, nerrs_):
3118 Rename as...
3119 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
3120 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
3121 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
3122 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
3123 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
3124 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
3125 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
3126 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
3127 these.
3128
3129 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
3130
3131 Fix some problems reported by twlevo at xs4all.
3132 * src/symtab.c (symbol_new): Report an error if the input grammar
3133 contains too many symbols. This is better than calling abort() later.
3134 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
3135 (struct node, struct graph):
3136 Rename member expand to stretch. All uses changed.
3137 (struct graph): Remove member layoutalgorithm. All uses removed.
3138 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
3139 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
3140 All uses changed.
3141 (N_STRETCH): Rename from N_EXPAND. All uses changed.
3142
3143 2004-12-15 Akim Demaille <akim@epita.fr>
3144
3145 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
3146 Add more Doxygen comments.
3147 (symprint_, stack_print_, reduce_print_, destruct_, pop)
3148 (report_syntax_error_, translate_): Rename as...
3149 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
3150 (yypop_, yyreport_syntax_error_, yytranslate_): this.
3151
3152 2004-12-15 Akim Demaille <akim@epita.fr>
3153
3154 * data/lalr1.cc (lex_): Rename as...
3155 (yylex_): this.
3156 Move the trace here.
3157 Take the %name-prefix into account.
3158 Reported by Alexandre Duret-Lutz.
3159
3160 2004-12-15 Akim Demaille <akim@epita.fr>
3161
3162 Simplify the C++ parser constructor.
3163
3164 * data/lalr1.cc (debug_): Rename as...
3165 (yydebug_): so that the parser's internals are always in the yy*
3166 pseudo namespace.
3167 Adjust uses.
3168 (b4_parse_param_decl): Remove the leading comma as it is now only
3169 called as unique argument list.
3170 (Parser::Parser): Remove the constructor accepting a location and
3171 an initial debugging level.
3172 Remove from the other ctor the argument for the debugging level.
3173 (debug_level_type, debug_level, set_debug_level): New.
3174
3175 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
3176 constructor calls.
3177
3178 2004-12-15 Akim Demaille <akim@epita.fr>
3179
3180 Remove b4_root related material: failure experiment
3181 (which goal was to allow to derive from a class).
3182
3183 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
3184 definitions and uses.
3185
3186 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
3187
3188 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
3189 not 2, since it's not portable to subtract 1 from the start of an
3190 array. The new item 0 is never set or used. All uses changed.
3191
3192 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
3193 the default definition of YYLLOC_DEFAULT. Problem reported
3194 by Frank Heckenbach.
3195
3196 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
3197
3198 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
3199 the normal case and one for the error case. Just use the
3200 first one uniformly. Problem reported by Frank Heckenbach.
3201 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
3202 use exactly the same macro in both places.
3203 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
3204 so that the normal-case YYRHSLOC works for the error case too.
3205 All uses changed.
3206 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
3207 (YYLLOC_DEFAULT): Use the same macro as glr.c.
3208 * doc/bison.texinfo (Location Default Action): Don't claim that
3209 we have an array of locations. Use the same macro for both glr
3210 and lalr parsers. Mention YYRHSLOC. Mention what happens when
3211 the index is 0.
3212
3213 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
3214
3215 * HACKING: Update email addresses to send announcements to.
3216
3217 * configure.ac (AC_INIT): Bump version to 1.875f.
3218
3219 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
3220
3221 * NEWS: Version 1.875e.
3222 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
3223
3224 * src/scan-skel.l: Include "complain.h", for "fatal".
3225
3226 * src/relation.h (relation_print, relation_digraph):
3227 Relation sizes are of type relation_node, not size_t (this is
3228 merely a doc fix, since the two types are equivalent).
3229 (relation_transpose): Relation sizes are of type relation_node,
3230 not int.
3231 * src/relation.c: Likewise.
3232 (top, infinity): Now of type relation_node, not int.
3233 (traverse, relation_transpose): Use relation_node, not int.
3234
3235 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
3236 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
3237 (yyparse): Remove unused local introduced in 2004-10-25 patch.
3238
3239 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
3240 specifying whether the test should be skipped. Use it tp
3241 specify that the [%defines %skeleton "lalr1.cc"] tests currently
3242 fail on some hosts, and should be skipped.
3243
3244 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
3245
3246 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
3247 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
3248 unless otherwise specified below.
3249
3250 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
3251 to allocate kernel_base, kernel_items, kernel_size, since
3252 they needn't be initialized to 0.
3253 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
3254 * src/closure.c (new_closure): Likewise, for itemset.
3255 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
3256 * src/lalr.c (set_goto_map): Likewise, for temp_map.
3257 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
3258 (build_relations): Likewise for edge, states1, includes.
3259 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
3260 * src/reader.c (packgram): Likewise, for ritem, rules.
3261 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
3262 * src/relation.c (relation_digraph): Likewise for VERTICES.
3263 (relation_transpose): Likewise for new_R, end_R.
3264 * src/symtab.c (symbols_token_translations_init): Likewise for
3265 token_translations.
3266 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
3267 (token_actions): Likewise for yydefact, actrow, conflrow,
3268 conflict_list.
3269 (save_column): Likewise for froms[symno], tos[symno].
3270 (goto_actions): Likewise for state_count.
3271 (pack_table): Likewise for base, pos, check.
3272 (tables_generate): Likewise for width.
3273
3274 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
3275 for initial core. Just have a separate core, so we needn't worry
3276 about whether kernel_size and kernel_base are initialized.
3277
3278 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
3279 kernel_size, kernel_items): Remove unnecessary initialization.
3280 * src/conflicts.c (conflicts): Likewise.
3281 * src/derives.c (derives): Likewise.
3282 * src/muscle_tablc (muscle_insert): Likewise.
3283 * src/relation.c (relation_digraph): Likewise.
3284 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
3285 conflrow, conflict_table, conflict_list, table, check):
3286 Likewise.
3287
3288 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
3289 This is because all callers pass unsigned int.
3290 * src/closure.h (new_closure): Likewise.
3291
3292 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
3293 (build_relations): Initialize includes[i] in all cases.
3294 * src/reader.c (packgram): Always initialize rules[ruleno].prec
3295 and rules[ruleno].precsym. Initialize members in order.
3296 * src/relation.c (relation_transpose): Always initialize new_R[i]
3297 and end_R[i].
3298 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
3299
3300 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
3301 conflict_list[0] was always 0, but now it isn't initialized.
3302
3303 * src/table.c (table_grow): When conflict_table grew, the grown
3304 area wasn't cleared. Fix this.
3305
3306 * lib/.cvsignore: Add strdup.c, strdup.h.
3307 * m4/.cvsignore: Add strdup.m4.
3308
3309 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
3310
3311 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
3312 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
3313 GOTO_NUMBER_MAXIMUM, since we occasionally compute
3314 ngotos + 1 without checking for overflow.
3315 (build_relations): Use END_NODE, not -1, to denote end of edges.
3316 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
3317 build_relations): Use goto_number, not int, for goto numbers.
3318 * src/tables.c (save_column, default_goto): Likewise.
3319
3320 2004-11-23 Akim Demaille <akim@epita.fr>
3321
3322 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
3323 of #defining from yystype.
3324 Don't typedef yystype, C++ does not need it.
3325 This lets it possible to forward declare it as union.
3326
3327 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
3328
3329 * bootstrap (gnulib_modules): Add extensions.
3330 Problem reported by Jim Meyering.
3331
3332 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
3333
3334 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
3335 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
3336 src/system.h, src/tables.c: XFREE -> free, to accommodate
3337 recent change to gnulib xalloc.h.
3338 Problem reported by Jim Meyering.
3339
3340 2004-11-17 Akim Demaille <akim@epita.fr>
3341
3342 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
3343
3344 2004-10-28 Akim Demaille <akim@epita.fr>,
3345 Alexandre Duret-Lutz <adl@gnu.org>
3346
3347 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
3348 changes.
3349 (YYCDEBUG): Adjust.
3350 Use it instead of cdebug_.
3351 (Parser::debug_stream, Parser::set_debug_stream): New.
3352 (Parser::symprint_): Define cdebug_ for temporary backward
3353 compatibility.
3354 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
3355 debug_stream ().
3356
3357 2004-11-17 Akim Demaille <akim@epita.fr>
3358
3359 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
3360 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
3361 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
3362 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
3363
3364 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
3365
3366 * data/glr.c (yyloc_default): Remove; not used.
3367 Problem reported by Frank Heckenbach.
3368
3369 2004-10-25 Akim Demaille <akim@epita.fr>
3370
3371 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
3372 Introduce another definition to address simple location arrays.
3373 (yyGLRStack): New member: yyerror_range.
3374 (yyrecoverSyntaxError, yyparse): Update it.
3375 (yyrecoverSyntaxError): Use it when shifting the error token to
3376 have an accurate range, equivalent to the one computed by both
3377 yacc.c and lalr1.cc.
3378 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
3379 that column numbers start at column 0, as per GNU Coding
3380 Standards, the others tests, and the doc.
3381 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
3382 Adjust to the above change (first column is 0).
3383 And adjust the location of the "<error>", now covering the whole
3384 line.
3385
3386 2004-10-22 Akim Demaille <akim@epita.fr>
3387 and Paul Eggert <eggert@cs.ucla.edu>
3388
3389 Remove some arbitrary limits on goto numbers and relations.
3390 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
3391 initial values, since they're never used.
3392 (set_goto_map): ngotos is now unsigned, so test for overflow
3393 by seeing whether it wraps around to zero.
3394 * src/lalr.h (goto_number): Now size_t, not short int.
3395 (GOTO_NUMBER_MAXIMUM): Remove.
3396 * src/relation.c (relation_print, traverse, relation_transpose):
3397 Check for END_NODE rather than looking at sign.
3398 * src/relation.h (END_NODE): New macro.
3399 (relation_node): Now size_t, not short int.
3400
3401 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
3402
3403 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
3404 keyword, not an identifier. Problem reported by Baron Schwartz in
3405 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
3406
3407 2004-10-11 Akim Demaille <akim@epita.fr>
3408
3409 * src/symtab.c (symbol_check_alias_consistency): Also check
3410 type names, destructors, and printers.
3411 Reported by Alexandre Duret-Lutz.
3412 Recode the handling of associativity and precedence in terms
3413 of symbol_precedence_set.
3414 Accept no redeclaration at all, not even equal to the previous
3415 value.
3416 (redeclaration): New.
3417 Use it to factor redeclaration complaints.
3418 (symbol_make_alias): Don't set the type of the alias, let
3419 symbol_check_alias_consistency do it as for other features.
3420 * src/symtab.h (symbol): Add new member prec_location, and
3421 type_location.
3422 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
3423 * tests/input.at (Incompatible Aliases): New.
3424
3425 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
3426
3427 .cvsignore fixes to accommodate gnulib changes,
3428 and the practice of naming build directories "_build".
3429 * .cvsignore: Add "_*". Sort.
3430 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
3431 * m4/.cvsignore: Add "*_gl.m4".
3432
3433 2004-10-06 Akim Demaille <akim@epita.fr>
3434
3435 * src/parse-gram.y (add_param): Fix the truncation of trailing
3436 spaces.
3437
3438 2004-10-05 Akim Demaille <akim@epita.fr>
3439
3440 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
3441 whether the reducion was empty or not. This leaves room to
3442 improve the use of YYLLOC_DEFAULT in such a case.
3443 lalr1.cc is still experimental, so changing this is acceptable.
3444 And finally, there are probably not many users who changed the
3445 handling of locations in GLR, so changing is admissible too.
3446
3447 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
3448 empty reduction, set @$ to an empty location ending the previously
3449 stacked symbol.
3450 Adjust uses to make sure the code is triggered on empty
3451 reductions.
3452 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
3453 expected output: empty reductions have empty locations.
3454
3455 2004-09-29 Akim Demaille <akim@epita.fr>
3456
3457 * data/lalr1.cc: Move towards a more standard C++ coding style
3458 for templates: Class < T > -> Class<T>.
3459
3460 2004-09-29 Akim Demaille <akim@epita.fr>
3461
3462 * data/lalr1.cc: Reinstall the former ctor, for sake of
3463 compatibility, but warn it will be removed.
3464 Move towards a more standard C++ coding style (i.e., type *var ->
3465 type* var).
3466
3467 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
3468
3469 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
3470 since it's less likely to work if NULs are involved in the future.
3471
3472 2004-09-27 Akim Demaille <akim@epita.fr>
3473
3474 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
3475
3476 2004-09-27 Akim Demaille <akim@epita.fr>
3477
3478 * data/lalr1.cc (b4_parse_param_decl_1): New.
3479 (b4_parse_param_decl): Use it to have different names between attribute
3480 and argument names.
3481 (b4_cc_constructor_call): Likewise.
3482
3483 2004-09-24 Akim Demaille <akim@epita.fr>
3484
3485 * src/parse-gram.y (add_param): Strip the leading and trailing
3486 blanks from a formal argument declaration.
3487 (YY_LOCATION_PRINT): New.
3488
3489 2004-09-24 Akim Demaille <akim@epita.fr>
3490
3491 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
3492 after the location.
3493
3494 2004-09-24 Akim Demaille <akim@epita.fr>
3495
3496 * doc/bison.texinfo (Table of Symbols): Sort.
3497
3498 2004-09-21 Akim Demaille <akim@epita.fr>
3499
3500 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
3501 the useless parentheses.
3502 Suggested by Paul Eggert.
3503
3504 2004-09-20 Akim Demaille <akim@epita.fr>
3505
3506 Let the initial-action act on the look-ahead, and use it for the
3507 "initial push" (corresponding to an hypothetical beginning-of-file).
3508 And let lalr1.cc honor %initial-action.
3509
3510 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
3511 example.
3512 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
3513 (Parser::Parser): Remove the ctor that used to initialize it.
3514 (Parser::parse): Like in the other skeletons, issue the "starting
3515 parse" message before any action.
3516 Honor %initial-action.
3517 Initialize the stacks with the lookahead.
3518 * data/yacc.c: Let $$ and @$ in %initial-action designate the
3519 look-ahead.
3520 Push them in the stacks.
3521 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
3522
3523 2004-09-20 Akim Demaille <akim@epita.fr>
3524
3525 * doc/bison.texinfo (Initial Action Decl): New.
3526
3527 2004-09-20 Akim Demaille <akim@epita.fr>
3528
3529 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
3530 clearer criterion to define it.
3531 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
3532 When reducing on an empty RHS, use the latest stacked location as
3533 location.
3534 yylloc is not always available.
3535 * data/glr.c: Likewise.
3536 Also, honor initial-actions.
3537
3538 2004-09-20 Akim Demaille <akim@epita.fr>
3539
3540 * data/yacc.c (YY_LOCATION_PRINT): New.
3541 Define when we know YYLTYPE's structure, i.e., when the default
3542 YYLLOC_DEFAULT is used.
3543 * data/c.m4 (b4_yysymprint_generate): Use it.
3544 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
3545 value of the result.
3546 (error_start_): Replace with...
3547 (error_range_): this location array.
3548 This allows to replace code relying on the implementation of
3549 locations by portable code.
3550 * data/yacc.c (yylerrsp): Replace with...
3551 (yyerror_range): this.
3552 Every time a token is popped, update yyerror_range[0], to have an
3553 accurate location for the error token.
3554 * data/glr.c (YY_LOCATION_PRINT): New.
3555 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
3556 deference a pointer.
3557 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
3558 report the location in %printers.
3559
3560 * src/scan-skel.l: Instead of abort, report error messages to ease
3561 understanding skeleton scanning failures.
3562
3563 2004-09-16 Akim Demaille <akim@epita.fr>
3564
3565 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
3566 (iterator, const_iterator): these, to be more in the C++ spirit.
3567 Also, return reverse iterators so that when displaying the stack
3568 we display its bottom first.
3569 (Parser::stack_print_, Parser::reduce_print_): Match the messages
3570 from yacc.c.
3571 We should probably use vector here though.
3572
3573 2004-09-16 Akim Demaille <akim@epita.fr>
3574
3575 Have more complete shift traces.
3576
3577 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
3578 to report Shifts instead of ad hoc YYDPRINTF invocations,
3579 including for the error token.
3580 * data/lalr1.cc (symprint_): Output the location.
3581 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
3582 output the location within the %printer.
3583 Activate GLR tests, at least to make sure they compile properly.
3584 They still don't pass though.
3585 * tests/calc.at: Adjust expect verbose output, since now "Entering
3586 state..." is on a different line than the "Shifting" message.
3587
3588 2004-09-08 Akim Demaille <akim@epita.fr>
3589
3590 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
3591 Bison directive from the Bison file to the invocation of this
3592 macro, so that these directives are passed to
3593 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
3594 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
3595 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
3596 the extra Bison directives instead of the whole series.
3597 Change the grammar so that there are recoverable errors, and
3598 unrecoverable errors. Now we can have the parser give up before
3599 consuming the whole input. As a result we now can observe that
3600 the lookahead is freed when needed.
3601 Change the parser source to parse argv[1] instead of a hard coded
3602 string.
3603 Simplify yylex, and give a value and location to EOF.
3604 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
3605 passed directives already coded in the file.
3606 Add some tests to check the location of "error".
3607 For some tests, the C++ parser is correct, and not yacc.c.
3608 For other tests, they provide different, but unsatisfying, values,
3609 so keep the C++ value so that at least one parser is "correct"
3610 according to the test suite.
3611 (Actions after errors): Remove, this is subsumed by the
3612 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
3613
3614 2004-09-06 Akim Demaille <akim@epita.fr>
3615
3616 * data/lalr1.cc: Adjust the indentation of the labels.
3617 (Parser::pop): New.
3618 Use it.
3619
3620 2004-09-06 Akim Demaille <akim@epita.fr>
3621
3622 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
3623 argument, an informative message.
3624 Call YY_SYMBOL_PRINT.
3625 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
3626 * data/lalr1.cc (destruct_): Likewise.
3627 In addition, no longer depend on b4_yysymprint_generate and
3628 b4_yydestruct_generate to generate these functions, do it "by
3629 hand".
3630
3631 2004-09-03 Akim Demaille <akim@epita.fr>
3632
3633 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
3634 invoked, yydestruct the lookahead.
3635 * tests/calc.at (Calculator $1): Update the expected lengths of
3636 traces: there is an added line for the discarded lookahead.
3637 * doc/bison.texinfo (Destructor Decl): Some rewording.
3638 Define "discarded" symbols.
3639
3640 2004-09-02 Akim Demaille <akim@epita.fr>
3641
3642 * data/lalr1.cc (translate_, destruct_): No reason to be static.
3643
3644 2004-09-02 Akim Demaille <akim@epita.fr>
3645
3646 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
3647 (YYDSYMPRINTF): Rename as...
3648 (YY_SYMBOL_PRINT): this.
3649 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
3650 two.
3651 Use it instead of direct symprint_ calls.
3652 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
3653 one.
3654
3655 2004-09-02 Akim Demaille <akim@epita.fr>
3656
3657 * data/lalr1.cc (b4_yysymprint_generate): New.
3658 (symprint_): New member function, defined when YYDEBUG.
3659 Use it consistently instead of token/nterm debugging output by
3660 hand.
3661 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
3662 %printer calls to use cdebug_ when using lalr1.cc.
3663
3664 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
3665
3666 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
3667 with #ifdef YYDEBUG.
3668
3669 2004-08-26 Akim Demaille <akim@epita.fr>
3670
3671 * doc/bison.texinfo (Implementing Loops): Rename as...
3672 (Implementing Gotos/Loops): this.
3673
3674 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
3675
3676 Adjust to latest gnulib.
3677 * bootstrap (gnulib_modules): Add xalloc-die.
3678 Set LC_ALL=C so that file names sort consistently.
3679 Prefer the gnulib copies of gettext.m4, glibc21.m4,
3680 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
3681 uintmax_t.m4, ulonglong.m4.
3682 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
3683 po.m4 since we are now using _gl.m4 instead.
3684
3685 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
3686
3687 * src/scan-action.l: Remove. Scanning of semantic actions is
3688 handled in scan-gram.l.
3689
3690 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
3691
3692 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
3693
3694 * src/location.h (struct): The file member is a uniqstr.
3695 (equal_boundaries): Use UNIQSTR_EQ for comparison.
3696
3697 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
3698
3699 Fix bug with non-%union parsers that have printers or destructors,
3700 which led to a Bison core dump. Reported by Peter Fales in
3701 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
3702
3703 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
3704 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
3705 not to our own type.
3706 * src/output.c (symbol_destructors_output, symbol_printers_output):
3707 Don't assume %union.
3708 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
3709 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
3710 UNION-FLAG. All callers changed.
3711 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
3712 Use type char, not unsigned int, when declaring an array of char;
3713 this lets us remove a cast.
3714 (Printers and Destructors): Add non-%union test cases.
3715
3716 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
3717
3718 * doc/bison.texinfo: Minor editorial changes, mostly to the new
3719 GLR writeups. E.g., avoid frenchspacing and the future tense,
3720 change "lookahead" to "look-ahead", and change "wrt" to "with
3721 respect to".
3722
3723 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3724
3725 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
3726 New sections, split off from the GLR Parsers section. Put the new
3727 Simple GLR Parser near the start of the GLR section, for clarity.
3728 Rewrite connective text.
3729
3730 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
3731
3732 * doc/bison.texinfo (Simple GLR Parsers): New section.
3733
3734 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
3735
3736 * NEWS, TODO, doc/bison.texinfo:
3737 Use "look-ahead" instead of "lookahead", to be consistent.
3738 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
3739 while we're fixing "look-ahead".
3740 * src/conflicts.c (shift_set): Renamed from shiftset.
3741 (look_ahead_set): Renamed from lookaheadset.
3742 * src/print.c: Likewise.
3743 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
3744 name for "lookahead".
3745 (report_types, usage): Likewise.
3746 * src/getargs.h (report_look_ahead_tokens): Renamed from
3747 report_lookaheads.
3748 * src/lalr.c (compute_look_ahead_tokens): Renamed from
3749 compute_lookaheads.
3750 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
3751 (look_ahead_tokens_print): Renamed from lookaheads_print.
3752 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
3753 state_rule_lookaheads_print.
3754 * src/state.h: Likewise.
3755 (reductions.look_ahead_tokens): Renamed from lookaheads.
3756 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
3757 AT_DATA_LOOKAHEADS_GRAMMAR.
3758
3759 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
3760
3761 * README: Update location of patched M4 distribution.
3762
3763 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
3764
3765 Don't assume the C++ compiler takes the same arguments as the C compiler
3766 (trivial change).
3767 * configure.ac (O0CXXFLAGS): New var.
3768 * tests/atlocal.in (CXXFLAGS): Use it.
3769
3770 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
3771
3772 Fix some "make check" problems with C++ reported by
3773 Albert Chin-A-Young for Tru64 C++ in this thread:
3774 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
3775
3776 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
3777 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3778 Output to a .cc file for C++, not to a .c file.
3779 * tests/calc.at (AT_CHECK_CALC): Likewise.
3780 * tests/regression.at (AT_CHECK_DANCER): Likewise.
3781 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
3782
3783 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
3784
3785 * tests/calc.at, tests/actions.at: Workaround for SGI
3786 C++ compiler. (trivial change)
3787
3788 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
3789
3790 Spent a few hours checking out which prerequisite versions the
3791 current sources actually require. I went all the way back to
3792 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
3793 a seemingly endless set of combinations of versions more recent
3794 than that. The bottom line is that the current sources require
3795 fairly recent versions of the build tools, and it'll be some work
3796 to change this.
3797 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
3798 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
3799 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
3800 Add comments explaining why those particular versions are
3801 currently needed.
3802
3803 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
3804 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
3805 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
3806
3807 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
3808 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
3809
3810 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
3811
3812 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
3813 0.11.5. Suggested by Bruno Haible.
3814 * bootstrap: Remove gettext version checking.
3815
3816 * doc/bison.texinfo (Decl Summary): Also mention that %union
3817 can depend on prerequisite types. Problem reported by Tim
3818 Van Holder.
3819
3820 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
3821
3822 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
3823 * README-alpha: Don't tell people not to package this.
3824
3825 * bootstrap: Don't assume $(...) works; use `...` instead.
3826 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
3827 gettext better.
3828
3829 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
3830 put into the -d output file, and mention what to do if YYSTYPE is
3831 defined as a macro.
3832
3833 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
3834
3835 Undo change made earlier today: it caused autopoint to not bring
3836 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
3837 autopoint's.
3838
3839 * bootstrap: Check that gettext version matches what's in
3840 configure.ac. Warn users to ignore robots.txt ERROR 404.
3841 * bootstrap: Undo today's earlier change (logged below).
3842 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
3843
3844 The gettext version checking is causing more trouble than it's
3845 curing; remove it. Problem reported by Paul Hilfinger.
3846
3847 * bootstrap: Issue a warning that one can expect a message
3848 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
3849 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
3850
3851 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
3852
3853 Ensure that the C++ compiler used for testing actually works on a
3854 simple test program; if not, skip the C++-related tests. Problem
3855 reported by Vin Shelton in:
3856 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
3857
3858 * m4/cxx.m4: New file.
3859 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
3860 * tests/atlocal.in (BISON_CXX_WORKS): Add.
3861 * tests/local.at (AT_COMPILE_CXX): Use it.
3862
3863 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
3864
3865 * data/glr.c (yylloc): Output this macro even if locations are not
3866 being generated, as the GLR parser needs it even in that case.
3867 Problem reported by Troy A. Johnson
3868 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
3869
3870 * configure.ac (AC_INIT): Update to 1.875e.
3871
3872 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
3873
3874 * NEWS: Version 1.875d.
3875 * configure.ac (AC_INIT): Likewise.
3876 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
3877
3878 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
3879 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
3880 lalr1.cc runs afoul of the first, and the last two are no longer
3881 supported by GCC 3.4.0.
3882 * README: Mention GNU m4 1.4 or later; mention m4 patches.
3883 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
3884
3885 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
3886
3887 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
3888 unsigned int, for compatibility with latest gnulib hash module.
3889 * src/state.c (state_hash, state_hasher): Likewise.
3890 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
3891 * src/uniqstr.c (hash_uniqstr): Likewise.
3892
3893 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
3894
3895 * NEWS: Unescaped newlines are no longer allowed in char & strings.
3896
3897 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
3898 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
3899 character and string literals.
3900 (unexpected_end): New function.
3901 (unexpected_eof): Use it.
3902 (unexpected_newline): New function.
3903 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
3904 actions.
3905
3906 * NEWS: Document %expect-rr.
3907
3908 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
3909 Fix typo by replacing $1 with $option.
3910 Remove more 'intl'-related files.
3911 Don't DEFUN AM_INTL_SUBDIR twice.
3912
3913 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
3914 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
3915 strtoul.c.
3916 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
3917 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
3918 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
3919 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
3920 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
3921 * src/.cvsignore: Add *.output.
3922
3923 * src/parse-gram.y: Put copyright notice inside %{ %} so it
3924 gets copied to the output file.
3925
3926 2004-04-28 Paul Eggert <eggert@twinsun.com>
3927
3928 Get files from the gnulib and po repositories, instead of relying
3929 on them being in our CVS. Upgrade to latest versions of gnulib
3930 and Automake.
3931
3932 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
3933 * bootstrap: Bootstrap from gnulib and po repositories.
3934 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
3935 * README-cvs: Document these changes. Remove version numbers from
3936 mentions of build tools, since they change so often. Mention Flex.
3937
3938 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
3939 (gl_USE_SYSTEM_EXTENSIONS): Add.
3940 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
3941 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
3942 does this for us.
3943 (AC_ISC_POSIX): Remove; we no longer support this
3944 ancient OS, as it gets in the way of latest Autoconf & gnulib.
3945 (AC_HEADER_STDC): Remove: we now assume C89 or better.
3946 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
3947 Do not check for C89 headers, except for locale.h which is used
3948 by the Yacc library and must port to K&R hosts.
3949 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
3950 Do not check for C89 functions, except for setlocale which is
3951 used by the Yacc library.
3952 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
3953 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
3954 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
3955 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
3956 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
3957 AM_GNU_GETTEXT): Remove; now done by:
3958 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
3959 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
3960 for us.
3961
3962 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
3963 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
3964 Define to empty, as gnulib.mk will do the rest for us.
3965 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
3966 for us.
3967 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
3968 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
3969
3970 * src/files.c: Include gnulib's xstrndup.h.
3971
3972 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
3973 (REALLOC): Use xnrealloc, for likewise.
3974 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
3975 (strnlen, memrchr): Remove decls; functions no longer used.
3976 Include <stpcpy.h>.
3977
3978 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
3979 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3980 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
3981 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
3982 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
3983 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
3984 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
3985 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
3986 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
3987 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
3988 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
3989 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3990 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
3991 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
3992 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
3993 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
3994 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
3995 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
3996 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
3997 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
3998 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
3999 Remove, as these files are now generated automatically
4000 by bootstrap or automake.
4001
4002 * po/ChangeLog: Remove: all but one entry was a duplicate
4003 of this file, and I moved that 2000-11-02 entry here.
4004
4005 * config/.cvsignore: Add Makefile, depcomp, install-sh.
4006 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
4007 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
4008 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
4009 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
4010 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
4011 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
4012 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
4013 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
4014 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
4015 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
4016 xstrndup.h.
4017 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
4018 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
4019 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
4020 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
4021 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
4022 * src/.cvsignore: Remove *_.c.
4023
4024
4025 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
4026 support it. (The latest stable gzip doesn't.)
4027
4028 2004-04-27 Paul Eggert <eggert@twinsun.com>
4029
4030 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
4031 case, as stos_ is now used by destructors due to the 2004-02-09
4032 change.
4033
4034 Remove more K&R C support.
4035 * lib/libiberty.y (PARAMS): Remove. All uses removed.
4036 * lib/subpipe.c (errno): Remove decl.
4037 Include <stdlib.h> unconditionally.
4038 (EXIT_FAILURE): Remove macro.
4039 * src/complain.c (vfprintf, strerror): Remove.
4040 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
4041 unconditionally.
4042 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
4043 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
4044 (strchr, strspn, memchr): Remove decls.
4045 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
4046 unconditionally. Do not declare perror.
4047 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
4048 unconditionally.
4049
4050 * src/complain.c (_): Remove useless defn, as system.h defines this.
4051
4052 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
4053 with latest obstack.h.
4054 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
4055 to procedure types, as obstack.h now does that for us.
4056 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
4057
4058 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
4059 so that this include file can stand alone.
4060 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
4061 does this now. Include subpipe.h first after config.h, to
4062 test whether it can stand alone.
4063
4064 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
4065 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
4066 unused declaration.
4067
4068 * tests/synclines.at (%union synch line): Put a dummy member in
4069 the union, because empty unions aren't allowed in C. Caught
4070 by GCC 3.4.0.
4071
4072 2004-04-13 Jim Meyering <jim@meyering.net>
4073
4074 * src/conflicts.c (conflicts_print): Correct format string typo:
4075 use `%%' to produce literal `%'. (trivial change)
4076
4077 2004-03-30 Paul Eggert <eggert@twinsun.com>
4078
4079 * src/getargs.c (version): Update copyright year to 2004.
4080
4081 * data/c.m4 (b4_int_type): Use 'short int' rather than
4082 'short', and similarly for 'long', 'unsigned', etc.
4083 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
4084 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
4085 yy_yypstack, yydumpstack): Likewise.
4086 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
4087 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
4088 Likewise.
4089 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
4090 yy_stack_print, yyparse): Likewise.
4091 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
4092 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
4093 * lib/bitset.c (bitset_print): Likewise.
4094 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
4095 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
4096 * lib/bitsetv.c (bitsetv_dump): Likewise.
4097 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
4098 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
4099 Likewise.
4100 * src/LR0.c (allocate_itemsets): Likewise.
4101 * src/gram.h (rule_number, rule): Likewise.
4102 * src/lalr.h (goto_number): Likewise.
4103 * src/nullable.c (nullable_compute): Likewise.
4104 * src/output.c (prepare_rules): Likewise.
4105 * src/relation.c (relation_print, relation_digraph): Likewise.
4106 * src/relation.h (relation_node): Likewise.
4107 * src/state.h (state_number, transitions, errs, reductions,
4108 struct state): Likewise.
4109 * src/symtab.h (symbol_number, struct symbol): Likewise.
4110 * src/tables.c (vector_number, tally, action_number,
4111 default_goto, goto_actions): Likewise.
4112 * tests/existing.at (GNU Cim Grammar): Likewise.
4113 * tests/regression.at (Web2c Actions): Likewise.
4114
4115 * src/output.c (muscle_insert_short_int_table): Renamed from
4116 muscle_insert_short_table. All uses changed.
4117
4118 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4119
4120 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
4121 (declaration): Replace expected_conflicts with expected_sr_conflicts.
4122 Add %expect-rr rule.
4123
4124 * src/scan-gram.l: Recognize %expect-rr.
4125
4126 * src/conflicts.h (expected_sr_conflicts): Rename from
4127 expected_conflicts.
4128 (expected_rr_conflicts): Declare.
4129
4130 * src/conflicts.c (expected_sr_conflicts): Rename from
4131 expected_conflicts.
4132 (expected_rr_conflicts): Define.
4133 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
4134 for GLR parsers.
4135 Use expected_sr_conflicts in place of expected_conflicts.
4136 Warn if expected_rr_conflicts used in non-GLR parser.
4137
4138 * doc/bison.texinfo: Add documentation for %expect-rr.
4139
4140 2004-03-08 Paul Eggert <eggert@gnu.org>
4141
4142 Add support for hex token numbers. Suggested by Odd Arild Olsen in
4143 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
4144
4145 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
4146 in lalr1.cc.
4147 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
4148 * src/scan-gram.l (scan_integer): New function.
4149 ({int}): Use it.
4150 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
4151 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
4152 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
4153 Say "long int", not "long", for uniformity with GNU style.
4154
4155 2004-02-25 Paul Eggert <eggert@twinsun.com>
4156
4157 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
4158 compilers. This fixes a problem with Intel's C++ compiler being
4159 chatty, reported by Guido Trentalancia in
4160 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
4161
4162 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
4163
4164 Support %destructor and merge error locations in lalr1.cc.
4165
4166 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
4167 (Parser::stos_): Define unconditionally.
4168 (Parser::destruct_): New method. Generate its body with
4169 b4_yydestruct_generate.
4170 (Parser::error_start_): New attribute.
4171 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
4172 token which are discarded.
4173 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
4174 error_start_ when erroneous token are discarded.
4175 (Parser::parse) <yyerrlab1>: Compute the location of the error
4176 token so that it covers all the discarded tokens.
4177 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
4178 it can be called with `%skeleton "lalr1.cc"', and do that.
4179
4180 2004-02-02 Paul Eggert <eggert@twinsun.com>
4181
4182 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
4183 $(top_srcdir)/lib and ../lib. This fixes a bug reported
4184 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
4185 There's no need to mention top_builddir since Automake does that
4186 for us.
4187 (INCLUDES): Remove, as Automake says it's obsolescent.
4188 Contents migrated into AM_CPPFLAGS as described above.
4189 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
4190
4191 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4192
4193 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
4194 (yyreportSyntaxError): Handle case where lookahead token is
4195 YYEMPTY.
4196
4197 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4198
4199 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
4200 resulting parsers are compilable with C++.
4201
4202 2003-12-23 Paul Eggert <eggert@twinsun.com>
4203
4204 * config/depcomp, config/install-sh: Sync with Automake 1.8.
4205 * src/output.c (output_skeleton): Rename local var.
4206 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
4207 Bison tokens, as this runs afoul of the 2003-10-07 change that
4208 disallowed NUL bytes in character constants or string literals.
4209
4210 * tests/local.at: Require Autoconf 2.59's Autotest.
4211 * tests/testsuite.at: Don't include local.at, since we now assume
4212 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
4213 including it.
4214 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
4215 multiple inclusion warnings.
4216
4217 2003-12-02 Akim Demaille <akim@epita.fr>
4218
4219 * doc/bison.texinfo (How Can I Reset the Parser): More about start
4220 conditions.
4221 From Bruno Haible.
4222
4223 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
4224
4225 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
4226
4227 2003-10-07 Paul Eggert <eggert@twinsun.com>
4228
4229 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
4230 if testsuite doesn't exist.
4231
4232 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
4233 literals, unfortunately.
4234 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
4235 Complain about NUL bytes in character constants or string literals.
4236
4237 2003-10-05 Paul Eggert <eggert@twinsun.com>
4238
4239 * NEWS: Don't document %no-default-prec, as it's still
4240 too experimental.
4241 * doc/bison.texinfo: Document %no-default-prec only if
4242 the defaultprec flag is set. Normally it's not.
4243
4244 2003-10-04 Paul Eggert <eggert@twinsun.com>
4245
4246 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
4247 non-modifiable lvalue, instead of a modifiable one.
4248 * doc/bison.texinfo (Actions): Document that $$ can
4249 be assigned to. Do not claim that $$ and $N are
4250 array element references: user code should not rely on this.
4251
4252 2003-10-01 Paul Eggert <eggert@twinsun.com>
4253
4254 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
4255 (grammar_declaration): Use it.
4256 * src/scan-gram.l: New token %no-default-prec.
4257 * tests/conflicts.at: Revamp tests to use %no-default-prec.
4258 * NEWS, doc/bison.texinfo: Document the above.
4259
4260 2003-10-01 Akim Demaille <akim@epita.fr>
4261
4262 VCG no longer supports long_straight_phase.
4263
4264 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
4265 * src/print_graph.c (print_graph): Adjust.
4266
4267 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
4268 and Paul Eggert <eggert@twinsun.com>
4269
4270 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
4271 Table of Symbols): Document %default-prec.
4272 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
4273 (grammar_declaration): Set default_prec on %default-prec.
4274 * src/scan-gram.l (%default-prec): New token.
4275 * src/reader.h (default_prec): New flag.
4276 * src/reader.c: Likewise.
4277 (packgram): Handle it.
4278 * tests/conflicts.at (%default-prec without %prec,
4279 %default-prec with %prec, %default-prec 1): New tests.
4280
4281 2003-09-30 Paul Eggert <eggert@twinsun.com>
4282
4283 * tests/testsuite.at: Include local.at, not input.at, fixing
4284 a typo in the 2003-08-25 patch.
4285
4286 2003-08-27 Akim Demaille <akim@epita.fr>
4287
4288 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
4289 GCC warnings.
4290
4291 2003-08-26 Akim Demaille <akim@epita.fr>
4292
4293 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
4294 "<\#" to avoid magic from Gnus when posting parts of this script.
4295
4296 2003-08-26 Akim Demaille <akim@epita.fr>
4297
4298 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
4299 (Parser::parse): here.
4300 Adjust: nerrs and errstatus is now replaced by...
4301 (Parser::nerrs_, Parser::errstatus_): New.
4302
4303 2003-08-25 Akim Demaille <akim@epita.fr>
4304
4305 * config/announce-gen, Makefile.cfg: New.
4306 * Makefile.am: Adjust.
4307 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
4308 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
4309
4310 2003-08-25 Akim Demaille <akim@epita.fr>
4311
4312 When reducing initial empty rules, Bison parser read an initial
4313 location that is not defined. This results in garbage, and that
4314 affects Bison's own parser. Therefore we need (i) to extend Bison
4315 to support a means to initialize this location, and (ii) to use
4316 this CVS Bison to fix CVS Bison's parser.
4317
4318 * src/reader.h, reader.c (epilogue_augment): Remove, replace
4319 with...
4320 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
4321 * src/parse-gram.y: Adjust.
4322 (%initial-action): New.
4323 (%error-verbose): Since we require CVS Bison, there is no reason
4324 not to use it.
4325 * src/scan-gram.l: Adjust.
4326 * src/Makefile.am (YACC): New, to make sure we use our own parser.
4327 * data/yacc.c (yyparse): Use b4_initial_action.
4328
4329 2003-08-25 Akim Demaille <akim@epita.fr>
4330
4331 * doc/bison.texinfo: Don't promote stdout for error messages.
4332
4333 2003-08-25 Akim Demaille <akim@epita.fr>
4334
4335 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
4336 From Alexandre Duret-Lutz.
4337
4338 2003-08-25 Akim Demaille <akim@epita.fr>
4339
4340 Version 1.875c.
4341
4342 2003-08-25 Akim Demaille <akim@epita.fr>
4343
4344 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
4345 Use them.
4346
4347 2003-08-25 Akim Demaille <akim@epita.fr>
4348
4349 * data/lalr1.cc (Parser::reduce_print_): New.
4350 Use it.
4351
4352 2003-08-25 Akim Demaille <akim@epita.fr>
4353
4354 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
4355 error recovery loops. This patch is based on
4356 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
4357 Also, augment the similarity between lalr1.cc and yacc.c.
4358 Note: the locations of error recovery rules are not correct yet.
4359
4360 * data/lalr1.cc: Comment changes to augment the similarity between
4361 lalr1.cc and yacc.c.
4362 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
4363 (yyerrlab1): Remove, but where it used to be (now the bottom part of
4364 yyerrlab), when hitting EOF, pop the whole stack here instead of
4365 merely falling thru the default error handling mechanism.
4366 (yyerrorlab): New label, with the old contents of YYERROR,
4367 plus the following change: pop the stack of rhs corresponding
4368 to the production that invoked YYERROR. That is how Yacc
4369 behaves (required by POSIX).
4370 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
4371 fail.
4372
4373 2003-08-25 Akim Demaille <akim@epita.fr>
4374
4375 Tune local.at so that people can "autom4te -l autotest calc.at -o
4376 calc" for instance, to extract a sub test suite.
4377
4378 * tests/testsuite.at: Move the initialization, Autotest version
4379 requirement, and AT_TESTED invocation into...
4380 * tests/local.at: here.
4381 * tests/testsuite.at: Include it for compatibility with Autoconf
4382 2.57.
4383 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
4384 be ignore.
4385
4386 2003-08-04 Paul Eggert <eggert@twinsun.com>
4387
4388 Rework code slightly to avoid gcc -Wtraditional warnings.
4389 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
4390 The returned value is now stored in *YY0. All callers changed.
4391 * src/output.c (merge_output): Adjust to the above change.
4392
4393 2003-07-26 Paul Eggert <eggert@twinsun.com>
4394
4395 * data/glr.c (YYASSERT): New macro.
4396 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
4397 yyresolveStates, yyprocessOneStack):
4398 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
4399 Derived from a suggestion by Frank Heckenbach.
4400
4401 2003-07-25 Paul Eggert <eggert@twinsun.com>
4402
4403 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
4404 for portability to K&R C (after ansi2knr, presumably). See
4405 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
4406 by Frank Heckenbach, though I have omitted the structure-initialization
4407 part of his glr-knr.diff patch since I recall that the Portable
4408 C Compiler didn't require that change.
4409
4410 Let the user specify how to allocate and free memory.
4411 Derived from a suggestion by Frank Heckenbach in
4412 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
4413 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
4414 All uses of free, malloc, realloc changed to use these macros,
4415 and unnecessary casts removed.
4416 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
4417
4418 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
4419
4420 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
4421 use s.empty() rather than s == "" to test for empty string; see
4422 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
4423 (trivial change)
4424
4425 2003-06-25 Akim Demaille <akim@epita.fr>
4426
4427 * config/depcomp, config/install-sh: Update from masters.
4428
4429 2003-06-20 Paul Eggert <eggert@twinsun.com>
4430
4431 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
4432 and return properly parenthesized result.
4433 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
4434 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4435 Remove unnecessary parentheses from uses.
4436 * doc/bison.texinfo (Location Default Action): Describe the
4437 conventions for parentheses.
4438
4439 2003-06-19 Paul Eggert <eggert@twinsun.com>
4440
4441 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
4442 yyreportTree): Do not assume that size_t is the same width as int,
4443 when printing sizes. Print sizes using an unsigned format.
4444 Problem reported by Frank Heckenbach in
4445 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4446
4447 Port to Forte Developer 7 C compiler.
4448 * data/glr.c (struct YYLTYPE): If locations are not being used,
4449 declare a single dummy member, as empty structs do not conform
4450 to the C standard.
4451 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
4452 the Forte Developer 7 C compiler complains that end-of-loop
4453 code is not reached.
4454
4455 2003-06-17 Paul Eggert <eggert@twinsun.com>
4456
4457 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
4458 avoid warnings from picky compilers about redefinition of PARAMS.
4459
4460 2003-06-17 Paul Eggert <eggert@twinsun.com>
4461
4462 Version 1.875b.
4463
4464 * NEWS: Document 1.875b.
4465
4466 * lib/bbitset.h: Do not include config.h; that's the includer's job.
4467 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
4468 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
4469 Don't use 'index' in comments, as it's a builtin fn on some hosts.
4470 * lib/bitset_stats.c: Include gettext.h unconditionally, as
4471 per recent gettext manual's suggestion.
4472 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
4473 Use prototypes, not old-style definitions.
4474 * lib/lbitset.c (lbitset_unused_clear): Likewise.
4475 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
4476 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
4477 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
4478 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
4479 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
4480 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
4481 vbitset_or_and_cmp, vbitset_copy): Likewise.
4482
4483 * lib/libiberty.h: Do not include config.h; that's the includer's job.
4484 Do not include <stdlib.h>.
4485 (PARAMS): Define unconditionally for C89.
4486 (ATTRIBUTE_NORETURN): Remove.
4487 (ATTRIBUTE_UNUSED): Define unconditionally.
4488
4489 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
4490 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
4491 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
4492 * lib/vbitset.c, lib/vbitset.h: New files.
4493 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
4494 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
4495 from libbitset.
4496
4497 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
4498 `How Can I Reset @code{yyparse}', since texinfo does not allow
4499 arbitrary @ in node names.
4500
4501 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
4502 shouldn't be needed according to the gettext 0.12.1 documentation
4503 but which seem to be needed anyway: codeset.m4 glibc21.m4
4504 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
4505 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
4506 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
4507
4508 * lib/.cvsignore: Add stdbool.h.
4509 * m4/.cvsignore: Add nls.m4, po.m4.
4510
4511 Upgrade to CVS gnulib.
4512 * stdbool_.h: File renamed from stdbool.h.in.
4513 * configure.ac (AM_STDBOOL_H): Invoke this instead of
4514 AC_HEADER_STDBOOL.
4515 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
4516 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
4517 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
4518 (MOSTLYCLEANFILES): New var.
4519 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
4520 (stdbool.h): New rule.
4521 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
4522 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
4523 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
4524 m4/quote.m4: Upgrade to today's gnulib.
4525
4526 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
4527 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
4528 the tests right now.
4529 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
4530 yyerror are declared before use; C99 requires this.
4531
4532 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4533
4534 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
4535 first.
4536 (yyrecoverSyntaxError): Correct the logic for setting and testing
4537 yyerrState.
4538 Correct comment on handling EOF.
4539 Allow states with only a default reduction, rather than failing
4540 (I can't quite reconstruct why these were not allowed before).
4541
4542 Fixes to avoid problem that $-N rules in GLR parsers can cause
4543 buffer overruns, corrupting state.
4544
4545 * src/output.c (prepare_rules): Output max_left_semantic_context
4546 definition.
4547 * src/reader.h (max_left_semantic_context): New variable declaration.
4548 * src/scan-gram.l (max_left_semantic_context): Define.
4549 (handle_action_dollar): Update max_left_semantic_context.
4550 * data/glr.c (YYMAXLEFT): New definition.
4551 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
4552 (yyresolveAction): Ditto.
4553
4554 Fixes to problems with location handling in GLR parsers reported by
4555 Frank Heckenbach (2003/06/05).
4556
4557 * data/glr.c (YYLTYPE): Make trivial if locations not used.
4558 (YYRHSLOC): Add parentheses, and define only if locations used.
4559 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
4560 locations not used.
4561 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
4562 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
4563
4564 * tests/cxx-type.at: Exercise location information; update tests
4565 to differentiate output with and without locations.
4566 Remove forward declarations of yylex and yyerror---caused errors
4567 because default YYLTYPE not yet defined.
4568 Change semantic actions to compute strings, rather than printing
4569 them directly (to test proper passing of semantics values). Change
4570 output to prefix notation and update test data and expected results.
4571 (yylex): Track locations.
4572 (stmtMerge): Return value rather than printing, and include arguments
4573 in value.
4574
4575 2003-06-03 Paul Eggert <eggert@twinsun.com>
4576
4577 Avoid warnings generated by GCC 2.95.4 when Bison is
4578 configured with --enable-gcc-warnings.
4579 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
4580 yy::]b4_parser_class_name[::translate_,
4581 yy::Stack::operator[] (unsigned),
4582 yy::Stack::operator[] (unsigned) const,
4583 yy::Slice::operator[] (unsigned),
4584 yy::Slice::operator[] (unsigned) const):
4585 Rename local vars to avoid warnings.
4586 * tests/glr-regression.at (Improper handling of embedded actions
4587 and $-N in GLR parsers): Remove unused local variable from yylex.
4588 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
4589 (void) as arg when not pure, since we now assume C89 when building
4590 Bison. Pacify GCC by using parameter.
4591
4592 2003-06-02 Paul Eggert <eggert@twinsun.com>
4593
4594 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
4595 yy::Location::lines, yy::Location::columns): Rename arguments
4596 to avoid shadowing; this removes a warning generated by GCC 3.3.
4597
4598 2003-06-01 Paul Eggert <eggert@twinsun.com>
4599
4600 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
4601 to g++, as GCC 3.3 complains if you do it.
4602 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
4603 everything that WARNING_CFLAGS has, except omit warnings
4604 not suitable for C++.
4605 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
4606 * tests/atlocal.in (CXXFLAGS): New var.
4607 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
4608
4609 Fix a GLR parser bug I reported in February; see
4610 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
4611 The problem was that GLR parsers did not conform to the C standard,
4612 because actions like { $1 = $2 + $3; } expanded to expressions
4613 that invoked YYFILL in separate subexpressions, and YYFILL assigned
4614 to a local variable. The C standard says that expressions
4615 like (var = f ()) + (var = f ()) have undefined behavior.
4616 Another problem was that GCC sometimes issues warnings that
4617 yyfill and its parameters are unused.
4618
4619 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
4620 as possibly unused.
4621 (yyfill): New function.
4622 (YYFILL): Use it.
4623 (yyuserAction): Change type of yynormal to bool, so that it matches
4624 the new yyfill signature. Mark it as possibly unused.
4625
4626
4627 Follow up on a bug I reported in February, where a Bison-generated
4628 parser can loop. Provide a test case and a fix for yacc.c. I
4629 don't have a fix for lalr1.cc or for glr.c, unfortunately.
4630 The original bug report is in:
4631 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
4632
4633 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
4634 macro's size was becoming unwieldy.
4635 (yyerrlab): Do not discard an empty lookahead symbol, as this
4636 might destroy garbage.
4637 (yyerrorlab): New label, with the old contents of YYERROR,
4638 plus the following change: pop the stack of rhs corresponding
4639 to the production that invoked YYERROR. That is how Yacc
4640 behaves, and POSIX requires this behavior.
4641 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
4642 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
4643 Define 'alarm' to do nothing if unistd.h is not available.
4644 Add a new rule "exp: '-' error;" to test the above change to
4645 data/yacc.c. Use 'alarm' to abort any test taking longer than
4646 10 seconds, as it's probably looping.
4647 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
4648 Also, the new yacc.c generates two fewer diagnostics for an
4649 existing test.
4650
4651 2003-05-24 Paul Eggert <eggert@twinsun.com>
4652
4653 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
4654 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
4655 This fixes a problem reported by John Bowman when the Compaq/HP
4656 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
4657 -ansi -Wall -gall).
4658 * data/yacc.c (union yyalloc): Likewise.
4659 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
4660
4661 Switch from 'int' to 'bool' where that makes sense.
4662
4663 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
4664 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
4665 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
4666 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
4667 Return or accept bool, not int. All callers changed.
4668 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
4669 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
4670 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
4671 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
4672 bitset_or_and_cmp_): Likewise.
4673 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
4674 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
4675 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
4676 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
4677 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
4678 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
4679 bitset_stats_or_and_cmp): Likewise.
4680 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
4681 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
4682 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
4683 ebitset_xor_cmp): Likewise.
4684 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
4685 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
4686 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
4687 lbitset_xor_cmp): Likewise.
4688 * lib/bbitset.h: Include <stdbool.h>.
4689 (struct bitset_vtable): The following members now return bool, not
4690 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
4691 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
4692 or_and_cmp).
4693 * src/conflicts.c (count_rr_conflicts): Likewise.
4694 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
4695 All uses changed.
4696 * lib/ebitset.c (ebitset_obstack_init): Likewise.
4697 * lib/lbitset.c (lbitset_obstack_init): Likewise.
4698 * src/getargs.c (debug_flag, defines_flag, locations_flag,
4699 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
4700 graph_flag): Likewise.
4701 * src/getargs.h (debug_flag, defines_flag, locations_flag,
4702 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
4703 graph_flag): Likewise.
4704 * src/output.c (error_verbose): Likewise.
4705 * src/output.h (error_verbose): Likewise.
4706 * src/reader.c (start_flag, typed): Likewise.
4707 * src/reader.h (typed): Likewise.
4708 * src/getargs.c (LOCATIONS_OPTION): New constant.
4709 (long_options, getargs): Use it.
4710 * src/lalr.c (build_relations): Use bool, not int.
4711 * src/nullable.c (nullable_compute): Likewise.
4712 * src/print.c (print_reductions): Likewise.
4713 * src/tables.c (action_row, pack_vector): Likewise.
4714 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
4715 * src/output.c (prepare): Use it.
4716 * src/output.c (token_definitions_output,
4717 symbol_destructors_output, symbol_destructors_output): Use string,
4718 not boolean integer, to keep track of whether to output separator.
4719 * src/print_graph.c (print_core): Likewise.
4720 * src/state.c (state_rule_lookaheads_print): Likewise.
4721
4722 * config/install-sh: Sync from automake 1.7.5.
4723
4724 2003-05-14 Paul Eggert <eggert@twinsun.com>
4725
4726 * src/parse-gram.y (rules_or_grammar_declaration): Require a
4727 semicolon after a grammar declaration, in the interest of possible
4728 future changes to the Bison input language.
4729 Do not allow a stray semicolon at the start of the grammar.
4730 (rhses.1): Allow one or more semicolons after any rule, including
4731 just before "|" as required by POSIX.
4732 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
4733 grammar.
4734
4735 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
4736
4737 %parse-param support for lalr1.cc.
4738
4739 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
4740 b4_cc_constructor_calls, b4_cc_constructor_call,
4741 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
4742 definitions.
4743 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
4744 parse-param arguments.
4745 (yy::b4_parser_class_name): Declare instance variables to
4746 hold parse-param arguments.
4747 * tests/calc.at: s/value/semantic_value/ because value clashes
4748 with a member of yy::b4_parser_class_name. Adjust C++ code
4749 to handle %parse-param. Enable %parse-param test in C++.
4750
4751 2003-05-12 Paul Eggert <eggert@twinsun.com>
4752
4753 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
4754 English a bit. Fix fclose typo. Change "const char" to "char
4755 const", and use ANSI C rather than K&R for "main". Suggest
4756 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
4757 and suggest yy_switch_to_buffer.
4758
4759 2003-05-05 Paul Eggert <eggert@twinsun.com>
4760
4761 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
4762 C89. This avoids a diagnostic on compilers that define __STDC__
4763 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
4764 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
4765
4766 2003-05-03 Paul Eggert <eggert@twinsun.com>
4767
4768 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
4769 Do not overrun array bounds.
4770 This should fix a bug reported today by Olatunji Oluwabukunmi in
4771 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
4772
4773 2003-04-29 Akim Demaille <akim@epita.fr>
4774
4775 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
4776 * src/getargs.c, src/getargs.h: here, as bool, not int.
4777 (nondeterministic_parser): New.
4778 * src/parse-gram.y, src/scan-gram.l: Support
4779 %nondeterministic-parser.
4780 * src/output.c (prepare): Use nondeterministic_parser instead
4781 of glr_parser where appropriate.
4782 * src/tables.c (conflict_row, action_row, save_row)
4783 (token_actions, token_actions, pack_vector): Ditto.
4784
4785 2003-04-29 Akim Demaille <akim@epita.fr>
4786
4787 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
4788
4789 2003-04-29 Akim Demaille <akim@epita.fr>
4790
4791 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
4792 with %pure-parser and %locations to exercise the patch from Yakov
4793 Markovitch below.
4794
4795 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
4796
4797 * data/yacc.c: (b4_lex_param): Corrected for the case where
4798 %lex-param is provided and %pure-parser isn't.
4799
4800 2003-04-27 Paul Eggert <eggert@twinsun.com>
4801
4802 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
4803 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
4804 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
4805 if it is not defined.
4806 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
4807
4808 2003-04-26 Paul Eggert <eggert@twinsun.com>
4809
4810 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
4811 Declare to be of type suitable for the ninf value itself, not of
4812 type suitable for the corresponding table, since the latter might
4813 be unsigned but the ninf value might be negative. This fixes a
4814 bug reported by Alexandre Duret-Lutz in
4815 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
4816
4817 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
4818 invokes it. We shouldn't invoke it twice because it will attempt
4819 to put error.o in the archive twice. This fixes a glitch reported
4820 by Martin Mokrejs in
4821 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
4822
4823 2003-04-21 Paul Eggert <eggert@twinsun.com>
4824
4825 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
4826 to gnulib.
4827
4828 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
4829
4830 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
4831 Fix obvious typo that results in uncompilable GLR parsers
4832 when both %pure-parser and %locations are used. (trivial change)
4833
4834 2003-04-17 Paul Eggert <eggert@twinsun.com>
4835
4836 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
4837 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
4838 Do not insert the expected token via unput, as this runs afoul
4839 of a POSIX-compatibility bug in flex 2.5.31.
4840 All uses changed to BEGIN the parent state,
4841 since we no longer insert the expected token via unput.
4842 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
4843 that is no longer emitted after the above change.
4844
4845 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
4846 the first one. This change is from Paul Hilfinger, and it fixes
4847 regression reported by Werner Lemberg in
4848 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4849
4850 (resolve_sr_conflict): Don't invoke state_errs_set
4851 unless one or more tokens have been explicitly made errors.
4852 Otherwise, the above change causes Bison to abort.
4853
4854 * tests/existing.at (GNU pic Grammar): New test case, taken from
4855 Lemberg's email.
4856
4857 2003-03-31 Akim Demaille <akim@epita.fr>
4858
4859 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
4860
4861 2003-03-31 Akim Demaille <akim@epita.fr>
4862
4863 * src/output.c (prepare_symbols): Avoid trailing spaces in the
4864 output.
4865
4866 2003-03-31 Akim Demaille <akim@epita.fr>
4867
4868 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
4869 From Paul Hilfinger.
4870
4871 2003-03-29 Akim Demaille <akim@epita.fr>
4872
4873 * m4/error.m4: Do not put under dynamic conditions some code which
4874 expansion is under static control.
4875
4876 2003-03-29 Akim Demaille <akim@epita.fr>
4877
4878 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
4879
4880 2003-03-29 Akim Demaille <akim@epita.fr>
4881
4882 * doc/bison.texinfo (Strings are Destroyed): New.
4883
4884 2003-03-13 Paul Eggert <eggert@twinsun.com>
4885
4886 * .cvsignore: Add configure.lineno.
4887 * src/.cvsignore: Add yacc.
4888 * tests/.cvsignore: Add testsuite.log.
4889 * doc/fdl.texi: Sync with latest FSF version.
4890
4891 2003-03-12 Paul Eggert <eggert@twinsun.com>
4892
4893 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
4894 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
4895 cursor, instead of leaving it undefined. This fixes a bug
4896 reported by Tim Van Holder in
4897 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
4898 * tests/input.at (Torturing the Scanner): Test the scanner on
4899 an empty input file, which was Tim Van Holder's test case.
4900
4901 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
4902 <sys/resource.h> can be included, include sys/time.h and
4903 sys/times.h first, if available. This works around the SunOS
4904 4.1.4 porting bug reported by Bruce Becker in
4905 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
4906
4907 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
4908 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
4909 AC_HEADER_SYS_WAIT.
4910
4911 Merge changes from gnulib. This was prompted because the CVS
4912 snapshot didn't build on Solaris 7 due to strnlen problems.
4913
4914 These changes need to be merged back into gnulib:
4915 * lib/hash.c: Include <stdbool.h> unconditionally.
4916 * m4/onceonly.m4 (m4_quote): New macro.
4917 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
4918 Quote AC_FOREACH variable-expansions properly.
4919 The 2003-01-03 obstack.h change also needs merging.
4920 {end of changes requiring merging}
4921
4922 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4923 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
4924 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
4925 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
4926 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
4927 New files, imported from gnulib.
4928 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
4929 above.
4930
4931 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
4932 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
4933 gnulib sources.
4934
4935 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
4936 Add.
4937 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
4938 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
4939 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
4940 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
4941 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
4942 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
4943 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
4944 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
4945 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
4946 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
4947 (jm_PREREQ_ARGMATCH): Remove.
4948 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
4949 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
4950
4951 * src/system.h: Include <stdbool.h> unconditionally.
4952
4953 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
4954 assuming at least C89 in the bitset code for some time now.
4955
4956 2003-03-03 Akim Demaille <akim@epita.fr>
4957
4958 * ro.po: New.
4959
4960 2003-03-02 Akim Demaille <akim@epita.fr>
4961
4962 * doc/bison.texinfo (Table of Symbols): Reactivate the
4963 documentation for %lex-param, and %parse-param.
4964
4965 2003-03-02 Akim Demaille <akim@epita.fr>
4966
4967 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
4968 generate verbose error messages.
4969 Use the number of tokens as an upper bound in yytname, as it
4970 cannot be a non terminal.
4971
4972 2003-03-02 Akim Demaille <akim@epita.fr>
4973
4974 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
4975 message.
4976
4977 2003-03-02 Akim Demaille <akim@epita.fr>
4978
4979 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
4980 Use them to exercise yycheck overrun.
4981 Based on Andrew Suffield's grammar.
4982
4983 2003-03-02 Akim Demaille <akim@epita.fr>
4984
4985 Create tests/local.at for Bison generic testing macros.
4986
4987 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
4988 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
4989 This new file.
4990 * tests/calc.at (AT_CHECK_CALC): Adjust.
4991 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
4992 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
4993 * tests/local.at: here.
4994 (AT_COMPILE_CXX): Tags the tests using it as c++.
4995 Ignore the test if CXX is not functional.
4996
4997 2003-03-01 Paul Eggert <eggert@twinsun.com>
4998
4999 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
5000 not loc->end, since loc->end might contain garbage and this leads
5001 to undefined behavior on some platforms.
5002 (id_loc, token_start): Use (IF_LINTed) initial values that do not
5003 depend on *loc, so that the reader doesn't give the the false
5004 impression that *loc is initialized.
5005 (<INITIAL>"%%"): Do not bother setting code_start, since its value
5006 does not survive the return.
5007
5008 2003-03-01 Akim Demaille <akim@epita.fr>
5009
5010 * src/scan-gram.l (code_start): Always initialize it when entering
5011 into yylex, as SC_EPILOGUE is activated *before* the corresponding
5012 yylex invocation. An alternative would be making it static, but
5013 then it starts with the second %%'s beginning, instead of its end.
5014
5015 2003-02-28 Paul Eggert <eggert@twinsun.com>
5016
5017 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
5018 around a UnixWare 7.1.1 porting bug reported by John Hughes in
5019 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
5020
5021 2003-02-26 Paul Eggert <eggert@twinsun.com>
5022
5023 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
5024 Remove Sequent/Pyramid discussion (nobody uses them any more).
5025 Merge VMS and MS-DOS discussion; these ports may well be dead
5026 but let's keep mentioning them for now. Put <> around email
5027 addresses. Add copyright notice.
5028
5029 2003-02-24 Paul Eggert <eggert@twinsun.com>
5030
5031 * data/glr.c (yy_reduce_print): yylineno -> yylno,
5032 to avoid collision with flex use of yylineno.
5033 Problem reported by Bruce Lilly in
5034 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
5035 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5036 * data/yacc.c (yy_reduce_print): Likewise.
5037
5038 * config/depcomp: Sync with Automake 1.7.3.
5039
5040 2003-02-21 Akim Demaille <akim@epita.fr>
5041
5042 * data/lalr1.cc: Use temporary variables instead of casts to
5043 change integer types.
5044 Suggested by Paul Eggert.
5045
5046 2003-02-21 Akim Demaille <akim@epita.fr>
5047
5048 * doc/bison.texinfo: Use "location" consistently to refer to @n,
5049 to avoid confusions with lalr1.cc's notion of Position.
5050 Suggested by Paul Eggert.
5051
5052 2003-02-20 Akim Demaille <akim@epita.fr>
5053
5054 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
5055 before initial_columns.
5056 (location.hh): Use consistent variable names when defining the
5057 operator<<.
5058 Use "last" so that we subtract from Positions, not from unsigned.
5059
5060 2003-02-20 Akim Demaille <akim@epita.fr>
5061
5062 * data/lalr1.cc (position.hh): New subfile, including the extended
5063 and Doxygen'ed documentation of class Position.
5064 (location.hh): Use it.
5065 Document a` la Doxygen.
5066 With the help of Benoit Perrot.
5067
5068 2003-02-20 Akim Demaille <akim@epita.fr>
5069
5070 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
5071 AT_YACC_IF.
5072 Redefine AT_YYERROR_SEES_LOC_IF using it.
5073 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
5074 not defined.
5075 Don't use the location in yy::Parser::error_ and
5076 yy::Parser::print_ when not %locations.
5077 Activate more lalr1.cc tests.
5078
5079 2003-02-19 Akim Demaille <akim@epita.fr>
5080
5081 * data/lalr1.cc: When displaying a line number, be sure to make it
5082 an int.
5083
5084 2003-02-19 Akim Demaille <akim@epita.fr>
5085
5086 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
5087 Remove, useless.
5088 (YYABORT, YYACCEPT, YYERROR): New.
5089 * tests/calc.at: Renable the lalr1.cc test.
5090
5091 2003-02-19 Akim Demaille <akim@epita.fr>
5092
5093 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
5094 error recovery, mixing with/without pops and discarding of the
5095 lookahead.
5096 Exercise YYERROR.
5097 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
5098
5099 2003-02-17 Paul Eggert <eggert@twinsun.com>
5100
5101 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
5102 * tests/testsuite.at (AT_COMPILE): Use them.
5103 This fixes the testsuite problem reported by Robert Lentz in
5104 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
5105
5106 2003-02-12 Paul Eggert <eggert@twinsun.com>
5107
5108 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
5109 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
5110 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
5111 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
5112 Check for malloc failure, for consistency with yacc.c.
5113 (yytname_size): Remove, for consistency with yacc.c.
5114
5115 The bug still remains in data/lalr1.cc, as I didn't have time
5116 to fix it there.
5117
5118 2003-02-06 Akim Demaille <akim@epita.fr>
5119
5120 * configure.ac (GXX): Rename as...
5121 (CXX): this, to keep the original Autoconf semantics.
5122 Require 2.57.
5123 * data/lalr1.cc: Fix b4_copyright invocations.
5124 If YYDEBUG is not defined, don't depend upon name_ being defined.
5125 (location.hh): Include string and iostream.
5126 (Position::filename): New member.
5127 (Position::Position ()): New.
5128 (operator<< (Position)): New.
5129 (operator- (Position, int)): New.
5130 (Location::first, Location::last): Rename as...
5131 (Location::begin, Location::end): these, to mock the conventional
5132 iterator names.
5133 (operator<< (Location)): New.
5134 * tests/atlocal.in (CXX): New.
5135 * tests/testsuite.at (AT_COMPILE_CXX): New.
5136 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
5137 locations in a more synthetic way.
5138 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
5139 lalr1.cc is used.
5140 Adjust the C locations to match those from Emacs: first column is
5141 column 0.
5142 Change all the expected results.
5143 Conform to the GCS: simplify the locations when applicable.
5144 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
5145 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
5146 these CPP macros with the m4 macros new defined by...
5147 (AT_CHECK_PUSHDEFS): this, i.e.:
5148 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
5149 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
5150 New macros.
5151 (AT_CHECK_POPDEFS): Undefine them.
5152 (AT_CHECK_CALC_LALR1_CC): New.
5153 Use it for the first lalr1.cc test.
5154
5155 2003-02-04 Akim Demaille <akim@epita.fr>
5156
5157 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
5158 Location as is defined.
5159
5160 2003-02-04 Akim Demaille <akim@epita.fr>
5161
5162 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
5163 name_ being defined.
5164
5165 2003-02-03 Paul Eggert <eggert@twinsun.com>
5166
5167 * src/gram.h (start_symbol): Remove unused decl.
5168
5169 Use more-consistent naming conventions for local vars.
5170
5171 * src/derives.c (derives_compute): Change type of local var from
5172 int to rule_number.
5173 * src/gram.c (grammar_rules_partial_print): Likewise.
5174 * src/print.c (print_core): Likewise.
5175 * src/reduce.c (reduce_grammar_tables): Likewise.
5176
5177 * src/gram.c (grammar_dump): Change name of item_number *
5178 local var from r to rp.
5179 * src/nullable.c (nullable_compute): Likewise.
5180
5181 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
5182
5183 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
5184 for symbol or symbol_number var.
5185 * src/reader.c (grammar_start_symbol_set): Likewise.
5186 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
5187 Likewise.
5188 * src/state.c (transitions_to): Likewise.
5189 * src/state.h: Likewise.
5190 * src/tables.c (symbol_number_to_vector_number): Likewise.
5191
5192 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
5193 char * var.
5194
5195 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
5196 var.
5197
5198 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
5199 var.
5200
5201 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
5202 Use str, not s, for char * var. Use ch, not c, for character var.
5203 Use size for size var.
5204
5205 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
5206 char * var.
5207 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
5208 uniqstr var.
5209 * src/uniqstr.h: Likewise.
5210
5211 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
5212 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
5213 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
5214 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
5215 param to have same name as that of enum, so that we don't use
5216 "s" to stand for a non-state.
5217
5218 2003-02-02 Akim Demaille <akim@epita.fr>
5219
5220 * src/scan-skel.l: Scan more than one inert character per yylex
5221 invocation.
5222
5223 2003-02-01 Paul Eggert <eggert@twinsun.com>
5224
5225 Version 1.875a.
5226
5227 * po/LINGUAS: Add ms.
5228
5229 2003-01-30 Akim Demaille <akim@epita.fr>
5230
5231 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
5232
5233 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5234
5235 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
5236 of $1.
5237
5238 Changes in response to error report by S. Eken: GLR mode does not
5239 handle negative $ indices or $ indices in embedded rules correctly.
5240 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
5241
5242 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
5243 (b4_rhs_location): Ditto.
5244 (yyfill): New function to copy from stack tree into array
5245 incrementally.
5246 (yyuserAction): Modify to allow incremental move of semantic values
5247 to rhs array when in GLR mode.
5248 Define YYFILL to use in user-defined actions to fill semantic array
5249 as needed.
5250 Remove dummy use of yystack, as there is now a guaranteed use.
5251 (yydoAction): Modify to allow incremental move of semantic values
5252 to rhs array when in GLR mode.
5253 (yyresolveAction): Ditto.
5254 (yyglrShiftDefer): Update comment.
5255 (yyresolveStates): Use X == NULL for pointers, not !X.
5256 (yyglrReduce): Ditto.
5257 (yydoAction): Ditto
5258
5259 * tests/glr-regr1.at: Rename to ...
5260 * tests/glr-regression.at: Add new regression test for the problems
5261 described above (adapted from S. Eken).
5262 Update copyright notice.
5263 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
5264 * tests/Makefile.am: Ditto.
5265
5266 2003-01-28 Paul Eggert <eggert@twinsun.com>
5267
5268 * data/lalr1.cc: Do not use @output_header_name@ unless
5269 b4_defines_flag is set. This fixes two bugs reported by
5270 Tim Van Holder in
5271 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
5272 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
5273
5274 2003-01-21 Paul Eggert <eggert@twinsun.com>
5275
5276 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
5277 we don't need to worry about yyerrlab1 being reported as an
5278 "unused label" by non-GCC C compilers. The downside is that if
5279 locations are used then a couple of statements are duplicated each
5280 time YYERROR is invoked, but the upside is that the warnings
5281 should vanish.
5282 (yyerrlab1): Move code to YERROR.
5283 (yyerrlab2): Remove. Change uses back to yyerrlab1.
5284 This reverts some of the 2002-12-27 change.
5285
5286 2003-01-17 Paul Eggert <eggert@twinsun.com>
5287
5288 * src/output.c (symbol_printers_output): Fix typo that led
5289 to core dump. Problem reported by Antonio Rus in
5290 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
5291
5292 2003-01-13 Akim Demaille <akim@epita.fr>,
5293 Quoc Peyrot <chojin@lrde.epita.fr>,
5294 Robert Anisko <anisko_r@lrde.epita.fr>
5295
5296 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
5297 when the stacks contain one element, as the loop would otherwise
5298 free the last state, and then use the top state (the one we just
5299 popped). This means that the initial elements will not be freed
5300 explicitly, as is the case in yacc.c; it is not a problem, as
5301 these elements have fake values.
5302
5303 2003-01-11 Paul Eggert <eggert@twinsun.com>
5304
5305 * NEWS: %expect-violations are now just warnings, reverting
5306 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
5307 bootstrapping problem reported by Matthias Klose; see
5308 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
5309 * src/conflicts.c (conflicts_print): Likewise.
5310 * tests/conflicts.at (%expect not enough, %expect too much,
5311 %expect with reduce conflicts): Likewise.
5312 * doc/bison.texinfo (Expect Decl): Document this. Also mention
5313 that the warning is enabled if the number of conflicts changes
5314 (not necessarily increases).
5315
5316 * src/getargs.c (version): Update copyright year.
5317
5318 2003-01-09 Akim Demaille <akim@epita.fr>
5319
5320 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
5321
5322 2003-01-08 Paul Eggert <eggert@twinsun.com>
5323
5324 * Makefile.maint (WGETFLAGS):
5325 New macro, containing "-C off" to disable proxy caches.
5326 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
5327 (rel-check): Use $(WGET) instead of wget.
5328
5329 2003-01-06 Paul Eggert <eggert@twinsun.com>
5330
5331 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
5332 the GLR paper of Scott, Johnstone and Hussain.
5333
5334 2003-01-04 Paul Eggert <eggert@twinsun.com>
5335
5336 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
5337 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
5338 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
5339 (EXTRA_LIBRARIES): New var, for liby.a.
5340 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
5341 (EXTRA_SCRIPTS): New var, for yacc.
5342
5343 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
5344 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
5345 Problem reported by Nelson H. F. Beebe.
5346
5347 2003-01-03 Paul Eggert <eggert@twinsun.com>
5348
5349 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
5350 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
5351 when compiling Bison 1.875's `bitset bset = obstack_alloc
5352 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
5353
5354 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
5355 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
5356 grow to a huge size with typical invocation.
5357
5358 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
5359 Use the pattern recommended by Autoconf 2.57, except also protect
5360 against double-definition.
5361 * src/system.h: Likewise.
5362 Portability issues reported by Nelson H. F. Beebe.
5363
5364 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
5365 All uses changed. Provide a definition in both C and C++.
5366 (yytrue, yyfalse): Define even if defined (__cplusplus).
5367
5368 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
5369 Reported by Nelson H. F. Beebe.
5370
5371 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
5372
5373 2003-01-02 Paul Eggert <eggert@twinsun.com>
5374
5375 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
5376 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
5377 Bug reported by Nelson H. F. Beebe.
5378
5379 2003-01-01 Paul Eggert <eggert@twinsun.com>
5380
5381 * Version 1.875.
5382
5383 2002-12-30 Paul Eggert <eggert@twinsun.com>
5384
5385 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
5386 Moved here from...
5387 (<INITIAL>","): Here. This causes stray "," to be treated
5388 more uniformly.
5389
5390 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
5391 last brace in braced code when not in Yacc mode, for compatibility
5392 with Bison 1.35. This resurrects the 2001-12-15 patch to
5393 src/reader.c.
5394
5395 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
5396 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
5397
5398 2002-12-28 Paul Eggert <eggert@twinsun.com>
5399
5400 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
5401 that of SYM's type. This fixes Debian bug 168069, reported by
5402 Thomas Olsson.
5403
5404 2002-12-28 Paul Eggert <eggert@twinsun.com>
5405
5406 Version 1.75f.
5407
5408 Switch back to the Yacc style of conflict reports, undoing some
5409 of the 2002-07-30 change.
5410 * doc/bison.texinfo (Understanding): Use Yacc style for
5411 conflict reports. Also, use new way of locating rules.
5412 * src/conflicts.c (conflict_report):
5413 Renamed from conflict_report_yacc, removing the old
5414 'conflict_report'. Translate the entire conflict report at once,
5415 so that we don't assume that "," has the same interpretation in
5416 all languages.
5417 (conflicts_output): Use Yacc-style conflict report for each state,
5418 instead of our more-complicated style.
5419 (conflicts_print): Use Yacc-style conflict report, except print
5420 the input file name when not emulating Yacc.
5421 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
5422 Conflicted Reduction, %expect not enough, %expect too much,
5423 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
5424 * tests/existing.at (GNU Cim Grammar): Likewise.
5425 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
5426
5427 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
5428 fatal): Don't invoke fflush; it's not needed and it might even be
5429 harmful for stdout, as stdout might not be open.
5430 * src/reduce.c (reduce_print): Likewise.
5431
5432 2002-12-27 Paul Eggert <eggert@twinsun.com>
5433
5434 Fix a bug where error locations were not being recorded correctly.
5435 This problem was originally reported by Paul Hilfinger in
5436 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
5437
5438 * data/yacc.c (yyparse): New local var yylerrsp, to record the
5439 top of the location stack's error locations.
5440 (yyerrlab): Set it. When discarding a token, push its location
5441 onto yylerrsp so that we don't lose track of the error's end.
5442 (yyerrlab1): Now is only the target of YYERROR, so that we can
5443 properly record the location of the action that failed. For GCC
5444 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
5445 GCC warning about yyerrlab1 being unused if YYERROR is unused.
5446 (yyerrlab2): New label, which yyerrlab now falls through to.
5447 Compute the error's location by applying YYLLOC_DEFAULT to
5448 the locations of all the symbols that went into the error.
5449 * doc/bison.texinfo (Location Default Action): Mention that
5450 YYLLOC_DEFAULT is also invoked for syntax errors.
5451 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5452 Error locations include the locations of all the tokens that were
5453 discarded, not just the last token.
5454
5455 2002-12-26 Paul Eggert <eggert@twinsun.com>
5456
5457 * src/files.c: Include quote.h.
5458 (compute_output_file_names): Warn if we detect conflicting
5459 outputs to the same file. This should catch the misunderstanding
5460 exemplified by Debian Bug 165349, reported by Bruce Stephens..
5461
5462 * src/conflicts.c (conflicts_print): If the user specifies
5463 "%expect N", report an error if there are any reduce/reduce
5464 conflicts. This is what the manual says should happen.
5465 This fixes Debian bug 130890, reported by Anthony DeRobertis.
5466 * tests/conflicts.at (%expect with reduce conflicts): New test.
5467
5468 Don't use m4_include on relative file names, as it doesn't work as
5469 desired if there happens to be a file with that name under ".".
5470
5471 * m4sugar/version.m4: Remove; it was included but it wasn't used.
5472 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
5473 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
5474 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
5475 * src/output.c (output_skeleton): Use full path names when
5476 specifying a file to include; don't rely on include path, as
5477 it's unreliable when the working file contains a file with
5478 that name.
5479
5480 2002-12-25 Paul Eggert <eggert@twinsun.com>
5481
5482 Remove obsolete references to bison.simple and bison.hairy.
5483 Problem mentioned by Aubin Mahe in
5484 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
5485 * data/glr.c: Comment fix.
5486 * doc/bison.1: Remove references. Also, mention "yacc".
5487
5488 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
5489 with -g option.
5490
5491 * src/parse-gram.y (declaration): Use enum "report_states" rather
5492 than its numeric value 1.
5493
5494 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
5495 opening a new one. This fixes Debian bug 165349, reported by
5496 Bruce Stephens.
5497
5498 2002-12-24 Paul Eggert <eggert@twinsun.com>
5499
5500 Version 1.75e.
5501
5502 * Makefile.maint (cvs-update): Don't assume that the shell
5503 supports $(...), as Solaris sh doesn't.
5504
5505 * src/parse-gram.y (lloc_default): Remove test for empty
5506 nonterminals at the end, since it didn't change the result.
5507
5508 2002-12-24 Paul Eggert <eggert@twinsun.com>
5509
5510 If the user does not define YYSTYPE as a macro, Bison now declares it
5511 using typedef instead of defining it as a macro. POSIX requires this.
5512 For consistency, YYLTYPE is also declared instead of defined.
5513
5514 %union directives can now have a tag before the `{', e.g., the
5515 directive `%union foo {...}' now generates the C code
5516 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
5517 The default union tag is `YYSTYPE', for compatibility with Solaris 9
5518 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
5519 instead of `yyltype'.
5520
5521 `yystype' and `yyltype' are now obsolescent macros instead of being
5522 typedefs or tags; they are no longer documented and will be
5523 withdrawn in a future release.
5524
5525 * data/glr.c (b4_location_type): Remove.
5526 (YYSTYPE): Renamed from yystype.
5527 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
5528 (struct YYLTYPE): Renamed from struct yyltype.
5529 (YYLTYPE): Renamed from yyltype.
5530 (yyltype, yystype): New (and obsolescent) macros,
5531 for backward compatibility.
5532 * data/yacc.c: Likewise.
5533
5534 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
5535 does not specify a union tag. This is for compatibility with
5536 Solaris 9 yacc.
5537
5538 * src/parse-gram.y (add_param): 2nd arg is now char * not char
5539 const *, since it is now modified by stripping surrounding { }.
5540 (current_braced_code): Remove.
5541 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
5542 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
5543 trailing " {...}". Now of type <chars>.
5544 (grammar_declaration): Adjust to bundled tokens.
5545 (code_content): Remove; stripping is now done by add_param.
5546 (print_token_value): Print contents of bundled tokens.
5547 (token_name): New function.
5548
5549 * src/reader.h (braced_code, current_braced_code): Remove.
5550 (token_name): New decl.
5551
5552 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
5553 token_type, not braced_code code_kind. All uses changed.
5554 (SC_PRE_CODE): New state, for scanning after a keyword that
5555 has (or usually has) an immediately-following braced code.
5556 (token_type): New local var, to keep track of which token type
5557 to return when scanning braced code.
5558 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
5559 <INITIAL>"%parse-param", <INITIAL>"%printer",
5560 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
5561 instead of returning a token type immediately.
5562 (<INITIAL>"{"): Set token type.
5563 (<SC_BRACED_CODE>"}"): Use it.
5564 (handle_action_dollar, handle_action_at): Now returns bool
5565 indicating success. Fail if ! current_rule; this prevents a core dump.
5566 (handle_symbol_code_dollar, handle_symbol_code_at):
5567 Remove; merge body into caller.
5568 (handle_dollar, handle_at): Complain in invalid contexts.
5569
5570 * NEWS, doc/bison.texinfo: Document the above.
5571 * NEWS: Fix years and program names in copyright notice.
5572
5573 2002-12-17 Paul Eggert <eggert@twinsun.com>
5574
5575 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
5576 Reporting, Table of Symbols): Omit mentions of %lex-param and
5577 %parse-param from the documentation for now.
5578
5579 2002-12-15 Paul Eggert <eggert@twinsun.com>
5580
5581 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
5582 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
5583 lookahead symbol, and which sets yychar in parser actions) and it
5584 disagreed with the Bison documentation. Bug
5585 reported by Andrew Walrond.
5586
5587 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
5588 as the caller now does that.
5589 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
5590 (YYEMPTY): Parenthesize right hand side, since others use it.
5591 (yyparse): Don't assume that our generated code is the only code
5592 that sets yychar.
5593
5594 2002-12-13 Paul Eggert <eggert@twinsun.com>
5595
5596 Version 1.75d.
5597
5598 POSIX requires a "yacc" command.
5599 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
5600 (MOSTLYCLEANFILES): Add yacc.
5601 (yacc): New rule.
5602 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
5603 as an alias for bison y.
5604
5605 * po/LINGUAS: Add da.
5606
5607 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
5608 problem with latest <getopt.h>.
5609 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
5610
5611 * doc/fdl.texi: Upgrade to 1.2.
5612 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
5613 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
5614 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
5615 gnulib.
5616 * config/install-sh: Sync with autotools.
5617
5618 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
5619 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
5620 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
5621 locations are requested.
5622 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
5623 locations are requested.
5624
5625 2002-12-12 Paul Eggert <eggert@twinsun.com>
5626
5627 Remove unportable casts and storage allocation tricks.
5628 While we're at it, remove almost all casts, since they
5629 usually aren't needed and are a sign of trouble.
5630
5631 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
5632
5633 * src/derives.c (derives_compute): Do not subtract NTOKENS from
5634 the pointer DSET returned by malloc; this isn't portable.
5635 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
5636 Similarly for DERIVES.
5637 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
5638 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
5639 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
5640
5641 * src/derives.c (derives_compute): Do not bother invoking
5642 int_of_rule_number, since rule numbers are integers.
5643
5644 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
5645 rather than XMALLOC (char, N).
5646
5647 * src/files.c (filename_split): Rewrite to avoid cast.
5648
5649 * src/gram.h (symbol_number_as_item_number,
5650 item_number_as_symbol_number, rule_number_as_item_number,
5651 item_number_as_rule_number):
5652 Now inline functions rather than macros, to avoid casts.
5653 * src/state.h (state_number_as_int): Likewise.
5654 * src/tables.c (state_number_to_vector_number,
5655 symbol_number_to_vector_number): Likewise.
5656
5657 * src/gram.h (int_of_rule_number): Remove; no longer used.
5658
5659 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
5660 since the resulting storage is always stored into.
5661
5662 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
5663 where it's needed.
5664
5665 * src/muscle_tab.c (muscle_m4_output):
5666 Now inline. Return bool, not int.
5667 * src/state.c (state_compare): Likewise.
5668 * src/symtab.c (symbol_check_defined,
5669 symbol_check_alias_consistency, symbol_pack, symbol_translation,
5670 hash_compare_symbol, hash_symbol):
5671 Likewise.
5672 * src/uniqstr.c (uniqstr_print): Likewise.
5673 * src/muscle_tab.c (muscle_m4_output_processor):
5674 New function, to avoid casts.
5675 * src/state.c (state_comparator, stage_hasher): Likewise.
5676 * src/symtab.c (symbol_check_defined_processor,
5677 symbol_check_alias_consistency_processor, symbol_pack_processor,
5678 symbol_translation_processor, hash_symbol_comparator,
5679 hash_symbol_hasher): Likewise.
5680 * src/uniqstr.c (uniqstr_print_processor): Likewise.
5681 * src/muscle_tab.c (muscles_m4_output):
5682 Use new functions instead of casting old functions unportably.
5683 * src/state.c (state_hash_new): Likewise.
5684 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
5685 symbols_token_translations_init):
5686 Likewise.
5687 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
5688
5689 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
5690 var instead of casting to long, to avoid casts.
5691 (prepare_states): Use MALLOC rather than alloca, so that we don't
5692 have to worry about alloca.
5693 * src/state.c (state_hash_lookup): Likewise.
5694
5695 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
5696 local var instead of casting to unsigned char, to avoid casts.
5697
5698 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
5699 STATE_ALLOC): Remove.
5700 (transitions_new, errs_new, reductions_new, state_new): Use malloc
5701 rather than calloc, and use offsetof to avoid allocating slightly
5702 too much storage.
5703 (state_new): Initialize all members.
5704
5705 * src/state.c (state_hash): Use unsigned accumulator, not signed.
5706
5707 * src/symtab.c (symbol_free): Remove; unused.
5708 (symbol_get): Remove cast in lhs of assignment.
5709 (symbols_do): Now static. Accept generic arguments, not
5710 hashing-related ones.
5711
5712 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
5713 (symbol_processor): Remove.
5714 (symbols_do): Remove decl; now static.
5715
5716 * src/system.h (alloca): Remove; decl no longer needed.
5717 (<stddef.h>): Include, for offsetof.
5718 (<inttypes.>, <stdint.h>): Include if available.
5719 (uintptr_t): New type, if system lacks it.
5720 (CALLOC, MALLOC, REALLOC): New macros.
5721 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
5722 new macros.
5723
5724 * src/tables.c (table_size): Now int, to pacify GCC.
5725 (table_grow, table_ninf_remap): Use signed table size.
5726 (save_row): Don't bother initializing locals when not needed.
5727 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
5728 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
5729
5730 * src/vcg.h: Correct misspellings.
5731
5732 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
5733
5734
5735 * src/getargs.c (getargs): Don't assume EOF == -1.
5736
5737 2002-12-09 Paul Eggert <eggert@twinsun.com>
5738
5739 Change identifier spellings to avoid collisions with names
5740 that are reserved by POSIX.
5741
5742 Don't use names ending in _t, since POSIX reserves them.
5743 For consistency, remove _e and _s endings -- they're weren't
5744 needed to remove ambiguity. All uses changed.
5745 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
5746 turn was just renamed from struniq_t.
5747 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
5748 which in turn was just renamed from struniq_processor_t.
5749 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
5750 in turn was renamed from hash_compare_struniq_t.
5751 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
5752 (state_list): Renamed from state_list_t.
5753 * src/assoc.h (assoc): Renamed from assoc_t.
5754 * src/conflicts.c (enum conflict_resolution): Renamed from
5755 enum conflict_resolution_e.
5756 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
5757 (rule_list): Renamed from rule_list_t.
5758 * src/getargs.h (enum trace): Renamed from enum trace_e.
5759 (enum report): Renamed from enum report_e.
5760 * src/gram.h (item_number): Renamed from item_number_t.
5761 (rule_number): Renamed from rule_number_t.
5762 (struct rule_s): Remove the "rule_s" part; not used.
5763 (rule): Renamed from rule_t.
5764 (rule_filter): Renamed from rule_filter_t.
5765 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
5766 (goto_list): Renamed from goto_list_t.
5767 * src/lalr.h (goto_number): Renamed from goto_number_t.
5768 * src/location.h (location): Renamed from location_t.
5769 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
5770 and moved here from:
5771 * src/muscle_tab.h (muscle_entry_t): here.
5772 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
5773 (rule_list): Renamed from rule_list_t.
5774 * src/print_graph.c (static_graph): Renamed from graph.
5775 * src/reader.h (braced_code): Renamed from braced_code_t.
5776 Remove brace_code_e tag.
5777 * src/relation.h (relation_node): Renamed from relation_node_t.
5778 (relation_nodes): Renamed from relation_nodes_t.
5779 (relation): Renamed from relation_t.
5780 * src/state.h (state_number): Renamed from state_number_t.
5781 (struct state): Renamed from struct state_s.
5782 (state): Renamed from state_t.
5783 (transitions): Renamed from transitions_t. Unused (and
5784 misspelled) transtion_s tag removed.
5785 (errs): Renamed from errs_t. Unused errs_s tag removed.
5786 (reductions): Renamed from reductions_t. Unused tag
5787 reductions_s removed.
5788 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
5789 (struct symbol_list): Renamed from struct symbol_list_s.
5790 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
5791 (struct symbol): Renamed from struct symbol_s.
5792 (symbol): Renamed from symbol_t.
5793 * src/tables.c (vector_number): Renamed from vector_number_t.
5794 (action_number): Renamed from action_t.
5795 * src/tables.h (base_number): Renamed from base_t.
5796 * src/vcg.h (enum color): Renamed from enum color_e.
5797 (enum textmode): Renamed from enum textmode_e.
5798 (enum shape): Renamed from enum shape_e.
5799 (struct colorentry): Renamed from struct colorentry_s.
5800 (struct classname): Renamed from struct classname_s.
5801 (struct infoname): Renamed from struct infoname_s.
5802 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
5803 (enum decision): Renamed from enum decision_e.
5804 (enum orientation): Renamed from enum orientation_e.
5805 (enum alignment): Renamed from enum alignment_e.
5806 (enum arrow_mode): Renamed from enum arrow_mode_e.
5807 (enum crossing_type): Renamed from enum crossing_type_e.
5808 (enum view): Renamed from enum view_e.
5809 (struct node): Renamed from struct node_s.
5810 (node): Renamed from node_t.
5811 (enum linestyle): Renamed from enum linestyle_e.
5812 (enum arrowstyle): Renamed from enum arrowstyle_e.
5813 (struct edge): Renamed from struct edge.
5814 (edge): Renamed from edge_t.
5815 (struct graph): Renamed from struct graph_s.
5816 (graph): Renamed from graph_t.
5817 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
5818 Rename value_t -> value.
5819 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
5820 value_t_as_yystype -> value_as_yystype.
5821
5822 Don't include <errno.h> in the mainstream code, since it
5823 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
5824 * lib/get-errno.c, lib/get-errno.h: New files.
5825 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
5826 get-errno.c.
5827 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
5828 * src/output.c (output_skeleton): Likewise.
5829 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
5830 instead of errno.
5831 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
5832 Likewise.
5833 (handle_action_dollar, handle_action_at): Likewise.
5834 * src/system.h: Do not include <errno.h>.
5835 (TAB_EXT): Renamed from EXT_TAB.
5836 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
5837
5838 Avoid str[a-z]*, since <string.h> reserves that name space.
5839 Change all instances of "struniq" in names to "uniqstr", and
5840 likewise for "STRUNIQ" and "UNIQSTR".
5841 * src/uniqstr.c: Renamed from src/struniq.c.
5842 * src/uniqstr.h: Renamed from src/struniq.h.
5843 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
5844 * src/files.c (strsuffix): Remove; unused.
5845 (concat2): Renamed from stringappend. Now static.
5846 * src/files.h (strsuffix, stringappend): Remove; unused.
5847 * src/parse-gram.y (<chars>): Renamed from <string>.
5848 (<uniqstr>): Renamed from <struniq>.
5849 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
5850 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
5851 (struct graph_s.expand): Renamed from struct graph_s.stretch.
5852 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
5853 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
5854 (N_EXPAND): Renamed from N_STRETCH.
5855
5856 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
5857 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
5858 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
5859 Remove; unused.
5860 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
5861 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
5862 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
5863 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
5864 (BASE_MAXIMUM): Renamed from BASE_MAX.
5865 (BASE_MINIMUM): Renamed from BASE_MIN.
5866 (ACTION_MAX): Remove; unused.
5867 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
5868 Unnecessary casts removed from above defines.
5869
5870
5871 Fix misspelling in names.
5872 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
5873 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
5874 G_NODE_ALIGNEMENT.
5875
5876
5877 * lib/timevar.c (timevar_report): Renamed from time_report,
5878 for consistency with other names.
5879 * lib/timevar.h (timevar_report): New decl.
5880 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
5881
5882
5883 Sort include-file uses.
5884
5885 Reorder all include files under src to be in the order "system.h".
5886 then the ../lib include files in angle brackets (alphabetized),
5887 then the . include files in double-quotes (alphabetized). Fix
5888 dependency breakages encountered in this process, as follows:
5889 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
5890 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
5891 * src/state.h: Include "symtab.h".
5892
5893 2002-12-08 Paul Eggert <eggert@twinsun.com>
5894
5895 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
5896 since this causes problems when __file__ contains character
5897 sequences like "@" that are treated specially by src/scan-skel.l.
5898 Instead, just use the file's basename. This fixes the bug
5899 reported by Martin Mokrejs in
5900 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
5901
5902 2002-12-06 Paul Eggert <eggert@twinsun.com>
5903
5904 Add support for rules that do not have trailing semicolons, as
5905 POSIX requires. Improve the quality of locations in Bison
5906 diagnostics.
5907
5908 * src/location.c: Include <quotearg.h>.
5909 (empty_location): Now const.
5910 (location_print): New function. Follow the recommendation of the
5911 GNU Coding Standards for locations that span file boundaries.
5912 * src/location.h: Do not include <quotearg.h>; no longer needed.
5913 (boundary): New type.
5914 (location_t): Use it. This allows locations to span file boundaries.
5915 All member uses changed: file -> start.file or end.file (as needed),
5916 first_line -> start.line, first_column -> start.column,
5917 last_line -> end.line, last_column -> end.column.
5918 (equal_boundaries): New function.
5919 (LOCATION_RESET, LOCATION_STEP): Remove.
5920 (LOCATION_PRINT): Remove. All callers changed to use location_print.
5921 (empty_location): Now const.
5922 (location_print): New decl.
5923 * src/parse-gram.y (lloc_default): New function, which handles
5924 empty locations more accurately.
5925 (YYLLOC_DEFAULT): Use it.
5926 (%token COLON): Remove.
5927 (%token ID_COLON): New token.
5928 (rules): Use it.
5929 (declarations, rules): Remove trailing semicolon.
5930 (declaration, rules_or_grammar_declaration):
5931 Allow empty (";") declaration.
5932 (symbol_def): Remove empty actions; no longer needed.
5933 (rules_or_grammar_declaration): Remove trailing semicolon.
5934 (semi_colon.opt): Remove.
5935 * src/reader.h: Include location.h.
5936 (scanner_cursor): New decl.
5937 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
5938 rolling our own.
5939 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
5940 of *loc.
5941 (STEP): Remove. No longer needed, now that adjust_location does
5942 the work. All uses removed.
5943 (scanner_cursor): New var.
5944 (adjust_location): Renamed from extend_location. It now sets
5945 *loc and adjusts the scanner cursor. All uses changed.
5946 Don't bother testing for CR.
5947 (handle_syncline): Remove location arg; now updates scanner cursor.
5948 All callers changed.
5949 (unexpected_end_of_file): Now accepts start boundary of token or
5950 comment, not location. All callers changed. Update scanner cursor,
5951 not the location.
5952 (SC_AFTER_IDENTIFIER): New state.
5953 (context_state): Renamed from c_context. All uses changed.
5954 (id_loc, code_start, token_start): New local vars.
5955 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
5956 processing of Yacc white space and equivalents here.
5957 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
5958 instead of returning ID immediately, since we need to search for
5959 a subsequent colon.
5960 (<INITIAL>"'", "\""): Save token_start.
5961 (<INITIAL>"%{", "{", "%%"): Save code_start.
5962 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
5963 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
5964 BEGIN context_state at end, not INITIAL.
5965 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
5966 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
5967 Return correct token start.
5968 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
5969 the start of a character, string or multiline comment is found.
5970 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
5971 Reduction): Adjust reported locations to match the more-precise
5972 results now expected.
5973 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
5974 * tests/reduce.at (Useless Rules, Reduced Automaton,
5975 Underivable Rules): Likewise.
5976 * tests/regression.at (Invalid inputs): No longer `expecting ";"
5977 or "|"' now that so many other tokens are allowed by the new grammar.
5978
5979 * src/complain.h (current_file): Remove duplicate decl;
5980 current_file is now owned by files.h.
5981 * src/complain.c, src/scan-gram.l: Include files.h.
5982
5983 2002-12-06 Paul Eggert <eggert@twinsun.com>
5984
5985 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
5986 promotes to int; it might be unsigned int.
5987 * data/yacc.c (yy_reduce_print): Likewise.
5988
5989 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
5990 be #defined in the prologue, not in the Bison declarations.
5991 This fixes Debian Bug 102878, reported by Shaul Karl.
5992
5993 2002-12-02 Paul Eggert <eggert@twinsun.com>
5994
5995 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
5996 * lib/strtoul.c: New file, from gnulib.
5997 This fixes a porting bug reported by Peter Klein in
5998 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
5999
6000 2002-11-30 Paul Eggert <eggert@twinsun.com>
6001
6002 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
6003 and put only a forward declaration in the prologue. This is for
6004 consistency with the other scanner helper functions.
6005
6006 Type clashes now generate warnings, not errors, since it
6007 appears that POSIX may allow some grammars with type clashes.
6008 * src/reader.c (grammar_current_rule_check): Warn about
6009 type clashes instead of complaining.
6010 * tests/input.at (Type Clashes): Expect warnings, not complaints.
6011
6012 Add Yacc library, since POSIX requires it.
6013 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
6014 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
6015 * lib/main.c, lib/yyerror.c: New files.
6016
6017 gram_error can be static; it need not be extern.
6018 * src/reader.h (gram_error): Remove decl.
6019 * src/parse-gram.y (gram_error): Now static. Add static decl.
6020 (print_token_value): Omit parameter names from forward decl,
6021 for consistency.
6022
6023 2002-11-29 Paul Eggert <eggert@twinsun.com>
6024
6025 * doc/bison.texinfo: Emphasize that yylex and yyerror must
6026 be declared before being used. E.g., one should typically
6027 declare them in the prologue. Use GNU coding style in examples.
6028 Put "const" consistently after the type it modifies. Mention
6029 that C99 supports "inline". Mention that yyerror traditionally
6030 returns "int".
6031
6032 %parse-param and %lex-param now take just one argument, the
6033 declaration; the argument name is deduced from the declaration.
6034
6035 * doc/bison.texinfo (Parser Function, Pure Calling, Error
6036 Reporting, Table of Symbols): Document this.
6037 * src/parse-gram.y (add_param): New function.
6038 (COMMA): Remove.
6039 (declaration): Implement new rule for %parse-param and %lex-param.
6040 * src/scan-gram.l: "," now elicits a warning, rather than being
6041 a token; this is more compatible with byacc.
6042 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
6043
6044 2002-11-27 Paul Eggert <eggert@twinsun.com>
6045
6046 Rename identifiers to avoid real and potential collisions.
6047
6048 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
6049 to avoid collision with lex macro described by Bruce Lilly in
6050 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
6051 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
6052 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
6053 * src/parse-gram.y (print_token_value): Renamed from yyprint.
6054 All uses changed.
6055 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
6056 The name "yycontrol" violates the name space rules, and this stuff
6057 wasn't being used anyway.
6058 (input): Remove action; this stuff wasn't being used.
6059 (gram_error): Rename local variable yylloc -> loc.
6060 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
6061 (YY_DECL): Don't use "yy" at start of local variables.
6062 All uses changed, e.g., yylloc -> loc.
6063 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
6064 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
6065 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
6066 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
6067
6068 * src/parse-gram.y (gram_error): loc is now const *.
6069 * src/reader.h (gram_error): Likewise.
6070
6071 2002-11-24 Paul Eggert <eggert@twinsun.com>
6072
6073 Version 1.75c.
6074
6075 * tests/actions.at (Actions after errors): Use an output format
6076 more similar to that of the Printers and Destructors test.
6077 Test the position of the ';' token too.
6078 (Printers and Destructors): Likewise.
6079 (Printers and Destructors: %glr-parser): Remove for now, to avoid
6080 unnecessarily alarming people when the test fails.
6081
6082 * data/yacc.c (yyerrlab1): Move this label down, so that the
6083 parser does not discard the lookahead token if the user code
6084 invokes YYERROR. This change is required for POSIX conformance.
6085
6086 * lib/error.c: Sync with gnulib.
6087
6088 2002-11-22 Paul Eggert <eggert@twinsun.com>
6089
6090 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
6091 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
6092 * lib/xmalloc.c: Likewise.
6093
6094 2002-11-20 Paul Eggert <eggert@twinsun.com>
6095
6096 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
6097
6098 2002-11-20 Paul Eggert <eggert@twinsun.com>
6099
6100 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
6101 should use `if (! x) abort ();' rather than `assert (x);', and
6102 anyway it's one less thing to worry about configuring.
6103
6104 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
6105 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
6106 and replace all instances of assert with abort.
6107 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6108 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
6109
6110 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
6111 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
6112 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
6113 hash_find_entry, hash_rehash, hash_insert): Likewise.
6114 * src/conflicts.c (resolve_sr_conflict): Likewise.
6115 * src/lalr.c (set_goto_map, map_goto): Likewise.
6116 * src/nullable.c (nullable_compute): Likewise.
6117 * src/output.c (prepare_rules, token_definitions_output): Likewise.
6118 * src/reader.c (packgram, reader): Likewise.
6119 * src/state.c (state_new, state_free, state_transitions_set,
6120 state_reduction_find): Likewise.
6121 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
6122 symbol_pack): Likewise.
6123 * src/tables.c (conflict_row, pack_vector): Likewise.
6124 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6125 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6126 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
6127 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
6128
6129 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
6130 (ARGMATCH_CONSTRAINT): New macro.
6131 (ARGMATCH_ASSERT): Use it.
6132
6133 * src/system.h (verify): New macro.
6134 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
6135 rather than assert.
6136 * src/tables.c (tables_generate): Likewise.
6137
6138 * src/struniq.c (struniq_assert): Now returns void, and aborts
6139 if the assertion is false.
6140 (struniq_assert_p): Remove.
6141 * src/struniq.h: Likewise.
6142
6143 2002-11-18 Paul Eggert <eggert@twinsun.com>
6144
6145 * data/glr.c (yygetLRActions): Replace `yyindex' with
6146 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
6147 This fixes the regression with Sun ONE Studio 7 cc that I reported in
6148 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
6149
6150 2002-11-18 Akim Demaille <akim@epita.fr>
6151
6152 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
6153 space.
6154 From Tim Van Holder.
6155
6156 2002-11-17 Paul Eggert <eggert@twinsun.com>
6157
6158 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
6159 to "SyntaxError" for consistency with my 2002-11-15 change.
6160
6161 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
6162 not define to {}, since this breaks the common use of `YYDPRINTF
6163 ((...));' if a single statement is desired (e.g. before `else').
6164 Work around GCC warnings by surrounding corresponding calls with
6165 {} if needed.
6166 (yyhasResolvedValue): Remove unused function.
6167 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
6168 loop body.
6169 (yyreportSyntaxError): Renamed from yyreportParseError.
6170 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
6171 All uses changed.
6172 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
6173 extern when possible. Remove unused initializations.
6174
6175 2002-11-16 Akim Demaille <akim@epita.fr>
6176
6177 Augment the similarity between GLR and LALR traces.
6178
6179 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
6180 (YY_REDUCE_PRINT): New.
6181 (yyparse): Use them.
6182 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
6183 YYDPRINT here.
6184 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
6185 state reached after the reduction/recovery, since...
6186 (yyparse, yyprocessOneStack): Report the state we are entering in.
6187
6188 2002-11-16 Akim Demaille <akim@epita.fr>
6189
6190 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
6191 Add support for --trace=skeleton.
6192 * src/scan-skel.l: %option debug.
6193 Scan strings of non-@ or \n instead of character by character.
6194 (scan_skel): Handle trace_skeleton.
6195 (QPUTS): New.
6196 (@output_parser_name@, @output_header_name@): ``Restore'' their
6197 support (used to be M4 macros).
6198 * data/yacc.c: Quote larger chunks, a la glr.c.
6199 * data/lalr1.cc: Likewise.
6200 The header guards are no longer available, so use some other
6201 string than `YYLSP_NEEDED'.
6202
6203 2002-11-16 Akim Demaille <akim@epita.fr>
6204
6205 Make the ``Printers and Destructors'' test more verbose, taking
6206 `yacc.c''s behavior as (possibly wrong) reference.
6207
6208 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
6209 instead of fprint on stdout.
6210 Set and report the last_line of the symbols.
6211 Consistently display values and locations.
6212
6213 2002-11-16 Paul Eggert <eggert@twinsun.com>
6214
6215 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
6216
6217 2002-11-15 Paul Eggert <eggert@twinsun.com>
6218
6219 * tests/actions.at (Actions after errors): New test case.
6220
6221 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
6222 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
6223 tests/action.at, tests/calc.at, tests/conflicts.at,
6224 tests/cxx-type.at, tests/regression.at:
6225 "parse error" -> "syntax error" for POSIX compatibility.
6226 "parsing stack overflow..." -> "parser stack overflow" so
6227 that code matches Bison documentation.
6228
6229 2002-11-15 Akim Demaille <akim@epita.fr>
6230
6231 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
6232 take two BRACED_CODE, not two string_content.
6233 Free the scanner's obstack when we are done.
6234 (code_content): New.
6235 * tests/calc.at: Adjust.
6236 * doc/bison.texinfo: Adjust.
6237 Also, make sure to include the `,' for these declarations.
6238
6239 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
6240
6241 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
6242 definition; avoids potential autoreconf problems.
6243
6244 2002-11-15 Akim Demaille <akim@epita.fr>
6245
6246 Always check the value returned by yyparse.
6247
6248 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
6249 returned by yyparse.
6250 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
6251 Adjust calls.
6252 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
6253 returned by yyparse.
6254
6255 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6256
6257 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
6258 on input.at test.
6259
6260 2002-11-14 Paul Eggert <eggert@twinsun.com>
6261
6262 * src/output.c (output_skeleton): Call xfopen instead of
6263 duplicating xfopen's body.
6264
6265 Fix bugs reported by Nelson H. F. Beebe in
6266 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
6267
6268 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
6269 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
6270 Group compiler. Instead, use "$CC -E bar.c". Include the .h
6271 file twice in the grammar, as an extra check.
6272
6273 * tests/input.at (Torturing the Scanner): Surround the
6274 backslash-newline tests with "#if 0", to make it less likely that
6275 we'll run into compiler bugs. Bring back solitary \ inside
6276 comment, but add a closing comment to work around HP C bug. Don't
6277 test backslash-newline in C character constant.
6278
6279 2002-11-14 Akim Demaille <akim@epita.fr>
6280
6281 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
6282 status of the compiler.
6283 Calling `exit 1' is no longer needed.
6284 Reported by Nelson H. F. Beebe.
6285
6286 2002-11-14 Akim Demaille <akim@epita.fr>
6287
6288 * tests/atlocal.in (CPPFLAGS): We have config.h.
6289 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
6290 New.
6291 * tests/actions.at, tests/calc.at, tests/conflicts.at,
6292 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
6293 * tests/regression.at, tests/torture.at: Use them for all the
6294 grammars that are to be compiled.
6295 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
6296 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
6297 * doc/bison.texinfo (GLR Parsers): Document `inline'.
6298
6299 2002-11-14 Akim Demaille <akim@epita.fr>
6300
6301 * doc/bison.texinfo: Various formatting changes (alignments in
6302 samples, additional @group/@end group, GCS in samples.
6303 Use @deffn instead of simple @table to define the directives,
6304 macros, variables etc.
6305
6306 2002-11-13 Paul Eggert <eggert@twinsun.com>
6307
6308 Fix some bugs reported by Albert Chin-A-Young in
6309 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
6310
6311 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
6312 -o c"; the HP C compiler chatters during compilation.
6313 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
6314 * tests/headers.at (export YYLTYPE): Likewise.
6315
6316 * tests/input.at (Torturing the Scanner): Remove lines containing
6317 solitary backslashes, as they tickle a bug in the HP C compiler.
6318
6319 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
6320 comments, since they're not portable. Use GNU coding style.
6321
6322 2002-11-13 Akim Demaille <akim@epita.fr>
6323
6324 * data/yacc.c: Leave bigger chunks of quoted text.
6325 (YYDSYMPRINTF): New.
6326 Use it to report symbol activities.
6327 * data/glr.c (YYDSYMPRINTF): New.
6328 Use it.
6329
6330 2002-11-12 Paul Eggert <eggert@twinsun.com>
6331
6332 Version 1.75b.
6333
6334 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
6335 (yyglrReduce): Return yyok, not 0.
6336 This should avoid the enumerated-type warnings reported
6337 by Nelson H. F. Beebe in
6338 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
6339
6340 * lib/bbitset.h (BITSET_INLINE): Remove.
6341 * lib/bitset.h [! BITSET_INLINE]: Remove.
6342 (bitset_set, bitset_reset, bitset_test): Rename local vars
6343 to avoid shadowing warnings by GCC.
6344
6345 * data/glr.c (inline): Remove #define. It's the user's
6346 responsibility to #define it away, just like 'const'.
6347 This fixes one of the bugs reported by Nelson H. F. Beebe in
6348 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
6349
6350 * Makefile.maint (po-check): Scan .l and .y files instead of the
6351 .c and the .h files that they generate. This fixes the bug
6352 reported by Tim Van Holder in:
6353 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
6354 Look for N_ as well as for _. Try to avoid matching #define for
6355 N_ and _.
6356 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
6357 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
6358 * src/scan-gram.l: Revamp regular expressions so that " and '
6359 do not confuse xgettext.
6360
6361 * src/struniq.h (struniq_new): Do not declare the return type
6362 to be 'const'; this violates the C standard.
6363 * src/struniq.c (struniq_new): Likewise.
6364
6365 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
6366
6367 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
6368 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
6369 linker.
6370
6371 2002-11-12 Akim Demaille <akim@epita.fr>
6372
6373 * Makefile.maint: Sync with Autoconf:
6374 (local_updates): New.
6375
6376 2002-11-12 Akim Demaille <akim@epita.fr>
6377
6378 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
6379
6380 2002-11-12 Akim Demaille <akim@epita.fr>
6381
6382 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
6383 locations.
6384
6385 2002-11-12 Akim Demaille <akim@epita.fr>
6386
6387 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
6388 not yyvalue.
6389
6390 2002-11-12 Akim Demaille <akim@epita.fr>
6391
6392 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
6393 Use it to test the GLR parser.
6394
6395 2002-11-12 Akim Demaille <akim@epita.fr>
6396
6397 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
6398 defines it.
6399 * data/glr.c (yystos): New.
6400 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
6401 (YYDSYMPRINT): New.
6402 (yyval): Don't define it, it is handled via M4.
6403 (yyrecoverParseError): Free verbosely the discarded symbols.
6404 * data/yacc.c (yysymprint): Remove, rather...
6405 (b4_yysymprint_generate): invoke.
6406 * data/c.m4 (b4_yysymprint_generate): New.
6407 Accept pointers as arguments, as opposed to the version from
6408 yacc.c.
6409 (b4_yydestruct_generate): Likewise.
6410 * tests/cations.at (Printers and Destructors): Use Bison directives
6411 instead of CPP macros.
6412 Don't rely on internal details.
6413
6414 2002-11-12 Akim Demaille <akim@epita.fr>
6415
6416 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
6417 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
6418 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
6419 it against YYEMPTY and so forth), work on yytoken (i.e., set
6420 it to YYEMPTY etc.).
6421 (yydestruct): Replace with a b4_yydestruct_generate invocation.
6422 (b4_symbol_actions): Remove.
6423 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
6424 for 0, end-of-input.
6425
6426 2002-11-12 Akim Demaille <akim@epita.fr>
6427
6428 * doc/bison.texinfo (Destructor Decl): New.
6429
6430 2002-11-12 Akim Demaille <akim@epita.fr>
6431
6432 * src/tables.c (tables_generate): Use free for pointers that
6433 cannot be NULL, not XFREE.
6434 (pack_vector): Use assert, not fatal, for bound violations.
6435 * src/state.c (state_new): Likewise.
6436 * src/reader.c (reader): Likewise.
6437 * src/lalr.c (set_goto_map): Likewise.
6438 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
6439 the file name.
6440
6441 2002-11-12 Akim Demaille <akim@epita.fr>
6442
6443 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
6444 Restore.
6445 * src/scan-gram.l (last_string): Is global to the file, not to
6446 yylex.
6447 * src/parse-gram.y (input): Don't append the epilogue here,
6448 (epilogue.opt): do it here, and free the scanner's obstack.
6449 * src/reader.c (epilogue_set): Rename as...
6450 (epilogue_augment): this.
6451 * data/c.m4 (b4_epilogue): Defaults to empty.
6452
6453 2002-11-12 Akim Demaille <akim@epita.fr>
6454
6455 * src/getargs.c (long_options): Remove duplicates.
6456 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
6457 Remove.
6458 * doc/bison.rnh: Remove.
6459 * doc/bison.texinfo (VMS Invocation): Remove.
6460
6461 2002-11-12 Akim Demaille <akim@epita.fr>
6462
6463 * src/struniq.h, src/struniq.c (struniq_t): Is const.
6464 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
6465
6466 Use struniq for symbols.
6467
6468 * src/symtab.h (symbol_t): The tag member is a struniq.
6469 (symbol_type_set): Adjust.
6470 * src/symtab.c (symbol_new): Takes a struniq.
6471 (symbol_free): Don't free the tag member.
6472 (hash_compare_symbol_t, hash_symbol_t): Rename as...
6473 (hash_compare_symbol, hash_symbol): these.
6474 Use the fact that tags as struniqs.
6475 (symbol_get): Use struniq_new.
6476 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
6477 Returns a strniq.
6478 * src/reader.h (merger_list, grammar_currentmerge_set): The name
6479 and type members are struniqs.
6480 * src/reader.c (get_merge_function)
6481 (grammar_current_rule_merge_set): Adjust.
6482 (TYPE, current_type): Are struniq.
6483
6484 Use struniq for file names.
6485
6486 * src/files.h, src/files.c (infile): Split into...
6487 (grammar_file, current_file): these.
6488 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
6489 * src/reduce.c (reduce_print): Likewise.
6490 * src/getargs.c (getargs): Likewise.
6491 * src/complain.h, src/complain.c: Likewise.
6492 * src/main.c (main): Call struniqs_new early enough to use it for
6493 file names.
6494 Don't free the input file name.
6495
6496 2002-11-12 Akim Demaille <akim@epita.fr>
6497
6498 * src/symtab.c (symbol_free): Remove dead deactivated code:
6499 type_name are properly removed.
6500 Don't use XFREE to free items that cannot be NULL.
6501 * src/struniq.h, src/struniq.c: New.
6502 * src/main.c (main): Initialize/free struniqs.
6503 * src/parse-gram.y (%union): Add astruniq member.
6504 (yyprint): Adjust.
6505 * src/scan-gram.l (<{tag}>): Return a struniq.
6506 Free the obstack bit that used to store it.
6507 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
6508
6509 2002-11-11 Paul Eggert <eggert@twinsun.com>
6510
6511 Revamp to fix many (but not all) of the C- and M4-related quoting
6512 problems. Among other things, this fixes the Bison bug reported
6513 by Jan Hubicka when processing the Bash grammar; see:
6514 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
6515
6516 Use new @ escapes consistently. Represent brackets with @{ and @}
6517 rather than @<:@ and @:>@, since this works a bit better with dumb
6518 editors like vi. Represent @ with @@, since @ is now consistently
6519 an escape. Use @oline@ and @ofile@ rather than __oline__ and
6520 __ofile__, to avoid unexpected expansions. Similarly, use @output
6521 rather than #output.
6522
6523 * data/c.m4 (b4_copyright): Omit file name from comment, since
6524 the file name could contain "*/".
6525 (b4_synclines_flag): Don't quote the 2nd argument; it should already
6526 be quoted. All uses changed.
6527
6528 * data/glr.c: Use new @ escapes consistently.
6529 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
6530 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
6531 Remove, since they couldn't handle arbitrary characters in file
6532 names.
6533 * data/lalr1.cc: Likewise.
6534 * data/yacc.c: Likewise.
6535
6536 * src/files.c (output_infix): Remove; all uses removed.
6537 * src/files.h: Likewise.
6538
6539 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
6540 mishandled funny characters in file names, and anyway it isn't
6541 needed any more.
6542 * data/yacc.c: Likewise.
6543 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
6544
6545 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
6546 * data/yacc.c: Likewise.
6547
6548 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
6549 strings now.
6550 (muscle_init): Quote filename as a C string.
6551 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
6552 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
6553 * src/output.c (escaped_file_name_output): New function.
6554 (prepare_symbols): Quote tokens for M4.
6555 (prepare): Don't insert output_infix, output_prefix,
6556 output_parser_name, output_header_name; this is now down by scan-skel.
6557 Insert skeleton as a C string.
6558
6559 * src/output.c (user_actions_output, symbol_destructors_output,
6560 symbol_printers_output): Quote filenames for C and M4.
6561 * src/reader.c (prologue_augment, epilogue_set): Likewise.
6562
6563 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
6564 escapes other than \\ and \'; this simplifies the code.
6565 (<SC_STRING>): Likewise, for \\ and \".
6566 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
6567 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
6568 Use new escapes @{ and @} for [ and ].
6569
6570 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
6571 them with auto vars.
6572 Switch to new escape scheme, where @ is the escape character uniformly.
6573 Abort if a stray escape character is found. Avoid unbounded input
6574 buffer when parsing non-escaped text.
6575
6576 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
6577 __oline__, #output, $@, and @{ do not have unintended meanings.
6578
6579 2002-11-09 Paul Eggert <eggert@twinsun.com>
6580
6581 Fix the test failure due to GCC warnings described in
6582 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
6583 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
6584 evaluate to 0 if it's impossible for NINF to be in the respective
6585 table.
6586 (yygetLRActions, yyrecoverParseError): Use them.
6587
6588 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
6589 counted in the token inserted at end of file. Now takes
6590 location_t *, not location_t, so that the location can be
6591 adjusted. All uses changed.
6592
6593 * tests/regression.at (Invalid inputs): Adjust wording in
6594 diagnostic to match the new behavior.
6595
6596 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
6597 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
6598 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
6599 abort ();'. This reduces the runtime of the "Many lookaheads"
6600 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
6601 GCC 3.2.
6602
6603 2002-11-07 Paul Eggert <eggert@twinsun.com>
6604
6605 * src/parse-gram.y (CHARACTER): Remove unused token.
6606 All uses removed.
6607
6608 * src/scan-gram.l: Remove stack option. We no longer use the
6609 stack, since the stack was never deeper than 1; instead, use the
6610 new auto var c_context to record the stacked value.
6611
6612 Remove nounput option. At an unexpected end of file, we now unput
6613 the minimal input necessary to end cleanly; this simplifies the
6614 code.
6615
6616 Avoid unbounded token sizes where this is easy.
6617
6618 (unexpected_end_of_file): New function.
6619 Use it to systematize the error message on unexpected EOF.
6620 (last-string): Now auto, not static.
6621 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
6622 (scanner_last_string_free): Remove; not used.
6623 (percent_percent_count): Move decl to just before use.
6624 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
6625 not the (never otherwised-used) CHARACTER.
6626
6627 2002-11-07 Akim Demaille <akim@epita.fr>
6628
6629 Let yyerror always receive the msg as last argument, so that
6630 yyerror can be variadic.
6631
6632 * data/yacc.c (b4_yyerror_args): New.
6633 Use it when calling yyerror.
6634 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
6635 Use it when calling yyerror.
6636 * doc/bison.texinfo (Error Reporting): Adjust.
6637 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
6638 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
6639
6640 2002-11-06 Akim Demaille <akim@epita.fr>
6641
6642 #line should have quoted strings.
6643 Ideally, this should be done by m4_quotearg.
6644
6645 * src/scan-skel.l: Include quotearg.h.
6646 Quote __ofile__.
6647 * src/output.c (symbol_printers_output)
6648 (symbol_destructors_output): Quote the file name.
6649
6650 2002-11-06 Akim Demaille <akim@epita.fr>
6651
6652 * tests/regression.at (Invalid inputs): Adjust to the recent
6653 messages.
6654
6655 2002-11-06 Akim Demaille <akim@epita.fr>
6656
6657 Restore --no-lines.
6658 Reported by Jim Kent.
6659
6660 * data/c.m4 (b4_syncline): New.
6661 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
6662 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
6663 * src/output.c (user_actions_output): Likewise.
6664 (prepare): Define 'b4_synclines_flag'.
6665 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
6666
6667 2002-11-06 Akim Demaille <akim@epita.fr>
6668
6669 * src/main.c (main): Free `infile'.
6670 * src/scan-gram.l (handle_syncline): New.
6671 Recognize `#line'.
6672 * src/output.c (user_actions_output, symbol_destructors_output)
6673 (symbol_printers_output): Use the location's file name, not
6674 infile.
6675 * src/reader.c (prologue_augment, epilogue_set): Likewise.
6676
6677 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6678
6679 * src/tables.c (matching_state): Don't allow states to match if
6680 either has GLR conflict entries.
6681
6682 2002-11-05 Paul Eggert <eggert@twinsun.com>
6683
6684 * src/scan-gram.l: Use more accurate diagnostics, e.g.
6685 "integer out of range" rather than "invalid value".
6686 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
6687 accordingly.
6688
6689 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
6690 Also, remove one static variable in the scanner.
6691
6692 * src/scan-gram.l (braces_level): Now auto, not static.
6693 Initialize to zero if the compiler is being picky.
6694 (INITIAL): Clear braces_level instead of incrementing it.
6695 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
6696 as POSIX 1003.1-2001 requires.
6697 * src/system.h (IF_LINT): New macro, taken from coreutils.
6698 * configure.ac: Define "lint" if --enable-gcc-warnings.
6699
6700 2002-11-05 Akim Demaille <akim@epita.fr>
6701
6702 * src/scan-gram.l: When it starts with `%', complain about the
6703 whole directive, not just that `invalid character: %'.
6704
6705 2002-11-04 Akim Demaille <akim@epita.fr>
6706
6707 * Makefile.maint: Update from Autoconf.
6708 (update, cvs-update, po-update, do-po-update): New.
6709
6710 2002-11-04 Akim Demaille <akim@epita.fr>
6711
6712 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
6713 and yyerror.
6714 Have yyerror `use' its arguments.
6715 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
6716 returns true when location & yacc & pure & parse-param.
6717 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
6718
6719 2002-11-04 Akim Demaille <akim@epita.fr>
6720
6721 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
6722 clashes.
6723 * src/scan-gram.l: Use [\'] instead of ['] to pacify
6724 font-lock-mode.
6725 Use complain_at.
6726 Use quote, not quote_n since LOCATION_PRINT no longer uses the
6727 slot 0.
6728
6729 2002-11-03 Paul Eggert <eggert@twinsun.com>
6730
6731 * src/reader.c (get_merge_function, grammar_current_rule_check):
6732 Use consistent diagnostics for reporting type name clashes.
6733 Quote the types with <>, for consistency with Yacc.
6734 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
6735
6736 2002-11-03 Akim Demaille <akim@epita.fr>
6737
6738 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
6739 New.
6740 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
6741 (b4_parse_param): Remove.
6742 Use b4_identification.
6743 Propagate b4_pure_args where needed to pass them to yyerror.
6744 * data/glr.m4 (b4_parse_param): Remove.
6745 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
6746 (b4_lpure_formals): New.
6747 Use b4_identification.
6748 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
6749 b4_user_formals and b4_user_args.
6750 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
6751 (yyreportAmbiguity): When using a pure parser, also need
6752 the location, and the parse-params.
6753 Adjust callers.
6754 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
6755 When using a pure parser, also need the parse-params.
6756 Adjust callers.
6757 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
6758 (%pure-parser + %parse-param) LALR and GLR parsers.
6759 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
6760 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
6761 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
6762 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
6763 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
6764 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
6765 * doc/bison.texinfo: Untabify the whole file.
6766 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
6767 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
6768 (Error Reporting): Adjust to these new directives.
6769 Document %error-verbose, deprecate YYERROR_VERBOSE.
6770
6771 2002-11-03 Akim Demaille <akim@epita.fr>
6772
6773 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
6774 AT_CHECK_CALC_GLR invocations to use % directives, instead of
6775 command line options.
6776 * tests/cxx-type.at: Formatting changes.
6777
6778 2002-11-03 Paul Eggert <eggert@twinsun.com>
6779
6780 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
6781 to count columns correctly, and to check for invalid inputs.
6782
6783 Use mbsnwidth to count columns correctly. Account for tabs, too.
6784 Include mbswidth.h.
6785 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
6786 (extend_location): New function.
6787 (YY_LINES): Remove.
6788
6789 Handle CRLF in C code rather than in Lex code.
6790 (YY_INPUT): New macro.
6791 (no_cr_read): New function.
6792
6793 Scan UCNs, even though we don't fully handle them yet.
6794 (convert_ucn_to_byte): New function.
6795
6796 Handle backslash-newline correctly in C code.
6797 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
6798 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
6799 all uses changed.
6800 (tag, splice): New EREs. Do not allow NUL or newline in tags.
6801 Use {splice} wherever C allows backslash-newline.
6802 YY_STEP after space, newline, vertical-tab.
6803 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
6804
6805 (letter, id): Don't assume ASCII; e.g., spell out a-z.
6806
6807 ({int}, handle_action_dollar, handle_action_at): Check for integer
6808 overflow.
6809
6810 (YY_STEP): Omit trailing semicolon, so that it's more like C.
6811
6812 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
6813 as well as \000. Check for UCHAR_MAX, not 255.
6814 Allow \x with an arbitrary positive number of digits, as in C.
6815 Check for overflow here.
6816 Allow \? and UCNs, for compatibility with C.
6817
6818 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
6819 with quote slot used by complain_at.
6820
6821 * tests/input.at: Add tests for backslash-newline, m4 quotes
6822 in symbols, long literals, and funny escapes in strings.
6823
6824 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
6825 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
6826 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
6827 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
6828 * m4/mbswidth.m4: New file, from GNU coreutils.
6829
6830 * doc/bison.texinfo (Grammar Outline): Document // comments.
6831 (Symbols): Document that trigraphs have no special meaning in Bison,
6832 nor is backslash-newline allowed.
6833 (Actions): Document that trigraphs have no special meaning.
6834
6835 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
6836 no longer used.
6837
6838 2002-11-02 Paul Eggert <eggert@twinsun.com>
6839
6840 * src/reader.c: Don't include quote.h; not needed.
6841 (get_merge_function): Reword warning to be consistent with
6842 type clash diagnostic in grammar_current_rule_check.
6843
6844 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
6845 bug in trigraph handling.
6846
6847 * src/output.c (prepare_symbols): When printing token names,
6848 escape "[" as "@<:@" and likewise for "]".
6849
6850 * src/system.h (errno): Remove declaration, as we are now
6851 assuming C89 or better, and C89 guarantees errno.
6852
6853 2002-10-30 Paul Eggert <eggert@twinsun.com>
6854
6855 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
6856 Check for close failures.
6857 * src/files.h (xfclose): Return void, not int, since it always
6858 returned zero.
6859 * src/files.c (xfclose): Likewise. Report I/O error if ferror
6860 indicates one.
6861 * src/output.c (output_skeleton): Use xfclose rather than fclose
6862 and ferror. xfclose now checks ferror.
6863
6864 * data/glr.c (YYLEFTMOST_STATE): Remove.
6865 (yyreportTree): Use a stack-based leftmost state. This avoids
6866 our continuing battles with bogus warnings about initializers.
6867
6868 2002-10-30 Akim Demaille <akim@epita.fr>
6869
6870 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
6871 #if.
6872
6873 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6874
6875 * tests/glr-regr1.at: New test for reported regressions.
6876 * tests/testsuite.at: Add glr-regr1.at test.
6877 * tests/Makefile.am: Add glr-regr1.at test.
6878
6879 2002-10-24 Paul Eggert <eggert@twinsun.com>
6880
6881 Version 1.75a.
6882
6883 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
6884 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
6885 we use malloc. Don't assume 'A' through 'Z' are contiguous.
6886 Don't assume strdup exists; POSIX says its an XSI extension.
6887 Check for buffer overflow on input.
6888
6889 2002-10-24 Akim Demaille <akim@epita.fr>
6890
6891 * src/output.c (output_skeleton): Don't disable M4sugar comments
6892 too soon: it results in comments being expanded.
6893 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
6894 first output.
6895
6896 2002-10-24 Akim Demaille <akim@epita.fr>
6897
6898 * data/yacc.c (m4_int_type): New.
6899 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
6900 char' as only yacc.c wants K&R portability.
6901 * data/glr.c (yysigned_char): Remove.
6902 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
6903 Reported by Quoc Peyrot.
6904
6905 2002-10-23 Paul Eggert <eggert@twinsun.com>
6906
6907 * src/main.c (main): With --trace=time, report times even if a
6908 non-fatal error occurs. Formerly, the times were reported in some
6909 such cases but not in others.
6910 * src/reader.c (reader): Just return if a complaint has been issued,
6911 instead of exiting, so that 'main' can report times.
6912
6913 2002-10-22 Akim Demaille <akim@epita.fr>
6914
6915 * src/system.h: Include sys/types.
6916 Reported by Bert Deknuydt.
6917
6918 2002-10-23 Paul Eggert <eggert@twinsun.com>
6919
6920 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
6921 Suggested by Art Haas.
6922
6923 2002-10-22 Paul Eggert <eggert@twinsun.com>
6924
6925 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
6926 decl; not needed any more.
6927 * src/main.c (main): Use return to exit, undoing yesterday's change.
6928 The last OS that we could find where this wouldn't work is
6929 SunOS 3.5, and that's too old to worry about now.
6930
6931 * data/glr.c (struct yyltype): Define members even when not
6932 doing locations. This is more consistent with yacc.c, and it
6933 works around the following bug reports:
6934 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
6935 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
6936
6937 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
6938 @acronym consistently. Standardize on "Yacc" instead of "YACC",
6939 "Algol" instead of "ALGOL". Give a bit more history about BNF.
6940
6941 2002-10-22 Akim Demaille <akim@epita.fr>
6942
6943 * data/README: New.
6944
6945 2002-10-21 Paul Eggert <eggert@twinsun.com>
6946
6947 Be consistent about 'bool'; the old code used an enum in one
6948 module and an int in another, and this violates the C standard.
6949 * m4/stdbool.m4: New file, from coreutils 4.5.3.
6950 * configure.ac (AC_HEADER_STDBOOL): Add.
6951 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
6952 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
6953 * src/symtab.c (hash_compare_symbol_t): Likewise.
6954 * src/system.h (bool, false, true): Use a definition consistent
6955 with ../lib/hash.c. All uses changed.
6956
6957 * src/complain.c (warning_issued): Renamed from warn_message_count,
6958 so that we needn't worry about integer overflow (!).
6959 Now of type bool. All uses changed.
6960 (complaint_issued): Renamed from complain_message_count; likewise.
6961
6962 * src/main.c (main): Use exit to exit with failure.
6963
6964 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
6965 rather than 1 and 0.
6966 * src/main.c (main): Likewise.
6967 * src/getargs.c (getargs): Likewise.
6968 * src/reader.c (reader): Likewise.
6969
6970 * src/getarg.c (getargs): Remove duplicate code for
6971 "Try `bison --help'".
6972
6973 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
6974 What was that "2" for?
6975
6976 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
6977 * src/getargs.c (usage): Likewise.
6978
6979 * src/getargs.c (getargs): When there are too few operands, report
6980 the last one. When there are too many, report the first extra
6981 one. This is how diffutils does it.
6982
6983 2002-10-20 Paul Eggert <eggert@twinsun.com>
6984
6985 Remove K&R vestiges.
6986 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
6987 * src/complain.c (VA_START): Remove. Assume prototypes.
6988 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
6989 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
6990 fatal): Assume prototypes.
6991 * src/complain.h: Assume prototypes.
6992 * src/system.h (PARAMS): Remove.
6993 Include <limits.h> unconditionally, since it's guaranteeed even
6994 for a freestanding C89 compiler.
6995 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
6996 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
6997
6998 2002-10-20 Akim Demaille <akim@epita.fr>
6999
7000 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
7001 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
7002 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
7003 (yyresolveStates, yyresolveAction, yyresolveStack)
7004 (yyprocessOneStack): Use them.
7005 (yy_reduce_print): New.
7006 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
7007
7008 2002-10-20 Akim Demaille <akim@epita.fr>
7009
7010 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
7011 arguments and output `void'.
7012 (b4_c_function): Rename as...
7013 (b4_c_function_def): this.
7014 (b4_c_function_decl, b4_c_ansi_function_def)
7015 (b4_c_ansi_function_decl): New.
7016 Change the interpretation of the arguments: before `int, foo', now
7017 `int foo, foo'.
7018 * data/yacc.c (yyparse): Prototype and define thanks to these.
7019 Adjust b4_c_function_def uses.
7020 * data/glr.c (yyparse): Likewise, but ANSI only.
7021
7022 2002-10-20 Akim Demaille <akim@epita.fr>
7023
7024 * src/output.c (prepare): Move the definition of `tokens_number',
7025 `nterms_number', `undef_token_number', `user_token_number_max'
7026 to...
7027 (prepare_tokens): Here.
7028 (prepare_tokens): Rename as...
7029 (prepare_symbols): this.
7030 (prepare): Move the definition of `rules_number' to...
7031 (prepare_rules): here.
7032 (prepare): Move the definition of `last', `final_state_number',
7033 `states_number' to...
7034 (prepare_states): here.
7035 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
7036
7037 2002-10-20 Akim Demaille <akim@epita.fr>
7038
7039 * src/tables.h, src/tables.c, src/output.c: Comment changes.
7040
7041 2002-10-20 Akim Demaille <akim@epita.fr>
7042
7043 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
7044 * data/c.m4: here.
7045
7046 2002-10-20 Akim Demaille <akim@epita.fr>
7047
7048 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
7049 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
7050 `pair'.
7051 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
7052 `name' to...
7053 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
7054 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
7055 These.
7056
7057 2002-10-19 Paul Eggert <eggert@twinsun.com>
7058
7059 Do not create a temporary file, as that involves security and
7060 cleanup headaches. Instead, use a pair of pipes.
7061 Derived from a suggestion by Florian Krohm.
7062 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
7063 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
7064 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
7065 (BISON_PREREQ_SUBPIPE): Add.
7066 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
7067 Add subpipe.h, subpipe.c.
7068 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
7069 * po/POTFILES.in: Add lib/subpipe.c.
7070 * src/output.c: Include "subpipe.h".
7071 (m4_invoke): Remove decl.
7072 (scan_skel): New decl.
7073 (output_skeleton): Use pipe rather than temporary file for m4 input.
7074 Check that m4sugar.m4 is readable, to avoid deadlock.
7075 Check for pipe I/O error.
7076 * src/scan-skel.l (readpipe): Remove decl.
7077 (scan_skel): New function, to be used in place of m4_invoke.
7078 Read from stream rather than file.
7079
7080 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
7081 float, as this generates a warning on Solaris 8 + GCC 3.2 with
7082 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
7083 this generates a more-accurate value anyway.
7084
7085 * lib/timevar.c (timervar_accumulate): Rename locals to
7086 avoid confusion with similarly-named more-global.
7087 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
7088
7089 * src/output.c (prepare): Use xstrdup to convert char const *
7090 to char *, to avoid GCC warning.
7091
7092 2002-10-19 Akim Demaille <akim@epita.fr>
7093
7094 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
7095 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
7096 Use them to have `calc.y' ready for %pure-parser.
7097 * data/yacc.c (YYLEX): Pass a yylex return type to
7098 b4_c_function_call.
7099
7100 2002-10-19 Akim Demaille <akim@epita.fr>
7101
7102 Prototype support of %lex-param and %parse-param.
7103
7104 * src/parse-gram.y: Add the definition of the %lex-param and
7105 %parse-param tokens, plus their rules.
7106 Drop the `_' version of %glr-parser.
7107 Add the "," token.
7108 * src/scan-gram.l (INITIAL): Scan them.
7109 * src/muscle_tab.c: Comment changes.
7110 (muscle_insert, muscle_find): Rename `pair' as `probe'.
7111 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
7112 (muscle_entry_s): The `value' member is no longer const.
7113 Adjust all dependencies.
7114 * src/muscle_tab.c (muscle_init): Adjust: use
7115 MUSCLE_INSERT_STRING.
7116 Initialize the obstack earlier.
7117 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
7118 (muscle_pair_list_grow): New.
7119 * data/c.m4 (b4_c_function_call, b4_c_args): New.
7120 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
7121 * tests/calc.at: Use %locations, not --locations.
7122 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
7123
7124 2002-10-19 Akim Demaille <akim@epita.fr>
7125
7126 * src/getargs.c (usage): Take status as argument and exit
7127 accordingly.
7128 Report the traditional `Try ... --help' message when status != 0.
7129 (usage, version): Don't take a FILE * as arg, it is pointless.
7130 (getargs): When there is an incorrect number of arguments, make it
7131 an error, and report it GNUlically thanks to `usage ()'.
7132
7133 2002-10-18 Paul Eggert <eggert@twinsun.com>
7134
7135 * data/glr.c (yyreportParseError): Don't assume that sprintf
7136 yields the length of the printed string, as this is not true
7137 on SunOS 4.1.4. Reported by Peter Klein.
7138
7139 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
7140 * tests/conflicts.at (%nonassoc and eof): Likewise.
7141 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
7142
7143 2002-10-17 Akim Demaille <akim@epita.fr>
7144
7145 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
7146 * src/getargs.c (trace_types, trace_args): Adjust.
7147 * src/reader.c (grammar_current_rule_prec_set)
7148 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
7149 Standardize error messages.
7150 And s/@prec/%prec/!
7151 (reader): Use trace_flag to enable scanner/parser debugging,
7152 instead of an adhoc scheme.
7153 * src/scan-gram.l: Remove trailing debugging code.
7154
7155 2002-10-16 Paul Eggert <eggert@twinsun.com>
7156
7157 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
7158 MUSCLE_TAB_H.
7159
7160 * NEWS: Officially drop support for building Bison with K&R C,
7161 since it didn't work anyway and it's not worth worrying about.
7162 * Makefile.maint (wget_files): Remove ansi2knr.c.
7163 (ansi2knr.c-url_prefix): Remove.
7164 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
7165 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7166 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7167
7168 2002-10-15 Paul Eggert <eggert@twinsun.com>
7169
7170 Stop using the "enum_" trick for K&R-style function definitions;
7171 it confused me, and I was the author! Instead, assume that people
7172 who want to use K&R C compilers (when using these modules in GCC,
7173 perhaps?) will run ansi2knr.
7174
7175 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
7176 All uses of "enum_" changed to "enum ".
7177 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
7178 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
7179
7180 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
7181 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
7182 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
7183 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
7184 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
7185 abitset_not, abitset_ones, abitset_or, abitset_or_and,
7186 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
7187 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
7188 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
7189 Use function prototypes; this removes the need for declaring
7190 static functions simply to provide their prototypes.
7191 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
7192 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
7193 bitset_count_, bitset_create, bitset_dump, bitset_first,
7194 bitset_free, bitset_init, bitset_last, bitset_next,
7195 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
7196 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
7197 bitset_print, bitset_release_memory, bitset_toggle_,
7198 bitset_type_choose, bitset_type_get, bitset_type_name_get,
7199 debug_bitset): Likewise.
7200 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
7201 * lib/bitset_stats.c (bitset_log_histogram_print,
7202 bitset_percent_histogram_print, bitset_stats_and,
7203 bitset_stats_and_cmp, bitset_stats_and_or,
7204 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
7205 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
7206 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
7207 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
7208 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
7209 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
7210 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
7211 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
7212 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
7213 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
7214 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
7215 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
7216 bitset_stats_zero): Likewise.
7217 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
7218 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
7219 bitsetv_dump, debug_bitsetv): Likewise.
7220 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
7221 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
7222 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
7223 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
7224 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
7225 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
7226 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
7227 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
7228 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
7229 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
7230 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
7231 Likewise.
7232 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
7233 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
7234 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
7235 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
7236 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
7237 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
7238 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
7239 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
7240 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
7241 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
7242 lbitset_xor_cmp, lbitset_zero): Likewise.
7243
7244 2002-10-14 Akim Demaille <akim@epita.fr>
7245
7246 Version 1.75.
7247
7248 2002-10-14 Akim Demaille <akim@epita.fr>
7249
7250 * tests/Makefile.am (maintainer-check-posix): New.
7251
7252 2002-10-14 Akim Demaille <akim@epita.fr>
7253
7254 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
7255 member.
7256
7257 2002-10-14 Akim Demaille <akim@epita.fr>
7258
7259 * src/tables.c (table_ninf_remap): base -> tab.
7260 Reported by Matt Rosing.
7261
7262 2002-10-14 Paul Eggert <eggert@twinsun.com>
7263
7264 * tests/action.at, tests/calc.at, tests/conflicts.at,
7265 tests/cxx-type.at, tests/headers.at, tests/input.at,
7266 tests/regression.at, tests/synclines.at, tests/torture.at:
7267 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
7268 so that the tests still work even if POSIXLY_CORRECT is set.
7269 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
7270
7271 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
7272 for portability to K&R hosts. Fix typo: signed char is guaranteed
7273 only to 127, not to 128.
7274 * data/glr.c (yysigned_char): New type.
7275 * data/yacc.c (yysigned_char): Likewise.
7276 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
7277
7278 2002-10-13 Paul Eggert <eggert@twinsun.com>
7279
7280 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
7281 true due to limited range of data type" warning from GCC.
7282
7283 * data/c.m4 (b4_token_defines): Protect against double-inclusion
7284 by wrapping enum yytokentype's definition inside #ifndef
7285 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
7286
7287 2002-10-13 Akim Demaille <akim@epita.fr>
7288
7289 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
7290 Un yy- yyrhs to avoid the name clash with the global YYRHS.
7291
7292 2002-10-13 Akim Demaille <akim@epita.fr>
7293
7294 * Makefile.maint: Update from Autoconf 2.54.
7295 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
7296
7297 2002-10-13 Akim Demaille <akim@epita.fr>
7298
7299 * src/print.c (print_state): Separate the list of solved conflicts
7300 from the other items.
7301 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
7302
7303 2002-10-13 Akim Demaille <akim@epita.fr>
7304
7305 Let nondeterministic skeletons be usable with deterministic
7306 tables.
7307
7308 With the patch, GAWK compiled by GCC without -O2 passes its test
7309 suite using a GLR parser driven by LALR tables. It fails with -O2
7310 because `struct stat' gives two different answers on my machine:
7311 88 (definition of an auto var) and later 96 (memset on this var).
7312 Hence the stack is badly corrumpted. The headers inclusion is to
7313 blame: if I move the awk.h inclusion before GLR's system header
7314 inclusion, the two struct stat have the same size.
7315
7316 * src/tables.c (pack_table): Always create conflict_table.
7317 (token_actions): Always create conflict_list.
7318 * data/glr.c (YYFLAG): Remove, unused.
7319
7320 2002-10-13 Akim Demaille <akim@epita.fr>
7321
7322 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
7323 (O0FLAGS): New.
7324 (VALGRIND, GXX): New.
7325 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
7326 * tests/bison.in: Run $PREBISON a pre-command.
7327 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
7328 (maintainer-check-g++): New.
7329 * Makefile.am (maintainer-check): New.
7330
7331 2002-10-13 Akim Demaille <akim@epita.fr>
7332
7333 * data/glr.c: Formatting changes.
7334 Tweak some trace messages to match yacc.c's.
7335
7336 2002-10-13 Akim Demaille <akim@epita.fr>
7337
7338 GLR parsers sometimes raise parse errors instead of performing the
7339 default reduction.
7340 Reported by Charles-Henry de Boysson.
7341
7342 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
7343 check the length of the traces when %glr.
7344 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
7345 GLR's traces.
7346 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
7347 Test GLR parsers.
7348 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
7349 (yyltype): Remove the yy prefix from the member names.
7350 (yytable): Complete its comment.
7351 (yygetLRActions): Map error action number from YYTABLE from
7352 YYTABLE_NINF to 0.
7353 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
7354 (which was a bug: it should have been YYTABEL_NINF, and yet it was
7355 not satisfying as we could compare an YYACTION computed from
7356 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
7357 only value for error actions.
7358 (yyreportParseError): In verbose parse error messages, don't issue
7359 `error' in the list of expected tokens.
7360 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
7361 next action to perform to match glr.c's decoding.
7362 (yytable): Complete its comment.
7363
7364 2002-10-13 Paul Eggert <eggert@twinsun.com>
7365
7366 Fix problem reported by Henrik Grubbstroem in
7367 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
7368 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
7369 because the Bison parser reads the second action before reducing
7370 the first one.
7371 * src/scan-gram.l (rule_length): New static var.
7372 Use it to keep track of the rule length in the scanner, since
7373 we can't expect the parser to be in lock-step sync with the scanner.
7374 (handle_action_dollar, handle_action_at): Use this var.
7375 * tests/actions.at (Exotic Dollars): Test for the problem.
7376
7377 2002-10-12 Paul Eggert <eggert@twinsun.com>
7378
7379 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
7380 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
7381 Include <sys/time.h> when checking for clock_t and struct tms.
7382 Use same include order as source.
7383 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
7384 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
7385
7386 * lib/timevar.c: Update copyright date and clarify comments.
7387 (get_time) [IN_GCC]: Keep the GCC version for reference.
7388
7389 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
7390 GCC version as of today, then merge Bison's changes.
7391 Change "GCC" to "Bison" in copyright notice. timevar.def's
7392 author is Akim, so change that too.
7393
7394 * src/reader.c (grammar_current_rule_check):
7395 Don't worry about the default action if $$ is untyped.
7396 Prevents bogus warnings reported by Jim Gifford in
7397 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
7398
7399 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
7400 * data/glr.c, data/lalr1.cc, data/yacc.c:
7401 Output token definitions before the first part of user declarations.
7402 Fixes compatibility problem reported by Jim Gifford for kbd in
7403 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
7404
7405 2002-10-11 Paul Eggert <eggert@twinsun.com>
7406
7407 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
7408 (yyparse): here. This undoes some of the 2002-07-25 change.
7409 Compatibility problem reported by Ralf S. Engelschall with
7410 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
7411
7412 2002-10-11 Akim Demaille <akim@epita.fr>
7413
7414 * tests/regression.at Characters Escapes): New.
7415 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
7416 characters.
7417 Reported by Jan Nieuwenhuizen.
7418
7419 2002-10-11 Akim Demaille <akim@epita.fr>
7420
7421 * po/id.po: New.
7422
7423 2002-10-10 Paul Eggert <eggert@twinsun.com>
7424
7425 Portability fixes for bitsets; this also avoids several GCC
7426 warnings.
7427
7428 * lib/abitset.c: Include <stddef.h>, for offsetof.
7429 * lib/lbitset.c: Likewise.
7430
7431 * lib/abitset.c (abitset_bytes): Return a size that is aligned
7432 properly for vectors of objects. Do not assume that adding a
7433 header size to a multiple of a word size yields a value that is
7434 properly aligned for the whole union.
7435 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7436
7437 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
7438 unique names for structures.
7439 * lib/ebitset.c (ebitset_bytes): Likewise.
7440 * lib/lbitset.c (lbitset_bytes): Likewise.
7441
7442 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
7443 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
7444 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
7445 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
7446 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
7447 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
7448 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
7449 to improve the type-checking that GCC can do.
7450 * lib/bitset.c (bitset_op4_cmp): Likewise.
7451 * lib/bitset_stats.c (bitset_stats_count,
7452 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
7453 bitset_stats_copy, bitset_stats_disjoint_p,
7454 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
7455 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
7456 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
7457 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
7458 bitset_stats_and_or_cmp, bitset_stats_andn_or,
7459 bitset_stats_andn_or_cmp, bitset_stats_or_and,
7460 bitset_stats_or_and_cmp): Likewise.
7461 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
7462 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
7463 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
7464 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
7465
7466 * lib/abitset.h: Include bitset.h, not bbitset.h.
7467 * lib/ebitset.h: Likewise.
7468 * lib/lbitset.h: Likewise.
7469
7470 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
7471 All instances of parameters of type enum bitset_opts are now of
7472 type enum_bitset_opts, to conform to the C Standard, and similarly
7473 for enum_bitset_type.
7474 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
7475 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
7476
7477 Do not use "struct bitset_struct" to mean different things in
7478 different modules. Not only is this confusing, it violates
7479 the C Standard, which requires that structure types in different
7480 modules must be compatible if one is to be passed to the other.
7481 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
7482 All instances of "struct bitset_struct *" replaced with "bitset".
7483 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
7484 (union bitset_union, struct abitset_struct, struct ebitset_struct,
7485 struct lbitset_struct, struct bitset_stats_struct): New types.
7486 All uses of struct bitset_struct changed to union bitset_union,
7487 etc.
7488 * lib/abitset.c (struct abitset_struct, abitset,
7489 struct bitset_struct): Remove.
7490 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
7491 struct bitset_struct): Remove.
7492 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
7493 bitset_struct): Remove.
7494 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
7495 Likewise.
7496
7497 Do not call a function of type T using a call that assumes the
7498 function is of a different type U. Standard C requires that a
7499 function must be called with a type that is compatible with its
7500 definition.
7501 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
7502 New decls.
7503 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
7504 New functions.
7505 * lib/ebitset.c (PFV): Remove.
7506 * lib/lbitset.c (PFV): Likewise.
7507 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
7508 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
7509 decls.
7510 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
7511 (ebitset_vtable): Use them.
7512 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
7513 lbitset_xor): New functions.
7514 (lbitset_vtable): Use them.
7515
7516 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
7517 Declare.
7518
7519 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
7520 GCC warning.
7521 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
7522 Use offsetof, for simplicity.
7523
7524 2002-10-06 Paul Eggert <eggert@twinsun.com>
7525
7526 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
7527 the same width as int. This reapplies a hunk of the 2002-08-12 patch
7528 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
7529 which was inadvertently undone by the 2002-09-30 patch.
7530 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
7531 the same width as int.
7532
7533 2002-10-04 Paul Eggert <eggert@twinsun.com>
7534
7535 Version 1.50.
7536
7537 * configure.ac (AC_INIT), NEWS: Increment version number.
7538
7539 * doc/bison.texinfo: Minor spelling, grammar, and white space
7540 fixes.
7541 (Symbols): Mention that any negative value returned from yylex
7542 signifies end-of-input. Warn about negative chars. Mention
7543 the portable Standard C character set.
7544
7545 The GNU coding standard says CFLAGS and YFLAGS are reserved
7546 for the installer to set.
7547 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
7548 * src/Makefile.am (AM_CFLAGS): Likewise.
7549 (AM_YFLAGS): Renamed from YFLAGS.
7550
7551 Fix some MAX and MIN problems.
7552 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
7553 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
7554 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
7555 * src/reader.c (reader): Use it.
7556
7557 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
7558 POSIX 1003.1-2001 has removed fgrep.
7559
7560 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
7561
7562 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
7563 interpreted as signed.
7564 * lib/ebitset.c (ebitset_list): Fix bug.
7565
7566 2002-10-01 Paul Eggert <eggert@twinsun.com>
7567
7568 More fixes for 64-bit hosts and large bitsets.
7569
7570 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
7571 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
7572 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
7573 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
7574 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
7575 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
7576 bitset_count_): Likewise.
7577 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
7578 bitset_first, bitset_last): Likewise.
7579 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
7580 bitset_stats_list_reverse, bitset_stats_size,
7581 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
7582 Likewise.
7583 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
7584 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
7585 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
7586 bitsetv_reflexive_transitive_closure): Likewise.
7587 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
7588 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
7589 Likewise.
7590 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
7591 Likewise.
7592
7593 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
7594 Use size_t, not unsigned int, to count bytes.
7595 * lib/abitset.h (abitset_bytes): Likewise.
7596 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
7597 Likewise.
7598 * lib/bitset.h (bitset_bytes): Likewise.
7599 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
7600 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
7601 * lib/bitsetv.c (bitsetv_alloc): Likewise.
7602 * lib/ebitset.c (ebitset_bytes): Likewise.
7603 * lib/ebitset.h (ebitset_bytes): Likewise.
7604 * lib/lbitset.c (lbitset_bytes): Likewise.
7605 * lib/lbitset.h (lbitset_bytes): Likewise.
7606
7607 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
7608 abitset_subset_p, abitset_disjoint_p, abitset_and,
7609 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
7610 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
7611 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
7612 abitset_or_and, abitset_or_and_cmp):
7613 Use bitset_windex instead of unsigned int.
7614 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
7615 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
7616 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
7617 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
7618 Likewise.
7619 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
7620
7621 * lib/bitset.c (bitset_print):
7622 Use proper printf formats for widths of integer types.
7623 * lib/bitset_stats.c (bitset_percent_histogram_print,
7624 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
7625 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
7626 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
7627 * lib/lbitset.c (lbitset_bytes): Likewise.
7628
7629 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
7630 BITSET_SIZE_MAX): New macros.
7631 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
7632 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
7633 to BITSET_WINDEX_MAX.
7634
7635 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
7636 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
7637 since we now return the bitset_bindex type (not int).
7638
7639 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
7640 when computing sizes.
7641 * lib/ebitset.c (ebitset_elts_grow): Likewise.
7642
7643 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
7644 and avoid cast to unsigned.
7645
7646 2002-09-30 Akim Demaille <akim@epita.fr>
7647
7648 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
7649 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
7650 Updates from Michael Hayes.
7651
7652 2002-09-30 Art Haas <ahaas@neosoft.com>
7653
7654 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
7655 invocations.
7656 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
7657 defined.
7658
7659 2002-09-27 Akim Demaille <akim@epita.fr>
7660
7661 Version 1.49c.
7662
7663 2002-09-27 Akim Demaille <akim@epita.fr>
7664
7665 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
7666 (Because of AC_LIBSOURCE).
7667
7668 2002-09-27 Akim Demaille <akim@epita.fr>
7669
7670 Playing with Autoscan.
7671
7672 * configure.ac: Remove the old LIBOBJ tweaks.
7673 (AC_REPLACE_FUNCS): Add strrchr and strtol.
7674 * lib/strrchr.c: New.
7675 * lib/strtol.c: New, from the Coreutils 4.5.1.
7676
7677 2002-09-27 Akim Demaille <akim@epita.fr>
7678
7679 Playing with Autoscan.
7680
7681 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
7682 * lib/Makefile.am (libbison_a_SOURCES): No longer include
7683 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
7684 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
7685 Coreutils 4.5.1.
7686
7687 2002-09-24 Akim Demaille <akim@epita.fr>
7688
7689 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
7690 (Frequently Asked Questions, Parser Stack Overflow): New.
7691
7692 2002-09-13 Akim Demaille <akim@epita.fr>
7693
7694 Playing with autoscan.
7695
7696 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
7697 * src/files.c (skeleton_find): Remove, unused.
7698 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
7699 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
7700
7701 2002-09-13 Akim Demaille <akim@epita.fr>
7702
7703 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
7704 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
7705
7706 2002-09-13 Akim Demaille <akim@epita.fr>
7707
7708 * configure.ac: Require 2.54.
7709 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
7710 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
7711 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
7712 Remove, provided by Autoconf macros.
7713
7714 2002-09-12 Akim Demaille <akim@epita.fr>
7715
7716 * m4/prereq.m4: Update, from Coreutils 4.5.1.
7717
7718 2002-09-12 Akim Demaille <akim@epita.fr>
7719
7720 * m4/prereq.m4: Update, from Fileutils 4.1.5.
7721 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
7722 Reported by Martin Mokrejs.
7723
7724 2002-09-10 Akim Demaille <akim@epita.fr>
7725
7726 * src/parse-gram.y: Associate a human readable string to each
7727 token type.
7728 * tests/regression.at (Invalid inputs): Adjust.
7729
7730 2002-09-10 Gary V. Vaughan <gary@gnu.org>
7731
7732 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
7733 with an Autoconf-2.5x style configure.ac.
7734
7735 2002-09-06 Paul Eggert <eggert@twinsun.com>
7736
7737 * doc/bison.texinfo (Conditions): Make explicit that the GPL
7738 exception applies only to yacc.c. This is a modification of a
7739 patch originally suggested by Akim Demaille.
7740
7741 2002-09-06 Akim Demaille <akim@epita.fr>
7742
7743 * data/c.m4 (b4_copyright): Move the GPL exception comment from
7744 here to...
7745 * data/yacc.c: here.
7746
7747 * data/lalr1.cc (struct yyltype): Don't define it, since we use
7748 LocationType.
7749 (b4_ltype): Default to yy::Location from location.hh.
7750
7751 2002-09-04 Jim Meyering <jim@meyering.net>
7752
7753 * data/yacc.c: Guard the declaration of yytoknum also with
7754 `#ifdef YYPRINT', so it is declared only when used.
7755
7756 2002-09-04 Akim Demaille <akim@epita.fr>
7757
7758 * configure.in: Rename as...
7759 * configure.ac: this.
7760 Bump to 1.49c.
7761
7762 2002-09-04 Akim Demaille <akim@epita.fr>
7763
7764 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
7765 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
7766 translate maintainer only messages.
7767
7768 2002-08-12 Paul Eggert <eggert@twinsun.com>
7769
7770 Version 1.49b.
7771
7772 * Makefile.am (SUBDIRS): Remove intl.
7773 (DISTCLEANFILES): Remove.
7774 * NEWS: Mention that GNU M4 is now required. Clarify what is
7775 meant by "larger grammars". Mention the pt_BR translation.
7776 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
7777 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
7778 Bump version from 0.11.2 to 0.11.5.
7779 (BISON_PREREQ_STAGE): Remove.
7780 (AM_GNU_GETTEXT): Use external gettext.
7781 (AC_OUTPUT): Remove intl/Makefile.
7782
7783 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
7784
7785 * data/glr.c: Include string.h, for strlen.
7786 (yyreportParseError): Use size_t for yysize.
7787 (yy_yypstack): No longer nested inside yypstates, as nested
7788 functions are not portable. Do not assume size_t is the
7789 same width as int.
7790 (yypstates): Do not assume that ptrdiff_t is the same width
7791 as int, and similarly for yyposn and YYINDEX.
7792
7793 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
7794
7795 * lib/Makefile.am (INCLUDES): Do not include from the intl
7796 directory, which has been removed.
7797 * src/Makefile.am (INCLUDES): Likewise.
7798
7799 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
7800 (bitsets_sources, additional_bitsets_sources, timevars_sources):
7801 New vars.
7802
7803 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
7804 * tests/Makefile.am (EXTRA_DIST): Likewise.
7805
7806 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
7807 Do not assume that bitset_windex is the same width as unsigned.
7808
7809 * lib/abitset.c (abitset_unused_clear): Do not assume that
7810 bitset_word is the same width as int.
7811 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
7812 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
7813 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
7814 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
7815 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
7816
7817 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
7818 portability to one's complement hosts!).
7819 * lib/ebitset.c (ebitset_op1): Likewise.
7820 * lib/lbitset.c (lbitset_op1): Likewise.
7821
7822 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
7823 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
7824 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
7825 Sync with fileutils.
7826 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
7827 lib/gettext.h: Sync with diffutils.
7828
7829 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
7830 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
7831
7832 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
7833 PROTOTYPES to check for prototypes, and "defined __STDC__" to
7834 check for void *.
7835
7836 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
7837 size_t; the old version tried to do this but casted improperly.
7838 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
7839 (bitset_test): Now returns int, not unsigned long.
7840
7841 * lib/bitset_stats.c: Include "gettext.h".
7842 (_): New macro.
7843 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
7844 name locals "index", as it generates unnecessary warnings on some
7845 hosts that have an "index" function.
7846
7847 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
7848 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
7849 they need translation.
7850 * src/LR0.c (state_list_append, new_itemsets, get_state,
7851 append_states, generate_states): Likewise.
7852 * src/assoc.c (assoc_to_string): Likewise.
7853 * src/closure.c (print_closure, set_firsts, closure): Likewise.
7854 * src/gram.c (grammar_dump): Likewise.
7855 * src/injections.c (injections_compute): Likewise.
7856 * src/lalr.c (lookaheads_print): Likewise.
7857 * src/relation.c (relation_transpose): Likewise.
7858 * src/scan-gram.l: Likewise.
7859 * src/tables.c (table_grow, pack_vector): Likewise.
7860
7861 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
7862 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
7863 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
7864 * m4/mbstate_t.m4: Sync with fileutils.
7865 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
7866
7867 * po/LINGUAS: Add pt_BR.
7868 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
7869 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
7870 lib/timevar.c.
7871 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
7872 manual recommends.
7873 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
7874
7875 * src/complain.c (strerror_r): Remove decl; not needed.
7876 (strerror): Use same pattern as ../lib/error.c.
7877
7878 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
7879
7880 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
7881
7882 * src/main.c (main): Cast result of bindtextdomain and textdomain
7883 to void, to avoid a GCC warning when --disable-nls is in effect.
7884
7885 * src/scan-gram.l: Use strings rather than escapes when possible,
7886 to minimize the number of warnings from xgettext.
7887 (handle_action_dollar, handle_action_at): Don't use isdigit,
7888 as it mishandles negative chars and it may not work as expected
7889 outside the C locale.
7890
7891 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
7892 this is a GCC extension and is not portable to other compilers.
7893
7894 * src/system.h (alloca): Use same pattern as ../lib/error.c.
7895 Do not include <ctype.h>; no longer needed.
7896 Do not include <malloc.h>; no longer needed (and generates
7897 warnings on OpenBSD 3.0).
7898
7899 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
7900 it's not portable.
7901
7902 * tests/regression.at: Do not use 'cc -c input.c -o input';
7903 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
7904
7905 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
7906 exit status as failure, not just exit status 1. Sun C exits
7907 with status 2 sometimes.
7908
7909 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
7910 Use it for the two large tests.
7911
7912 2002-08-02 Akim Demaille <akim@epita.fr>
7913
7914 * src/conflicts.c (conflicts_output): Don't output rules never
7915 reduced here, since anyway that computation doesn't work.
7916 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
7917 (rule_useless_p, rule_never_reduced_p): New.
7918 (grammar_rules_partial_print): Use a filter instead of a range.
7919 Display the title only if needed.
7920 (grammar_rules_print): Adjust.
7921 (grammar_rules_never_reduced_report): New.
7922 * src/tables.c (action_row): Move the computation of rules never
7923 reduced to...
7924 (token_actions): here.
7925 * src/main.c (main): Make the parser before making the report, so
7926 that rules never reduced are computed.
7927 Call grammar_rules_never_reduced_report.
7928 * src/print.c (print_results): Report rules never reduced.
7929 * tests/conflicts.at, tests/reduce.at: Adjust.
7930
7931 2002-08-01 Akim Demaille <akim@epita.fr>
7932
7933 Instead of attaching lookaheads and duplicating the rules being
7934 reduced by a state, attach the lookaheads to the reductions.
7935
7936 * src/state.h (state_t): Remove the `lookaheads',
7937 `lookaheads_rule' member.
7938 (reductions_t): Add a `lookaheads' member.
7939 Use a regular array for the `rules'.
7940 * src/state.c (reductions_new): Initialize the lookaheads member
7941 to 0.
7942 (state_rule_lookaheads_print): Adjust.
7943 * src/state.h, src/state.c (state_reductions_find): New.
7944 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
7945 (count_rr_conflicts): Adjust.
7946 * src/lalr.c (LArule): Remove.
7947 (add_lookback_edge): Adjust.
7948 (state_lookaheads_count): New.
7949 (states_lookaheads_initialize): Merge into...
7950 (initialize_LA): this.
7951 (lalr_free): Adjust.
7952 * src/main.c (main): Don't free nullable and derives too early: it
7953 is used by --verbose.
7954 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
7955
7956 2002-08-01 Akim Demaille <akim@epita.fr>
7957
7958 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
7959 `rule_number_t**'.
7960 (set_derives, free_derives): Rename as...
7961 (derives_compute, derives_free): this.
7962 Adjust all dependencies.
7963 * src/nullable.c (set_nullable, free_nullable): Rename as...
7964 (nullable_compute, nullable_free): these.
7965 (rule_list_t): Store rule_t *, not rule_number_t.
7966 * src/state.c (state_rule_lookaheads_print): Directly compare rule
7967 pointers, instead of their numbers.
7968 * src/main.c (main): Call nullable_free, and derives_free earlier,
7969 as they were lo longer used.
7970
7971 2002-08-01 Akim Demaille <akim@epita.fr>
7972
7973 * lib/timevar.c (get_time): Include children time.
7974 * src/lalr.h (LA, LArule): Don't export them: used with the
7975 state_t.
7976 * src/lalr.c (LA, LArule): Static.
7977 * src/lalr.h, src/lalr.c (lalr_free): New.
7978 * src/main.c (main): Call it.
7979 * src/tables.c (pack_vector): Check whether loc is >= to the
7980 table_size, not >.
7981 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
7982 (tables_generate): do it, since that's also it which allocates
7983 them.
7984 Don't free LA and LArule, main does.
7985
7986 2002-07-31 Akim Demaille <akim@epita.fr>
7987
7988 Separate parser tables computation and output.
7989
7990 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
7991 (conflict_list, conflict_list_cnt, table, check, table_ninf)
7992 (yydefgoto, yydefact, high): Move to...
7993 * src/tables.h, src/tables.c: here.
7994 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
7995 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
7996 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
7997 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
7998 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
7999 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
8000 (action_row, save_row, token_actions, save_column, default_goto)
8001 (goto_actions, sort_actions, matching_state, pack_vector)
8002 (table_ninf_remap, pack_table, prepare_actions): Move to...
8003 * src/tables.c: here.
8004 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
8005 * src/output.c (token_actions, output_base, output_conflicts)
8006 (output_check): Merge into...
8007 (prepare_actions): this.
8008 (actions_output): Rename as...
8009 (user_actions_output): this.
8010 * src/main.c (main): Call tables_generate and tables_free.
8011
8012 2002-07-31 Akim Demaille <akim@epita.fr>
8013
8014 Steal GCC's --time-report support.
8015
8016 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
8017 stolen/adjusted from GCC.
8018 * m4/stage.m4: Remove time related checks.
8019 * m4/timevar.m4: New.
8020 * configure.in: Adjust.
8021 * src/system.h: Adjust to using timevar.h.
8022 * src/getargs.h, src/getargs.c: Support trace_time for
8023 --trace=time.
8024 * src/main.c (stage): Remove.
8025 (main): Replace `stage' invocations with timevar calls.
8026 * src/output.c: Insert pertinent timevar calls.
8027
8028 2002-07-31 Akim Demaille <akim@epita.fr>
8029
8030 Let --trace have arguments.
8031
8032 * src/getargs.h (enum trace_e): New.
8033 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
8034 (long_options, short_options): --trace/-T takes an optional
8035 argument.
8036 Change all the uses of trace_flag to reflect the new flags.
8037 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
8038
8039 Strengthen `stage' portability.
8040
8041 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
8042 * configure.in: Use it.
8043 Don't check for malloc.h and sys/times.h.
8044 * src/system.h: Include them when appropriate.
8045 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
8046 times and struct tms are available.
8047
8048 2002-07-30 Akim Demaille <akim@epita.fr>
8049
8050 In verbose parse error message, don't report `error' as an
8051 expected token.
8052 * tests/actions.at (Printers and Destructors): Adjust.
8053 * tests/calc.at (Calculator $1): Adjust.
8054 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
8055 error message, do not report the parser accepts the error token in
8056 that state.
8057
8058 2002-07-30 Akim Demaille <akim@epita.fr>
8059
8060 Normalize conflict related messages.
8061
8062 * src/complain.h, src/complain.c (warn, complain): New.
8063 * src/conflicts.c (conflicts_print): Use them.
8064 (conflict_report_yacc): New, extracted from...
8065 (conflicts_print): here.
8066 * tests/conflicts.at, tests/existing.at: Adjust.
8067
8068 2002-07-30 Akim Demaille <akim@epita.fr>
8069
8070 Report rules which are never reduced by the parser: those hidden
8071 by conflicts.
8072
8073 * src/LR0.c (save_reductions): Don't make the final state too
8074 different: save its reduction (accept) instead of having a state
8075 without any action (no shift or goto, no reduce).
8076 Note: the final state is now a ``regular'' state, i.e., the
8077 parsers now contain `reduce 0' as default reduction.
8078 Nevertheless, since they decide to `accept' when yystate =
8079 final_state, they still will not reduce rule 0.
8080 * src/print.c (print_actions, print_reduction): Adjust.
8081 * src/output.c (action_row): Track reduced rules.
8082 (token_actions): Report rules never reduced.
8083 * tests/conflicts.at, tests/regression.at: Adjust.
8084
8085 2002-07-30 Akim Demaille <akim@epita.fr>
8086
8087 `stage' was accidently included in a previous patch.
8088 Initiate its autoconfiscation.
8089
8090 * configure.in: Look for malloc.h and sys/times.h.
8091 * src/main.c (stage): Adjust.
8092 Report only when trace_flag.
8093
8094 2002-07-29 Akim Demaille <akim@epita.fr>
8095
8096 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
8097 state_number_t.
8098 (errs_t): symbol_t*, not symbol_number_t.
8099 (reductions_t): rule_t*, not rule_number_t.
8100 (FOR_EACH_SHIFT): New.
8101 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
8102 * src/print.c, src/print_graph.c: Adjust.
8103
8104 2002-07-29 Akim Demaille <akim@epita.fr>
8105
8106 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
8107
8108 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
8109 (endtoken, accept): these.
8110 * src/reader.c (reader): Set endtoken's default tag to "$end".
8111 Set undeftoken's tag to "$undefined" instead of "$undefined.".
8112 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
8113 Adjust.
8114
8115 2002-07-29 Akim Demaille <akim@epita.fr>
8116
8117 * src/reduce.c (reduce_grammar): When the language is empty,
8118 complain about the start symbol, not the axiom.
8119 Use its location.
8120 * tests/reduce.at (Empty Language): New.
8121
8122 2002-07-26 Akim Demaille <akim@epita.fr>
8123
8124 * src/reader.h, src/reader.c (gram_error): ... can't get
8125 yycontrol without making too strong assumptions on the parser
8126 itself.
8127 * src/output.c (prepare_tokens): Use the real 0th value of
8128 token_translations instead of `0'.
8129 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
8130 visible here.
8131 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
8132 for the time being: %locations ought to provide it to yyerror.
8133
8134 2002-07-25 Akim Demaille <akim@epita.fr>
8135
8136 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
8137 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
8138 * tests/regression.at (Web2c Actions): Adjust.
8139
8140 2002-07-25 Akim Demaille <akim@epita.fr>
8141
8142 Stop storing rules from 1 to nrules + 1.
8143
8144 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
8145 * src/nullable.c, src/output.c, src/print.c, src/reader.c
8146 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
8147 Iterate from 0 to nrules.
8148 Use rule_number_as_item_number and item_number_as_rule_number.
8149 Adjust to `derive' now containing possibly 0.
8150 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
8151 Handle the `- 1' part in rule numbers from/to item numbers.
8152 * src/conflicts.c (log_resolution): Fix the message which reversed
8153 shift and reduce.
8154 * src/output.c (action_row): Initialize default_rule to -1.
8155 (token_actions): Adjust.
8156 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
8157 expected output.
8158 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
8159
8160 2002-07-25 Akim Demaille <akim@epita.fr>
8161
8162 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
8163 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
8164 (b4_c_knr_arg_decl): New.
8165 * data/yacc.c: Use it to define yysymprint, yydestruct, and
8166 yyreport_parse_error.
8167
8168 2002-07-25 Akim Demaille <akim@epita.fr>
8169
8170 * data/yacc.c (yyreport_parse_error): New, extracted from...
8171 (yyparse): here.
8172 (yydestruct, yysymprint): Move above yyparse.
8173 Be K&R compliant.
8174
8175 2002-07-25 Akim Demaille <akim@epita.fr>
8176
8177 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
8178 replace...
8179 (b4_sint_type, b4_uint_type): these.
8180 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
8181 * tests/regression.at (Web2c Actions): Adjust.
8182
8183 2002-07-25 Akim Demaille <akim@epita.fr>
8184
8185 * src/gram.h (TIEM_NUMBER_MAX): New.
8186 (item_number_of_rule_number, rule_number_of_item_number): Rename
8187 as...
8188 (rule_number_as_item_number, item_number_as_rule_number): these.
8189 Adjust dependencies.
8190 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8191 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8192 (symbol_number_to_vector_number): New.
8193 (order): Of vector_number_t* type.
8194 (base_t, BASE_MAX, BASE_MIN): New.
8195 (froms, tos, width, pos, check): Of base_t type.
8196 (action_number_t, ACTION_MIN, ACTION_MAX): New.
8197 (actrow): Of action_number_t type.
8198 (conflrow): Of unsigned int type.
8199 (table_ninf, base_ninf): New.
8200 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
8201 (muscle_insert_int_table, muscle_insert_base_table)
8202 (muscle_insert_rule_number_table): New.
8203 (prepare_tokens): Output `toknum' as int_table.
8204 (action_row): Returns a rule_number_t.
8205 Use ACTION_MIN, not SHRT_MIN.
8206 (token_actions): yydefact is rule_number_t*.
8207 (table_ninf_remap): New.
8208 (pack_table): Use it for `base' and `table'.
8209 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
8210 replaced with...
8211 (YYPACT_NINF, YYTABLE_NINF): these.
8212 (yypact, yytable): Compute their types instead of hard-coded
8213 `short'.
8214 * tests/regression.at (Web2c Actions): Adjust.
8215
8216 2002-07-19 Akim Demaille <akim@epita.fr>
8217
8218 * src/scan-gram.l (id): Can start with an underscore.
8219
8220 2002-07-16 Akim Demaille <akim@epita.fr>
8221
8222 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
8223 Adjust all former `associativity' dependencies.
8224 * src/symtab.c (symbol_new): Default associativity is `undef', not
8225 `right'.
8226 (symbol_check_alias_consistence): Adjust.
8227
8228 2002-07-09 Akim Demaille <akim@epita.fr>
8229
8230 * doc/bison.texinfo: Properly set the ``header'' part.
8231 Use @dircategory ``GNU programming tools'' as per Texinfo's
8232 documentation.
8233 Use @copying.
8234
8235 2002-07-09 Akim Demaille <akim@epita.fr>
8236
8237 * lib/quotearg.h: Protect against multiple inclusions.
8238 * src/location.h (location_t): Add a `file' member.
8239 (LOCATION_RESET, LOCATION_PRINT): Adjust.
8240 * src/complain.c (warn_at, complain_at, fatal_at): Drop
8241 `error_one_per_line' support.
8242
8243 2002-07-09 Akim Demaille <akim@epita.fr>
8244
8245 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
8246 * src/reader.c (lineno): Remove.
8247 Adjust all dependencies.
8248 (get_merge_function): Take a location and use complain_at.
8249 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
8250 * tests/regression.at (Invalid inputs, Mixing %token styles):
8251 Adjust.
8252
8253 2002-07-09 Akim Demaille <akim@epita.fr>
8254
8255 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
8256 recovery rule, and forbid extensions when --yacc.
8257 (gram_error): Use complain_at.
8258 * src/reader.c (reader): Exit if there were parse errors.
8259
8260 2002-07-09 Akim Demaille <akim@epita.fr>
8261
8262 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
8263 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
8264 Reported by R Blake <blakers@mac.com>.
8265
8266 2002-07-09 Akim Demaille <akim@epita.fr>
8267
8268 * data/yacc.c: Output the copyright notive in the header.
8269
8270 2002-07-03 Akim Demaille <akim@epita.fr>
8271
8272 * src/output.c (froms, tos): Are state_number_t.
8273 (save_column): sp, sp1, and sp2 are state_number_t.
8274 (prepare): Rename `final' as `final_state_number', `nnts' as
8275 `nterms_number', `nrules' as `rules_number', `nstates' as
8276 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
8277 unused.
8278 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
8279 * data/lalr1.cc (nsym_): Remove, unused.
8280
8281 2002-07-03 Akim Demaille <akim@epita.fr>
8282
8283 * src/lalr.h, src/lalr.c (goto_number_t): New.
8284 * src/lalr.c (goto_list_t): New.
8285 Propagate them.
8286 * src/nullable.c (rule_list_t): New.
8287 Propagate.
8288 * src/types.h: Remove.
8289
8290 2002-07-03 Akim Demaille <akim@epita.fr>
8291
8292 * src/closure.c (print_fderives): Use rule_rhs_print.
8293 * src/derives.c (print_derives): Use rule_rhs_print.
8294 (rule_list_t): New, replaces `shorts'.
8295 (set_derives): Add comments.
8296 * tests/sets.at (Nullable, Firsts): Adjust.
8297
8298 2002-07-03 Akim Demaille <akim@epita.fr>
8299
8300 * src/output.c (prepare_actions): Free `tally' and `width'.
8301 (prepare_actions): Allocate and free `order'.
8302 * src/symtab.c (symbols_free): Free `symbols'.
8303 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
8304 * src/output.c (m4_invoke): Move to...
8305 * src/scan-skel.l: here.
8306 (<<EOF>>): Close yyout, and free its name.
8307
8308 2002-07-03 Akim Demaille <akim@epita.fr>
8309
8310 Fix some memory leaks, and fix a bug: state 0 was examined twice.
8311
8312 * src/LR0.c (new_state): Merge into...
8313 (state_list_append): this.
8314 (new_states): Merge into...
8315 (generate_states): here.
8316 (set_states): Don't ensure a proper `errs' state member here, do it...
8317 * src/conflicts.c (conflicts_solve): here.
8318 * src/state.h, src/state.c: Comment changes.
8319 (state_t): Rename member `shifts' as `transitions'.
8320 Adjust all dependencies.
8321 (errs_new): For consistency, also take the values as argument.
8322 (errs_dup): Remove.
8323 (state_errs_set): New.
8324 (state_reductions_set, state_transitions_set): Assert that no
8325 previous value was assigned.
8326 (state_free): New.
8327 (states_free): Use it.
8328 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
8329 temporary storage: use `errs' and `nerrs' as elsewhere.
8330 (set_conflicts): Allocate and free this `errs'.
8331
8332 2002-07-02 Akim Demaille <akim@epita.fr>
8333
8334 * lib/libiberty.h: New.
8335 * lib: Update the bitset implementation from upstream.
8336 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
8337 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
8338 * src/main.c: Adjust bitset stats calls.
8339
8340 2002-07-01 Paul Eggert <eggert@twinsun.com>
8341
8342 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
8343 char, so that negative chars don't collide with $.
8344
8345 2002-06-30 Akim Demaille <akim@epita.fr>
8346
8347 Have the GLR tests be `warning' checked, and fix the warnings.
8348
8349 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
8350 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
8351 (yyremoveDeletes): `yyi' and `yyj' are size_t.
8352 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
8353 (yyaddDeferredAction): static.
8354 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
8355 (yyreportParseError): yyprefix is const.
8356 yytokenp is used only when verbose.
8357 (yy__GNUC__): Replace with __GNUC__.
8358 (yypdumpstack): yyi is size_t.
8359 (yypreference): Un-yy local variables and arguments, to avoid
8360 clashes with `yyr1'. Anyway, we are not in the user name space.
8361 (yytname_size): be an int, as is compared with ints.
8362 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
8363 Use them.
8364 * tests/cxx-gram.at: Use quotation to protect $1.
8365 Use AT_COMPILE to enable warnings hunts.
8366 Prototype yylex and yyerror.
8367 `Use' argc.
8368 Include `string.h', not `strings.h'.
8369 Produce and prototype stmtMerge only when used.
8370 yylex takes a location.
8371
8372 2002-06-30 Akim Demaille <akim@epita.fr>
8373
8374 We spend a lot of time in quotearg, in particular when --verbose.
8375
8376 * src/symtab.c (symbol_get): Store a quoted version of the key.
8377 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
8378 Adjust all callers.
8379
8380 2002-06-30 Akim Demaille <akim@epita.fr>
8381
8382 * src/state.h (reductions_t): Rename member `nreds' as num.
8383 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
8384 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
8385
8386 2002-06-30 Akim Demaille <akim@epita.fr>
8387
8388 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
8389 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
8390 (shifts_to): Rename as...
8391 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
8392 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
8393 (TRANSITION_IS_DISABLED, transitions_to): these.
8394
8395 2002-06-30 Akim Demaille <akim@epita.fr>
8396
8397 * src/print.c (print_shifts, print_gotos): Merge into...
8398 (print_transitions): this.
8399 (print_transitions, print_errs, print_reductions): Align the
8400 lookaheads columns.
8401 (print_core, print_transitions, print_errs, print_state,
8402 print_grammar): Output empty lines separator before, not after.
8403 (state_default_rule_compute): Rename as...
8404 (state_default_rule): this.
8405 * tests/conflicts.at (Defaulted Conflicted Reduction),
8406 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
8407 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
8408
8409 2002-06-30 Akim Demaille <akim@epita.fr>
8410
8411 Display items as we display rules.
8412
8413 * src/gram.h, src/gram.c (rule_lhs_print): New.
8414 * src/gram.c (grammar_rules_partial_print): Use it.
8415 * src/print.c (print_core): Likewise.
8416 * tests/conflicts.at (Defaulted Conflicted Reduction),
8417 (Unresolved SR Conflicts): Adjust.
8418 (Unresolved SR Conflicts): Adjust and rename as...
8419 (Resolved SR Conflicts): this, as was meant.
8420 * tests/regression.at (Web2c Report): Adjust.
8421
8422 2002-06-30 Akim Demaille <akim@epita.fr>
8423
8424 * src/print.c (state_default_rule_compute): New, extracted from...
8425 (print_reductions): here.
8426 Pessimize, but clarify the code.
8427 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
8428
8429 2002-06-30 Akim Demaille <akim@epita.fr>
8430
8431 * src/output.c (action_row): Let default_rule be always a rule
8432 number.
8433
8434 2002-06-30 Akim Demaille <akim@epita.fr>
8435
8436 * src/closure.c (print_firsts, print_fderives, closure):
8437 Use BITSET_EXECUTE.
8438 * src/lalr.c (lookaheads_print): Likewise.
8439 * src/state.c (state_rule_lookaheads_print): Likewise.
8440 * src/print_graph.c (print_core): Likewise.
8441 * src/print.c (print_reductions): Likewise.
8442 * src/output.c (action_row): Likewise.
8443 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
8444
8445 2002-06-30 Akim Demaille <akim@epita.fr>
8446
8447 * src/print_graph.c: Use report_flag.
8448
8449 2002-06-30 Akim Demaille <akim@epita.fr>
8450
8451 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
8452 to...
8453 * src/relation.h, src/relation.c (traverse, relation_digraph)
8454 (relation_print, relation_transpose): New.
8455
8456 2002-06-30 Akim Demaille <akim@epita.fr>
8457
8458 * src/state.h, src/state.c (shifts_to): New.
8459 * src/lalr.c (build_relations): Use it.
8460
8461 2002-06-30 Akim Demaille <akim@epita.fr>
8462
8463 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
8464 (item_number_of_rule_number, rule_number_of_item_number): New.
8465 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
8466 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8467 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
8468 Propagate their use.
8469 Much remains to be done, in particular wrt `shorts' from types.h.
8470
8471 2002-06-30 Akim Demaille <akim@epita.fr>
8472
8473 * src/symtab.c (symbol_new): Initialize the `printer' member.
8474
8475 2002-06-30 Akim Demaille <akim@epita.fr>
8476
8477 * src/LR0.c (save_reductions): Remove, replaced by...
8478 * src/state.h, src/state.c (state_reductions_set): New.
8479 (reductions, errs): Rename as...
8480 (reductions_t, errs_t): these.
8481 Adjust all dependencies.
8482
8483 2002-06-30 Akim Demaille <akim@epita.fr>
8484
8485 * src/LR0.c (state_list_t, state_list_append): New.
8486 (first_state, last_state): Now symbol_list_t.
8487 (this_state): Remove.
8488 (new_itemsets, append_states, save_reductions): Take a state_t as
8489 argument.
8490 (set_states, generate_states): Adjust.
8491 (save_shifts): Remove, replaced by...
8492 * src/state.h, src/state.c (state_shifts_set): New.
8493 (shifts): Rename as...
8494 (shifts_t): this.
8495 Adjust all dependencies.
8496 * src/state.h (state_t): Remove the `next' member.
8497
8498 2002-06-30 Akim Demaille <akim@epita.fr>
8499
8500 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
8501 escaped in slot 0.
8502
8503 2002-06-30 Akim Demaille <akim@epita.fr>
8504
8505 Use hash.h for the state hash table.
8506
8507 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
8508 (allocate_storage): Use state_hash_new.
8509 (free_storage): Use state_hash_free.
8510 (new_state, get_state): Adjust.
8511 * src/lalr.h, src/lalr.c (states): Move to...
8512 * src/states.h (state_t): Remove the `link' member, no longer
8513 used.
8514 * src/states.h, src/states.c: here.
8515 (state_hash_new, state_hash_free, state_hash_lookup)
8516 (state_hash_insert, states_free): New.
8517 * src/states.c (state_table, state_compare, state_hash): New.
8518 * src/output.c (output_actions): Do not free states now, since we
8519 still need to know the final_state number in `prepare', called
8520 afterwards. Do it...
8521 * src/main.c (main): here: call states_free after `output'.
8522
8523 2002-06-30 Akim Demaille <akim@epita.fr>
8524
8525 * src/state.h, src/state.c (state_new): New, extracted from...
8526 * src/LR0.c (new_state): here.
8527 * src/state.h (STATE_ALLOC): Move to...
8528 * src/state.c: here.
8529 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
8530 * src/state.h, src/state.c: here.
8531
8532 2002-06-30 Akim Demaille <akim@epita.fr>
8533
8534 * src/reader.c (gensym): Rename as...
8535 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
8536 (getsym): Rename as...
8537 (symbol_get): this.
8538
8539 2002-06-30 Akim Demaille <akim@epita.fr>
8540
8541 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
8542 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
8543 * src/output.c, src/print.c, src/print_graph.c: Propagate.
8544 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
8545
8546 2002-06-30 Akim Demaille <akim@epita.fr>
8547
8548 Make the test suite pass with warnings checked.
8549
8550 * tests/actions.at (Printers and Destructors): Improve.
8551 Avoid unsigned vs. signed issues.
8552 * tests/calc.at: Don't exercise the scanner here, do it...
8553 * tests/input.at (Torturing the Scanner): here.
8554
8555 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8556
8557 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
8558 reorganize first lines parallel to yacc.c.
8559
8560 2002-06-28 Akim Demaille <akim@epita.fr>
8561
8562 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
8563 (b4_token_enum, b4_token_defines): New, factored from...
8564 * data/lalr1.cc, data/yacc.c, glr.c: here.
8565
8566 2002-06-28 Akim Demaille <akim@epita.fr>
8567
8568 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
8569 unused variables.
8570 * src/output.c (merger_output): static.
8571
8572 2002-06-28 Akim Demaille <akim@epita.fr>
8573
8574 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
8575 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
8576 pacify GCC.
8577 * src/output.c (save_row): Initialize all the variables to pacify GCC.
8578
8579 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8580
8581 Accumulated changelog for new GLR parsing features.
8582
8583 * src/conflicts.c (count_total_conflicts): Change name to
8584 conflicts_total_count.
8585 * src/conflicts.h: Ditto.
8586 * src/output.c (token_actions): Use the new name.
8587 (output_conflicts): Change conflp => conflict_list_heads, and
8588 confl => conflict_list for better readability.
8589 * data/glr.c: Use the new names.
8590 * NEWS: Add self to GLR announcement.
8591
8592 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
8593
8594 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
8595 Akim Demaille.
8596
8597 * data/bison.glr: Change name to glr.c
8598 * data/glr.c: Renamed from bison.glr.
8599 * data/Makefile.am: Add glr.c
8600
8601 * src/getargs.c:
8602
8603 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
8604 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
8605
8606 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8607
8608 * data/bison.glr: Be sure to restore the
8609 current #line when returning to the skeleton contents after having
8610 exposed the input file's #line.
8611
8612 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8613
8614 * data/bison.glr: Bring up to date with changes to bison.simple.
8615
8616 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8617
8618 * data/bison.glr: Correct definitions that use b4_prefix.
8619 Various reformatting.
8620 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
8621 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
8622 yytokenp argument; now part of stack.
8623 (yychar): Define to behave as documented.
8624 (yyclearin): Ditto.
8625
8626 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8627
8628 * src/reader.h: Add declaration for free_merger_functions.
8629
8630 * src/reader.c (merge_functions): New variable.
8631 (get_merge_function): New function.
8632 (free_merger_functions): New function.
8633 (readgram): Check for %prec that is not followed by a symbol.
8634 Handle %dprec and %merge declarations.
8635 (packgram): Initialize dprec and merger fields in rules array.
8636
8637 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
8638 conflict_list_cnt, conflict_list_free): New variables.
8639 (table_grow): Also grow conflict_table.
8640 (prepare_rules): Output dprec and merger tables.
8641 (conflict_row): New function.
8642 (action_row): Output conflict lists for GLR parser. Don't use
8643 default reduction in conflicted states for GLR parser so that there
8644 are spaces for the conflict lists.
8645 (save_row): Also save conflict information.
8646 (token_actions): Allocate conflict list.
8647 (merger_output): New function.
8648 (pack_vector): Pack conflict table, too.
8649 (output_conflicts): New function to output yyconflp and yyconfl.
8650 (output_check): Allocate conflict_tos.
8651 (output_actions): Output conflict tables, also.
8652 (output_skeleton): Output b4_mergers definition.
8653 (prepare): Output b4_max_rhs_length definition.
8654 Use 'bison.glr' as default skeleton for GLR parsers.
8655
8656 * src/gram.c (glr_parser): New flag.
8657 (grammar_free): Call free_merger_functions.
8658
8659 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
8660 all pairs of conflicting reductions, rather than just all tokens
8661 causing conflicts. Needed to size conflict tables.
8662 (conflicts_output): Modify call to count_rr_conflicts for new
8663 interface.
8664 (conflicts_print): Ditto.
8665 (count_total_conflicts): New function.
8666
8667 * src/reader.h (merger_list): New type.
8668 (merge_functions): New variable.
8669
8670 * src/lex.h (tok_dprec, tok_merge): New token types.
8671
8672 * src/gram.h (rule_s): Add dprec and merger fields.
8673 (glr_parser): New flag.
8674
8675 * src/conflicts.h (count_total_conflicts): New function.
8676
8677 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
8678
8679 * doc/bison.texinfo (Generalized LR Parsing): New section.
8680 (GLR Parsers): New section.
8681 (Language and Grammar): Mention GLR parsing.
8682 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
8683 Correct typo ("tge" -> "the").
8684
8685 * data/bison.glr: New skeleton for GLR parsing.
8686
8687 * tests/cxx-gram.at: New tests for GLR parsing.
8688
8689 * tests/testsuite.at: Include cxx-gram.at.
8690
8691 * tests/Makefile.am: Add cxx-gram.at.
8692
8693 * src/parse-gram.y:
8694
8695 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
8696
8697 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
8698
8699 2002-06-27 Akim Demaille <akim@epita.fr>
8700
8701 * src/options.h, src/options.c: Remove.
8702 * src/getargs.c (short_options, long_options): New.
8703
8704 2002-06-27 Akim Demaille <akim@epita.fr>
8705
8706 * data/bison.simple, data/bison.c++: Rename as...
8707 * data/yacc.c, data/lalr1.cc: these.
8708 * doc/bison.texinfo (Environment Variables): Remove.
8709
8710 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
8711
8712 * src/getargs.c (report_argmatch): Initialize strtok().
8713
8714 2002-06-20 Akim Demaille <akim@epita.fr>
8715
8716 * data/bison.simple (b4_symbol_actions): New, replaces...
8717 (b4_symbol_destructor, b4_symbol_printer): these.
8718 (yysymprint): Be sure to call YYPRINT only for tokens, and using
8719 user token numbers.
8720
8721 2002-06-20 Akim Demaille <akim@epita.fr>
8722
8723 * data/bison.simple (yydestructor): Rename as...
8724 (yydestruct): this.
8725
8726 2002-06-20 Akim Demaille <akim@epita.fr>
8727
8728 * src/symtab.h, src/symtab.c (symbol_type_set)
8729 (symbol_destructor_set, symbol_precedence_set): The location is
8730 the last argument.
8731 Adjust all callers.
8732
8733 2002-06-20 Akim Demaille <akim@epita.fr>
8734
8735 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
8736 internals.
8737 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
8738 Takes a location.
8739 * src/symtab.h, src/symtab.c (symbol_class_set)
8740 (symbol_user_token_number_set): Likewise.
8741 Adjust all callers.
8742 Promote complain_at.
8743 * tests/input.at (Type Clashes): Adjust.
8744
8745 2002-06-20 Akim Demaille <akim@epita.fr>
8746
8747 * data/bison.simple (YYLEX): Fix the declaration when
8748 %pure-parser.
8749
8750 2002-06-20 Akim Demaille <akim@epita.fr>
8751
8752 * data/bison.simple (yysymprint): Don't print the token number,
8753 just its name.
8754 * tests/actions.at (Destructors): Rename as...
8755 (Printers and Destructors): this.
8756 Also exercise %printer.
8757
8758 2002-06-20 Akim Demaille <akim@epita.fr>
8759
8760 * data/bison.simple (YYDSYMPRINT): New.
8761 Use it to remove many of the #if YYDEBUG/if (yydebug).
8762
8763 2002-06-20 Akim Demaille <akim@epita.fr>
8764
8765 * src/symtab.h, src/symtab.c (symbol_t): printer and
8766 printer_location are new members.
8767 (symbol_printer_set): New.
8768 * src/parse-gram.y (PERCENT_PRINTER): New token.
8769 Handle its associated rule.
8770 * src/scan-gram.l: Adjust.
8771 (handle_destructor_at, handle_destructor_dollar): Rename as...
8772 (handle_symbol_code_at, handle_symbol_code_dollar): these.
8773 * src/output.c (symbol_printers_output): New.
8774 (output_skeleton): Call it.
8775 * data/bison.simple (yysymprint): New. Cannot be named yyprint
8776 since there are already many grammar files with a user `yyprint'.
8777 Replace the calls to YYPRINT to calls to yysymprint.
8778 * tests/calc.at: Adjust.
8779 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
8780 taking advantage of parser very internal details (stack size!).
8781
8782 2002-06-20 Akim Demaille <akim@epita.fr>
8783
8784 * src/scan-gram.l: Complete the scanner with the missing patterns
8785 to pacify Flex.
8786 Use `quote' and `symbol_tag_get' where appropriate.
8787
8788 2002-06-19 Akim Demaille <akim@epita.fr>
8789
8790 * tests/actions.at (Destructors): Augment to test locations.
8791 * data/bison.simple (yydestructor): Pass it the current location
8792 if locations are enabled.
8793 Prototype only when __STDC__ or C++.
8794 Change the argument names to move into the yy name space: there is
8795 user code here.
8796
8797 2002-06-19 Akim Demaille <akim@epita.fr>
8798
8799 * data/bison.simple (b4_pure_if): New.
8800 Use it instead of #ifdef YYPURE.
8801
8802 2002-06-19 Akim Demaille <akim@epita.fr>
8803
8804 * data/bison.simple (b4_location_if): New.
8805 Use it instead of #ifdef YYLSP_NEEDED.
8806
8807 2002-06-19 Akim Demaille <akim@epita.fr>
8808
8809 Prepare @$ in %destructor, but currently don't bind it in the
8810 skeleton, as %location use is not cleaned up yet.
8811
8812 * src/scan-gram.l (handle_dollar, handle_destructor_at)
8813 (handle_action_at): New.
8814 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
8815 a braced_code_t and a location as additional arguments.
8816 (handle_destructor_dollar): Instead of requiring `b4_eval', just
8817 unquote one when outputting `b4_dollar_dollar'.
8818 Adjust callers.
8819 * data/bison.simple (b4_eval): Remove.
8820 (b4_symbol_destructor): Adjust.
8821 * tests/input.at (Invalid @n): Adjust.
8822
8823 2002-06-19 Zack Weinberg <zack@codesourcery.com>
8824
8825 * doc/bison.texinfo: Document ability to have multiple
8826 prologue sections.
8827
8828 2002-06-18 Akim Demaille <akim@epita.fr>
8829
8830 * src/files.c (compute_base_names): When computing the output file
8831 names from the input file name, strip the directory part.
8832
8833 2002-06-18 Akim Demaille <akim@epita.fr>
8834
8835 * data/bison.simple.new: Comment changes.
8836 Reported by Andreas Schwab.
8837
8838 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
8839
8840 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
8841 there are no `label `yyoverflowlab' defined but not used' warnings
8842 when yyoverflow is defined.
8843
8844 2002-06-18 Akim Demaille <akim@epita.fr>
8845
8846 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
8847 new member.
8848 (symbol_destructor_set): Adjust.
8849 * src/output.c (symbol_destructors_output): Output the destructor
8850 locations.
8851 Output the symbol name.
8852 * data/bison.simple (b4_symbol_destructor): Adjust.
8853
8854 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
8855 and Akim Demaille <akim@epita.fr>
8856
8857 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
8858 what's left on the stack when the error recovery hits EOF.
8859 * tests/actions.at (Destructors): Complete to exercise this case.
8860
8861 2002-06-17 Akim Demaille <akim@epita.fr>
8862
8863 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
8864 arguments is really empty, not only equal to `[]'.
8865 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
8866 member.
8867 (symbol_destructor_set): New.
8868 * src/output.c (symbol_destructors_output): New.
8869 * src/reader.h (brace_code_t, current_braced_code): New.
8870 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
8871 (handle_dollar): Rename as...
8872 (handle_action_dollar): this.
8873 (handle_destructor_dollar): New.
8874 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
8875 (grammar_declaration): Use it.
8876 * data/bison.simple (yystos): Is always defined.
8877 (yydestructor): New.
8878 * tests/actions.at (Destructors): New.
8879 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
8880
8881 2002-06-17 Akim Demaille <akim@epita.fr>
8882
8883 * src/symlist.h, src/symlist.c (symbol_list_length): New.
8884 * src/scan-gram.l (handle_dollar, handle_at): Compute the
8885 rule_length only when needed.
8886 * src/output.c (actions_output, token_definitions_output): Output
8887 the full M4 block.
8888 * src/symtab.c: Don't access directly to the symbol tag, use
8889 symbol_tag_get.
8890 * src/parse-gram.y: Use symbol_list_free.
8891
8892 2002-06-17 Akim Demaille <akim@epita.fr>
8893
8894 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
8895 (symbol_list_prepend, get_type_name): Move to...
8896 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
8897 (symbol_list_prepend, symbol_list_n_type_name_get): here.
8898 Adjust all callers.
8899 (symbol_list_free): New.
8900 * src/scan-gram.l (handle_dollar): Takes a location.
8901 * tests/input.at (Invalid $n): Adjust.
8902
8903 2002-06-17 Akim Demaille <akim@epita.fr>
8904
8905 * src/reader.h, src/reader.c (symbol_list_new): Export it.
8906 (symbol_list_prepend): New.
8907 * src/parse-gram.y (%union): `list' is a new member.
8908 (symbols.1): New, replaces...
8909 (terms_to_prec.1, nterms_to_type.1): these.
8910 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
8911 Take a location as additional argument.
8912 Adjust all callers.
8913
8914 2002-06-15 Akim Demaille <akim@epita.fr>
8915
8916 * src/parse-gram.y: Move %token in the declaration section so that
8917 we don't depend upon CVS Bison.
8918
8919 2002-06-15 Akim Demaille <akim@epita.fr>
8920
8921 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
8922 * src/print.c (print_core): Use it.
8923
8924 2002-06-15 Akim Demaille <akim@epita.fr>
8925
8926 * src/conflicts.c (log_resolution): Accept the rule involved in
8927 the sr conflicts instead of the lookahead number that points to
8928 that rule.
8929 (flush_reduce): Accept the current lookahead vector as argument,
8930 instead of the index in LA.
8931 (resolve_sr_conflict): Accept the current number of lookahead
8932 bitset to consider for the STATE, instead of the index in LA.
8933 (set_conflicts): Adjust.
8934 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
8935
8936 2002-06-15 Akim Demaille <akim@epita.fr>
8937
8938 * src/state.h (state_t): Replace the `lookaheadsp' member, a
8939 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
8940 Adjust all dependencies.
8941 * src/lalr.c (initialize_lookaheads): Split into...
8942 (states_lookaheads_count, states_lookaheads_initialize): these.
8943 (lalr): Adjust.
8944
8945 2002-06-15 Akim Demaille <akim@epita.fr>
8946
8947 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
8948 out of...
8949 (grammar_rules_print): here.
8950 * src/reduce.c (reduce_output): Use it.
8951 * tests/reduce.at (Useless Rules, Reduced Automaton)
8952 (Underivable Rules): Adjust.
8953
8954 2002-06-15 Akim Demaille <akim@epita.fr>
8955
8956 Copy BYacc's nice way to report the grammar.
8957
8958 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
8959 New.
8960 Don't print the rules' location, it is confusing and useless.
8961 (rule_print): Use grammar_rhs_print.
8962 * src/print.c (print_grammar): Use grammar_rules_print.
8963
8964 2002-06-15 Akim Demaille <akim@epita.fr>
8965
8966 Complete and rationalize `useless thing' warnings.
8967
8968 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
8969 (symbol_tag_print): New.
8970 Use them everywhere in place of accessing directly the tag member.
8971 * src/gram.h, src/gram.c (rule_print): New.
8972 Use it where a rule used to be printed `by hand'.
8973 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
8974 (reduce_grammar_tables): Report the useless rules.
8975 (reduce_print): Useless things are a warning, not an error.
8976 Report it as such.
8977 * tests/reduce.at (Useless Nonterminals, Useless Rules):
8978 (Reduced Automaton, Underivable Rules): Adjust.
8979 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
8980 * tests/conflicts.at (Unresolved SR Conflicts)
8981 (Solved SR Conflicts): Adjust.
8982
8983 2002-06-15 Akim Demaille <akim@epita.fr>
8984
8985 Let symbols have a location.
8986
8987 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
8988 (getsym): Adjust.
8989 Adjust all callers.
8990 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
8991 Use location_t, not int.
8992 * src/symtab.c (symbol_check_defined): Take advantage of the
8993 location.
8994 * tests/regression.at (Invalid inputs): Adjust.
8995
8996 2002-06-15 Akim Demaille <akim@epita.fr>
8997
8998 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
8999 (input): Don't try to initialize yylloc here, do it in the
9000 scanner.
9001 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
9002 * src/gram.h (rule_t): Change line and action_line into location
9003 and action_location, of location_t type.
9004 Adjust all dependencies.
9005 * src/location.h, src/location.c (empty_location): New.
9006 * src/reader.h, src/reader.c (grammar_start_symbol_set)
9007 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
9008 (grammar_current_rule_symbol_append)
9009 (grammar_current_rule_action_append): Expect a location as argument.
9010 * src/reader.c (grammar_midrule_action): Adjust to attach an
9011 action's location as dummy symbol location.
9012 * src/symtab.h, src/symtab.c (startsymbol_location): New.
9013 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
9014 the line numbers.
9015
9016 2002-06-14 Akim Demaille <akim@epita.fr>
9017
9018 Grammar declarations may be found in the grammar section.
9019
9020 * src/parse-gram.y (rules_or_grammar_declaration): New.
9021 (declarations): Each declaration may end with a semicolon, not
9022 just...
9023 (grammar_declaration): `"%union"'.
9024 (grammar): Branch to rules_or_grammar_declaration.
9025
9026 2002-06-14 Akim Demaille <akim@epita.fr>
9027
9028 * src/main.c (main): Invoke scanner_free.
9029
9030 2002-06-14 Akim Demaille <akim@epita.fr>
9031
9032 * src/output.c (m4_invoke): Extracted from...
9033 (output_skeleton): here.
9034 Free tempfile.
9035
9036 2002-06-14 Akim Demaille <akim@epita.fr>
9037
9038 * src/parse-gram.y (directives, directive, gram)
9039 (grammar_directives, precedence_directives, precedence_directive):
9040 Rename as...
9041 (declarations, declaration, grammar, grammar_declaration)
9042 (precedence_declaration, precedence_declarator): these.
9043 (symbol_declaration): New.
9044
9045 2002-06-14 Akim Demaille <akim@epita.fr>
9046
9047 * src/files.c (action_obstack): Remove, unused.
9048 (output_obstack): Remove it, and all its dependencies, as it is no
9049 longer needed.
9050 * src/reader.c (epilogue_set): Build the epilogue in the
9051 muscle_obstack.
9052 * src/output.h, src/output.c (muscle_obstack): Move to...
9053 * src/muscle_tab.h, src/muscle_tab.h: here.
9054 (muscle_init): Initialize muscle_obstack.
9055 (muscle_free): New.
9056 * src/main.c (main): Call it.
9057
9058 2002-06-14 Akim Demaille <akim@epita.fr>
9059
9060 * src/location.h: New, extracted from...
9061 * src/reader.h: here.
9062 * src/Makefile.am (noinst_HEADERS): Merge into
9063 (bison_SOURCES): this.
9064 Add location.h.
9065 * src/parse-gram.y: Use location_t instead of Bison's.
9066 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
9067 Use location_t instead of ints.
9068
9069 2002-06-14 Akim Demaille <akim@epita.fr>
9070
9071 * data/bison.simple, data/bison.c++: Be sure to restore the
9072 current #line when returning to the skeleton contents after having
9073 exposed the input file's #line.
9074
9075 2002-06-12 Akim Demaille <akim@epita.fr>
9076
9077 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
9078 eager.
9079 * tests/actions.at (Exotic Dollars): New.
9080
9081 2002-06-12 Akim Demaille <akim@epita.fr>
9082
9083 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
9084 ['"/] too eagerly.
9085 * tests/input.at (Torturing the Scanner): New.
9086
9087 2002-06-11 Akim Demaille <akim@epita.fr>
9088
9089 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
9090 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
9091 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
9092 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
9093 * src/reader.c (reader): Use it.
9094
9095 2002-06-11 Akim Demaille <akim@epita.fr>
9096
9097 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
9098 Adjust all callers.
9099 (scanner_last_string_free): New.
9100
9101 2002-06-11 Akim Demaille <akim@epita.fr>
9102
9103 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
9104 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
9105 (last_string, YY_OBS_FREE): New.
9106 Use them when returning an ID.
9107
9108 2002-06-11 Akim Demaille <akim@epita.fr>
9109
9110 Have Bison grammars parsed by a Bison grammar.
9111
9112 * src/reader.c, src/reader.h (prologue_augment): New.
9113 * src/reader.c (copy_definition): Remove.
9114
9115 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
9116 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
9117 (grammar_current_rule_prec_set, grammar_current_rule_check)
9118 (grammar_current_rule_symbol_append)
9119 (grammar_current_rule_action_append): Export.
9120 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
9121 (symbol_list_action_append): Remove.
9122 Hook the routines from reader.
9123 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
9124 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
9125
9126 * src/reader.c (read_declarations): Remove, unused.
9127
9128 * src/parse-gram.y: Handle the epilogue.
9129 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
9130 (grammar_start_symbol_set): this.
9131 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
9132 * src/reader.c (readgram): Remove, unused.
9133 (reader): Adjust to insert eoftoken and axiom where appropriate.
9134
9135 * src/reader.c (copy_dollar): Replace with...
9136 * src/scan-gram.h (handle_dollar): this.
9137 * src/parse-gram.y: Remove `%thong'.
9138
9139 * src/reader.c (copy_at): Replace with...
9140 * src/scan-gram.h (handle_at): this.
9141
9142 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
9143 New.
9144
9145 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
9146 time being.
9147
9148 * src/reader.h, src/reader.c (grammar_rule_end): New.
9149
9150 * src/parse.y (current_type, current_class): New.
9151 Implement `%nterm', `%token' support.
9152 Merge `%term' into `%token'.
9153 (string_as_id): New.
9154 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
9155 type name.
9156
9157 * src/parse-gram.y: Be sure to handle properly the beginning of
9158 rules.
9159
9160 * src/parse-gram.y: Handle %type.
9161 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
9162
9163 * src/parse-gram.y: More directives support.
9164 * src/options.c: No longer handle source directives.
9165
9166 * src/parse-gram.y: Fix %output.
9167
9168 * src/parse-gram.y: Handle %union.
9169 Use the prologue locations.
9170 * src/reader.c (parse_union_decl): Remove.
9171
9172 * src/reader.h, src/reader.c (epilogue_set): New.
9173 * src/parse-gram.y: Use it.
9174
9175 * data/bison.simple, data/bison.c++: b4_stype is now either not
9176 defined, then default to int, or to the contents of %union,
9177 without `union' itself.
9178 Adjust.
9179 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
9180
9181 * src/output.c (actions_output): Don't output braces, as they are
9182 already handled by the scanner.
9183
9184 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
9185 characters to themselves.
9186
9187 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
9188 that the epilogue has a proper #line.
9189
9190 * src/parse-gram.y: Handle precedence/associativity.
9191
9192 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
9193 a terminal.
9194 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
9195 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
9196 at all to define terminals that cannot be emitted.
9197
9198 * src/scan-gram.l: Escape M4 characters.
9199
9200 * src/scan-gram.l: Working properly with escapes in user
9201 strings/characters.
9202
9203 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
9204 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
9205 grammar.
9206 Use more modest sizes, as for the time being the parser does not
9207 release memory, and therefore the process swallows a huge amount
9208 of memory.
9209
9210 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
9211 stricter %token grammar.
9212
9213 * src/symtab.h (associativity): Add `undef_assoc'.
9214 (symbol_precedence_set): Do nothing when passed an undef_assoc.
9215 * src/symtab.c (symbol_check_alias_consistence): Adjust.
9216
9217 * tests/regression.at (Invalid %directive): Remove, as it is now
9218 meaningless.
9219 (Invalid inputs): Adjust to the new error messages.
9220 (Token definitions): The new grammar doesn't allow too many
9221 eccentricities.
9222
9223 * src/lex.h, src/lex.c: Remove.
9224 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
9225 (copy_character, copy_string2, copy_string, copy_identifier)
9226 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
9227 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
9228 (parse_action): Remove.
9229 * po/POTFILES.in: Adjust.
9230
9231 2002-06-11 Akim Demaille <akim@epita.fr>
9232
9233 * src/reader.c (parse_action): Don't store directly into the
9234 rule's action member: return the action as a string.
9235 Don't require `rule_length' as an argument: compute it.
9236 (grammar_current_rule_symbol_append)
9237 (grammar_current_rule_action_append): New, eved out from
9238 (readgram): here.
9239 Remove `action_flag', `rulelength', unused now.
9240
9241 2002-06-11 Akim Demaille <akim@epita.fr>
9242
9243 * src/reader.c (grammar_current_rule_prec_set).
9244 (grammar_current_rule_check): New, eved out from...
9245 (readgram): here.
9246 Remove `xaction', `first_rhs': useless.
9247 * tests/input.at (Type clashes): New.
9248 * tests/existing.at (GNU Cim Grammar): Adjust.
9249
9250 2002-06-11 Akim Demaille <akim@epita.fr>
9251
9252 * src/reader.c (grammar_midrule_action): New, Eved out from
9253 (readgram): here.
9254
9255 2002-06-11 Akim Demaille <akim@epita.fr>
9256
9257 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
9258 New.
9259 (readgram): Use them as replacement of inlined code, crule and
9260 crule1.
9261
9262 2002-06-11 Akim Demaille <akim@epita.fr>
9263
9264 * src/reader.c (grammar_end, grammar_symbol_append): New.
9265 (readgram): Use them.
9266 Make the use of `p' as local as possible.
9267
9268 2002-06-10 Akim Demaille <akim@epita.fr>
9269
9270 GCJ's parser requires the tokens to be defined before the prologue.
9271
9272 * data/bison.simple: Output the token definition before the user's
9273 prologue.
9274 * tests/regression.at (Braces parsing, Duplicate string)
9275 (Mixing %token styles): Check the output from bison.
9276 (Early token definitions): New.
9277
9278 2002-06-10 Akim Demaille <akim@epita.fr>
9279
9280 * src/symtab.c (symbol_user_token_number_set): Don't complain when
9281 assigning twice the same user number to a token, so that we can
9282 use it in...
9283 * src/lex.c (lex): here.
9284 Also use `symbol_class_set' instead of hand written code.
9285 * src/reader.c (parse_assoc_decl): Likewise.
9286
9287 2002-06-10 Akim Demaille <akim@epita.fr>
9288
9289 * src/symtab.c, src/symtab.c (symbol_class_set)
9290 (symbol_user_token_number_set): New.
9291 * src/reader.c (parse_token_decl): Use them.
9292 Use a switch instead of ifs.
9293 Use a single argument.
9294
9295 2002-06-10 Akim Demaille <akim@epita.fr>
9296
9297 Remove `%thong' support as it is undocumented, unused, duplicates
9298 `%token's job, and creates useless e-mail traffic with people who
9299 want to know what it is, why it is undocumented, unused, and
9300 duplicates `%token's job.
9301
9302 * src/reader.c (parse_thong_decl): Remove.
9303 * src/options.c (option_table): Remove "thong".
9304 * src/lex.h (tok_thong): Remove.
9305
9306 2002-06-10 Akim Demaille <akim@epita.fr>
9307
9308 * src/symtab.c, src/symtab.c (symbol_type_set)
9309 (symbol_precedence_set): New.
9310 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
9311 (value_components_used): Remove, unused.
9312
9313 2002-06-09 Akim Demaille <akim@epita.fr>
9314
9315 Move symbols handling code out of the reader.
9316
9317 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
9318 (axiom): Move to...
9319 * src/symtab.h, src/symtab.c: here.
9320
9321 * src/gram.c (start_symbol): Remove: use startsymbol->number.
9322 * src/reader.c (startval): Rename as...
9323 * src/symtab.h, src/symtab.c (startsymbol): this.
9324 * src/reader.c: Adjust.
9325
9326 * src/reader.c (symbol_check_defined, symbol_make_alias)
9327 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
9328 (token_translations_init)
9329 Move to...
9330 * src/symtab.c: here.
9331 * src/reader.c (packsymbols): Move to...
9332 * src/symtab.h, src/symtab.c (symbols_pack): here.
9333 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
9334 argument.
9335
9336 2002-06-03 Akim Demaille <akim@epita.fr>
9337
9338 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
9339 then statements.
9340
9341 2002-06-03 Akim Demaille <akim@epita.fr>
9342
9343 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
9344 structs with non literals.
9345 * src/scan-skel.l: never-interactive.
9346 * src/conflicts.c (enum conflict_resolution_e): No trailing
9347 comma.
9348 * src/getargs.c (usage): Split long literal strings.
9349 Reported by Hans Aberg.
9350
9351 2002-05-28 Akim Demaille <akim@epita.fr>
9352
9353 * data/bison.c++: Use C++ ostreams.
9354 (cdebug_): New member.
9355
9356 2002-05-28 Akim Demaille <akim@epita.fr>
9357
9358 * src/output.c (output_skeleton): Be sure to allocate enough room
9359 for `/' _and_ for `\0' in full_skeleton.
9360
9361 2002-05-28 Akim Demaille <akim@epita.fr>
9362
9363 * data/bison.c++: Catch up with bison.simple:
9364 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9365 and Paul Eggert <eggert@twinsun.com>: `error' handing.
9366 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
9367 and popping traces.
9368
9369 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9370
9371 * src/output.c (output_skeleton): Put an explicit path in front of
9372 the skeleton file name, rather than relying on the -I directory,
9373 to partially alleviate effects of having a skeleton file lying around
9374 in the current directory.
9375
9376 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9377
9378 * src/conflicts.c (log_resolution): Correct typo:
9379 obstack_printf should be obstack_fgrow1.
9380
9381 2002-05-26 Akim Demaille <akim@epita.fr>
9382
9383 * src/state.h (state_t): `solved_conflicts' is a new member.
9384 * src/LR0.c (new_state): Set it to 0.
9385 * src/conflicts.h, src/conflicts.c (print_conflicts)
9386 (free_conflicts, solve_conflicts): Rename as...
9387 (conflicts_print, conflicts_free, conflicts_solve): these.
9388 Adjust callers.
9389 * src/conflicts.c (enum conflict_resolution_e)
9390 (solved_conflicts_obstack): New, used by...
9391 (log_resolution): this.
9392 Adjust to attach the conflict resolution to each state.
9393 Complete the description with the precedence/associativity
9394 information.
9395 (resolve_sr_conflict): Adjust.
9396 * src/print.c (print_state): Output its solved_conflicts.
9397 * tests/conflicts.at (Unresolved SR Conflicts)
9398 (Solved SR Conflicts): Exercise --report=all.
9399
9400 2002-05-26 Akim Demaille <akim@epita.fr>
9401
9402 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
9403 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
9404 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
9405 (token_number_t, item_number_as_token_number)
9406 (token_number_as_item_number, muscle_insert_token_number_table):
9407 Rename as...
9408 (symbol_number_t, item_number_as_symbol_number)
9409 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
9410 these, since it is more appropriate.
9411
9412 2002-05-26 Akim Demaille <akim@epita.fr>
9413
9414 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
9415 `Error:' lines.
9416 * data/bison.simple (yystos) [YYDEBUG]: New.
9417 (yyparse) [YYDEBUG]: Display the symbols which are popped during
9418 error recovery.
9419 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
9420
9421 2002-05-25 Akim Demaille <akim@epita.fr>
9422
9423 * doc/bison.texinfo (Debugging): Split into...
9424 (Tracing): this new section, its former contents, and...
9425 (Understanding): this new section.
9426 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
9427 by...
9428 (report_flag): this.
9429 Adjust all dependencies.
9430 (report_args, report_types, report_argmatch): New.
9431 (usage, getargs): Report/support -r, --report.
9432 * src/options.h
9433 (struct option_table_struct): Rename as..,
9434 (struct option_table_s): this.
9435 Rename the `set_flag' member to `flag' to match with getopt_long's
9436 struct.
9437 * src/options.c (option_table): Split verbose into an entry for
9438 %verbose, and another for --verbose.
9439 Support --report/-r, so remove -r from the obsolete --raw.
9440 * src/print.c: Attach full item sets and lookaheads reports to
9441 report_flag instead of trace_flag.
9442 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
9443
9444 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9445 and Paul Eggert <eggert@twinsun.com>
9446
9447 * data/bison.simple (yyparse): Correct error handling to conform to
9448 POSIX and yacc. Specifically, after syntax error is discovered,
9449 do not reduce further before shifting the error token.
9450 Clean up the code a bit by removing the labels yyerrdefault,
9451 yyerrhandle, yyerrpop.
9452 * NEWS: Document the above.
9453
9454 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9455
9456 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
9457 type; it isn't always big enough, since it doesn't necessarily
9458 include non-terminals.
9459 (yytranslate): Expand definition of yy_token_number_type, so that
9460 the latter can be removed.
9461 (yy_token_number_type): Remove, only one use.
9462 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
9463 don't use TokenNumberType as element type.
9464
9465 * tests/regression.at: Modify expected output to agree with change
9466 to yyr1 and yytranslate.
9467
9468 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
9469
9470 * src/reader.c (parse_action): Use copy_character instead of
9471 obstack_1grow.
9472
9473 2002-05-13 Akim Demaille <akim@epita.fr>
9474
9475 * tests/regression.at (Token definitions): Prototype yylex and
9476 yyerror.
9477
9478 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9479
9480 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
9481 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
9482 32-bit arithmetic.
9483 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
9484
9485 2002-05-07 Akim Demaille <akim@epita.fr>
9486
9487 * tests/synclines.at: Be sure to prototype yylex and yyerror to
9488 avoid GCC warnings.
9489
9490 2002-05-07 Akim Demaille <akim@epita.fr>
9491
9492 Kill GCC warnings.
9493
9494 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
9495 over the RHS of each rule.
9496 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
9497 * src/state.h (state_t): Member `nitems' is unsigned short.
9498 * src/LR0.c (get_state): Adjust.
9499 * src/reader.c (packgram): Likewise.
9500 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
9501 `Type'.
9502 (muscle_insert_int_table): Remove, unused.
9503 (prepare_rules): Remove `max'.
9504
9505 2002-05-06 Akim Demaille <akim@epita.fr>
9506
9507 * src/closure.c (print_firsts): Display of the symbol tags.
9508 (bitmatrix_print): Move to...
9509 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
9510 here.
9511 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
9512
9513 2002-05-06 Akim Demaille <akim@epita.fr>
9514
9515 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
9516 hash_do_for_each.
9517
9518 2002-05-06 Akim Demaille <akim@epita.fr>
9519
9520 * src/LR0.c (new_state, get_state): Instead of using the global
9521 `kernel_size' and `kernel_base', have two new arguments:
9522 `core_size' and `core'.
9523 Adjust callers.
9524
9525 2002-05-06 Akim Demaille <akim@epita.fr>
9526
9527 * src/reader.c (packgram): No longer end `ritem' with a 0
9528 sentinel: it is not used.
9529
9530 2002-05-05 Akim Demaille <akim@epita.fr>
9531
9532 New experimental feature: display the lookaheads in the report and
9533 graph.
9534
9535 * src/print (print_core): When --trace-flag, display the rules
9536 lookaheads.
9537 * src/print_graph.c (print_core): Likewise.
9538 Swap the arguments.
9539 Adjust caller.
9540
9541 2002-05-05 Akim Demaille <akim@epita.fr>
9542
9543 * tests/torture.at (Many lookaheads): New test.
9544
9545 2002-05-05 Akim Demaille <akim@epita.fr>
9546
9547 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
9548 (GENERATE_MUSCLE_INSERT_TABLE): this.
9549 (output_int_table, output_unsigned_int_table, output_short_table)
9550 (output_token_number_table, output_item_number_table): Replace with...
9551 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
9552 (muscle_insert_short_table, muscle_insert_token_number_table)
9553 (muscle_insert_item_number_table): these.
9554 Adjust all callers.
9555 (prepare_tokens): Don't free `translations', since...
9556 * src/reader.h, src/reader.c (grammar_free): do it.
9557 Move to...
9558 * src/gram.h, src/gram.c (grammar_free): here.
9559 * data/bison.simple, data/bison.c++: b4_token_number_max is now
9560 b4_translate_max.
9561
9562 2002-05-05 Akim Demaille <akim@epita.fr>
9563
9564 * src/output.c (output_unsigned_int_table): New.
9565 (prepare_rules): `i' is unsigned.
9566 `prhs', `rline', `r2' are unsigned int.
9567 Rename muscle `rhs_number_max' as `rhs_max'.
9568 Output muscles `prhs_max', `rline_max', and `r2_max'.
9569 Free rline and r1.
9570 * data/bison.simple, data/bison.c++: Adjust to use these muscles
9571 to compute types instead of constant types.
9572 * tests/regression.at (Web2c Actions): Adjust.
9573
9574 2002-05-04 Akim Demaille <akim@epita.fr>
9575
9576 * src/symtab.h (SALIAS, SUNDEF): Rename as...
9577 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
9578 Adjust dependencies.
9579 * src/output.c (token_definitions_output): Be sure not to output a
9580 `#define 'a'' when fed with `%token 'a' "a"'.
9581 * tests/regression.at (Token definitions): New.
9582
9583 2002-05-03 Paul Eggert <eggert@twinsun.com>
9584
9585 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
9586 for K&R C.
9587
9588 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
9589
9590 * Makefile.am (SUBDIRS): Remove intl.
9591 (EXTRA_DIST): Add config/config.rpath.
9592
9593 2002-05-03 Akim Demaille <akim@epita.fr>
9594
9595 * data/bison.simple (m4_if): Don't output empty enums.
9596 And actually, output valid enum definitions :(.
9597
9598 2002-05-03 Akim Demaille <akim@epita.fr>
9599
9600 * configure.bat: Remove, completely obsolete.
9601 * Makefile.am (EXTRA_DIST): Adjust.
9602 Don't distribute config.rpath...
9603 * config/Makefile.am (EXTRA_DIST): Do it.
9604
9605 2002-05-03 Akim Demaille <akim@epita.fr>
9606
9607 * configure.in (GETTEXT_VERSION): New.
9608 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
9609
9610 2002-05-03 Akim Demaille <akim@epita.fr>
9611
9612 * data/bison.simple (b4_token_enum): New.
9613 (b4_token_defines): Use it to output tokens both as #define and
9614 enums.
9615 Suggested by Paul Eggert.
9616 * src/output.c (token_definitions_output): Don't output spurious
9617 white spaces.
9618
9619 2002-05-03 Akim Demaille <akim@epita.fr>
9620
9621 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
9622
9623 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
9624
9625 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
9626 Update the stack class, give a try to deque as the default container.
9627
9628 2002-05-02 Akim Demaille <akim@epita.fr>
9629
9630 * data/bison.simple (yyparse): Do not implement @$ = @1.
9631 (YYLLOC_DEFAULT): Adjust to do it.
9632 * doc/bison.texinfo (Location Default Action): Fix.
9633
9634 2002-05-02 Akim Demaille <akim@epita.fr>
9635
9636 * src/reader.c (parse_braces): Merge into...
9637 (parse_action): this.
9638
9639 2002-05-02 Akim Demaille <akim@epita.fr>
9640
9641 * configure.in (ALL_LINGUAS): Remove.
9642 * po/LINGUAS, hr.po: New.
9643
9644 2002-05-02 Akim Demaille <akim@epita.fr>
9645
9646 Remove the so called hairy (semantic) parsers.
9647
9648 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
9649 * src/gram.h, src/gram.c (semantic_parser): Remove.
9650 (rule_t): Remove the guard and guard_line members.
9651 * src/lex.h (token_t): remove tok_guard.
9652 * src/options.c (option_table): Remove %guard and %semantic_parser
9653 support.
9654 * src/output.c, src/output.h (guards_output): Remove.
9655 (prepare): Adjust.
9656 (token_definitions_output): Don't output the `T'
9657 tokens (???).
9658 (output_skeleton): Don't output the guards.
9659 * src/files.c, src/files.c (attrsfile): Remove.
9660 * src/reader.c (symbol_list): Remove the guard and guard_line
9661 members.
9662 Adjust dependencies.
9663 (parse_guard): Remove.
9664 * data/bison.hairy: Remove.
9665 * doc/bison.texinfo (Environment Variables): Remove occurrences of
9666 BISON_HAIRY.
9667
9668 2002-05-02 Akim Demaille <akim@epita.fr>
9669
9670 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
9671 (parse_guard): Rename the formal argument `stack_offset' as
9672 `rule_length', which is more readable.
9673 Adjust callers.
9674 (copy_at, copy_dollar): Instead of outputting the hard coded
9675 values of $$, $n and so forth, output invocation to b4_lhs_value,
9676 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
9677 Note: this patch partially drops `semantic-parser' support: it
9678 always does `rule_length - n', where semantic parsers ought to
9679 always use `-n'.
9680 * data/bison.simple, data/bison.c++ (b4_lhs_value)
9681 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
9682
9683 2002-05-02 Akim Demaille <akim@epita.fr>
9684
9685 * configure.in (AC_INIT): Bump to 1.49b.
9686 (AM_INIT_AUTOMAKE): Short invocation.
9687
9688 2002-05-02 Akim Demaille <akim@epita.fr>
9689
9690 Version 1.49a.
9691
9692 2002-05-01 Akim Demaille <akim@epita.fr>
9693
9694 * src/skeleton.h: Remove.
9695
9696 2002-05-01 Akim Demaille <akim@epita.fr>
9697
9698 * src/skeleton.h: Fix the #endif.
9699 Reported by Magnus Fromreide.
9700
9701 2002-04-26 Paul Eggert <eggert@twinsun.com>
9702
9703 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
9704 Define if we define YYSTYPE and YYLTYPE, respectively.
9705 (YYCOPY): Fix [] quoting problem in the non-GCC case.
9706
9707 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
9708
9709 * src/scan-skel.l: Postprocess quadrigraphs.
9710
9711 * src/reader.c (copy_character): New function, used to output
9712 single characters while replacing `[' and `]' with quadrigraphs, to
9713 avoid troubles with M4 quotes.
9714 (copy_comment): Output characters with copy_character.
9715 (read_additionnal_code): Likewise.
9716 (copy_string2): Likewise.
9717 (copy_definition): Likewise.
9718
9719 * tests/calc.at: Exercise M4 quoting.
9720
9721 2002-04-25 Akim Demaille <akim@epita.fr>
9722
9723 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
9724 between `!' and the command.
9725 Reported by Paul Eggert.
9726
9727 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
9728
9729 * tests/calc.at: Exercise prologue splitting.
9730
9731 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
9732 `b4_post_prologue' instead of `b4_prologue'.
9733
9734 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
9735 muscles.
9736 (output): Free pre_prologue_obstack and post_prologue_obstack.
9737 * src/files.h, src/files.c (attrs_obstack): Remove.
9738 (pre_prologue_obstack, post_prologue_obstack): New.
9739 * src/reader.c (copy_definition): Add a parameter to specify the
9740 obstack to fill, instead of using attrs_obstack unconditionally.
9741 (read_declarations): Pass pre_prologue_obstack to copy_definition if
9742 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
9743
9744 2002-04-23 Paul Eggert <eggert@twinsun.com>
9745
9746 * data/bison.simple: Remove unnecessary commentary and white
9747 space differences from 1_29-branch.
9748 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
9749
9750 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
9751 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
9752 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
9753 constructors or destructors.
9754
9755 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
9756
9757 2002-04-23 Akim Demaille <akim@epita.fr>
9758
9759 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
9760 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
9761 location with columns.
9762 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
9763 All reported by Paul Eggert.
9764
9765 2002-04-22 Akim Demaille <akim@epita.fr>
9766
9767 * src/reduce.c (dump_grammar): Move to...
9768 * src/gram.h, src/gram.c (grammar_dump): here.
9769 Be sure to separate long item numbers.
9770 Don't read the members of a rule's prec if its nil.
9771
9772 2002-04-22 Akim Demaille <akim@epita.fr>
9773
9774 * src/output.c (table_size, table_grow): New.
9775 (MAXTABLE): Remove, replace uses with table_size.
9776 (pack_vector): Instead of dying when the table is too big, grow it.
9777
9778 2002-04-22 Akim Demaille <akim@epita.fr>
9779
9780 * data/bison.simple (yyr1): Its type is that of a token number.
9781 * data/bison.c++ (r1_): Likewise.
9782 * tests/regression.at (Web2c Actions): Adjust.
9783
9784 2002-04-22 Akim Demaille <akim@epita.fr>
9785
9786 * src/reader.c (token_translations_init): 256 is now the default
9787 value for the error token, i.e., it will be assigned another
9788 number if the user assigned 256 to one of her tokens.
9789 (reader): Don't force 256 to error.
9790 * doc/bison.texinfo (Symbols): Adjust.
9791 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
9792 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
9793 etc. instead of 10, 20, 30 (which was used to `jump' over error
9794 (256) and undefined (2)).
9795
9796 2002-04-22 Akim Demaille <akim@epita.fr>
9797
9798 Propagate more token_number_t.
9799
9800 * src/gram.h (token_number_as_item_number)
9801 (item_number_as_token_number): New.
9802 * src/output.c (GENERATE_OUTPUT_TABLE): New.
9803 Use it to create output_item_number_table and
9804 output_token_number_table.
9805 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
9806 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
9807 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
9808 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
9809
9810 2002-04-22 Akim Demaille <akim@epita.fr>
9811
9812 * src/output.h, src/output.c (get_lines_number): Remove.
9813
9814 2002-04-19 Akim Demaille <akim@epita.fr>
9815
9816 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
9817 as Lex/Flex'.
9818 (Debugging): More details about enabling the debugging features.
9819 (Table of Symbols): Describe $$, $n, @$, and @n.
9820 Suggested by Tim Josling.
9821
9822 2002-04-19 Akim Demaille <akim@epita.fr>
9823
9824 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
9825
9826 2002-04-10 Akim Demaille <akim@epita.fr>
9827
9828 * src/system.h: Rely on HAVE_LIMITS_H.
9829 Suggested by Paul Eggert.
9830
9831 2002-04-09 Akim Demaille <akim@epita.fr>
9832
9833 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
9834 full stderr, and strip it according to the bison options, instead
9835 of composing the error message from different bits.
9836 This makes it easier to check for several error messages.
9837 Adjust all the invocations.
9838 Add an invocation exercising the error token.
9839 Add an invocation demonstrating a stupid error message.
9840 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
9841 Adjust the tests.
9842 Error message are for stderr, not stdout.
9843
9844 2002-04-09 Akim Demaille <akim@epita.fr>
9845
9846 * src/gram.h, src/gram.c (error_token_number): Remove, use
9847 errtoken->number.
9848 * src/reader.c (reader): Don't specify the user token number (2)
9849 for $undefined, as it uselessly prevents using it.
9850 * src/gram.h (token_number_t): Move to...
9851 * src/symtab.h: here.
9852 (state_t.number): Is a token_number_t.
9853 * src/print.c, src/reader.c: Use undeftoken->number instead of
9854 hard coded 2.
9855 (Even though this 2 is not the same as above: the number of the
9856 undeftoken remains being 2, it is its user token number which
9857 might not be 2).
9858 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
9859 `user_token_number_max'.
9860 Output `undef_token_number'.
9861 * data/bison.simple, data/bison.c++: Use them.
9862 Be sure to map invalid yylex return values to
9863 `undef_token_number'. This saves us from gratuitous SEGV.
9864
9865 * tests/conflicts.at (Solved SR Conflicts)
9866 (Unresolved SR Conflicts): Adjust.
9867 * tests/regression.at (Web2c Actions): Adjust.
9868
9869 2002-04-08 Akim Demaille <akim@epita.fr>
9870
9871 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
9872 Adding #line.
9873 Remove the duplicate `typedefs'.
9874 (RhsNumberType): Fix the declaration and various other typos.
9875 Use __ofile__.
9876 * data/bison.simple: Use __ofile__.
9877 * src/scan-skel.l: Handle __ofile__.
9878
9879 2002-04-08 Akim Demaille <akim@epita.fr>
9880
9881 * src/gram.h (item_number_t): New, the type of item numbers in
9882 RITEM. Note that it must be able to code symbol numbers as
9883 positive number, and the negation of rule numbers as negative
9884 numbers.
9885 Adjust all dependencies (pretty many).
9886 * src/reduce.c (rule): Remove this `short *' pointer: use
9887 item_number_t.
9888 * src/system.h (MINSHORT, MAXSHORT): Remove.
9889 Include `limits.h'.
9890 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
9891 (shortcpy): Remove.
9892 (MAXTABLE): Move to...
9893 * src/output.c (MAXTABLE): here.
9894 (prepare_rules): Use output_int_table to output rhs.
9895 * data/bison.simple, data/bison.c++: Adjust.
9896 * tests/torture.at (Big triangle): Move the limit from 254 to
9897 500.
9898 * tests/regression.at (Web2c Actions): Ajust.
9899
9900 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
9901 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
9902 passes, but produces negative #line number, once fixed, GCC is
9903 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
9904 C), it passes.
9905 * src/state.h (state_h): Code input lines on ints, not shorts.
9906
9907 2002-04-08 Akim Demaille <akim@epita.fr>
9908
9909 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
9910 and then the grammar.
9911
9912 2002-04-08 Akim Demaille <akim@epita.fr>
9913
9914 * src/system.h: No longer using strndup.
9915
9916 2002-04-07 Akim Demaille <akim@epita.fr>
9917
9918 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
9919 * src/output.c (output_table_data): Return the longest number.
9920 (prepare_tokens): Output `token_number_max').
9921 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
9922 New.
9923 Use them to define yy_token_number_type/TokenNumberType.
9924 Use this type for yytranslate.
9925 * tests/torture.at (Big triangle): Push the limit from 124 to
9926 253.
9927 * tests/regression.at (Web2c Actions): Adjust.
9928
9929 2002-04-07 Akim Demaille <akim@epita.fr>
9930
9931 * tests/torture.at (Big triangle): New.
9932 (GNU AWK Grammar, GNU Cim Grammar): Move to...
9933 * tests/existing.at: here.
9934
9935 2002-04-07 Akim Demaille <akim@epita.fr>
9936
9937 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
9938 nritems.
9939 Adjust dependencies.
9940
9941 2002-04-07 Akim Demaille <akim@epita.fr>
9942
9943 * src/reader.c: Normalize increments to prefix form.
9944
9945 2002-04-07 Akim Demaille <akim@epita.fr>
9946
9947 * src/reader.c, symtab.c: Remove debugging code.
9948
9949 2002-04-07 Akim Demaille <akim@epita.fr>
9950
9951 Rename all the `bucket's as `symbol_t'.
9952
9953 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
9954 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
9955 * src/symtab.c, src/symtab.h (bucket): Rename as...
9956 (symbol_t): this.
9957 (symbol_list_new, bucket_check_defined, bucket_make_alias)
9958 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
9959 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
9960 (buckets_new, buckets_free, buckets_do): Rename as...
9961 (symbol_list_new, symbol_check_defined, symbol_make_alias)
9962 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
9963 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
9964 (symbols_new, symbols_free, symbols_do): these.
9965
9966 2002-04-07 Akim Demaille <akim@epita.fr>
9967
9968 Use lib/hash for the symbol table.
9969
9970 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
9971 EOF.
9972 * src/lex.c (lex): Set the `number' member of new terminals.
9973 * src/reader.c (bucket_check_defined, bucket_make_alias)
9974 (bucket_check_alias_consistence, bucket_translation): New.
9975 (reader, grammar_free, readgram, token_translations_init)
9976 (packsymbols): Adjust.
9977 (reader): Number the predefined tokens.
9978 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
9979 for predefined tokens.
9980 * src/symtab.h (bucket): Remove all the hash table related
9981 members.
9982 * src/symtab.c (symtab): Replace by...
9983 (bucket_table): this.
9984 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
9985 (buckets_new, buckets_do): New.
9986
9987 2002-04-07 Akim Demaille <akim@epita.fr>
9988
9989 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
9990 (start_symbol, max_user_token_number, semantic_parser)
9991 (error_token_number): Initialize.
9992 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
9993 Initialize.
9994 (reader): Don't.
9995 (errtoken, eoftoken, undeftoken, axiom): Extern.
9996
9997 2002-04-07 Akim Demaille <akim@epita.fr>
9998
9999 * src/gram.h (rule_s): prec and precsym are now pointers
10000 to the bucket giving the priority/associativity.
10001 Member `associativity' removed: useless.
10002 * src/reduce.c, src/conflicts.c: Adjust.
10003
10004 2002-04-07 Akim Demaille <akim@epita.fr>
10005
10006 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
10007 Properly escape the symbols' TAG when outputting them.
10008
10009 2002-04-07 Akim Demaille <akim@epita.fr>
10010
10011 * src/lalr.h (LA): Is a bitsetv, not bitset*.
10012
10013 2002-04-07 Akim Demaille <akim@epita.fr>
10014
10015 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
10016 (LArule): this, which is an array to rule_t*.
10017 * src/print.c, src/conflicts.c: Adjust.
10018
10019 2002-04-07 Akim Demaille <akim@epita.fr>
10020
10021 * src/gram.h (rule_t): Rename `number' as `user_number'.
10022 `number' is a new member.
10023 Adjust dependencies.
10024 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
10025
10026 2002-04-07 Akim Demaille <akim@epita.fr>
10027
10028 As a result of the previous patch, it is no longer needed
10029 to reorder ritem itself.
10030
10031 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
10032
10033 2002-04-07 Akim Demaille <akim@epita.fr>
10034
10035 Be sure never to walk through RITEMS, but use only data related to
10036 the rules themselves. RITEMS should be banished.
10037
10038 * src/output.c (output_token_translations): Rename as...
10039 (prepare_tokens): this.
10040 In addition to `translate', prepare the muscles `tname' and
10041 `toknum', which were handled by...
10042 (output_rule_data): this.
10043 Remove, and move the remainder of its outputs into...
10044 (prepare_rules): this new routines, which also merges content from
10045 (output_gram): this.
10046 (prepare_rules): Be sure never to walk through RITEMS.
10047 (output_stos): Rename as...
10048 (prepare_stos): this.
10049 (output): Always invoke prepare_states, after all, just don't use it
10050 in the output if you don't need it.
10051
10052 2002-04-07 Akim Demaille <akim@epita.fr>
10053
10054 * src/LR0.c (new_state): Display `nstates' as the name of the
10055 newly created state.
10056 Adjust to initialize first_state and last_state if needed.
10057 Be sure to distinguish the initial from the final state.
10058 (new_states): Create the itemset of the initial state, and use
10059 new_state.
10060 * src/closure.c (closure): Now that the initial state has its
10061 items properly set, there is no need for a special case when
10062 creating `ruleset'.
10063
10064 As a result, now the rule 0, reducing to $axiom, is visible in the
10065 outputs. Adjust the test suite.
10066
10067 * tests/conflicts.at (Solved SR Conflicts)
10068 (Unresolved SR Conflicts): Adjust.
10069 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
10070 * tests/conflicts.at (S/R in initial): New.
10071
10072 2002-04-07 Akim Demaille <akim@epita.fr>
10073
10074 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
10075 the RHS of the rules.
10076 * src/output.c (output_gram): Likewise.
10077
10078 2002-04-07 Akim Demaille <akim@epita.fr>
10079
10080 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
10081 bucket.
10082 Adjust all dependencies.
10083 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
10084 `number' of the buckets too.
10085 * src/gram.h: Include `symtab.h'.
10086 (associativity): Move to...
10087 * src/symtab.h: here.
10088 No longer include `gram.h'.
10089
10090 2002-04-07 Akim Demaille <akim@epita.fr>
10091
10092 * src/gram.h, src/gram.c (rules_rhs_length): New.
10093 (ritem_longest_rhs): Use it.
10094 * src/gram.h (rule_t): `number' is a new member.
10095 * src/reader.c (packgram): Set it.
10096 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
10097 the end of `rules', and count them out of `nrules'.
10098 (reduce_output, dump_grammar): Adjust.
10099 * src/print.c (print_grammar): It is no longer needed to check for
10100 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
10101 * tests/reduce.at (Reduced Automaton): New test.
10102
10103 2002-04-07 Akim Demaille <akim@epita.fr>
10104
10105 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
10106 lacking `+ 1' to nrules, Bison reported as useless a token if it
10107 was used solely to set the precedence of the last rule...
10108
10109 2002-04-07 Akim Demaille <akim@epita.fr>
10110
10111 * data/bison.c++, data/bison.simple: Don't output the current file
10112 name in #line, to avoid useless diffs between two identical
10113 outputs under different names.
10114
10115 2002-04-07 Akim Demaille <akim@epita.fr>
10116
10117 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
10118 Normalize loops to using `< nrules + 1', not `<= nrules'.
10119
10120 2002-04-07 Akim Demaille <akim@epita.fr>
10121
10122 * TODO: Update.
10123
10124 2002-04-07 Akim Demaille <akim@epita.fr>
10125
10126 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
10127 bucket.value as bucket.number.
10128
10129 2002-04-07 Akim Demaille <akim@epita.fr>
10130
10131 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
10132 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10133 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
10134 RHS, instead of being an index in RITEMS.
10135
10136 2002-04-04 Paul Eggert <eggert@twinsun.com>
10137
10138 * doc/bison.texinfo: Update copyright date.
10139 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
10140 (Symbols): Warn about running Bison in one character set,
10141 but compiling and/or running in an incompatible one.
10142 Warn about character code 256, too.
10143
10144 2002-04-03 Paul Eggert <eggert@twinsun.com>
10145
10146 * src/bison.data (YYSTACK_ALLOC): Depend on whether
10147 YYERROR_VERBOSE is nonzero, not whether it is defined.
10148
10149 Merge changes from bison-1_29-branch.
10150
10151 2002-03-20 Paul Eggert <eggert@twinsun.com>
10152
10153 Merge fixes from Debian bison_1.34-1.diff.
10154
10155 * configure.in (AC_PREREQ): 2.53.
10156
10157 2002-03-20 Akim Demaille <akim@epita.fr>
10158
10159 * src/conflicts.c (log_resolution): Argument `resolution' is const.
10160
10161 2002-03-19 Paul Eggert <eggert@twinsun.com>
10162
10163 * src/bison.simple (YYCOPY): New macro.
10164 (YYSTACK_RELOCATE): Use it.
10165 Remove Type arg; no longer needed. All callers changed.
10166 (yymemcpy): Remove; no longer needed.
10167
10168 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
10169 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
10170
10171 2002-03-19 Akim Demaille <akim@epita.fr>
10172
10173 Test and fix the #line outputs.
10174
10175 * tests/atlocal.at (GCC): New.
10176 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
10177 (Prologue synch line, %union synch line, Postprologue synch line)
10178 (Action synch line, Epilogue synch line): New tests.
10179 * src/reader.c (parse_union_decl): Define the muscle stype_line.
10180 * data/bison.simple, data/bison.c++: Use it.
10181
10182 2002-03-19 Akim Demaille <akim@epita.fr>
10183
10184 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
10185 (Solved SR Conflicts, %expect not enough, %expect right)
10186 (%expect too much): Move to...
10187 * tests/conflicts.at: this new file.
10188
10189 2002-03-19 Akim Demaille <akim@epita.fr>
10190
10191 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10192 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
10193 that we can move to enums for instance.
10194 * src/output.c (token_definitions_output): Output a list of
10195 `token-name, token-number' instead of the #define.
10196 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
10197
10198 2002-03-14 Akim Demaille <akim@epita.fr>
10199
10200 Use Gettext 0.11.1.
10201
10202 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
10203
10204 * data/bison.c++: Make the user able to add members to the generated
10205 parser by subclassing.
10206
10207 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
10208
10209 * src/reader.c (read_additionnal_code): `c' should be an integer, not
10210 a character.
10211 Reported by Nicolas Tisserand and Nicolas Burrus.
10212
10213 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
10214
10215 * src/reader.c: Warn about lacking semi-colons, do not complain.
10216
10217 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
10218
10219 * data/bison.c++: Remove a debug line.
10220
10221 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
10222
10223 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
10224 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
10225 provide a default implementation.
10226
10227 2002-03-04 Akim Demaille <akim@epita.fr>
10228
10229 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
10230 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
10231 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
10232 * tests/semantic.at (Parsing Guards): Similarly.
10233 * src/reader.at (readgram): Complain if the last rule is not ended
10234 with a semi-colon.
10235
10236 2002-03-04 Akim Demaille <akim@epita.fr>
10237
10238 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
10239 * src/closure.c: here.
10240 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
10241 RTC.
10242 * src/warshall.h, src/warshall.c: Remove.
10243 * tests/sets.at (Broken Closure): Adjust.
10244
10245 2002-03-04 Akim Demaille <akim@epita.fr>
10246
10247 * src/output.c (output_skeleton): tempdir is const.
10248 bytes_read is unused.
10249
10250 2002-03-04 Akim Demaille <akim@epita.fr>
10251
10252 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
10253 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
10254 Update.
10255 From Michael Hayes.
10256
10257 2002-03-04 Akim Demaille <akim@epita.fr>
10258
10259 * src/closure.c (closure): `r' is unused.
10260
10261 2002-03-04 Akim Demaille <akim@epita.fr>
10262
10263 * tests/sets.at (Broken Closure): Add the ending `;'.
10264 * src/reader.at (readgram): Complain if a rule is not ended with a
10265 semi-colon.
10266
10267 2002-03-04 Akim Demaille <akim@epita.fr>
10268
10269 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
10270 (count_sr_conflicts): Use bitset_count.
10271 * src/reduce.c (inaccessable_symbols): Ditto.
10272 (bits_size): Remove.
10273 * src/warshall.h, src/warshall.c: Convert to bitsetv.
10274
10275 2002-03-04 Akim Demaille <akim@epita.fr>
10276
10277 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
10278 * src/reduce.c: Remove the `bitset_zero's following the
10279 `bitset_create's, as now it is performed by the latter.
10280
10281 2002-03-04 Akim Demaille <akim@epita.fr>
10282
10283 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
10284 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
10285 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
10286 latest sources from Michael.
10287
10288 2002-03-04 Akim Demaille <akim@epita.fr>
10289
10290 * src/output.c (output): Don't free the grammar.
10291 * src/reader.c (grammar_free): New.
10292 * src/main.c (main): Call it and don't free symtab here.
10293
10294 2002-03-04 Akim Demaille <akim@epita.fr>
10295
10296 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
10297 before returning.
10298 Reported by Benoit Perrot.
10299
10300 2002-03-04 Akim Demaille <akim@epita.fr>
10301
10302 Use bitset operations when possible, not loops over bits.
10303
10304 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
10305 bitset_or.
10306 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
10307 * src/reduce.c (useless_nonterminals): Formatting changes.
10308 * src/warshall.c (TC): Use bitset_or.
10309
10310 2002-03-04 Akim Demaille <akim@epita.fr>
10311
10312 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
10313 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
10314 Ditto.
10315
10316 2002-03-04 Akim Demaille <akim@epita.fr>
10317
10318 * src/lalr.c (F): Now a bitset*.
10319 Adjust all dependencies.
10320
10321 2002-03-04 Akim Demaille <akim@epita.fr>
10322
10323 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
10324 Adjust all dependencies.
10325
10326 2002-03-04 Akim Demaille <akim@epita.fr>
10327
10328 * src/L0.c, src/LR0.h (nstates): Be size_t.
10329 Adjust comparisons (signed vs unsigned).
10330 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
10331 bitset*.
10332 Adjust all dependencies.
10333
10334 2002-03-04 Akim Demaille <akim@epita.fr>
10335
10336 * src/closure.c (firsts): Now, also a bitset.
10337 Adjust all dependencies.
10338 (varsetsize): Remove, now unused.
10339 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
10340
10341 2002-03-04 Akim Demaille <akim@epita.fr>
10342
10343 * src/print.c: Convert to use bitset.h, not hand coded iterations
10344 over ints.
10345
10346 2002-03-04 Akim Demaille <akim@epita.fr>
10347
10348 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
10349
10350 2002-03-04 Akim Demaille <akim@epita.fr>
10351
10352 * src/closure.c (ruleset): Be a bitset.
10353 (rulesetsize): Remove.
10354
10355 2002-03-04 Akim Demaille <akim@epita.fr>
10356
10357 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
10358 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
10359 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
10360 * src/closure.c (fderives): Be an array of bitsets.
10361
10362 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
10363
10364 * data/bison.c++: Merge the two generated headers. Insert a copyright
10365 notice in each output file.
10366
10367 2002-02-28 Akim Demaille <akim@epita.fr>
10368
10369 * data/bison.c++: Copy the prologue of bison.simple to fetch
10370 useful M4 definitions, such as b4_header_guard.
10371
10372 2002-02-25 Akim Demaille <akim@epita.fr>
10373
10374 * src/getargs.c (version): Give the name of the authors, and use a
10375 translator friendly scheme for the bgr
10376 copyright notice.
10377
10378 2002-02-25 Akim Demaille <akim@epita.fr>
10379
10380 * src/output.c (header_output): Remove, now handled completely via
10381 M4.
10382
10383 2002-02-25 Akim Demaille <akim@epita.fr>
10384
10385 * m4/m4.m4: New, from CVS Autoconf.
10386 * configure.in: Invoke it.
10387 * src/output.c (output_skeleton): Use its result instead of the
10388 hard coded name.
10389
10390 2002-02-25 Akim Demaille <akim@epita.fr>
10391
10392 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
10393 Fileutils 4.1.5.
10394 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
10395 * src/output.c (output_skeleton): Use mkstemp to create a real
10396 temporary file.
10397 Move the filling of `skeleton' and its muscle to...
10398 (prepare): here.
10399 (output): Move the definition of the prologue muscle to...
10400 (prepare): here.
10401 * src/system.h (DEFAULT_TMPDIR): New.
10402
10403 2002-02-14 Paul Eggert <eggert@twinsun.com>
10404
10405 Remove the support for C++ namespace cleanliness; it was
10406 causing more problems than it was curing, since it didn't work
10407 properly on some nonstandard C++ compilers. This can wait
10408 for a proper C++ parser.
10409
10410 * NEWS: Document this.
10411 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
10412 of C++, as it's treated like C now.
10413 * src/bison.simple (YYSTD): Remove.
10414 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
10415 Treat C++ just like Standard C instead of trying to support
10416 namespace cleanliness.
10417
10418 2002-02-14 Akim Demaille <akim@epita.fr>
10419
10420 * tests/regression.at (else): Adjust to Andreas' change.
10421
10422 2002-02-14 Akim Demaille <akim@epita.fr>
10423
10424 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
10425
10426 2002-02-13 Andreas Schwab <schwab@suse.de>
10427
10428 * src/output.c (output_rule_data): Don't output NULL, it might
10429 not be defined yet.
10430
10431 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
10432
10433 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
10434 (Copyright notice): Update.
10435
10436 2002-02-11 Akim Demaille <akim@epita.fr>
10437
10438 * tests/regression.at (%nonassoc and eof): Don't include
10439 nonportable headers.
10440
10441 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
10442
10443 * data/bison.c++: Correct error recovery. Make the user able to
10444 initialize the starting location.
10445
10446 2002-02-07 Akim Demaille <akim@epita.fr>
10447
10448 * tests/input.at: New.
10449
10450 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
10451
10452 * data/bison.c++: Replace some direct m4 expansions by constants. Be
10453 more consistent when naming methods and variables. Put preprocessor
10454 directives around tables only needed for debugging.
10455
10456 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
10457
10458 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
10459 C++ parsers.
10460 (yy::b4_name::parse): Use print_.
10461
10462 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
10463
10464 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
10465
10466 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
10467
10468 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
10469 C++ parsers.
10470 (yy::b4_name::parse): Build verbose error messages, and use error_.
10471
10472 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
10473
10474 * data/bison.c++: Fix m4 quoting in comments.
10475
10476 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
10477
10478 * data/bison.c++: Adjust the parser code. Fix some muscles that were
10479 not expanded by m4.
10480
10481 2002-02-05 Akim Demaille <akim@epita.fr>
10482
10483 * data/bison.c++: Adjust to the M4 back end.
10484 More is certainly needed.
10485
10486 2002-02-05 Akim Demaille <akim@epita.fr>
10487
10488 Give a try to M4 as a back end.
10489
10490 * lib/readpipe.c: New, from wdiff.
10491 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
10492 BISON_HAIRY.
10493 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
10494 specific values. Now it is m4 that performs the lookup.
10495 * src/parse-skel.y: Remove.
10496 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
10497 * src/output.c (actions_output, guards_output)
10498 (token_definitions_output): No longer keeps track of the output
10499 line number, hence remove the second argument.
10500 (guards_output): Check against the guard member of a rule, not the
10501 action member.
10502 Adjust callers.
10503 (output_skeleton): Don't look for the skeleton location, let m4 do
10504 that.
10505 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
10506 file will be used.
10507 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
10508 (prepare): Given that for the time being changesyntax is not
10509 usable in M4, rename the muscles using `-' to `_'.
10510 Define `defines_flag', `output_parser_name' and `output_header_name'.
10511 * src/output.h (actions_output, guards_output)
10512 (token_definitions_output): Adjust prototypes.
10513 * src/scan-skel.l: Instead of scanning the skeletons, it now
10514 processes the output of m4: `__oline__' and `#output'.
10515 * data/bison.simple: Adjust to be used by M4(sugar).
10516 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
10517 to date.
10518 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
10519 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
10520 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
10521 shamelessly stolen from CVS Autoconf.
10522
10523 2002-02-05 Akim Demaille <akim@epita.fr>
10524
10525 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
10526 * configure.in: Check for the declarations of free and malloc.
10527 * src/muscle_tab.c: Adjust.
10528
10529 2002-02-05 Akim Demaille <akim@epita.fr>
10530
10531 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
10532 which have no values.
10533
10534 2002-02-05 Akim Demaille <akim@epita.fr>
10535
10536 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
10537 * data/: here.
10538
10539 2002-01-29 Paul Eggert <eggert@twinsun.com>
10540
10541 * src/bison.simple (YYSIZE_T): Do not define merely because
10542 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
10543 On some platforms, <alloca.h> does not declare YYSTD (size_t).
10544
10545 2002-01-27 Akim Demaille <akim@epita.fr>
10546
10547 Fix `%nonassoc and eof'.
10548
10549 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
10550 which were not properly copied! Replace
10551 memcpy (res->errs, src->errs, src->nerrs);
10552 with
10553 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
10554 !!!
10555 * tests/regression.at (%nonassoc and eof): Adjust to newest
10556 Autotest: `.' is not in the PATH.
10557
10558 2002-01-27 Akim Demaille <akim@epita.fr>
10559
10560 * tests/sets.at (AT_EXTRACT_SETS): New.
10561 (Nullable): Use it.
10562 (Firsts): New.
10563
10564 2002-01-26 Akim Demaille <akim@epita.fr>
10565
10566 * tests/actions.at, tests/calc.at, tests/headers.at,
10567 * tests/torture.at: Adjust to the newest Autotest which no longer
10568 forces `.' in the PATH.
10569
10570 2002-01-25 Akim Demaille <akim@epita.fr>
10571
10572 * tests/regression.at (%nonassoc and eof): New.
10573 Suggested by Robert Anisko.
10574
10575 2002-01-24 Akim Demaille <akim@epita.fr>
10576
10577 Bison dumps core when trying to complain about broken input files.
10578 Reported by Cris van Pelt.
10579
10580 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
10581 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
10582 into...
10583 (Invalid inputs): Strengthen: exercise parse_percent_token.
10584
10585 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
10586
10587 * src/Makefile.am: Add bison.c++.
10588 * src/bison.c++: New skeleton.
10589
10590 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
10591
10592 * po/it.po: New.
10593
10594 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
10595
10596 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
10597
10598 2002-01-20 Marc Autret <marc@gnu.org>
10599
10600 * src/files.c (compute_output_file_names): Fix
10601
10602 2002-01-20 Marc Autret <marc@gnu.org>
10603
10604 * tests/output.at: New test.
10605 * src/files.c (compute_base_names): Don't map extensions when
10606 the YACC flag is set, use defaults.
10607 Reported by Evgeny Stambulchik.
10608
10609 2002-01-20 Marc Autret <marc@gnu.org>
10610
10611 * src/system.h: Need to define __attribute__ away for non-GCC
10612 compilers as well (i.e., the vendor C compiler).
10613 Suggested by Albert Chin-A-Young.
10614
10615 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
10616
10617 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
10618 canonical definition.
10619 * src/system.h: Use the canonical definition for PARAMS (avoids
10620 a conflict with the macro from lib/hash.h).
10621
10622 2002-01-11 Akim Demaille <akim@epita.fr>
10623
10624 * configure.in: Use AC_FUNC_STRNLEN.
10625 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
10626
10627 2002-01-09 Akim Demaille <akim@epita.fr>
10628
10629 * src/files.c, src/files.h (output_infix): New.
10630 (tab_extension): Remove.
10631 (compute_base_names): Compute the former, drop the latter.
10632 * src/output.c (prepare): Insert the muscles `output-infix', and
10633 `output-suffix'.
10634 * src/parse-skel.y (string, string.1): New.
10635 (section.header): Use it.
10636 (section.yacc): Remove.
10637 (prefix): Remove too.
10638 * src/scan-skel.l: Adjust.
10639 * src/bison.simple, src/bison.hairy: Adjust.
10640
10641 2002-01-09 Akim Demaille <akim@epita.fr>
10642
10643 * configure.in (WERROR_CFLAGS): Compute it.
10644 * src/Makefile.am (CFLAGS): Pass it.
10645 * tests/atlocal.in (CFLAGS): Idem.
10646 * src/files.c: Fix a few warnings.
10647 (get_extension_index): Remove, unused.
10648
10649 2002-01-08 Akim Demaille <akim@epita.fr>
10650
10651 * src/getargs.c (AS_FILE_NAME): New.
10652 (getargs): Use it to convert DOSish file names.
10653 * src/files.c (base_name): Rename as full_base_name to avoid
10654 clashes with `base_name ()'.
10655 (filename_split): New.
10656 (compute_base_names): N-th rewrite, using filename_split.
10657
10658 2002-01-08 Akim Demaille <akim@epita.fr>
10659
10660 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
10661 New, stolen from the Fileutils 4.1.
10662 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
10663 * configure.in: Check for the presence of memrchr, and of its
10664 prototype.
10665
10666 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
10667
10668 * lib/hash.h (__P): Added definition for this macro.
10669 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
10670 BUILT_SOURCES, to ensure they are generated first.
10671 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
10672 %error-verbose to allow bootstrapping with bison 1.30x.
10673
10674 2002-01-06 Akim Demaille <akim@epita.fr>
10675
10676 * src/reader.c (parse_braces): Don't fetch the next char, the
10677 convention is to fetch on entry.
10678 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
10679 'switch' without a following semicolon.
10680 * tests/regression.at (braces parsing): New.
10681
10682 2002-01-06 Akim Demaille <akim@epita.fr>
10683
10684 Bison is dead wrong in its RR conflict reports.
10685
10686 * tests/torture.at (GNU Cim Grammar): New.
10687 * src/conflicts.c (count_rr_conflicts): Fix.
10688
10689 2002-01-06 Akim Demaille <akim@epita.fr>
10690
10691 Creating package.m4 from configure.ac causes too many problems.
10692
10693 * tests/Makefile.am (package.m4): Create it by hand,
10694 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
10695
10696 2002-01-06 Akim Demaille <akim@epita.fr>
10697
10698 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
10699 skeleton.h.
10700
10701 2002-01-04 Paul Eggert <eggert@twinsun.com>
10702
10703 * doc/bison.texinfo (Debugging):
10704 Remove YYSTDERR; it's no longer defined or used.
10705 Also, s/cstdio.h/cstdio/.
10706
10707 2002-01-03 Akim Demaille <akim@epita.fr>
10708
10709 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
10710
10711 2002-01-03 Akim Demaille <akim@epita.fr>
10712
10713 * src/parse-skel.y (process_skeleton): Don't bind the parser's
10714 tracing code to --trace, wait for a better --trace option, with
10715 args.
10716
10717 2002-01-03 Akim Demaille <akim@epita.fr>
10718
10719 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
10720 The ISO C++ standard is extremely clear about it: stderr is
10721 considered a macro, not a regular symbol (see table 94 `Header
10722 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
10723 Therefore std:: does not apply to it. It still does with fprintf.
10724 Also, s/cstdio.h/cstdio/.
10725
10726 2002-01-03 Akim Demaille <akim@epita.fr>
10727
10728 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
10729 for non system headers.
10730
10731 2002-01-02 Akim Demaille <akim@epita.fr>
10732
10733 Equip the skeleton chain with location tracking, runtime trace,
10734 pure parser and scanner.
10735
10736 * src/parse-skel.y: Request a pure parser, locations, and prefix
10737 renaming.
10738 (%union): Having several members with the same type does not help
10739 type mismatches, simplify.
10740 (YYPRINT, yyprint): New.
10741 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
10742 (skel_error): this.
10743 Handle locations.
10744 * src/scan-skel.l: Adjust to these changes.
10745 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
10746 (LOCATION_PRINT, skel_control_t): New.
10747
10748 2001-12-30 Akim Demaille <akim@epita.fr>
10749
10750 * src/parse-skel.y: Get rid of the shift/reduce conflict:
10751 replace `gb' with BLANKS.
10752 * src/scan-skel.l: Adjust.
10753
10754 2001-12-30 Akim Demaille <akim@epita.fr>
10755
10756 * src/system.h: We don't need nor want bcopy.
10757 Throw away MS-DOS crap: we don't need getpid.
10758 * configure.in: We don't need strndup. It was even causing
10759 problems: because Flex includes the headers *before* us,
10760 _GNU_SOURCE is not defined by config.h, and therefore strndup was
10761 not visible.
10762 * lib/xstrndup.c: New.
10763 * src/scan-skel.l: Use it.
10764 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
10765 * src/parse-skel.y: Use %directives instead of #defines.
10766
10767 2001-12-30 Akim Demaille <akim@epita.fr>
10768
10769 * src/skeleton.h: New.
10770 * src/output.c (output_parser, output_master_parser): Remove, dead
10771 code.
10772 * src/output.h (get_lines_number, actions_output, guards_output)
10773 (token_definitions_output): Prototype them.
10774 * src/parse-skel.y: Add the license notice.
10775 Include output.h and skeleton.h.
10776 (process_skeleton): Returns void, and takes a single parameter.
10777 * src/scan-skel.l: Add the license notice.
10778 Include skeleton.h.
10779 Don't use %option yylineno: it seems that then Flex imagines
10780 REJECT has been used, and therefore it won't reallocate its
10781 buffers (which makes no other sense to me than a bug). It results
10782 in warnings for `unused: yy_flex_realloc'.
10783
10784 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
10785
10786 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
10787 (MUSCLE_INSERT_PREFIX): ...to there.
10788 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
10789 (MUSCLE_INSERT_PREFIX): Move from here...
10790
10791 * src/bison.hairy: Add a section directive. Put braces around muscle
10792 names. This parser skeleton is still broken, but Bison should not
10793 choke on a bad muscle 'syntax'.
10794 * src/bison.simple: Add a section directive. Put braces around muscle
10795 names.
10796
10797 * src/files.h (strsuffix, stringappend): Add declarations.
10798 (tab_extension): Add declaration.
10799 (short_base_name): Add declaration.
10800
10801 * src/files.c (strsuffix, stringappend): No longer static. These
10802 functions are used in the skeleton parser.
10803 (tab_extension): New.
10804 (compute_base_names): Use the computations done in this function
10805 to guess if the generated parsers should have '.tab' in their
10806 names.
10807 (short_base_name): No longer static.
10808
10809 * src/output.c (output_skeleton): New.
10810 (output): Disable call to output_master_parser, and give a try to
10811 a new skeleton handling system.
10812 (guards_output, actions_output): No longer static.
10813 (token_definitions_output, get_lines_number): No longer static.
10814
10815 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
10816
10817 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
10818 parse-skel.y.
10819
10820 * src/parse-skel.y: New file.
10821 * src/scan-skel.l: New file.
10822
10823 2001-12-29 Akim Demaille <akim@epita.fr>
10824
10825 %name-prefix is broken.
10826
10827 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
10828 Adjust all dependencies.
10829 * tests/headers.at (export YYLTYPE): Strengthen this test: use
10830 %name-prefix.
10831
10832 Renaming yylval but not yylloc is not consistent. Now we do.
10833
10834 * src/bison.simple: Prefix yylloc if used.
10835 * doc/bison.texinfo (Decl Summary): Document that.
10836
10837 2001-12-29 Akim Demaille <akim@epita.fr>
10838
10839 * doc/bison.texinfo: Promote `%long-directive' over
10840 `%long_directive'.
10841 Remove all references to fixed-output-files, yacc is enough.
10842
10843 2001-12-29 Akim Demaille <akim@epita.fr>
10844
10845 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
10846 user prologue. These are defaults.
10847 * tests/actions.at (Mid-rule actions): Make sure the user can
10848 define YYDEBUG and YYERROR_VERBOSE.
10849
10850 2001-12-29 Akim Demaille <akim@epita.fr>
10851
10852 * src/output.c (header_output): Don't forget to export YYLTYPE and
10853 yylloc.
10854 * tests/headers.at (export YYLTYPE): New, make sure it does.
10855 * tests/regression.at (%union and --defines, Invalid CPP headers):
10856 Move to...
10857 * tests/headers.at: here.
10858
10859 2001-12-29 Akim Demaille <akim@epita.fr>
10860
10861 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
10862
10863 2001-12-29 Akim Demaille <akim@epita.fr>
10864
10865 * tests/actions.at (Mid-rule actions): Output on a single line
10866 instead of several.
10867
10868 2001-12-29 Akim Demaille <akim@epita.fr>
10869
10870 * doc/bison.texinfo: Formatting changes.
10871
10872 2001-12-29 Akim Demaille <akim@epita.fr>
10873
10874 Don't store the token defs in a muscle, just be ready to output it
10875 on command. Now possible via `symbols'. Fixes a memory leak.
10876
10877 * src/output.c (token_definitions_output): New.
10878 (output_parser, header_output): Use it.
10879 * src/reader.c (symbols_save): Remove.
10880
10881 2001-12-29 Akim Demaille <akim@epita.fr>
10882
10883 * src/bison.simple: Do not provide a default for YYSTYPE and
10884 YYLTYPE before the user's prologue. Otherwise it's hardly... a
10885 default.
10886
10887 2001-12-29 Akim Demaille <akim@epita.fr>
10888
10889 Mid-rule actions are simply... ignored!
10890
10891 * src/reader.c (readgram): Be sure to attach mid-rule actions to
10892 the empty-rule associated to the dummy symbol, not to the host
10893 rule.
10894 * tests/actions.at (Mid-rule actions): New.
10895
10896 2001-12-29 Akim Demaille <akim@epita.fr>
10897
10898 Memory leak.
10899
10900 * src/reader.c (reader): Free grammar.
10901
10902 2001-12-29 Akim Demaille <akim@epita.fr>
10903
10904 Memory leak.
10905
10906 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
10907 since it allocates it for each state, although only one is needed.
10908 (allocate_storage): Do it here.
10909
10910 2001-12-29 Akim Demaille <akim@epita.fr>
10911
10912 * src/options.h, src/options.c (create_long_option_table): Rename
10913 as...
10914 (long_option_table_new): this, with a clearer prototype.
10915 (percent_table): Remove, unused,
10916 * src/getargs.c (getargs): Adjust.
10917
10918 2001-12-29 Akim Demaille <akim@epita.fr>
10919
10920 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
10921 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
10922 as states.
10923
10924 2001-12-29 Akim Demaille <akim@epita.fr>
10925
10926 * src/lalr.c (build_relations): Rename `states' as `states1'.
10927 Sorry, I don't understand exactly what it is, no better name...
10928
10929 2001-12-29 Akim Demaille <akim@epita.fr>
10930
10931 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
10932 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
10933 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
10934 as rules.
10935
10936 2001-12-29 Akim Demaille <akim@epita.fr>
10937
10938 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
10939 ago.
10940
10941 2001-12-29 Akim Demaille <akim@epita.fr>
10942
10943 * src/reader.c, src/reader.h (user_toknums): Remove.
10944 Adjust all users to use symbols[i]->user_token_number.
10945
10946 2001-12-29 Akim Demaille <akim@epita.fr>
10947
10948 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
10949 Adjust all users to use symbols[i]->prec or ->assoc.
10950
10951 2001-12-29 Akim Demaille <akim@epita.fr>
10952
10953 * src/reader.c, src/reader.h (tags): Remove.
10954 Adjust all users to use symbols[i]->tag.
10955
10956 2001-12-29 Akim Demaille <akim@epita.fr>
10957
10958 * src/gram.h, src/gram.c (symbols): New, similar to state_table
10959 and rule_table.
10960 * src/reader.c (packsymbols): Fill this table.
10961 Drop sprec.
10962 * src/conflicts.c (resolve_sr_conflict): Adjust.
10963 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
10964 single table.
10965 Use symbols[i]->tag instead of tags[i].
10966
10967 2001-12-29 Akim Demaille <akim@epita.fr>
10968
10969 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
10970 In addition, put a comment in there, to replace...
10971 * tests/regression.at (%union and C comments): Remove.
10972
10973 2001-12-29 Akim Demaille <akim@epita.fr>
10974
10975 * tests/regression.at (Web2c Actions): Blindly move the actual
10976 output as expected output. The contents *seem* right to me, but I
10977 can't pretend reading perfectly parser tables... Nonetheless, all
10978 the other tests pass correctly, the table look OK, even though the
10979 presence of `$axiom' is to be noted: AFAICS it is useless (but
10980 harmless).
10981
10982 2001-12-29 Akim Demaille <akim@epita.fr>
10983
10984 * src/reader.c (readgram): Don't add the rule 0 if there were no
10985 rules read. In other words, add it _after_ having performed
10986 grammar sanity checks.
10987 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
10988
10989 2001-12-29 Akim Demaille <akim@epita.fr>
10990
10991 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
10992 visible, and some states have now a different number.
10993
10994 2001-12-29 Akim Demaille <akim@epita.fr>
10995
10996 * src/reader.c (readgram): Bind the initial rule's lineno to that
10997 of the first rule.
10998 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
10999 (Solved SR Conflicts): Adjust rule 0's line number.
11000
11001 2001-12-29 Akim Demaille <akim@epita.fr>
11002
11003 Fix the `GAWK Grammar' failure.
11004
11005 * src/LR0.c (final_state): Initialize to -1 so that we do compute
11006 the reductions of the first state which was mistakenly confused
11007 with the final state because precisely final_state was initialized
11008 to 0.
11009 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
11010 now noticed by Bison.
11011 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
11012 have a reduction on $default.
11013
11014 2001-12-29 Akim Demaille <akim@epita.fr>
11015
11016 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
11017 rule line numbers.
11018 * src/closure.c (print_closure): Likewise.
11019 * src/derives.c (print_derives): Likewise.
11020 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
11021 now.
11022
11023 2001-12-29 Akim Demaille <akim@epita.fr>
11024
11025 * src/lalr.c (lookaheads_print): New.
11026 (lalr): Call it when --trace-flag.
11027 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
11028 are dumped.
11029
11030 2001-12-29 Akim Demaille <akim@epita.fr>
11031
11032 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
11033 when walking through ritem, even via rule->rhs.
11034 * src/reduce.c (dump_grammar, useful_production, reduce_output)
11035 (useful_production, useless_nonterminals): Likewise.
11036 (reduce_grammar_tables): Likewise, plus update nritems.
11037 * src/nullable.c (set_nullable): Likewise.
11038 * src/lalr.c (build_relations): Likewise.
11039 * tests/sets.at (Nullable): Adjust.
11040 Fortunately, now, the $axiom is no longer nullable.
11041
11042 2001-12-29 Akim Demaille <akim@epita.fr>
11043
11044 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
11045 the 0-sentinel.
11046 * src/gram.c (ritem_longest_rhs): Likewise.
11047 * src/reduce.c (nonterminals_reduce): Likewise.
11048 * src/print_graph.c (print_graph): Likewise.
11049 * src/output.c (output_rule_data): Likewise.
11050 * src/nullable.c (set_nullable): Likewise.
11051
11052 2001-12-29 Akim Demaille <akim@epita.fr>
11053
11054 * src/output.c: Comment changes.
11055
11056 2001-12-27 Paul Eggert <eggert@twinsun.com>
11057
11058 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
11059 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
11060 Sparc, as they were causing more porting problems than the
11061 (minor) performance improvement was worth.
11062
11063 Also, catch up with 1.31's YYSTD.
11064
11065 2001-12-27 Akim Demaille <akim@epita.fr>
11066
11067 * src/output.c (output_gram): Rely on nritems, not the
11068 0-sentinel. See below.
11069 Use -1 as separator, not 0.
11070 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
11071 Rely on -1 as separator in yyrhs, instead of 0.
11072 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
11073 twice `Now at end of input', therefore there are two lines less to
11074 expect.
11075
11076 2001-12-27 Akim Demaille <akim@epita.fr>
11077
11078 * tests/regression.at (Unresolved SR Conflicts):
11079 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
11080 below.
11081
11082 2001-12-27 Akim Demaille <akim@epita.fr>
11083
11084 * src/LR0.c (new_state): Recognize the final state by the fact it
11085 is reached by eoftoken.
11086 (insert_start_shifting_state, insert_eof_shifting_state)
11087 (insert_accepting_state, augment_automaton): Remove, since now
11088 these states are automatically computed from the initial state.
11089 (generate_states): Adjust.
11090 * src/print.c: When reporting a rule number to the user, substract
11091 1, so that the axiom rule is rule 0, and the first user rule is 1.
11092 * src/reduce.c: Likewise.
11093 * src/print_graph.c (print_core): For the time being, just as for
11094 the report, depend upon --trace-flags to dump the full set of
11095 items.
11096 * src/reader.c (readgram): Once the grammar read, insert the rule
11097 0: `$axiom: START-SYMBOL $'.
11098 * tests/set.at: Adjust: rule 0 is now displayed, and since the
11099 number of the states has changed (the final state is no longer
11100 necessarily the last), catch up.
11101
11102 2001-12-27 Akim Demaille <akim@epita.fr>
11103
11104 Try to make the use of the eoftoken valid. Given that its value
11105 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
11106 is used instead of > 0 where appropriate, (ii), depend upon nritems
11107 instead of the 0-sentinel.
11108
11109 * src/gram.h, src/gram.c (nritems): New.
11110 Expected to be duplication of nitems, but for the time being...
11111 * src/reader.c (packgram): Assert nritems and nitems are equal.
11112 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
11113 * src/closure.c (print_closure, print_fderives): Likewise.
11114 * src/gram.c (ritem_print): Likewise.
11115 * src/print.c (print_core, print_grammar): Likewise.
11116 * src/print_graph.c: Likewise.
11117
11118 2001-12-27 Akim Demaille <akim@epita.fr>
11119
11120 * src/main.c (main): If there are complains after grammar
11121 reductions, then output the report anyway if requested, then die.
11122 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
11123 * src/reader.c (eoftoken): New.
11124 (parse_token_decl): If the token being defined has value `0', it
11125 is the eoftoken.
11126 (packsymbols): No longer hack `tags' to insert `$' by hand.
11127 Be sure to preserve the value of the eoftoken.
11128 (reader): Make sure eoftoken is defined.
11129 Initialize nsyms to 0: now eoftoken is created just like the others.
11130 * src/print.c (print_grammar): Don't special case the eof token.
11131 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
11132 lie anyway, albeit pleasant.
11133 * tests/calc.at: Exercise error messages with eoftoken.
11134 Change the grammar so that empty input is invalid.
11135 Adjust expectations.
11136 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
11137
11138 2001-12-27 Akim Demaille <akim@epita.fr>
11139
11140 * configure.in: Check the protos of strchr ans strspn.
11141 Replace strchr if needed.
11142 * src/system.h: Provide the protos of strchr, strspn and memchr if
11143 missing.
11144 * lib/strchr.c: New.
11145 * src/reader.c (symbols_save): Use strchr.
11146
11147 2001-12-27 Akim Demaille <akim@epita.fr>
11148
11149 * src/print.c, src/print_graph.c (escape): New.
11150 Use it to quote the TAGS outputs.
11151 * src/print_graph.c (print_state): Now errors are in red, and
11152 reductions in green.
11153 Prefer high to wide: output the state number on a line of its own.
11154
11155 2001-12-27 Akim Demaille <akim@epita.fr>
11156
11157 * src/state.h, src/state.c (reductions_new): New.
11158 * src/LR0.c (set_state_table): Let all the states have a
11159 `reductions', even if reduced to 0.
11160 (save_reductions): Adjust.
11161 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
11162 * src/print.c (print_reductions, print_actions): Adjust.
11163 * src/output.c (action_row): Adjust.
11164
11165 2001-12-27 Akim Demaille <akim@epita.fr>
11166
11167 * src/state.h, src/state.c (errs_new, errs_dup): New.
11168 * src/LR0.c (set_state_table): Let all the states have an errs,
11169 even if reduced to 0.
11170 * src/print.c (print_errs, print_reductions): Adjust.
11171 * src/output.c (output_actions, action_row): Adjust.
11172 * src/conflicts.c (resolve_sr_conflict): Adjust.
11173
11174 2001-12-27 Akim Demaille <akim@epita.fr>
11175
11176 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
11177
11178 2001-12-27 Akim Demaille <akim@epita.fr>
11179
11180 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
11181 * src/print.c: here.
11182 (lookaheadset, shiftset): New, used as additional storage by
11183 print_reductions.
11184 (print_results): Adjust.
11185 (print_shifts, print_gotos, print_errs): New, extracted from...
11186 (print_actions): here.
11187 * src/print_graph.c (print_actions): Remove dead code.
11188
11189 2001-12-27 Akim Demaille <akim@epita.fr>
11190
11191 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
11192 `$n' and `@n'.
11193
11194 2001-12-27 Akim Demaille <akim@epita.fr>
11195
11196 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
11197 (build_relations): Adjust.
11198
11199 2001-12-27 Akim Demaille <akim@epita.fr>
11200
11201 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
11202 duplication.
11203
11204 2001-12-27 Akim Demaille <akim@epita.fr>
11205
11206 * src/reader.c (packgram): Catch nitems overflows.
11207
11208 2001-12-27 Akim Demaille <akim@epita.fr>
11209
11210 * src/files.c, src/files.h (guard_obstack): Remove.
11211 * src/output.c (output): Adjust.
11212 * src/reader.c (parse_braces): New, factoring...
11213 (copy_action, copy_guard): these two which are renamed as...
11214 (parse_action, parse_guard): these.
11215 As a voluntary consequence, using braces around guards is now
11216 mandatory.
11217
11218 2001-12-27 Akim Demaille <akim@epita.fr>
11219
11220 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
11221 * src/reader.c (symbol_list): `guard' and `guard_line' are new
11222 members.
11223 (symbol_list_new): Adjust.
11224 (copy_action): action_line is the first line, not the last.
11225 (copy_guard): Just as for actions, store the `action' only, not
11226 the switch/case/break flesh.
11227 Don't parse the user action that might follow the guard, let...
11228 (readgram): do it, i.e., now, there can be an action after a
11229 guard.
11230 In other words the guard is just explicitly optional.
11231 (packgram): Adjust.
11232 * src/output.c (guards_output): New.
11233 (output_parser): Call it when needed.
11234 (output): Also free the guard and attrs obstacks.
11235 * src/files.c, src/files.h (obstack_save): Remove.
11236 (output_files): Remove.
11237 As a result, if one needs the former `.act' file, using an
11238 appropriate skeleton which requires actions and guards is now
11239 required.
11240 * src/main.c (main): Adjust.
11241 * tests/semantic.at: New.
11242 * tests/regression.at: Use `input.y' as input file name.
11243 Avoid 8+3 problems by requiring input.c when the test needs the
11244 parser.
11245
11246 2001-12-27 Akim Demaille <akim@epita.fr>
11247
11248 * src/reader.c (symbol_list_new): Be sure to initialize all the
11249 fields.
11250
11251 2001-12-27 Akim Demaille <akim@epita.fr>
11252
11253 All the hacks using a final pseudo state are now useless.
11254
11255 * src/LR0.c (set_state_table): state_table holds exactly nstates.
11256 * src/lalr.c (nLA): New.
11257 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
11258 instead of lookaheadsp from the pseudo state (nstate + 1).
11259
11260 2001-12-27 Akim Demaille <akim@epita.fr>
11261
11262 * src/output.c (action_row, token_actions): Use a state_t instead
11263 of a integer, and nlookaheads instead of the following state's
11264 lookaheadsp.
11265
11266 2001-12-27 Akim Demaille <akim@epita.fr>
11267
11268 * src/conflicts.c (log_resolution, flush_shift)
11269 (resolve_sr_conflict, set_conflicts, solve_conflicts)
11270 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
11271 (conflicts_print, print_reductions): Use a state_t instead of an
11272 integer when referring to a state.
11273 As much as possible, depend upon nlookaheads, instead of the
11274 `lookaheadsp' member of the following state (since lookaheads of
11275 successive states are successive, the difference between state n + 1
11276 and n served as the number of lookaheads for state n).
11277 * src/lalr.c (add_lookback_edge): Likewise.
11278 * src/print.c (print_core, print_actions, print_state)
11279 (print_results): Likewise.
11280 * src/print_graph.c (print_core, print_actions, print_state)
11281 (print_graph): Likewise.
11282 * src/conflicts.h: Adjust.
11283
11284 2001-12-27 Akim Demaille <akim@epita.fr>
11285
11286 * src/bison.hairy: Formatting/comment changes.
11287 ANSIfy.
11288 Remove `register' indications.
11289 Add plenty of `static'.
11290
11291 2001-12-27 Akim Demaille <akim@epita.fr>
11292
11293 * src/output.c (prepare): Drop the muscle `ntbase' which
11294 duplicates ntokens.
11295 * src/bison.simple: Formatting/comment changes.
11296 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
11297 is an undocumented synonym.
11298
11299 2001-12-22 Akim Demaille <akim@epita.fr>
11300
11301 * src/output.c (output_table_data): Change the prototype to use
11302 `int' for array ranges: some invocations do pass an int, not a
11303 short.
11304 Reported by Wayne Green.
11305
11306 2001-12-22 Akim Demaille <akim@epita.fr>
11307
11308 Some actions of web2c.y are improperly triggered.
11309 Reported by Mike Castle.
11310
11311 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
11312 * tests/regression.at (Web2c): Rename as...
11313 (Web2c Report): this.
11314 (Web2c Actions): New.
11315
11316 2001-12-22 Akim Demaille <akim@epita.fr>
11317
11318 Reductions in web2c.y are improperly reported.
11319 Reported by Mike Castle.
11320
11321 * src/conflicts.c (print_reductions): Fix.
11322 * tests/regression.at (Web2c): New.
11323
11324 2001-12-18 Akim Demaille <akim@epita.fr>
11325
11326 Some host fail on `assert (!"foo")', which expands to
11327 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
11328 Reported by Nelson Beebee.
11329
11330 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
11331 `#define it_succeeded 0' and `assert (it_succeeded)'.
11332
11333 2001-12-17 Marc Autret <autret_m@epita.fr>
11334
11335 * src/bison.simple: Don't hard code the skeleton line and filename.
11336 * src/output.c (output_parser): Rename 'line' as 'output_line'.
11337 New line counter 'skeleton_line' (skeleton-line muscle).
11338
11339 2001-12-17 Paul Eggert <eggert@twinsun.com>
11340
11341 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
11342 YYDEBUG must be defined to a nonzero value.
11343
11344 * src/bison.simple (yytname): Do not assume that the user defines
11345 YYDEBUG to a properly parenthesized expression.
11346
11347 2001-12-17 Akim Demaille <akim@epita.fr>
11348
11349 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
11350 nlookaheads is a new member.
11351 Adjust all users.
11352 * src/lalr.h (nlookaheads): Remove this orphan declaration.
11353 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
11354 state.
11355
11356 2001-12-17 Akim Demaille <akim@epita.fr>
11357
11358 * src/files.h, src/files.c (open_files, close_files): Remove.
11359 * src/main.c (main): Don't open/close files, nor invoke lex_free,
11360 let...
11361 * src/reader.c (reader): Do it.
11362
11363 2001-12-17 Akim Demaille <akim@epita.fr>
11364
11365 * src/conflicts.c (print_reductions): Formatting changes.
11366
11367 2001-12-17 Akim Demaille <akim@epita.fr>
11368
11369 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
11370 (flush_reduce): New.
11371 (resolve_sr_conflict): Adjust.
11372
11373 2001-12-17 Akim Demaille <akim@epita.fr>
11374
11375 * src/output.c (output_obstack): Be static and rename as...
11376 (format_obstack): this, to avoid any confusion with files.c's
11377 output_obstack.
11378 * src/reader.h (muscle_obstack): Move to...
11379 * src/output.h: here, since it's defined in output.c.
11380
11381 2001-12-17 Akim Demaille <akim@epita.fr>
11382
11383 * src/output.c (action_row, save_column, default_goto)
11384 (sort_actions, matching_state, pack_vector): Better variable
11385 locality.
11386
11387 2001-12-17 Akim Demaille <akim@epita.fr>
11388
11389 * src/output.c: Various formatting changes.
11390
11391 2001-12-17 Akim Demaille <akim@epita.fr>
11392
11393 * src/files.c (output_files): Free the output_obstack.
11394 * src/main.c (main): Call print and print_graph conditionally.
11395 * src/print.c (print): Work unconditionally.
11396 * src/print_graph.c (print_graph): Work unconditionally.
11397 * src/conflicts.c (log_resolution): Output only if verbose_flag.
11398
11399 2001-12-16 Marc Autret <autret_m@epita.fr>
11400
11401 * src/output.c (actions_output): Fix. When we use %no-lines,
11402 there is one less line per action.
11403
11404 2001-12-16 Marc Autret <autret_m@epita.fr>
11405
11406 * src/bison.simple: Remove a useless #line directive.
11407 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
11408 * src/output.c (get_lines_number): New.
11409 (output_parser): Adjust, now takes care about the lines of a
11410 output muscles.
11411 Fix line numbering.
11412 (actions_output): Computes the number of lines taken by actions.
11413 (output_master_parser): Insert new skeleton which is the name of
11414 the output parser file name.
11415
11416 2001-12-15 Marc Autret <autret_m@epita.fr>
11417
11418 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
11419
11420 2001-12-15 Marc Autret <autret_m@epita.fr>
11421
11422 * src/output.c (output_gram): Keep track of the hairy one.
11423
11424 2001-12-15 Akim Demaille <akim@epita.fr>
11425
11426 Make `make distcheck' work.
11427
11428 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
11429 system.h which uses libgettext.h.
11430
11431 2001-12-15 Akim Demaille <akim@epita.fr>
11432
11433 * src/nullable.c (set_nullable): Useless rules must be skipped,
11434 otherwise, since we range over their symbols, we might look at a
11435 nonterminal which no longer ``exists'', i.e., it is not counted in
11436 `nvars', hence we overflow our arrays.
11437
11438 2001-12-15 Akim Demaille <akim@epita.fr>
11439
11440 The header can also be produced directly, without any obstack!
11441 Yahoo!
11442
11443 * src/files.c, src/files.h (defines_obstack): Remove.
11444 (compute_header_macro): Global.
11445 (defines_obstack_save): Remove.
11446 * src/reader.c (parse_union_decl): No longer output to
11447 defines_obstack: its content can be found in the `stype' muscle
11448 anyway.
11449 (output_token_translations): Merge into...
11450 (symbols_output): this.
11451 Rename as...
11452 (symbols_save): this.
11453 (reader): Adjust.
11454 * src/output.c (header_output): New.
11455 (output): Call it.
11456
11457 2001-12-15 Akim Demaille <akim@epita.fr>
11458
11459 * src/reader.c (parse_union_decl): Instead of handling two obstack
11460 simultaneously, use one to define the `stype' muscle, and use the
11461 value of the latter to fill defines_obstack.
11462 (copy_comment): Remove.
11463 (copy_comment2): Work for a single obstack.
11464 Rename as...
11465 (copy_comment): this.
11466
11467 2001-12-15 Akim Demaille <akim@epita.fr>
11468
11469 * src/lex.c, src/lex.h (xgetc): No longer static.
11470 * src/reader.c (parse_union_decl): Revamp.
11471
11472 2001-12-15 Akim Demaille <akim@epita.fr>
11473
11474 Still making progress in separating Bison into (i) input, (ii)
11475 process, (iii) output: now we can directly output the parser file
11476 without using table_obstack at all.
11477
11478 * src/files.c, src/files.h (table_obstack): Bye bye.
11479 (parser_file_name): New.
11480 * src/files.c (compute_output_file_names): Compute it.
11481 * src/output.c (actions_output, output_parser)
11482 (output_master_parser): To a file instead of an obstack.
11483
11484 2001-12-15 Akim Demaille <akim@epita.fr>
11485
11486 Attach actions to rules, instead of pre-outputting them to
11487 actions_obstack.
11488
11489 * src/gram.h (rule_t): action and action_line are new members.
11490 * src/reader.c (symbol_list): Likewise.
11491 (copy_action): Save the actions within the rule.
11492 (packgram): Save them in rule_table.
11493 * src/output.c (actions_output): New.
11494 (output_parser): Use it on `%%actions'.
11495 (output_rule_data): Don't free rule_table.
11496 (output): Do it.
11497 (prepare): Don't save the `action' muscle.
11498 * src/bison.simple: s/%%action/%%actions/.
11499
11500 2001-12-15 Akim Demaille <akim@epita.fr>
11501
11502 * src/reader.c (copy_action): When --yacc, don't append a `;'
11503 to the user action: let it fail if lacking.
11504 Suggested by Arnold Robbins and Tom Tromey.
11505
11506 2001-12-14 Akim Demaille <akim@epita.fr>
11507
11508 * src/lex.c (literalchar): Simply return the char you decoded, non
11509 longer mess around with obstacks and int pointers.
11510 Adjust all callers.
11511
11512 2001-12-14 Akim Demaille <akim@epita.fr>
11513
11514 * src/lex.c (literalchar): Don't escape the special characters,
11515 just decode them, and keep them as char (before, eol was output as
11516 the 2 char string `\n' etc.).
11517 * src/output.c (output_rule_data): Use quotearg to output the
11518 token strings.
11519
11520 2001-12-13 Paul Eggert <eggert@twinsun.com>
11521
11522 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
11523 Do not infringe on the global user namespace when using C++.
11524 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
11525 All uses of `fprintf' and `stderr' changed.
11526
11527 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
11528
11529 2001-12-13 Akim Demaille <akim@epita.fr>
11530
11531 The computation of nullable is broken: it doesn't handle empty
11532 RHS's properly.
11533
11534 * tests/torture.at (GNU AWK Grammar): New.
11535 * tests/sets.at (Nullable): New.
11536 * src/nullable.c (set_nullable): Instead of blindly looping over
11537 `ritems', loop over the rules, and then over their rhs's.
11538
11539 Work around Autotest bugs.
11540
11541 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
11542 frame, because Autotest understand lines starting with a `+' as
11543 traces from the shell. Then, they are not processed properly.
11544 Admittedly an Autotest bug, but we don't have time to wait for
11545 Autotest to catch up.
11546 * tests/regression.at (Broken Closure): Adjust to the new table
11547 frames.
11548 Move to...
11549 * tests/sets.at: here.
11550
11551 2001-12-13 Akim Demaille <akim@epita.fr>
11552
11553 * src/closure.c (closure): Use nrules instead of playing tricks
11554 with BITS_PER_WORD.
11555
11556 2001-12-13 Akim Demaille <akim@epita.fr>
11557
11558 * src/print.c (print_actions): Output the handling of `$' as the
11559 traces do: shifting the token EOF. Before EOF was treated as a
11560 nonterminal.
11561 * tests/regression.at: Adjust some tests.
11562 * src/print_graph.c (print_core): Complete the set of items via
11563 closure. The next-to-final and final states are still unsatisfying,
11564 but that's to be addressed elsewhere.
11565 No longer output the rule numbers, but do output the state number.
11566 A single loop for the shifts + gotos is enough, but picked a
11567 distinct color for each.
11568 (print_graph): Initialize and finalize closure.
11569
11570 2001-12-13 Akim Demaille <akim@epita.fr>
11571
11572 * src/reader.c (readgram): Remove dead code, an strip useless
11573 braces.
11574 (get_type): Remove, unused.
11575
11576 2001-12-12 Akim Demaille <akim@epita.fr>
11577
11578 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
11579 on that of lib/error.c.
11580
11581 2001-12-12 Akim Demaille <akim@epita.fr>
11582
11583 Some hosts don't like `/' in includes.
11584
11585 * src/system.h: Include libgettext.h without qualifying the path.
11586 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
11587 $(top_srcdir).
11588
11589 2001-12-11 Marc Autret <autret_m@epita.fr>
11590
11591 * src/output.c (output_parser): Remove useless muscle.
11592
11593 2001-12-11 Marc Autret <autret_m@epita.fr>
11594
11595 * src/bison.simple: Remove #line just before %%epilogue. It
11596 is now handled in ...
11597 * src/reader.c (read_additionnal_code): Add the output of a
11598 #line for the epilogue.
11599
11600 2001-12-10 Marc Autret <autret_m@epita.fr>
11601
11602 * src/reader.c (copy_definition): Re-use CPP-outed code which
11603 replace precedent remove.
11604 * src/bison.simple: Remove #line before %%prologue because
11605 %%input-line is wrong at this time.
11606
11607 2001-12-10 Marc Autret <autret_m@epita.fr>
11608
11609 * src/reader.c (symbols_output): Clean up.
11610 * src/output.c (output_gram, output): Clean up.
11611
11612 2001-12-10 Akim Demaille <akim@epita.fr>
11613
11614 * src/lalr.c (initialize_lookaheads): New. Extracted from...
11615 * src/LR0.c (set_state_table): here.
11616 * src/lalr.c (lalr): Call it.
11617
11618 2001-12-10 Akim Demaille <akim@epita.fr>
11619
11620 * src/state.h (shifts): Remove the `number' member: shifts are
11621 attached to state, hence no longer need to be labelled with a
11622 state number.
11623
11624 2001-12-10 Akim Demaille <akim@epita.fr>
11625
11626 Now that states have a complete set of members, the linked list of
11627 shifts is useless: just fill directly the state's shifts member.
11628
11629 * src/state.h (shifts): Remove the `next' member.
11630 * src/LR0.c (first_state, last_state): Remove.
11631 Adjust the callers.
11632 (augment_automaton): Don't look for the shifts that must be added
11633 a shift on EOF: it is those of the state we looked for! But now,
11634 since shifts are attached, it is no longer needed to looking
11635 merely by its id: its number.
11636
11637 2001-12-10 Akim Demaille <akim@epita.fr>
11638
11639 * src/LR0.c (augment_automaton): Better variable locality.
11640 Remove an impossible branch: if there is a state corresponding to
11641 the start symbol being shifted, then there is shift for the start
11642 symbol from the initial state.
11643
11644 2001-12-10 Akim Demaille <akim@epita.fr>
11645
11646 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
11647 only when appropriate: when insert_start_shifting_state' is not
11648 invoked.
11649 * tests/regression.at (Rule Line Numbers): Adjust.
11650
11651 2001-12-10 Akim Demaille <akim@epita.fr>
11652
11653 * src/LR0.c (augment_automaton): Now that all states have shifts,
11654 merge the two cases addition shifts to the initial state.
11655
11656 2001-12-10 Akim Demaille <akim@epita.fr>
11657
11658 * src/lalr.c (set_state_table): Move to...
11659 * src/LR0.c: here.
11660 * src/lalr.c (lalr): Don't call it...
11661 * src/LR0.c (generate_states): do it.
11662 * src/LR0.h (first_state): Remove, only the table is used.
11663
11664 2001-12-10 Akim Demaille <akim@epita.fr>
11665
11666 * src/LR0.h (first_shift, first_reduction): Remove.
11667 * src/lalr.c: Don't use first_shift: find shifts through the
11668 states.
11669
11670 2001-12-10 Akim Demaille <akim@epita.fr>
11671
11672 * src/LR0.c: Attach shifts to states as soon as they are
11673 computed.
11674 * src/lalr.c (set_state_table): Instead of assigning shifts to
11675 state, just assert that the mapping was properly done.
11676
11677 2001-12-10 Akim Demaille <akim@epita.fr>
11678
11679 * src/LR0.c (insert_start_shift): Rename as...
11680 (insert_start_shifting_state): this.
11681 (insert_eof_shifting_state, insert_accepting_state): New.
11682 (augment_automaton): Adjust.
11683 Better locality of the variables.
11684 When looking if the start_symbol is shifted from the initial
11685 state, using `while (... symbol != start_symbol ...)' sounds
11686 better than `while (... symbol < start_symbol ...)': If fail
11687 to see how the order between symbols could be relevant!
11688
11689 2001-12-10 Akim Demaille <akim@epita.fr>
11690
11691 * src/getargs.h: Don't declare `spec_name_prefix' and
11692 `spec_file_prefix', declared by src/files.h.
11693 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
11694 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
11695 * src/output.c (prepare): Adjust.
11696 * src/reader.c (symbols_output): Likewise.
11697 * src/vmsgetargs.c: Vaguely adjust, but who cares?
11698
11699 2001-12-10 Akim Demaille <akim@epita.fr>
11700
11701 * src/muscle_tab.c (muscle_init): NULL is a better default than
11702 `"0"'.
11703
11704 2001-12-10 Akim Demaille <akim@epita.fr>
11705
11706 * src/reader.c (reader): Calling symbols_output once is enough.
11707
11708 2001-12-10 Akim Demaille <akim@epita.fr>
11709
11710 Now that states have a complete set of members, the linked list of
11711 reductions is useless: just fill directly the state's reductions
11712 member.
11713
11714 * src/state.h (struct reductions): Remove member `number' and
11715 `next'.
11716 * src/LR0.c (first_reduction, last_reduction): Remove.
11717 (save_reductions): Don't link the new reductions, store them in
11718 this_state.
11719 * src/lalr.c (set_state_table): No need to attach reductions to
11720 states, it's already done.
11721 * src/output.c (output_actions): No longer free the shifts, then
11722 the reductions, then the states: free all the states and their
11723 members.
11724
11725 2001-12-10 Akim Demaille <akim@epita.fr>
11726
11727 * src/options.c (OPTN, DRTV, BOTH): New.
11728 (option_table): Use them.
11729
11730 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
11731 the job of system.h.
11732 * src/options.c: Don't include stdio.h and xalloc.h for the same
11733 reasons.
11734
11735 2001-12-10 Akim Demaille <akim@epita.fr>
11736
11737 * src/output.c (output, prepare): Make sure the values of the
11738 muscles `action' and `prologue' are 0-terminated.
11739
11740 2001-12-10 Akim Demaille <akim@epita.fr>
11741
11742 Clean up GCC warnings.
11743
11744 * src/reader.c (copy_action): `buf' is not used.
11745 (parse_skel_decl): Be static.
11746 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
11747 * src/options.h (create_long_option_table): Have a real prototype.
11748 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
11749 (hash_delete_at): Return const void *.
11750 Adjust casts to preserve the const.
11751
11752 2001-12-10 Akim Demaille <akim@epita.fr>
11753
11754 * configure.in: Require 2.52g.
11755 M4 is not needed, but AUTOM4TE is.
11756 * m4/m4.m4: Remove.
11757 * tests/Makefile.am: Adjust.
11758
11759 2001-12-10 Akim Demaille <akim@epita.fr>
11760
11761 One structure for states is enough, even though theoretically
11762 there are LR(0) states and LALR(1) states.
11763
11764 * src/lalr.h (state_t): Remove.
11765 (state_table): Be state_t **, not state_t *.
11766 * src/state.h (core, CORE_ALLOC): Rename as...
11767 (state_t, STATE_ALLOC): this.
11768 Add the LALR(1) members: shifts, reductions, errs.
11769 * src/LR0.c (state_table): Rename as...
11770 (state_hash): this, to avoid name clashes with the global
11771 `state_table'.
11772 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
11773 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
11774
11775 2001-12-10 Akim Demaille <akim@epita.fr>
11776
11777 Bison dumps core on bash.y.
11778 Reported by Pascal Bart.
11779
11780 * src/warshall.c (bitmatrix_print): New.
11781 (TC): Use it.
11782 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
11783 j must be the outer loop.
11784 * tests/regression.at (Broken Closure): New.
11785
11786 2001-12-05 Akim Demaille <akim@epita.fr>
11787
11788 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
11789 its argument.
11790 Reported by Peter Hamorsky.
11791
11792 2001-12-05 Akim Demaille <akim@epita.fr>
11793
11794 * src/conflicts.c (err_table): Remove.
11795 (resolve_sr_conflict): Adjust.
11796 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
11797 Rename as...
11798 (state_t.reductions, state_t.shifts): this.
11799
11800 2001-12-05 Akim Demaille <akim@epita.fr>
11801
11802 * src/reduce.c (reduce_grammar_tables): No longer disable the
11803 removal of useless rules via CPP but via `if (0)', so that the
11804 compiler still check the code is valid.
11805 For instance, it should have noticed `rline' no longer exists: use
11806 the `line' member of rule_t.
11807 * src/gram.c (dummy, rline): Remove, unused.
11808
11809 2001-12-05 Akim Demaille <akim@epita.fr>
11810
11811 * src/output.c (pack_vector): Use assert, not berror.
11812 * src/main.c (berror): Remove, unused.
11813
11814 2001-12-05 Akim Demaille <akim@epita.fr>
11815
11816 New experimental feature: if --verbose --trace output all the
11817 items of a state, not only its kernel.
11818
11819 * src/print.c (print_core): If `trace_flag', then invoke closure
11820 before outputting the items of the state (print_core is no longer
11821 a correct name them).
11822 (print_results): Invoke new_closure/free_closure if needed.
11823
11824 2001-12-05 Akim Demaille <akim@epita.fr>
11825
11826 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
11827 * src/closure.c, src/closure.h (itemsetsize): Rename as...
11828 (nitemset): for consistency with the rest of the project.
11829
11830 2001-12-05 Akim Demaille <akim@epita.fr>
11831
11832 * src/closure.c (print_closure): Improve.
11833 (closure): Use it for printing input and output.
11834
11835 2001-12-05 Akim Demaille <akim@epita.fr>
11836
11837 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
11838 indexed by nonterminals.
11839
11840 2001-12-05 Akim Demaille <akim@epita.fr>
11841
11842 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
11843 what it was!).
11844 * src/warshall.h: Remove accidental duplication of the content.
11845
11846 2001-12-05 Akim Demaille <akim@epita.fr>
11847
11848 * src/closure.c (set_fderives): De-obfuscate.
11849
11850 2001-12-05 Akim Demaille <akim@epita.fr>
11851
11852 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
11853
11854 2001-12-05 Akim Demaille <akim@epita.fr>
11855
11856 * src/closure.c (set_firsts): De-obfuscate.
11857
11858 2001-12-05 Akim Demaille <akim@epita.fr>
11859
11860 * src/output.c (action_row): De-obfuscate
11861 using the good o' techniques: arrays not pointers, variable
11862 locality, BITISSET, RESETBIT etc.
11863
11864 2001-12-05 Akim Demaille <akim@epita.fr>
11865
11866 Pessimize the code to simplify it: from now on, all the states
11867 have a valid SHIFTS, which NSHIFTS is possibly 0.
11868
11869 * src/LR0.c (shifts_new): Be global and move to..
11870 * src/state.c, src/state.h: here.
11871 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
11872 * src/print_graph: Adjust.
11873
11874 2001-12-05 Akim Demaille <akim@epita.fr>
11875
11876 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
11877 * src/conflicts.c: Use it.
11878 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
11879 incorrectly ``simplified''.
11880
11881 2001-12-05 Akim Demaille <akim@epita.fr>
11882
11883 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
11884 using the good o' techniques: arrays not pointers, variable
11885 locality, BITISSET, RESETBIT etc.
11886
11887 2001-12-05 Akim Demaille <akim@epita.fr>
11888
11889 * src/state.h (SHIFT_SYMBOL): New.
11890 * src/conflicts.c: Use it to deobfuscate.
11891
11892 2001-12-05 Akim Demaille <akim@epita.fr>
11893
11894 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
11895 (print_reductions): De-obfuscate using the good o' techniques:
11896 arrays not pointers, variable locality, BITISSET.
11897
11898 2001-12-05 Akim Demaille <akim@epita.fr>
11899
11900 * src/conflicts.c (print_reductions): Arrays, not pointers.
11901 Use BITISSET.
11902
11903 2001-12-05 Akim Demaille <akim@epita.fr>
11904
11905 * src/conflicts.c (print_reductions): Pessimize, but clarify.
11906
11907 2001-12-05 Akim Demaille <akim@epita.fr>
11908
11909 * src/conflicts.c (print_reductions): Improve variable locality.
11910
11911 2001-12-05 Akim Demaille <akim@epita.fr>
11912
11913 * src/conflicts.c (print_reductions): Pessimize, but clarify.
11914
11915 2001-12-05 Akim Demaille <akim@epita.fr>
11916
11917 * src/conflicts.c (print_reductions): Improve variable locality.
11918
11919 2001-12-05 Akim Demaille <akim@epita.fr>
11920
11921 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
11922 * src/lalr.c: Use them.
11923
11924 2001-12-05 Akim Demaille <akim@epita.fr>
11925
11926 * src/LR0.c (augment_automaton): Formatting changes.
11927 Better variable locality.
11928
11929 2001-12-05 Akim Demaille <akim@epita.fr>
11930
11931 * src/lalr.c (matrix_print): New.
11932 (transpose): Use it.
11933 Use arrays instead of pointers.
11934
11935 2001-12-05 Akim Demaille <akim@epita.fr>
11936
11937 * src/lalr.c (maxrhs): Move to...
11938 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
11939 * src/lalr.c (build_relations): Adjust.
11940
11941 2001-12-05 Akim Demaille <akim@epita.fr>
11942
11943 * src/lalr.c (transpose): Free the memory allocated to the
11944 argument, as it is replaced by the results by the unique caller.
11945 (build_relations): Merely invoke transpose: it handles the memory
11946 deallocation.
11947 Improve variable locality.
11948 Avoid variables used as mere abbreviations.
11949 (compute_lookaheads): Use arrays instead of pointers.
11950
11951 2001-12-05 Akim Demaille <akim@epita.fr>
11952
11953 * src/lalr.c (initialize_F): Improve variable locality.
11954 Avoid variables used as mere abbreviations.
11955
11956 2001-12-05 Akim Demaille <akim@epita.fr>
11957
11958 * src/derives.c (print_derives): Display the ruleno.
11959 * src/lalr.c (initialize_F, transpose): Better variable locality
11960 to improve readability.
11961 Avoid variables used as mere abbreviations.
11962
11963 2001-12-05 Akim Demaille <akim@epita.fr>
11964
11965 * src/lalr.c (traverse): Use arrays instead of pointers.
11966
11967 2001-12-05 Akim Demaille <akim@epita.fr>
11968
11969 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
11970 the handling of squeue.
11971 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
11972
11973 2001-12-05 Akim Demaille <akim@epita.fr>
11974
11975 Because useless nonterminals are now kept alive (instead of being
11976 `destroyed'), we now sometimes examine them, and store information
11977 related to them. Hence we need to know their number, and adjust
11978 memory allocations.
11979
11980 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
11981 static.
11982 * src/LR0.c (allocate_itemsets): The memory allocated to
11983 `symbol_count' was used for two different purpose: once to count
11984 the number of occurrences of each symbol, and later reassigned to
11985 `shift_symbol', containing the symbol that can be shifted from a
11986 given state.
11987 Deobfuscate, i.e., allocate, use and free `symbol_count' here
11988 only, and...
11989 (new_itemsets): Allocate `shift_symbol' here.
11990 (allocate_itemsets): symbol_count includes useless nonterminals.
11991 Make room for them.
11992 (free_storage): Use `free', not `XFREE', for pointers that cannot
11993 be null.
11994
11995 2001-12-05 Akim Demaille <akim@epita.fr>
11996
11997 * src/nullable.c (set_nullable): Deobfuscate the handling of
11998 ritem.
11999 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12000
12001 2001-12-05 Akim Demaille <akim@epita.fr>
12002
12003 * src/gram.c, src/gram.h (ritem_print): New.
12004 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
12005 (This useless function was defined only to work around VMS linkers
12006 that can't handle compilation units with variables only).
12007 * src/reduce.c (dump_grammar): Use it to trace the construction of
12008 ritem.
12009
12010 2001-12-04 Paul Eggert <eggert@twinsun.com>
12011
12012 * src/bison.simple (union yyalloc): Change member names
12013 to be the same as the stack names.
12014 (yyparse): yyptr is now union yyalloc *, not char *.
12015 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
12016 and may generate better code on some machines.
12017 (yystpcpy): Use prototype if __STDC__ is defined, not just
12018 if __cplusplus is defined.
12019
12020 2001-11-30 Akim Demaille <akim@epita.fr>
12021
12022 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
12023 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
12024 Gettext doesn't compile cleanly, and dies with -Werror.
12025 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
12026 Include WARNING_CFLAGS here.
12027 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
12028 before being defined.
12029
12030 2001-11-27 Paul Eggert <eggert@twinsun.com>
12031
12032 * lib/quotearg.h (quotearg_n, quotearg_n_style):
12033 First arg is int, not unsigned.
12034 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
12035 (SIZE_MAX, UINT_MAX): New macros.
12036 (quotearg_n_options): Abort if N is negative.
12037 Avoid overflow check on hosts where size_t is 64 bits and int
12038 is 32 bits, as overflow is impossible there.
12039 Fix off-by-one typo that caused unnecessary reallocation.
12040
12041 2001-11-29 Paul Eggert <eggert@twinsun.com>
12042
12043 Name space cleanup in generated parser.
12044
12045 * doc/bison.texinfo (Bison Parser): Discuss system headers
12046 and their effect on the user name space.
12047
12048 * src/bison.simple:
12049 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
12050 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
12051 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
12052
12053 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
12054 on user names when possible.
12055
12056 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
12057 Simplify test for whather <alloca.h> exists.
12058
12059 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
12060
12061 (<stdio.h>): Include if YYDEBUG.
12062
12063 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
12064 ! defined (yyoverflow) && ! defined (yymemcpy).
12065
12066 (yymemcpy, yyparse): Rename local variables as needed so that
12067 they all begin with 'yy'.
12068
12069 (yystrlen, yystpcpy): New functions.
12070
12071 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
12072 All uses changed.
12073
12074 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
12075 instead of relying on string.h functions. Use YYSTACK_ALLOC
12076 and YYSTACK_FREE instead of malloc and free.
12077
12078 2001-11-30 Akim Demaille <akim@epita.fr>
12079
12080 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
12081 before their first uses.
12082 (YYBISON, YYPURE): Move to the top of the output.
12083
12084 2001-11-30 Akim Demaille <akim@epita.fr>
12085
12086 * tests/reduce.at (Useless Nonterminals): Fix.
12087
12088 2001-11-30 Akim Demaille <akim@epita.fr>
12089
12090 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
12091 if body instead of `;' to pacify GCC's warnings.
12092
12093 2001-11-30 Akim Demaille <akim@epita.fr>
12094
12095 Instead of mapping the LHS of unused rules to -1, keep the LHS
12096 valid, but flag the rules as invalid.
12097
12098 * src/gram.h (rule_t): `useful' is a new member.
12099 * src/print.c (print_grammar): Adjust.
12100 * src/derives.c (set_derives): Likewise.
12101 * src/reader.c (packgram, reduce_output): Likewise.
12102 * src/reduce.c (reduce_grammar_tables): Likewise.
12103 * tests/reduce.at (Underivable Rules, Useless Rules): New.
12104
12105 2001-11-30 Akim Demaille <akim@epita.fr>
12106
12107 * src/reduce.c (reduce_output): Formatting changes.
12108 * src/print.c (print_results, print_grammar): Likewise.
12109 * tests/regression.at (Rule Line Numbers)
12110 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
12111
12112 2001-11-30 Akim Demaille <akim@epita.fr>
12113
12114 * src/reduce.c (nonterminals_reduce): Instead of throwing away
12115 useless nonterminals, move them at the end of the symbol arrays.
12116 (reduce_output): Adjust.
12117 * tests/reduce.at (Useless Nonterminals): Adjust.
12118
12119 2001-11-30 Akim Demaille <akim@epita.fr>
12120
12121 * src/reduce.c: Various comment/formatting changes.
12122 (nonterminals_reduce): New, extracted from...
12123 (reduce_grammar_tables): here.
12124 (reduce_grammar): Call nonterminals_reduce.
12125
12126 2001-11-29 Paul Eggert <eggert@twinsun.com>
12127
12128 * src/bison.simple (YYSTACK_REALLOC): Remove.
12129 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
12130 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
12131 New macros.
12132 (union yyalloc): New type.
12133 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
12134 an arbitrary restriction on hosts where size_t is wider than int.
12135
12136 (yyparse): Don't dump core if alloca or malloc fails; instead, report
12137 a parser stack overflow. Allocate just one block of memory for all
12138 three stacks, instead of allocating three blocks; this typically is
12139 faster and reduces fragmentation.
12140
12141 Do not limit the number of items in the stack to a value that fits
12142 in 'int', as this is an arbitrary limit on hosts with 64-bit
12143 size_t and 32-bit int.
12144
12145 2001-11-29 Marc Autret <autret_m@epita.fr>
12146
12147 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
12148 of defining YYERROR_VERBOSE.
12149 [AT_DATA]: $4 is now out of C declarations in the prologue.
12150
12151 2001-11-28 Marc Autret <autret_m@epita.fr>
12152
12153 * src/reader.c (parse_dquoted_param): New.
12154 (parse_skel_decl): Use it.
12155 * src/lex.h: Add its prototype.
12156 * src/lex.c (literalchar): Become not static.
12157
12158 2001-11-28 Marc Autret <autret_m@epita.fr>
12159
12160 * src/output.h: And put its extern declaration here.
12161 * src/output.c (error_verbose): Define here.
12162 (prepare): Echo name modification.
12163 * src/getargs.h: Clean its extern declaration.
12164 * src/getargs.c (error_verbose_flag): Remove.
12165 (getargs): Remove case 'e'.
12166 * src/options.c (option_table): 'error-verbose' is now seen as simple
12167 percent option.
12168 Include output.h.
12169
12170 * src/reader.c (read_declarations): Remove case tok_include.
12171 (parse_include_decl): Remove.
12172 * src/lex.h (token_t): Remove tok_include.
12173 * src/options.c (option_table): 'include' is now a simple command line
12174 option.
12175
12176 2001-11-28 Marc Autret <autret_m@epita.fr>
12177
12178 * src/bison.simple: Adjust muscle names.
12179 * src/muscle_tab.c (muscle_init): Also rename the muscles.
12180 * src/output.c (prepare): s/_/-/ for the muscles names.
12181 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
12182
12183 2001-11-28 Marc Autret <autret_m@epita.fr>
12184
12185 * src/bison.simple: Fix debug.
12186 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
12187
12188 2001-11-28 Akim Demaille <akim@epita.fr>
12189
12190 * src/LR0.c (shifts_new): New.
12191 (save_shifts, insert_start_shift, augment_automaton): Use it.
12192
12193 2001-11-28 Akim Demaille <akim@epita.fr>
12194
12195 * src/closure.c (closure): `b' and `ruleno' denote the same value:
12196 keep ruleno only.
12197
12198 2001-11-28 Akim Demaille <akim@epita.fr>
12199
12200 * src/closure.c (closure): Instead of looping over word in array
12201 then bits in words, loop over bits in array.
12202
12203 2001-11-28 Akim Demaille <akim@epita.fr>
12204
12205 * src/closure.c (closure): No longer optimize the special case
12206 where all the bits of `ruleset[r]' are set to 0, to make the code
12207 clearer.
12208
12209 2001-11-28 Akim Demaille <akim@epita.fr>
12210
12211 * src/closure.c (closure): `r' and `c' are new variables, used to
12212 de-obfuscate accesses to RULESET and CORE.
12213
12214 2001-11-28 Akim Demaille <akim@epita.fr>
12215
12216 * src/reduce.c (reduce_print): Use ngettext.
12217 (dump_grammar): Improve the trace accuracy.
12218
12219 2001-11-28 Akim Demaille <akim@epita.fr>
12220
12221 * src/reduce.c (dump_grammar): Don't translate trace messages.
12222
12223 2001-11-28 Akim Demaille <akim@epita.fr>
12224
12225 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
12226 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
12227 as all tags are free'ed afterwards.
12228 From Enrico Scholz.
12229
12230 2001-11-27 Paul Eggert <eggert@twinsun.com>
12231
12232 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
12233 use alloca when we didn't want to, and vice versa.
12234
12235 2001-11-27 Marc Autret <autret_m@epita.fr>
12236
12237 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
12238 initialization.
12239 * src/output.c (prepare): Remove its update.
12240
12241 2001-11-27 Marc Autret <autret_m@epita.fr>
12242
12243 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
12244 Use %error-verbose.
12245
12246 2001-11-27 Marc Autret <autret_m@epita.fr>
12247
12248 * src/bison.simple: Remove YYERROR_VERBOSE using.
12249 Use %%error_verbose.
12250 (yyparse): Likewise.
12251 * src/output.c (prepare): Give its final value.
12252 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
12253 * src/getargs.h: Add its extern declaration.
12254 * src/getargs.c (error_verbose_flag): New int.
12255 (getargs): Update to catch new case.
12256 * src/options.c (option_table): 'error-verbose' is a new option.
12257 (shortopts): Update.
12258
12259 2001-11-27 Akim Demaille <akim@epita.fr>
12260
12261 * src/system.h: Use intl/libgettext.h.
12262 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
12263
12264 2001-11-27 Akim Demaille <akim@epita.fr>
12265
12266 * tests/torture.at (Exploding the Stack Size with Malloc):
12267 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
12268
12269 2001-11-27 Akim Demaille <akim@epita.fr>
12270
12271 * src/files.c: Include error.h.
12272 Reported by Hans Aberg.
12273
12274 2001-11-26 Marc Autret <autret_m@epita.fr>
12275
12276 * src/reader.c (parse_include_decl): New, not yet implemented.
12277 (read_declarations): Add case tok_include.
12278 * src/getargs.h (include): Add its extern definition.
12279 * src/getargs.c (include): New const char *.
12280 (getargs): Add case '-I'.
12281 * src/options.c (option_table): Add include as command line and
12282 percent option.
12283 * src/lex.h (token_t): Add tok_include.
12284
12285 2001-11-26 Akim Demaille <akim@epita.fr>
12286
12287 * src/reader.c (readgram): Make sure rules for mid-rule actions
12288 have a lineno equal to that of their host rule.
12289 Reported by Hans Aberg.
12290 * tests/regression.at (Rule Line Numbers): New.
12291
12292 2001-11-26 Akim Demaille <akim@epita.fr>
12293
12294 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
12295 size_ts.
12296
12297 2001-11-26 Akim Demaille <akim@epita.fr>
12298
12299 * src/complain.c, src/complain.h (error): Remove, provided by
12300 lib/error.[ch].
12301
12302 2001-11-26 Akim Demaille <akim@epita.fr>
12303
12304 * src/reader.c (read_declarations): Don't abort on tok_illegal,
12305 issue an error message.
12306 * tests/regression.at (Invalid %directive): New.
12307 Reported by Hans Aberg.
12308
12309 2001-11-26 Akim Demaille <akim@epita.fr>
12310
12311 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
12312 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12313
12314 2001-11-26 Akim Demaille <akim@epita.fr>
12315
12316 * src/conflicts.c (conflicts_print): Don't complain at all when
12317 there are no reduce/reduce conflicts, and as many shift/reduce
12318 conflicts as expected.
12319 * tests/regression.at (%expect right): Adjust.
12320
12321 2001-11-23 Akim Demaille <akim@epita.fr>
12322
12323 * lib/alloca.c: Update, from fileutils.
12324
12325 2001-11-23 Akim Demaille <akim@epita.fr>
12326
12327 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
12328
12329 2001-11-23 Akim Demaille <akim@epita.fr>
12330
12331 * src/system.h: Include alloca.h.
12332 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
12333
12334 2001-11-23 Akim Demaille <akim@epita.fr>
12335
12336 * src/print_graph.c (print_actions): Remove `rule', unused.
12337 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
12338 pacify GCC's signed < unsigned warnings.
12339 * src/closure.c (itemsetsize): Likewise.
12340 * src/reader.c (symbol_list_new): Static.
12341
12342 2001-11-23 Akim Demaille <akim@epita.fr>
12343
12344 Attaching lineno to buckets is stupid, since only one copy of each
12345 symbol is kept, only the line of the first occurrence is kept too.
12346
12347 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
12348 * src/reader.c (rline_allocated): Remove, unused.
12349 (symbol_list): Have a `line' member.
12350 (symbol_list_new): New.
12351 (readgram): Use it.
12352 * src/print.c (print_grammar): Output the rule line numbers.
12353 * tests/regression.at (Solved SR Conflicts)
12354 (Unresolved SR Conflicts): Adjust.
12355 Reported by Hans Aberg.
12356
12357 2001-11-22 Marc Autret <autret_m@epita.fr>
12358
12359 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
12360
12361 2001-11-22 Marc Autret <autret_m@epita.fr>
12362
12363 * src/muscle_tab.c (muscle_init): Remove initialization of
12364 skeleton muscle.
12365 * src/output.c (output_master_parser): Do it here.
12366
12367 2001-11-20 Akim Demaille <akim@epita.fr>
12368
12369 * po/sv.po: New.
12370 * configure.in (ALL_LINGUAS): Adjust.
12371 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
12372 longer contains strings to translate.
12373
12374 2001-11-19 Akim Demaille <akim@epita.fr>
12375
12376 * src/conflicts.c (conflicts_print): Add a missing \n.
12377
12378 2001-11-19 Akim Demaille <akim@epita.fr>
12379
12380 * src/nullable.c (nullable_print): New.
12381 (set_nullable): Call it when tracing.
12382 Better locality of variables.
12383
12384 2001-11-19 Akim Demaille <akim@epita.fr>
12385
12386 * src/print.c (print_actions): Better locality of variables.
12387
12388 2001-11-19 Akim Demaille <akim@epita.fr>
12389
12390 * src/derives.c (print_derives): Fix and enrich.
12391 * src/closure.c (print_fderives): Likewise.
12392
12393 2001-11-19 Akim Demaille <akim@epita.fr>
12394
12395 * src/closure.c (itemsetend): Remove, replaced with...
12396 (itemsetsize): new.
12397
12398 2001-11-19 Akim Demaille <akim@epita.fr>
12399
12400 * src/LR0.c (kernel_end): Remove, replaced with...
12401 (kernel_size): new.
12402
12403 2001-11-19 Akim Demaille <akim@epita.fr>
12404
12405 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
12406 to clarify.
12407
12408 2001-11-19 Akim Demaille <akim@epita.fr>
12409
12410 * src/closure.c (closure): Use arrays instead of pointers to clarify.
12411
12412 2001-11-19 Akim Demaille <akim@epita.fr>
12413
12414 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
12415 trace messages.
12416 * src/LR0.c: Likewise.
12417 (allocate_itemsets): Use arrays instead of pointers to clarify.
12418
12419 2001-11-19 Akim Demaille <akim@epita.fr>
12420
12421 * src/getargs.c (statistics_flag): Replace with...
12422 (trace_flag): New.
12423 (longopts): Accept --trace instead of --statistics.
12424 * src/getargs.h, src/options.c: Adjust.
12425 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
12426 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
12427
12428 2001-11-19 Akim Demaille <akim@epita.fr>
12429
12430 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
12431 pointers to clarify the code.
12432 (save_reductions, save_shifts): Factor common parts of alternatives.
12433
12434 2001-11-19 Akim Demaille <akim@epita.fr>
12435
12436 * src/LR0.c (new_state, get_state): Complete TRACE code.
12437 * src/closure.c: Include `reader.h' to get `tags', needed by the
12438 trace code.
12439 Rename the conditional DEBUG as TRACE.
12440 Output consistently TRACEs to stderr, not stdout.
12441 * src/derives.c: Likewise.
12442 * src/reduce.c: (inaccessable_symbols): Using if is better style
12443 than goto.
12444 Use `#if TRACE' instead of `#if 0' for tracing code.
12445
12446 2001-11-19 Akim Demaille <akim@epita.fr>
12447
12448 * src/system.h (LIST_FREE, shortcpy): New.
12449 * src/LR0.c: Use them.
12450 * src/output.c (free_itemsets, free_reductions, free_shifts):
12451 Remove, replaced by LIST_FREE.
12452
12453 2001-11-19 Akim Demaille <akim@epita.fr>
12454
12455 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
12456 (REDUCTIONS_ALLOC): New.
12457 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
12458 allocation.
12459
12460 2001-11-19 Akim Demaille <akim@epita.fr>
12461
12462 * src/LR0.c (new_state): Complete trace code.
12463 * src/nullable.c (set_nullable): Don't translate traces.
12464
12465 2001-11-19 Akim Demaille <akim@epita.fr>
12466
12467 * src/print_graph.c (print_core): Better locality of variables.
12468 * src/print.c (print_core): Likewise.
12469
12470 2001-11-19 Akim Demaille <akim@epita.fr>
12471
12472 * src/vcg.c: You do the output, so you are responsible of the
12473 handling of VCG syntax, in particular: use quotearg.
12474 * src/print_graph.c: Don't.
12475 (print_actions): Don't output the actions as part of the nodes,
12476 since that's the job of the edges.
12477 (print_state): Don't output by hand: fill the node description,
12478 and ask for its output.
12479
12480 2001-11-19 Akim Demaille <akim@epita.fr>
12481
12482 * src/bison.simple (yyparse): When verbosely reporting an error,
12483 no longer put additional quotes around token names.
12484 * tests/calc.at: Adjust.
12485
12486 2001-11-19 Akim Demaille <akim@epita.fr>
12487
12488 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
12489 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
12490 * src/output.c: Adjust.
12491
12492 2001-11-19 Akim Demaille <akim@epita.fr>
12493
12494 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
12495 (rule_t): this.
12496 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
12497
12498 2001-11-19 Akim Demaille <akim@epita.fr>
12499
12500 * src/gram.h (rule_t): New.
12501 (rule_table): New.
12502 (rrhs, rlhs): Remove, part of state_t.
12503 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
12504 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12505 * src/reader.c, src/reduce.c: Adjust.
12506
12507 2001-11-19 Akim Demaille <akim@epita.fr>
12508
12509 * src/reader.c (symbols_output): New, extracted from...
12510 (packsymbols): Here.
12511 (reader): Call it.
12512
12513 2001-11-19 Akim Demaille <akim@epita.fr>
12514
12515 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
12516 (maxrhs): this new function.
12517
12518 2001-11-19 Akim Demaille <akim@epita.fr>
12519
12520 * src/lalr.c (F): New macro to access the variable F.
12521 Adjust.
12522
12523 2001-11-19 Akim Demaille <akim@epita.fr>
12524
12525 * src/lalr.h (LA): New macro to access the variable LA.
12526 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12527 * src/lalr.c: Adjust.
12528
12529 2001-11-19 Akim Demaille <akim@epita.fr>
12530
12531 * src/lalr.c (initialize_LA): Only initialize LA. Let...
12532 (set_state_table): handle the `lookaheads' members.
12533
12534 2001-11-19 Akim Demaille <akim@epita.fr>
12535
12536 * src/lalr.h (lookaheads): Removed array, whose contents is now
12537 a member of...
12538 (state_t): this structure.
12539 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12540 Adjust.
12541
12542 2001-11-19 Akim Demaille <akim@epita.fr>
12543
12544 * src/lalr.h (consistent): Removed array, whose contents is now
12545 a member of...
12546 (state_t): this structure.
12547 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12548 Adjust.
12549
12550 2001-11-19 Akim Demaille <akim@epita.fr>
12551
12552 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
12553 contents are now members of...
12554 (state_t): this structure.
12555 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
12556 Adjust.
12557
12558 2001-11-19 Akim Demaille <akim@epita.fr>
12559
12560 * src/lalr.h (state_t): New.
12561 (state_table): Be a state_t * instead of a core **.
12562 (accessing_symbol): Remove, part of state_t.
12563 * src/lalr.c: Adjust.
12564 (set_accessing_symbol): Merge into...
12565 (set_state_table): this.
12566 * src/print_graph.c, src/conflicts.c: Adjust.
12567
12568 2001-11-14 Akim Demaille <akim@epita.fr>
12569
12570 * tests/calc.at, tests/output.at, tests/regression.at,
12571 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
12572 now the tests are run in private dirs, therefore AC_CLEANUP and
12573 family can be simplified to 0-ary.
12574 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
12575 use abs. path to find config.h.
12576 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
12577 stderr, there can be way too much random noise.
12578 Instead pass -Werror to GCC and rely on the exit status.
12579 Reported by Wolfram Wagner.
12580
12581 2001-11-14 Akim Demaille <akim@epita.fr>
12582
12583 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
12584 defined only if yyoverflow is defined, to avoid `warning: unused
12585 variable `yyvs1''.
12586 Reported by The Test Suite.
12587
12588 2001-11-14 Akim Demaille <akim@epita.fr>
12589
12590 * src/print.c: Include reduce.h.
12591 Reported by Hans Aberg.
12592
12593 2001-11-14 Akim Demaille <akim@epita.fr>
12594
12595 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
12596 Revert a previous patch: these are really const.
12597 * src/conflicts.c (conflict_report): Additional useless pair of
12598 braces to pacify GCC's warnings for `if () if () {} else {}'.
12599 * src/lex.c (parse_percent_token): Replace equal_offset with
12600 arg_offset.
12601 arg is const.
12602 Be sure to strdup `arg' when used, since there is no reason for
12603 token_buffer not to change.
12604
12605 2001-11-14 Akim Demaille <akim@epita.fr>
12606
12607 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
12608 definition.
12609 * src/main.c (main): Use them.
12610 Suggested by Hans Aberg.
12611
12612 2001-11-12 Akim Demaille <akim@epita.fr>
12613
12614 * src/system.h (ngettext): Now that we use ngettext, be sure to
12615 provide a default definition when NLS are not used.
12616
12617 2001-11-12 Akim Demaille <akim@epita.fr>
12618
12619 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
12620 Use @kbd to denote user input.
12621 (Language and Grammar): ANSIfy the example.
12622 Adjust its layout for info/notinfo.
12623 (Location Tracking Calc): Output error messages to stderr.
12624 Output locations in a more GNUtically correct way.
12625 Fix a couple of Englishos.
12626 Adjust @group/@end group pairs.
12627
12628 2001-11-12 Akim Demaille <akim@epita.fr>
12629
12630 %expect was not functioning at all.
12631
12632 * src/conflicts.c (expected_conflicts): Set to -1.
12633 (conflict_report): Use ngettext.
12634 (conflicts_print): Check %expect and make its violation an error.
12635 * doc/bison.texinfo (Expect Decl): Adjust.
12636 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
12637 * tests/regression.at (%expect not enough, %expect right)
12638 (%expect too much): New.
12639
12640 2001-11-12 Akim Demaille <akim@epita.fr>
12641
12642 * tests/regression.at (Conflicts): Rename as...
12643 (Unresolved SR Conflicts): this.
12644 (Solved SR Conflicts): New.
12645
12646 2001-11-12 Akim Demaille <akim@epita.fr>
12647
12648 * src/reduce.c (print_results): Rename as...
12649 (reduce_output): This.
12650 Output to OUT, passed as argument, instead of output_obstack.
12651 (dump_grammar): Likewise.
12652 (reduce_free): New.
12653 Also free V1.
12654 (reduce_grammar): No longer call reduce_output, since...
12655 * src/print.c (print_results): do it.
12656 * src/main.c (main): Call reduce_free;
12657
12658 2001-11-12 Akim Demaille <akim@epita.fr>
12659
12660 * src/conflicts.c (print_reductions): Accept OUT as argument.
12661 Output to it, not to output_obstack.
12662 * src/print.c (print_actions): Adjust.
12663
12664 2001-11-12 Akim Demaille <akim@epita.fr>
12665
12666 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
12667 the result instead of using...
12668 (src_total, rrc_total, src_count, rrc_count): Remove.
12669 (any_conflicts): Remove.
12670 (print_conflicts): Split into...
12671 (conflicts_print, conflicts_output): New.
12672 * src/conflicts.h: Adjust.
12673 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
12674 * src/print.c (print_grammar): Issue `\n' between two rules.
12675 * tests/regression.at (Conflicts): New.
12676 Reported by Tom Lane.
12677
12678 2001-11-12 Akim Demaille <akim@epita.fr>
12679
12680 * tests/regression.at (Invalid input): Remove, duplicate with
12681 ``Invalid input: 1''.
12682
12683 2001-11-12 Akim Demaille <akim@epita.fr>
12684
12685 * tests/torture.at (AT_DATA_STACK_TORTURE)
12686 (Exploding the Stack Size with Alloca)
12687 (Exploding the Stack Size with Malloc): New.
12688
12689 2001-11-12 Akim Demaille <akim@epita.fr>
12690
12691 * src/bison.simple (YYSTACK_REALLOC): New.
12692 (yyparse) [!yyoverflow]: Use it and free the old stack.
12693 Reported by Per Allansson.
12694
12695 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
12696
12697 * src/bison.simple: Define type yystype instead of YYSTYPE, and
12698 define CPP macro, which substitute YYSTYPE by yystype.
12699 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
12700 with yyltype/YYLTYPE. This allows inclusion of the generated
12701 header within the parser if the compiler, such as GGC, accepts
12702 multiple equivalent #defines.
12703 From Akim.
12704
12705 2001-11-05 Akim Demaille <akim@epita.fr>
12706
12707 * src/reader.c (symbols_output): New, extracted from...
12708 (packsymbols): here.
12709 (reader): Adjust.
12710
12711 2001-11-05 Akim Demaille <akim@epita.fr>
12712
12713 * src/lex.c (parse_percent_token): s/quotearg/quote/.
12714
12715 2001-11-05 Akim Demaille <akim@epita.fr>
12716
12717 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
12718 pattern.
12719
12720 2001-11-05 Akim Demaille <akim@epita.fr>
12721
12722 * src/options.h (struct option_table_struct): set_flags is void*.
12723 * src/options.c (longopts): Support `--output' and `%output'.
12724 (usage): Adjust.
12725 * src/lex.h (tok_setopt): Remove, replaced with...
12726 (tok_intopt, tok_stropt): these new guys.
12727 * src/lex.c (getopt.h): Not needed.
12728 (token_buffer, unlexed_token_buffer): Not const.
12729 (percent_table): Promote `-' over `_' in directive names.
12730 Active `%name-prefix', `file-prefix', and `output'.
12731 (parse_percent_token): Accept possible arguments to directives.
12732 Promote `-' over `_' in directive names.
12733
12734 2001-11-04 Akim Demaille <akim@epita.fr>
12735
12736 * doc/bison.texinfo (Decl Summary): Split the list into
12737 `directives for grammars' and `directives for bison'.
12738 Sort'em.
12739 Add description of `%name-prefix', `file-prefix', and `output'.
12740 Promote `-' over `_' in directive names.
12741 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
12742 Simplify the description of `--name-prefix'.
12743 Promote `-' over `_' in directive names.
12744 Promote `--output' over `--output-file'.
12745 Fix the description of `--defines'.
12746 * tests/output.at: Exercise %file-prefix and %output.
12747
12748 2001-11-02 Akim Demaille <akim@epita.fr>
12749
12750 * doc/refcard.tex: Update.
12751
12752 2001-11-02 Akim Demaille <akim@epita.fr>
12753
12754 * src/symtab.h (SUNDEF): New.
12755 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
12756 stand for `uninitialized', instead of 0.
12757 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
12758 * src/lex.c (lex): Adjust.
12759
12760 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
12761 Number it 0.
12762 Let yylex return it instead of a plain 0.
12763 Reported by Dick Streefland.
12764
12765 2001-11-02 Akim Demaille <akim@epita.fr>
12766
12767 * tests/regression.at (Mixing %token styles): New test.
12768
12769 2001-11-02 Akim Demaille <akim@epita.fr>
12770
12771 * src/reader.c (parse_thong_decl): Formatting changes.
12772 (token_translations_init): New, extracted from...
12773 (packsymbols): Here.
12774 Adjust.
12775
12776 2001-11-01 Akim Demaille <akim@epita.fr>
12777
12778 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
12779 Check that `9foo.y' produces correct cpp guards.
12780 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
12781 guards.
12782 Reported by Wwp.
12783
12784 2001-11-01 Akim Demaille <akim@epita.fr>
12785
12786 * tests/regression.at (Invalid input: 2): New.
12787 * src/lex.c (unlexed_token_buffer): New.
12788 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
12789 too.
12790 Reported by Wwp.
12791
12792 2001-11-01 Akim Demaille <akim@epita.fr>
12793
12794 * tests/calc.at: Catch up with 1.30.
12795 * configure.in: Bump to 1.49a.
12796 Adjust to newer Autotest.
12797
12798 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
12799
12800 * src/conflicts.c: Move global variables rrc_total and src_total ...
12801 (print_conflicts): here.
12802 * src/output.c (output): Free global variable user_toknums.
12803 * src/lex.c (token_obstack): Become static.
12804
12805 2001-10-18 Akim Demaille <akim@epita.fr>
12806
12807 * tests/atlocal.in (GCC): Add.
12808 * tests/calc.at: s/m4_match/m4_bmatch/.
12809 s/m4_patsubst/m4_bpatsubst/.
12810 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
12811 * configure.in: AC_SUBST(GCC).
12812
12813 2001-10-14 Marc Autret <autret_m@epita.fr>
12814
12815 * src/options.c (create_long_option_table): Fix.
12816
12817 2001-10-10 Akim Demaille <akim@epita.fr>
12818
12819 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
12820
12821 2001-10-04 Akim Demaille <akim@epita.fr>
12822
12823 * src/reader.c (parse_union_decl): Push the caracters in
12824 union_obstack, not attrs_obstack.
12825
12826 2001-10-04 Akim Demaille <akim@epita.fr>
12827
12828 Merge in the branch 1.29.
12829
12830 * src/reader.c (packsymbols): Use a temporary obstack for
12831 `%%tokendef', since output_stack is already used elsewhere.
12832
12833 2001-10-02 Akim Demaille <akim@epita.fr>
12834
12835 Bump 1.29d.
12836
12837 2001-10-02 Akim Demaille <akim@epita.fr>
12838
12839 Version 1.29c.
12840
12841 2001-10-02 Akim Demaille <akim@epita.fr>
12842
12843 * tests/regression.at (Invalid CPP headers): New.
12844 From Alexander Belopolsky.
12845 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
12846
12847 2001-10-02 Akim Demaille <akim@epita.fr>
12848
12849 * tests/regression.at (Invalid input): New.
12850 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
12851 Reported by Shura.
12852
12853 2001-10-02 Akim Demaille <akim@epita.fr>
12854
12855 * tests/calc.at: Now that --debug works, the tests must be adjusted.
12856
12857 2001-10-02 Akim Demaille <akim@epita.fr>
12858
12859 * src/output.c (output_parser): Assert `skeleton'.
12860 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
12861 systems.
12862 From Shura.
12863
12864 2001-10-01 Marc Autret <autret_m@epita.fr>
12865
12866 * src/lex.h: Echo modifications.
12867 * src/lex.c (unlex): Parameter is now token_t.
12868 From Hans Aberg.
12869
12870 2001-10-01 Marc Autret <autret_m@epita.fr>
12871
12872 * src/main.c: Include lex.h.
12873 From Hans Aberg.
12874
12875 2001-09-29 Akim Demaille <akim@epita.fr>
12876
12877 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
12878
12879 2001-09-28 Akim Demaille <akim@epita.fr>
12880
12881 * tests/testsuite.at: Update to newer Autotest.
12882 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
12883
12884 2001-09-27 Akim Demaille <akim@epita.fr>
12885
12886 Position independent wrapper.
12887
12888 * tests/bison: Remove.
12889 * tests/bison.in: New.
12890 * configure.in: Adjust.
12891
12892 2001-09-27 Paul Eggert <eggert@twinsun.com>
12893
12894 Port quotearg fixes from tar 1.13.24.
12895
12896 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
12897 tm to be declared.
12898 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
12899 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
12900
12901 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
12902 * m4/mbrtowc.m4: New file.
12903 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
12904 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
12905
12906 2001-09-27 Akim Demaille <akim@epita.fr>
12907
12908 Bump to 1.29c.
12909
12910 2001-09-27 Akim Demaille <akim@epita.fr>
12911
12912 Version 1.29b.
12913
12914 2001-09-25 Akim Demaille <akim@epita.fr>
12915
12916 * src/system.h: Include `xalloc.h'.
12917 Remove it from the C files.
12918 * src/files.c (output_files): Free the obstacks.
12919 * src/lex.c (init_lex): Rename as...
12920 (lex_init): this.
12921 (lex_free): New.
12922 * src/main.c (main): Use it.
12923
12924 2001-09-24 Marc Autret <autret_m@epita.fr>
12925
12926 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
12927 to output informations in fout (FILE*).
12928 (open_graph, close_graph): Likewise.
12929 (output_graph, output_edge, output_node): Likewise.
12930 * src/vcg.h: Update function prototypes.
12931 * src/print_graph.c (print_graph): Open output graph file.
12932 (print_actions): Adjust.
12933 * src/files.h: Remove extern declaration.
12934 * src/files.c: Remove graph_obstack declaration.
12935 (open_files): Remove graph_obstack initialization.
12936 (output_files): Remove graph_obstack saving.
12937
12938 2001-09-24 Marc Autret <autret_m@epita.fr>
12939
12940 * src/files.c (compute_output_file_names): Fix.
12941
12942 2001-09-24 Marc Autret <autret_m@epita.fr>,
12943 Akim Demaille <akim@epita.fr>
12944
12945 * src/reader.c (reader): Remove call to free_symtab ().
12946 * src/main.c (main): Call it here.
12947 Include symtab.h.
12948 * src/conflicts.c (initialize_conflicts): Rename as...
12949 (solve_conflicts): this.
12950 * src/print.c (print_core, print_actions, print_state)
12951 (print_grammar): Dump to a file instead a `output_obstack'.
12952 (print_results): Dump `output_obstack', and then proceed with the
12953 FILE *.
12954 * src/files.c (compute_output_file_names, close_files): New.
12955 (output_files): Adjust.
12956 * src/main.c (main): Adjust.
12957
12958 2001-09-23 Marc Autret <autret_m@epita.fr>
12959
12960 * src/files.c (compute_header_macro): Computes header macro name
12961 from spec_defines_file when given.
12962
12963 2001-09-23 Marc Autret <autret_m@epita.fr>
12964
12965 * src/files.c (output_files): Add default extensions.
12966
12967 2001-09-22 Akim Demaille <akim@epita.fr>
12968
12969 * src/conflicts.c (finalize_conflicts): Rename as...
12970 (free_conflicts): this.
12971
12972 2001-09-22 Akim Demaille <akim@epita.fr>
12973
12974 * src/gram.c (gram_free): Rename back as...
12975 (dummy): this.
12976 (output_token_translations): Free `token_translations'.
12977 * src/symtab.c (free_symtab): Free the tag field.
12978
12979 2001-09-22 Akim Demaille <akim@epita.fr>
12980
12981 Remove `translations' as it is always set to true.
12982
12983 * src/gram.h: Adjust.
12984 * src/reader.c (packsymbols, parse_token_decl): Adjust
12985 * src/print.c (print_grammar): Adjust.
12986 * src/output.c (output_token_translations): Adjust.
12987 * src/lex.c (lex): Adjust.
12988 * src/gram.c: Be sure the set pointers to NULL.
12989 (dummy): Rename as...
12990 (gram_free): this.
12991
12992 2001-09-22 Akim Demaille <akim@epita.fr>
12993
12994 * configure.in: Invoke AM_LIB_DMALLOC.
12995 * src/system.h: Use dmalloc.
12996 * src/LR0.c: Be sure to have pointers initialized to NULL.
12997 (allocate_itemsets): Allocate kernel_items only if needed.
12998
12999 2001-09-22 Akim Demaille <akim@epita.fr>
13000
13001 * configure.in: Bump to 1.29b.
13002 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
13003 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
13004 need xmalloc.c in calc.y.
13005 From Pascal Bart.
13006
13007 2001-09-21 Akim Demaille <akim@epita.fr>
13008
13009 Version 1.29a.
13010 * Makefile.maint, config/config.guess, config/config.sub,
13011 * config/missing: Update from masters.
13012 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
13013 upon package.m4.
13014 * configure.in (ALL_LINGUAS): Add `tr'.
13015
13016 2001-09-21 Akim Demaille <akim@epita.fr>
13017
13018 * tests/Makefile.am (package.m4): Move to...
13019 ($(srcdir)/$(TESTSUITE)): here.
13020
13021 2001-09-20 Akim Demaille <akim@epita.fr>
13022
13023 * src/complain.c: No longer try to be standalone: use system.h.
13024 Don't assume __STDC__ is defined to 1. Just test if it is defined.
13025 * src/complain.h: Likewise.
13026 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
13027 Remove the unused variable `n'.
13028 From Albert Chin-A-Young.
13029
13030 2001-09-18 Marc Autret <autret_m@epita.fr>
13031
13032 * doc/bison.1: Update.
13033 * doc/bison.texinfo (Bison Options): Update --defines and --graph
13034 descriptions.
13035 (Option Cross Key): Update.
13036 Add --graph.
13037
13038 2001-09-18 Marc Autret <autret_m@epita.fr>
13039
13040 * tests/regression.at: New test (comment in %union).
13041
13042 2001-09-18 Marc Autret <autret_m@epita.fr>
13043
13044 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
13045 do that.
13046 Reported by Keith Browne.
13047
13048 2001-09-18 Marc Autret <autret_m@epita.fr>
13049
13050 * tests/output.at: Add tests for --defines and --graph.
13051
13052 2001-09-18 Marc Autret <autret_m@epita.fr>
13053
13054 * tests/output.at: Removes tests of %{header,src}_extension features.
13055
13056 2001-09-18 Akim Demaille <akim@epita.fr>
13057
13058 * tests/Makefile.am (package.m4): New.
13059 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
13060 (_AT_CHECK_CALC_ERROR): Likewise.
13061 Factor the `, ' part of verbose error messages.
13062
13063 2001-09-18 Marc Autret <autret_m@epita.fr>
13064
13065 * src/getargs.c (longopts): Declare --defines and --graph as options
13066 with optional arguments.
13067 * src/files.h: Add extern declarations.
13068 * src/files.c (spec_graph_file, spec_defines_file): New.
13069 (output_files): Update.
13070 Remove CPP-outed code.
13071
13072 2001-09-18 Marc Autret <autret_m@epita.fr>
13073
13074 Turn off %{source,header}_extension feature.
13075
13076 * src/files.c (compute_exts_from_gf): Update.
13077 (compute_exts_from_src): Update.
13078 (output_files): CPP-out useless code.
13079 * src/files.h: Remove {header,source}_extension extern declarations.
13080 * src/reader.c (parse_dquoted_param): CPP-out.
13081 (parse_header_extension_decl): Remove.
13082 (parse_source_extension_decl): Remove.
13083 (read_declarations): Remove cases tok_{hdrext,srcext}.
13084 * src/lex.c (percent_table): Remove {header,source}_extension entries.
13085 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
13086
13087 2001-09-10 Akim Demaille <akim@epita.fr>
13088
13089 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
13090 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
13091 (AT_CHECK_OUTPUT): this.
13092 Merely check ls' exit status, its output is useless.
13093
13094 2001-09-10 Akim Demaille <akim@epita.fr>
13095
13096 * tests/calc.at: Use m4_match.
13097 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
13098
13099 2001-09-10 Marc Autret <autret_m@epita.fr>,
13100 Akim Demaille <akim@epita.fr>
13101
13102 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
13103 enum color_e.
13104 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
13105 to `normal'.
13106 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
13107 * src/lex.h: Adjust prototype.
13108 (token_t): Add `tok_undef'.
13109 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
13110 (parse_percent_token): Now returns token_t.
13111 Add default statement in switch.
13112 (lex): Separate `c' as an input variable, from the token_t result
13113 part.
13114 (unlexed): Is a token_t.
13115
13116 2001-09-10 Akim Demaille <akim@epita.fr>
13117
13118 * configure.in: Bump to 1.29a.
13119
13120 2001-09-07 Akim Demaille <akim@epita.fr>
13121
13122 Version 1.29.
13123
13124 2001-08-30 Akim Demaille <akim@epita.fr>
13125
13126 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
13127 * m4/atconfig.m4: Remove.
13128 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
13129 * tests/bison: New.
13130 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
13131 m4_if, m4_patsubst, and m4_regexp.
13132 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
13133 `input' file instead of echo.
13134
13135 2001-08-29 Akim Demaille <akim@epita.fr>
13136
13137 Bump to 1.28e.
13138
13139 2001-08-29 Akim Demaille <akim@epita.fr>
13140
13141 Version 1.28d.
13142
13143 2001-08-29 Paul Eggert <eggert@twinsun.com>
13144
13145 * src/bison.simple (yyparse): Don't take the address of an
13146 item before the start of an array, as that doesn't conform to
13147 the C Standard.
13148
13149 2001-08-29 Robert Anisko <anisko_r@epita.fr>
13150
13151 * doc/bison.texinfo (Location Tracking Calc): New node.
13152
13153 2001-08-29 Paul Eggert <eggert@twinsun.com>
13154
13155 * src/output.c (output): Do not define const, as this now
13156 causes more problems than it cures.
13157
13158 2001-08-29 Akim Demaille <akim@epita.fr>
13159
13160 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
13161 the nodes.
13162 Be sure to tag the `detailmenu'.
13163
13164 2001-08-29 Akim Demaille <akim@epita.fr>
13165
13166 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
13167 download in a tmp dir.
13168
13169 2001-08-28 Marc Autret <autret_m@epita.fr>
13170
13171 * config/depcomp: New file.
13172
13173 2001-08-28 Marc Autret <autret_m@epita.fr>
13174
13175 * doc/bison.1 (mandoc): Adjust.
13176 From Juan Manuel Guerrero.
13177
13178 2001-08-28 Marc Autret <autret_m@epita.fr>
13179
13180 * src/print_graph.c (print_state): Fix.
13181
13182 2001-08-27 Marc Autret <autret_m@epita.fr>
13183
13184 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
13185 char * members.
13186 Echo modifications to the functions prototypes.
13187 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
13188
13189 2001-08-27 Marc Autret <autret_m@epita.fr>
13190
13191 * src/vcg.c: Include `xalloc.h'.
13192 (add_colorentry): New.
13193 (add_classname): New.
13194 (add_infoname): New.
13195 * src/vcg.h: Add new prototypes.
13196
13197 2001-08-27 Akim Demaille <akim@epita.fr>
13198
13199 * Makefile.maint: Sync. again with CVS Autoconf.
13200
13201 2001-08-27 Akim Demaille <akim@epita.fr>
13202
13203 * Makefile.maint: Formatting changes.
13204 (po-update, cvs-update, update): New targets.
13205 (AMTAR): Remove.
13206
13207 2001-08-27 Akim Demaille <akim@epita.fr>
13208
13209 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
13210 * Makefile.maint: Sync. with CVS Autoconf.
13211
13212 2001-08-27 Marc Autret <autret_m@epita.fr>
13213
13214 * src/vcg.h (struct infoname_s): New.
13215 (struct colorentry_s): New.
13216 (graph_s): New fields {vertical,horizontal}_order in structure.
13217 Add `infoname' field.
13218 Add `colorentry' field;
13219 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
13220 (G_HORIZONTAL_ORDER): New.
13221 (G_INFONAME): New.
13222 (G_COLORENTRY): New.
13223 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
13224 Add output of `infoname'.
13225 Add output of `colorentry'.
13226
13227 2001-08-27 Marc Autret <autret_m@epita.fr>
13228
13229 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
13230 This one shadowed a global parameter.
13231
13232 2001-08-24 Marc Autret <autret_m@epita.fr>
13233
13234 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
13235 instead of `unsigned'.
13236 (print_state): Do not call obstack_object_size () in obstack_grow ()
13237 to avoid macro variables shadowing.
13238
13239 2001-08-23 Marc Autret <autret_m@epita.fr>
13240
13241 * src/lex.c (percent_table): Typo: s/naem/name/.
13242 Add graph option.
13243 Normalize new options declarations.
13244
13245 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
13246
13247 * tests/suite.at: Exercise %header_extension and %source_extension.
13248
13249 2001-08-16 Marc Autret <autret_m@epita.fr>
13250
13251 * src/reader.c (parse_dquoted_param): New.
13252 (parse_header_extension_decl): Use it.
13253 (parse_source_extension_decl): Likewise.
13254
13255 2001-08-16 Marc Autret <autret_m@epita.fr>
13256
13257 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
13258 (get_xxxx_str): Use assert () instead of complain ().
13259 Remove return invokations in default cases.
13260 (get_decision_str): Modify default behaviour. Remove second argument.
13261 Echo modifications on calls.
13262 (output_graph): Fix.
13263
13264 2001-08-16 Marc Autret <autret_m@epita.fr>
13265
13266 * src/getargs.c (usage): Update with ``-g, --graph''.
13267
13268 2001-08-16 Marc Autret <autret_m@epita.fr>
13269
13270 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
13271 (Option Cross Key): Likewise.
13272 * doc/bison.1: Update.
13273
13274 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
13275
13276 * src/output.c (output_master_parser): Don't finish action_obstack.
13277 (output_parser): Don't care about the muscle action, here.
13278 (prepare): Copy the action_obstack in the action muscle.
13279 (output): Free action_obstack.
13280
13281 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
13282
13283 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
13284 will contain `%union' declaration.
13285 (parse_union_decl): Delete #line directive output.
13286 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
13287 informations about %union.
13288 (parse_union_decl): Copy the union_obstack in the muscle stype.
13289 * src/bison.simple: Add new #line directive.
13290 Add typdef %%stype YYSTYPE.
13291
13292 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
13293
13294 * src/bison.simple: Add new `#line' directive.
13295
13296 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
13297
13298 * src/bison.simple: New `#line' directive.
13299 * src/output.c (output_parser): Support new dynamic muscle input_line.
13300
13301 2001-09-22 Marc Autret <autret_m@epita.fr>
13302
13303 * src/output.c (output_master_parser): New.
13304 (output_parser): Be more re-entrant.
13305
13306 2001-09-21 Marc Autret <autret_m@epita.fr>
13307
13308 * src/reader.c (copy_definition, parse_union_decl): Update and use
13309 `linef' muscle.
13310 (copy_action): Likewise.
13311 Use obstack_1grow ().
13312 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
13313
13314 2001-09-21 Marc Autret <autret_m@epita.fr>
13315
13316 * src/options.c (option_table): Adjust.
13317 * src/lex.c (parse_percent_token): Fix.
13318
13319 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
13320
13321 * src/options.c (symtab.h): Include it, need by lex.h.
13322
13323 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
13324
13325 * src/lex.c (parse_percent_token): Change type of variable `tx', which
13326 is now an option_table_struct*.
13327 (option_strcmp): New function option_strcmp.
13328 (parse_percent_token): Call option_strcmp.
13329 * src/getargs.c (xalloc.h, options.h): Include it.
13330 (getargs): Call create_long_option_table.
13331 (getargs): Free longopts at the end of the function.
13332 (shortopts): Move in options.c.
13333 * src/options.c (create_long_option_table): New function. Convert
13334 information from option_table to option structure.
13335 * src/reader.c (options.h): Include it.
13336
13337 * src/Makefile.am: Adjust.
13338 * src/options.c (option_table): Create from longopts and percent_table.
13339 * src/getargs.c (longopts): Delete.
13340 * src/lex.c (struct percent_table_struct): Delete.
13341 (percent_table): Delete.
13342 (options.h): Include it.
13343 * src/options.c: Create.
13344 * src/options.h: Create.
13345 Declare enum opt_access_e.
13346 Define struct option_table_struct.
13347
13348 2001-09-20 Marc Autret <autret_m@epita.fr>
13349
13350 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
13351 sections of Bison.
13352
13353 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
13354
13355 * src/bison.simple: s/%%filename/%%skeleton.
13356 * src/muscle_tab.c (getargs.h): Include it.
13357 (muscle_init): Insert new muscle skeleton.
13358
13359 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
13360
13361 * src/output.c (output_parser): Delete unused variable actions_dumped.
13362
13363 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
13364
13365 * src/output.c (output): Delete call to reader_output_yylsp.
13366 * src/reader.c (reader): Likewise.
13367 * src/reader.h: Delete declaration of reader_output_yylsp.
13368
13369 2001-09-02 Marc Autret <autret_m@epita.fr>
13370
13371 * src/reader.c: Include muscle_tab.h.
13372 (parse_union_decl): Update.
13373 (parse_macro_decl): Rename parse_muscle_decl.
13374 Update to use renamed functions and variable.
13375 (read_declarations, copy_action, read_additionnal_code, : Updated
13376 with correct variables and functions names.
13377 (packsymbols, reader): Likewise.
13378
13379 * src/reader.h (muscle_obstack): Extern declaration update.
13380
13381 * src/output.c: Include muscle_tab.h
13382 In all functions using macro_insert, change by using muscle_insert ().
13383 (macro_obstack): Rename muscle_obstack.
13384 Echo modifications in the whole file.
13385 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
13386 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
13387 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
13388
13389 * src/muscle_tab.h: Update double inclusion macros.
13390 (macro_entry_s): Rename muscle_entry_s.
13391 Update prototypes.
13392
13393 * src/muscle_tab.c: Include muscle_tab.h.
13394 Rename macro_tabble to muscle_table.
13395 (mhash1, mhash2, mcmp): Use muscle_entry.
13396 (macro_init): Rename muscle_init. Update.
13397 (macro_insert): Rename muscle_insert. Update.
13398 (macro_find): Rename muscle_find. Update.
13399
13400 * src/main.c: Include muscle_tab.h.
13401 (main): Call muscle_init ().
13402 * src/Makefile.am (bison_SOURCES): Echo modifications.
13403
13404 2001-09-02 Marc Autret <autret_m@epita.fr>
13405
13406 Now the files macro_tab.[ch] are named muscle_tab.[ch].
13407
13408 * src/muscle_tab.c, src/muscle_tab.h: Add files.
13409
13410 2001-09-02 Marc Autret <autret_m@epita.fr>
13411
13412 * src/macrotab.c, src/macrotab.h: Remove.
13413
13414 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
13415
13416 * src/reader.c (copy_guard): Use muscle to specify the `#line'
13417 filename.
13418
13419 2001-09-01 Marc Autret <autret_m@epita.fr>
13420
13421 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
13422 to an explicit value to activate the feature. We do it here.
13423
13424 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
13425
13426 * src/output.c (prepare): Delete the `filename' muscule insertion.
13427 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
13428 (parse_union_decl): Likewise.
13429 * src/macrotab.c (macro_init): Initialize filename by infile.
13430
13431 2001-08-31 Marc Autret <autret_m@epita.fr>
13432
13433 * src/bison.simple (YYLSP_NEEDED): New definition.
13434 * src/output.c (prepare): Add macro insertion of `locations_flag'
13435
13436 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
13437
13438 * src/output.c (prepare): Delete insertion of previous muscles,
13439 and insert the `prefix' muscles.
13440 * src/macrotab.c (macro_init): Likewise.
13441 (macro_init): Initialization prefix directive by `yy'.
13442 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
13443 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
13444 yylval, yydebug, yyerror, yynerrs and yyparse.
13445 New directive `#define' to substitute yydebug, ... with option
13446 name_prefix.
13447
13448 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
13449
13450 * src/main.c (main): Standardize.
13451 * src/output.c (output_table_data, output_parser): Likewise.
13452 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
13453
13454 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
13455
13456 * src/reader.c (read_additionnal_code): Rename %%user_code to
13457 %%epilogue.
13458 * src/output.c (output): Rename %%declarations to %%prologue.
13459 * src/bison.simple: Echo modifications.
13460
13461 2001-08-31 Marc Autret <autret_m@epita.fr>
13462
13463 * src/reader.c (readgram): CleanUp.
13464 (output_token_defines): Likewise.
13465 (packsymbols): Likewise.
13466 (reader): Likewise.
13467 * src/output.c (output): CPP-out useless code.
13468
13469 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
13470
13471 * src/reader.c (reader): Delete obsolete call to function
13472 output_trailers and output_headers.
13473 * src/output.h: Remove obsolete functions prototypes of output_headers
13474 and output_trailers.
13475
13476 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
13477
13478 * src/main.c: Include macrotab.h.
13479 * src/macrotab.h (macro_entry_s): Constify fields.
13480 Adjust functions prototypes.
13481 * src/macrotab.c (macro_insert): Constify key and value.
13482 (macro_find): Constify key.
13483 (macro_insert): Include 'xalloc.h'
13484 (macro_insert): Use XMALLOC.
13485 (macro_find): Constify return value.
13486 * src/output.c (output_table_data): Rename table to table_data.
13487 (output_parser): Constify macro_key, macro_value.
13488
13489 2001-08-30 Marc Autret <autret_m@epita.fr>
13490
13491 * src/reader.c (parse_skel_decl): New.
13492 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
13493 * src/lex.h (token_t): New token `tok_skel'.
13494 * src/lex.c (percent_table): Add skeleton option entry.
13495 Standardize.
13496
13497 2001-08-29 Marc Autret <autret_m@epita.fr>
13498
13499 * src/bison.simple: Add %%user_code directive at the end.
13500 * src/reader.c (read_additionnal_code): New.
13501 (reader): Use it.
13502 * src/output.c (output_program): Remove.
13503 (output): Update.
13504
13505 2001-08-28 Marc Autret <autret_m@epita.fr>
13506
13507 * src/output.c (output_actions): Clean up.
13508 (output_gram): CPP-out useless code.
13509 * src/reader.c (reader): Clean up, CPP-out useless code.
13510
13511 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
13512
13513 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
13514 directive.
13515 * src/bison.simple: Add `%%definitions'.
13516
13517 2001-08-28 Marc Autret <autret_m@epita.fr>
13518
13519 * config/depcomp: New file.
13520
13521 2001-08-27 Paul Eggert <eggert@twinsun.com>
13522
13523 * src/bison.simple (yyparse): Don't take the address of an
13524 item before the start of an array, as that doesn't conform to
13525 the C Standard.
13526
13527 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
13528
13529 * src/output.c (output): Remove the initialization of the macro
13530 obstack. It was done too late here.
13531
13532 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
13533 completely wrong.
13534 (reader): Initialize the macro obstack here, since we need it to grow
13535 '%define' directives.
13536
13537 * src/reader.h: Declare the macro obstack as extern.
13538
13539 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
13540
13541 * src/output.c (output_parser): Fix. Store single '%' characters in
13542 the output obstack instead of throwing them away.
13543
13544 2001-08-27 Akim Demaille <akim@epita.fr>
13545
13546 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
13547
13548 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13549
13550 * lib/Makefile.am: Adjust.
13551
13552 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13553
13554 * src/bison.simple: Update and add '%%' directives.
13555
13556 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13557
13558 * src/reader.c (reader): Remove calls to 'output_headers' and
13559 'output_trailers'. Remove some C output.
13560 (readgram): Disable a piece of code that was writing a default
13561 definition for 'YYSTYPE'.
13562 (reader_output_yylsp): Remove.
13563 (packsymbols): Output token defintions to a macro.
13564 (copy_definition): Disable C output.
13565
13566 * src/reader.c (parse_macro_decl): New function used to parse macro
13567 declarations.
13568 (copy_string2): Put the body of copy_string into this new function.
13569 Add a parameter to let the caller choose whether he wants to copy the
13570 string delimiters or not.
13571 (copy_string): Be a simple call to copy_string2 with the last argument
13572 bound to true.
13573 (read_declarations): Add case for macro definition.
13574 (copy_identifier): New.
13575 (parse_macro_decl): Read macro identifiers using copy_identifier
13576 rather than lex.
13577
13578 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13579
13580 * src/output.c (prepare): Add prefixed names.
13581 (output_parser): Output semantic actions.
13582 (output_parser): Fix bug on '%%line' directives.
13583
13584 * src/output.c (output_headers): Remove. The C code printed by this
13585 function should now be in the skeletons.
13586 (output_trailers): Remove.
13587 (output): Disable call to 'reader_output_yylsp'.
13588 (output_rule_data): Do not output tables to the table obstack.
13589
13590 * src/output.c: Remove some C dedicated output.
13591 Improve the use of macro and output obstacks.
13592 (output_defines): Remove.
13593
13594 * src/output.c (output_token_translations): Associate 'translate'
13595 table with a macro. No output to the table obstack.
13596 (output_gram): Same for 'rhs' and 'prhs'.
13597 (output_stos): Same for 'stos'.
13598 (output_rule_data): Same for 'r1' and 'r2'.
13599 (token_actions): Same for 'defact'.
13600 (goto_actions): Same for 'defgoto'.
13601 (output_base): Same for 'pact' and 'pgoto'.
13602 (output_table): Same for 'table'.
13603 (output_check): Same for 'check'.
13604
13605 * src/output.c (output_table_data): New function.
13606 (output_short_table): Remove.
13607 (output_short_or_char_table): Remove.
13608
13609 * src/output.c (output_parser): Replace most of the skeleton copy code
13610 with something new. Skeletons are now processed character by character
13611 rather than line by line, and Bison looks for '%%' macros. This is the
13612 first step in making Bison's output process (a lot) more flexible.
13613 (output_parser): Use the macro table.
13614
13615 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13616
13617 * src/main.c (main): Initialize the macro table.
13618
13619 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13620
13621 * src/lex.c (percent_table): Add tok_define.
13622 * src/lex.h: Add tok_define.
13623
13624 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13625
13626 * src/macrotab.c: New file.
13627 * src/macrotab.h: New file.
13628 * src/Makefile.am: Update.
13629
13630 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13631
13632 * lib/hash.c: New file.
13633 * lib/hash.h: New file.
13634 * lib/Makefile.am: Update.
13635
13636 2001-08-15 Akim Demaille <akim@epita.fr>
13637
13638 Version 1.28c.
13639
13640 2001-08-15 Marc Autret <autret_m@epita.fr>
13641
13642 * src/reader.c (readgram): Indent output macro YYSTYPE.
13643 (packsymbols): Likewise.
13644 (output_token_defines): Likewise.
13645 * src/files.c: Standardize.
13646 (compute_header_macro): New.
13647 (defines_obstack_save): New. Use compute_header_macro.
13648 (output_files): Update. Use defines_obstack_save.
13649
13650 2001-08-15 Akim Demaille <akim@epita.fr>
13651
13652 * doc/bison.texinfo (Table of Symbols): Document
13653 YYSTACK_USE_ALLOCA.
13654
13655 2001-08-15 Akim Demaille <akim@epita.fr>
13656
13657 * missing: Update from CVS Automake.
13658 * config/config.guess, config/config.sub, config/texinfo.tex:
13659 Update from gnu.org.
13660
13661 2001-08-15 Akim Demaille <akim@epita.fr>
13662
13663 * Makefile.maint: Sync with CVS Autoconf.
13664
13665 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
13666
13667 * doc/bison.texinfo: Include GNU Free Documentation License from
13668 `fdl.texi'.
13669 * doc/fdl.texi: Add to package.
13670
13671 2001-08-14 Marc Autret <autret_m@epita.fr>
13672
13673 Turn on %{source,header}_extension features.
13674
13675 * src/lex.c (percent_table): Un-CPP out header_extension and
13676 source_extension.
13677 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
13678 (compute_exts_from_src): Remove conditions. It restores priorities
13679 between options.
13680
13681 2001-08-14 Marc Autret <autret_m@epita.fr>
13682
13683 * src/files.c (compute_base_names): Add extensions computing when
13684 `--file-prefix' used.
13685 Standardize function calls.
13686
13687 2001-08-13 Marc Autret <autret_m@epita.fr>
13688
13689 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
13690 defining it (defined but null disables alloca).
13691
13692 2001-08-13 Marc Autret <autret_m@epita.fr>
13693
13694 * src/bison.simple (_yy_memcpy): CPP reformat.
13695
13696 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
13697
13698 * tests/atconfig.in (CPPFLAGS): Fix.
13699
13700 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
13701
13702 * doc/bison.texinfo: Include GNU General Public License from
13703 `gpl.texi'.
13704 * doc/gpl.texi: Add to package.
13705
13706 2001-08-10 Marc Autret <autret_m@epita.fr>
13707
13708 * src/print_graph.h: Fix.
13709 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
13710
13711 2001-08-10 Akim Demaille <akim@epita.fr>
13712
13713 * src/system.h: Provide default declarations for stpcpy, strndup,
13714 and strnlen.
13715
13716 2001-08-10 Robert Anisko <anisko_r@epita.fr>
13717
13718 * doc/bison.texinfo (Locations): Update @$ stuff.
13719
13720 2001-08-09 Robert Anisko <anisko_r@epita.fr>
13721
13722 * src/bison.simple (YYLLOC_DEFAULT): Update.
13723 (yyparse): Adjust.
13724
13725 2001-08-08 Marc Autret <autret_m@epita.fr>
13726
13727 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
13728 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
13729 Reported by Fabrice Bauzac.
13730
13731 2001-08-08 Marc Autret <autret_m@epita.fr>
13732
13733 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
13734 * src/vcg.c (output_node): Fix.
13735 * src/vcg.h: Cleanup.
13736 * src/print_graph.c: Add comments.
13737 (node_output_size): New global variable. Simplify the formatting of
13738 the VCG graph output.
13739 (print_actions): Unused code is now used. It notifies the final state
13740 and no action states in the VCG graph. It also give the reduce actions.
13741 The `shift and goto' edges are red and the `go to state' edges are
13742 blue.
13743 Get the current node name and node_obstack by argument.
13744 (node_obstack): New variable.
13745 (print_state): Manage node_obstack.
13746 (print_core): Use node_obstack given by argument.
13747 A node is not only computed here but in print_actions also.
13748 (print_graph): CPP out useless code instead of commenting it.
13749
13750 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
13751
13752 * tests/atconfig.in (CPPFLAGS): Fix.
13753
13754 2001-08-07 Akim Demaille <akim@epita.fr>
13755
13756 * src/print_graph.c (quote): New.
13757 (print_core): Use it.
13758
13759 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
13760
13761 * src/vcg.c (complain.h): Include it.
13762 Unepitaize `return' invocations.
13763 [NDEBUG] (main): Remove.
13764 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
13765 * src/files.c (open_files): Initialize graph_obstack.
13766 * src/print_graph.c (print_actions): CPP out useless code.
13767 (print_core): Don't output the last `\n' in labels.
13768 Use `quote'.
13769 * src/files.c (output_files): Output the VCG file.
13770 * src/main.c (main): Invoke print_graph ();
13771
13772 2001-08-06 Marc Autret <autret_m@epita.fr>
13773
13774 Automaton VCG graph output.
13775 Using option ``-g'' or long option ``--graph'', you can generate
13776 a gram_filename.vcg file containing a VCG description of the LALR (1)
13777 automaton of your grammar.
13778
13779 * src/main.c: Call to print_graph() function.
13780 * src/getargs.h: Update.
13781 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
13782 (graph_flag): New flag.
13783 (longopts): Update.
13784 (getargs): Add case `g'.
13785 * src/files.c (graph_obstack): New obstack struct.
13786 (open_files): Initialize new obstack.
13787 (output_files): Saves graph_obstack if required.
13788 * src/files.h (graph_obstack): New extern declaration.
13789 * src/Makefile.am: Add new source files.
13790
13791 2001-08-06 Marc Autret <autret_m@epita.fr>
13792
13793 * src/print_graph.c, src/print_graph.h (graph): New.
13794 * src/vcg.h: New file.
13795 * src/vcg.c: New file, VCG graph handling.
13796
13797 2001-08-06 Marc Autret <autret_m@epita.fr>
13798
13799 Add of %source_extension and %header_extension which specify
13800 the source or/and the header output file extension.
13801
13802 * src/files.c (compute_base_names): Remove initialisation of
13803 src_extension and header_extension.
13804 (compute_exts_from_gf): Update.
13805 (compute_exts_from_src): Update.
13806 (output_files): Update.
13807 * src/reader.c (parse_header_extension_decl): New.
13808 (parse_source_extension_decl): New.
13809 (read_declarations): New case statements for the new tokens.
13810 * src/lex.c (percent_table): Add entries for %source_extension
13811 and %header_extension.
13812 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
13813
13814 2001-08-06 Marc Autret <autret_m@epita.fr>
13815
13816 * configure.in: Bump to 1.28c.
13817 * doc/bison.texinfo: Texinfo thingies.
13818
13819 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
13820
13821 * tests/atconfig.in (CPPFLAGS): Add.
13822 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
13823
13824 2001-08-03 Akim Demaille <akim@epita.fr>
13825
13826 Version 1.28b.
13827
13828 2001-08-03 Akim Demaille <akim@epita.fr>
13829
13830 * tests/Makefile.am (check-local): Ship testsuite.
13831 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
13832 Include `string.h'.
13833
13834 2001-08-03 Akim Demaille <akim@epita.fr>
13835
13836 * configure.in: Try using -Wformat when compiling.
13837
13838 2001-08-03 Akim Demaille <akim@epita.fr>
13839
13840 * configure.in: Bump to 1.28b.
13841
13842 2001-08-03 Akim Demaille <akim@epita.fr>
13843
13844 * src/complain.c: Adjust strerror_r portability issues.
13845
13846 2001-08-03 Akim Demaille <akim@epita.fr>
13847
13848 Version 1.28a.
13849
13850 2001-08-03 Akim Demaille <akim@epita.fr>
13851
13852 * src/getargs.c, src/getarg.h (skeleton)): Constify.
13853 * src/lex.c (literalchar): Avoid name clashes on `buf'.
13854 * src/getargs.c: Include complain.h.
13855 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
13856 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
13857
13858 2001-08-03 Akim Demaille <akim@epita.fr>
13859
13860 * src/reader.c (readgram): Display hidden chars in error messages.
13861
13862 2001-08-03 Akim Demaille <akim@epita.fr>
13863
13864 Update to gettext 0.10.39.
13865
13866 2001-08-03 Akim Demaille <akim@epita.fr>
13867
13868 * lib/strspn.c: New.
13869
13870 2001-08-01 Marc Autret <autret_m@epita.fr>
13871
13872 * doc/bison.texinfo: Update.
13873 * doc/bison.1 (mandoc): Update.
13874 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
13875 * src/files.c: Support output files extensions computing.
13876 (src_extension): New static variable.
13877 (header_extension): New static variable.
13878 (tr): New function.
13879 (get_extension_index): New function, gets the index of an extension
13880 filename in a string.
13881 (compute_exts_from_gf): New function, computes extensions from the
13882 grammar file extension.
13883 (compute_exts_from_src): New functions, computes extensions from the
13884 C source file extension, file given by ``-o'' option.
13885 (compute_base_names): Update.
13886 (output_files): Update.
13887
13888 2001-08-01 Robert Anisko <anisko_r@epita.fr>
13889
13890 * doc/bison.texi: Document @$.
13891 (Locations): New section.
13892
13893 2001-07-18 Akim Demaille <akim@epita.fr>
13894
13895 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
13896 * config/prev-version.txt, config/move-if-change: New.
13897 * Makefile.am: Adjust.
13898
13899 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
13900
13901 * src/bison.simple (yyparse): Suppress warning `comparaison
13902 between signed and unsigned'.
13903
13904 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
13905
13906 * src/getargs.h (raw_flag): Remove.
13907 * src/getargs.c: Die on `-r'/`--raw'.
13908 * src/lex.c (parse_percent_token): Die on `%raw'.
13909 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
13910 * tests/calc.at: Suppress test with option `--raw'.
13911
13912 2001-07-14 Akim Demaille <akim@epita.fr>
13913
13914 * config/: New.
13915 * configure.in: Require Autoconf 2.50.
13916 Update to gettext 0.10.38.
13917
13918 2001-03-16 Akim Demaille <akim@epita.fr>
13919
13920 * doc/bison.texinfo: ANSIfy the examples.
13921
13922 2001-03-16 Akim Demaille <akim@epita.fr>
13923
13924 * getargs.c (skeleton): New variable.
13925 (longopts): --skeleton is a new option.
13926 (shortopts, getargs): -S is a new option.
13927 * getargs.h: Declare skeleton.
13928 * output.c (output_parser): Use it.
13929
13930 2001-03-16 Akim Demaille <akim@epita.fr>
13931
13932 * m4/strerror_r.m4: New.
13933 * m4/error.m4: Run AC_FUNC_STRERROR_R.
13934 * lib/error.h, lib/error.c: Update.
13935
13936 2001-03-16 Akim Demaille <akim@epita.fr>
13937
13938 * src/getargs.c (longopts): Clean up.
13939
13940 2001-02-21 Akim Demaille <akim@epita.fr>
13941
13942 * src/reader.c (gensym): `gensym_count' is your own.
13943 Use a static buf to create the symbol name, as token_buffer is no
13944 longer a buffer.
13945
13946 2001-02-08 Akim Demaille <akim@epita.fr>
13947
13948 * src/conflicts.c (conflict_report): Be sure not to append to res
13949 between two calls, which could happen if both first sprintf were
13950 skipped, but not the first cp += strlen.
13951
13952 2001-02-08 Akim Demaille <akim@epita.fr>
13953
13954 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
13955 New, from fileutils 4.0.37.
13956 * configure.in: Require Autoconf 2.49c. I took some time before
13957 making this decision. This is the only way out for portability
13958 issues in Bison, it would mean way too much duplicate effort to
13959 import in Bison features implemented in 2.49c since 2.13.
13960 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
13961
13962 2001-02-02 Akim Demaille <akim@epita.fr>
13963
13964 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
13965 * lib/xalloc.h, lib/xmalloc.c: Update.
13966
13967 2001-01-19 Akim Demaille <akim@epita.fr>
13968
13969 Get rid of the ad hoc handling of token_buffer in the scanner: use
13970 the obstacks.
13971
13972 * src/lex.c (token_obstack): New.
13973 (init_lex): Initialize it. No longer call...
13974 (grow_token_buffer): this. Remove it.
13975 Adjust all the places which used it to use the obstack.
13976
13977 2001-01-19 Akim Demaille <akim@epita.fr>
13978
13979 * src/lex.h: Rename all the tokens:
13980 s/\bENDFILE\b/tok_eof/g;
13981 s/\bIDENTIFIER\b/tok_identifier/g;
13982 etc.
13983 Let them be enums, not #define, to ease debugging.
13984 Adjust all the code.
13985
13986 2001-01-18 Akim Demaille <akim@epita.fr>
13987
13988 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
13989 * src/lex.c (maxtoken, grow_token_buffer): Static.
13990
13991 2001-01-18 Akim Demaille <akim@epita.fr>
13992
13993 Since we now use obstacks, more % directives can be enabled.
13994
13995 * src/lex.c (percent_table): Also accept `%yacc',
13996 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
13997 `%debug'.
13998 Handle the actions for `%semantic_parser' and `%pure_parser' here,
13999 instead of returning a token.
14000 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
14001 * src/reader.c (read_declarations): Adjust.
14002 * src/files.c (open_files): Don't call `compute_base_names', don't
14003 compute `attrsfile' since they depend upon data which might be
14004 *in* the input file now.
14005 (output_files): Do it here.
14006 * src/output.c (output_headers): Document the fact that this patch
14007 introduces a guaranteed SEGV for semantic parsers.
14008 * doc/bison.texinfo: Document them.
14009 * tests/suite.at: Exercise these %options.
14010
14011 2000-12-20 Akim Demaille <akim@epita.fr>
14012
14013 Also handle the output file (--verbose) with obstacks.
14014
14015 * files.c (foutput): Remove.
14016 (output_obstack): New.
14017 Adjust all dependencies.
14018 * src/conflicts.c: Return a string.
14019 * src/system.h (obstack_grow_string): Rename as...
14020 (obstack_sgrow): this. Be ready to work with non literals.
14021 (obstack_fgrow4): New.
14022
14023 2000-12-20 Akim Demaille <akim@epita.fr>
14024
14025 * src/files.c (open_files): Fix the computation of short_base_name
14026 in the case of `-o foo.tab.c'.
14027
14028 2000-12-20 Akim Demaille <akim@epita.fr>
14029
14030 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
14031 (copy_dollar): Now that everything uses obstacks, get rid of the
14032 FILE * parameters.
14033
14034 2000-12-20 Akim Demaille <akim@epita.fr>
14035
14036 * src/files.c (open_files): Actually the `.output' file is based
14037 on the short_base_name, not base_name.
14038 * tests/suite.at (Checking output file names): Adjust.
14039
14040 2000-12-20 Akim Demaille <akim@epita.fr>
14041
14042 * src/bison.s1: Remove, we now use directly...
14043 * src/bison.simple: this.
14044 * src/Makefile.am: Use pkgdata instead of data.
14045
14046 2000-12-20 Akim Demaille <akim@epita.fr>
14047
14048 * src/files.c (guard_obstack): New.
14049 (open_files): Initialize it.
14050 (output_files): Dump it...
14051 * src/files.h: Export it.
14052 * src/reader.c (copy_guard): Use it.
14053
14054 2000-12-19 Akim Demaille <akim@epita.fr>
14055
14056 * src/files.c (outfile, defsfile, actfile): Removed as global
14057 vars.
14058 (open_files): Don't compute them.
14059 (output_files): Adjust.
14060 (base_name, short_base_name): Be global.
14061 Adjust dependencies.
14062
14063 2000-12-19 Akim Demaille <akim@epita.fr>
14064
14065 * src/files.c (strsuffix): New.
14066 (stringappend): Be just like strcat but allocate.
14067 (base_names): Eve out from open_files.
14068 Try to simplify the rather hairy computation of base_name and
14069 short_base_name.
14070 (open_files): Use it.
14071 * tests/suite.at (Checking output file names): New test.
14072
14073 2000-12-19 Akim Demaille <akim@epita.fr>
14074
14075 * src/system.h (obstack_grow_literal_string): Rename as...
14076 (obstack_grow_string): this.
14077 * src/output.c (output_parser): Recognize `%% actions' instead of
14078 `$'.
14079 * src/bison.s1: s/$/%% actions/.
14080 * src/bison.hairy: Likewise.
14081
14082 2000-12-19 Akim Demaille <akim@epita.fr>
14083
14084 * src/output.c (output_parser): Compute the `#line' lines when
14085 there are.
14086 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
14087 Suggested by Hans Aberg.
14088
14089 2000-12-19 Akim Demaille <akim@epita.fr>
14090
14091 Let the handling of the skeleton files be local to the procedures
14092 that use it.
14093
14094 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
14095 longer static.
14096 (fparser, open_extra_files): Remove.
14097 (open_files, output_files): Don't take care of fparser.
14098 * src/files.h: Adjust.
14099 * src/output.c (output_parser): Open and close the file to the
14100 skeleton.
14101 * src/reader.c (read_declarations): When %semantic_parser, open
14102 fguard.
14103
14104 2000-12-19 Akim Demaille <akim@epita.fr>
14105
14106 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
14107 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
14108
14109 2000-12-19 Akim Demaille <akim@epita.fr>
14110
14111 * src/files.c (open_files): Yipee! We no longer need all the code
14112 looking for `/tmp' since we have no tmp file.
14113
14114 2000-12-19 Akim Demaille <akim@epita.fr>
14115
14116 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
14117 New macros.
14118 * src/files.c (open_files): Less dependency on MSDOS etc.
14119
14120 2000-12-14 Akim Demaille <akim@epita.fr>
14121
14122 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
14123 Provide a default definition.
14124 Use it when executing the default @ action.
14125 * src/reader.c (reader_output_yylsp): No longer include
14126 `timestamp' and `text' in the default YYLTYPE.
14127
14128 2000-12-12 Akim Demaille <akim@epita.fr>
14129
14130 * src/reader.c (copy_definition, parse_union_decl, copy_action)
14131 (copy_guard): Quote the file names.
14132 Reported by Laurent Mascherpa.
14133
14134 2000-12-12 Akim Demaille <akim@epita.fr>
14135
14136 * src/output.c (output_headers, output_program, output): Be sure
14137 to escape special characters when outputting filenames.
14138 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
14139 (output_headers): Don't depend on them, Use ACTSTR.
14140
14141 2000-11-17 Akim Demaille <akim@epita.fr>
14142
14143 * lib/obstack.h: Formatting changes.
14144 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
14145 prevents type checking.
14146 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
14147 cast the value to (void *): assigning a `foo *' to a `void *'
14148 variable is valid.
14149 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
14150 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
14151 append characters.
14152
14153 2000-11-17 Akim Demaille <akim@epita.fr>
14154
14155 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
14156 as...
14157 (suite.m4, regression.m4, calc.m4): these.
14158 * tests/atgeneral.m4: Update from CVS Autoconf.
14159
14160 2000-11-17 Akim Demaille <akim@epita.fr>
14161
14162 * tests/regression.m4 (%union and --defines): New test,
14163 demonstrating a current bug in the obstack implementation.
14164
14165 2000-11-17 Akim Demaille <akim@epita.fr>
14166
14167 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
14168 macros.
14169 Use them to declare the variables which are global or local to
14170 `yyparse'.
14171
14172 2000-11-17 Akim Demaille <akim@epita.fr>
14173
14174 * acconfig.h: Remove, no longer used.
14175
14176 2000-11-07 Akim Demaille <akim@epita.fr>
14177
14178 * src: s/Copyright (C)/Copyright/g.
14179
14180 2000-11-07 Akim Demaille <akim@epita.fr>
14181
14182 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
14183 defining.
14184 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
14185
14186 2000-11-07 Akim Demaille <akim@epita.fr>
14187
14188 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
14189 Merge in a single CPP if/else.
14190
14191 2000-11-07 Akim Demaille <akim@epita.fr>
14192
14193 * src/output.c (output): Remove useless variables.
14194 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
14195 argument `data' for consistency with the prototypes.
14196 Qualify it `const'.
14197 (obstack_copy, obstack_copy0): Rename the second argument as
14198 `address' for consistency. Qualify it `const'.
14199 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
14200 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
14201 `const' their input argument (`data' or `address').
14202 Adjust the corresponding macros to include `const' in casts.
14203
14204 2000-11-03 Akim Demaille <akim@epita.fr>
14205
14206 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
14207 s/PFILE1/BISON_HAIRY/.
14208 Adjust dependencies.
14209
14210 2000-11-03 Akim Demaille <akim@epita.fr>
14211
14212 For some reason, this was not applied.
14213
14214 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
14215 `unlink': it's no longer used.
14216
14217 2000-11-03 Akim Demaille <akim@epita.fr>
14218
14219 * src/files.c (skeleton_find): New function, eved out of...
14220 (open_files, open_extra_files): here.
14221
14222 2000-11-03 Akim Demaille <akim@epita.fr>
14223
14224 Don't use `atexit'.
14225
14226 * src/files.c (obstack_save): New function.
14227 (done): Rename as...
14228 (output_files): this.
14229 Use `obstack_save'.
14230 * src/main.c (main): Don't use `atexit' to register `done', since
14231 it no longer has to remove tmp files, just call `output_files'
14232 when there are no errors.
14233
14234 2000-11-02 Akim Demaille <akim@epita.fr>
14235
14236 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
14237 `unlink': it's no longer used.
14238 * src/files.h: Formatting changes.
14239
14240 2000-11-02 Akim Demaille <akim@epita.fr>
14241
14242 Remove the last uses of mktemp and unlink/delete.
14243
14244 * src/files.c (fdefines, ftable): Removed.
14245 (defines_ostack, table_obstack): New.
14246 Adjust dependencies of the former into uses of the latter.
14247 * src/output.c (output_short_or_char_table, output_short_table):
14248 Convert to using obstacks.
14249 * src/reader.c (copy_comment2): Accept one FILE * and two
14250 obstacks.
14251 (output_token_defines, reader_output_yylsp): Use obstacks.
14252 * src/system.h (obstack_fgrow3): New.
14253 * po/POTFILES.in: Adjust.
14254
14255 2000-11-01 Akim Demaille <akim@epita.fr>
14256
14257 Change each use of `fattrs' into a use of `attrs_obstack'.
14258
14259 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
14260 * src/files.c (fattrs): Remove.
14261 (attrs_obstack): New.
14262 Adjust all dependencies.
14263 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
14264
14265 2000-11-01 Akim Demaille <akim@epita.fr>
14266
14267 Introduce obstacks.
14268 Change each use of `faction' into a use of `action_obstack'.
14269
14270 * lib/obstack.h, lib/obstack.c: New files.
14271 * src/files.c (faction): Remove.
14272 (action_obstack): New.
14273 Adjust all dependencies.
14274
14275 2000-10-20 Akim Demaille <akim@epita.fr>
14276
14277 * lib/quote.h (PARAMS): New macro. Use it.
14278
14279 2000-10-16 Akim Demaille <akim@epita.fr>
14280
14281 * src/output.c (output_short_or_char_table): New function.
14282 (output_short_table, output_token_translations): Use it.
14283 (goto_actions): Use output_short_table.
14284
14285 2000-10-16 Akim Demaille <akim@epita.fr>
14286
14287 * src/symtab.c (bucket_new): New function.
14288 (getsym): Use it.
14289
14290 * src/output.c (output_short_table): New argument to display the
14291 comment associated with the table.
14292 Adjust dependencies.
14293 (output_gram): Use it.
14294 (output_rule_data): Nicer output layout for YYTNAME.
14295
14296 2000-10-16 Akim Demaille <akim@epita.fr>
14297
14298 * src/lex.c (read_typename): New function.
14299 (lex): Use it.
14300 * src/reader.c (copy_dollar): Likewise.
14301
14302 2000-10-16 Akim Demaille <akim@epita.fr>
14303
14304 * src/reader.c (copy_comment2): Expect the input stream to be on
14305 the `/' which is suspected to open a comment, instead of being
14306 called after `//' or `/*' was read.
14307 (copy_comment, copy_definition, parse_union_decl, copy_action)
14308 (copy_guard): Adjust.
14309
14310 2000-10-16 Akim Demaille <akim@epita.fr>
14311
14312 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
14313 `read_signed_integer'.
14314
14315 2000-10-16 Akim Demaille <akim@epita.fr>
14316
14317 * src/reader.c (copy_dollar): New function.
14318 (copy_guard, copy_action): Use it.
14319
14320 2000-10-16 Akim Demaille <akim@epita.fr>
14321
14322 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
14323 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
14324 New files, from Fileutils 4.0.27.
14325 * src/main.c (printable_version): Remove.
14326 * src/lex.c, src/reader.c: Use `quote'.
14327
14328 2000-10-04 Akim Demaille <akim@epita.fr>
14329
14330 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
14331
14332 2000-10-04 Akim Demaille <akim@epita.fr>
14333
14334 * doc/bison.texinfo: Various typos spotted by Neil Booth.
14335
14336 2000-10-04 Akim Demaille <akim@epita.fr>
14337
14338 When a literal string is used to define two different tokens,
14339 `bison -v' segfaults.
14340 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
14341
14342 * tests/regression.m4: New file.
14343 Include the core of the sample provided by Piotr Gackiewicz.
14344 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
14345 properly.
14346
14347 2000-10-04 Akim Demaille <akim@epita.fr>
14348
14349 * src/reader.c (parse_expect_decl): Keep `count' within the size
14350 of `buffer'.
14351 From Neil Booth.
14352
14353 2000-10-02 Paul Eggert <eggert@twinsun.com>
14354
14355 * bison.s1 (yyparse): Assign the default value
14356 unconditionally, to avoid a GCC warning and make the parser a
14357 tad smaller.
14358
14359 2000-10-02 Akim Demaille <akim@epita.fr>
14360
14361 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
14362 options.
14363
14364 2000-10-02 Akim Demaille <akim@epita.fr>
14365
14366 * src/derives.c, src/print.c, src/reduce.c: To ease the
14367 translation, move some `\n' out of the translated strings.
14368
14369 2000-10-02 Akim Demaille <akim@epita.fr>
14370
14371 The location tracking mechanism is precious for parse error
14372 messages. Nevertheless, it is enabled only when `@n' is used in
14373 the grammar, which is a different issue (you can use it in error
14374 message, but not in the grammar per se). Therefore, there should
14375 be another means to enable it.
14376
14377 * src/getargs.c (getargs): Support `--locations'.
14378 (usage): Report it.
14379 * src/getargs.h (locationsflag): Export it.
14380 * src/lex.c (percent_table): Support `%locations'.
14381 * src/reader.c (yylsp_needed): Remove this variable, now replaced
14382 with `locationsflag'.
14383 * doc/bison.texinfo: Document `--locations' and `%locations'.
14384 Sort the options.
14385 * tests/calc.m4: Test it.
14386
14387 For regularity of the names, replace each
14388 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
14389 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
14390 In addition replace each `flag' with `_flag'.
14391
14392 2000-10-02 Akim Demaille <akim@epita.fr>
14393
14394 Also test parse error messages, including with YYERROR_VERBOSE.
14395
14396 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
14397 associative).
14398 Use it to check the computations.
14399 Use it to check `nonassoc' is honored.
14400 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
14401 `--yyerror-verbose'.
14402 (_AT_CHECK_CALC): Adjust to this option.
14403 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
14404
14405 2000-10-02 Akim Demaille <akim@epita.fr>
14406
14407 Test also `--verbose', `--defines' and `--name-prefix'. Testing
14408 the latter demonstrates a flaw in the handling of non debugging
14409 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
14410 was used in order to simplify:
14411
14412 #if YYDEBUG
14413 if (yydebug)
14414 {
14415 ...
14416 }
14417 #endif
14418
14419 into
14420
14421 if (yydebug)
14422 {
14423 ...
14424 }
14425
14426 unfortunately this leads to a CPP conflict when
14427 `--name-prefix=foo' is used since it produces `#define yydebug
14428 foodebug'.
14429
14430 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
14431 (YYDPRINTF): New macro.
14432 Spread its use.
14433 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
14434 the bison options.
14435 Also test `--verbose', `--defines' and `--name-prefix'.
14436
14437 2000-10-02 Akim Demaille <akim@epita.fr>
14438
14439 Improve the readability of the produced parsers.
14440
14441 * src/bison.s1: Formatting changes.
14442 Improve the comment related to the `$' mark.
14443 (yydefault): Don't fall through to `yyresume': `goto' there.
14444 * src/output.c (output_parser): When the `$' is met, skip the end
14445 of its line.
14446 New variable, `number_of_dollar_signs', to check there's exactly
14447 one `$' in the parser skeleton.
14448
14449 2000-10-02 Akim Demaille <akim@epita.fr>
14450
14451 * lib/xstrdup.c: New file, from the fileutils.
14452 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
14453 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
14454 instead of strlen + xmalloc + strcpy.
14455 * src/symtab.c (copys): Remove, use xstrdup instead.
14456
14457 2000-10-02 Akim Demaille <akim@epita.fr>
14458
14459 * src/gram.h (associativity): New enum type which replaces the
14460 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
14461 `right_assoc', `left_assoc' and `non_assoc'.
14462 Adjust all dependencies.
14463 * src/reader.c: Formatting changes.
14464 (LTYPESTR): Don't define it, use it as a literal in
14465 `reader_output_yylsp'.
14466 * src/symtab.h (symbol_class): New enum type which replaces the
14467 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
14468 `sunknown', `stoken and `snterm'.
14469
14470 2000-10-02 Akim Demaille <akim@epita.fr>
14471
14472 * src/getargs.c (fixed_outfiles): Rename as...
14473 (yaccflag): for consistency and accuracy.
14474 Adjust dependencies.
14475
14476 2000-10-02 Akim Demaille <akim@epita.fr>
14477
14478 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
14479 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
14480 difficult and introduced a lot of core dump. It turns out that
14481 Bison used an implementation of `xmalloc' based on `calloc', and
14482 at various places it does depend upon the initialization to 0. I
14483 have not tried to isolate the pertinent places, and all the former
14484 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
14485 someone should address this issue.
14486
14487 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
14488 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
14489 files.
14490 Adjust dependencies.
14491 * src/warshall.h: New file.
14492 Propagate.
14493
14494 2000-10-02 Akim Demaille <akim@epita.fr>
14495
14496 Various anti-`extern in *.c' changes.
14497
14498 * src/system.h: Include `assert.h'.
14499
14500 2000-10-02 Akim Demaille <akim@epita.fr>
14501
14502 * src/state.h (nstates, final_state, first_state, first_shift)
14503 (first_reduction): Move their exportation from here...
14504 * src/LR0.h: to here.
14505 Adjust dependencies.
14506 * src/getargs.c (statisticsflag): New variable.
14507 Add support for `--statistics'.
14508 Adjust dependencies.
14509
14510 Remove a lot of now useless `extern' statements in most files.
14511
14512 2000-10-02 Akim Demaille <akim@epita.fr>
14513
14514 * src/LR0.h: New file.
14515 Propagate its use.
14516
14517 2000-10-02 Akim Demaille <akim@epita.fr>
14518
14519 * src/print.h: New file.
14520 Propagate its use.
14521 * src/print.c: Formatting and ordering changes.
14522 (verbose, terse): Replace with...
14523 (print_results): this new function.
14524 Adjust dependencies.
14525
14526 2000-10-02 Akim Demaille <akim@epita.fr>
14527
14528 * src/conflicts.c (conflict_report): New function.
14529 (conflict_log, verbose_conflict_log): Replace with...
14530 (print_conflicts): this function.
14531 Adjust dependencies.
14532 * src/conflicts.h: New file.
14533 Propagate its inclusion.
14534
14535 2000-10-02 Akim Demaille <akim@epita.fr>
14536
14537 * src/nullable.h: New file.
14538 Propagate its inclusion.
14539 * src/nullable.c: Formatting changes.
14540
14541 2000-10-02 Akim Demaille <akim@epita.fr>
14542
14543 * src/reduce.h: New file.
14544 Propagate its inclusion.
14545 * src/reduce.c: Topological sort and other formatting changes.
14546 (bool, TRUE, FALSE): Move their definition to...
14547 * src/system.h: here.
14548
14549 2000-10-02 Akim Demaille <akim@epita.fr>
14550
14551 * src/files.c: Formatting changes.
14552 (tryopen, tryclose, openfiles): Rename as...
14553 (xfopen, xfclose, open_files): this.
14554 (stringappend): static.
14555 * src/files.h: Complete the list of exported symbols.
14556 Propagate its use.
14557
14558 2000-10-02 Akim Demaille <akim@epita.fr>
14559
14560 * src/reader.h: New file.
14561 Propagate its use instead of tedious list of `extern' and
14562 prototypes.
14563 * src/reader.c: Formatting changes, topological sort,
14564 s/register//.
14565
14566 2000-10-02 Akim Demaille <akim@epita.fr>
14567
14568 * src/lex.h: Prototype `lex.c' exported functions.
14569 * src/reader.c: Adjust.
14570 * src/lex.c: Formatting changes.
14571 (safegetc): Rename as...
14572 (xgetc): this.
14573
14574 2000-10-02 Akim Demaille <akim@epita.fr>
14575
14576 * src/lalr.h: New file.
14577 Propagate its inclusion instead of prototypes and `extern'.
14578 * src/lalr.c: Formatting changes, topological sorting etc.
14579
14580 2000-10-02 Akim Demaille <akim@epita.fr>
14581
14582 * src/output.c (token_actions): Introduce a temporary array,
14583 YYDEFACT, that makes it possible for this function to use
14584 output_short_table.
14585
14586 2000-10-02 Akim Demaille <akim@epita.fr>
14587
14588 `user_toknums' is output as a `short[]' in `output.c', while it is
14589 defined as a `int[]' in `reader.c'. For consistency with the
14590 other output tables, `user_toknums' is now defined as a table of
14591 shorts.
14592
14593 * src/reader.c (user_toknums): Be a short table instead of an int
14594 table.
14595 Adjust dependencies.
14596
14597 Factor the short table outputs.
14598
14599 * src/output.c (output_short_table): New function.
14600 * src/output.c (output_gram, output_stos, output_rule_data)
14601 (output_base, output_table, output_check): Use it.
14602
14603 2000-10-02 Akim Demaille <akim@epita.fr>
14604
14605 * src/output.c (output): Topological sort of the functions, in
14606 order to get rid of the `static' prototypes.
14607 No longer use `register'.
14608 * src/output.h: New file.
14609 Propagate its inclusion in files explicitly prototyping functions
14610 from output.c.
14611
14612 2000-09-21 Akim Demaille <akim@epita.fr>
14613
14614 * src/atgeneral.m4: Update from Autoconf.
14615
14616 2000-09-21 Akim Demaille <akim@epita.fr>
14617
14618 * src/closure.h: New file.
14619 * src/closure.c: Formatting changes, topological sort over the
14620 functions, use of closure.h.
14621 (initialize_closure, finalize_closure): Rename as...
14622 (new_closure, free_closure): these. Adjust dependencies.
14623 * src/LR0.c: Formatting changes, topological sort, use of
14624 cloture.h.
14625 (initialize_states): Rename as...
14626 (new_states): this.
14627 * src/Makefile.am (noinst_HEADERS): Adjust.
14628
14629 2000-09-20 Akim Demaille <akim@epita.fr>
14630
14631 * src/acconfig.h: Don't protect config.h against multiple
14632 inclusion.
14633 Don't define PARAMS.
14634 * src/system.h: Define PARAMS.
14635 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
14636 purpose of config.h. system.h must not try to fix wrong
14637 definitions in config.h.
14638
14639 2000-09-20 Akim Demaille <akim@epita.fr>
14640
14641 * src/derives.h: New file.
14642 * src/main.c, src/derives.h: Use it.
14643 Formatting changes.
14644 * src/Makefile.am (noinst_HEADERS): Adjust.
14645
14646 2000-09-20 Akim Demaille <akim@epita.fr>
14647
14648 * tests/atgeneral.m4: Update from Autoconf.
14649 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
14650 (AT_CHECK_CALC): New macros.
14651 Use these macros to test bison with options `', `--raw',
14652 `--debug', `--yacc', `--yacc --debug'.
14653
14654 2000-09-19 Akim Demaille <akim@epita.fr>
14655
14656 * src/output.c: Formatting changes.
14657 * src/machine.h: Remove, leaving its contents in...
14658 * src/system.h: here.
14659 Include stdio.h.
14660 Adjust all dependencies on stdio.h and machine.h.
14661 * src/getargs.h: New file.
14662 Let all `extern' declarations about getargs.c be replaced with
14663 inclusion of `getargs.h'.
14664 * src/Makefile.am (noinst_HEADERS): Adjust.
14665
14666 * tests/calc.m4 (yyin): Be initialized in main, not on the global
14667 scope.
14668 (yyerror): Returns void, not int.
14669 * doc/bison.texinfo: Formatting changes.
14670
14671 2000-09-19 Akim Demaille <akim@epita.fr>
14672
14673 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
14674 portable.
14675
14676 2000-09-18 Akim Demaille <akim@epita.fr>
14677
14678 * configure.in: Append WARNING_CFLAGS to CFLAGS.
14679 * src/Makefile.am (INCLUDES): Don't.
14680 Be ready to fetch headers in lib/.
14681
14682 2000-09-18 Akim Demaille <akim@epita.fr>
14683
14684 * doc/bison.texinfo: Update the copyright.
14685 ANSIfy and GNUify the examples.
14686 Remove the old menu.
14687
14688 2000-09-18 Akim Demaille <akim@epita.fr>
14689
14690 First set of tests: use the `calc' example from the documentation.
14691
14692 * src/bison.s1 (yyparse): Condition the code using `yytname' which
14693 is defined only when YYDEBUG is.
14694 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
14695 * src/files.c (tryopen, tryclose): Formatting changes.
14696 Move to the top and be static.
14697 * src/reader.c (read_signed_integer): Likewise.
14698 * tests/calc.m4: New file.
14699 * Makefile.am, suite.m4: Adjust.
14700 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
14701
14702 2000-09-18 Akim Demaille <akim@epita.fr>
14703
14704 Add support for an Autotest test suite for Bison.
14705
14706 * m4/m4.m4, m4/atconfig.m4: New files.
14707 * m4/Makefile.am (EXTRA_DIST): Adjust.
14708 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
14709 files.
14710 * src/getargs.c: Display a more standard --version message.
14711 * src/reader.c (reader): Formatting changes.
14712 No longer depend upon VERSION_STRING.
14713 * configure.in: No longer use `dnl'.
14714 Set up the test suite and the new directory `tests/.
14715 (VERSION_STRING): Remove.
14716
14717 2000-04-14 Akim Demaille <akim@epita.fr>
14718
14719 * src/reader.c (copy_comment2): New function, same as former
14720 `copy_comment', but outputs into two FILE *.
14721 (copy_comment): Use it.
14722 (parse_union_decl): Use it.
14723 (get_type, parse_start_decl): Use the same `invalid' message.
14724 (parse_start_decl, parse_union_decl): Use the same `multiple'
14725 message.
14726 (parse_union_decl, copy_guard, copy_action): Use the same
14727 `unmatched' message.
14728 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
14729
14730 2000-03-31 Akim Demaille <akim@epita.fr>
14731
14732 * src/files.c (tryopen, tryclose): Move to the top.
14733 Be static.
14734
14735 2000-03-31 Akim Demaille <akim@epita.fr>
14736
14737 * src/main.c (main): Don't call `done', exit does it.
14738
14739 2000-03-31 Akim Demaille <akim@epita.fr>
14740
14741 * allocate.c: s/return (foo)/return foo/.
14742 * lalr.c: Likewise.
14743 * LR0.c: Likewise.
14744 * output.c: Likewise.
14745 * reader.c: Likewise.
14746 * symtab.c: Likewise.
14747 * vmsgetargs.c: Likewise.
14748
14749 2000-03-31 Akim Demaille <akim@epita.fr>
14750
14751 Clean up the error reporting functions.
14752
14753 * src/report.c: New file.
14754 * src/report.h: Likewise.
14755 * src/Makefile.am: Adjust.
14756 * m4/error.m4: New file.
14757 * m4/Makefile.am: Adjust.
14758 * configure.in (jm_PREREQ_ERROR): Call it.
14759 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
14760 Remove.
14761 (fatal, fatals): Remove. All callers use complain.c::fatal.
14762 (warn, warni, warns, warnss, warnss): Remove. All callers use
14763 complain.c::complain.
14764 (toomany): Remove, use fatal instead.
14765 * src/files.c (done): No argument, use complain_message_count.
14766 * src/main.c (main): Register `done' to `atexit'.
14767
14768 * src/getargs.c (usage): More `fputs', less `fprintf'.
14769
14770 2000-03-28 Akim Demaille <akim@epita.fr>
14771
14772 * lib/: New directory.
14773 * Makefile.am (SUBDIRS): Adjust.
14774 * configure.in: Adjust.
14775 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
14776 useless.
14777 * src/alloca.c: Moved to lib/.
14778 * src/getopt.c: Likewise.
14779 * src/getopt1.c: Likewise.
14780 * src/getopt.h: Likewise.
14781 * src/ansi2knr.c: Likewise.
14782 * src/ansi2knr.1: Likewise.
14783 * src/Makefile.am: Adjust.
14784 * lib/Makefile.am: New file.
14785
14786 2000-03-28 Akim Demaille <akim@epita.fr>
14787
14788 * src/getargs.c (usage): Refresh the help message.
14789
14790 2000-03-17 Akim Demaille <akim@epita.fr>
14791
14792 * src/getopt1.c: Updated from textutils 2.0e
14793 * src/getopt.c: Likewise.
14794 * src/getopt.h: Likewise.
14795
14796 2000-03-17 Akim Demaille <akim@epita.fr>
14797
14798 * src/Makefile.am (bison.simple): Fix the awk program: quote only
14799 the file name, not the whole `#line LINE FILE'.
14800
14801 2000-03-17 Akim Demaille <akim@epita.fr>
14802
14803 On syntax errors, report the token on which we choked.
14804
14805 * src/bison.s1 (yyparse): In the label yyerrlab, when
14806 YYERROR_VERBOSE, add yychar in msg.
14807
14808 2000-03-17 Akim Demaille <akim@epita.fr>
14809
14810 * src/reader.c (copy_at): New function.
14811 (copy_guard): Use it.
14812 (copy_action): Use it.
14813
14814 2000-03-17 Akim Demaille <akim@epita.fr>
14815
14816 Be kind to translators, save some useless translations.
14817
14818 * src/main.c (banner): New function.
14819 (fatal_banner): Use it.
14820 (warn_banner): Use it.
14821
14822 2000-03-17 Akim Demaille <akim@epita.fr>
14823
14824 * src/reader.c (copy_definition): Use copy_string and
14825 copy_comment. Removed now unused `match', `ended',
14826 `cplus_comment'.
14827 (copy_comment, copy_string): Moved, to be visible from
14828 copy_definition.
14829
14830 2000-03-17 Akim Demaille <akim@epita.fr>
14831
14832 * src/reader.c (copy_string): Declare `static inline'. No
14833 problems with inline, since it is checked by configure.
14834 (copy_comment): Likewise.
14835
14836 2000-03-17 Akim Demaille <akim@epita.fr>
14837
14838 * src/reader.c (packsymbols): Formatting changes.
14839
14840 2000-03-17 Akim Demaille <akim@epita.fr>
14841
14842 * src/reader.c (copy_comment): New function, factored out from:
14843 (copy_action): Use it. Removed now unused `match', `ended',
14844 `cplus_comment'.
14845 (copy_guard): Likewise.
14846
14847 2000-03-17 Akim Demaille <akim@epita.fr>
14848
14849 * src/reader.c (copy_string): New function, factored out from:
14850 (copy_action): Use it.
14851 (copy_guard): Likewise.
14852
14853 2000-03-17 Akim Demaille <akim@epita.fr>
14854
14855 Change the handling of @s so that they behave exactly like $s.
14856 There is now a pseudo variable @$ (readble and writable), location
14857 of the lhs of the rule (by default ranging from the location of
14858 the first symbol of the rhs, to the location of the last symbol,
14859 or, if the rhs is empty, YYLLOC).
14860
14861 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
14862 yyval.
14863 (yyparse): When providing a default semantic action, provide a
14864 default location action.
14865 (after the $): No longer change `*YYLSP', just stack YYLOC the
14866 same way you stack YYVAL.
14867 * src/reader.c (read_declarations): Use warns.
14868 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
14869 (copy_action, case '@'): Likewise.
14870 Use a standard error message, to save useless work from
14871 translators.
14872
14873 2000-03-17 Akim Demaille <akim@epita.fr>
14874
14875 * src/bison.s1: Formatting and cosmetics changes.
14876 * src/reader.c: Likewise.
14877 Update the Copyright notice.
14878
14879 2000-03-17 Akim Demaille <akim@epita.fr>
14880
14881 * src/bison.s1 (#line): All set to `#line' only, since the
14882 Makefile now handles them.
14883
14884 2000-03-16 Akim Demaille <akim@epita.fr>
14885
14886 * src/output.c (output_rule_data): Output the documentation of
14887 some of the tables.
14888 (Copyright notice): Update.
14889 Formatting changes.
14890
14891 2000-03-16 Akim Demaille <akim@epita.fr>
14892
14893 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
14894 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
14895 One `#if YYDEBUG' remains, since it uses variables which are
14896 defined only if `YYDEBUG != 0'.
14897
14898 2000-03-16 Akim Demaille <akim@epita.fr>
14899
14900 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
14901 and related variables so that the similarities are highlighted.
14902
14903 2000-03-16 Akim Demaille <akim@epita.fr>
14904
14905 * src/bison.s1: Properly indent CPP directives.
14906
14907 2000-03-16 Akim Demaille <akim@epita.fr>
14908
14909 * src/bison.s1: Properly indent the `alloca' CPP section.
14910
14911 2000-03-16 Akim Demaille <akim@epita.fr>
14912
14913 Do not hard code values of directories in `configure.in'.
14914 Update the `configure' tool chain.
14915
14916 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
14917 src/makefile.am.
14918 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
14919 (AC_OUTPUT): Add m4/Makefile.
14920 Bump to bison 1.28a, 1.29 has never been released.
14921 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
14922 handled via src/Makefile.am.
14923 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
14924 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
14925 autoheader.
14926 * Makefile.am (SUBDIRS): Add m4.
14927 (ACLOCAL_AM_FLAGS): New variable.
14928 (AUTOMAKE_OPTIONS): Add check-news.
14929 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
14930 the proper line number and file name.
14931 (DEFS): Propagate the location of bison library files and of the
14932 locale files.
14933 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
14934 builddir.
14935 * acinclude.m4: Remove, replaced by the directory m4.
14936 * m4/Makefile.am (EXTRA_DIST): New variable.
14937 * m4/gettext.m4: New file, from the fileutils.
14938 * m4/lcmessage.m4: Likewise
14939 * m4/progtest.m4: Likewise.
14940 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
14941
14942 2000-03-10 Akim Demaille <akim@epita.fr>
14943
14944 * src/closure.c:
14945 Formatting changes of various comments.
14946 Respect the GNU coding standards at various places.
14947 Don't use `_()' when no translation is needed.
14948
14949 1999-12-13 Jesse Thilo <jthilo@gnu.org>
14950
14951 * src/files.c:
14952 OS/2 honors TMPDIR environment variable.
14953
14954 1999-12-13 Jesse Thilo <jthilo@gnu.org>
14955
14956 * doc/bison.texinfo: Tweaked spelling and grammar.
14957 Updated ISBN.
14958 Removed reference to price of printed copy.
14959 Mention BISON_SIMPLE and BISON_HAIRY.
14960
14961 1999-12-13 Jesse Thilo <jthilo@gnu.org>
14962
14963 * configure.in, NEWS:
14964 Bison 1.29 released.
14965
14966 1999-10-27 Jesse Thilo <jthilo@gnu.org>
14967
14968 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
14969 Added reference card.
14970
14971 1999-07-26 Jesse Thilo <jthilo@gnu.org>
14972
14973 * po/ru.po: Added Russian translation.
14974
14975 1999-07-26 Jesse Thilo <jthilo@gnu.org>
14976
14977 * configure.in: Added Russian translation.
14978
14979 1999-07-06 Jesse Thilo <jthilo@gnu.org>
14980
14981 * configure.in, NEWS, README:
14982 Released version 1.28.
14983
14984 1999-06-14 Jesse Thilo <jthilo@gnu.org>
14985
14986 * src/system.h:
14987 Squashed redefinition warning on some systems.
14988
14989 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
14990 Have configure build version string instead of relying on ANSI string
14991 concatentation.
14992
14993 1999-06-14 Jesse Thilo <jthilo@gnu.org>
14994
14995 * po/POTFILES.in: Got rid of version.c.
14996
14997 1999-06-14 Jesse Thilo <jthilo@gnu.org>
14998
14999 * acconfig.h, configure.in:
15000 Have configure build version string instead of relying on ANSI string
15001 concatentation.
15002
15003 1999-06-08 Jesse Thilo <jthilo@gnu.org>
15004
15005 * doc/bison.1:
15006 Dropped mention of `+' for long-named options.
15007
15008 1999-05-30 Jesse Thilo <jthilo@gnu.org>
15009
15010 * src/files.c: Added <unistd.h> for unlink().
15011
15012 * src/Makefile.am, src/system.h:
15013 I18n fixes.
15014
15015 1999-05-30 Jesse Thilo <jthilo@gnu.org>
15016
15017 * README: Added a FAQ list.
15018
15019 * configure.in, acconfig.h:
15020 I18n fixes.
15021
15022 1999-05-30 Jesse Thilo <jthilo@gnu.org>
15023
15024 * doc/FAQ, doc/Makefile.am:
15025 Added a FAQ list.
15026
15027 1999-05-19 Jesse Thilo <jthilo@gnu.org>
15028
15029 * src/alloc.h, src/symtab.h, src/version.c:
15030 Protected inclusion of "config.h" with HAVE_CONFIG_H.
15031
15032 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15033
15034 * src/.cvsignore, src/Makefile.am:
15035 Reorganized: sources in `src', documentation in `doc'.
15036
15037 * src/lex.c (literalchar):
15038 fixed the code for escaping double quotes (thanks
15039 Jonathan Czisny.)
15040
15041 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15042
15043 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
15044 Adjusted paths to reflect directory reorganization.
15045
15046 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15047
15048 * doc/.cvsignore, doc/Makefile.am:
15049 Reorganized: sources in `src', documentation in `doc'.
15050
15051 1999-04-18 Jesse Thilo <jthilo@gnu.org>
15052
15053 * configure.in:
15054 Updated AC_INIT file to reflect directory reorganization.
15055
15056 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
15057 Reorganized: sources in `src', documentation in `doc'.
15058
15059 1999-04-13 Jesse Thilo <jthilo@gnu.org>
15060
15061 * src/allocate.c:
15062 Don't declare calloc() and realloc() if not necessary.
15063
15064 1999-04-13 Jesse Thilo <jthilo@gnu.org>
15065
15066 * configure.in, acconfig.h, acinclude.m4:
15067 Don't declare calloc() and realloc() if not necessary.
15068
15069 1999-03-23 Jesse Thilo <jthilo@gnu.org>
15070
15071 * po/.cvsignore: Added i18n support.
15072
15073 1999-03-23 Jesse Thilo <jthilo@gnu.org>
15074
15075 * acconfig.h, configure.in, Makefile.am:
15076 Added i18n support.
15077
15078 1999-03-22 Jesse Thilo <jthilo@gnu.org>
15079
15080 * src/bison.s1: Fixed #line numbers.
15081
15082 1999-03-15 Jesse Thilo <jthilo@gnu.org>
15083
15084 * po/es.po, po/fr.po, po/nl.po, po/de.po:
15085 Added PO files from Translation Project.
15086
15087 1999-03-03 Jesse Thilo <jthilo@gnu.org>
15088
15089 * Makefile.am:
15090 Added support for non-ANSI compilers (ansi2knr).
15091
15092 1999-02-16 Jesse Thilo <jthilo@gnu.org>
15093
15094 * configure.in: Bumped version number to 1.27.
15095
15096 * Makefile.am:
15097 Added `bison.simple' to list of files removed by `make distclean'.
15098
15099 1999-02-12 Jesse Thilo <jthilo@gnu.org>
15100
15101 * src/files.c, src/files.h:
15102 Defined locations of parser files in config.h instead of Makefile.
15103
15104 1999-02-12 Jesse Thilo <jthilo@gnu.org>
15105
15106 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
15107 Defined locations of parser files in config.h instead of Makefile.
15108
15109 1999-02-09 Jesse Thilo <jthilo@gnu.org>
15110
15111 * Makefile.am:
15112 Removed inappropriate use of $< macro.
15113
15114 1999-02-05 Jesse Thilo <jthilo@gnu.org>
15115
15116 * po/Makefile.in.in, po/POTFILES.in:
15117 Add `po' directory skeleton.
15118
15119 1999-01-27 Jesse Thilo <jthilo@gnu.org>
15120
15121 * README: Document help-bison list.
15122
15123 * configure.in: Add check for mkstemp().
15124
15125 1999-01-20 Jesse Thilo <jthilo@gnu.org>
15126
15127 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
15128 Hush a few compiler warnings.
15129
15130 * src/files.c:
15131 Add tryclose(), which verifies that fclose was successful.
15132 Hush a couple of compiler warnings.
15133
15134 1999-01-20 Jesse Thilo <jthilo@gnu.org>
15135
15136 * Makefile.am, OChangeLog:
15137 ChangeLog is now automatically generated. Include the old version as
15138 OChangeLog.
15139
15140 1999-01-14 Jesse Thilo <jthilo@gnu.org>
15141
15142 * 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:
15143 Update FSF address.
15144
15145 1999-01-14 Jesse Thilo <jthilo@gnu.org>
15146
15147 * doc/bison.texinfo: Fix formatting glitch.
15148
15149 * doc/bison.texinfo: Update FSF address.
15150
15151 1999-01-14 Jesse Thilo <jthilo@gnu.org>
15152
15153 * acconfig.h: Update FSF address.
15154
15155 1999-01-08 Jesse Thilo <jthilo@gnu.org>
15156
15157 * src/system.h:
15158 Don't define PACKAGE here, since config.h defines it.
15159
15160 1998-12-30 Jesse Thilo <jthilo@gnu.org>
15161
15162 * src/reader.c: Update copyright date.
15163
15164 * src/main.c:
15165 Ditch sprintf to statically-sized buffers in fatal/warn functions in
15166 favor of output directly to stderr (avoids buffer overruns).
15167
15168 * src/reader.c: Some checks for premature EOF.
15169
15170 * 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:
15171 Use prototypes if the compiler understands them.
15172
15173 * src/files.c: Honor TMPDIR on Unix hosts.
15174 Use prototypes if the compiler understands them.
15175
15176 * src/reader.c:
15177 Fix a couple of buffer overrun bugs.
15178 Use prototypes if the compiler understands them.
15179
15180 * src/system.h: Include unistd.h and ctype.h.
15181 Use #ifdef instead of #if for NLS symbols.
15182
15183 1998-12-30 Jesse Thilo <jthilo@gnu.org>
15184
15185 * doc/bison.texinfo:
15186 Delete comment "consider using @set for edition number, etc..." since
15187 we now are doing so.
15188
15189 1998-12-30 Jesse Thilo <jthilo@gnu.org>
15190
15191 * configure.in:
15192 Use prototypes if the compiler understands them.
15193
15194 * NEWS: Document 1.26 highlights.
15195
15196 * Makefile.am: Require Automake 1.3 or later.
15197
15198 * acconfig.h:
15199 Use prototypes if the compiler understands them.
15200
15201 1998-12-29 Jesse Thilo <jthilo@gnu.org>
15202
15203 * src/version.c:
15204 Use VERSION symbol from automake for version number.
15205
15206 1998-12-29 Jesse Thilo <jthilo@gnu.org>
15207
15208 * acconfig.h, configure.in, version.cin:
15209 Use VERSION symbol from automake for version number.
15210
15211 1998-11-28 Jesse Thilo <jthilo@gnu.org>
15212
15213 * Makefile.am:
15214 Distribute original version of simple parser (bison.s1), not built
15215 version (bison.simple).
15216
15217 1998-11-28 Jesse Thilo <jthilo@gnu.org>
15218
15219 * doc/bison.texinfo: Add info dir entry.
15220
15221 * doc/bison.texinfo:
15222 Let automake put version number into documentation.
15223
15224 1998-11-26 Jesse Thilo <jthilo@gnu.org>
15225
15226 * src/bison.cld, src/build.com, src/vmshlp.mar:
15227 Add non-RCS files from /gd/gnu/bison.
15228
15229 1998-11-26 Jesse Thilo <jthilo@gnu.org>
15230
15231 * doc/bison.1:
15232 Document the BISON_HAIRY and BISON_SIMPLE variables.
15233
15234 1998-11-25 Jesse Thilo <jthilo@gnu.org>
15235
15236 * src/version.c: Build version.c automatically.
15237
15238 * src/reader.c:
15239 Fix token numbering (used to start at 258, not 257).
15240
15241 * src/system.h: Include config.h.
15242
15243 * src/getargs.c: Update bug report address.
15244
15245 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
15246 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
15247
15248 1998-11-25 Jesse Thilo <jthilo@gnu.org>
15249
15250 * Makefile.am:
15251 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
15252
15253 * configure.in, version.cin:
15254 Build version.c automatically.
15255
15256 * AUTHORS: Add AUTHORS file.
15257
15258 * README: Update bug report address.
15259
15260 * bison.simple:
15261 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
15262
15263 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
15264 Add automake stuff.
15265
15266 1998-11-25 Jesse Thilo <jthilo@gnu.org>
15267
15268 * doc/bison.texinfo: Clean up some formatting.
15269
15270 1998-05-05 Richard Stallman <rms@gnu.org>
15271
15272 * doc/bison.texinfo:
15273 Explain better why to make a pure parser.
15274
15275 1998-01-05 Richard Stallman <rms@gnu.org>
15276
15277 * src/files.c (openfiles):
15278 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
15279 find a temporary directory, if possible. Do not unlink files while
15280 they are open.
15281
15282 1997-08-25 Richard Stallman <rms@gnu.org>
15283
15284 * src/reader.c (stack_offset;):
15285 Change some warni to warns.
15286
15287 * src/lex.c (literalchar): Use warns, not warni.
15288
15289 1997-06-28 Richard Stallman <rms@gnu.org>
15290
15291 * src/bison.s1: Add a Bison version comment.
15292
15293 * src/main.c (fatal, warn, berror):
15294 Use program_name.
15295
15296 1997-06-28 Richard Stallman <rms@gnu.org>
15297
15298 * Makefile.in (bison_version): New variable.
15299 (dist): Use that variable.
15300 (bison.s1): Substitute the Bison version into bison.simple.
15301
15302 * bison.simple: Add a Bison version comment.
15303
15304 1997-06-18 Richard Stallman <rms@gnu.org>
15305
15306 * src/main.c (fatal, warn, berror):
15307 Make error messages standard.
15308 (toomany): Improve error message text.
15309
15310 * 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:
15311 new.h renamed to alloc.h.
15312
15313 1997-06-18 Richard Stallman <rms@gnu.org>
15314
15315 * Makefile.in: new.h renamed to alloc.h.
15316
15317 1997-05-24 Richard Stallman <rms@gnu.org>
15318
15319 * src/lex.c (literalchar):
15320 Fix the code for escaping \, " and '.
15321
15322 (lex): Avoid trouble when there are many chars
15323 to discard in a char literal with just several chars in it.
15324
15325 1997-05-17 Richard Stallman <rms@gnu.org>
15326
15327 * src/bison.s1:
15328 Use malloc, if using alloca is troublesome.
15329 (YYSTACK_USE_ALLOCA): New flag macro.
15330 Define it for some systems and compilers.
15331 (YYSTACK_ALLOC): New macro.
15332 (yyparse): Use YYSTACK_ALLOC to allocate stack.
15333 If it was malloc'd, free it.
15334
15335 1997-05-17 Richard Stallman <rms@gnu.org>
15336
15337 * bison.simple:
15338 Use malloc, if using alloca is troublesome.
15339 (YYSTACK_USE_ALLOCA): New flag macro.
15340 Define it for some systems and compilers.
15341 (YYSTACK_ALLOC): New macro.
15342 (yyparse): Use YYSTACK_ALLOC to allocate stack.
15343 If it was malloc'd, free it.
15344
15345 1997-04-23 Richard Stallman <rms@gnu.org>
15346
15347 * src/bison.s1:
15348 (alloca) [__hpux]: Always define as __builtin_alloca.
15349
15350 1997-04-23 Richard Stallman <rms@gnu.org>
15351
15352 * bison.simple:
15353 (alloca) [__hpux]: Always define as __builtin_alloca.
15354
15355 1997-04-22 Richard Stallman <rms@gnu.org>
15356
15357 * src/bison.s1:
15358 [__hpux]: Include alloca.h (right for HPUX 10)
15359 instead of declaring alloca (right for HPUX 9).
15360
15361 * src/bison.s1 (__yy_memcpy):
15362 Declare arg `count' as unsigned int.
15363 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
15364
15365 1997-04-22 Richard Stallman <rms@gnu.org>
15366
15367 * bison.simple:
15368 [__hpux]: Include alloca.h (right for HPUX 10)
15369 instead of declaring alloca (right for HPUX 9).
15370
15371 * bison.simple (__yy_memcpy):
15372 Declare arg `count' as unsigned int.
15373 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
15374
15375 1997-01-03 Richard Stallman <rms@gnu.org>
15376
15377 * src/allocate.c: [__STDC__ or _MSC_VER]:
15378 Declare calloc and realloc to return void *.
15379
15380 1997-01-02 Richard Stallman <rms@gnu.org>
15381
15382 * src/system.h:
15383 [_MSC_VER]: Include stdlib.h and process.h.
15384 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
15385
15386 * src/main.c (main): Return FAILURE as a value.
15387 (printable_version): Declare arg as int, not char.
15388
15389 1997-01-02 Richard Stallman <rms@gnu.org>
15390
15391 * Makefile.in (dist):
15392 Explicitly check for symlinks, and copy them.
15393
15394 1996-12-19 Richard Stallman <rms@gnu.org>
15395
15396 * src/files.c:
15397 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
15398
15399 1996-12-18 Paul Eggert <eggert@gnu.org>
15400
15401 * src/bison.s1 (yyparse):
15402 If __GNUC__ and YYPARSE_PARAM are both defined,
15403 declare yyparse to have a void * argument.
15404
15405 1996-12-18 Paul Eggert <eggert@gnu.org>
15406
15407 * bison.simple (yyparse):
15408 If __GNUC__ and YYPARSE_PARAM are both defined,
15409 declare yyparse to have a void * argument.
15410
15411 1996-12-17 Richard Stallman <rms@gnu.org>
15412
15413 * src/reduce.c (nbits): Add some casts.
15414
15415 1996-08-12 Richard Stallman <rms@gnu.org>
15416
15417 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
15418
15419 1996-08-12 Richard Stallman <rms@gnu.org>
15420
15421 * bison.simple: Test _MSDOS as well as _MSDOS_.
15422
15423 1996-07-31 Richard Stallman <rms@gnu.org>
15424
15425 * src/bison.s1:
15426 [__sun && __i386]: Include alloca.h.
15427
15428 1996-07-31 Richard Stallman <rms@gnu.org>
15429
15430 * bison.simple:
15431 [__sun && __i386]: Include alloca.h.
15432
15433 1996-07-30 Richard Stallman <rms@gnu.org>
15434
15435 * src/bison.s1: Comment change.
15436
15437 * src/bison.s1: Test _MSDOS_, not MSDOS.
15438
15439 1996-07-30 Richard Stallman <rms@gnu.org>
15440
15441 * bison.simple: Comment change.
15442
15443 * bison.simple: Test _MSDOS_, not MSDOS.
15444
15445 1996-06-01 Richard Stallman <rms@gnu.org>
15446
15447 * 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:
15448 Insert `_' macro around many string constants.
15449
15450 * src/main.c:
15451 Insert `_' macro around many string constants.
15452
15453 (main): Call setlocale, bindtextdomain and textdomain.
15454
15455 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
15456 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
15457 [ENABLE_NLS]: Include libintl.h.
15458 [ENABLE_NLS] (gettext): Define.
15459 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
15460 (N_, PACKAGE, LOCALEDIR): New macros.
15461
15462 1996-06-01 Richard Stallman <rms@gnu.org>
15463
15464 * POTFILES.in: New file.
15465
15466 * Makefile.in (allocate.o):
15467 Define target explicitly.
15468
15469 * Makefile.in (CFLAGS): Set to @CFLAGS@.
15470 (LDFLAGS): Set to @LDFLAGS@.
15471 (configure): Run autoconf only if preceding `cd' succeeds.
15472 (bison.s1): Redirect output to temporary file then move the
15473 temporary to the target, rather than redirecting directly to bison.s1.
15474 (clean): Remove config.status and config.log.
15475 (distclean): Don't remove config.status here.
15476
15477 1996-05-12 Richard Stallman <rms@gnu.org>
15478
15479 * src/bison.s1:
15480 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
15481
15482 1996-05-12 Richard Stallman <rms@gnu.org>
15483
15484 * bison.simple:
15485 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
15486
15487 1996-05-11 Richard Stallman <rms@gnu.org>
15488
15489 * src/bison.s1 (__yy_memcpy):
15490 Really reorder the args, as was supposedly done on Feb 14 1995.
15491 (yyparse): Calls changed accordingly.
15492
15493 1996-05-11 Richard Stallman <rms@gnu.org>
15494
15495 * Makefile.in (dist): Don't use $(srcdir).
15496
15497 * bison.simple (__yy_memcpy):
15498 Really reorder the args, as was supposedly done on Feb 14 1995.
15499 (yyparse): Calls changed accordingly.
15500
15501 1996-01-27 Richard Stallman <rms@gnu.org>
15502
15503 * src/output.c (output_rule_data):
15504 Test YYERROR_VERBOSE in the conditional
15505 around the definition of ttyname.
15506
15507 1995-12-29 Richard Stallman <rms@gnu.org>
15508
15509 * src/bison.s1:
15510 Fix line numbers in #line commands.
15511
15512 1995-12-29 Richard Stallman <rms@gnu.org>
15513
15514 * bison.simple:
15515 Fix line numbers in #line commands.
15516
15517 1995-12-27 Richard Stallman <rms@gnu.org>
15518
15519 * src/bison.s1 (YYPARSE_PARAM_DECL):
15520 In C++, make it always null.
15521 (YYPARSE_PARAM_ARG): New macro.
15522 (yyparse): Use YYPARSE_PARAM_ARG.
15523
15524 1995-12-27 Richard Stallman <rms@gnu.org>
15525
15526 * bison.simple (YYPARSE_PARAM_DECL):
15527 In C++, make it always null.
15528 (YYPARSE_PARAM_ARG): New macro.
15529 (yyparse): Use YYPARSE_PARAM_ARG.
15530
15531 1995-11-29 Richard Stallman <rms@gnu.org>
15532
15533 * doc/bison.texinfo:
15534 Describe literal string tokens, %raw, %no_lines, %token_table.
15535
15536 1995-11-29 Daniel Hagerty <hag@gnu.org>
15537
15538 * doc/bison.texinfo: Fixed update date
15539
15540 1995-10-16 Richard Stallman <rms@gnu.org>
15541
15542 * src/version.c: Version 1.25.
15543
15544 1995-10-16 Richard Stallman <rms@gnu.org>
15545
15546 * NEWS: *** empty log message ***
15547
15548 1995-10-16 Richard Stallman <rms@gnu.org>
15549
15550 * doc/bison.1, doc/bison.rnh:
15551 Add new options.
15552
15553 1995-10-15 Richard Stallman <rms@gnu.org>
15554
15555 * src/vmsgetargs.c, src/getargs.c:
15556 Added -n, -k, and -raw switches.
15557 (noparserflag, toknumflag, rawtoknumflag): New variables.
15558
15559 * src/symtab.h (SALIAS):
15560 New #define for adding aliases to %token.
15561 (struct bucket): Added `alias' field.
15562
15563 * src/reduce.c (reduce_grammar):
15564 Revise error message.
15565 (print_notices): Remove final `.' from error message.
15566
15567 * src/reader.c (reader_output_yylsp):
15568 New function.
15569 (readgram): Use `#if 0' around code that accepted %command
15570 inside grammar rules: The documentation doesn't allow it,
15571 and it will fail since the %command processors scan for the next %.
15572 (parse_token_decl): Extended the %token
15573 declaration to allow a multi-character symbol as an alias.
15574 (parse_thong_decl): New function.
15575 (read_declarations): Added %thong declarations.
15576 (read_declarations): Handle NOOP to deal with allowing
15577 % declarations as another means to specify the flags.
15578 (readgram): Allow %prec prior to semantics embedded in a rule.
15579 (skip_to_char, read_declarations, copy_definition)
15580 (parse_token_decl, parse_start_decl, parse_type_decl)
15581 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
15582 (get_type_name, copy_guard, copy_action, readgram)
15583 (get_type, packsymbols): Revised most error messages.
15584 Changed `fatal' to `warnxxx' to avoid aborting for error.
15585 Revised and use multiple warnxxx functions to avoid using VARARGS1.
15586 (read_declarations): Improve the error message for
15587 an invalid character. Do not abort.
15588 (read_declarations, copy_guard, copy_action): Use
15589 printable_version to avoid unprintable characters in printed output.
15590 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
15591 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
15592 Allow the type of a non-terminal can be given
15593 more than once, as long as all specifications give the same type.
15594
15595 * src/output.c:
15596 (output_headers, output_trailers, output, output_gram)
15597 (output_rule_data): Implement noparserflag variable.
15598 Implement toknumflag variable.
15599 (output): Call reader_output_yylsp to output LTYPESTR.
15600
15601 * src/main.c (main):
15602 If reader sees an error, don't process the grammar.
15603 (fatals): Updated to not use VARARGS1.
15604 (printable_version, int_to_string, warn, warni, warns, warnss)
15605 (warnsss): New error reporting functions. Avoid abort for error.
15606
15607 * src/lex.h:
15608 Added THONG and NOOP for alias processing.
15609 Added SETOPT for the new code that allows setting options with %flags.
15610
15611 * src/lex.c:
15612 Include getopt.h. Add some extern decls.
15613 (safegetc): New function to deal with EOF gracefully.
15614 (literalchar); new function to deal with reading \ escapes.
15615 (lex): Use literalchar.
15616 (lex): Implemented "..." tokens.
15617 (literalchar, lex, parse_percent_token): Made tokenbuffer
15618 always contain the token. This includes growing the token
15619 buffer while reading an integer.
15620 (parse_percent_token): Replaced if-else statement with percent_table.
15621 (parse_percent_token): Added % declarations as another
15622 way to specify the flags -n, -l, and -r. Also added hooks for
15623 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
15624 major changes to files.c.
15625 (lex) Retain in the incoming stream a character following
15626 an incorrect '/'.
15627 (skip_white_space, lex): Revised most error messages
15628 and changed fatal to warn to avoid aborting.
15629 (percent_table): Added %thong declarations.
15630
15631 * src/gram.h: Comment changes.
15632
15633 * src/files.c (openfiles, open_extra_files, done):
15634 Add faction flag
15635 and actfile file. Handle noparserflag. Both for -n switch.
15636
15637 * src/conflicts.c (resolve_sr_conflict):
15638 Remove use of alloca.
15639
15640 1995-06-01 Jim Meyering <meyering@gnu.org>
15641
15642 * doc/bison.texinfo: *** empty log message ***
15643
15644 1995-05-06 Richard Stallman <rms@gnu.org>
15645
15646 * src/bison.s1: Comment change.
15647
15648 1995-05-06 Richard Stallman <rms@gnu.org>
15649
15650 * bison.simple: Comment change.
15651
15652 1995-05-03 Richard Stallman <rms@gnu.org>
15653
15654 * src/version.c: Version now 1.24.
15655
15656 * src/bison.s1: Change distribution terms.
15657
15658 * src/version.c: Version now 1.23.
15659
15660 1995-05-03 Richard Stallman <rms@gnu.org>
15661
15662 * doc/bison.texinfo:
15663 Rewrite "Conditions for Using Bison".
15664 Update version to 1.24.
15665
15666 1995-05-03 Richard Stallman <rms@gnu.org>
15667
15668 * bison.simple: Change distribution terms.
15669
15670 1995-02-23 Richard Stallman <rms@gnu.org>
15671
15672 * src/files.c: Test __VMS_POSIX as well as VMS.
15673
15674 1995-02-14 Jim Meyering <meyering@gnu.org>
15675
15676 * src/bison.s1 (__yy_memcpy):
15677 Renamed from __yy_bcopy to avoid
15678 confusion. Reverse FROM and TO arguments to be consistent with
15679 those of memcpy.
15680
15681 1995-02-14 Jim Meyering <meyering@gnu.org>
15682
15683 * bison.simple (__yy_memcpy):
15684 Renamed from __yy_bcopy to avoid
15685 confusion. Reverse FROM and TO arguments to be consistent with
15686 those of memcpy.
15687
15688 1994-11-10 David J. MacKenzie <djm@gnu.org>
15689
15690 * NEWS: reformat
15691
15692 * NEWS: New file.
15693
15694 * Makefile.in (DISTFILES): Include NEWS.
15695
15696 * Makefile.in (DISTFILES):
15697 Include install-sh, not install.sh.
15698
15699 * configure.in: Update to Autoconf v2 macro names.
15700
15701 1994-10-05 David J. MacKenzie <djm@gnu.org>
15702
15703 * Makefile.in: fix typo
15704
15705 * Makefile.in (prefix, exec_prefix):
15706 Let configure set them.
15707
15708 1994-09-28 David J. MacKenzie <djm@gnu.org>
15709
15710 * Makefile.in: Set datadir to $(prefix)/share.
15711
15712 1994-09-15 Richard Stallman <rms@gnu.org>
15713
15714 * src/bison.s1:
15715 Update copyright notice and GPL version.
15716
15717 1994-09-15 Richard Stallman <rms@gnu.org>
15718
15719 * bison.simple:
15720 Update copyright notice and GPL version.
15721
15722 1994-07-12 Richard Stallman <rms@gnu.org>
15723
15724 * src/reduce.c, src/reader.c:
15725 entered into RCS
15726
15727 1994-05-05 David J. MacKenzie <djm@gnu.org>
15728
15729 * Makefile.in: entered into RCS
15730
15731 1994-03-26 Richard Stallman <rms@gnu.org>
15732
15733 * src/bison.s1: entered into RCS
15734
15735 1994-03-26 Richard Stallman <rms@gnu.org>
15736
15737 * bison.simple: entered into RCS
15738
15739 1994-03-25 Richard Stallman <rms@gnu.org>
15740
15741 * src/main.c: entered into RCS
15742
15743 1994-03-24 Richard Stallman <rms@gnu.org>
15744
15745 * src/conflicts.c: entered into RCS
15746
15747 1994-01-02 Richard Stallman <rms@gnu.org>
15748
15749 * Makefile.in: *** empty log message ***
15750
15751 1993-11-21 Richard Stallman <rms@gnu.org>
15752
15753 * src/bison.s1: *** empty log message ***
15754
15755 1993-11-21 Richard Stallman <rms@gnu.org>
15756
15757 * doc/bison.texinfo: entered into RCS
15758
15759 * doc/bison.texinfo: *** empty log message ***
15760
15761 1993-11-21 Richard Stallman <rms@gnu.org>
15762
15763 * bison.simple: *** empty log message ***
15764
15765 1993-10-25 David J. MacKenzie <djm@gnu.org>
15766
15767 * doc/bison.texinfo: *** empty log message ***
15768
15769 1993-10-19 Richard Stallman <rms@gnu.org>
15770
15771 * src/bison.s1: *** empty log message ***
15772
15773 1993-10-19 Richard Stallman <rms@gnu.org>
15774
15775 * bison.simple: *** empty log message ***
15776
15777 1993-10-14 Richard Stallman <rms@gnu.org>
15778
15779 * src/bison.s1: *** empty log message ***
15780
15781 1993-10-14 Richard Stallman <rms@gnu.org>
15782
15783 * bison.simple: *** empty log message ***
15784
15785 1993-09-14 David J. MacKenzie <djm@gnu.org>
15786
15787 * doc/bison.texinfo: *** empty log message ***
15788
15789 1993-09-13 Noah Friedman <friedman@gnu.org>
15790
15791 * Makefile.in: *** empty log message ***
15792
15793 1993-09-10 Richard Stallman <rms@gnu.org>
15794
15795 * src/conflicts.c: *** empty log message ***
15796
15797 * src/system.h: entered into RCS
15798
15799 1993-09-10 Richard Stallman <rms@gnu.org>
15800
15801 * doc/bison.1: entered into RCS
15802
15803 1993-09-06 Noah Friedman <friedman@gnu.org>
15804
15805 * src/version.c: entered into RCS
15806
15807 1993-09-06 Noah Friedman <friedman@gnu.org>
15808
15809 * Makefile.in: *** empty log message ***
15810
15811 1993-07-30 David J. MacKenzie <djm@gnu.org>
15812
15813 * Makefile.in: *** empty log message ***
15814
15815 1993-07-24 Richard Stallman <rms@gnu.org>
15816
15817 * src/bison.s1: *** empty log message ***
15818
15819 1993-07-24 Richard Stallman <rms@gnu.org>
15820
15821 * bison.simple: *** empty log message ***
15822
15823 1993-07-08 David J. MacKenzie <djm@gnu.org>
15824
15825 * Makefile.in: *** empty log message ***
15826
15827 1993-07-04 Richard Stallman <rms@gnu.org>
15828
15829 * src/bison.s1: *** empty log message ***
15830
15831 1993-07-04 Richard Stallman <rms@gnu.org>
15832
15833 * bison.simple: *** empty log message ***
15834
15835 1993-06-26 David J. MacKenzie <djm@gnu.org>
15836
15837 * src/getargs.c: entered into RCS
15838
15839 1993-06-26 David J. MacKenzie <djm@gnu.org>
15840
15841 * doc/bison.texinfo: *** empty log message ***
15842
15843 * doc/bison.1: New file.
15844
15845 1993-06-25 Richard Stallman <rms@gnu.org>
15846
15847 * src/getargs.c: New file.
15848
15849 1993-06-16 Richard Stallman <rms@gnu.org>
15850
15851 * src/bison.s1: *** empty log message ***
15852
15853 1993-06-16 Richard Stallman <rms@gnu.org>
15854
15855 * bison.simple: *** empty log message ***
15856
15857 1993-06-03 Richard Stallman <rms@gnu.org>
15858
15859 * src/bison.s1: New file.
15860
15861 1993-06-03 Richard Stallman <rms@gnu.org>
15862
15863 * doc/bison.texinfo: *** empty log message ***
15864
15865 1993-06-03 Richard Stallman <rms@gnu.org>
15866
15867 * bison.simple: New file.
15868
15869 1993-05-19 Richard Stallman <rms@gnu.org>
15870
15871 * doc/bison.texinfo: New file.
15872
15873 1993-05-07 Noah Friedman <friedman@gnu.org>
15874
15875 * Makefile.in: *** empty log message ***
15876
15877 1993-04-28 Noah Friedman <friedman@gnu.org>
15878
15879 * src/reader.c: *** empty log message ***
15880
15881 1993-04-23 Noah Friedman <friedman@gnu.org>
15882
15883 * src/alloc.h: entered into RCS
15884
15885 1993-04-20 David J. MacKenzie <djm@gnu.org>
15886
15887 * src/version.c: *** empty log message ***
15888
15889 * src/files.c, src/allocate.c:
15890 entered into RCS
15891
15892 * src/reader.c: *** empty log message ***
15893
15894 * src/lex.c: entered into RCS
15895
15896 * src/conflicts.c: New file.
15897
15898 * src/symtab.c: entered into RCS
15899
15900 * src/alloc.h: New file.
15901
15902 * src/LR0.c: entered into RCS
15903
15904 1993-04-18 Noah Friedman <friedman@gnu.org>
15905
15906 * src/reader.c: New file.
15907
15908 * src/version.c: *** empty log message ***
15909
15910 1993-04-18 Noah Friedman <friedman@gnu.org>
15911
15912 * Makefile.in: *** empty log message ***
15913
15914 1993-04-17 Noah Friedman <friedman@gnu.org>
15915
15916 * Makefile.in: *** empty log message ***
15917
15918 1993-04-15 Richard Stallman <rms@gnu.org>
15919
15920 * src/main.c, src/files.c:
15921 New file.
15922
15923 1993-04-15 Noah Friedman <friedman@gnu.org>
15924
15925 * configure.in: entered into RCS
15926
15927 * configure.in: *** empty log message ***
15928
15929 * configure.in: New file.
15930
15931 1993-04-14 Richard Stallman <rms@gnu.org>
15932
15933 * Makefile.in: New file.
15934
15935 1993-04-13 Richard Stallman <rms@gnu.org>
15936
15937 * src/version.c: New file.
15938
15939 1993-03-25 Richard Stallman <rms@gnu.org>
15940
15941 * src/output.c: entered into RCS
15942
15943 1992-09-25 Richard Stallman <rms@gnu.org>
15944
15945 * configure.bat: entered into RCS
15946
15947 1992-06-22 Richard Stallman <rms@gnu.org>
15948
15949 * src/vmsgetargs.c: entered into RCS
15950
15951 1992-06-22 Richard Stallman <rms@gnu.org>
15952
15953 * doc/bison.rnh: entered into RCS
15954
15955 1992-04-20 David J. MacKenzie <djm@gnu.org>
15956
15957 * README: entered into RCS
15958
15959 1992-01-22 Richard Stallman <rms@gnu.org>
15960
15961 * src/machine.h: entered into RCS
15962
15963 1991-12-21 Richard Stallman <rms@gnu.org>
15964
15965 * src/lalr.c, src/closure.c:
15966 entered into RCS
15967
15968 1991-12-20 Richard Stallman <rms@gnu.org>
15969
15970 * src/state.h: entered into RCS
15971
15972 1991-12-18 Richard Stallman <rms@gnu.org>
15973
15974 * src/print.c, src/nullable.c, src/derives.c:
15975 entered into RCS
15976
15977 1991-11-03 David J. MacKenzie <djm@gnu.org>
15978
15979 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
15980 entered into RCS
15981
15982 1988-09-09 Richard Stallman <rms@gnu.org>
15983
15984 * src/bison.hairy: entered into RCS
15985
15986 1987-12-16 Richard Stallman <rms@gnu.org>
15987
15988 * REFERENCES: entered into RCS
15989
15990
15991 -----
15992
15993 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
15994 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
15995 Software Foundation, Inc.
15996
15997 Copying and distribution of this file, with or without
15998 modification, are permitted provided the copyright notice and this
15999 notice are preserved.